re PR c++/5369 (template member friend declaration not honored)
[gcc.git] / gcc / cp / ChangeLog
1 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2
3 PR c++/5369
4 * friend.c (is_friend): Handle member function of a class
5 template as template friend.
6 (do_friend): Likewise.
7 * decl2.c (check_classfn): Add template_header_p parameter.
8 * decl.c (start_decl): Adjust check_classfn call.
9 (grokfndecl): Likewise.
10 * pt.c (is_specialization_of_friend): New function.
11 (uses_template_parms_level): Likewise.
12 (push_template_decl_real): Use uses_template_parms_level.
13 (tsubst_friend_function): Adjust check_classfn call.
14 * cp-tree.h (check_classfn): Adjust declaration.
15 (uses_template_parms_level): Add declaration.
16 (is_specialization_of_friend): Likewise.
17
18 2003-11-21 Mark Mitchell <mark@codesourcery.com>
19
20 PR c++/12515
21 * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
22 operator.
23
24 2003-11-21 Jan Hubicka <jh@suse.cz>
25
26 * parser.c (cp_parser_postfix_expression): Initialize 's' to
27 NULL_TREE.
28
29 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
30
31 * Make-lang.in (c++.extraclean): Delete.
32
33 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
34
35 * Make-lang.in (check-g++, lang_checks): Add.
36
37 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
38
39 PR c++/12932
40 * class.c (currently_open_derived_class): Check if
41 current_class_type is NULL_TREE.
42 * semantics.c (finish_call_expr): Check if
43 currently_open_derived_class returns NULL_TREE.
44 * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
45 parameter.
46
47 2003-11-17 Jason Merrill <jason@redhat.com>
48
49 * init.c (build_new_1): Preevaluate placement args.
50 * call.c (build_op_delete_call): Don't expose placement args to
51 overload resolution.
52
53 2003-11-16 Jason Merrill <jason@redhat.com>
54
55 * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
56 and TAGS files that include them for each front end.
57
58 2003-11-15 Bernardo Innocenti <bernie@develer.com>
59
60 PR c++/2294
61 * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
62 build failure on libjava.
63
64 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
65
66 PR c++/2294
67 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
68 unless the declaration is a built-in.
69 (set_namespace_binding): While binding OVERLOADs with only one
70 declaration, we still need to call supplement_binding.
71
72 2003-11-14 Mark Mitchell <mark@codesourcery.com>
73
74 PR c++/12762
75 * parser.c (cp_parser_enclosed_template_argument_list): New
76 function.
77 (cp_parser_template_id): Use it.
78 (cp_parser_simple_type_specifier): Recognize invalid template
79 syntax.
80
81 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
82
83 PR c++/2094
84 * pt.c (unify): Add support for PTRMEM_CST and
85 FIELD_DECL unification.
86
87 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
88
89 * decl.c (grokfndecl): Change OK to type tree.
90
91 2003-11-12 Mark Mitchell <mark@codesourcery.com>
92
93 * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
94 CONSTRUCTOR.
95
96 * decl.c (cp_make_fname_decl): When creating a top-level
97 __FUNCTION__-like symbol, do register it with pushdecl.
98
99 * decl.c (finish_case_label): Do not check that we are within a
100 switch statement here.
101 * parser.c (struct cp_parser): Add in_iteration_statement_p and
102 in_switch_statement_p.
103 (cp_parser_new): Initialize them.
104 (cp_parser_labeled_statement): Check validity of case labels
105 here.
106 (cp_parser_selection_statement): Set in_switch_statement_p.
107 (cp_parser_iteration_statement): Set in_iteration_statement_p.
108 (cp_parser_jump_statement): Check validity of break/continue
109 statements here.
110
111 PR c++/12735
112 * cp-tree.h (duplicate_decls): Return a tree.
113 * decl.c (duplicate_decls): Clarify documentation. Return
114 error_mark_node to indicate a failed redeclaration.
115 * friend.c (do_friend): Handle that case.
116 * name-lookup.c (pushdecl): Likewise.
117
118 2003-11-11 Jason Merrill <jason@redhat.com>
119
120 * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
121 * name-lookup.c (parse_using_directive): New fn.
122 (is_associated_namespace): New fn.
123 (arg_assoc_namespace): Also check associated namespaces.
124 * name-lookup.h: Declare new fns.
125 * pt.c (maybe_process_partial_specialization): Allow
126 specialization in associated namespace.
127 * parser.c (cp_parser_using_directive): Accept attributes. Use
128 parse_using_directive.
129
130 2003-11-10 Richard Henderson <rth@redhat.com>
131
132 * cvt.c (convert_to_void): Use void_zero_node after overload failure.
133
134 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
135
136 PR c++/12832
137 * name-lookup.c (supplement_binding): Gracefully handle names
138 used at non-class scope prior declaration.
139
140 2003-11-06 Matt Austern <austern@apple.com>
141
142 * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
143 * method.c (use_thunk): give thunk same visibility as function.
144 * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
145
146 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
147
148 PR c++/11616
149 * pt.c (instantiate_pending_templates): Save and restore
150 input_location.
151
152 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
153
154 PR c++/2019
155 * friend.c (add_friend): Don't display previous declaration in
156 case of duplicate friend warning.
157
158 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
159
160 PR c++/9810
161 * call.c (build_over_call): Check access using primary template
162 if FN is a member function template.
163
164 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
165
166 PR c++/12796
167 * class.c (handle_using_decl): Set input_location before calling
168 error_not_base_type.
169
170 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
171
172 PR c++/10371
173 * semantics.c (finish_non_static_data_member): Handle when
174 both processing_template_decl and qualifying_scope are true.
175
176 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
177
178 PR c++/11076
179 * class.c (handle_using_decl): Swap arguments of error_not_base_type.
180 * parser.c (cp_parser_direct_declarator): Only resolve typename for
181 namespace scope declarations.
182
183 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
184
185 PR c++/12698, c++/12699, c++/12700, c++/12566
186 * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
187 (debug_class, debug_thunks): New.
188 * class.c (dump_class_hierarchy_1): New break out from ...
189 (dump_class_hierarchy): ... here.
190 (dump_thunk, debug_thunks, debug_class): New.
191 (update_vtable_entry_for_fn): Add ssizetype casts. Correct
192 continued search for primary binfo via virtual.
193 (build_vtbl_initializer): Follow covariant thunk alias.
194 * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
195 (finish_thunk): Look for an alias of the covariant thunk and point
196 to it.
197 (use_thunk): We should never use an alias.
198 * semantics.c (emit_associated_thunks): Do not emit aliases.
199
200 PR c++/12566
201 * cp-tree.h (cp_fname_init): Add TYPE pointer param.
202 * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
203 create an ad-hoc ERROR_MARK.
204 (cp_make_fname_decl): Adjust.
205 * pt.c (tsubst_expr): Adjust.
206
207 2003-10-23 Jason Merrill <jason@redhat.com>
208
209 PR c++/12726
210 * tree.c (build_target_expr_with_type): Don't call force_rvalue
211 for CONSTRUCTORs.
212
213 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
214
215 * call.c: Fix comment formatting.
216 * class.c: Likewise.
217 * cxx-pretty-print.c: Likewise.
218 * init.c: Likewise.
219 * parser.c: Likewise.
220 * pt.c: Likewise.
221 * semantics.c: Likewise.
222 * tree.c: Likewise.
223 * typeck.c: Likewise.
224 * typeck2.c: Likewise.
225
226 2003-10-21 Mark Mitchell <mark@codesourcery.com>
227
228 PR c++/11962
229 * typeck.c (build_x_conditional_expr): Handle missing middle
230 operands in templates.
231 * mangle.c (write_expression): Issue errors about attempts to
232 mangle a non-existant middle operator to the ?: operator.
233
234 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
235 * decl.c (cp_finish_decl): Remove clause intended for asm directives
236 in struct or class fields: this code is never executed.
237
238 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
239
240 * decl.c (start_decl): Exit if push_template_decl returns
241 error_mark_node.
242
243 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
244
245 * ChangeLog: Fix typos.
246 * call.c: Fix comment typos.
247 * class.c: Likewise.
248 * cp-tree.h: Likewise.
249 * cvt.c: Likewise.
250 * cxx-pretty-print.c: Likewise.
251 * decl.c: Likewise.
252 * decl2.c: Likewise.
253 * init.c: Likewise.
254 * mangle.c: Likewise.
255 * name-lookup.c: Likewise.
256 * parser.c: Likewise.
257 * search.c: Likewise.
258 * semantics.c: Likewise.
259 * tree.c: Likewise.
260 * typeck.c: Likewise.
261
262 2003-10-20 Jan Hubicka <jh@suse.cz>
263
264 * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
265 the expansion.
266
267 2003-10-20 Mark Mitchell <mark@codesourcery.com>
268
269 * Make-lang.in (c++.install-info): Remove.
270
271 2003-10-20 Jason Merrill <jason@redhat.com>
272
273 * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
274 field.
275
276 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
277
278 PR c++/9781, c++/10583, c++/11862
279 * decl.c (cp_finish_decl): Exit immediately if decl is an
280 error_mark_node.
281 * pt.c (push_template_decl_real): Return error_mark_node for
282 invalid template declaration of variable.
283
284 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
285
286 PR c++/12495
287 * pt.c (lookup_template_class): Handle when current_class_type
288 is a local class.
289
290 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
291
292 PR c++/2513
293 * decl.c (make_typename_type): Use dependent_type_p.
294 (make_unbound_class_template): Likewise.
295 * pt.c (instantiate_class_template): Increment
296 processing_template_decl during substitution of template friend
297 function. Preincrement processing_template_decl rather than
298 postincrement.
299 (get_mostly_instantiated_function_type): Increment
300 processing_template_decl during partial substitution of function
301 type.
302
303 2003-10-15 Jan Hubicka <jh@suse.cz>
304
305 PR c++/12574
306 * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
307
308 2003-10-14 Jason Merrill <jason@redhat.com>
309
310 PR c++/11878
311 * tree.c (build_target_expr_with_type): Call force_rvalue for
312 classes with non-trivial copy ctors.
313
314 PR c++/11063
315 * typeck.c (build_modify_expr): Call convert rather than abort.
316
317 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
318
319 Breack out decl.c (3/n)
320 * name-lookup.c: Include flags.h
321 (lookup_name_current_level): Make static.
322 (add_decl_to_level): Likewise.
323 (push_local_binding): Likewise.
324 (push_overloaded_decl): Likewise.
325 (lookup_using_namespace): Likewise.
326 (qualified_lookup_using_namespace): Likewise.
327 (lookup_type_current_level): Likewise.
328 (unqualified_namespace_lookup): Likewise.
329 (namespace_ancestor): Likewise.
330 (push_using_directive): Likewise.
331 * decl.c (pushdecl): Move to name-lookup.c.
332 (pushdecl_top_level_1): Likewise.
333 (pushdecl_top_level): Likewise.
334 (pushdecl_top_level_and_finish): Likewise.
335 (maybe_push_decl): Likewise.
336 (push_using_decl): Likewise.
337 (push_overloaded_decl): Likewise.
338 (make_anon_name): Likewise.
339 (anon_cnt): Likewise.
340 (clear_anon_tags): Likewise.
341 (maybe_inject_for_scope_var): Likewise.
342 (check_for_out_of_scope_variable): Likewise.
343 * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
344 * decl.c (warn_extern_redeclared_static): Export.
345 * cp-tree.h (warn_extern_redeclared_static): Declare.
346
347 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
348
349 * Make-lang.in: Replace uses of $(target_alias) with
350 $(target_noncanonical).
351
352 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
353
354 * ChangeLog: Add PR number to patch for PR c++/12370.
355
356 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
357
358 * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
359 (binding_for_name): Likewise.
360 (cxx_binding_clear): Move to name-lookup.c.
361 * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
362 (binding_for_name): Likewise.
363 * decl2.c (is_ancestor): Move to name-lookup.c
364 (namespace_ancestor): Likewise.
365 (add_using_namespace): Likewise.
366 (ambiguous_decl): Likewise.
367 (lookup_using_namespace): Likewise.
368 (qualified_lookup_using_namespace): Likewise.
369 (set_decl_namespace): Likewise.
370 (decl_namespace): Likewise.
371 (current_decl_namespace): Likewise.
372 (push_decl_namespace): Likewise.
373 (pop_decl_namespace): Likewise.
374 (push_scope): Likewise.
375 (pop_scope): Likewise.
376 (struct arg_lookup): Likewise.
377 (arg_assoc): Likewise.
378 (arg_assoc_args): Likewise.
379 (arg_assoc_type): Likewise.
380 (add_function): Likewise.
381 (arg_assoc_namespace): Likewise.
382 (arg_assoc_class): Likewise.
383 (arg_assoc_template_arg): Likewise.
384 (do_namespace_alias): Likewise.
385 (validate_nonmember_using_decl): Likewise.
386 (do_nonmember_using_decl): Likewise.
387 (do_toplevel_using_decl): Likewise.
388 (do_local_using_decl): Likewise.
389 (do_class_using_decl): Likewise.
390 (do_using_directive): Likewise.
391 (constructor_name_full): Likewise.
392 (constructor_name): Likewise.
393 (constructor_name_p): Likewise.
394
395 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
396
397 Break out decl.c (2/n)
398 * name-lookup.c: Include diagnostic.h
399 (cxx_binding_free): Make static.
400 (cxx_binding_make): Likewise.
401 (binding_table_new): Likewise
402 (binding_table_free): Likewise.
403 (binding_table_insert): Likewise.
404 (binding_table_find_anon_type): Likewise.
405 (binding_table_reverse_maybe_remap): Likewise.
406 (supplement_binding): Likewise.
407 * name-lookup.h (global_scope_name): Declare extern.
408 (global_type_node): Likewise.
409 (cxx_binding_free): Don't export.
410 (cxx_binding_make): Likewise.
411 (binding_table_new): Likewise.
412 (binding_table_free): Likewise.
413 (binding_table_insert): Likewise.
414 (binding_table_find_anon_type): Likewise.
415 (binding_table_reverse_maybe_remap): Likewise.
416 * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
417 * decl.c (lookup_namespace_name): Move to name-lookup.c
418 (select_decl): Likewise.
419 (unqualified_namespace_lookup): Likewise.
420 (lookup_qualified_name): Likewise.
421 (lookup_name_real): Likewise.
422 (lookup_name_nonclass): Likewise.
423 (lookup_function_nonclass): Likewise.
424 (lookup_name): Likewise.
425 (lookup_name_current_level): Likewise.
426 (lookup_type_current_level): Likewise.
427 (lookup_flags): Likewise.
428 (qualify_lookup): Likewise.
429 (lookup_tag): Likewise.
430 (lookup_tag_reverse): Likewise.
431 (getdecls): Likewise.
432 (storedecls): Remove.
433 (cxx_remember_type_decls): Move to name-lookup.c.
434 (global_bindings_p): Likewise.
435 (innermost_nonclass_level): Likewise.
436 (toplevel_bindings_p): Likewise.
437 (namespace_bindings_p): Likewise.
438 (kept_level_p): Likewise.
439 (innermost_scope_kind): Likewise.
440 (template_parm_scope_p): Likewise.
441 (push_binding): Likewise.
442 (push_local_binding): Likewise.
443 (add_decl_to_level): Likewise. Make extern.
444 (push_class_binding): Move to name-lookup.c.
445 (resume_level): Likewise. Rename to resume_scope.
446 (begin_scope): Move to name-lookup.c.
447 (indent): Likewise.
448 (binding_depth): Likewise.
449 (is_class_level): Likewise.
450 (cxx_scope_descriptor): Likewise.
451 (cxx_scope_debug): Likewise.
452 (namespace_scope_ht_size): Likewise.
453 (leave_scope): Likewise.
454 (pushlevel_class): Likewise.
455 (poplevel_class): Likewise.
456 (clear_identifier_class_values): Likewise.
457 (pushdecl_with_scope): Likewise.
458 (pushdecl_namespace_level): Likewise.
459 (pushdecl_class_level): Likewise.
460 (push_class_level_binding): Likewise.
461 (push_using_directive): Likewise.
462 (identifier_global_value): Likewise.
463 (keep_next_level_flag): Likewise.
464 (keep_next_level): Likewise.
465 (free_binding_level): Likewise.
466 (set_class_shadows): Likewise.
467 (maybe_push_cleanup_level): Likewise.
468 (cp_namespace_decls): Likewise.
469 (bt_print_entry): Likewise.
470 (print_binding_level): Likewise.
471 (print_other_binding_stack): Likewise.
472 (print_binding_stack): Likewise.
473 (push_namespace): Likewise.
474 (pop_namespace): Likewise.
475 (push_nested_namespace): Likewise.
476 (pop_nested_namespace): Likewise.
477 (cxx_saved_binding_make): Likewise.
478 (struct cxx_saved_binding_make): Likewise.
479 (store_bindings): Likewise.
480 (maybe_push_to_top_level): Likewise.
481 (push_to_top_level): Likewise.
482 (pop_from_top_level): Likewise.
483 (identifier_type_value): Likewise.
484 (set_identifier_type_value): Likewise.
485 (set_identifier_type_value_with_scope): Likewise.
486 (pop_everything): Likewise.
487 (pushtag): Likewise.
488 (follow_tag_typedef): Likewise.
489 (maybe_process_template_type_declaration): Likewise.
490 (pop_binding): Likewise.
491 * cp-tree.h: Move corresponding declarations to name-lookup.h
492
493 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
494
495 * cvt.c (ocp_convert): Move warning to C common code.
496
497 2003-10-09 Jason Merrill <jason@redhat.com>
498
499 PR c++/6392
500 * tree.c (build_cplus_array_type): Handle all quals the same.
501 (cp_build_qualified_type_real): Look through arrays first.
502
503 * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
504 (build_target_expr_with_type): Likewise.
505
506 * pt.c (instantiate_class_template): Sanity check that our
507 enclosing class has been instantiated.
508
509 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
510
511 * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
512 * error.c (dump_function_decl): Use it to skip the dump of the
513 arguments.
514 (dump_expr): When dumping a declaration found within an
515 expression, always set TFF_NO_FUNCTION_ARGUMENTS
516 in the flags.
517
518 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
519
520 PR c++/11097
521 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
522 USING_DECL.
523
524 2003-10-06 Mark Mitchell <mark@codesourcery.com>
525
526 PR c++/10147
527 * call.c (initialize_reference): Tweak error message.
528 * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
529 pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
530 * cxx-pretty-print.c (pp_cxx_id_expression): Always display
531 qualified entities using qualified names.
532
533 PR c++/12337
534 * init.c (build_new_1): Make sure that the expression returned is
535 not an lvalue.
536
537 PR c++/12344, c++/12236, c++/8656
538 * decl.c (start_function): Do not ignore attributes embedded in a
539 function declarator.
540
541 2003-10-06 Mark Mitchell <mark@codesourcery.com>
542
543 * Make-lang.in (c++.info): Remove.
544 (c++.dvi): Remove.
545 (c++.generated-manpages): Replace with ...
546 (generated-manpages): ... this.
547
548 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
549
550 * decl.c (struct cp_binding_level): Move to name-lookup.h
551 (current_binding_level): Likewise.
552 (class_binding_level): Likewise.
553 * cp-tree.h (enum scope_kind): Likewise.
554
555 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
556
557 * name-lookup.c (binding_entry_free): Nullify name and type
558 fields.
559
560 2003-10-02 Mark Mitchell <mark@codesourcery.com>
561
562 PR c++/12486
563 * typeck.c (finish_class_member_access_expr): Issue diagnostic
564 on erroneous use of qualified name.
565
566 2003-09-30 Richard Henderson <rth@redhat.com>
567
568 PR c++/12370
569 * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
570
571 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
572
573 * g++spec.c: Convert to ISO C90 prototypes.
574 * parser.c: Likewise.
575
576 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
577
578 * decl.c (pop_binding): Don't mess with nullifying binding->scope
579 here.
580 * name-lookup.c: Re-format.
581 (cxx_binding_free): Nullify binding->scope.
582
583 2003-09-29 Jan Hubicka <jh@suse.cz>
584
585 PR C++/12047
586 * except.c (build_eh_type_type): Call mark_used on the type.
587
588 2003-09-28 Richard Henderson <rth@redhat.com>
589
590 * typeck.c (c_expand_asm_operands): Take location_t, instead of
591 individual file and line.
592
593 2003-09-28 Andreas Jaeger <aj@suse.de>
594
595 * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
596 definition.
597 * init.c (push_base_cleanups): Likewise.
598 * decl2.c (finish_file): Likewise.
599 * mangle.c (init_mangle): Likewise.
600 (dump_substitution_candidates): Likewise.
601 * search.c: Likewise.
602
603 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
604
605 * name-lookup.h (get_global_value_if_present): New function.
606 (is_typename_at_global_scope): Likewise.
607 * except.c (do_begin_catch): Use get_global_value_if_present.
608 (do_end_catch): Likewise.
609 (do_allocate_exception): Likewise.
610 (do_free_exception): Likewise.
611 (build_throw): Likewise.
612 * parser.c (cp_parser_member_declaration): Likewise.
613 * rtti.c (throw_bad_cast): Likewise.
614 (throw_bad_typeid): Likewise.
615 * decl.c (check_tag_decl): Use is_typename_at_global_scope.
616 (grokdeclarator): Likewise.
617 * cp-tree.h (global_namespace): Move to name-lookup.h
618 * call.c (call_builtin_trap): Tidy.
619
620 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
621
622 PR c++/11415
623 * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
624 error message when parser->scope is global_namespace.
625
626 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
627
628 * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
629 macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
630
631 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
632
633 * decl.c (pop_binding_level, suspend_binding_level,
634 find_class_binding_level): Merge into leave_scope. Remove.
635 (leave_scope): New function.
636 (poplevel): Update.
637 (poplevel_class): Likewise.
638 (pop_namespace): Likewise.
639
640 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
641
642 PR c++/5655
643 * parser.c (cp_parser_check_access_in_redeclaration): New function.
644 (cp_parser_member_declaration): Use it.
645 (cp_parser_template_declaration_after_export): Likewise.
646
647 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
648
649 * cp-tree.h (scope_kind): Add new enumerator.
650 (keep_next_level): Change parameter type to bool.
651 (begin_scope): Change prototype.
652 (pushlevel): Remove declaration.
653 * decl.c (push_binding_level): Fold in begin_scope. Remove.
654 (struct cp_binding_level): Remove tag_tranparent field. Make keep
655 of bitsize one.
656 (keep_next_level_flag): Make a bool.
657 (cxx_scope_descriptor): Update scope names table
658 (make_cxx_scope): Fold in begin_scope. Remove..
659 (namespace_scope_ht_size): New function.
660 (begin_scope): Change prototype. Return a scope. Tidy.
661 (kept_level_p): Update.
662 (pushlevel): Remove.
663 (maybe_push_cleanup_level): Simplify.
664 (poplevel): Update for sk_cleanup and keep change.
665 (print_binding_level): Likewise.
666 (initial_push_namespace_scope): Fold in begin_scope. Remove.
667 (push_namespace): Update.
668 (pushtag): Likewise.
669 (lookup_tag): Likewise.
670 (lookup_name_current_level): Likewise.
671 (lookup_type_current_level): Likewise.
672 (cxx_init_decl_processing): Likewise.
673 (start_function): Likewise.
674 (begin_function_body): Likewise.
675 (start_method): Likewise.
676 * pt.c (push_inline_template_parms_recursive): Likewise.
677 (begin_template_parm_list): Likewise.
678 (begin_specialization): Likewise.
679 * semantics.c (do_pushlevel): Likewise.
680 (begin_compound_stmt): Likewise.
681 (begin_stmt_expr): Likewise.
682
683 2003-09-21 Richard Henderson <rth@redhat.com>
684
685 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
686 method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
687
688 2003-09-21 Richard Henderson <rth@redhat.com>
689
690 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
691 method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
692 DECL_SOURCE_LOCATION rename and change to const.
693
694 2003-09-20 Richard Henderson <rth@redhat.com>
695
696 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
697
698 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
699
700 PR c++/157
701 * parser.c (cp_parser_direct_declarator): Clear
702 parser->num_template_parameter_lists when parsing function
703 parameters.
704 (cp_parser_constructor_declarator_p): Likewise.
705
706 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
707
708 PR c++/495
709 * pt.c (tsubst_friend_class): Only use innermost template
710 arguments for the injected friend class template.
711
712 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
713
714 PR c++/12332
715 * pt.c (instantiate_class_template): Increment
716 processing_template_decl around the tsubst of a template member
717 function.
718
719 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
720
721 * decl.c (cxx_scope_descriptor): Fix thinko.
722 (struct cp_binding_level): Adjust type of binding_depth field.
723
724 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
725
726 PR c++/12320
727 * call.c (type_passed_as): Check for incomplete type.
728 (convert_for_arg_passing): Likewise.
729
730 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
731
732 PR c++/9848
733 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
734 here.
735 * semantics.c (expand_body): Set it here on the remaining clones.
736
737 2003-09-18 Roger Sayle <roger@eyesopen.com>
738
739 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
740 * class.c (instantiate_type): Remove FFS_EXPR case.
741
742 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
743
744 * ChangeLog: Fix recent commit.
745
746 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
747
748 * ChangeLog: Add PR number to patch for PR c++/12316.
749
750 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
751
752 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
753 "C" types.
754 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
755
756 2003-09-17 Richard Henderson <rth@redhat.com>
757
758 * semantics.c (expand_body): Don't save/restore input_location.
759
760 2003-09-17 Mark Mitchell <mark@codesourcery.com>
761
762 PR c++/12266
763 * cp-tree.h (tsubst_flags_t): Add tf_conv.
764 * class.c (standard_conversion): Pass tf_conv to
765 instantiate_type.
766 (resolve_address_of_overloaded_function): Do not call mark_used
767 when just checking conversions.
768
769 PR debug/12066
770 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
771 * cp-tree.h (cxx_builtin_type_decls): Declare.
772 * decl.c (builtin_type_decls): New variables.
773 (cxx_builtin_type_decls): New function.
774 (record_builtin_type): Add to builtin_type_decls.
775
776 2003-09-17 Richard Henderson <rth@redhat.com>
777
778 PR c++/12316
779 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
780
781 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
782
783 PR c++/7939
784 * typeck.c (comptypes): Don't ICE when its first argument is
785 error_mark_node.
786 (compparms): Reverse the arguments of same_type_p.
787
788 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
789
790 PR c++/12184
791 * typeck.c (convert_arguments): Return error_mark_node for an
792 incomplete parameter. Make error message more informative.
793
794 2003-09-12 Mark Mitchell <mark@codesourcery.com>
795
796 PR c++/3907
797 * class.c (maybe_note_name_used_in_class): Refine test for whether
798 or not we are in a class scope.
799
800 * cp-tree.h (language_function): Remove x_expanding_p.
801 (expanding_p): Remove.
802 (doing_semantic_analysis_p): Remove.
803 (scope_kind): Add sk_function_parms, sk_class,
804 sk_namespace.
805 (innermost_scope_kind): New method.
806 * call.c (cxx_type_promotes_to): Use type_decays_to.
807 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
808 (LANG_HOOKS_POPLEVEL): Likewise.
809 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
810 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
811 is_catch_scope. Add kind and explicit_spec_p.
812 (cxx_scope_descriptor): Use a lookup table.
813 (find_class_binding_level): Use "kind" field in binding_level, not
814 the various flags.
815 (pop_binding_level): Likewise.
816 (innermost_nonclass_level): Likewise.
817 (toplevel_bindings_p): Likewise.
818 (namespace_bindings_p): Likewise.
819 (template_parm_scope_p): Likewise.
820 (innermost_scope_kind): New method.
821 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
822 the various flags.
823 (pushlevel): Remove check for doing_semantic_analysis_p.
824 (begin_scope): Simplify.
825 (add_decl_to_level): Use "kind" field in binding_level, not
826 the various flags.
827 (push_local_binding): Likewise.
828 (pop_label): Remove check for doing_semantic_analysis_p.
829 (poplevel): Use "kind" field in binding_level, not
830 the various flags.
831 (set_block): Remove check for doing_semantic_analysis_p.
832 (pushlevel_class): Use "kind" field in binding_level, not
833 the various flags.
834 (poplevel_class): Likewise.
835 (initial_push_namespace_scope): Likewise.
836 (maybe_push_to_top_level): Likewise.
837 (set_identifier_type_value_with_scope): Likewise.
838 (pop_everything): Likewise.
839 (maybe_process_template_type_declaration): Likewise.
840 (pushtag): Likewise.
841 (pushdecl): Likewise.
842 (pushdecl_with_scope): Likewise.
843 (check_previous_goto_1): Likewise.
844 (define_label): Likewise.
845 (finish_case_label): Likewise.
846 (lookup_tag): Likewise.
847 (unqualified_namespace_lookup): Likewise.
848 (lookup_name_real): Likewise.
849 (lookup_name_current_level): Likewise.
850 (lookup_type_current_level): Likewise.
851 (record_builtin_type): Likewise.
852 (cp_make_fname_decl): Likewise.
853 (maybe_inject_for_scope_var): Likewise.
854 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
855 (start_function): Use begin_scope, not pushlevel.
856 (finish_function): Use "kind" field in binding_level, not
857 the various flags.
858 (start_method): Use begin_scope, not pushlevel.
859 (make_label_decl): Do not check expanding_p.
860 (save_function-data): Do not set expanding_p.
861 (cxx_push_function_context): Do not clear expanding_p.
862 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
863
864 2003-09-14 Mark Mitchell <mark@codesourcery.com>
865
866 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
867 an bit-field whose width exceeds that of its type.
868
869 2003-09-14 Geoffrey Keating <geoffk@apple.com>
870
871 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
872
873 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
874
875 * ChangeLog: Follow spelling conventions.
876 * parser.c: Likewise.
877
878 2003-09-13 Richard Henderson <rth@redhat.com>
879
880 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
881 during relaxation loop.
882
883 2003-09-11 David Edelsohn <edelsohn@gnu.org>
884
885 * decl2.c (var_finalized_p): Swap arms of conditional.
886
887 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
888
889 PR c++/11788
890 * typeck.c (build_address): If it is a function, mark it used.
891 (build_unary_op): Do not lose object's side-effects when taking
892 address of static member function.
893 * class.c (resolve_address_of_overloaded_function): Use
894 tsubst_flags_t parameter. Only expect overload sets. Adjust.
895 (instantiate_type): Adjust flags passing. Do not lose object's
896 side-effects when taking address of static member function.
897
898 2003-09-11 Richard Henderson <rth@redhat.com>
899
900 * semantics.c (expand_or_defer_fn): Update for new
901 cgraph_finalize_function argument.
902
903 2003-09-10 Richard Henderson <rth@redhat.com>
904
905 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
906
907 2003-09-10 Jan Hubicka <jh@suse.cz>
908
909 * decl2.c (var_finalized_p): New.
910 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
911
912 2003-09-10 Richard Henderson <rth@redhat.com>
913
914 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
915 mark_member_pointers.
916 (lower_function): Remove.
917 * cp-tree.h: Update to match.
918 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
919 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
920
921 2003-09-09 Richard Henderson <rth@redhat.com>
922
923 * semantics.c (expand_or_defer_fn): Update call to
924 cgraph_finalize_function.
925
926 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
927 always.
928
929 * decl2.c (finish_file): Avoid out-of-bounds array reference
930 during memmove.
931
932 2003-09-09 Richard Henderson <rth@redhat.com>
933
934 * decl2.c (mark_member_pointers): Rename from
935 mark_member_pointers_and_eh_handlers and don't check eh handlers.
936
937 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
938
939 PR bootstrap/12168
940 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
941
942 2003-09-08 Mark Mitchell <mark@codesourcery.com>
943
944 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
945 c_register_builtin_type.
946
947 PR c++/11786
948 * decl2.c (add_function): Do not complain about seeing the same
949 non-function twice.
950 * semantics.c (perform_koenig_lookup): Improve documentation.
951
952 PR c++/5296
953 * pt.c (try_one_overload): Add addr_p parameter.
954 (resolve_overloaded_unification): Pass it.
955
956 2003-09-08 Richard Henderson <rth@redhat.com>
957
958 * optimize.c (maybe_clone_body): Inc/dec function_depth.
959
960 2003-09-08 Richard Henderson <rth@redhat.com>
961
962 * decl.c (finish_function): Clear current_function_decl.
963 * decl2.c (mark_used): Don't push/pop gc context.
964 * optimize.c (optimize_function): Likewise.
965 * tree.c (cp_cannot_inline_tree_fn): Likewise.
966 * pt.c (instantiate_decl): Inc/dec function_depth instead.
967 * semantics.c (expand_body): Update for tree_rest_of_compilation
968 nested argument.
969
970 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
971
972 PR c++/11762
973 * error.c (dump_decl): Handle namespace-alias-definition.
974 * decl.c (warn_extern_redeclared_static): There is no point in
975 checking changes in storage class specifier for a namespace
976 declaration.
977 (duplicate_decls): Tidy diagnostic message.
978 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
979 (pp_cxx_right_brace): Likewise.
980 (pp_cxx_original_namespace_definition): New function.
981 (pp_cxx_namespace_alias_definition): Likewise.
982 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
983
984 2003-09-07 Jan Hubicka <jh@suse.cz>
985
986 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
987 Avoid re-emitting variables in unit-at-a-time mode.
988
989 2003-09-06 Mark Mitchell <mark@codesourcery.com>
990
991 PR c++/11867
992 * call.c (standard_conversion): Improve comments.
993 (perform_direct_initialization): Make sure we return an expression
994 of the correct type.
995 * typeck.c (build_static_cast): Check for ambiguity and
996 accessibility when performing conversions.
997
998 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
999
1000 * cp-tree.h (add_binding): Remove declaration.
1001 * name-lookup.h (supplement_binding): Declare.
1002 * decl.c (add_binding): Move to name-lookup.c.
1003 (push_local_binding): Adjust.
1004 (push_class_binding): Likewise.
1005 (set_identifier_type_value_with_scope): Likewise.
1006 * name-lookup.c (supplement_binding): Rename from add_binding.
1007 Return a bool. Improve documentation.
1008 (set_namespace_binding): Adjust.
1009 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1010
1011 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1012
1013 PR c++/11794
1014 * class.c (pushclass): Push dependent using decls for nested
1015 classes of templates too.
1016
1017 2003-09-06 Roger Sayle <roger@eyesopen.com>
1018
1019 PR c++/11409
1020 * class.c (resolve_address_of_overloaded_function): When building
1021 list of matching non-template function decls, ignore anticipated
1022 declarations of undeclared or shadowed GCC builtins.
1023
1024 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
1025
1026 PR c++/11595
1027 * decl.c (define_label): Remove unreachable timevar pop.
1028 Always return the decl, even if the definition is invalid.
1029
1030 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1031
1032 PR c++/12167
1033 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1034 unparsed functions queue.
1035
1036 2003-09-05 Mark Mitchell <mark@codesourcery.com>
1037
1038 PR c++/12163
1039 * call.c (perform_direct_initialization): Correct logic for
1040 direct-initialization of a class type.
1041
1042 PR c++/12146
1043 * pt.c (lookup_template_function): Robustify.
1044
1045 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
1046
1047 PR c++/11922
1048 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1049 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1050 is_type_p to lookup_qualified_name.
1051
1052 * semantics.c (finish_call_expr): Refactor some code.
1053
1054 PR c++/12037
1055 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1056 (build_min_non_dep): Declare.
1057 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1058 (build_min_non_dep): New.
1059 * cvt.c (convert_to_void): Don't explicitly copy
1060 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1061 * call.c (build_new_method_call): Use build_min_non_dep.
1062 * decl2.c (grok_array_decl): Likewise.
1063 (build_offset_ref_call_from_tree): Likewise.
1064 * typeck.c (finish_class_member_access_expr,
1065 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1066 build_x_conditional_expr, build_x_compound_expr): Likewise.
1067 (build_static_cast, build_reinterpret_cast,
1068 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1069 * typeck2.c (build_x_arrow): Use build_min_non_dep.
1070 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1071 template.
1072 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1073 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1074 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1075
1076 2003-09-04 Richard Henderson <rth@redhat.com>
1077
1078 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1079 change in cgraph_mark_needed_node arguments.
1080
1081 2003-09-02 Geoffrey Keating <geoffk@apple.com>
1082
1083 PR 12161
1084 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1085 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1086
1087 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
1088
1089 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1090 (expr_sizeof): Replace with ...
1091 (cxx_sizeof_or_alignof_expr): ... here.
1092 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1093 * parser.c (cp_parser_unary_expression): Commonize alignof and
1094 sizeof handling.
1095 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1096 substitution.
1097 * semantics.c (finish_sizeof, finish_alignof): Remove.
1098 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1099 becomes bool. Set TREE_READONLY.
1100 (expr_sizeof): Replace with ...
1101 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1102
1103 2003-09-04 Mark Mitchell <mark@codesourcery.com>
1104
1105 Remove cast-as-lvalue extension.
1106 * call.c (build_conditional_expr): Correct formatting.
1107 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1108 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1109 * cp-tree.h (non_cast_lvalue_p): Remove.
1110 (real_non_cast_lvalue_p): Remove.
1111 (non_cast_lvalue_or_else): Remove.
1112 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1113 (real_lvalue_p): Adjust call to lvalue_p_1.
1114 (non_cast_lvalue_p): Remove.
1115 (non_cast_lvalue_or_else): Remove.
1116 (lvalue_p): Adjust call to lvalue_p_1.
1117 (lvalue_or_else): Simplify.
1118 * typeck.c (build_unary_op): Use lvalue_or_else, not
1119 non_cast_lvalue_or_else.
1120 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1121
1122 2003-09-03 DJ Delorie <dj@redhat.com>
1123
1124 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1125
1126 2003-09-03 Mark Mitchell <mark@codesourcery.com>
1127
1128 PR c++/12053
1129 * class.c (include_empty_classes): Correct logic for ABI version 1.
1130
1131 2003-09-03 Richard Henderson <rth@redhat.com>
1132
1133 * optimize.c (optimize_function): Push/pop ggc context around
1134 the call to optimize_inline_calls.
1135
1136 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
1137
1138 PR c++/11553
1139 * parser.c (cp_parser_decl_specifier_seq): Add check for a
1140 duplicate friend decl-specifier.
1141
1142 2003-09-02 Mark Mitchell <mark@codesourcery.com>
1143
1144 PR c++/11847
1145 * pt.c (convert_nontype_argument): Correct representation of
1146 REFERENCE_TYPE expressions.
1147
1148 PR c++/11808
1149 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1150 (finish_call_expr): Change prototype.
1151 * parser.c (cp_parser_postfix_expression): Adjust call to
1152 finish_call_expr.
1153 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1154 * semantics.c (finish_call_expr): Add koenig_p parameter.
1155
1156 2003-09-01 Mark Mitchell <mark@codesourcery.com>
1157
1158 PR c++/12114
1159 * cp-tree.h (initialize_reference): Change prototype.
1160 * call.c (initialize_reference): Add cleanup parameter.
1161 * decl.c (grok_reference_init): Likewise.
1162 (check_initializer): Likewise.
1163 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1164 (duplicate_decls): When replacing an anticipated builtin, do not
1165 honor TREE_NOTHROW.
1166 * typeck.c (convert_for_initialization): Correct call to
1167 initialize_reference.
1168
1169 PR c++/11972
1170 * pt.c (dependent_type_p_r): Pass only the innermost template
1171 arguments to any_dependent_template_arguments_p.
1172
1173 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
1174
1175 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1176 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1177 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1178 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1179 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1180
1181 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1182
1183 PR c++/12093
1184 * pt.c (build_non_dependent_expr): Do not build a
1185 NON_DEPENDENT_EXPR for a STRING_CST.
1186
1187 PR c++/11928
1188 * search.c (add_conversions): Avoid adding two conversion
1189 operators for the same type.
1190
1191 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1192
1193 PR c++/6196
1194 * pt.c (tsubst_copy_and_build): Correct handling of
1195 address-of-label extension.
1196 * semantics.c (finish_goto_stmt): The address of a label must go
1197 through the lvalue-to-rvalue conversion.
1198
1199 2003-08-29 Richard Henderson <rth@redhat.com>
1200 Jason Merrill <jason@redhat.com>
1201
1202 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1203 (LANG_HOOKS_RTL_EXPAND_STMT): New.
1204 * cp-tree.h (cxx_expand_function_start): Declare.
1205 * decl.c (start_function): Use allocate_struct_function.
1206 Move stmts_are_full_exprs_p assertion from expand_body.
1207 Do not free_after_parsing or free_after_compilation.
1208 (cxx_push_function_context): Move code to set struct function
1209 data from genrtl_start_function.
1210 * optimize.c (optimize_function): Don't inc/dec function_depth.
1211 * semantics.c (expand_body): Use tree_rest_of_compilation.
1212 (cxx_expand_function_start): Rename from genrtl_start_function,
1213 omit bits done by tree_rest_of_compilation.
1214 (genrtl_finish_function): Remove.
1215 (clear_decl_rtl): Move to ../tree-optimize.c.
1216
1217 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1218
1219 PR c++/11811
1220 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1221 function.
1222 * cxx-pretty-print.h: Declare.
1223 * error.c (dump_template_parameter): Use it.
1224 (dump_type): Likewise.
1225
1226 2003-08-28 Mark Mitchell <mark@codesourcery.com>
1227
1228 * init.c (decl_constant_value): Deal with COND_EXPR specially.
1229 * call.c (build_conditional_expr): Revert previous patch.
1230
1231 PR optimization/5079
1232 * call.c (build_conditional_expr): Use decl_constant_value to
1233 simplify the arguments.
1234
1235 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
1236
1237 * parser.c (struct cp_token): Use enum bitfields.
1238 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1239 512B allocation unit.
1240 (cp_parser_token_tree_map_node): Use enum bitfields.
1241
1242 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
1243
1244 PR c++/11871
1245 * decl.c (push_class_level_binding): Correct old_decl value from
1246 my 2003-07-29 reorganization.
1247
1248 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1249 (build_new_method_call): Add goto finish.
1250 * semantics.c (simplify_aggr_init_exprs_r): Don't set
1251 TREE_SIDE_EFFECTS on a call.
1252
1253 2003-08-25 Richard Henderson <rth@redhat.com>
1254
1255 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1256
1257 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1258
1259 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1260 (cxx_pretty_printer): Adjust base type.
1261 (pp_cxx_function_specifier): Declare.
1262 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1263 (pp_cxx_left_paren): Likewise.
1264 (pp_cxx_right_paren): Likewise.
1265 (pp_cxx_dot): Likewise.
1266 (pp_cxx_arrow): Likewise.
1267 (pp_cxx_semicolon): Likewise.
1268 (pp_cxx_identifier): Likewise.
1269 (pp_cxx_cv_qualifier_seq): Likewise.
1270 (pp_cxx_storage_class_specifier): Likewise.
1271 (pp_cxx_expression_list): Likewise.
1272 (pp_cxx_space_for_pointer_operator): Likewise.
1273 (pp_cxx_init_declarator): Likewise.
1274 (pp_cxx_call_argument_list): Likewise.
1275 (pp_cxx_nonconsecutive_character): Tidy.
1276 (pp_cxx_conversion_function_id): New function.
1277 (pp_cxx_template_id): Likewise.
1278 (pp_cxx_template_keyword_if_needed): Likewise.
1279 (pp_cxx_nested_name_specifier): Likewise.
1280 (pp_cxx_unqualified_id): Tidy
1281 (pp_cxx_qualified_id): Handle more nodes.
1282 (pp_cxx_primary_expression): Tidy.
1283 (pp_cxx_postfix_expression): Likewise.
1284 (pp_cxx_new_expression): Tidy.
1285 (pp_cxx_delete_expression): Likewise.
1286 (pp_cxx_cast_expression): New function.
1287 (pp_cxx_pm_expression): Tidy.
1288 (pp_cxx_conditional_expression): Likewise.
1289 (pp_cxx_assignment_operator): New function.
1290 (pp_cxx_assignment_expression): Tidy.
1291 (pp_cxx_expression): New function.
1292 (pp_cxx_function_specifier): Likewise.
1293 (pp_cxx_decl_specifier_seq): Likewise.
1294 (pp_cxx_simple_type_specifier): Tidy.
1295 (pp_cxx_type_specifier_seq): Likewise.
1296 (pp_cxx_ptr_operator): New function.
1297 (pp_cxx_implicit_parameter_type): Likewise.
1298 (pp_cxx_parameter_declaration): Tidy.
1299 (pp_cxx_parameter_declaration_clause): New function.
1300 (pp_cxx_exception_specification): Likewise.
1301 (pp_cxx_direct_declarator): Tidy.
1302 (pp_cxx_declarator): Likewise.
1303 (pp_cxx_ctor_initializer): New function.
1304 (pp_cxx_function_definition): Likewise.
1305 (pp_cxx_abstract_declarator): Tidy.
1306 (pp_cxx_direct_abstract_declarator): Likewise.
1307 (pp_cxx_type_id): Likewise.
1308 (pp_cxx_exception_declaration): New function.
1309 (pp_cxx_statement): Likewise.
1310 (pp_cxx_simple_declaration): Likewise.
1311 (pp_cxx_template_parameter_list): Likewise.
1312 (pp_cxx_template_parameter): Likewise.
1313 (pp_cxx_template_declaration): Likewise.
1314 (pp_cxx_explicit_specialization): Likewise.
1315 (pp_cxx_explicit_instantiation): Likewise.
1316 (pp_cxx_declaration): Tidy.
1317 (pp_cxx_pretty_printer_init): Initialize more fields.
1318
1319 2003-08-25 Mark Mitchell <mark@codesourcery.com>
1320
1321 PR c++/8795
1322 * cp-tree.h (build_cplus_method_type): Remove.
1323 * call.c (standard_conversion): Use build_method_type_directly
1324 instead of build_cplus_method_type.
1325 * class.c (build_clone): Likewise.
1326 (adjust_clone_args): Likewise.
1327 * decl.c (build_ptrmem_type): Likewise.
1328 (grokdeclarator): Likewise.
1329 (check_function_type): Likewise.
1330 * decl2.c (grok_method_quals): Likewise.
1331 (maybe_retrofit_in_chrg): Likewise.
1332 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1333 (tsubst_function_type): Likewise.
1334 (tsubst): Likewise.
1335 * tree.c (build_cplus_method_type): Remove.
1336 * typeck.c (merge_types): Use build_method_type_directly.
1337
1338 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1339
1340 PR c++/3765
1341 * search.c (dfs_access_in_type): Fix typo in comment.
1342 (dfs_accessible_queue_p): Likewise.
1343 (dfs_accessible_p): Only terminate when a friend is found.
1344 (accessible_p): Return immediately if access_in_type allows
1345 access.
1346
1347 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1348
1349 PR c++/641, c++/11876
1350 * friend.c (add_friend): Add complain parameter.
1351 (make_friend_class): Likewise.
1352 (do_friend): Adjust add_friend call.
1353 * decl.c (grokdeclarator): Adjust make_friend_class call.
1354 * parser.c (cp_parser_member_declaration): Likewise.
1355 (cp_parser_template_declaration_after_export): Likewise.
1356 * pt.c (instantiate_class_template): Adjust make_friend_class
1357 and add_friend call.
1358 * cp-tree.h (make_friend_class): Adjust declaration.
1359 (add_friend): Likewise.
1360
1361 2003-08-21 Jason Merrill <jason@redhat.com>
1362
1363 PR c++/11283
1364 * call.c (build_conditional_expr): Ignore cv-qual differences for
1365 non-class types.
1366
1367 2003-08-21 Mark Mitchell <mark@codesourcery.com>
1368
1369 PR c++/11551
1370 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1371 (cp_parser_primary_expression): Adjust call to
1372 cp_parser_id_expression.
1373 (cp_parser_unqualified_id): Complain about the use of
1374 typedef-names in a destructor declarator.
1375 (cp_parser_postfix_expression): Adjust call to
1376 cp_parser_id_expression.
1377 (cp_parser_type_parameter): Likewise.
1378 (cp_parser_template_argument): Likewise.
1379 (cp_parser_declarator_id): Likewise.
1380
1381 PR c++/11919
1382 * call.c (standard_conversion): Use same_type_p, not pointer
1383 equality, to compare types.
1384
1385 PR c++/10762
1386 * parser.c (cp_parser_using_declaration): Check for invalid uses
1387 of template-ids here...
1388 * decl2.c (do_class_using_decl): ... rather than here.
1389
1390 2003-08-20 Mark Mitchell <mark@codesourcery.com>
1391
1392 PR c++/11834
1393 * pt.c (more_specialized): Bump processing_template_decl.
1394
1395 2003-08-21 Jason Merrill <jason@redhat.com>
1396
1397 PR c++/11614
1398 * decl.c (grokdeclarator): Recognize a flexible array based on the
1399 type, not the form of the declarator.
1400
1401 2003-08-20 Jason Merrill <jason@redhat.com>
1402
1403 * semantics.c (simplify_aggr_init_expr): Split out from
1404 simplify_aggr_init_exprs_r. Convert slot address to match
1405 the return type.
1406 * cp-tree.h: Declare it.
1407 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1408 DECL_NAME of a user variable.
1409
1410 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
1411
1412 PR c++/11945
1413 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1414 COMPOUND_EXPR.
1415 * semantics.c (finish_expr_stmt): Always convert to void.
1416 * typeck.c (build_x_compound_exp): Always convert to void.
1417
1418 2003-08-19 Mark Mitchell <mark@codesourcery.com>
1419
1420 PR c++/11684
1421 * cp-tree.h (grok_op_properties): Change prototype.
1422 * decl.c (grok_op_properties): Add complain parameter.
1423 (grokfndecl): Pass it.
1424 * pt.c (tsubst_decl): Adjust accordingly.
1425
1426 PR c++/10926
1427 * decl.c (start_method): Return immediately if push_template_decl
1428 does not like the declaration.
1429 * pt.c (push_template_decl_real): Disallow member template
1430 destructors.
1431
1432 PR c++/11036
1433 * cp-tree.h (add_binding): Add prototype.
1434 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1435 (maybe_warn_about_overly_private_class): Use
1436 CLASSTYPE_DESTRUCTORS.
1437 (pushclass): Adjust call to set_identifier_type_value.
1438 * decl.c (add_binding): Give it external linkage.
1439 (push_local_binding): Adjust call to add_binding.
1440 (push_class_binding): Likewise.
1441 (set_identifier_type_value_with_scope): Change prototype. Use
1442 add_binding for global bindings.
1443 (set_identifier_type_value): Adjust accordingly.
1444 (pushtag): Likewise.
1445 (pushdecl): Use set_identifier_type_value, not
1446 set_identifier_type_value_with_scope.
1447 (pushdecl_namespace_level): Adjust calls to
1448 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1449 (pushdecl_class_level): Likewise.
1450 (lookup_tag): Use select_decl.
1451 (select_decl): Improve comment.
1452 (record_builtin_type): Do not call pushdecl.
1453 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1454 (cp_finish_decl): Adjust call to set_identifier_type_value.
1455 (check_elaborated_type_specifier): Improve checks for invalid uses
1456 of typedefs.
1457 (xref_tag): Adjust call to check_elaborated_type_specifier.
1458 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1459 * name-lookup.c (set_namespace_binding): Use add_binding.
1460 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1461 rather than an IDENTIFIER_NODE, to represent built-in types, if
1462 requested by the caller.
1463 (cp_parser_postfix_expression): Adjust call.
1464 (cp_parser_type_specifier): Likewise.
1465 (cp_parser_elaborated_type_specifier): Adjust call to
1466 check_elaborated_type_specifier.
1467 * typeck2.c (build_functional_cast): Do not perform name lookups.
1468
1469 PR c++/10717
1470 * decl.c (expand_static_init): Remove unnecessary code.
1471
1472 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
1473
1474 PR c++/10538, PR c/5582
1475 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1476
1477 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1478
1479 PR c++/11174
1480 * init.c (build_offset_ref): Perform access checking for
1481 pointer to member correctly.
1482
1483 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
1484
1485 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1486
1487 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
1488
1489 PR c++/11957
1490 * cp-tree.h (finish_stmt_expr): Add bool parameter.
1491 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1492 adjust the stmt_expr here.
1493 (build_vec_init): Use finish_stmt_expr_expr, convert result to
1494 array type.
1495 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1496 call.
1497 * pt.c (tsubst_copy): Likewise.
1498 * semantics.c (finish_stmt_expr): Add parameter.
1499
1500 * pt.c (instantiate_class_template): Push to class's scope before
1501 tsubsting base.
1502
1503 2003-08-17 Jan Hubicka <jh@suse.cz>
1504
1505 PR C++/11702
1506 * semantics.c (finish_id_expression): Mark all functions as used.
1507
1508 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
1509
1510 PR c++/11512
1511 * cvt.c (convert_to_void): Indicate which side of conditional has
1512 no effects, and rhs of comma operator. Test for no sideeffect
1513 expressions here and always build a convert expr.
1514 * init.c (expand_default_init): Convert the init to void.
1515 * typeck.c (build_x_compound_expr): Do not check for side effects
1516 here.
1517 (build_compound_expr): Do not convert lhs when building a
1518 template.
1519
1520 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1521
1522 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1523 * decl2.c (build_offset_ref_call_from_tree): Use
1524 build_non_dependent_expr.
1525 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1526 * pt.c (build_non_dependent_expr): Set operand.
1527
1528 2003-08-14 Jan Hubicka <jh@suse.cz>
1529
1530 * decl2.c (mark_member_pointers): Rename to...
1531 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1532 (lower_function): Update call.
1533 * except.c (eh_type_info): Break out from ...
1534 (build_eh_type): ... here; tinfo is already used.
1535 (finish_eh_spec_block): Mark tinfos as used.
1536 * semantics.c (finish_handler_params): Mark tinfo as used.
1537 * cp-tree.h (eh_type_info): Declare.
1538
1539 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1540
1541 * pt.c (instantiate_class_template): Set location before
1542 substuting bases.
1543
1544 * decl.c (make_typename_type): Use my_friendly_assert.
1545 * pt.c (tsubst_aggr_type): Rearrange context substitution.
1546
1547 2003-08-14 Jan Hubicka <jh@suse.cz>
1548
1549 * method.c (use_thunk): Expand body directly.
1550
1551 2003-08-12 Mark Mitchell <mark@codesourcery.com>
1552
1553 PR c++/11703
1554 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1555 determine whether or not to promote types.
1556 (convert_for_arg_passing): Likewise.
1557 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1558 templates.
1559 * pt.c (tsubst_decl): Do not expect it to be set.
1560
1561 PR c++/9512
1562 PR c++/10923
1563 * cp-tree.h (check_elaborated_type_specifier): Declare.
1564 (handle_class_head): Remove.
1565 (note_got_semicolon): Likewise.
1566 (note_list_got_semicolon): Likewise.
1567 (finish_class_definition): Likewise.
1568 * decl.c (check_elaborated_type_specifier): Make it public.
1569 Robustify.
1570 (handle_class_head): Remove.
1571 * parser.c (cp_parser_elaborated_type_specifier): Use
1572 check_elaborated_type_specifier.
1573 (cp_parser_class_specifier): Do not call finish_class_definition.
1574 (cp_parser_class_head): Or handle_class_head. Check for
1575 over-qualified names.
1576 * semantics.c (finish_class_definition): Remove.
1577
1578 * parser.c (cp_parser_check_for_definition_in_return_type): New
1579 function.
1580 (cp_parser_simple_declaration): Adjust call to
1581 cp_parser_init_declarator.
1582 (cp_parser_decl_specifier_seq): Change type of
1583 declares_class_or_enum parameter.
1584 (cp_parser_explicit_instantiation): Adjust accordingly.
1585 (cp_parser_type_specifier): Change type of
1586 declares_class_or_enum parameter.
1587 (cp_parser_init_declarator): Add declares_class_or_enum
1588 parameter.
1589 (cp_parser_parameter_declaration): Adjust call to
1590 cp_parser_decl_specifier_seq.
1591 (cp_parser_function_definition): Likewise.
1592 (cp_parser_member_declaration): Likewise.
1593 (cp_parser_single_declaration): Likewise.
1594
1595 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1596 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1597 (TYPE_OVERLOADS_CALL_EXPR): Remove.
1598 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1599 (TYPE_OVERLOADS_ARROW): Likewise.
1600 (CLASSTYPE_GOT_SEMICOLON): Likewise.
1601 * class.c (check_bases): Do not set them.
1602 (finish_struct_1): Likewise.
1603 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1604 (build_ptrmemfunc_type): Likewise.
1605 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1606 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1607 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1608 * lex.c (note_got_semicolon): Remove.
1609 (note_list_got_semicolon): Likewise.
1610 * parser.c (cp_parser_simple_declaration): Do not call
1611 note_list_got_semicolon.
1612 * pt.c (list_eq): Remove.
1613 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1614 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1615 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1616 * ptree.c (cxx_print_type): Do not print them.
1617 * semantics.c (finish_member_class_template): Do not call
1618 note_list_got_semicolon.
1619
1620 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
1621
1622 * call.c (standard_conversion): Opaque pointers interconvert.
1623
1624 * testsuite/g++.dg/other/opaque-3.C: New.
1625
1626 2003-08-11 Mark Mitchell <mark@codesourcery.com>
1627
1628 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1629 types correctly.
1630
1631 2003-08-10 Mark Mitchell <mark@codesourcery.com>
1632
1633 PR c++/11789
1634 * cp-tree.h (get_vbase): Remove.
1635 (get_vbase_types): Remove.
1636 * init.c (expand_member_init): Correct logic for looking up base
1637 classes.
1638
1639 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1640
1641 * error.c (dump_expr): Tidy.
1642 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1643 (pp_cxx_begin_template_argument_list): Likewise.
1644 (pp_cxx_end_template_argument_list): Likewise.
1645 (is_destructor_name): Likewise.
1646 (pp_cxx_unqualified_id): Likewise.
1647 (pp_cxx_qualified_id): Likewise.
1648 (pp_cxx_id_expression): Likewise.
1649 (pp_cxx_new_expression): Likewise.
1650 (pp_cxx_delete_expression): Likewise.
1651 (pp_cxx_pm_expression): Likewise.
1652 (pp_cxx_type_specifier): Rework.
1653 (pp_cxx_type_id): Likewise.
1654 (pp_cxx_primary_expression): Likewise.
1655 (pp_cxx_postfix_expression): Likewise.
1656 (pp_cxx_unary_expression): Likewise.
1657 (pp_cxx_multiplicative_expression): Likewise.
1658 (pp_cxx_conditional_expression): Likewise.
1659 (pp_cxx_assignment_expression): Likewise.
1660 (pp_cxx_pretty_printer_init): Tidy.
1661
1662 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
1663
1664 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1665 NODE is always a TREE_VEC of nonzero size.
1666 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1667 * decl2.c (arg_assoc): Template args will be a vec.
1668 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1669 dump_template_argument_list.
1670 (dump_template_parms): Args will be a vec.
1671 * parser.c (cp_parser_template_argument_list): Produce a
1672 vector, not a list.
1673 * pt.c (coerce_template_parms): Args are always vectors.
1674 (mangle_class_name_for_template): Likewise.
1675 (lookup_template_function): Likewise.
1676 (lookup_template_class): Likewise.
1677 (tsubst_template_args): Likewise.
1678 (tsubst_baselink): Use tsubst_template_args.
1679 (tsubst_qualified_id): Likewise.
1680 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1681 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1682 (any_dependent_template_args_p): Args are always vectors.
1683 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1684
1685 PR c++/11670
1686 * call.c (convert_like_real): Add rvalue binding error message.
1687 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1688 really a cast.
1689
1690 PR c++/10530
1691 * pt.c (dependent_type_p_r): A dependent template-id is a class
1692 type with dependent template arguments, or a bound template
1693 template parameter.
1694 (type_dependent_expression_p): A template function decl cannot
1695 have a dependent context.
1696
1697 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1698
1699 PR c++/5767
1700 * parser.c (cp_parser_class_name): Return immediately when scope
1701 is error_mark_node.
1702
1703 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
1704
1705 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1706
1707 * cp/call.c (standard_conversion): Support opaque types.
1708 Include target.h.
1709 (strip_top_quals): Use cp_build_qualified_type instead of
1710 TYPE_MAIN_VARIANT.
1711
1712 * cp/typeck.c (convert_for_assignment): Support opaque types.
1713
1714 * testsuite/g++.dg/other/opaque-1.C: New.
1715
1716 * testsuite/g++.dg/other/opaque-2.C: New.
1717
1718 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
1719
1720 * decl.c (grokparms): Use cp_build_qualified_type instead
1721 TYPE_MAIN_VARIANT.
1722
1723 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1724
1725 * cxx-pretty-print.h: New file.
1726 * cxx-pretty-print.c: Likewise.
1727 * error.c (scratch_pretty_printer): Change type.
1728 (init_error): Tidy.
1729 (dump_aggr_type): Likewise.
1730 (dump_global_iord): Likewise.
1731 (dump_expr): Likewise.
1732 (dump_char): Remove.
1733 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1734 (cxx_initialize_diagnostics): New function.
1735 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1736 (CXX_PRETTY_PRINT_H): New variable.
1737 (cp/cxx-pretty-print.o): New rule.
1738 (cp/cp-lang.o): Update dependence.
1739 (cp/error.o): Likewise.
1740
1741 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1742
1743 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1744 (DECL_DECLARED_INLINE_P): Remove.
1745 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1746 if decl is a FUNCTION_DECL. This never made sense, but now it is
1747 required to avoid a tree check failure.
1748 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1749 * optimize.c (maybe_clone_body): Likewise.
1750
1751 2003-08-04 Roger Sayle <roger@eyesopen.com>
1752
1753 * decl.c (cxx_insert_default_attributes): Delete.
1754 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1755 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1756
1757 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
1758
1759 PR c++/11704
1760 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1761 unknown type.
1762
1763 PR c++/11766
1764 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1765 member functions.
1766
1767 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1768
1769 PR c++/9447
1770 * cp-tree.def (USING_DECL): Document its type.
1771 * class.c (pushclass): If we're entering a template, push any
1772 dependent using decls it has.
1773 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1774 a dependent scope.
1775 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1776 (tsubst): Remove USING_DECL checks.
1777 (type_dependent_expression_p): Remove USING_DECL case.
1778 * semantics.c (finish_member_declaration): A USING_DECL's type
1779 indicates whether it is dependent.
1780
1781 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1782
1783 * cp-tree.h (pushclass): Remove unneeded parameter.
1784 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1785 (push_nested_class): Adjust pushclass call.
1786 * pt.c (instantiate_class_template): Likewise.
1787 * semantics.c (begin_class_definition): Likewise.
1788
1789 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
1790
1791 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1792
1793 2003-08-01 Mark Mitchell <mark@codesourcery.com>
1794
1795 PR c++/11697
1796 * decl.c (decls_match): Don't ignore the types of template
1797 classes.
1798
1799 PR c++/11744
1800 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1801
1802 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1803
1804 PR c++/8442, c++/8806
1805 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1806 preferred.
1807 (check_elaborated_type_specifier): Add allow_template_p
1808 parameter. Check tag mismatch and class template.
1809 (xref_tag): Add template_header_p parameter. Add assertion
1810 that name is an IDENTIFIER_NODE. Remove implicit typename
1811 warning. Simplify lookup process if globalize is true.
1812 (cxx_init_decl_processing): Adjust call to xref_tag.
1813 (xref_tag_from_type): Likewise.
1814 * decl2.c (handle_class_head): Likewise.
1815 * parser.c (cp_parser_elaborated_type_specifier,
1816 cp_parser_class_head): Likewise.
1817 * rtti.c (init_rtti_processing, build_dynamic_cast1,
1818 tinfo_base_init, emit_support_tinfos): Likewise.
1819 * class.c (is_base_of_enclosing_class): Remove.
1820 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1821 template template argument.
1822 * cp-tree.h (xref_tag): Adjust declaration.
1823 (is_base_of_enclosing_class): Remove.
1824 * NEWS: Document template template argument change.
1825
1826 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
1827
1828 * parser.c (cp_parser_init_declarator,
1829 cp_paser_member_declaration): Reformat.
1830 * pt.c (lookup_template_class, type_unification_real, unify,
1831 type_dependent_expression_p): Reformat.
1832
1833 PR c++/11295
1834 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1835 tf_stmt_expr_body.
1836 (finish_stmt_expr_expr): Declare.
1837 * parser.c (cp_parser_primary_expression): Tell
1838 cp_parser_compount_statement that it is a statement expression.
1839 (cp_parser_statement, cp_parser_labeled_statement,
1840 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1841 in_statement_expr_p parameter.
1842 (cp_parser_expression_statement): Likewise. Call
1843 finish_stmt_expr_expr for final expression of a statement
1844 expression.
1845 (cp_parser_for_init_statement,
1846 cp_parser_implicitly_scoped_statement,
1847 cp_parser_already_scoped_statement, cp_parser_function_definition,
1848 cp_parser_try_block, cp_parser_handled): Adjust.
1849 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1850 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1851 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1852 * semantics.c (finish_expr_stmt): Do not deal with statement
1853 expressions.
1854 (begin_stmt_expr): Clear last_expr_type.
1855 (finish_stmt_expr_expr): New.
1856 (finish_stmt_expr): Process the value expression.
1857
1858 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1859 compound expr inside the target's initializer.
1860
1861 PR c++/11525
1862 * parser.c (cp_parser_primary_expression): Do not set
1863 non-constant-p merely because it is a dependent scope.
1864
1865 PR c++/9447
1866 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1867 * semantics.c (finish_expr_stmt): Do not convert to void in a
1868 template.
1869
1870 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
1871
1872 * pt.c (coerce_template_parms): Refactor.
1873 (fn_type_unification): Increment processing_template_decl when
1874 tsubsting an incomplete set of explicit args.
1875
1876 PR c++/11347
1877 * pt.c (instantiate_class_template): Increment
1878 processing_template_decl around the tsubst of a template member
1879 class.
1880 (tsubst_qualified_id): Assert we do not have a dependent scope.
1881
1882 * pt.c (coerce_template_template_parms, lookup_template_class,
1883 can_complete_type_without_circularity, instantiate_class_template,
1884 tsubst_decl, unify): Reformat.
1885
1886 2003-07-31 Jan Hubicka <jh@suse.cz>
1887
1888 * decl2.c (maybe_make_one_only): Use mark_referenced.
1889 * method.c (use_thunk): Likewsie.
1890
1891 2003-07-30 Jan Hubicka <jh@suse.cz>
1892
1893 * class.c (build_vtable_entry_ref): Kill.
1894 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1895 (build_vfn_ref): Do not call build_vtable_entry_ref.
1896 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1897 * cp-tree.h (prepare_assemble_variable): Kill.
1898 * cp-decl.c (prepare_assemble_variable): Kill.
1899
1900 2003-07-29 Geoffrey Keating <geoffk@apple.com>
1901
1902 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1903 of setting valid_pch by hand.
1904
1905 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1906
1907 * decl.c (finish_enum): Initialize underlying_type.
1908
1909 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
1910
1911 PR c++/9447
1912 * decl.c (add_binding): Add bval local variable.
1913 (push_class_level_binding): Likewise. Allow a USING_DECL to be
1914 pushed.
1915 * decl2.c (do_class_using_decl): The type of a using decl is
1916 unknown.
1917 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1918 function call lookup code.
1919 * pt.c (tsubst): A USING_DECL will have unknown type.
1920 (tsubst_copy_and_build): Allow a using decl.
1921 (type_dependent_expression_p): A USING_DECL will make it
1922 dependent.
1923 * semantics.c (finish_member_declaration): Push a dependent using
1924 declaration.
1925
1926 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1927
1928 PR c++/11530
1929 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1930 * semantics.c (finish_id_expression): Call mark_used for all
1931 declarations.
1932
1933 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1934
1935 PR c++/11667
1936 * call.c (standard_conversion): Allow all integral->enumeral
1937 conversions, after marking them as bad.
1938 * decl.c (finish_enum): Make sure that all enumerators are
1939 properly converted to the underlying type.
1940 (build_enumerator): Set DECL_CONTEXT for namespace-scope
1941 enumeration types.
1942 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1943 (tsubst_enum): Tidy.
1944
1945 * Make-lang.in (typeck.o): Depend on convert.h.
1946 (class.o): Likewise.
1947 (rtti.o): Likewise.
1948 * call.c: Include convert.h.
1949 (convert_arg_to_ellipsis): Use convert_to_real.
1950 * class.c: Include convert.h.
1951 (build_base_path): Use convert_to_integer.
1952 * rtti.c: Include convert.h.
1953 (build_headof): Use convert_to_integer.
1954 * typeck.c: Include convert.h.
1955 (decay_conversion): Use convert_to_integer.
1956 (build_unary_op): Use build_nop.
1957 (get_delta_difference): Use convert_to_integer.
1958 (build_ptrmemfunc): Avoid unnecessary conversions.
1959
1960 2003-07-28 Jan Hubicka <jh@suse.cz>
1961
1962 * decl2.c (mark_member_pointers): Verify that member pointer points to
1963 the function.
1964
1965 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
1966
1967 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1968 (finish_compound_stmt): Remove no scope arg.
1969 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1970 end_compound_stmt calls.
1971 (expand_static_init, begin_destructor_body, begin_function_body,
1972 finish_function_body): Likewise.
1973 * decl2.c (start_objects, finish_objects,
1974 start_static_storage_duration_function,
1975 finish_static_storage_duration_function): Likewise.
1976 * init.c (begin_init_stmts, finish_init_stmts,
1977 construct_virtual_base, build_vec_init): Likewise.
1978 * method.c (do_build_assign_ref, synthesize_method): Likewise.
1979 * parser.c (cp_parser_compound_statement,
1980 cp_parser_implicitly_scoped_statement,
1981 cp_parser_already_scoped_statement): Likewise.
1982 * pt.c (tsubst_expr): Likewise.
1983 * semantics.c (begin_compound_stmt): No scope arg is a bool.
1984 (finish_compound_stmt): Remove no scope arg.
1985
1986 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1987 always dyadic.
1988
1989 2003-07-27 Mark Mitchell <mark@codesourcery.com>
1990
1991 * call.c (standard_conversion): Tweak handling of
1992 pointer-to-member types.
1993 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1994 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1995 pointer-to-data member types.
1996
1997 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
1998
1999 * parser.c (cp_parser_type_parameter): Reformat.
2000 (cp_parser_parameter_declaration): Deprecate default args where
2001 not allowed.
2002
2003 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
2004
2005 * cfns.h: Rebuilt.
2006
2007 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2008 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2009 * init.c (begin_init_stmts): Make static. Return is_global
2010 value. Always call begin_stmt_expr.
2011 (finish_init_stmts): Make static. Add is_global parm. Always
2012 building a stmt tree.
2013 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2014 (build_vec_init): Likewise. Always building a stmt tree.
2015 (expand_default_init): Always building a stmt tree.
2016 (get_temp_regvar): Likewise.
2017 * semantics.c (begin_global_stmt_expr,
2018 finish_global_stmt_expr): Remove.
2019
2020 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2021
2022 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2023 (build_x_compound_expr_from_list): Declare.
2024 * typeck.c (build_x_compound_expr_from_list): New.
2025 (build_x_compound_expr): Adjust.
2026 (build_compound_expr): Remove unreachable code. Take two
2027 parameters, adjust.
2028 * decl.c (grok_reference_init): Use
2029 build_x_compound_expr_from_list.
2030 (expand_static_init): Adjust build_compound_expr call.
2031 (cxx_maybe_build_cleanup): Likewise.
2032 * init.c (perform_member_init): Use
2033 build_x_compound_expr_from_list.
2034 (build_new_1): Likewise.
2035 (build_vec_delete): Adjust build_compound_expr calls.
2036 (build_vbase_delete): Likewise.
2037 * typeck2.c (store_init_value): Use
2038 build_x_compound_expr_from_list.
2039 (build_functional_cast): Likewise.
2040
2041 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2042
2043 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2044 * decl.c (make_typename_type): Pass it.
2045 * pt.c (lookup_template_class): Use it.
2046 (resolve_typename_type): Pass it.
2047 * semantics.c (finish_template_type): Pass it.
2048
2049 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2050
2051 PR c++/11617
2052 * cp-tree.h (qualified_name_lookup_error): Declare.
2053 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2054 errors.
2055 (tsubst_expr) <DECL_STMT case>: Likewise.
2056 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2057 * semantics.c (qualified_name_lookup_error): New, broken out of ...
2058 (finish_id_expression): ... here. Use it.
2059
2060 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
2061
2062 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2063
2064 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2065
2066 PR c++/11596
2067 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2068 (tsubst_template_arg): New.
2069 (tsubst_template_arg_vector): Rename to ...
2070 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2071 tsubst_template_arg.
2072 (coerce_template_parms): Use tsubst_template_arg for default
2073 value.
2074 (tsubst_template_parms): Likewise.
2075 (tsubst_aggr_type): Adjust.
2076 (tsubst_decl): Likewise.
2077 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2078 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2079
2080 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2081
2082 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2083 * error.c: Use the new pretty-printer framework.
2084
2085 2003-07-24 Per Bothner <pbothner@apple.com>
2086
2087 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2088 which causes errors messages to incorrectly mention included files.
2089
2090 2003-07-24 Mark Mitchell <mark@codesourcery.com>
2091
2092 * cp-tree.h (convert_to_base_statically): Declare.
2093 * call.c (build_special_member_call): Convert INSTANCE to the base
2094 type.
2095 * class.c (convert_to_base_statically): New method.
2096 * init.c (construct_virtual_base): Use it.
2097 * method.c (do_build_assign_ref): Fix typo in comment.
2098
2099 2003-07-24 Jason Merrill <jason@redhat.com>
2100
2101 * decl.c: Just set truthvalue_* to boolean_*.
2102
2103 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
2104
2105 * decl.c (reshape_init): Remove unreachable code.
2106
2107 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2108
2109 PR c++/11513
2110 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2111
2112 2003-07-23 Mark Mitchell <mark@codesourcery.com>
2113
2114 PR c++/11645
2115 * cp-tree.h (accessible_base_p): Declare.
2116 * call.c (build_over_call): Use it.
2117 * search.c (accessible_base_p): New function, split out from ...
2118 (lookup_base): ... here.
2119
2120 PR c++/11517
2121 * call.c (build_conditional_expr): Use perform_implicit_conversion
2122 and error_operand_p. Robustify.
2123 * typeck.c (build_unary_op): Use perform_implicit_conversion.
2124
2125 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
2126
2127 PR c++/10953
2128 * parser.c (cp_parser_nested_name_specifier): Reset scope on
2129 failure.
2130 (cp_parser_elaborated_type_specifier): Likewise.
2131
2132 2003-07-22 Mark Mitchell <mark@codesourcery.com>
2133
2134 Eliminate use of POINTER_TYPE for pointers-to-members.
2135 * call.c (standard_conversion): Rework pointer-to-member handling.
2136 Add comments.
2137 (add_builtin_candidate): Likewise.
2138 (resolve_scoped_fn_name): Remove.
2139 (build_conditional_expr): Rework pointer-to-member handling.
2140 (compare_ics): Likewise.
2141 * class.c (check_field_decls): Use TYPE_PTR_P.
2142 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2143 handling.
2144 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2145 (TYPE_PTRMEM_P): Add comment.
2146 (TYPE_PTR_P): Simplify.
2147 (TYPE_PTROB_P): Correct definition.
2148 (TYPE_PTR_TO_MEMBER_P): New macro.
2149 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2150 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2151 (resolved_scoped_fn_name): Remove declaration.
2152 (build_offset_ref): Change prototype.
2153 (resolve_offset_ref): Remove.
2154 (comp_target_types): Remove.
2155 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2156 handling.
2157 (convert_to_reference): Use can_convert.
2158 (ocp_convert): Improve error handling. Rework pointer-to-member
2159 handling.
2160 (perform_qualification_conversions): Rework pointer-to-member
2161 handling.
2162 * decl.c (build_ptrmem_type): Handle functions too.
2163 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2164 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2165 (grokparms): Remove OFFSET_TYPE error message.
2166 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2167 * error.c (dump_type_prefix): Likewise.
2168 * expr.c (cplus_expand_constant): Use build_nop.
2169 * init.c (build_offset_ref): Add address_p parameter. Fold in
2170 necessary bits from resolve_offset_ref.
2171 (resolve_offset_ref): Remove.
2172 * parser.c (cp_parser_postfix_expression): Remove special case
2173 code for OFFSET_TYPE.
2174 * pt.c (convert_nontype_argument): Rework pointer-to-member
2175 handling.
2176 (convert_template_argument): Likewise.
2177 (unify): Likewise.
2178 (invalid_nontype_parm_type_p): Likewise.
2179 (dependent_type_p_r): Likewise.
2180 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2181 (target_incomplete_p_): Rework pointer-to-member
2182 handling.
2183 (get_pseudo_ti_init): Likewise.
2184 (get_pseudo_ti_desc): Likewise.
2185 * semantics.c (finish_qualified_id_expr): Adjust call to
2186 build_offset_ref. Remove use of resolve_offset_ref.
2187 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2188 * typeck.c (target_type): Use TYPE_PTRMEM_P.
2189 (type_unknown_p): Remove obsolete code about the time before
2190 non-dependent expressions were handled correctly.
2191 (qualify_type_recursive): Remove.
2192 (composite_pointer_type_r): New function.
2193 (composite_pointer_type): Use it.
2194 (merge_types): Remove dead comments.
2195 (comp_cv_target_types): Remove.
2196 (comp_target_types): Likewise.
2197 (comp_target_parms): Likewise.
2198 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2199 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2200 (build_binary_op): Do not use of comp_target_types.
2201 (pointer_diff): Remove OFFSET_TYPE case.
2202 (build_unary_op): Adjust pointer-to-member handling.
2203 (unary_complex_lvalue): Likewise.
2204 (check_for_casting_away_constness): Add description parameter.
2205 (build_static_cast): Pass it.
2206 (build_reinterpret_cast): Use check_for_casting_away_constness.
2207 (build_const_cast): Adjust pointer-to-member handling.
2208 (build_c_cast): Likewise.
2209 (convert_for_assignment): Remove OFFSET_TYPE error message.
2210 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2211 (comp_ptr_ttypes_reinterpret): Remove.
2212 (casts_away_constness_r): Adjust pointer-to-member handling.
2213 (casts_away_constness): Liekwise.
2214 (strip_all_pointer_quals): Remove.
2215 * typeck2.c (digest_init): Adjust pointer-to-member handling.
2216 (build_m_component_ref): Likewise.
2217
2218 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
2219
2220 * lex.c (unqualified_fn_lookup_error): Mention that the error
2221 message needs to be kept in synch with the manual.
2222
2223 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2224
2225 PR c++/11614
2226 * decl.c (grokdeclarator): An array member is only a flexible
2227 array member if the field itself is the array.
2228
2229 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2230
2231 PR c++/10793
2232 * decl.c (xref_basetypes): Handle error_mark_node.
2233
2234 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2235
2236 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2237 * tree.c (lvalue_p_1): Set it.
2238 * class.c (check_field): Don't allow non-packed non-POD fields to
2239 be packed.
2240 * call.c (reference_binding): Need a temporary for all bitfield
2241 and packed fields.
2242 (convert_like_real): Check it is ok to make a temporary here.
2243
2244 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
2245
2246 * cp-tree.h (hack_identifier): Remove.
2247 * method.c (hack_identifier): Remove.
2248 * semantics.c (finish_id_expression): Expand hack_identifier
2249 here. Simplify.
2250
2251 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2252
2253 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2254 semantics.c typeck.c: Remove unnecessary casts.
2255
2256 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2257
2258 * cp-tree.h (hack_identifier): Remove.
2259 * method.c (hack_identifier): Remove.
2260 * semantics.c (finish_id_expression): Expand hack_identifier
2261 here. Simplify.
2262
2263 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2264
2265 * cp-tree.h (finish_non_static_data_member): Add object param.
2266 * method.c (hack_identifier): Adjust.
2267 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2268 again for a FIELD_DECL.
2269 * semantics.c (finish_non_static_data_member): Add object
2270 parameter. Always save the DECL in the COMPONENT_REF.
2271 * call.c (resolve_scoped_fn_name): Adjust.
2272
2273 2003-07-17 Zack Weinberg <zack@codesourcery.com>
2274
2275 * pt.c (get_bindings): Make definition consistent with
2276 forward declaration.
2277
2278 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2279
2280 PR c++/7809
2281 * friend.c (add_friend): Check access for member functions
2282 and templates.
2283
2284 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2285
2286 PR c++/10668
2287 * typeck.c (build_class_member_access_expr): Improve diagnostic.
2288
2289 2003-07-16 Mark Mitchell <mark@codesourcery.com>
2290
2291 PR c++/11547
2292 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2293 macro.
2294 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2295 * decl.c (duplicate_decls): Merge
2296 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2297 * parser.c (cp_parser_postfix_expression): Adjust call to
2298 cp_parser_initializer_list and
2299 cp_parser_parenthesized_expression_list.
2300 (cp_parser_parenthesized_expression_list): Add non_constant_p.
2301 (cp_parser_new_placement): Adjust call to
2302 cp_parser_parenthesized_expression_list.
2303 (cp_parser_direct_new_declarator): Likewise.
2304 (cp_parser_conditional_expression): Remove.
2305 (cp_parser_constant_expression): Parse an assignment-expression,
2306 not a conditional-expression.
2307 (cp_parser_simple_declaration): Resolve expression/declaration
2308 ambiguity more quickly.
2309 (cp_parser_mem_initializer): Adjust call to
2310 cp_parser_parenthesized_expression_list.
2311 (cp_parser_init_declarator): Keep track of whether or not the
2312 initializer is a constant-expression.
2313 (cp_parser_initializer): Add non_constant_p parameter.
2314 (cp_parser_initializer_clause): Likewise.
2315 (cp_parser_initializer_list): Likewise.
2316 (cp_parser_attribute_list): Adjust call to
2317 cp_parser_parenthesized_expression_list.
2318 (cp_parser_functional_cast): Likewise.
2319 * pt.c (tsubst_decl): Copy
2320 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2321 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2322 * semantics.c (finish_id_expression): Use
2323 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2324
2325 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
2326
2327 * lang-options.h: Remove.
2328
2329 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
2330
2331 PR c/10962
2332 * class.c (field_decl_cmp): Remove.
2333 (resort_field_decl_cmp): Remove.
2334 (resort_sorted_fields): Remove.
2335 (add_fields_to_vec): Rename to ...
2336 (add_fields_to_record_type): this.
2337 (finish_struct_1): Change to be using
2338 sorted_fields_type's fields.
2339 * cp-tree.h (lang_decl): In lang_decl_u3
2340 change sorted_fields to be a pointer to
2341 sorted_fields_type.
2342 (resort_sorted_fields): Remove prototype.
2343 * search.c (lookup_field_1): Change to be using
2344 sorted_fields_type's fields.
2345
2346 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2347
2348 PR c++/5421
2349 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2350 is a member of other class.
2351 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2352 is a specialization of function template.
2353
2354 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2355
2356 PR c++/10903
2357 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2358 Improve.
2359
2360 2003-07-15 Mark Mitchell <mark@codesourcery.com>
2361
2362 * cp-tree.def (LOOKUP_EXPR): Remove.
2363 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2364 (LOOKUP_EXPR_GLOBAL): Remove.
2365 (get_bindings): Remove.
2366 (is_aggr_type_2): Remove.
2367 * call.c (resolved_scoped_fn_name): Remove support for
2368 LOOKUP_EXPR.
2369 * decl.c (grokfndecl): Likewise.
2370 (grokdeclarator): Likewise.
2371 * error.c (dump_decl): Likewise.
2372 (dump_expr): Likewise.
2373 * friend.c (do_friend): Likewise.
2374 * init.c (build_offset_ref): Likewise.
2375 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
2376 LOOKUP_EXPRs
2377 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2378 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2379 test.
2380 * pt.c (get_bindings): Give it internal linkage.
2381 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2382 (lookup_template_function): Likewise.
2383 (for_each_tempalte_parm_r): Likewise.
2384 (tsubst_decl): Likewise.
2385 (tsubst_qualified_id): Handle template template parameters.
2386 (tsubst_copy): Remove support for LOOKUP_EXPR.
2387 (tsubst_copy_and_build): Likewise.
2388 (most_general_template): Likewise.
2389 (value_dependent_expression_p): Likewise.
2390 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2391 always dependent.
2392 * semantics.c (perform_koenig_lookup): Do not create
2393 IDENTIFIER_NODEs.
2394 (finish_fname): Likewise.
2395 (finish_id_expression): Likewise.
2396 * tree.c (is_aggr_type_2): Remove.
2397
2398 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2399
2400 PR c++/11531
2401 * typeck.c (check_return_expr): Fix thinko in diagnostic.
2402
2403 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2404
2405 PR c++/10108
2406 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2407 error_mark_node.
2408
2409 2003-07-14 Mark Mitchell <mark@codesourcery.com>
2410
2411 PR c++/11509
2412 * pt.c (dependent_scope_ref_p): New function.
2413 (value_dependent_expression_p): Use it.
2414 (type_dependent_expression_p): Likewise.
2415
2416 * pt.c (tsubst_friend_function): Use reregister_specialization.
2417
2418 PR c++/7019
2419 * cp-tree.h (lookup_qualified_name): Adjust prototype.
2420 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
2421 call to is_aggr_type.
2422 * parser.c (cp_parser_lookup_name): Adjust call to
2423 lookup_qualified_name.
2424 * pt.c (tsubst_qualified_id): Likewise.
2425 (tsubst_copy_and_build): Likewise.
2426 * semantics.c (finish_qualified_id_expr): Deal with erroneous
2427 expressions.
2428
2429 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2430
2431 PR c++/11510
2432 * call.c (op_error): Properly format REALPART_EXPR and
2433 IMAGPART_EXPR.
2434 * error.c (dump_expr): Likewise.
2435
2436 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2437
2438 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2439
2440 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2441
2442 PR c++/5293
2443 * call.c (initialize_reference): Improve diagnostic.
2444
2445 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2446
2447 PR c++/11154
2448 * pt.c (more_specialized_class): Add full_args parameter.
2449 (most_specialized_class): Adjust calls to more_specialized_class.
2450 * cp-tree.h (more_specialized_class): Adjust declaration.
2451
2452 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
2453
2454 * lex.c (enum tree_node_kind): Delete.
2455
2456 2003-07-13 Mark Mitchell <mark@codesourcery.com>
2457
2458 PR c++/11503
2459 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2460 (SET_DECL_SELF_REFERENCE_P): Likewise.
2461 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2462 * pt.c (tsubst_decl): Copy it.
2463 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2464
2465 * pt.c (reregister_specialization): Fix thinko in previous change.
2466
2467 * cp-tree.h (cp_id_kind): New type.
2468 (unqualified_name_lookup_error): Change prototype.
2469 (unqualified_fn_lookup_error): New function.
2470 (do_identifier): Remove.
2471 (do_scoped_id): Likewise.
2472 (tsubst_copy_and_build): Change prototype.
2473 (reregister_specialization): New function.
2474 (perform_koenig_lookup): Likewise.
2475 (finish_id_expression): Likewise.
2476 * call.c (build_method_call): Adjust call to
2477 unqualified_name_lookup_error.
2478 * decl.c (duplicate_decls): Use reregister_specialization.
2479 * lex.c (is_global): Remove.
2480 (unqualified_name_lookup_error): Return a value.
2481 (do_identifier): Remove.
2482 (do_scoped_id): Likewise.
2483 (identifier_typedecl_value): Remove.
2484 (unqualified_fn_lookup_error): New function.
2485 * parser.c (cp_parser_id_kind): Remove.
2486 (cp_parser_non_constant_id_expression): Remove.
2487 (cp_parser_primary_expression): Use finish_id_expression.
2488 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2489 cp_parser_id_kind.
2490 (cp_parser_postfix_expression): Use perform_koenig_lookup.
2491 (cp_parser_template_argument): Use cp_id_kind.
2492 (cp_parser_fold_non_dependent_expr): Adjust call to
2493 tsubst_copy_and_build.
2494 * pt.c (unregister_specialization): Rename to ...
2495 (reregister_specialization): This.
2496 (tsubst_friend_function): Use it.
2497 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2498 (tsubst_qualified_id): Likewise.
2499 (tsubst_expr): Likewise.
2500 (tsubst_copy_and_build): Add function_p parameter. Use
2501 finish_id_expression. Introduce RECUR macro.
2502 (tsubst_non_call_postfix_expression): New function.
2503 (regenerate_decl_from_template): Use reregister_specialization.
2504 * semantics.c (perform_koenig_lookup): New function.
2505 (finish_id_expression): Likewise.
2506
2507 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2508
2509 * pt.c (push_access_scope_real): Remove.
2510 (push_access_scope): Move code from push_access_scope_real.
2511 (pop_access_scope): Don't check for TEMPLATE_DECL.
2512 (instantiate_template): Defer access checking during template
2513 substitution.
2514 (regenerate_decl_from_template): Tidy.
2515
2516 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
2517
2518 PR c++/11437
2519 * operators.def: Add definitions for __imag__, __real__.
2520
2521 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
2522
2523 PR c++/11050
2524 * parser.c (cp_parser_expression_list): Rename to ...
2525 (cp_parser_parenthesized_expression_list): ... here. Add attribute
2526 parameter, parse the surounding parentheses.
2527 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2528 parameters. Return int.
2529 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2530 (cp_parser_postfix_expression): Adjust function call parsing.
2531 (cp_parser_new_placement): Adjust.
2532 (cp_parser_new_initializer): Likewise.
2533 (cp_parser_cast_expression): Likewise.
2534 (cp_parser_selection_statement): Likewise.
2535 (cp_parser_mem_initializer): Likewise.
2536 (cp_parser_asm_definition): Likewise.
2537 (cp_parser_init_declarator): Likewise.
2538 (cp_parser_declarator): Make
2539 cdtor_or_conv_p an int ptr.
2540 (cp_parser_direct_declarator): Likewise. Check for a parameter
2541 list on cdtors & conv functions.
2542 (cp_parser_initializer): Adjust.
2543 (cp_parser_member_declaration): Adjust.
2544 (cp_parser_attribute_list): Move code into
2545 cp_parser_parens_expression_list.
2546 (cp_parser_functional_cast): Adjust.
2547 * pt.c (type_dependent_expression_p): Erroneous expressions are
2548 non-dependent.
2549
2550 2003-07-11 Geoffrey Keating <geoffk@apple.com>
2551
2552 * decl.c (cp_finish_decl): Handle 'used' attribute.
2553
2554 * cp-lang.c (c_reset_state): New dummy routine.
2555 * cp-tree.h (finish_file): Move prototype to c-common.h.
2556 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2557
2558 2003-07-11 Mark Mitchell <mark@codesourcery.com>
2559
2560 PR c++/8327
2561 * pt.c (tsubst_qualified_id): Implement suggested resolution for
2562 Core Issue 2.
2563 (type_dependent_expression_p): Likewise.
2564
2565 2003-07-10 Mark Mitchell <mark@codesourcery.com>
2566
2567 * typeck.c (build_binary_op): Do not warn about signed
2568 vs. unsigned comparisons in the bodies of templates.
2569
2570 PR c++/9411
2571 * parser.c (cp_parser_postfix_expression): Check dependency of
2572 functions.
2573
2574 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2575
2576 PR c++/10032
2577 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2578 still errors.
2579
2580 PR c++/10527
2581 * error.c (decl_to_string): Do not print default argument
2582 expressions.
2583
2584 * cp-tree.h (break_out_calls): Remove declaration.
2585 * tree.c (break_out_calls): Remove.
2586 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2587
2588 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
2589
2590 PR c++ 9483
2591 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2592 * decl2.c (constructor_name_p): Avoid repeated constructor_name
2593 calls.
2594 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2595
2596 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2597
2598 * typeck.c (build_x_unary_op): Take note of the fact that
2599 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2600 trees.
2601
2602 * parser.c (cp_parser_primary_expression): Preserve the form of
2603 qualified expressions in templates, even if they are not
2604 dependent.
2605 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2606 (tsubst_qualified_id): Likewise.
2607 * search.c (accessible_p): Treat everything in the body of a
2608 template as accessible.
2609
2610 2003-07-08 Mark Mitchell <mark@codesourcery.com>
2611
2612 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2613 * cp-tree.h (build_call_from_tree): Remove.
2614 (build_member_call): Likewise.
2615 (dependent_template_arg_p): Remove.
2616 (any_dependent_template_arguments_p): New function.
2617 (dependent_template_id_p): Likewise.
2618 (any_type_dependent_arguments_p): Likewise.
2619 (build_non_dependent_expr): Likewise.
2620 (build_non_dependent_args): Likewise.
2621 (build_x_compound_expr): Adjust prototype.
2622 * call.c (build_new_method_call): Handle non-dependent expressions
2623 correctly.
2624 * decl2.c (grok_array_decl): Likewise.
2625 (build_offset_ref_call_from_tree): Likewise.
2626 (build_call_from_tree): Remove.
2627 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2628 (dump_expr): Likewise.
2629 * init.c (build_member_call): Remove.
2630 * mangle.c (write_expression): Update handling for template-ids.
2631 * parser.c (cp_parser_primary_expression): Use
2632 any_dependent_template_arguments_p. Update constant-expression
2633 handling.
2634 (cp_parser_postfix_expression): Use
2635 any_type_dependent_arguments_p. Simplify call processing.
2636 (cp_parser_unary_expression): Simplify.
2637 (cp_parser_expression): Adjust for changes to
2638 build_x_compound_expr.
2639 (cp_parser_template_argument): Implement standard-conforming
2640 parsing of non-type template arguments.
2641 (cp_parser_direct_declarator): Use
2642 cp_parser_fold_non_dependent_expr.
2643 (cp_parser_fold_non_dependent_expr): New function.
2644 (cp_parser_next_token_ends_template_argument_p): Likewise.
2645 * pt.c (convert_template_argument): Do not call
2646 maybe_fold_nontype_arg.
2647 (tsubst_baselink): Likewise.
2648 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
2649 processing work correctly for non-dependent expressions. Adjust
2650 handling of COMPOUND_EXPR. Simplify call processing.
2651 (value_dependent_expression_p): Deal with functional casts and
2652 sizeof/alignof correctly.
2653 (type_dependent_expression_p): Handle overloaded functions.
2654 (any_type_dependent_arguments_p): New function.
2655 (any_dependent_template_arguments_p): Likewise.
2656 (dependent_template_p): Treat SCOPE_REFs as dependent.
2657 (dependent_template_id_p): Simplify.
2658 (build_non_dependent_expr): New function.
2659 (build_non_dependent_args): Likewise.
2660 * semantics.c (finish_stmt_expr): Don't make dependent
2661 statement-expresions have void type.
2662 (finish_call_expr): Handle non-dependent expressions
2663 correctly.
2664 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2665 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2666 type size_t, even in templates.
2667 (expr_sizeof): Likewise.
2668 (finish_class_member_access_expr): Handle non-dependent expressions
2669 correctly.
2670 (build_x_indirect_ref): Likewise.
2671 (build_x_binary_op): Likewise.
2672 (build_x_unary_op): Likewise.
2673 (build_x_conditional_expr): Likewise.
2674 (build_x_compound_expr): Likewise.
2675 * typeck2.c (build_x_arrow): Likewise.
2676
2677 2003-07-09 Jan Hubicka <jh@suse.cz>
2678
2679 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2680 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2681 (start_function): Use DECL_ESTIMATED_INSNS.
2682 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2683
2684 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2685 unit-at-a-time
2686
2687 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2688
2689 PR c++/11030
2690 * pt.c (instantiate_class_template): Don't call xref_tag to
2691 inject name when the friend class is a specialization.
2692
2693 2003-07-07 Mark Mitchell <mark@codesourcery.com>
2694
2695 * cp-tree.h (build_scoped_method_call): Remove.
2696 (lookup_qualified_name): Remove parameter.
2697 (tsubst_copy_and_build): Declare.
2698 (finish_qualified_object_call_expr): Remove.
2699 (check_accessibility_of_qualified_id): New function.
2700 (finish_qualified_id_expr): Likewise.
2701 (non_reference): Likewise.
2702 (build_expr_from-tree): Remove.
2703 * call.c (non_reference): Remove.
2704 (build_scoped_method_call): Likewise.
2705 (build_method_call): Use error_operand_p. Assert that we are not
2706 processing a template.
2707 (standard_conversion): Use non_reference.
2708 * class.c (build_vtbl_entry_ref): Likewise.
2709 (build_vtbl_ref_1): Likewise.
2710 * cvt.c (build_expr_type_conversion): Use non_reference.
2711 * decl.c (lookup_qualified_name): Remove flags parameter.
2712 (grok_op_properties): Use non_reference.
2713 * decl2.c (grok_array_decl): Likewise.
2714 (build_expr_from_tree): Remove.
2715 (build_offset_ref_call_from_tree): Update comment.
2716 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2717 * except.c (prepare_eh_types): Use non_reference.
2718 (can_convert_eh): Likewise.
2719 * init.c (build_dtor_call): Avoid using build_method_call.
2720 * mangle.c (write_template_param): Remove misleading comment.
2721 * method.c (locate_copy): Use non_reference.
2722 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2723 (cp_parser_primary_expression): Do not create SCOPE_REFs is
2724 non-dependent contexts.
2725 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2726 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2727 build_expr_from_tree.
2728 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2729 Use check_accessibility_of_qualified_id.
2730 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2731 build_expr_from_tree.
2732 (tsubst_baselink): New function.
2733 (tsubst_qualified_id): Likewise.
2734 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
2735 (tsubst_expr): Adjust call to lookup_qualified_name.
2736 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
2737 handling of CALL_EXPRs.
2738 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2739 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2740 * search.c (check_final_overrider): Likewise.
2741 * semantics.c (check_accessibility_of_qualified_id): New function.
2742 (finish_qualified_object_call_expr): Remove.
2743 * typeck.c (target_type): Use non_reference.
2744 (cxx_sizeof_or_alignof_type): Likewise.
2745 (dubious_conversion_warnings): Likewise.
2746 (convert_for_initialization): Likewise.
2747 (non_reference): New function.
2748
2749 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2750
2751 * decl.c (print_binding_level, print_other_binding_stack,
2752 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2753 stdio calls.
2754 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2755
2756 2003-07-07 Andreas Jaeger <aj@suse.de>
2757
2758 * friend.c: Convert to ISO C90 prototypes.
2759
2760 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2761 language.
2762 * cfns.h: Regenerate.
2763
2764 * typeck.c: Convert remaining prototypes to ISO C90.
2765 * search.c: Likewise.
2766
2767 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2768 * semantics.c (expand_or_defer_fn): Likewise
2769 * mangle.c (discriminator_for_string_literal): Likewise.
2770 * g++spec.c (lang_specific_driver): Likewise.
2771
2772 * search.c (lookup_base_r): Remove unused variable.
2773
2774 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
2775
2776 * semantics.c: (genrtl_try_block) Adjust emit_line_note
2777 calls.
2778
2779 2003-07-07 Andreas Jaeger <aj@suse.de>
2780
2781 * search.c (lookup_base_r): Remove unused variable.
2782
2783 2003-07-06 Michael Chastain <mec@shout.net>
2784
2785 PR debug/10055
2786 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2787 assigning to input_filename directly.
2788
2789 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
2790
2791 * call.c: Fix comment formatting.
2792 * class.c: Likewise.
2793 * cp-tree.h: Likewise.
2794 * decl.c: Likewise.
2795 * decl2.c: Likewise.
2796 * error.c: Likewise.
2797 * method.c: Likewise.
2798 * name-lookup.c: Likewise.
2799 * parser.c: Likewise.
2800 * pt.c: Likewise.
2801 * rtti.c: Likewise.
2802 * search.c: Likewise.
2803 * typeck.c: Likewise.
2804
2805 2003-07-06 Mark Mitchell <mark@codesourcery.com>
2806
2807 PR c++/11345
2808 * search.c (lookup_base_r): Remove is_non_public and
2809 within_current_scope parameters. Remove other dead code.
2810 (lookup_base): Adjust call to lookup_base_r.
2811 (adjust_result_of_qualified_name_lookup): Improve comment.
2812 * semantics.c (finish_call_expr): Use maybe_dummy_object.
2813
2814 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
2815
2816 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2817 LANG_HOOKS_MISSING_ARGUMENT): Override.
2818
2819 2003-07-05 Mark Mitchell <mark@codesourcery.com>
2820
2821 PR c++/11431
2822 * typeck.c (build_static_cast): Check for reference conversions
2823 earlier.
2824
2825 2003-07-04 Mark Mitchell <mark@codesourcery.com>
2826
2827 * cp-tree.h (perform_integral_promotions): Declare.
2828 * call.c (build_addr_func): Use decay_conversion.
2829 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
2830 (convert_for_arg_passing): Use perform_integral_promotions.
2831 * cvt.c (build_expr_type_conversion): Use decay_conversion.
2832 (type_promotes_to): Do not return a cv-qualified type.
2833 * decl.c (grok_reference_init): Fix formatting.
2834 (get_atexit_node): Use decay_conversion.
2835 (build_enumerator): Use perform_integral_promotions.
2836 * init.c (build_vec_init): Use decay_conversion.
2837 * semantics.c (finish_expr_stmt): Likewise.
2838 (finish_switch_cond): Use perform_integral_promotions.
2839 * typeck.c (default_conversion): Likewise.
2840 (perform_integral_promotions): New function.
2841 (build_indirect_ref): Use decay_conversion.
2842 (build_array_ref): Use perform_integral_promotions.
2843 (convert_arguments): Use decay_conversion.
2844 (build_unary_op): Use perform_integral_promotions.
2845 (build_c_cast): Use decay_conversion.
2846 (build_modify_expr): Likewise.
2847 (convert_for_initialization): Likewise.
2848 * typeck2.c (build_x_arrow): Likewise.
2849
2850 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
2851
2852 * call.c: Fix comment typos.
2853 * class.c: Likewise.
2854 * cp-tree.h: Likewise.
2855 * cvt.c: Likewise.
2856 * decl2.c: Likewise.
2857 * decl.c: Likewise.
2858 * init.c: Likewise.
2859 * mangle.c: Likewise.
2860 * parser.c: Likewise.
2861 * pt.c: Likewise.
2862 * search.c: Likewise.
2863 * semantics.c: Likewise.
2864 * tree.c: Likewise.
2865 * typeck.c: Likewise.
2866
2867 2003-07-04 Zack Weinberg <zack@codesourcery.com>
2868
2869 * parser.c (cp_lexer_read_token): No need to handle string
2870 constant concatenation.
2871
2872 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2873
2874 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2875 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2876 ATTRIBUTE_GCC_CXXDIAG.
2877
2878 2003-07-03 Mark Mitchell <mark@codesourcery.com>
2879
2880 * call.c (build_addr_func): Handle bound pointers-to-members.
2881 (build_method_call): Do not call resolve_offset_ref.
2882 (implicit_conversion): Likewise.
2883 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2884 resolve_offset_ref.
2885 (resolve_args): Do not call resolve_offset_ref.
2886 (build_conditional_expr): Likewise.
2887 (build_new_method_call): Likewise.
2888 * cp-tree.def (OFFSET_REF): Update documentation.
2889 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2890 pointers to members to pointers.
2891 (ocp_convert): Do not call resolve_offset_ref.
2892 (convert_to_void): Likewise.
2893 (build_expr_type_conversion): Likewise.
2894 * decl2.c (delete_sanity): Likewise.
2895 * init.c (resolve_offset_ref): Simplify greatly.
2896 (build_vec_delete): Do not call resolve_offset_ref.
2897 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2898 if appropriate.
2899 (cp_parser_unary_expression): Use
2900 cp_parser_simple_cast_expression.
2901 (cp_parser_delete_expression): Likewise.
2902 (cp_parser_cast_expression): Likewise.
2903 (cp_parser_pm_expression): Use cp_parser_binary_op.
2904 (cp_parser_simple_cast_expression): New function.
2905 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2906 * semantics.c (finish_increment_expr): Likewise.
2907 (finish_typeof): Likewise.
2908 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2909 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2910 (decay_conversion): Do not call resolve_offset_ref.
2911 (finish_class_member_access_expr): Likewise.
2912 (convert_arguments): Likewise.
2913 (build_x_binary_op): Handle DOTSTAR_EXPR.
2914 (condition_conversion): Do not call resolve_offset_ref.
2915 (unary_complex_lvalue): Likewise.
2916 (build_static_cast): Likewise.
2917 (build_reinterpret_cast): Likewise.
2918 (build_const_cast): Likewise.
2919 (build_c_cast): Likewise.
2920 (build_modify_expr): Likewise.
2921 (convert_for_assignment): Likewise.
2922 (convert_for_initialization): Likewise.
2923 * typeck2.c (build_x_arrow): Likewise.
2924 (build_m_component_ref): Simplify.
2925
2926 * call.c (build_scoped_method_call): Use convert_to_void.
2927 (build_method_call): Likewise.
2928 * class.c (check_field_decls): Remove dead code.
2929 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2930 * decl2.c (grok_array_decl): Remove dead code.
2931 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2932 as pointer-to-member representation.
2933 * init.c (build_offset_ref): Tidy.
2934 (build_vec_delete_1): Use convert_to_void.
2935 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2936 as pointer-to-member representation.
2937
2938 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
2939
2940 PR c++/9162
2941 * decl.c (grokdeclarator): Return friend decls, not
2942 void_type_node.
2943 * decl2.c (grokfield): Alter friend decl check.
2944 * parser.c (struct cp_parser): Document default_arg chain on
2945 unparsed_functions_queue.
2946 (cp_parser_save_default_args): New.
2947 (cp_parser_init_declarator, cp_parser_function_definition,
2948 cp_parser_member_declaration): Call it.
2949 (cp_parser_class_specifier): Remove unused variable. Alter
2950 processing of unparsed_functions_queue.
2951
2952 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2953
2954 * class.c (add_method, check_field_decl): Fix format specifier.
2955 * decl.c (duplicate_decls, pushdecl, check_goto,
2956 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2957 start_enum): Likewise.
2958 * decl2.c (ambiguous_decl): Likewise.
2959 * pt.c (redeclare_class_template): Likewise.
2960
2961 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
2962
2963 PR c++/10219
2964 * pt.c (type_unification_real): Don't unify exprs of error type.
2965 * tree.c (error_type): Don't die on error_type.
2966
2967 PR c++/9779
2968 * decl2.c (arg_assoc_class): Don't die on NULL type.
2969 * typeck.c (type_unknown_p): Don't die on untyped expressions.
2970
2971 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2972
2973 PR c++/6949
2974 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2975 classes.
2976
2977 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2978
2979 * error.c (locate_error): %P takes an `int', not a `tree'.
2980
2981 2003-07-02 Jan Hubicka <jh@suse.cz>
2982
2983 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2984 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2985 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2986 massaging.
2987
2988 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2989 (expand_or_defer_fn): Declare.
2990 (lower_function): Declare.
2991 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2992 * decl2.c: Include cgraph.h and varpool.h
2993 (maybe_emit_vtables): Make explicit instantations as needed.
2994 (mark_member_pointers, lower_function): New functions.
2995 (finish_file): Do unit-at-a-time.
2996 * method.c (synthesize_method): Use expand_or_defer_fn.
2997 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2998 * parser.c (cp_parser_function_definition_after_decl): Use
2999 expand_or_defer_fn.
3000 * pt.c (instantiate_decl): Likewise.
3001 * semantics.c: Include cgraph.h
3002 (expand_or_defer_fn): Break out from ...
3003 (expand_body): ... here; deal with unit-at-a-time.
3004 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3005 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3006
3007 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3008
3009 * call.c (resolve_scoped_fn_name): Return error_mark_node for
3010 erroneous cases.
3011
3012 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3013
3014 PR c++/11149
3015 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3016 is a class type.
3017
3018 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
3019
3020 PR c++/8046
3021 * error.c (dump_decl): Handle BIT_NOT_EXPR as
3022 pseudo destructor calls.
3023
3024 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3025
3026 * cp-tree.h (define_label): Replace filename and lineno
3027 arguments with a location_t.
3028 * decl.c (pop_label): Adjust define_label call.
3029 (define_label): Replace filename and lineno arguments with a
3030 location_t.
3031 * semantics.c (finish_label): Adjust define_label call.
3032
3033 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3034
3035 PR c++/9559
3036 * decl2.c (grokfield): Do not build NOP_EXPRs around the
3037 error_mark_node.
3038
3039 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
3040
3041 * Make-lang.in: Update.
3042 * cp-lang.c (c_language): Define.
3043 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3044 * cp-tree.h (cxx_init_options): Remove.
3045 * lex.c: Don't include diagnostic.h.
3046 (cxx_init_options): Remove.
3047
3048 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3049
3050 PR c++/4933
3051 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3052 tree generated within a template. Use dump_expr to dump an
3053 expression sizeof.
3054
3055 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3056
3057 * mangle.c (write_expression): Exit gracefully when trying to
3058 mangle a CALL_EXPR.
3059
3060 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3061
3062 PR c++/10750
3063 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3064 (value- or type-) dependent expression as DECL_INITIAL is a
3065 valid constant-expression (at parser time).
3066
3067 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3068
3069 PR c++/11106
3070 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3071 USING_DECL, instead of print_tree_identifier.
3072
3073 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3074
3075 * cp-tree.h (language_to_string): Adjust declaration.
3076 * dump.c (cp_dump_tree): Adjust usage.
3077 * error.c (dump_char): Use output_formatted_scalar. Tidy.
3078 (parm_to_string): Lose unused parameter. Tidy.
3079 (expr_to_string): Likewise.
3080 (code_to_string): Likewise.
3081 (language_to_string): Likewise.
3082 (op_to_string): Likewise.
3083 (assop_to_string): Likewise.
3084 (digit_buffer): Remove.
3085 (dump_type): Format builtin vector type as __vector__.
3086
3087 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3088
3089 * error.c (print_integer): Remove.
3090 (dump_type_suffix): Adjust.
3091 (dump_expr): Likewise.
3092
3093 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3094
3095 * error.c (print_instantiation_partial_context): Take a
3096 location_t.
3097 (print_instantiation_full_context): Adjust.
3098 (print_instantiation_context): Adjust.
3099
3100 * cp-tree.h (cp_line_of, cp_file_of): Remove.
3101 * error.c (cp_line_of, cp_file_of): Merge into ...
3102 (location_of): ... here. Make static, return a location_t.
3103 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3104
3105 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3106
3107 PR c++/10784
3108 * call.c (joust): Move warn_conversion check outwards.
3109
3110 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3111
3112 * decl.c (build_typename_type)
3113 * mangle.c (write_template_template_arg)
3114 * parser.c (cp_parser_scope_through_which_access_occurs)
3115 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3116 * repo.c (get_base_filename)
3117 * semantics.c (maybe_convert_cond):
3118 Mark the definition static, matching the forward declaration.
3119
3120 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3121
3122 PR c++/10468
3123 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3124
3125 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3126
3127 PR c++/10796
3128 * decl.c (finish_enum): Implement DR377.
3129
3130 * decl.c (cp_finish_decl): Don't make variables with reference
3131 type readonly while they are being initialized.
3132
3133 2003-06-26 Mark Mitchell <mark@codesourcery.com>
3134
3135 PR c++/11332
3136 * typeck.c (build_static_cast): Avoid returning expressions with
3137 reference type.
3138
3139 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
3140
3141 * call.c (build_op_delete_call): Use strip_array_call. Correct
3142 error message to say 'delete' or 'delete[]'.
3143
3144 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
3145
3146 PR c++/8266
3147 * pt.c (check_explicit_specialization): When looking up a
3148 template function from an identifier outside class-scope, bind
3149 it to CP_DECL_CONTEXT.
3150
3151 2003-06-25 Mark Mitchell <mark@codesourcery.com>
3152
3153 PR c++/10990
3154 * search.c (lookup_base_r): Rely on accessible_p, rather than
3155 trying to emulate that logic here.
3156
3157 PR c++/10931
3158 * call.c (convert_like): Pass issue_conversion_warnings.
3159 (convert_like_with_context): Likewise.
3160 (convert_like_real): Add issue_conversion_warnings parameter.
3161 (perform_direct_initialization_if_possible): New function.
3162 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3163 * typeck.c (check_for_casting_away_constness): New function.
3164 (build_static_cast): Rewrite.
3165
3166 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
3167
3168 * call.c (enforce_access): Assert we get a binfo.
3169 (build_op_delete_call): Pass a binfo to
3170 perform_or_defer_access_check.
3171 * class.c (alter_access): Likewise.
3172 * decl.c (make_typename_type): Likewise.
3173 (make_unbound_class_template): Likewise.
3174 * lex.c (do_identifier): Likewise.
3175 * method.c (hack_identifier): Likewise.
3176 * parser.c (cp_parser_lookup_name): Likewise.
3177 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3178 test.
3179 * semantics.c (finish_non_static_data_member): Likewise.
3180 (perform_or_defer_access_check): Expect a binfo.
3181 * typeck.c (comptypes): Expect types.
3182
3183 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3184 * friend.c (make_friend_class): Likewise.
3185 * pt.c (check_default_tmpl_args): Likewise.
3186 (lookup_template_class): Likewise.
3187
3188 2003-06-24 Jan Hubicka <jh@suse.cz>
3189
3190 * method.c (thunk_labelno): Move outside ifdef block to make garbage
3191 collector happy.
3192
3193 2003-06-24 Jan Hubicka <jh@suse.cz>
3194
3195 * class.c (build_vtable): Make vtables.
3196 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3197 * decl2.c (output_vtable_inherit): Rename to ...
3198 (prepare_assemble_variable): ... this one; change interface.
3199 (maybe_emit_vtables): Do not call output_vtable_inherit.
3200 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3201 * cp-tree.h (prepare_assemble_variable): New.
3202
3203 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
3204
3205 * method.c: add prototype for make_alias_for_thunk.
3206 (thunk_labelno, make_alias_for_thunk): only define
3207 if ASM_OUTPUT_DEF is defined.
3208
3209 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3210
3211 * method.c (thunk_labelno): New variable.
3212 (make_alias_for_thunk): New function.
3213 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
3214 into the same section as the function it is calling.
3215 Include gt-cp-method.h.
3216 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3217 (cp/method.o): Depend on gt-cp-method.h.
3218 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3219
3220 2003-06-23 Jan Hubicka <jh@suse.cz>
3221
3222 * decl.c (register_dtor_fn): Mark cleanup as used.
3223 * decl2.c (mark_vtable_entries): Skip nops.
3224 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3225 (build_dynamic_cast_1): Likewise.
3226 (tinfo_base_init): Likewise.
3227 (emit_tinfo_decl): Likewise.
3228
3229 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3230
3231 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3232 to it.
3233
3234 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3235
3236 PR c++/10784
3237 * call.c (joust): Warn about choosing conversion sequence only if
3238 -Wconversion.
3239
3240 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3241
3242 PR c++/10864
3243 * call.c (op_error): Tidy.
3244 * error.c (dump_expr): Properly format 'T()' when T is an
3245 aggregate type.
3246
3247 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3248
3249 PR c++/10915
3250 * decl.c (grok_op_properties): Warn possible confusing conversion
3251 only if -Wconversion.
3252
3253 2003-06-20 Mark Mitchell <mark@codesourcery.com>
3254
3255 PR c++/10749
3256 * parser.c (cp_parser_class_head): See through dependent names
3257 when parsing a class-head.
3258
3259 PR c++/10845
3260 * pt.c (try_class_unification): Correct handling of member class
3261 templates.
3262
3263 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3264
3265 * semantics.c (genrtl_finish_function): Adjust
3266 expand_function_end call.
3267
3268 2003-06-19 Mark Mitchell <mark@codesourcery.com>
3269
3270 PR c++/10939
3271 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3272 functions.
3273 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3274
3275 PR c++/9649
3276 * cp-tree.h (pushdecl_class_level): Change prototype.
3277 (push_class_level_binding): Likewise.
3278 * decl.c (add_binding): Reject duplicate static data members.
3279 (pushdecl_class_level): Return a value indicating whether or not
3280 the binding was valid.
3281 (push_class_level_binding): Likewise.
3282 * semantics.c (finish_member_declaration): Don't keep invalid
3283 declarations.
3284
3285 PR c++/11041
3286 * call.c (initialize_reference): Do not use cp_finish_decl to emit
3287 temporary variables.
3288 * cp-tree.h (static_aggregates): Declare.
3289 (pushdecl_top_level_and_finish): Likewise.
3290 * decl.c (pushdecl_top_level_1): New function.
3291 (pushdecl_top_level): Use it.
3292 (pushdecl_top_level_and_finish): New function.
3293 (initialize_local_var): Remove redundant code.
3294 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
3295 building_stmt_tree.
3296 * decl.h (static_aggregates): Remove.
3297 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3298 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3299 (tinfo_base_init): Likewise.
3300
3301 2003-06-19 Matt Austern <austern@apple.com>
3302
3303 PR c++/11228
3304 * init.c (build_zero_init): Assert that number of array elements
3305 is an integer constant.
3306 (build_default_init) Don't use build_zero_init for arrays with
3307 variable number of elements.
3308
3309 2003-06-19 Andreas Jaeger <aj@suse.de>
3310
3311 * cp-tree.h: Remove duplicated declarations.
3312
3313 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
3314
3315 * pt.c: Convert to ISO C.
3316 * semantics.c: Convert to ISO C.
3317
3318 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3319
3320 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3321 at_least_as_qualified_p, more_qualified_p): Return bool.
3322 * typeck.c: ANSIFY function definitions.
3323 (comp_array_types): Take redeclaration bool parameter.
3324 (comptypes): Rearrange STRICT handling.
3325 (at_least_as_qualified_p, more_qualified_p,
3326 comp_cv_qualification): Cache cv quals.
3327 (compparms): Rearrange loop.
3328
3329 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3330
3331 * cp-tree.h (COMPARE_RELAXED): Rename to ...
3332 (COMPARE_DERIVED): ... here. Adjust comment.
3333 (resolve_typename_type_in_current_instantiation): Remove.
3334 (cp_tree_equal, comptypes): Return a bool.
3335 * cvt.c (convert_to_reference): Adjust comptypes call.
3336 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3337 (resolve_typename_type_in_current_instantiation): Remove.
3338 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3339 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3340 calls. Refactor code.
3341 * typeck.c (comp_array_types): Return bool. Lose callback.
3342 parameter. Adjust cp_tree_equal calls.
3343 (comptypes): Return bool. Adjust strict handling. Remove relaxed
3344 enumeration and java type handling. Deal with typename types here.
3345 Adjust recursive and cp_tree_equals calls. Adjust base and derived
3346 checking.
3347 (comp_target_types): Remove unreachable code. Adjust
3348 same_or_base_type_p calls.
3349 (ptr_reasonably_similar): Adjust base and derived check.
3350
3351 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3352 unused calculation.
3353 (check_return_expr): Adjust error messages.
3354 * cp-tree.def (SCOPE_REF): Correct comment.
3355
3356 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3357
3358 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3359 string again.
3360
3361 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3362
3363 * optimize.c (dump_function): Form complete flag name by
3364 prefixing 'fdump-' to string returned by dump_flag_name().
3365
3366 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3367
3368 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3369 string.
3370
3371 2003-06-17 Jason Merrill <jason@redhat.com>
3372
3373 PR c++/10929
3374 * decl.c (grokfndecl): Don't mark a function inline for
3375 -finline-functions if it isn't defined.
3376
3377 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3378
3379 PR c++/10712
3380 * class.c (handle_using_decl): Robustify.
3381
3382 PR c++/11105
3383 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3384 * mangle.c (struct globals): Remove internal_mangling_p.
3385 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3386 (write_template_parm): Don't write out the level number.
3387 (conv_type_names): New variable.
3388 (hash_type): New function.
3389 (compare_type): Likewise.
3390 (mangle_conv_op_name_for_type): Don't try to mangle conversion
3391 operator names.
3392 * search.c (lookup_conversion_operator): New function.
3393 (lookup_fnfields_1): Use it.
3394
3395 2003-06-17 Andreas Jaeger <aj@suse.de>
3396
3397 * except.c: Remove duplicate declaration of push_eh_cleanup.
3398
3399 * call.c: Remove extra declaration of inhibit_warnings.
3400
3401 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3402
3403 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
3404 * mangle.c: Convert to ISO C.
3405
3406 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3407
3408 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3409 macro.
3410
3411 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3412
3413 * tree.c: Convert to ISO C.
3414
3415 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
3416
3417 * cp-tree.h: Follow spelling conventions.
3418 * mangle.c: Likewise.
3419 * method.c: Likewise.
3420 * parser.c: Likewise.
3421
3422 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3423
3424 * decl.c (start_function): Adjust init_function_start call.
3425 * method.c (use_thunk): Likewise.
3426 * semantics.c (genrtl_start_function): Likewise.
3427
3428 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3429
3430 * Make-lang.in: Remove c-options.o.
3431
3432 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
3433
3434 * lex.c: Convert to ISO C.
3435
3436 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
3437 * init.c: removes use of PARAMS macro. Use ISO style function
3438 declarations. (Not copyright-significant change.)
3439
3440 * rtti.c: Remove PARAMS.
3441
3442 * typeck2.c: Convert to ISO C.
3443
3444 2003-06-12 Mark Mitchell <mark@codesourcery.com>
3445
3446 PR c++/10635
3447 * typeck.c (build_c_cast): Check that the destination type is
3448 complete.
3449
3450 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3451
3452 PR c++/10432
3453 * cp-tree.h (finish_declarator): Remove.
3454 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3455 erroneous declarations.
3456 * semantics.c (finish_declarator): Remove.
3457
3458 2003-06-11 Roger Sayle <roger@eyesopen.com>
3459
3460 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3461 global static constructor/destructor if it will be empty, i.e.
3462 either doesn't call any ctors/dtors or only calls pure or const
3463 ctors/dtors.
3464
3465 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3466
3467 * mangle.c (tm_p.h): Include it.
3468 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3469
3470 PR c++/11131
3471 * tree.c (cp_cannot_inline_fn): Check for "inline" before
3472 instantiation.
3473
3474 2003-06-10 Jason Merrill <jason@redhat.com>
3475
3476 PR c++/10968
3477 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3478
3479 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
3480
3481 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3482 (start_cleanup_cnt): New.
3483
3484 2003-06-10 Mark Mitchell <mark@codesourcery.com>
3485
3486 PR c++/11131
3487 * cp-tree.h (template_for_substitution): Declare.
3488 * decl2.c (mark_used): Use it when figuring out whether or not a
3489 function is inline.
3490 * pt.c (template_for_substitution): Give it external linkage.
3491 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3492 possible.
3493
3494 2003-06-09 Zack Weinberg <zack@codesourcery.com>
3495
3496 PR 8861
3497 * mangle.c (write_real_cst): New function. Implement
3498 ABI-compliant mangling of floating-point literals when
3499 -fabi-version>=2; provide backward compatibility with 3.3 when
3500 -fabi-version=1 (with warning). Clarify commentary.
3501 (write_template_arg_literal): Use write_real_cst.
3502
3503 2003-06-07 Andreas Jaeger <aj@suse.de>
3504
3505 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3506
3507 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3508
3509 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3510 (LANG_HOOKS_HANDLE_OPTION): Override.
3511 * cp-tree.h (cxx_init_options): Update.
3512 * lex.c (cxx_init_options): Update.
3513
3514 2003-06-05 Jan Hubicka <jh@suse.cz>
3515
3516 * Make-lang.in: Add support for stageprofile and stagefeedback
3517
3518 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
3519
3520 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3521
3522 2003-06-04 Andreas Jaeger <aj@suse.de>
3523
3524 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3525
3526 2003-06-03 Jason Merrill <jason@redhat.com>
3527
3528 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3529
3530 * cp/decl.c (reshape_init): Handle vectors.
3531
3532 * testsuite/g++.dg/init/array10.C: New.
3533
3534 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3535
3536 PR c++/10940
3537 * pt.c (check_explicit_specialization): Check for 'static'
3538 earlier.
3539
3540 2003-05-31 Diego Novillo <dnovillo@redhat.com>
3541
3542 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3543 the operand of a CONSTRUCTOR node.
3544
3545 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3546
3547 * decl.c (cp_binding_level::this_entity): Rename from this_class.
3548 (cxx_scope_descriptor): New function.
3549 (cxx_scope_debug): Likewise.
3550 (push_binding_level): Use it.
3551 (pop_binding_level): Likewise.
3552 (suspend_binding_level): Likewise.
3553 (resume_binding_level): Likewise.
3554 (pushlevel_class): Adjust use of this_class.
3555 (pushtag): Likewise.
3556 (lookup_name_real): Likewise.
3557 (global_scope_name): New variable.
3558 (initialize_predefined_identifiers): Initialize it.
3559 (push_namespace): Use it.
3560 (make_cxx_scope): New function.
3561 (pushlevel): Use it.
3562 (pushlevel_class): Likewise.
3563 (push_binding_level): Simplify. Loose the last two arguments.
3564 (make_binding_level): Remove.
3565 (initial_push__namespace_scope): New function.
3566 (push_namespace): Use it. Simplify.
3567 (cxx_init_decl_processing): Likewise.
3568 (declare_namespace_level): Remove.
3569
3570 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3571
3572 PR c++/10956
3573 * pt.c (instantiate_decl): Don't use full template arguments if
3574 we are dealing with specializations.
3575
3576 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3577
3578 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3579 (binding_depth): Unconditionally define.
3580 (is_class_level): Likewise.
3581 (indent): Likewise. Take an indenting parameter.
3582 (push_binding_level): Remove conditional definittion.
3583 (pop_binding_level): Likewise.
3584 (suspend_binding_level): Likewise.
3585 (resume_binding_level): Likewise.
3586 (pushlevel): Likewise.
3587 (pushlevel_class): Likewise.
3588 (poplevel_class): Likewise.
3589 (pop_everything): Likewise.
3590
3591 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3592
3593 * name-lookup.h (global_scope_p): New macro.
3594 * decl.c (pop_binding_level): Use it. Don't refer directly to
3595 global_binding_level.
3596 (suspend_binding_level): Likewise.
3597 (global_bindings_p): Likewise.
3598 (print_other_binding_stack): Likewise.
3599 (print_binding_stack): Likewise.
3600 (maybe_push_to_top_level): Likewise.
3601 (pushdecl_namespace_level): Likewise.
3602 (cxx_init_decl_processing): Likewise.
3603 (start_decl): Likewise.
3604 (cp_finish_decl): Likewise.
3605 (start_function): Likewise.
3606 (global_binding_level): Remove.
3607
3608 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3609
3610 * parser.c (cp_parser_explicit_instantiation): Restore old
3611 access before template instantiation.
3612
3613 2003-05-23 Geoffrey Keating <geoffk@apple.com>
3614
3615 * lang-specs.h: Use -o to specify preprocessor's output file.
3616 Make -no-integrated-cpp work when building PCH files.
3617
3618 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3619
3620 PR c++/10682
3621 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3622 check for implicitly created typedef to an enum.
3623
3624 2003-05-21 Jason Merrill <jason@redhat.com>
3625
3626 * init.c (build_vec_delete): Copy the address into a temporary
3627 variable before calling build_vec_delete_1.
3628 * decl2.c (delete_sanity): Don't call stabilize_reference.
3629
3630 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
3631
3632 * pt.c (register_specialization): Update the decl's location,
3633 if necessary.
3634 (check_explicit_specialization): Likewise.
3635
3636 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3637
3638 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3639
3640 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
3641
3642 PR c++/9738
3643 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3644 if the old decl had instantiated DECL_RTL.
3645 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3646
3647 2003-05-19 Matt Austern <austern@apple.com>
3648
3649 * lang-options.h: Document -Wno-invalid-offsetof
3650 * typeck.c (build_class_member_access_expr): Don't complain about
3651 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3652
3653 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3654
3655 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3656 (binding_entry_make): Make entry->chain NULL after getting an entry.
3657 fix the spelling of chain in a comment.
3658 (binding_table_free): speed up by having temporary variable.
3659 (binding_table_new): set table->chain to be NULL after allocating
3660 a table.
3661 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3662 binding->previous to NULL after getting an binding for speed.
3663
3664 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3665
3666 * cp-tree.h (struct lang_type_class): Replace data member tags
3667 with hash-table nested_udts.
3668 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3669 * class.c (unreverse_member_declarations): Don't touch
3670 CLASSTYPE_TAGS.
3671 (pushclass): Use cxx_remember_type_decls.
3672 * decl.c (struct cp_binding_level): Replace data member tags with
3673 hash-table type_decls.
3674 (pop_binding_level): Handle level->type_decls.
3675 (kept_level_p): Adjust.
3676 (poplevel): Remove unused local variable.
3677 (bt_print_entry): New function.
3678 (print_binding_level): Use it.
3679 (push_namespace): Build current_binding_level->type_decls.
3680 (maybe_process_template_type_declaration): Adjust.
3681 (pushtag): Likewise.
3682 (clear_anon_tags): Use binding_table_remove_anonymous_types.
3683 (gettags): Remove.
3684 (cxx_remember_type_decls): Rename from storetags. Adjust.
3685 (lookup_tag): Use binding_table_find_anon_type. Tidy.
3686 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3687 (cxx_init_decl_processing): Build global_binding_level->type_decls.
3688 (store_parm_decls): Remove pointless code.
3689 * name-lookup.c (free_binding_entry): New variable.
3690 (ENTRY_INDEX): New macro.
3691 (struct binding_table_s): New datatype.
3692 (binding_entry_make): New function.
3693 (binding_entry_free): Likewise.
3694 (binding_table_construct): Likewise.
3695 (binding_table_free): Likewise.
3696 (binding_table_new): Likewise.
3697 (binding_table_expand): Likewise.
3698 (binding_table_insert): Likewise.
3699 (binding_table_find): Likewise.
3700 (binding_table_find_anon_type): Likewise.
3701 (binding_table_reverse_maybe_remap): Likewise.
3702 (binding_table_remove_anonymous_types): Likewise.
3703 (binding_table_foreach): Likewise.
3704 * name-lookup.h (binding_table): New type.
3705 (binding_entry): Likewise.
3706 (bt_foreach_proc): Likewise.
3707 (struct binding_entry_s): New datatype.
3708 (SCOPE_DEFAULT_HT_SIZE): New macro.
3709 (CLASS_SCOPE_HT_SIZE): Likewise.
3710 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3711 (NAMESPACE_STD_HT_SIZE): Likewise.
3712 (GLOBAL_SCOPE_HT_SIZE): Likewise.
3713 (binding_table_new): Declare.
3714 (binding_table_free): Likewise.
3715 (binding_table_insert): Likewise.
3716 (binding_table_find_anon_type): Likewise.
3717 (binding_table_reverse_maybe_remap): Likewise.
3718 (binding_table_remove_anonymous_types): Likewise.
3719 (binding_table_foreach): Likewise.
3720 (binding_table_find): Likewise.
3721 (cxx_remember_type_decls): Likewise.
3722 * pt.c (bt_instantiate_type_proc): New function.
3723 (do_type_instantiation): Use it.
3724 * search.c (lookup_field_r): Use binding_table_find.
3725
3726 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3727
3728 * semantics.c (perform_deferred_access_checks): Don't discard
3729 checked access.
3730
3731 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3732
3733 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3734 libiberty VA_ macros, always use stdarg.
3735 * rtti.c (create_pseudo_type_info): Likewise.
3736 * tree.c (build_min_nt, build_min): Likewise.
3737
3738 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3739
3740 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3741 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3742 collapse multiple function calls into one.
3743 * tree.c (debug_binfo): Likewise.
3744
3745 2003-05-15 Jason Merrill <jason@redhat.com>
3746
3747 PR c++/5388
3748 * call.c (conditional_conversion): Don't consider implicit
3749 conversions if T2 is a base of T1.
3750 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3751 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3752
3753 * parser.c (cp_parser_primary_expression): Convert a static data
3754 member from reference.
3755
3756 2003-05-15 Mark Mitchell <mark@codesourcery.com>
3757
3758 * call.c (build_op_delete_call): Avoid creating unnecessary types.
3759 * class.c (instantiate_type): Remove tests for tf_no_attributes.
3760 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3761 (COMPARE_NO_ATTRIBUTES): Remove.
3762 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3763
3764 PR c++/8385
3765 * semantics.c (finish_typeof): Refine type-dependency check.
3766
3767 2003-05-13 Jason Merrill <jason@redhat.com>
3768
3769 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3770 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3771
3772 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3773
3774 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3775
3776 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3777
3778 PR c++/10230, c++/10481
3779 * semantics.c (finish_non_static_data_member): Handle when the
3780 non-static member is not from a base of the current class type.
3781
3782 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3783
3784 PR c++/10552
3785 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3786 template and has dependent context.
3787
3788 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3789
3790 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3791
3792 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3793
3794 PR c++/9252
3795 * cp-tree.h (saved_scope): Remove check_access field.
3796 (tsubst_flags_t): Remove tf_parsing.
3797 * decl.c (maybe_push_to_top_level): Don't initialize
3798 scope_chain->check_access.
3799 (make_typename_type, make_unbound_class_template): Don't use
3800 tf_parsing.
3801 (register_dtor_fn): Use push/pop_deferring_access_checks
3802 instead of scope_chain->check_access.
3803 * method.c (use_thunk): Likewise.
3804 * parser.c (cp_parser_explicit_instantiation
3805 (cp_parser_constructor_declarator_p): Don't call
3806 push/pop_deferring_access_checks here.
3807 (cp_parser_template_argument, cp_parser_class_name): Don't use
3808 tf_parsing.
3809 (yyparse): Check flag_access_control.
3810 * pt.c (instantiate_class_template): Call
3811 push/pop_deferring_access_checks.
3812 * semantics.c (push_deferring_access_checks): Propagate
3813 dk_no_check.
3814 (perform_or_defer_access_check): Make sure basetype_path is
3815 a type before comparison.
3816 * call.c (build_op_delete_call, build_over_call): Use
3817 perform_or_defer_access_check.
3818 * class.c (alter_access): Likewise.
3819 * init.c (build_offset_ref): Likewise.
3820 * lex.c (do_identifier): Likewise.
3821 * method.c (hack_identifier): Likewise.
3822 * search.c (lookup_member): Likewise.
3823 * semantics.c (finish_non_static_data_member): Likewise.
3824 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3825 instead of flag_access_control.
3826
3827 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3828
3829 PR c++/9554
3830 * parser.c (cp_parser_class_name): Remove check_access parameter.
3831 All caller adjusted. Update declaration.
3832 (cp_parser_lookup_name): Likewise.
3833 * semantics.c (push_deferring_access_checks): Change parameter type
3834 to enum deferring_kind. All caller adjusted.
3835 (resume_deferring_access_checks): Adjust to use new enum.
3836 (stop_deferring_access_checks): Likewise.
3837 (perform_or_defer_access_check): Likewise.
3838 * cp-tree.h (deferring_kind): New enum.
3839 (deferred_access): Adjust field type.
3840 (push_deferring_access_checks): Update declaration.
3841
3842 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3843
3844 PR c++/10555, c++/10576
3845 * pt.c (lookup_template_class): Handle class template with
3846 multiple levels of parameters when one of the levels contain
3847 errors.
3848
3849 2003-05-08 Jason Merrill <jason@redhat.com>
3850
3851 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3852 expression. Undo some of the recent reorg.
3853
3854 2003-05-07 Richard Henderson <rth@redhat.com>
3855
3856 PR c++/10570
3857 * cfns.gperf: Comment out POSIX thread cancellation points,
3858 plus abort and raise.
3859 * cfns.h: Regenerate.
3860
3861 2003-05-07 Jason Merrill <jason@redhat.com>
3862
3863 * call.c (build_conditional_expr): Don't assume that the folded
3864 expression has result_type.
3865
3866 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3867
3868 * typeck.c (build_unary_op): Deal with const qualifier in
3869 invalid pointer-to-member earlier.
3870
3871 2003-05-05 Jason Merrill <jason@redhat.com>
3872
3873 PR c++/9537
3874 * call.c (conditional_conversion): Build an RVALUE_CONV if
3875 we're just changing the cv-quals.
3876 (build_conditional_expr): Don't call convert to change
3877 cv-quals.
3878
3879 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3880
3881 PR c++/10496
3882 * typeck.c (build_unary_op): Don't output const qualifier when
3883 output invalid pointer-to-member diagnostics.
3884
3885 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3886
3887 * decl.c: Fix typos.
3888
3889 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3890
3891 PR c++/4494
3892 * decl.c (start_function): Use same_type_p to check return type
3893 of main.
3894
3895 2003-05-03 Zack Weinberg <zack@codesourcery.com>
3896
3897 PR c/10604
3898 * cp/typeck.c (build_x_compound_expr): No need to check
3899 extra_warnings as well as warn_unused_value.
3900
3901 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3902
3903 PR c++/9364, c++/10553, c++/10586
3904 * decl.c (make_typename_type): Don't crash on illegal code.
3905
3906 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
3907
3908 * class.c (finish_struct): Use location_t and input_location
3909 directly.
3910 * decl.c (make_label_decl): Likewise.
3911 (use_label): Likewise.
3912 * decl2.c (warn_if_unknown_interface): Likewise.
3913 (start_static_initialization_or_destruction): Likewise.
3914 (generate_ctor_or_dtor_function): Likewise.
3915 (finish_file): Likewise.
3916 * error.c (print_instantiation_full_context): Likewise.
3917 * init.c (create_temporary_var): Likewise.
3918 * method.c (synthesize_method): Likewise.
3919 * parser.c (cp_token): Likewise.
3920 (cp_lexer_set_source_position_from_token): Likewise.
3921 (cp_lexer_get_preprocessor_token): Likewise.
3922 (cp_parser_statement): Likewise.
3923 * pt.c (tsubst_friend_function): Likewise.
3924 (instantiate_class_template): Likewise.
3925 (tsubst_decl): Likewise.
3926 (tsubst): Likewise.
3927 (instantiate_decl): Likewise.
3928 * semantics.c (begin_class_definition): Likewise.
3929 (expand_body): Likewise.
3930
3931 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
3932
3933 * class.c (finish_struct): Rename lineno to input_line.
3934 * decl.c (push_binding_level, pop_binding_level,
3935 suspend_binding_level, resume_binding_level, make_label_decl,
3936 use_label, start_function): Likewise.
3937 * decl2.c (warn_if_unknown_interface,
3938 start_static_initialization_or_destruction,
3939 generate_ctor_or_dtor_function, finish_file): Likewise.
3940 * error.c (cp_line_of, print_instantiation_full_context,
3941 print_instantiation_context): Likewise.
3942 * except.c (check_handlers_1, check_handlers): Likewise.
3943 * init.c (create_temporary_var): Likewise.
3944 * method.c (use_thunk, synthesize_method): Likewise.
3945 * parser.c (cp_lexer_set_source_position_from_token,
3946 cp_lexer_get_preprocessor_token): Likewise.
3947 * pt.c (push_tinst_level, pop_tinst_level,
3948 tsubst_friend_function, instantiate_class_template, tsubst_decl,
3949 tsubst, tsubst_expr, instantiate_decl): Likewise.
3950 * semantics.c (genrtl_try_block, finish_label_stmt,
3951 begin_class_definition, expand_body,
3952 genrtl_finish_function): Likewise.
3953 * tree.c (build_min_nt, build_min): Likewise.
3954
3955 2003-05-01 Mark Mitchell <mark@codesourcery.com>
3956
3957 * decl2.c (comdat_linkage): Don't externalize explicit
3958 instantiations.
3959
3960 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3961
3962 PR c++/10554
3963 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3964 is not NULL.
3965
3966 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
3967
3968 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
3969 (struct lang_identifier): ... to here.
3970 (LANG_ID_FIELD): Remove.
3971 (SET_LANG_ID): Remove.
3972 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3973 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3974 (IDENTIFIER_IMPLICIT_DECL): Likewise.
3975 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3976 (IDENTIFIER_ERROR_LOCUS): Likewise.
3977 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3978
3979 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3980
3981 PR c++/8772
3982 * pt.c (convert_template_argument): Correct diagnostic.
3983
3984 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3985
3986 PR c++/9432, c++/9528
3987 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3988
3989 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
3990
3991 * decl.c (check_previous_goto_1): Adjust prototype.
3992 (check_previous_goto): Adjust use.
3993 (check_switch_goto): Likewise.
3994 (use_label): Adjust.
3995 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3996 (struct named_label_use_list): Use location_t datatype.
3997
3998 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3999
4000 PR c++/10551
4001 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4002 that have not yet been written out.
4003
4004 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4005
4006 PR c++/10549
4007 * class.c (layout_class_type): Mark overlong bitfields as having
4008 the maximum size permitted by their type, after layout.
4009
4010 PR c++/10527
4011 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4012
4013 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4014
4015 * call.c (build_operator_new_call): Fix typo.
4016 * lang-options.h: Likewise.
4017
4018 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4019
4020 PR c++/10515
4021 * cp-tree.h (lookup_field_1): Declare it.
4022 * search.c (lookup_field_1): Make it public.
4023 * decl.c (reshape_init): Handle designated initializers.
4024
4025 * decl.c (maybe_commonize_var): Further tweak support for systems
4026 without weak symbols.
4027
4028 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4029
4030 * decl.c (maybe_commonize_var): Fix thinko in last patch.
4031
4032 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4033
4034 PR c++/10506
4035 * method.c (use_thunk): Decrement immediate_size_expand.
4036
4037 PR c++/10503
4038 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4039 (DECL_MAYBE_TEMPLATE): Remove.
4040 * class.c (fixed_type_or_null): Avoid infinite recursion.
4041
4042 * decl.c (maybe_commonize_var): Make the code match the comments.
4043 * pt.c (instantiate_decl): Move call to import_export_decl.
4044
4045 2003-04-26 Mark Mitchell <mark@codesourcery.com>
4046
4047 * decl2.c (finish_file): Fix merge botch.
4048
4049 2003-04-25 Mark Mitchell <mark@codesourcery.com>
4050
4051 * decl2.c (finish_file): Don't call import_export_decl for
4052 functions that are not defined.
4053 (handle_class_head): Robustify.
4054 * pt.c (instantiate_decl): Do not call cp_finish_decl for
4055 variables that are not defined.
4056
4057 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
4058
4059 * call.c (print_z_candidates): Fix off by one error.
4060
4061 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
4062
4063 PR c++/10337
4064 * call.c (joust): Don't warn about conversion ops that are exact
4065 or cv-conversions. Rearrange to avoid multiple type comparisons.
4066
4067 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4068
4069 PR c++/10471
4070 * call.c (build_cxx_call): Robustify.
4071
4072 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
4073
4074 * Make-lang.in (lex.o): Remove mbchar.h.
4075 * lex.c (MULTIBYTE_CHARS): Lose.
4076 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4077 in c-lex.c.
4078
4079 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4080
4081 PR c++/9847
4082 * cp-tree.h (duplicate_tag_error): Remove.
4083 * class.c (duplicate_tag_error): Remove.
4084 * semantics.c (begin_class_definition): Return immediately for a
4085 duplicate class definition.
4086
4087 PR c++/10451
4088 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4089
4090 2003-04-22 Mark Mitchell <mark@codesourcery.com>
4091
4092 PR c++/10446
4093 * search.c (lookup_fnfields_1): Handle empty slots in the method
4094 vector.
4095
4096 PR c++/10428
4097 * decl.c (check_elaborated_type_specifier): New function, split
4098 out from ...
4099 (xref_tag): ... here. Use the new function in more places.
4100
4101 * rtti.c (throw_bad_typeid): Use build_cxx_call.
4102
4103 2003-04-21 Mark Mitchell <mark@codesourcery.com>
4104
4105 * call.c (build_over_call): Use build_cxx_call.
4106 (build_cxx_call): New method, split out of build_over_call.
4107 * cp-tree.h (language_function): Add can_throw.
4108 (build_cxx_call): Declare it.
4109 * decl.c (finish_function): If a function does not contain any
4110 calls to functions that can throw an exception, indicate that
4111 fact.
4112 * decl2.c (mark_used): Do not defer the instantiation of
4113 functions, if the current function does not throw.
4114 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4115 * pt.c (instantiate_decl): Make sure import_export_decl is called
4116 before emitting things.
4117 * rtti.c (throw_bad_cast): Use build_cxx_call.
4118 (build_dynamic_cast_1): Likewise.
4119 * typeck.c (build_function_call): Likewise.
4120
4121 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
4122
4123 PR c++/9881
4124 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4125 expressions. Reverts my 2002-08-08 patch.
4126
4127 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4128 cheaper early exit.
4129
4130 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4131
4132 * cp/decl2.c (start_static_storage_duration_function): Take count
4133 arg, don't check if it wraps round.
4134 (generate_ctor_or_dtor_function): Add locus arg, use it.
4135 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4136 locus.
4137 (finish_file): Set line numbers to past EOF for synthesized
4138 functions.
4139
4140 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4141
4142 PR c++/10405
4143 * search.c (lookup_field_1): Final scan goes backwards for
4144 types, forwards for non-types.
4145
4146 2003-04-17 Roger Sayle <roger@eyesopen.com>
4147
4148 PR c/10375
4149 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4150 "nothrow" function attributes.
4151
4152 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4153
4154 PR c++/10347
4155 * pt.c (type_dependent_expression_p): Handle array new.
4156
4157 2003-04-15 Mark Mitchell <mark@codesourcery.com>
4158
4159 PR c++/10381
4160 * parser.c (cp_parser_primary_expression): Reorganize logic for
4161 dealing with name lookup failures.
4162
4163 2003-04-15 Jason Merrill <jason@redhat.com>
4164
4165 * decl2.c (mark_used): Don't instantiate anything if
4166 skip_evaluation.
4167
4168 2003-04-14 Ziemowit Laski <zlaski@apple.com>
4169
4170 * tree.c (build_cplus_array_type_1): Do not call
4171 uses_template_parms() on a NULL index_type.
4172
4173 2003-04-13 Roger Sayle <roger@eyesopen.com>
4174
4175 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4176
4177 2003-04-12 Mark Mitchell <mark@codesourcery.com>
4178
4179 PR c++/10300
4180 * init.c (build_new_1): Reorganize.
4181
4182 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4183
4184 * class.c (initialize_array)
4185 * decl.c (reshape_init)
4186 * decl2.c (build_expr_from_tree)
4187 * init.c (build_zero_init)
4188 * pt.c (tsubst_copy, tsubst_copy_and_build)
4189 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4190 (ptm_initializer, class_initializer, get_pseudo_ti_init)
4191 * semantics.c (finish_compound_literal)
4192 * typeck.c (build_ptrmemfunc1)
4193 * typeck2.c (store_init_value, process_init_constructor)
4194 (build_functional_cast): Use build_constructor.
4195
4196 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4197
4198 * call.c (print_z_candidates): Use gcc_gettext_width, not
4199 strlen, to determine how much padding to use.
4200
4201 2003-04-10 Zack Weinberg <zack@codesourcery.com>
4202
4203 * decl.c: Update all calls to shadow_warning.
4204
4205 2003-04-10 Mark Mitchell <mark@codesourcery.com>
4206
4207 * class.c (layout_class_type): Correct handling for overlong
4208 bit-fields whose width is the same as an integer type.
4209
4210 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4211
4212 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4213 * cp-lang.c (cp_tree_size): New function.
4214 (LANG_HOOKS_TREE_SIZE): Override.
4215
4216 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4217 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4218 (union lang_tree_node): Remove common and srcloc members.
4219 (build_srcloc_here): Don't prototype.
4220 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4221 * pt.c (pending_templates): Correct comment.
4222 * tree.c (build_srcloc, build_srcloc_here): Kill.
4223
4224 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4225
4226 * call.c: Include intl.h.
4227 (print_z_candidate): Always use inform; get rid of errfn
4228 argument. Reorganize so that all the strings get picked up
4229 by xgettext. Note obligation of caller to pass first argument
4230 through gettext.
4231 (print_z_candidates): Update to match. Indent second and
4232 successive candidates by strlen() of translated message.
4233 (joust): Restructure ambiguous-conversion pedwarn so that
4234 translators see a complete sentence. Update calls to
4235 print_z_candidate.
4236
4237 * Make-lang.in (cp/call.o): Update dependencies.
4238
4239 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4240
4241 * decl.c (set_current_binding_level): Delete, revert last change.
4242 (current_binding_level): Modify to allow it as as lvalue.
4243
4244 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4245
4246 * name-lookup.c (find_binding): Pass appropriate pointer type to
4247 POP_TIMEVAR_AND_RETURN.
4248
4249 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4250
4251 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4252 * cp-tree.h: Don't insist on having GNUC.
4253
4254 2003-04-03 Jason Merrill <jason@redhat.com>
4255
4256 * cvt.c (ocp_convert): Only abort if we try to convert an object
4257 of TREE_ADDRESSABLE type.
4258
4259 * class.c (build_vtable): Set DECL_ALIGN here.
4260 (get_vtable_decl): Not here.
4261 (layout_vtable_decl): Or here.
4262 (create_vtable_ptr): Or here.
4263 (layout_class_type): Or here.
4264 (check_bitfield_decl): Don't mess with field alignment.
4265
4266 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4267
4268 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4269 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4270 * rtti.c (dfs_class_hint_mark): Likewise.
4271
4272 * decl.c (push_local_name, push_class_level_binding,
4273 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4274 functions returning void.
4275 * decl2.c (add_using_namespace): Likewise.
4276
4277 * decl.c (print_binding_level, print_other_binding_stack,
4278 print_binding_stack): Cast argument of %p specifier to void*.
4279 * ptree.c (cxx_print_decl): Likewise.
4280
4281 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4282 VAR_FUNCTION_OR_PARM_DECL_CHECK,
4283 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4284 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4285 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4286
4287 * decl.c (set_current_binding_level): New macro. Use throughout
4288 when setting the current binding level.
4289
4290 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4291 in enum.
4292 * method.c (mangling_flags): Likewise.
4293
4294 * cp-tree.h (lang_type_header): Add __extension__ and use
4295 CHAR_BITFIELD for members.
4296
4297 2003-04-02 Geoffrey Keating <geoffk@apple.com>
4298
4299 PR other/9274
4300 * mangle.c: Include gt-cp-mangle.h.
4301 (subst_identifiers): Mark with GTY.
4302 * config-lang.in (gtfiles): Add cp/mangle.c.
4303 * Make-lang.in: (gt-cp-mangle.h): New rule.
4304 (cp/mangle.o): Depends on gt-cp-mangle.h.
4305
4306 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
4307
4308 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4309 after \$(srcdir)/cp/name-lookup.h.
4310 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4311 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
4312 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4313 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4314
4315 2003-03-31 Jason Merrill <jason@redhat.com>
4316
4317 PR java/10145
4318 * class.c (check_field_decl): Don't set DECL_ALIGN.
4319
4320 2003-03-30 Mark Mitchell <mark@codesourcery.com>
4321
4322 PR c++/7647
4323 * decl.c (grokdeclarator): Tidy, slightly.
4324 * search.c (lookup_field_1): Add want_type parameter.
4325 (lookup_field_r): Adjust call to lookup_field_1.
4326
4327 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4328
4329 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4330
4331 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4332
4333 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
4334 prototype.
4335 (cxx_scope_find_binding_for_name): Likewise.
4336 * decl.c (find_binding: Move to name-lookup.c.
4337 (binding_for_name): Likewise.
4338 (cxx_scope_find_binding_for_name): Likewise.
4339 (BINDING_LEVEL): Remove.
4340 (push_binding): Tidy.
4341 (push_class_binding): Likewise.
4342 (pop_binding): Likewise.
4343 (poplevel): Likewise.
4344 (poplevel_class): Likewise.
4345 (set_identifier_type_value_with_scope): Likewise.
4346 (push_overloaded_decl): Likewise.
4347 (lookup_tag): Likewise.
4348 (unqualified_namespace_lookup): Likewise.
4349 (lookup_name_current_level): Likewise.
4350 (maybe_inject_for_scope_var): Likewise.
4351 (namespace_binding): Move to name-lookup.c.
4352 (set_namespace_binding): Likewise.
4353 * decl2.c (lookup_using_namespace): Tidy.
4354 (qualified_lookup_using_namespace): Likewise.
4355 (do_toplevel_using_decl): Likewise.
4356 * name-lookup.c: Include "timevar.h"
4357 * name-lookup.h (cxx_scope): Declare.
4358 (struct cxx_binding): Lose member "has_level". Adjust "scope"
4359 member declaration.
4360 (BINDING_SCOPE): Adjust definition.
4361 (BINDING_HAS_LEVEL_P): Remove.
4362
4363 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4364
4365 * name-lookup.c: New file.
4366 * name-lookup.h: Likewise..
4367 * decl.c (push_binding): Adjust use cxx_binding_make.
4368 (free_bindings): Move to name-lookup.c
4369 (pop_binding): Use cxx_binding_free.
4370 (binding_for_name): Tidy.
4371 * cp-tree.h: Include "name-lookup.h"
4372 (cxx_binding_make): Move to name-lookup.h
4373 (cxx_binding_clear): Likewise.
4374 (struct cxx_binding): Likewise.
4375 (LOCAL_BINDING_P): Likewise.
4376 (INHERITED_VALUE_BINDING_P): Likewise.
4377 (BINDING_SCOPE): Likewise.
4378 (BINDING_HAS_LEVEL_P): Likewise.
4379 (BINDING_VALUE): Likewise.
4380 (BINDING_TYPE): Likewise.
4381 * config-lang.in (gtfiles): Add cp/name-lookup.h
4382 * Make-lang.in (cp/name-lookup.o): New rule.
4383 (CXX_OBJS): Add cp/name-lookup.o
4384 (CXX_TREE_H): Add cp/name-lookup.h
4385
4386 2003-03-28 Jason Merrill <jason@redhat.com>
4387
4388 PR c++/10245
4389 * cvt.c (force_rvalue): New fn.
4390 * call.c (build_conditional_expr): Use it.
4391 * cp-tree.h: Declare it.
4392
4393 2003-03-28 Mike Stump <mrs@apple.com>
4394
4395 * error.c (dump_expr): Add 0x to printed hex numbers to make
4396 output match source code better.
4397
4398 2003-03-28 Mark Mitchell <mark@codesourcery.com>
4399
4400 PR c++/10218
4401 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4402 definitions.
4403
4404 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4405 non-existant ssdf_decls array.
4406 (finish_file): Call generator_ctor_or_dtor_function when there are
4407 static constructors or destructors and no other static
4408 initializations.
4409
4410 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
4411
4412 PR c++/10047
4413 * decl2.c (finish_file): Don't warn about explicitly instantiated
4414 inline decls.
4415
4416 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4417
4418 PR c++/10224
4419 * pt.c (lookup_template_class): Only check instantiated args if
4420 they do not contain template parameters.
4421
4422 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4423
4424 PR c++/10158
4425 * parser.c (cp_parser_function_definition): Set
4426 DECL_INITIALIZED_IN_CLASS for members.
4427 * pt.c (instantiate_decl): Only reduce the template args for
4428 friends that are not defined in class.
4429
4430 2003-03-25 Jason Merrill <jason@redhat.com>
4431
4432 * call.c (print_z_candidate): Change name of first arg to msgid.
4433 (joust): Add comment for translators.
4434
4435 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4436
4437 PR c++/9898, PR c++/383, DR 322
4438 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4439 through reference types on both PARM and ARG.
4440
4441 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4442
4443 PR c++/10119
4444 * error.c (dump_expr) <BASELINK>: Use dump_expr.
4445 * pt.c (maybe_fold_nontype_args): New function.
4446 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4447 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4448 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4449 maybe_fold_nontype_args.
4450
4451 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4452
4453 PR c++/10026
4454 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4455
4456 2003-03-23 Mark Mitchell <mark@codesourcery.com>
4457
4458 PR c++/7086
4459 * typeck.c (cxx_mark_addressable): Adjust call to
4460 gen_mem_addressof or put_var_into_stack.
4461
4462 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
4463
4464 PR c++/9978, c++/9708
4465 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4466 * call.c (add_template_candidate_real): Adjust
4467 instantiate_template call.
4468 * class.c (resolve_address_of_overloaded_function): Likewise.
4469 * decl.c (build_enumerator): Set TREE_CONSTANT.
4470 * pt.c (check_instantiated_args): New.
4471 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4472 TREE_READONLY.
4473 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4474 (reduce_template_parm_level): Likewise.
4475 (process_template_parm): Likewise.
4476 (check_explicit_specialization): Adjust instantiate_template call.
4477 (convert_template_argument): Don't check non-type argument here.
4478 (lookup_template_class): Check them here.
4479 (tsubst_friend_function): Adjust instantiate_template call.
4480 (instantiate_template): Add tsubst_flags parameter, use it. Check
4481 instantiated args.
4482
4483 2003-03-21 Zack Weinberg <zack@codesourcery.com>
4484
4485 * decl.c: Update calls to shadow_warning.
4486
4487 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
4488
4489 PR c++/9898
4490 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4491 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4492
4493 2003-03-20 Mark Mitchell <mark@codesourcery.com>
4494
4495 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4496 friends.
4497 * cp/pt.c (instantiate_class_template): Fix formatting.
4498
4499 2003-03-14 Matt Austern <austern@apple.com>
4500
4501 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4502 (unemitted_tinfo_decl_p): Remove.
4503 (emit_tinfo_decl): Change declaration to remove unused parameter.
4504 * decl2.c (finish_file): Change tinfo emission to loop through
4505 unemitted_tinfo_decls array instead of looping through all decls.
4506 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4507 unused second parameter.
4508 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4509 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4510 (emit_tinfo_decl): remove unused second parameter, add assertion
4511 that decl hasn't already been emitted.
4512
4513 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
4514
4515 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4516 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4517 return statements.
4518
4519 2003-03-19 Jason Merrill <jason@redhat.com>
4520
4521 PR c++/8316, c++/9315, c++/10136
4522 * call.c (print_z_candidate): Split out from...
4523 (print_z_candidiates): ...here.
4524 (joust): Use it.
4525
4526 2003-03-17 Roger Sayle <roger@eyesopen.com>
4527
4528 PR c++/10031
4529 * decl.c (duplicate_decls): Use the new type when prototyping
4530 anticipated decls, even when the types match. This defines the
4531 exception list for the built-in function.
4532
4533 2003-03-17 Jason Merrill <jason@redhat.com>
4534
4535 PR c++/10091
4536 * typeck.c (build_class_member_access_expr): Compare
4537 TYPE_MAIN_VARIANTs.
4538
4539 2003-03-17 Mark Mitchell <mark@codesourcery.com>
4540
4541 PR c++/9639
4542 * parser.c (cp_parser_declarator_id): Clear parser->scope.
4543
4544 2003-03-16 Jason Merrill <jason@redhat.com>
4545
4546 PR c++/9993
4547 * decl.c (finish_function): Only allow the NRVO to use variables
4548 declared at function scope.
4549
4550 2003-03-17 Andreas Jaeger <aj@suse.de>
4551
4552 * Make-lang.in (cp/TAGS): Remove.
4553
4554 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
4555
4556 PR c++/9629
4557 * cp-tree.h (struct language_function): Add in_base_initializer.
4558 (in_base_initializer): define it.
4559 (expand_member_init): Remove INIT param.
4560 * init.c (expand_member_init): Remove INIT param, return the member.
4561 (emit_mem_initializers): Set in_base_initializer.
4562 * class.c (build_base_path): Check in_base_initializer.
4563 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4564 * pt.c (tsubst_initializer_list): Likewise.
4565
4566 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
4567
4568 * decl.c (binding_for_name): Fix initialization thinko.
4569
4570 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4571
4572 Compile-time improvement: 2/n.
4573 * cp-tree.h (struct cxx_binding): New datatype;
4574 (struct lang_identifier): Use it.
4575 (LOCAL_BINDING_P): Adjust definition.
4576 (INHERITED_VALUE_BINDING_P): Likewise.
4577 (BINDING_SCOPE): Likewise.
4578 (BINDING_HAS_LEVEL_P): Likewise.
4579 (BINDING_VALUE): Likewise.
4580 (BINDING_TYPE): Likewise.
4581 (IDENTIFIER_VALUE): Likewise.
4582 (struct tree_binding): Remove.
4583 (TS_CP_BINDING): Likewise.
4584 ((union lang_tree_node): Remove field "binding".
4585 (cxx_binding_clear): New macro.
4586 (binding_for_name): Adjust return type.
4587 (qualified_lookup_using_namespace): Adjust prototype.
4588 (lookup_using_namespace): Adjust prototype.
4589 (cxx_scope_find_binding_for_name): Declare.
4590 * cp-tree.def: Remove CPLUS_BINDING definition.
4591 * decl.c (push_binding): Adjust local variable type.
4592 (add_binding): Likewise.
4593 (push_class_binding): Likewise.
4594 (pop_binding): Likewise.
4595 (poplevel): Likewise.
4596 (poplevel_class): Likewise.
4597 (free_bindings): Adjust type.
4598 (find_binding): Adjust return type, add a third parameter. Remove
4599 non-useful assertion now that we use static typing.
4600 (cxx_scope_find_binding_for_name): New function.
4601 (binding_for_name): Use it. Adjust local variable type. Simplify.
4602 (namespace_binding): Simplify.
4603 (set_namespace_binding): Likewise.
4604 (set_identifier_type_value_with_scope): Adjust local variable type.
4605 (lookup_tag): Don't type-abuse of local variable 'old'.
4606 (lookup_namespace_name): Likewise. Allocate binding on stack.
4607 (select_decl): Adjust prototype.
4608 (unqualified_namespace_lookup): Allocate binding on stack.
4609 Don't type-abuse of local variable 'val'.
4610 (lookup_name_real): Likewise.
4611 (maybe_inject_for_scope_var): Adjust local variable type.
4612 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4613 (namespace_binding): Adjust logic, simplify.
4614 (BINDING_LEVEL): Adjust definition.
4615 (push_class_level_binding): Adjust local variable type.
4616 (struct cxx_saved_binding): Adjust field 'binding' type.
4617 * decl2.c (ambiguous_decl): Adjust prototype.
4618 (lookup_using_namespace): Adjust local variable type.
4619 (qualified_lookup_using_namespace): Catch type error and correct
4620 ensueing logic error.
4621 (do_nonmember_using_decl): Adjust local variable type. Allocate
4622 temporary cxx_binding on stack.
4623 (do_toplevel_using_decl): Adjust local variable type.
4624 * ptree.c (cxx_print_cxx_binding): New function.
4625 (cxx_print_identifier): Use it.
4626 (cxx_print_xnode): Delete CPLUS_BINDING case label.
4627
4628 2003-03-15 Roger Sayle <roger@eyesopen.com>
4629
4630 * tree.c (count_functions): Fix whitespace.
4631
4632 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
4633
4634 * Make-lang.in: Update.
4635
4636 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4637
4638 PR c++/6440
4639 * pt.c (maybe_process_partial_specialization): Handle
4640 member class template when enclosing class template is
4641 explicit specialized.
4642 (most_general_template): Stop looking when DECL is already
4643 specialized.
4644
4645 2003-03-13 Jason Merrill <jason@redhat.com>
4646
4647 PR c++/9420
4648 * search.c (lookup_conversions): Call complete_type here.
4649 * call.c (implicit_conversion): Not here.
4650
4651 2003-03-13 Mark Mitchell <mark@codesourcery.com>
4652
4653 * decl2.c (do_nonmember_using_decl): Correct handling of
4654 simultaneous type/non-type bindings.
4655
4656 * call.c (initialize_reference): Remove bogus assertion.
4657 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4658
4659 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
4660
4661 PR c++/7050
4662 * expr.c (cxx_expand_expr): Return const0_rtx for throw
4663 expressions.
4664
4665 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4666
4667 PR c++/9474
4668 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4669 to merge old and new declarations.
4670
4671 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4672
4673 * g++.1: Remove.
4674 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4675 (cp/g++.1): Build it from scratch in the build tree.
4676 (c++.install-man): Depend on it. Install it from the build tree.
4677 (c++.mostlyclean): Clean it.
4678
4679 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4680
4681 PR c++/9474
4682 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4683 to merge old and new declarations.
4684
4685 PR c++/9924
4686 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4687
4688 2003-03-11 Jason Merrill <jason@redhat.com>
4689
4690 PR c++/9820
4691 * search.c (lookup_member): Fix handling of functions in a class
4692 being defined.
4693
4694 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4695
4696 PR c++/8700
4697 * call.c (convert_class_to_reference): Adjust usage of
4698 splice_viable.
4699 (any_viable): Remove.
4700 (splice_viable): Combine with any_viable.
4701 (print_z_candidates): Avoid printing duplicates.
4702 (build_user_type_conversion_1): Adjust usage of splice_viable.
4703 (build_new_function_call): Likewise.
4704 (build_operator_new_call): Likewise.
4705 (build_object_call): Likewise.
4706 (build_conditional_expr): Likewise.
4707 (build_new_op): Likewise.
4708 (build_new_method_call): Likewise.
4709 (joust): Remove spurious comment.
4710 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4711 * decl2.c (arg_assoc_class): Simplify.
4712 * friend.c (add_friend): Likewise.
4713
4714 2003-03-11 Jason Merrill <jason@redhat.com>
4715
4716 PR c++/8660
4717 * decl2.c (check_classfn): A member template only matches a
4718 member template.
4719
4720 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
4721
4722 * Make-lang.in (CXX_C_OBJS): Update.
4723 * lang-specs.h: Don't define __GNUG__ here.
4724
4725 2003-03-10 Mark Mitchell <mark@codesourcery.com>
4726
4727 * call.c (perform_overload_resolution): New function.
4728 (build_new_function_call): Use it.
4729 (build_operator_new_call): Likewise.
4730 (add_candidates): Add explicit_targs and template_only parameters.
4731 (build_new_op): Adjust accordingly.
4732 * cp-tree.h (build_operator_new_call): New function.
4733 (build_function_call_real): Remove.
4734 (build_function_call_maybe): Likewise.
4735 * init.c (build_new_1): Use build_operator_new_call.
4736 * typeck.c (build_function_call_real): Rename to ...
4737 (build_function_call): ... this.
4738
4739 2003-03-10 Devang Patel <dpatel@apple.com>
4740
4741 PR c++/9394
4742 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4743
4744 2003-03-10 Jason Merrill <jason@redhat.com>
4745
4746 PR c++/9798
4747 * decl.c (push_using_directive): Push before recursing.
4748
4749 PR c++/9868, c++/9524
4750 * call.c (resolve_scoped_fn_name): Handle the case of a function
4751 pointer member.
4752
4753 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4754 argument in the pointer-to-member case.
4755
4756 2003-03-09 Mark Mitchell <mark@codesourcery.com>
4757
4758 PR c++/9373
4759 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4760 pointers to member functions.
4761
4762 PR c++/8534
4763 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4764 in pointer-to-member-function types.
4765
4766 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4767
4768 * expr.c (cplus_expand_constant): Use C90 prototype style.
4769 (cxx_expand_expr): Likewise.
4770
4771 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4772
4773 PR c++/9970
4774 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4775 functions.
4776
4777 2003-03-08 Geoffrey Keating <geoffk@apple.com>
4778
4779 * lang-specs.h (c++-header): Change .pch to .gch.
4780
4781 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
4782
4783 * cp-tree.h (cxx_init): Update prototype.
4784 * lex.c (cxx_init): Similarly.
4785
4786 2003-03-08 Mark Mitchell <mark@codesourcery.com>
4787
4788 PR c++/9823
4789 * cp-tree.h (begin_mem_initializers): Remove.
4790 * parser.c (cp_parser_mem_initializer_list): Inline it here.
4791 Do not call finish_mem_initializers if not in a constructor.
4792 (cp_parser_class_head): Fix typo in error message.
4793 * semantics.c (begin_mem_initializers): Remove.
4794 * testsuite/g++.dg/parser/constructor1.C: New test.
4795
4796 PR c++/9809
4797 * call.c (add_function_candidate): Skip builtin fuctions that have
4798 not yet been declared.
4799
4800 PR c++/9982
4801 * init.c (build_new_1): Correct logic for determining whether or
4802 not to use an array cookie.
4803
4804 PR c++/9524
4805 * parser.c (cp_parser_postfix_expression): Call
4806 finish_non_static_data_member, even when processing_template_decl.
4807
4808 PR c++/9912
4809 * cp-tree.h (is_ancestor): New function.
4810 (handle_class_head): Change prototype.
4811 * decl2.c (is_namespace_ancestor): Rename to ...
4812 (namespace_anecestor): ... this.
4813 (set_decl_namespace): Adjust accordingly.
4814 (handle_class_head): Remove unnecessary parameters.
4815 * parser.c (cp_parser_class_head): Check that
4816 nested-name-specifiers are used appropriately.
4817
4818 2003-03-07 Mark Mitchell <mark@codesourcery.com>
4819
4820 * call.c (reference_binding): Remove REF_IS_VAR parameter.
4821 (implicit_conversion): Adjust call to reference_binding.
4822 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4823 (initialize_reference): Adjust handling for references bound to
4824 rvalues.
4825 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4826 prototype.
4827 (real_non_cast_lvalue_p): New method.
4828 * cvt.c (build_up_reference): Adjust use of
4829 make_temporary_var_for_ref_to_temp.
4830 * tree.c (real_non_cast_lvalue_p): New method.
4831
4832 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4833
4834 * except.c (init_exception_processing): Use C90 prototype style.
4835 (cp_protect_cleanup_actions): Likewise.
4836 (prepare_eh_type): Likewise.
4837 (build_eh_type_type): Likewise.
4838 (build_exc_ptr): Likewise.
4839 (do_begin_catch): Likewise.
4840 (dtor_nothrow): Likewise.
4841 (do_end_catch): Likewise.
4842 (push_eh_cleanup): Likewise.
4843 (decl_is_java_type): Likewise.
4844 (choose_personality_routine): Likewise.
4845 (initialize_handler_parm): Likewise.
4846 (expand_start_catch_block): Likewise.
4847 (expand_end_catch_block): Likewise.
4848 (begin_eh_spec_block): Likewise.
4849 (finish_eh_spec_block): Likewise.
4850 (do_allocate_exception): Likewise.
4851 (do_free_exception): Likewise.
4852 (wrap_cleanups_r): Likewise.
4853 (stabilize_throw_expr): Likewise.
4854 (build_throw): Likewise.
4855 (complete_ptr_ref_or_void_ptr_p): Likewise.
4856 (is_admissible_throw_operand): Likewise.
4857 (nothrow_libfn_p): Likewise.
4858 (can_convert_eh): Likewise.
4859 (check_handlers_1): Likewise.
4860 (check_handlers): Likewise.
4861
4862 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4863
4864 * call.c (merge_conversion_sequences): New function.
4865 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4866 (convert_class_to_reference): Correct handling of second
4867 standard conversion sequence in a user-defined conversion
4868 sequence.
4869 (build_user_type_conversion_1): Use merge_conversion_sequences.
4870 * cp-tree.def: Add comments for CONV nodes.
4871 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4872
4873 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4874
4875 * error.c (init_error): Use C90 prototype style.
4876 (dump_scope): Likewise.
4877 (dump_qualifiers): Likewise.
4878 (dump_template_argument): Likewise.
4879 (dump_template_argument_list): Likewise.
4880 (dump_template_parameter): Likewise.
4881 (dump_template_bindings): Likewise.
4882 (dump_type): Likewise.
4883 (dump_typename): Likewise.
4884 (class_key_or_enum): Likewise.
4885 (dump_aggr_type): Likewise.
4886 (dump_type_prefix): Likewise.
4887 (dump_type_suffix): Likewise.
4888 (dump_global_iord): Likewise.
4889 (dump_simple_decl): Likewise.
4890 (dump_decl): Likewise.
4891 (dump_template_decl): Likewise.
4892 (dump_function_decl): Likewise.
4893 (dump_parameters): Likewise.
4894 (dump_exception_spec): Likewise.
4895 (dump_function_name): Likewise.
4896 (dump_template_parms): Likewise.
4897 (dump_char): Likewise.
4898 (dump_expr_list): Likewise.
4899 (dump_expr): Likewise.
4900 (dump_binary_op): Likewise.
4901 (dump_unary_op): Likewise.
4902 (type_as_string): Likewise.
4903 (expr_as_string): Likewise.
4904 (decl_as_string): Likewise.
4905 (context_as_string): Likewise.
4906 (lang_decl_name): Likewise.
4907 (cp_file_of): Likewise.
4908 (cp_line_of): Likewise.
4909 (decl_to_string): Likewise.
4910 (expr_to_string): Likewise.
4911 (fndecl_to_string): Likewise.
4912 (code_to_string): Likewise.
4913 (language_to_string): Likewise.
4914 (parm_to_string): Likewise.
4915 (op_to_string): Likewise.
4916 (type_to_string): Likewise.
4917 (assop_to_string): Likewise.
4918 (args_to_string): Likewise.
4919 (cv_to_string): Likewise.
4920 (cxx_print_error_function): Likewise.
4921 (cp_diagnostic_starter): Likewise.
4922 (cp_diagnostic_finalizer): Likewise.
4923 (cp_print_error_function): Likewise.
4924 (function_category): Likewise.
4925 (print_instantiation_full_context): Likewise.
4926 (print_instantiation_partial_context): Likewise.
4927 (maybe_print_instantiation_context): Likewise.
4928 (print_instantiation_context): Likewise.
4929 (cp_printer): Likewise.
4930 (print_integer): Likewise.
4931 (print_non_consecutive_character): Likewise.
4932 (locate_error): Likewise.
4933
4934 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4935
4936 PR c++/9965
4937 * call.c (reference_binding): Add ref_is_var parameter.
4938 (implicit_conversion): Adjust call to reference_binding.
4939 (initialize_reference): Likewise.
4940
4941 PR c++/9400
4942 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4943 PARM_DECLs.
4944
4945 PR c++/9791
4946 * class.c (get_basefndecls): Use lookup_fnfields_1.
4947
4948 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4949
4950 PR c++/9188
4951 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4952 in error message.
4953 (cp_parser_single_declaration): Likewise.
4954
4955 2003-03-05 Jason Merrill <jason@redhat.com>
4956
4957 PR c++/9440
4958 * call.c (build_conditional_expr): Use convert rather than an
4959 explicit NOP_EXPR.
4960
4961 2003-03-02 Matt Austern <austern@apple.com>
4962
4963 * decl.c (cp_binding_level): Add static_decls varray member.
4964 (add_decl_to_level): Add static/inline namespace scope
4965 declarations to static_decls array.
4966 (wrapup_global_for_namespace): Pass static_decls only, instead of
4967 all decls, to wrapup_global_declarations/check_global_declarations.
4968 (push_namespace): Initialize static_decls for ordinary namespaces.
4969 (cxx_init_decl_processing): Initialize static_decls for global
4970 namespace.
4971
4972 2003-03-05 Mark Mitchell <mark@codesourcery.com>
4973
4974 * class.c (end_of_class): Correct thinko.
4975
4976 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
4977
4978 * config-lang.in: Replace ${libstdcxx_version} by its value.
4979
4980 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4981
4982 * cp-tree.h (cxx_saved_binding): Declare.
4983 (struct saved_scope): Adjust type of field 'old_binding'.
4984 * decl.c (cxx_saved_binding_make): New macro.
4985 (struct cxx_saved_binding): Define.
4986 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
4987 C++ bindings.
4988 (maybe_push_to_top_level): Adjust local variable type.
4989 (pop_from_top_level): Likewise.
4990
4991 2003-03-04 Tom Tromey <tromey@redhat.com>
4992
4993 * Make-lang.in (c++.tags): New target.
4994
4995 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
4996
4997 * Make-lang.in: Update.
4998
4999 2003-03-03 Jason Merrill <jason@redhat.com>
5000
5001 * decl.c (finish_enum): Do set the type in a template. Simplify.
5002 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5003
5004 2003-03-03 Mark Mitchell <mark@codesourcery.com>
5005
5006 PR c++/9878
5007 * call.c (convert_class_to_reference): Correct conversion
5008 sequences.
5009 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5010 (implicit_conversion): Adjust call to reference_binding.
5011 (add_candidate): Change type of candidates parameter.
5012 (add_function_candidate): Likewise.
5013 (add_conv_candidate): Likewise.
5014 (build_builtin_candidate): Likewise.
5015 (add_builtin_candidate): Likewise.
5016 (add_builtin_candidates): Likewise.
5017 (add_template_candidate_real): Likewise.
5018 (add_template_candidate): Likewise.
5019 (add_template_conv_candidate): Likewise.
5020 (build_user_type_conversion_1): Adjust accordingly.
5021 (build_object_call): Likewise.
5022 (build_conditional_expr): Likewise.
5023 (add_candidates): Likewise.
5024 (build_new_op): Likewise.
5025 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
5026 (build_new_method_call): Adjust calls to add_function_candidate.
5027 (make_temporary_var_for_ref_to_temp): New function.
5028 (initialize_reference): Add decl parameter.
5029 * class.c (build_rtti_vtbl_entries): Use build_address and
5030 build_nop.
5031 * cp-tree.h (initialize_reference): Change prototype.
5032 (make_temporary_var_for_ref_to_temp): New function.
5033 (build_type_conversion): Change prototype.
5034 (build_address): New function.
5035 (build_nop): Likewise.
5036 * cvt.c (cp_convert_to_pointer): Adjust call to
5037 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
5038 Use build_nop.
5039 (convert_to_pointer_force): Use build_nop.
5040 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5041 (convert_to_reference): Adjust call to build_type_conversion.
5042 (ocp_convert): Likewise.
5043 (build_type_conversion): Remove for_sure parameter.
5044 * decl.c (grok_reference_init): Use initialize_reference.
5045 * typeck.c (build_address): New function.
5046 (build_nop): Likewise.
5047 (build_unary_op): Use them.
5048 (build_ptrmemfunc): Tidy slightly.
5049 (convert_for_initialization): Adjust call to
5050 initialize_reference.
5051 * typeck2.c (store_init_value): Remove #if 0'd code.
5052
5053 2003-03-03 Jason Merrill <jason@redhat.com>
5054
5055 * decl.c (start_function): Clear DECL_NUM_STMTS.
5056
5057 * class.c (get_vtable_decl): Use vtbl_type_node.
5058 (build_primary_vtable): Check for it.
5059
5060 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
5061
5062 * decl.c (check_initializer): Check for vector_opaque_p.
5063
5064 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
5065
5066 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5067 invoke an external cpp during compilation.
5068
5069 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5070
5071 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5072 that of warning().
5073 (start_decl): Likewise.
5074 (start_function): Likewise.
5075
5076 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
5077
5078 * Make-lang.in (CXX_C_OBJS): Update.
5079
5080 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5081
5082 PR c++/9892
5083 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5084 instantiating it.
5085
5086 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
5087
5088 * parser.c (cp_parser_init_declarator): Revert opaque
5089 vector_opaque_p change.
5090 Do not include target.h.
5091
5092 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5093
5094 PR c++/9879
5095 * cp-tree.h (build_zero_init): Add parameter.
5096 * decl.c (cp_finish_decl): Adjust call.
5097 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
5098 calls.
5099 (build_default_init): Add nelts parameter. Adjust calls to
5100 build_zero_init.
5101 (build_new_1): Adjust call to build_default_init.
5102 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5103
5104 2003-02-26 Devang Patel <dpatel@apple.com>
5105
5106 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5107 required. Postpone enum setting for template decls.
5108 (build_enumerator): Delay copying value node until finish_enum
5109 (). Remove #if 0'ed code.
5110 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5111 (tsubst_copy): Add check for enum type.
5112
5113 2003-02-25 Mark Mitchell <mark@codesourcery.com>
5114
5115 PR c++/9683
5116 * decl2.c (prune_vars_needing_no_initialization): Do not throw
5117 away initializations for DECL_EXTERNAL VAR_DECLs.
5118 (finish_file): Adjust accordingly.
5119 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5120
5121 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5122
5123 * decl.c (add_binding): Time TV_NAME_LOOKUP.
5124 (push_class_binding): Likewise.
5125 (set_namespace_binding): Likewise.
5126
5127 2003-02-24 Mark Mitchell <mark@codesourcery.com>
5128
5129 PR c++/9836
5130 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5131 specializations back to the main template.
5132 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5133 * pt.c (resolve_typename_type): Likewise.
5134
5135 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
5136
5137 PR c++/9778
5138 * pt.c (tsubst_copy_and_build): For a templated function inside a
5139 scope, process template arguments.
5140
5141 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5142
5143 PR c++/9602
5144 * typeck2.c (abstract_virtuals_error): Don't check when
5145 TYPE is still template parameter dependent.
5146
5147 2003-02-23 Mark Mitchell <mark@codesourcery.com>
5148
5149 PR c++/5333
5150 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5151 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5152 * pt.c (instantiate_class_template): Don't try to instantiate
5153 dependent types.
5154 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5155
5156 2003-02-21 Mark Mitchell <mark@codesourcery.com>
5157
5158 PR c++/9749
5159 * decl.c (grokdeclarator): Do not allow parameters with variably
5160 modified types.
5161
5162 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
5163
5164 * search.c (grow_bfs_bases): Remove. Fold into ...
5165 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5166 in previous patch.
5167
5168 2003-02-20 Mark Mitchell <mark@codesourcery.com>
5169
5170 PR c++/9729
5171 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5172 when the G++ 3.2 ABI prevents correct compilation.
5173
5174 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
5175
5176 Change base class access representation. Share virtual base
5177 binfos.
5178 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5179 call.
5180 * cp/class.c (build_base_path): Likewise.
5181 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5182 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5183 (make_new_vtable): Adjust.
5184 (force_canonical_binfo_r): Delete.
5185 (force_canonical_binfo): Delete.
5186 (mark_primary_virtual_base): Delete.
5187 (dfs_unshared_virtual_bases): Delete.
5188 (mark_primary_bases): Adjust.
5189 (maybe_warn_about_overly_private_class): Adjust.
5190 (dfs_base_derived_from): Delete.
5191 (base_derived_from): Follow the inheritance chain.
5192 (struct find_final_overrider_data): Add vpath member.
5193 (dfs_find_final_overrider): Adjust.
5194 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5195 (find_final_overrider): Adjust.
5196 (update_vtable_entry_for_fn): Adjust.
5197 (modify_all_vtables): Adjust.
5198 (walk_subobject_offsets): Adjust.
5199 (layout_nonempty_base_or_field): Adjust.
5200 (layout_empty_base): Remove last parameter. Adjust.
5201 (build_base_field): Adjust.
5202 (build_base_fields): Adjust.
5203 (propagate_binfo_offsets): Remove last parameter. Adjust.
5204 (dfs_set_offset_for_unshared_vbases): Delete.
5205 (layout_virtual_bases): Adjust.
5206 (finish_struct_1): Adjust.
5207 (init_class_processing): Don't init access nodes.
5208 (dfs_get_primary_binfo): Delete.
5209 (get_primary_binfo): Adjust.
5210 (dump_class_hierarchy_r): Remove most derived arg, add IGO
5211 parameter. Adjust.
5212 (dump_class_hierarchy): Adjust.
5213 (finish_vtbls): Adjust.
5214 (get_original_base): Delete.
5215 (build_vtt_inits): Adjust.
5216 (dfs_build_secondary_vptr_vtt_inits): Adjust.
5217 (dfs_ctor_vtable_bases_queue_p): Adjust.
5218 (build_ctor_vtbl_group): Adjust.
5219 (dfs_accumulate_vtbl_inits): Adjust.
5220 (build_vtbl_initializer): Adjust.
5221 (build_vbase_offset_vtbl_entries): Adjust.
5222 (add_vcall_offset_vtbl_entries_1): Adjust.
5223 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5224 (access_*_node): Remove.
5225 (CANONICAL_BINFO): Delete.
5226 (BINFO_UNSHARED_MARKED): Remove.
5227 (BINFO_MARKED): Set LANG_FLAG_0 directly.
5228 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5229 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5230 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5231 Delete.
5232 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5233 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5234 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5235 Delete.
5236 (BINFO_DEPENDENT_BASE_P): New.
5237 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5238 index.
5239 (markedp, unmarkedp): Adjust.
5240 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5241 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5242 find_vbase_instance, binfo_for_vbase): Delete.
5243 (copied_binfo, original_binfo): Declare.
5244 (finish_base_specifier): Add virtual_p arg.
5245 (unshare_base_binfos): Delete.
5246 (copy_base_binfos): Declare.
5247 (reverse_path): Delete.
5248 * cp/decl.c (xref_basetypes): Access and virtuality passed
5249 differently. Don't copy direct base binfos here. Call
5250 copy_base_binfos.
5251 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5252 (initialize_vtbl_ptrs): Adjust.
5253 (expand_member_init): Adjust.
5254 * cp/parser.c (cp_parser_base_specifier): Adjust.
5255 * cp/pt.c (instantiate_class_template): Adjust.
5256 (get_template_base_recursive): Adjust.
5257 * cp/rtti.c (get_pseudo_ti_init): Adjust.
5258 (get_pseudo_ti_desc): Adjust.
5259 * cp/tree.c (unshare_base_binfos): Rename to ...
5260 (copy_base_binfos): ... here, reimplement.
5261 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5262 (reverse_path): Remove.
5263 * cp/typeck.c (get_delta_difference): Adjust error messages.
5264 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5265 * cp/search.c (lookup_base_r): Adjust.
5266 (dynamic_cast_base_recurse): Adjust.
5267 (canonical_binfo): Remove.
5268 (dfs_canonical_queue): Remove.
5269 (dfs_assert_unmarked_p): Remove.
5270 (assert_canonical_unmarked): Remove.
5271 (shared_marked_p, shared_unmarked_p): Remove.
5272 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5273 (dfs_access_in_type): Adjust.
5274 (access_in_type): Adjust.
5275 (dfs_accessible_queue_p): Adjust.
5276 (dfs_accessible_p): Adjust.
5277 (is_subobject_of_p_1, is_subobject_of_p): Remove.
5278 (struct lookup_field_info): Remove from_dep_base_p field.
5279 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5280 (lookup_field_r): Remove dependent base code.
5281 (lookup_member): Likewise.
5282 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5283 (dfs_unmarked_real_bases_queue_p): Remove.
5284 (dfs_marked_real_bases_queue_p): Remove.
5285 (dfs_skip_vbases): Remove.
5286 (dfs_get_pure_virtuals): Adjust.
5287 (markedp, unmarkedp): Adjust.
5288 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5289 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5290 (dfs_unmark): Adjust.
5291 (dfs_get_vbase_types):Remove.
5292 (dfs_build_inheritance_graph_order): Remove.
5293 (get_vbase_types): Remove
5294 (dfs_find_vbase_instance): Remove.
5295 (find_vbase_instance): Remove.
5296 (dfs_debug_unmarkedp): Adjust.
5297 (dependent_base_p): Remove.
5298 (dfs_push_type_decls): Adjust.
5299 (dfs_push_decls): Adjust.
5300 (dfs_no_overlap_yet): Adjust.
5301 (copied_binfo): New function.
5302 (original_binfo): New function.
5303 (binfo_for_vbase): Remove.
5304
5305 2003-02-18 Zack Weinberg <zack@codesourcery.com>
5306
5307 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5308 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5309 vectors, for speed.
5310
5311 2003-02-18 Mark Mitchell <mark@codesourcery.com>
5312
5313 PR c++/9704
5314 * class.c (layout_class_type): In the 3.2 ABI, take into account
5315 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5316
5317 2003-02-18 Matt Austern <austern@apple.com>
5318
5319 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5320 nothing for C++.
5321 * cp/decl.c (wrapup_globals_for_namespace): Remove special
5322 handling of global namespace.
5323
5324 2003-02-18 Geoffrey Keating <geoffk@apple.com>
5325
5326 * cp-tree.h (rid_to_yy): Delete.
5327 (C_RID_YYCODE): Delete.
5328 (finish_file): Delete redundant declaration.
5329
5330 2003-02-18 Jason Merrill <jason@redhat.com>
5331
5332 PR c++/9623
5333 * decl.c (reshape_init): Don't mess with initializer labels.
5334
5335 PR c++/9485
5336 * parser.c (cp_parser_postfix_expression): Set idk properly for
5337 object->scope::member.
5338
5339 2003-02-18 Ben Elliston <bje@redhat.com>
5340
5341 PR other/7350
5342 * decl.c (duplicate_decls): Fix typo in comment.
5343
5344 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
5345
5346 PR debug/9717
5347 * class.c (build_base_field): Mark fields for base classes with
5348 DECL_IGNORED_P.
5349
5350 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5351
5352 PR c++/9457
5353 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5354 CONSTRUCTOR_ELTS only once.
5355
5356 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5357
5358 PR c++/9459
5359 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5360 (dump_type_suffix): Likewise.
5361
5362 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
5363
5364 * search.c: ANSIfy function declarations and definitions.
5365 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5366 * call.c (build_method_call, resolve_scoped_fn_name,
5367 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5368 calls.
5369 * class.c (handle_using_decl): Likewise.
5370 * decl.c (make_typename_type, make_unmound_class_template,
5371 start_decl, compute_array_index_type): Likewise.
5372 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5373 * init.c (expand_member_init, build_member_call): Likewise.
5374 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5375 resolve_typename_type): Likewise.
5376 * typeck.c (lookup_destructor, finish_class_member_access_exprm
5377 build_prememfunc_access_expr): Likewise.
5378
5379 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5380
5381 * decl2.c: Include "timevar.h".
5382 (namespace_ancestor): Time name lookup.
5383 (add_using_namespace): Likewise.
5384 (lookup_using_namespace): Likewise.
5385 (qualified_lookup_using_namespace): Likewise.
5386 (decl_namespace): Likewise.
5387 (lookup_arg_dependent): Likewise.
5388 * lex.c (do_identifier): Likewise.
5389 (do_scoped_id): Likewise.
5390 * pt.c (lookup_template_class): Likewise.
5391
5392 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
5393
5394 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5395
5396 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5397
5398 * decl.c: Include "timevar.h".
5399 (poplevel): Time name lookup.
5400 (find_binding): Likewise.
5401 (push_namespace): Likewise.
5402 (pop_nested_namespace): Likewise.
5403 (store_bindings): Likewise.
5404 (maybe_push_to_top_level): Likewise.
5405 (pop_from_top_level): Likewise.
5406 (push_local_name): Likewise.
5407 (pushtag): Likewise.
5408 (pushdecl): Likewise.
5409 (pushdecl_with_scope): Likewise.
5410 (pushdecl_namespace_level): Likewise.
5411 (pushdecl_top_level): Likewise.
5412 (pushdecl_class_level): Likewise.
5413 (push_class_level_binding): Likewise.
5414 (push_using_decl): Likewise.
5415 (push_using_directive): Likewise.
5416 (push_overloaded_decl): Likewise.
5417 (lookup_label): Likewise.
5418 (define_label): Likewise.
5419 (lookup_tag): Likewise.
5420 (lookup_tag_reverse): Likewise.
5421 (lookup_namespace_name): Likewise.
5422 (select_decl): Likewise.
5423 (unqualified_namespace_lookup): Likewise.
5424 (lookup_name_real): Likewise.
5425 (lookup_name_current_level): Likewise.
5426 (lookup_type_current_level): Likewise.
5427 (maybe_inject_for_scope_var): Likewise.
5428 (xref_tag): Likewise.
5429
5430 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5431
5432 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
5433
5434 * decl.c (build_enumerator): Remove unneeded test.
5435
5436 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
5437
5438 * cp-tree.h (struct lang_type_header): Make all fields unsigned
5439 char.
5440
5441 2003-02-03 Mark Mitchell <mark@codesourcery.com>
5442
5443 PR c++/7129
5444 * call.c (z_candidate): Add args.
5445 (convert_class_to_reference): Set it.
5446 (implicit_conversion): Tidy.
5447 (add_candidate): Add args parameter.
5448 (add_function_candidate): Adjust call to add_candidate.
5449 (add_conv_candidate): Likewise.
5450 (build_builtin_candidate): Likewise.
5451 (build_user_type_conversion_1): Eliminate wasteful tree_cons
5452 usage.
5453 (build_new_function_call): Likewise.
5454 (build_object_call): Likewise.
5455 (add_candidates): New function.
5456 (build_new_op): Use it.
5457 (covert_like_real): Adjust call to build_over_call.
5458 (build_over_call): Remove args parameter.
5459 * operators.def: Add <?= and >?=.
5460
5461 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
5462
5463 * typeck.c (build_indirect_ref): Don't check flag_volatile.
5464
5465 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5466
5467 PR c++/8849
5468 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5469
5470 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
5471
5472 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5473 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5474 (BINFO_LANG_ELTS): New #define.
5475 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5476
5477 2003-01-30 Geoffrey Keating <geoffk@apple.com>
5478
5479 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5480
5481 2003-01-30 Mark Mitchell <mark@codesourcery.com>
5482
5483 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5484 for class types.
5485 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5486 rather than TYPE_LANG_FLAG_0.
5487 (TYPE_BUILT_IN): Remove.
5488 (TYPE_DEPENDENT_P): New macro.
5489 (TYPE_DEPENDENT_P_VALID): Likewise.
5490 (lang_type_class): Add fields_readonly.
5491 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5492 * pt.c (dependent_type_p_r): New function, split out from ...
5493 (dependent_type_p): ... here. Memoize results.
5494 * search.c (dependent_base_p): Use dependent_type_p, not
5495 uses_template_parms.
5496 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5497 for class types.
5498
5499 2003-01-29 Mark Mitchell <mark@codesourcery.com>
5500
5501 * call.c (build_field_call): Use build_new_op, not build_opfncall.
5502 (prep_operand): New function.
5503 (build_new_op): Use it. Remove dead code.
5504 * class.c (pushclass): Change "modify" parameter type from int to
5505 bool.
5506 (currently_open_class): Use same_type_p, not pointer equality.
5507 (push_nested_class): Adjust calls to pushclass, remove modify
5508 parameter.
5509 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5510 (pushclass): Change prototype.
5511 (push_nested_class): Likewise.
5512 (grokoptypename): Remove.
5513 (build_opfncall): Remove.
5514 (value_dependent_expression_p): Declare.
5515 (resolve_typename_type): Likewise.
5516 (resolve_typename_type_in_current_instantiation): Likewise.
5517 (enter_scope_of): Remove.
5518 (tsubst): Remove.
5519 (tsubst_expr): Likewise.
5520 (tsubst_copy): Likewise.
5521 (tsubst_copy_and_build): Likewise.
5522 * decl.c (warn_about_implicit_typename_lookup): Remove.
5523 (finish_case_label): Return error_mark_node for erroneous labels.
5524 (start_decl): Adjust calls to push_nested_class.
5525 (grokfndecl): Call push_scope/pop_scope around call to
5526 duplicate_decls.
5527 (grokdeclarator): Do not call tsubst.
5528 (start_function): Adjust calls to push_nested_class.
5529 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5530 (check_classfn): Use push_scope/pop_scope around type comparisions.
5531 (grokoptypename): Remove.
5532 (push_sscope): Adjust call to push_nested_class.
5533 * error.c (dump_type): Show cv-qualification of typename types.
5534 * init.c (build_member_call): Use build_new_op, not
5535 build_opfncall.
5536 * method.c (build_opfncall): Remove.
5537 * parser.c (cp_parser): Add allow_non_constant_expression_p and
5538 non_constant_expression_p.
5539 (cp_parser_constant_expression): Adjust prototype.
5540 (cp_parser_resolve_typename_type): Remove.
5541 (cp_parser_non_constant_expression): New function.
5542 (cp_parser_non_constant_id_expression): Likewise.
5543 (cp_parser_new): Set allow_non_constant_expression_p and
5544 non_constant_expression_p.
5545 (cp_parser_primary_expression): Reject `this' and `va_arg' in
5546 constant-expressions. Note that dependent names aren't really
5547 constant.
5548 (cp_parser_postfix_expression): Reject conversions to non-integral
5549 types in constant-expressions. Neither are increments or
5550 decrements.
5551 (cp_parser_unary_expression): Reject increments and decrements in
5552 constant-expressions.
5553 (cp_parser_direct_new_declarator): Adjust call to
5554 cp_parser_constant_expression.
5555 (cp_parser_cast_expression): Reject conversions to non-integral
5556 types in constant-expressions.
5557 (cp_parser_assignment_expression): Rejects assignments in
5558 constant-expressions.
5559 (cp_parser_expression): Reject commas in constant-expressions.
5560 (cp_parser_labeled_statement): Adjust call to
5561 cp_parser_constant_expression.
5562 (cp_parser_direct_declarator): Simplify array bounds, even in
5563 templates, when they are non-dependent. Use
5564 resolve_typename_type, not cp_parser_resolve_typename_type.
5565 (cp_parser_class_head): Use resolve_typename_type, not
5566 cp_parser_resolve_typename_type.
5567 (cp_parser_member_declaration): Adjust call to
5568 cp_parser_constant_expression.
5569 (cp_parser_constant_initializer): Likewise.
5570 (cp_parser_constructor_declarator): Use resolve_typename_type, not
5571 cp_parser_resolve_typename_type.
5572 (cp_parser_late_parsing_default_args): Adjust call to
5573 push_nested_class.
5574 * pt.c (tsubst): Give it internal linkage.
5575 (tsubst_expr): Likewise.
5576 (tsubst_copy): Likewise.
5577 (tsubst_copy_and_build): Likewise.
5578 (push_access_scope_real): Likewise.
5579 (tsubst_friend_class): Likewise.
5580 (instantiate_class_template): Adjust call to pushclass.
5581 (value_dependent_expression_p): Give it external linkage.
5582 Robustify.
5583 (resolve_typename_type): New function.
5584 * semantics.c (finish_call_expr): Use build_new_op, not
5585 build_opfncall.
5586 (begin_constructor_declarator): Remove.
5587 (begin_class_definition): Adjust call to pushclass.
5588 (enter_scope_of): Remove.
5589 * typeck.c (comptypes): Resolve typename types as appropriate.
5590 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5591 (build_x_compound_expr): Likewise.
5592 (build_modify_expr): Likewise.
5593 (build_x_modify_expr): Likewise.
5594 * typeck2.c (build_x_arrow): Likewise.
5595
5596 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
5597
5598 * pt.c (last_pending_template) Declare GTY().
5599
5600 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5601
5602 PR c++/8591
5603 * parser.c (cp_parser_elaborated_type_specifier): Convert
5604 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5605 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5606
5607 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
5608
5609 PR c++/9437
5610 * pt.c (unify): Don't unify '*T' with 'U C::*'.
5611
5612 PR c++/3902
5613 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5614 inside a declarator.
5615
5616 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
5617
5618 * class.c (update_vtable_entry_for_fn): Add index parameter.
5619 Generate vcall thunk for covariant overriding from a virtual
5620 primary base.
5621 (dfs_modify_vtables): Adjust.
5622
5623 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
5624
5625 PR c++/9403
5626 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5627 template keyword.
5628 (cp_parser_base_specifier): Look for and consume a
5629 TEMPLATE keyword. Replace switch with array index.
5630
5631 PR c++/795
5632 * semantics.c (finish_non_static_data_member): Remember the
5633 field's type even in a template.
5634
5635 PR c++/9415
5636 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5637 already scoped.
5638
5639 PR c++/8545
5640 * parser.c (cp_parser_cast_expression): Be more tentative.
5641
5642 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5643
5644 * cp-tree.h (flagged_type_tree_s): Remove.
5645 (check_for_new_type): Likewise.
5646 * typeck2.c (check_for_new_type): Likewise.
5647
5648 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
5649
5650 * dump.c: ANSIfy function declarations and definitions.
5651
5652 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
5653
5654 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5655
5656 PR c++/9354
5657 * init.c (build_new): Set the type of the new-expression, even
5658 when processing_templte_decl.
5659
5660 PR c++/9216
5661 * parser.c (cp_parser_primary_expression): Improve error message
5662 for templates used in an expression context.
5663
5664 PR c++/8696
5665 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5666 parse when encountering "typedef".
5667
5668 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
5669
5670 * class.c, parser.c: ANSIfy function definitions and declarations.
5671
5672 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5673
5674 PR c++/9328
5675 * error.c (dump_decl): For an OVERLOAD, just print the name of the
5676 function; it doesn't make sense to try to print its type.
5677 * semantics.c (finish_typeof): Issue errors about invalid uses.
5678
5679 PR c++/9298
5680 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5681 function.
5682 (cp_parser_expression_statement): Use it.
5683 (cp_parser_explicit_instantiation): Likewise.
5684 * pt.c (do_decl_instantiation): Improve error handling logic.
5685
5686 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5687
5688 PR c++/9384
5689 * parser.c (cp_parser_using_declaration): Issue error messages
5690 about name resolution failures here.
5691
5692 PR c++/9388
5693 * class.c (currently_open_derived_class): Use dependent_type_p.
5694 * cp-tree.h (dependent_type_p): New function.
5695 (dependent_template_arg_p): Likewise.
5696 (dependent_template_p): Likewise.
5697 (type_dependent_expression_p): Likewise.
5698 * parser.c (cp_parser_dependent_type_p): Remove.
5699 (cp_parser_value_dependent_type_p): Likewise.
5700 (cp_parser_type_dependent_expression_p): Likewise.
5701 (cp_parser_dependent_template_arg_p): Likewise.
5702 (cp_parser_dependent_template_id_p): Likewise.
5703 (cp_parser_dependent_template_p): Likewise.
5704 (cp_parser_diagnose_invalid_type_name): Replace
5705 cp_parser_dependent_type_p with dependent_type_p, etc.
5706 (cp_parser_primary_expresion): Likewise.
5707 (cp_parser_nested_name_specifier_opt): Likewise.
5708 (cp_parser_postfix_expression): Likewise.
5709 (cp_parser_unary_expression): Likewise.
5710 (cp_parser_template_name): Likewise.
5711 (cp_parser_class_name): Likewise.
5712 (cp_parser_lookup_name): Likewise.
5713 * pt.c (dependent_type_p): New function.
5714 (value_dependent_expression_p): Likewise.
5715 (type_dependent_expression_p): Likewise.
5716 (dependent_template_arg_p): Likewise.
5717 (dependent_template_id_p): Likewise.
5718 (dependent_template_p): Likewise.
5719
5720 PR c++/9285
5721 PR c++/9294
5722 * parser.c (cp_parser_simple_declaration): Return quickly when
5723 encountering errors.
5724
5725 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5726
5727 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5728
5729 2003-01-17 Jason Merrill <jason@redhat.com>
5730
5731 PR c++/9167, c++/9358
5732 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5733
5734 2003-01-17 Jason Merrill <jason@redhat.com>
5735
5736 PR c++/9342
5737 * call.c (build_conditional_expr): Always do lvalue-rvalue
5738 conversion.
5739
5740 2003-01-17 Mark Mitchell <mark@codesourcery.com>
5741
5742 PR c++/9294
5743 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5744 * cp-tree.h (BASELINK_BINFO): Adjust.
5745 (BASELINK_FUNCTIONS): Likewise.
5746 (BASELINK_ACCESS_BINFO): Likewise.
5747 (tree_baselink): New structure.
5748 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5749 (lang_tree_node): Add baselink.
5750 * decl.c (cp_tree_node_structure): Add BASELINK case.
5751 * search.c (build_baselink): Adjust.
5752 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
5753 test from TREE_LIST case.
5754
5755 PR c++/9272
5756 * parser.c (cp_parser_constructor_declarator_p): Do not assume
5757 that a constructor cannot be declared outside of its own class.
5758
5759 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5760 be resolved, neither can the qualified name.
5761
5762 * rtti.c (get_pseudo_ti_desc): Fix thinko.
5763
5764 2003-01-16 Jason Merrill <jason@redhat.com>
5765
5766 PR c++/8564
5767 * init.c (build_vec_init): Re-add maxindex parm.
5768 (perform_member_init, build_aggr_init): Pass it.
5769 (build_new_1): Pass it. Use an incomplete array type for full_type.
5770 * typeck.c (build_modify_expr): Pass it.
5771 * cp-tree.h: Adjust.
5772
5773 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
5774
5775 * cp-tree.h (tsubst_copy_and_build): New declaration.
5776 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5777 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
5778 (tsubst_copy_and_build): New function.
5779
5780 2003-01-16 Mark Mitchell <mark@codesourcery.com>
5781
5782 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5783 (PARTIAL_INSTANTIATION_P): Remove.
5784 (IMPLICIT_TYPENAME_P): Likewise.
5785 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5786 (build_typename_type): Remove declaration.
5787 (parmlist_is_exprlist): Likewise.
5788 * decl.c (build_typename_type): Make it static, remove third
5789 parameter.
5790 (push_class_binding): Don't do implicit typename stuff.
5791 (make_typename_type): Likewise.
5792 (lookup_name_real): Likewise.
5793 (grokdeclarator): Don't try to convert declarations into
5794 initializations. Don't do implicit typename stuff.
5795 (parmlist_is_exprlist): Remove.
5796 (xref_basetypes): Simplify.
5797 * decl2.c (grokfield): Don't try to convert declarations into
5798 initializations.
5799 (build_anon_union_vars): Do this while processing templates, too.
5800 (finish_anon_union): Likewise.
5801 * error.c (dump_type): Remove implicit typename handling.
5802 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5803 (cp_parser_primary_expression): Correct handling of names not
5804 found by unqualified name lookup in templates.
5805 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5806 of types when possible.
5807 (cp_parser_simple_declaration): Complain intelligently about some
5808 invalid declarations.
5809 (cp_parser_member_declaration): Likewise.
5810 (cp_parser_constructor_declarator_p): Don't check when we're in a
5811 function scope.
5812 * pt.c (instantiate_class_template): Remove
5813 PARTIAL_INSTANTIATION_P gunk.
5814 * search.c (lookup_field_r): Don't build implicit typenames.
5815 (marked_pushdecls_p): Don't enter dependent base types.
5816 (unmarked_pushdecls_p): Likewise.
5817 * semantics.c (begin_class_definition): Remove implicit typename
5818 stuff.
5819
5820 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
5821
5822 PR c++/9212
5823 * parser.c (cp_parser_direct_declarator): If accepting either
5824 abstract or named, the name must be an unqualified-id.
5825
5826 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5827
5828 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5829
5830 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5831
5832 * decl2.c (check_classfn): Fix uninitialized warning.
5833 (build_anon_union_vars): Likewise.
5834 * pt.c (tsubst_copy): Likewise.
5835
5836 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
5837
5838 Further conform g++'s __vmi_class_type_info to the C++ ABI
5839 specification.
5840 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5841 the specification.
5842 (class_hint_flags): Likewise.
5843
5844 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5845
5846 * config-lang.in: Add semantics.c to gtfiles.
5847 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5848 (saved_scope): Likewise.
5849 (type_lookups): Remove.
5850 (deferred_access): New structure.
5851 (type_access_control): Remove.
5852 (save_type_access_control): Likewise.
5853 (reset_type_access_control): Likewise.
5854 (decl_type_access_control): Likewise.
5855 (push_deferring_access_checks): Declare.
5856 (resume_deferring_access_checks): Likewise.
5857 (stop_deferring_access_checks): Likewise.
5858 (pop_deferring_access_checks): Likewise.
5859 (get_deferred_access_checks): Likewise.
5860 (pop_to_parent_deferring_access_checks): Likewise.
5861 (perform_deferred_access_checks): Likewise.
5862 (perform_or_defer_access_check): Likewise.
5863 * decl.c (make_typename_type): Use perform_or_defer_access_check.
5864 (make_unbound_class_template): Likewise.
5865 (grokdeclarator): Don't call decl_type_access_control.
5866 * parser.c (cp_parser_context): Remove deferred_access_checks
5867 and deferring_access_checks_p fields.
5868 (cp_parser_context_new): Adjust.
5869 (cp_parser): Remove access_checks_lists.
5870 (cp_parser_defer_access_check): Remove.
5871 (cp_parser_start_deferring_access_checks): Remove.
5872 (cp_parser_stop_deferring_access_checks): Remove.
5873 (cp_parser_perform_deferred_access_checks): Remove.
5874 (cp_parser_nested_name_specifier_opt): Use new deferred access
5875 functions.
5876 (cp_parser_simple_declaration): Likewise.
5877 (cp_parser_template_id): Likewise.
5878 (cp_parser_function_definition): Likewise.
5879 (cp_parser_class_specifier): Likewise.
5880 (cp_parser_lookup_name): Likewise.
5881 (cp_parser_single_declaration): Likewise.
5882 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5883 (cp_parser_parse_tentatively): Likewise.
5884 (cp_parser_parse_definitely): Likewise.
5885 (yyparse): Likewise.
5886 (cp_parser_init_declarator): Remove access_checks parameter.
5887 Use new deferred access functions.
5888 (cp_parser_function_definition_from_specifiers_and_declarator):
5889 Likewise.
5890 (cp_parser_class_head): Remove deferring_access_checks_p and
5891 saved_access_checks parameters. Use new deferred access functions.
5892 (cp_parser_member_specification_opt): Don't call
5893 reset_type_access_control.
5894 * search.c (type_access_control): Remove.
5895 * semantics.c: Include "gt-cp-semantics.h".
5896 (deferred_type_access_control): Remove.
5897 (deferred_access_stack): New variable.
5898 (deferred_access_free_list): Likewise.
5899 (push_deferring_access_checks): New function.
5900 (resume_deferring_access_checks): Likewise.
5901 (stop_deferring_access_checks): Likewise.
5902 (pop_deferring_access_checks): Likewise.
5903 (get_deferred_access_checks): Likewise.
5904 (pop_to_parent_deferring_access_checks): Likewise.
5905 (perform_deferred_access_checks): New function, adapted from
5906 cp_parser_perform_deferred_access_checks.
5907 (perform_or_defer_access_check): New function, adapted from
5908 cp_parser_defer_access_check.
5909 (current_type_lookups): Remove.
5910 (deferred_type_access_control): Likewise.
5911 (decl_type_access_control): Likewise.
5912 (save_type_access_control): Likewise.
5913 (reset_type_access_control): Likewise.
5914 (begin_function_definition): Adjust.
5915 (begin_class_definiton): Likewise.
5916
5917 2003-01-13 Jason Merrill <jason@redhat.com>
5918
5919 PR c++/8748
5920 * class.c (build_base_path): Take the address before calling save_expr.
5921
5922 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5923 all the ambiguous conversions are bad.
5924
5925 * class.c (maybe_warn_about_overly_private_class): Don't stop
5926 searching when we find a nonprivate method.
5927
5928 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5929
5930 2003-01-12 Mark Mitchell <mark@codesourcery.com>
5931
5932 * cp-tree.h (get_arglist_len_in_bytes): Remove.
5933
5934 PR c++/9264
5935 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5936 typeame types more robustly.
5937
5938 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
5939
5940 * parser.c: Fix comment typos.
5941
5942 2003-01-10 Mark Mitchell <mark@codesourcery.com>
5943
5944 PR c++/9099
5945 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5946 an object_type which is not a class type.
5947
5948 2003-01-10 Geoffrey Keating <geoffk@apple.com>
5949
5950 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5951 (cp_parser_late_parsing_default_args): Likewise.
5952
5953 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
5954
5955 * cfns.gperf: ANSIfy function declarations.
5956 * cfns.h: Regenerate.
5957 * cp-tree.h: ANSIfy function declarations.
5958
5959 2003-01-10 Mark Mitchell <mark@codesourcery.com>
5960
5961 * cp-tree.h (reparse_absdcl_as_expr): Remove.
5962 (reparse_absdcl_as_casts): Likewise.
5963 (reparse_decl_as_expr): Likewise.
5964 (finish_decl_parsing): Likewise.
5965 * decl2.c (reparse_absdcl_as_expr): Remove.
5966 (reparse_absdcl_as_casts): Likewise.
5967 (repase_decl_as_expr): Likewise.
5968 (finish_decl_parsing): Likewise.
5969
5970 PR c++/9128
5971 PR c++/9153
5972 PR c++/9171
5973 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5974 function.
5975 (cp_parser_nested_name_specifier_opt): Correct the
5976 check_dependency_p false.
5977 (cp_parser_postfix_expression): Fix formatting.
5978 (cp_parser_decl_specifier_seq): Avoid looking for constructor
5979 declarators when possible.
5980 (cp_parser_template_id): Avoid performing name-lookup when
5981 possible.
5982 (cp_parser_class_head): Do not count specializations when counting
5983 levels of templates.
5984 (cp_parser_constructor_declarator_p): Return immediately if
5985 there's no chance that the tokens form a constructor declarator.
5986 * rtti.c (throw_bad_typeid): Add comment. Do not return an
5987 expression with reference type.
5988 (get_tinfo_decl_dynamic): Do not return an expression with
5989 reference type.
5990 (build_typeid): Add comment. Do not return an expression with
5991 reference type.
5992 * typeck.c (build_class_member_access_expr): Improve handling of
5993 conditionals and comma-expressions as objects.
5994
5995 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
5996
5997 * cfns.gperf: ANSIfy function declarations.
5998 * cfns.h: Regenerate.
5999 * cp-tree.h: ANSIfy function declarations.
6000 * parser.c: ANSIfy function declarations & definitions.
6001
6002 * decl.c (bad_specifiers): Fix parameter order error I introduced.
6003
6004 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6005
6006 Merge from pch-branch:
6007
6008 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6009
6010 Merge to tag pch-merge-20030102:
6011
6012 * semantics.c (finish_translation_unit): Don't call finish_file.
6013 * parser.c: Don't include ggc.h.
6014 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6015 read first token here. Don't allow PCH files after the first
6016 token is read.
6017 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6018 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6019 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6020 (cp_parser_late_parsing_for_member): Don't duplicate call to
6021 cp_lexer_set_source_position_from_token.
6022 (cp_parser_late_parsing_default_args): Likewise.
6023 (yyparse): Call finish_file after clearing the_parser.
6024
6025 2002-12-11 Geoffrey Keating <geoffk@apple.com>
6026
6027 * Make-lang.in: Remove $(GGC_H) from all dependencies.
6028 (CXX_TREE_H): Add $(GGC_H).
6029 * class.c: Don't include ggc.h.
6030 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6031 (method_name_cmp): Likewise.
6032 (resort_data): New variable.
6033 (resort_field_decl_cmp): New.
6034 (resort_method_name_cmp): New.
6035 (resort_sorted_fields): New.
6036 (resort_type_method_vec): New.
6037 (finish_struct_methods): Delete cast.
6038 (finish_struct_1): Delete cast.
6039 * cp-tree.h: Include ggc.h.
6040 (struct lang_type_class): Add reorder attribute to field `methods'.
6041 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6042 (resort_sorted_fields): New prototype.
6043 (resort_type_method_vec): New prototype.
6044 * call.c: Don't include ggc.h.
6045 * decl.c: Likewise.
6046 * decl2.c: Likewise.
6047 * init.c: Likewise.
6048 * lex.c: Likewise.
6049 * method.c: Likewise.
6050 * optimize.c: Likewise.
6051 * parse.y: Likewise.
6052 * pt.c: Likewise.
6053 * repo.c: Likewise.
6054 * search.c: Likewise.
6055 * semantics.c: Likewise.
6056 * spew.c: Likewise.
6057 * tree.c: Likewise.
6058
6059 * lang-specs.h: Remove comment.
6060
6061 2002-12-03 Geoffrey Keating <geoffk@apple.com>
6062
6063 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6064 (operator_name_info): Mark to be saved for PCH, specify size.
6065 (assignment_operator_name_info): Likewise.
6066
6067 2002-11-19 Geoffrey Keating <geoffk@apple.com>
6068
6069 * decl.c (anon_cnt): Mark to be saved for PCH.
6070
6071 2002-10-25 Geoffrey Keating <geoffk@apple.com>
6072
6073 * lex.c (init_reswords): Delete now-untrue comment.
6074 Allocate ridpointers using GGC.
6075
6076 2002-10-04 Geoffrey Keating <geoffk@apple.com>
6077
6078 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6079
6080 * g++spec.c (lang_specific_driver): Don't include standard
6081 libraries in `added'.
6082
6083 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
6084
6085 * decl2.c (finish_file): Call c_common_write_pch.
6086 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6087
6088 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
6089
6090 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6091 files when using g++.
6092 * lang-specs.h: Handle compiling C++ header files.
6093
6094 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6095
6096 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6097
6098 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6099
6100 * pt.c (push_access_scope_real): Call push_to_top_level for
6101 function in namespace scope.
6102 (pop_access_scope): Call pop_from_top_level for function in
6103 namespace scope.
6104
6105 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6106
6107 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6108
6109 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6110
6111 * Make-lang.in (c++.install-common, c++.install-man,
6112 c++.uninstall): Prepend $(DESTDIR) to destination paths in
6113 all (un)installation commands.
6114 (c++.install-common): Rewrite $(LN) commands to support
6115 DESTDIR with "ln" as well as with "ln -s".
6116
6117 2003-01-08 Jason Merrill <jason@redhat.com>
6118
6119 * parser.c (cp_parser_primary_expression): See through explicitly
6120 scoped ALIAS_DECLs, too.
6121
6122 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6123
6124 * decl.c: Remove some #if 0 code.
6125
6126 * decl.c: ANSIfy function declarations.
6127
6128 2003-01-07 Mark Mitchell <mark@codesourcery.com>
6129
6130 * parser.c (cp_parser_asm_definition): Correct handling of omitted
6131 operands.
6132
6133 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6134
6135 PR c++/9030
6136 * decl.c (make_typename_type): Check access only when tf_error.
6137 (make_unbound_class_template): Likewise.
6138 * pt.c (saved_access_scope): New variable.
6139 (push_access_scope_real): New function.
6140 (push_access_scope): Likewise.
6141 (pop_access_scope): Likewise.
6142 (tsubst_default_argument): Use them.
6143 (instantiate_template): Likewise.
6144 (regenerate_decl_from_template): Likewise.
6145 (instantiate_decl): Likewise.
6146 (get_mostly_instantiated_function_type): Likewise.
6147
6148 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
6149
6150 * tree.c: Delete bogus #if 0 code.
6151
6152 2003-01-07 Andreas Schwab <schwab@suse.de>
6153
6154 * class.c (layout_class_type): Don't use
6155 PCC_BITFIELD_TYPE_MATTERS if not defined.
6156
6157 2003-01-06 Mark Mitchell <mark@codesourcery.com>
6158
6159 PR c++/9165
6160 * decl2.c (build_cleanup): Mark the object as used.
6161
6162 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6163 (hash_local_specialization): New function.
6164 (register_local_specialization): Revert 2003-01-05 change.
6165 (instantiate_decl): Use hash_local_specialization when creating
6166 the local_specializations table.
6167
6168 * decl2.c (mark_used): Do not synthesize thunks.
6169
6170 * class.c (layout_class_type): Correct handling of unnamed
6171 bitfields wider than their types.
6172
6173 PR c++/9189
6174 * parser.c (cp_parser): Remove default_arg_types. Update
6175 documentation for unparsed_functions_queues.
6176 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6177 parameter.
6178 (cp_parser_new): Don't set parser->default_arg_types.
6179 (cp_parser_function_definition): Adjust usage of
6180 unparsed_funtions_queues.
6181 (cp_parser_class_specifier): Don't mess with
6182 parser->default_arg_types. Handle default argument processing in
6183 a separate phase from function body processing.
6184 (cp_parser_template_declaration_after_export): Adjust usage of
6185 unparsed_functions_queues.
6186 (cp_parser_late_parsing_for_member): Do not handle default
6187 arguments.
6188
6189 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
6190
6191 PR c++/9109
6192 * parser.c (cp_parser_declarator_kind): New enum.
6193 (cp_parser_declarator): Adjust.
6194 (cp_parser_direct_declarator): Adjust. Allow for either named or
6195 abstract declarator. Prefer abstract, if possible. Allow
6196 parenthesized function name.
6197 (cp_parser_condition): Adjust cp_parser_declarator call.
6198 (cp_parser_explicit_instantiation): Likewise.
6199 (cp_parser_init_declarator): Likewise.
6200 (cp_parser_type_id): Likewise.
6201 (cp_parser_function_definition): Likewise.
6202 (cp_parser_member_declaration): Likewise.
6203 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6204 the tentative parsing.
6205 (cp_parser_exception_declaration): Likewise.
6206
6207 2003-01-05 Mark Mitchell <mark@codesourcery.com>
6208
6209 * parser.c (cp_parser_template_parameter): Adjust call to
6210 cp_parser_parameter_declaration.
6211 (cp_parser_parameter_declaration_list): Likewise.
6212 (cp_parser_parameter_declaration): Replace
6213 greater_than_is_operator_p with template_parm_p parameter. Do not
6214 cache tokens for template default arguments.
6215
6216 * pt.c (retrieve_local_specialization): Use htab_find, not
6217 htab_find_with_hash.
6218 (register_local_specialization): Use htab_find_slot, not
6219 htab_find_slot_with_hash.
6220 (instantiate_decl): Pass a hash function to htab_create.
6221
6222 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6223
6224 * parser.c (cp_parser_binary_expression,
6225 cp_parser_multiplicative_expression,
6226 cp_parser_additive_expression, cp_parser_shift_expression,
6227 cp_parser_relational_expression, cp_parser_equality_expression,
6228 cp_parser_and_expression, cp_parser_exclusive_or_expression,
6229 cp_parser_inclusive_or_expression,
6230 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6231 cp_parser_binary_expression): Const-ify.
6232
6233 2003-01-04 Mark Mitchell <mark@codesourcery.com>
6234
6235 * method.c (use_thunk): Disable access control while building the
6236 body of the thunk.
6237
6238 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
6239
6240 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6241 front end.
6242
6243 2003-01-03 Matt Austern <austern@apple.com>
6244
6245 * cp-tree.h (struct lang_type_class): add field for key method
6246 (cp_global_trees): rename dynamic_classes to keyed_classes
6247 (key_method): add definition
6248 * class.c (finish_struct_1): compute class's key method, and add
6249 the class to keyed_classes list if there is no key method.
6250 * decl.c (finish_function): add class to keyed_classes list if we
6251 see a definition of the class's key method.
6252 * pt.c (instantiate_class_template): add template specialization
6253 of a dynamic class to keyed_classes list.
6254 * decl2.c (key_method): remove
6255 (finish_file): iterate only through keyed_classes list when
6256 deciding whether to emit vtables, remove class from its list after
6257 we do the emission.
6258
6259 2003-01-02 Jason Merrill <jason@redhat.com>
6260
6261 * call.c (build_conditional_expr): Stabilize lvalues properly.
6262 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6263 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6264 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6265
6266 * call.c (convert_like_real): Call decl_constant_value for an
6267 IDENTITY_CONV even if there are no more conversions.
6268
6269 * cvt.c (build_up_reference): Don't push unnamed temps.
6270
6271 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6272
6273 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6274 for a backend struct.
6275
6276 * except.c (wrap_cleanups_r, build_throw): Make
6277 MUST_NOT_THROW_EXPRs void.
6278 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6279
6280 * init.c (build_vec_delete_1): Pre-evaluate the base address.
6281
6282 * init.c (get_temp_regvar): Simplify logic.
6283
6284 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6285 our replacement is a decl.
6286
6287 * decl.c (cp_make_fname_decl): Push the decls inside the
6288 outermost scope.
6289
6290 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
6291
6292 PR c++/45, c++/3784
6293 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6294 the same too.
6295
6296 2003-01-03 Graham Stott <graham.stott@btinternet.com>
6297
6298 * parser.c (struct cp_parser): Add access_checks_lists field
6299 (cp_parser_simple_declaration): Use.
6300 (cp_parser_init_declarator): Likewise.
6301
6302 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6303
6304 * parser.c (cp_parser_declaration): Accept the __extension__
6305 keyword before the declaration.
6306
6307 PR c++/2843
6308 * parser.c (cp_parser_parameter_declaration): Allow attributes to
6309 appear after the declarator.
6310
6311 * call.c (build_new_method_call): Fix typo in message format
6312 string.
6313
6314 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6315
6316 * parser.c (cp_lexer_next_token_is): Declare it inline.
6317 (cp_lexer_set_source_position_from_token): Likewise.
6318 (cp_lexer_debugging_p): Likewise.
6319 (cp_parser_parsing_tentatively): Likewise.
6320 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6321 to the cp_lexer_peek_token.
6322
6323 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6324 expression.
6325
6326 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6327
6328 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6329 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6330 cp/repo.c: Fix copyright years.
6331
6332 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
6333
6334 * lex.c: Remove superfluous include of cpplib.h.
6335 (CONSTRAINT): Define without conditions.
6336 (init_cp_pragma): Use c_register_pragma.
6337
6338 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6339
6340 * .cvsignore: Remove.
6341
6342 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
6343
6344 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6345 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6346 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6347 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6348 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6349 copyright header.
6350 * lex.h: parse.y is dead, so don't mention it. Also replace the
6351 copyright header with the default GNU copyright header.
6352
6353 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6354
6355 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6356 (lookup_name_namespace_only): Likewise.
6357 (begin_only_namespace_names): Likewise.
6358 (end_only_namespace_names): Likewise.
6359 * decl.c (only_namespace_names): Remove.
6360 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6361 (lookup_name_real): Do not check only_namespace_names.
6362 (lookup_name_namespace_only): Remove.
6363 (begin_only_namespace_names): Likewise.
6364 (end_only_namespace_names): Likewise.
6365 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6366 nested-name-specifiers more gracefully.
6367 (cp_parser_class_or_namespace_name): Avoid looking up namespace
6368 names when they cannot possibly appear.
6369 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6370 (cp_parser_elaborated_type_specifier): Likewise.
6371 (cp_parser_namespace_name): Only look for namespace names.
6372 (cp_parser_lookup_name): Add is_namespace parameter.
6373 (cp_parser_lookup_name_simple): Adjust call to
6374 cp_parser_lookup_name.
6375
6376 * parser.c (cp_parser_dependent_type_p): Fix thinko.
6377
6378 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6379
6380 * .cvsignore: Update.
6381
6382 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
6383
6384 * class.c (modify_vtable_entry): Remove unused variable.
6385 (get_vcall_index): Always expect a non-thunk.
6386 (update_vtable_entry_for_fn): Combine covariant adjustments, when
6387 overriding a thunk. Pass get_vcall_index a non-thunk.
6388
6389 * decl2.c (finish_file): Mark undefined inlines as extern.
6390
6391 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6392
6393 * cp-tree.def (RETURN_INIT): Remove.
6394 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6395 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6396 (note_level_for_for): Remove.
6397 (note_level_for_try): Likewise.
6398 (note_level_for_catch): Likewise.
6399 (finish_named_return_value): Likewise.
6400 (do_pushlevel): Change prototype.
6401 (pending_lang_change): Remove.
6402 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6403 sk_for.
6404 (note_level_for_for): Remove.
6405 (note_level_for_try): Likewise.
6406 (note_level_for_catch): Likewise.
6407 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6408 * parser.c (cp_parser_context_free_list): Make it "deletable".
6409 (cp_parser_template_argument): Remove misleading comment.
6410 * pt.c (tsubst_expr): Remove RETURN_INIT code.
6411 * semantics.c (genrtl_named_return_value): Remove.
6412 (do_pushlevel): Take a scope kind as an argument.
6413 (begin_if_stmt): Adjust.
6414 (begin_while_stmt): Likewise.
6415 (begin_for_stmt): Likewise.
6416 (finish_for_init_stmt): Likewise.
6417 (begin_switch_stmt): Likewise.
6418 (begin_handler): Likewise.
6419 (begin_compound_stmt): Likewise.
6420 (finish_named_return_value): Remove.
6421 (cp_expand_stmt): Remove RETURN_INIT case.
6422 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6423
6424 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6425
6426 PR c++/9112
6427 * parser.c (cp_parser_direct_declarator): Handle erroneous
6428 parenthesized declarators correctly.
6429
6430 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6431
6432 * cp-tree.h (pending_lang_change): Declare.
6433
6434 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6435
6436 * parser.c (cp_parser_context_free_list): New variable.
6437 (cp_parser_context_new): Use it.
6438 (cp_parser_error): Check return code from
6439 cp_parser_simulate_error.
6440 (cp_parser_simulate_error): Return a value.
6441 (cp_parser_id_expression): Optimize common case.
6442 (cp_parser_class_name): Likewise.
6443 (cp_parser_class_specifier): Adjust call to
6444 cp_parser_late_parsing_default_args.
6445 (cp_parser_lookup_name): Optimize common case.
6446 (cp_parser_late_parsing_for_member): Adjust call to
6447 cp_parser_late_parsing_default_args.
6448 (cp_parser_late_parsing_default_args): Add scope parameter.
6449 (cp_parser_require): Avoid creating the error message unless it's
6450 needed.
6451 (cp_parser_parse_definitely): Place free'd contexts on the free
6452 list.
6453
6454 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6455
6456 2002-12-30 David Edelsohn <edelsohn@gnu.org>
6457
6458 * parser.c (cp_parser_parameter_declaration_clause): Treat system
6459 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6460
6461 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6462
6463 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6464 GCC, not GNU CC.
6465
6466 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6467
6468 * parse.y: Remove.
6469 * spew.c: Likewise.
6470 * Make-lang.in (gt-cp-spew.h): Remove.
6471 * cp-tree.h (do_pending_lang_change): Remove.
6472 (do_identifier): Change prototype.
6473 (finish_id_expr): Remove.
6474 * decl.c (lookup_name_real): Remove yylex variable.
6475 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6476 * lex.c (init_cpp_parse): Remove.
6477 (reduce_cmp): Likewise.
6478 (token_cmp): Likewise.
6479 (yychar): Likewise.
6480 (lastiddecl): Likewise.
6481 (token_count): Likewise.
6482 (reduce_count): Likewise.
6483 (yyhook): Likewise.
6484 (print_parse_statistics): Likewise.
6485 (do_pending_lang_change): Likewise.
6486 (do_identifier): Remove parsing parameter.
6487 * lex.h (lastiddecl): Remove.
6488 (looking_for_typename): Remove.
6489 (looking_for_template): Likewise.
6490 (pending_lang_change): Likewise.
6491 (yylex): Likewise.
6492 * semantics.c (finish_id_expr): Remove.
6493
6494 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6495 thread" correctly.
6496
6497 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6498
6499 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
6500 end, not the C front end.
6501
6502 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
6503
6504 * cp-tree.h (THUNK_TARGET): New macro.
6505 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6506 (finish_thunk): Remove offset parms.
6507 * class.c (find_final_overrider): Look through thunks.
6508 (get_vcall_index): Use THUNK_TARGET.
6509 (update_vtable_entry_for_fn): Look through thunks. Set covariant
6510 fixed offset here. Adjust finish_thunk call.
6511 (build_vtbl_initializer): Adjust finish_thunk calls.
6512 * mangle.c (mangle_call_offset): Remove superfluous if.
6513 (mangle_thunk): Adjust.
6514 * method.c (make_thunk): Adjust.
6515 (finish_thunk): Adjust.
6516 (thunk_adjust): Remove assert.
6517 (use_thunk): Use THUNK_TARGET
6518 * dump1.c (cp_dump_tree): Adjust thunk dumping.
6519
6520 PR c++/9054
6521 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6522 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6523
6524 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6525
6526 Remove traditional C constructs 4/n.
6527 * decl2.c (grok_method_quals, warn_if_unknown_interface,
6528 grok_x_components, cp_build_parm_decl, build_artificial_parm,
6529 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6530 delete_sanity, check_member_template, check_java_method,
6531 check_classfn, finish_static_data_member_decl, grokfield,
6532 grokbitfield, grokoptypename, grok_function_init,
6533 cplus_decl_attributes, constructor_name, defer_fn,
6534 build_anon_union_vars, finish_anon_union, coerce_new_type,
6535 coerce_delete_type, comdat_linkage, maybe_make_one_only,
6536 key_method, import_export_vtable, import_export_class,
6537 output_vtable_inherit, import_export_decl, import_export_tinfo,
6538 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6539 set_guard, start_objects, finish_objects,
6540 start_static_storage_duration_function,
6541 finish_static_storage_duration_function, get_priority_info,
6542 start_static_initialization_or_destruction,
6543 finish_static_initialization_or_destruction,
6544 do_static_initialization, do_static_destruction,
6545 prune_vars_needing_no_initialization, write_out_vars,
6546 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6547 add_using_namespace, merge_functions, ambiguous_decl,
6548 lookup_using_namespace, lookup_using_namespace,
6549 qualified_lookup_using_namespace, set_decl_namespace,
6550 decl_namespace, current_decl_namespace, push_decl_namespace,
6551 pop_decl_namespace, push_scope, pop_scope, add_function,
6552 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6553 lookup_arg_dependent, do_namespace_alias,
6554 validate_nonmember_using_decl, do_nonmember_using_decl,
6555 do_toplevel_using_decl, do_local_using_decl,
6556 do_class_using_decl, do_using_directive, check_default_args,
6557 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
6558 * parser.c (cp_parser_class_head): Use booleanss.
6559 * decl.c (walk_globals, walk_vtables): Likewise.
6560 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6561 walk_globals): Change return type from 'int' to 'bool'.
6562 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6563 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6564 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6565 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6566 qualifier_flags, tinfo_base_init, generic_initializer,
6567 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6568 dfs_class_hint_unmark, class_hint_flags, class_initializer,
6569 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6570 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6571 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6572 * repo.c (repo_compile_flags, repo_template_declared,
6573 repo_template_defined, repo_class_defined, repo_get_id,
6574 repo_template_used, repo_vtable_used, repo_inline_used,
6575 repo_tinfo_used, repo_template_instantiated, extract_string,
6576 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6577 finish_repo): Likewise.
6578 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6579 cxx_print_xnode): Likewise..
6580 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6581 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6582 * cxxfilt.c (demangle_it, print_demangler_list, usage,
6583 standard_symbol_characters, hp_symbol_characters, main, fatal):
6584 Likewise.
6585 (strip_underscore): Change type from 'int' to 'bool'.
6586 (main): Use boolean constants.
6587
6588 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6589
6590 Remove traditional C constructs 3/n.
6591 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6592 build_up_reference, warn_ref_binding, convert_to_reference,
6593 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6594 convert_to_void, convert, convert_force, build_type_conversion,
6595 build_expr_type_conversion, type_promotes_to,
6596 perform_qualification_conversions): Use C90 prototyping style.
6597 * decl2.c (grok_array_decl): Use boolean constant.
6598 (delete_sanity): Likewise.
6599 * typeck.c (build_unary_op): Likewise.
6600 * semantics.c (finish_switch_cond): Likewise.
6601 * parser.c (cp_parser_direct_new_declarator): Likewise.
6602 * init.c (build_new): Likewise.
6603
6604 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6605
6606 * Make-lang.in (po-generated): Remove parse.c.
6607 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
6608 ($(srcdir)/cp/parse.h): Remove target.
6609 ($(srcdir)/cp/parse.c): Likewise.
6610 (gt-cp-parse.h): Likewise.
6611 (gt-cp-parser.h): New target.
6612 (c++.distclean): Do not remove parse.output.
6613 (c++.maintainer-clean): Do not remove parse.c or parse.h.
6614 (cp/spew.o): Remove target.
6615 (cp/lex.o): Adjust dependencies.
6616 (cp/pt.o): Likewise.
6617 (cp/parse.o): Likewise.
6618 (cp/TAGS): Do not mention parse.c.
6619 (cp/parser.o): New target.
6620 * NEWS: Mention the new parser.
6621 * call.c (build_scoped_method_call): Simplify.
6622 (build_method_call): Likewise.
6623 (build_new_function_call): Adjust calls to add_function_candidate
6624 and add_template_candidate.
6625 (build_new_op): Improve handling of erroroneous operands.
6626 (convert_default_arg): Remove circular argument processing.
6627 (name_as_c_string): New function.
6628 (build_new_method_call): Use it.
6629 (perform_implicit_conversion): Use error_operand_p.
6630 * class.c (finish_struct_anon): Use constructor_name_p.
6631 (check_field_decls): Likewise.
6632 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6633 (resolve_address_of_overloaded_function): Likewise.
6634 (instantiate_type): Tweak pointer-to-member handling.
6635 (get_primary_binfo): Remove incorrect assertion.
6636 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6637 * cp-tree.h (DEFARG_TOKENS): New macro.
6638 (default_arg): New structure.
6639 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6640 (lang_tree_node): Add default_arg.
6641 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6642 (type_info_ref_type): New macro.
6643 (saved_scope): Make processing_explicit_instantiation a boolean.
6644 (check_access): New field.
6645 (unparsed_text): Remove.
6646 (language_function): Remove unparsed_inlines.
6647 (error_operand_p): New macro.
6648 (lang_decl): Adjust pending_inline_info.
6649 (DEFARG_POINTER): Remove.
6650 (tag_types): Add typenames.
6651 (lookup_ualified_name): Declare.
6652 (lookup_name_real): Likewise.
6653 (shadow_tag): Adjust prototype.
6654 (get_scope_of_declarator): Declare it.
6655 (process_next_inline): Remove it.
6656 (check_for_missing_semicolon): Likewise.
6657 (maybe_get_template_decl_from_type_decl): Declare it.
6658 (finish_label_stmt): Adjust prototype.
6659 (finish_non_static_data_meber): Declare it.
6660 (finish_pseudo_destructor_call_expr): Rename to ...
6661 (finish_pseudo_destructor_expr): ... this.
6662 (finish_compound_literal): Declare it.
6663 (begin_inline_definitions): Remove it.
6664 (init_spew): Remove.
6665 (peekyylex): Likewise.
6666 (arbitrate_lookup): Likewise.
6667 (frob_opname): Likewise.
6668 (maybe_snarf_defarg): Likewise.
6669 (add_defarg_fn): Likewise.
6670 (do_pending_defargs): Likewise.
6671 (done_pending_defargs): Likewise.
6672 (unprocessed_defarg_fn): Likewise.
6673 (replace_defarg): Likewise.
6674 (end_input): Likewise.
6675 (get_overloaded_fn): Likewise.
6676 * cvt.c (convert_to_reference): Improve error handling.
6677 * decl.c (lookup_name_real): Do not declare it static.
6678 (maybe_push_to_top_level): Set check_access.
6679 (identifier_type_value): Adjust call to lookup_name_real.
6680 (lookup_qualified_name): New method.
6681 (lookup_name_real): Remove special-case parsing code.
6682 (lookup_name-nonclass): Adjust call to lookup_name_real.
6683 (lookup_name_namespace_only): Likewise.
6684 (lookup_name): Likewise.
6685 (check_tag_decl): Return the type declared.
6686 (shadow_tag): Likewise.
6687 (register_dtor_fn): Tweak check_access.
6688 (grokfndecl): Use constructor_name_p.
6689 (get_scope_of_declarator): New function.
6690 (grokdeclarator): Obscure tweaks for slightly different declarator
6691 representations.
6692 (start_method): Return error_mark_node to indicate failure.
6693 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6694 * decl2.c (constructor_name_full): Simplify.
6695 (constructor_name): Use it.
6696 (build_expr_from_tree): Adjust for changes to do new parser.
6697 (push_scope): Improve robustness.
6698 (validate_nonmember_using_decl): Process declarations, not names.
6699 (do_class_using_decl): Likewise.
6700 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6701 here.
6702 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6703 * expr.c (cxx_expand_expr): Handle BASELINKs.
6704 * init.c (member_init_ok_or_else): Issue more errors.
6705 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6706 * lex.c: Do not include parse.h.
6707 (yypring): Do not declare.
6708 (yylval): Likewise.
6709 (make_reference_declarator): Remove error-generating code.
6710 (rid_to_yy): Remove.
6711 (cxx_init): Do not call init_spew.
6712 (yypring): Remove.
6713 (check_for_missing_semicolon): Remove.
6714 * lex.h (got_scope): Remove.
6715 (got_object): Remove.
6716 * method.c (hack_identifier): Use finish_non_static_data_member.
6717 (implicitly_declare_fn): Adjust use of constructor_name.
6718 * parser.c: New file.
6719 * pt.c (parse.h): Do not include it.
6720 (maybe_get_template_decl_from_template): Do not declare it.
6721 (finish_member_template_decl): Tweak.
6722 (begin_explicit_instantiation): Adjust for
6723 processing_explicit_instantiation being boolean.
6724 (end_explicit_instantiation): Likewise.
6725 (maybe_process_partial_specialization): Tighten specialization
6726 test.
6727 (retrieve_local_specialization): Adjust ue of hash table.
6728 (eq_local_specializations): New function.
6729 (register_local_specialization): Likewise.
6730 (push_template_decl_real): Remove unnecessary test.
6731 (maybe_get_template_decl_from_type_decl): Don't make it static.
6732 (for_each_template_parm_r): Handle TYPEOF_TYPE.
6733 (tsubst_copy): Use retrieive_local_specialization to handle
6734 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
6735 Handle COMPONENT_REFs with pseudo-destructor-expressions.
6736 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6737 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6738 (unify): Tweak handling of CONST_DECLs.
6739 (regenerate_decl_from_template): Use push_nested_class.
6740 (template_for_substitution): New funciton.
6741 (instantiate_decl): Use it. Register parameters as local
6742 specializations.
6743 * rtti.c (init_rtti_processing): Set type_info_ref_type.
6744 (build_typeid): Use it.
6745 (get_typeid): Likeise.
6746 * search.c (accessible_p): Use check_access, not
6747 flag_access_control.
6748 (adjust_result_of_qualified_name_lookup): Pay attention to the
6749 context_class.
6750 * semantics.c (finish_asm_stmt): Adjust error handling.
6751 (finish_label_stmt): Return the statement.
6752 (finish_non_static_data_member): New function.
6753 (finish_class_expr): Handle BASELINKs.
6754 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6755 (finish_object_call_expr): Simplify handling during templates.
6756 (finish_pseudo_destructor_call_expr): Rename to ...
6757 (finish_pseudo_dtor_expr): ... this.
6758 (finish_compound_literal): New function.
6759 (begin_inline_definitions): Remove.
6760 (finish_sizeof): Remove special template handling.
6761 * spew.c: Do not include parse.h.
6762 * tree.c (get_overloaded_fn): Remove.
6763 * typeck.c (build_class_member_access_expr): Handle
6764 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
6765 (lookup_destructor): New function.
6766 (finish_class_member_access_expr): Use it.
6767 (convert_arguments): Simplify.
6768 (build_unary_op): Handle BASELINKs.
6769
6770 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
6771
6772 PR c++/4803
6773 * decl2.c (mark_used): Defer inline functions.
6774 (finish_file): Merge deferred_fns loops. Check all used
6775 inline functions have a definition.
6776 * method.c (make_thunk): Thunks are not inline.
6777
6778 PR c++/5116, c++/764
6779 * call.c (build_new_op): Make sure template class operands are
6780 instantiated.
6781
6782 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
6783
6784 PR C++/7964
6785 * cp-tree.h (resolve_scoped_fn_name): Prototype.
6786 * call.c (resolve_scoped_fn_name): New function. Deal with
6787 more template expansion. Broken out of ...
6788 * parse.y (parse_finish_call_expr): ... here. Call it.
6789 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6790 resolve_scoped_fn_name and build_call_from_tree.
6791
6792 PR c++/9053
6793 * decl.c (duplicate_decls): Templates may be disambiguated by
6794 return type.
6795
6796 PR c++/8702
6797 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6798 conversion operators on failure.
6799
6800 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6801
6802 Remove traditional C constructs 2/n.
6803 * call.c (tourney, build_field_call, equal_functions, joust,
6804 compare_ics, build_over_call, build_java_interface_fn_ref,
6805 convert_like_real, op_error, build_object_call, resolve_args,
6806 build_vfield_ref, check_dtor_name, build_scoped_method_call,
6807 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6808 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6809 standard_conversion, reference_related_p,
6810 reference_compatible_p, convert_class_to_reference,
6811 direct_reference_binding, reference_binding,
6812 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6813 add_template_conv_candidate, any_viable, any_strictly_viable,
6814 build_this, splice_viable, print_z_candidates,
6815 build_user_type_conversion, build_new_function_call,
6816 conditional_conversion, build_conditional_expr, build_new_op,
6817 build_op_delete_call, enforce_access, call_builtin_trap,
6818 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6819 convert_default_arg, type_passed_as, convert_for_arg_passing,
6820 in_charge_arg_for_name, is_properly_derived_from,
6821 maybe_handle_implicit_object, maybe_handle_ref_bind,
6822 source_type, add_warning, can_convert, can_convert_arg,
6823 perform_implicit_conversion, can_convert_arg_bad,
6824 initialize_reference, add_conv_candidate,
6825 add_template_candidate_real, add_template_candidate): Ansify.
6826
6827 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
6828
6829 PR c++/8572
6830 * cp-tree.h (grokoptypename): Add SCOPE parameter.
6831 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6832 if in a template scope.
6833 * parse.y (unoperator): Return the scope.
6834 (operator_name): Adjust grokoptypename call.
6835
6836 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6837
6838 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6839 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
6840 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6841
6842 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
6843
6844 * ChangeLog: Fix a typo.
6845 * class.c: Fix comment typos.
6846 * cp-tree.h: Likewise.
6847
6848 2002-12-18 Jason Merrill <jason@redhat.com>
6849
6850 Handle anonymous unions at the tree level.
6851 C++ ABI change: Mangle anonymous unions using the name of their
6852 first named field (by depth-first search). Should not cause
6853 binary compatibility problems, though, as the compiler previously
6854 didn't emit anything for affected unions.
6855 * cp-tree.def (ALIAS_DECL): New tree code.
6856 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
6857 first field, not the largest.
6858 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
6859 push the decl, and write it out at namespace scope.
6860 * decl.c (lookup_name_real): See through an ALIAS_DECL.
6861 (pushdecl): Add namespace bindings for ALIAS_DECLs.
6862 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6863 of a decl which doesn't have one.
6864 * typeck.c (build_class_member_access_expr): Don't recurse if
6865 we already have the type we want.
6866
6867 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6868
6869 PR c++/8099
6870 * friend.c (make_friend_class): Allow partial specialization
6871 when declaration is not a template friend.
6872
6873 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6874
6875 PR c++/3663
6876 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6877 TREE_PROTECTED to created decl nodes.
6878
6879 2002-12-18 Mark Mitchell <mark@codesourcery.com>
6880
6881 * class.c (build_base_field): Do not set DECL_PACKED on the
6882 FIELD_DECL.
6883
6884 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
6885
6886 * cp-tree.h (struct tree_srcloc): Use location_t.
6887 (SOURCE_LOCUS): New.
6888 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6889
6890 2002-12-17 Jason Merrill <jason@redhat.com>
6891
6892 * decl.c (finish_function): Also complain about no return in
6893 templates.
6894 * semantics.c (finish_return_stmt): Also call check_return_expr in
6895 templates.
6896 * typeck.c (check_return_expr): In a template, just remember that we
6897 saw a return.
6898
6899 2002-12-16 Jason Merrill <jason@redhat.com>
6900
6901 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6902 of the CALL_EXPR.
6903
6904 * semantics.c (do_pushlevel): Call pushlevel after adding the
6905 SCOPE_STMT.
6906 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6907 * parse.y (function_body): Go back to using compstmt.
6908 * decl.c (pushdecl): Skip another level to get to the parms level.
6909
6910 * call.c (build_new_method_call): Use is_dummy_object to determine
6911 whether or not to evaluate the object parameter to a static member
6912 function.
6913
6914 2002-12-14 Jason Merrill <jason@redhat.com>
6915
6916 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6917 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6918 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6919 don't bother with an AGGR_INIT_EXPR.
6920 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6921 just generate a new decl normally. Take return slot parm.
6922 * cp-tree.h: Adjust prototype.
6923
6924 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
6925
6926 PR C++/8031
6927 * cvt.c (convert_to_pointer_force): Don't try comparing against
6928 erronous type.
6929
6930 2002-12-13 Geoffrey Keating <geoffk@apple.com>
6931
6932 * cp-tree.h: Have the multiple-include guards around
6933 the entire file.
6934
6935 2002-12-10 David Edelsohn <edelsohn@gnu.org>
6936
6937 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6938 for SPEW_DEBUG.
6939 (snarf_method): Same.
6940 (snarf_defarg): Same.
6941
6942 2002-12-10 Mark Mitchell <mark@codesourcery.com>
6943
6944 PR c++/8372
6945 * pt.c (tsubst_copy): Handle destructor names more correctly.
6946
6947 2002-12-10 Matt Austern <austern@apple.com>
6948
6949 * cp-tree.h: get rid of needs_virtual_reinit bit.
6950
6951 2002-12-09 Mark Mitchell <mark@codesourcery.com>
6952
6953 * NEWS: Document removal of in-class initialization extension for
6954 static data members of non-arithmetic, non-enumeration type.
6955 * decl.c (check_static_variable_definition): Do not allow that
6956 extension.
6957 * decl2.c (grokfield): Do not call digest_init when processing
6958 templates.
6959
6960 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6961
6962 * error.c (dump_expr): Fix format specifier warning.
6963
6964 2002-12-04 Geoffrey Keating <geoffk@apple.com>
6965
6966 * class.c (finish_struct_1): Correct comment.
6967 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6968
6969 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6970
6971 PR C++/8799
6972 * error.c (dump_expr): Don't ever try to dump a non-existent
6973 expression.
6974
6975 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
6976
6977 Implement covariant returns.
6978 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6979 (struct lang_decl_flags): Add this_thunk_p flag.
6980 Rename vcall_offset to virtual_offset.
6981 (struct lang_decl): Rename delta to fixed_offset.
6982 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6983 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6984 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6985 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6986 (make_thunk): Add this_adjusting arg.
6987 (finish_thunk): Declare.
6988 (mangle_thunk): Add this_adjusting arg.
6989 * class.c (get_vcall_index): Use base function for lookup.
6990 (update_vtable_entry_for_fn): Generate covariant thunk.
6991 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6992 (build_vtbl_initializer): Use base function for lookup.
6993 Finish covariant thunk here. Adjust thunk generation.
6994 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6995 Adjust thunk dumping.
6996 * mangle.c (mangle_call_offset): New function.
6997 (mangle_thunk): Adjust for covariant thunks.
6998 * method.c (make_thunk): Adjust. Do not set name here.
6999 (finish_thunk): New function. Set name here.
7000 (use_thunk): Generate covariant thunks too.
7001 (thunk_adjust): New function.
7002 * search.c (covariant_return_p): Remove. Fold into ...
7003 (check_final_overrider): ... here. Simplify.
7004 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7005
7006 2002-12-03 Jason Merrill <jason@redhat.com>
7007
7008 PR c++/8674
7009 * call.c (build_over_call): Check specifically for TARGET_EXPR
7010 when eliding.
7011
7012 PR c++/8461, c++/8625
7013 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7014 (cp_convert_parm_for_inlining): Remove.
7015 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7016 Remove.
7017 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7018 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7019
7020 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7021 an ambiguous conversion.
7022
7023 2002-12-03 Mark Mitchell <mark@codesourcery.com>
7024
7025 PR c++/8688
7026 * decl.c (reshape_init): Handle erroneous initializers.
7027
7028 2002-12-02 Mark Mitchell <mark@codesourcery.com>
7029
7030 PR c++/8720
7031 * spew.c (remove_last_token): Make sure that last_chunk is set
7032 correctly.
7033
7034 PR c++/8615
7035 * error.c (dump_expr): Handle character constants with
7036 TREE_OVERFLOW set.
7037
7038 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7039
7040 DR 180
7041 * decl.c (grokdeclarator): Require class-key for all friend class.
7042 Output the correct type and context in the error message.
7043
7044 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7045
7046 PR c++/5919
7047 * pt.c (unify): Use variably_modified_type_p to test validity of
7048 template argument types.
7049
7050 PR c++/8727
7051 * cp-tree.h (lang_type_class): Add typeinfo_var.
7052 (CLASSTYPE_TYPEINFO_VAR): New macro.
7053 * rtti.c (get_tinfo_decl): Use it.
7054
7055 PR c++/8663
7056 * init.c (expand_member_init): Always get the main variant of a
7057 base class.
7058
7059 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7060
7061 PR c++/8332
7062 PR c++/8493
7063 * decl.c (cxx_init_decl_processing): Use size_type_node, not
7064 c_size_type_node.
7065 * decl2.c (coerce_new_type): Likewise.
7066 * except.c (do_allocate_exception): Likewise.
7067
7068 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7069
7070 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7071 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7072 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7073 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7074 typeck2.c: Include coretypes.h and tm.h.
7075 * Make-lang.in: Update dependencies.
7076
7077 2002-11-30 Mark Mitchell <mark@codesourcery.com>
7078
7079 PR c++/8227
7080 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7081 (check_initializer): Validate the type of the initialized
7082 variable, even if the initializer is absent.
7083 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7084
7085 PR c++/8214
7086 * typeck.c (convert_for_assignment): Do not use
7087 decl_constant_value on the operand.
7088
7089 PR c++/8511
7090 * pt.c (instantiate_decl): Handle template friends defined outside
7091 of the class correctly.
7092
7093 2002-11-29 Joe Buck <jbuck@synopsys.com>
7094
7095 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7096 anonymous structs.
7097
7098 2002-11-29 Mark Mitchell <mark@codesourcery.com>
7099
7100 * class.c (walk_subobject_offsets): Recur on binfos as well as on
7101 types.
7102 (layout_nonempty_base_or_field): Pass it a binfo when processing a
7103 base class.
7104 (layout_empty_base): Likewise.
7105 (build_base_field): Likewise.
7106
7107 2002-11-27 Mark Mitchell <mark@codesourcery.com>
7108
7109 * class.c (build_base_field): Make sure we get the canonical base
7110 when descending through primary bases.
7111
7112 2002-11-26 Geoffrey Keating <geoffk@apple.com>
7113
7114 * decl.c (check_initializer): Don't error on initialisation of
7115 a scalar with a brace-enclosed expression.
7116
7117 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
7118
7119 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7120 (template_parms_equal): Remove prototype.
7121 * typeck.c (buuld_indirect_ref): Reformat.
7122
7123 2002-11-25 Jason Merrill <jason@redhat.com>
7124
7125 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7126 and a DO_STMT.
7127
7128 2002-11-25 Mark Mitchell <mark@codesourcery.com>
7129
7130 * tree.c (cp_build_qualified_type_real): Correct handling of
7131 array types.
7132 * class.c (walk_subobject_offsets): Fix thinko.
7133 (build_base_field): Record offsets of empty bases in primary
7134 virtual bases.
7135 (layout_class_type): Record offsets of empty bases in fields.
7136
7137 * search.c (is_subobject_of_p_1): Fix thinko.
7138 (lookup_field_queue_p): Likewise.
7139
7140 2002-11-24 Mark Mitchell <mark@codesourcery.com>
7141
7142 * class.c (layout_class_type): Reuse tail padding when laying out
7143 virtual bases.
7144
7145 2002-11-22 Mark Mitchell <mark@codesourcery.com>
7146
7147 * rtti.c (qualifier_flags): Fix thinko.
7148
7149 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7150
7151 Remove traditional C constructs 1/n.
7152 * cp-tree.h (init_method, set_mangled_name_for_decl,
7153 build_opfncall, hack_identifier, make_thunk, use_thunk,
7154 synthesize_method, implicitly_declare_fn,
7155 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7156 maybe_clone_body): Remove use of PARAMS.
7157
7158 * method.c (do_build_assign_ref, do_build_copy_constructor,
7159 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7160 Likewise.
7161 (synthesize_method): Use 'bool' type and constants instead of
7162 'int'.
7163 (locate_copy): Likewise.
7164 (implicitly_declare_fn): Likewise.
7165
7166 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7167 Remove old-style declaration.
7168 (maybe_clone_body): Use 'bool' type and constants.
7169
7170 2002-11-21 Glen Nakamura <glen@imodulo.com>
7171
7172 PR c++/8342
7173 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7174 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7175 of the branches of a COND_EXPR.
7176
7177 2002-11-19 Mark Mitchell <mark@codesourcery.com>
7178
7179 * pt.c (for_each_template_parm): Free allocated memory.
7180 * search.c (is_subobject_of_p_1): New function.
7181 (is_subobject_of_p): Avoid walking virtual bases multiple times.
7182
7183 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7184
7185 * g++spec.c (lang_specific_spec_functions): New.
7186
7187 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
7188
7189 * ChangeLog: Follow spelling conventions.
7190 * class.c: Likewise.
7191 * decl2.c: Likewise.
7192
7193 2002-11-14 Zack Weinberg <zack@codesourcery.com>
7194
7195 * search.c (dfs_push_decls): Do not try to reorder elements
7196 3..n of method_vec if method_vec has only two elements.
7197 Reverse order of two tests to avoid accessing unallocated
7198 memory.
7199
7200 2002-11-14 Mark Mitchell <mark@codesourcery.com>
7201
7202 * class.c (dfs_find_final_overrider): Adjust so that the most
7203 derived object is a binfo, rather than a class type.
7204 (find_final_overrider): Likewise.
7205 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7206 (add_vcall_offset): Likewise.
7207
7208 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7209
7210 PR c++/8389
7211 * pt.c (instantiate_template): Push class scope for member
7212 functions.
7213 (get_mostly_instantiated_function_type): Likewise. Don't call
7214 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
7215 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7216 * mangle.c (write_encoding, write_unqualified_name): Adjust.
7217
7218 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7219
7220 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7221 vcall offfsets. Split out ...
7222 (add_vcall_offset): ... new function.
7223
7224 PR c++/8338
7225 * pt.c (for_each_template_parm): Add htab parameter.
7226 (process_partial_specialization): Adjust call.
7227 (push_template_decl_real): Likewise.
7228 (pair_fn_data): Add visited.
7229 (for_each_template_parm_r): Avoid walking duplicates more than
7230 once.
7231 (uses_template_parms): Adjust call to for_each_template_parm.
7232
7233 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7234
7235 * class.c (add_implicitly_declared_members): Put implicitly
7236 declared functions at the end of TYPE_METHODs when -fabi-version
7237 is at least 2.
7238
7239 2002-11-05 Geoffrey Keating <geoffk@apple.com>
7240
7241 * decl2.c (finish_file): Correct spelling.
7242
7243 2002-11-03 Mark Mitchell <mark@codesourcery.com>
7244
7245 * call.c (build_special_member_call): Do not try to lookup VTTs by
7246 name.
7247 * class.c (vtbl_init_data): Add generate_vcall_entries.
7248 (get_vtable_decl): Do not look up virtual tables by name.
7249 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7250 (set_primary_base): Do not set CLASSTYPE_RTTI.
7251 (determine_primary_base): Likewise.
7252 (get_matching_virtual): Remove.
7253 (get_vcall_index): New function.
7254 (update_vtable_entry_for_fn): Do not try to use virtual thunks
7255 when they are not required. Assign vcall indices at this point.
7256 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7257 Do update dynamic_classes.
7258 (build_vtt): Do not add VTTs to the symbol table.
7259 (build_ctor_vtbl_group): Likewise.
7260 (build_vtbl_initializer): Simplify handling of vcall indices.
7261 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7262 for the most derived class.
7263 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7264 the vtable.
7265 * cp-tree.h (dynamic_classes): New macro.
7266 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
7267 (CLASSTYPE_RTTI): Remove.
7268 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7269 (CLASSTYPE_VCALL_INDICES): New macro.
7270 (CLASSTYPE_VTABLES): Likewise.
7271 (BV_USE_VCALL_INDEX_P): Remove.
7272 (build_vtable_path): Remove.
7273 * decl2.c (finish_vtable_vardecl): Remove.
7274 (key_method): Remove #if 0'd code.
7275 (finish_vtable_vardecl): Rename to ...
7276 (maybe_emit_vtables): ... this.
7277 (finish_file): Use it.
7278 * search.c (look_for_overrides_here): Update comment.
7279
7280 2002-11-01 Zack Weinberg <zack@codesourcery.com>
7281
7282 PR c/7353 redux
7283 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7284
7285 2002-10-30 Jason Merrill <jason@redhat.com>
7286
7287 PR c++/8186
7288 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7289 * call.c (convert_for_arg_passing): Set it.
7290 * except.c (stabilize_throw_expr): Recurse for such an arg.
7291
7292 2002-10-31 Mark Mitchell <mark@codesourcery.com>
7293
7294 * cp-tree.h (lang_decl_flags): Remove init_priority.
7295 (lang_decl): Add delta.
7296 (GLOBAL_INIT_PRIORITY): Remove.
7297 (THUNK_DELTA): Revise definition.
7298 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7299 * dump.c (cp_dump_tree): Don't dump it.
7300
7301 2002-10-30 Mark Mitchell <mark@codesourcery.com>
7302
7303 PR c++/8160
7304 * typeck2.c (process_init_constructor): Call complete_array_type.
7305
7306 PR c++/8149
7307 * decl.c (make_typename_type): Issue errors about invalid results.
7308
7309 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7310
7311 Core issue 287, PR c++/7639
7312 * cp-tree.h (lang_type_class): Add decl_list field.
7313 (CLASSTYPE_DECL_LIST): New macro.
7314 (maybe_add_class_template_decl_list): Add declaration.
7315 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7316 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7317 (maybe_add_class_template_decl_list): New function.
7318 (add_implicitly_declared_members): Use it.
7319 * decl.c (maybe_process_template_type_declaration): Likewise.
7320 (pushtag): Likewise.
7321 * friend.c (add_friend): Likewise.
7322 (make_friend_class): Likewise.
7323 * semantics.c (finish_member_declaration): Likewise.
7324 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7325 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7326 to process members and friends in the order of declaration.
7327
7328 2002-10-29 Mark Mitchell <mark@codesourcery.com>
7329
7330 PR c++/8287
7331 * decl.c (finish_destructor_body): Create the label to jump to
7332 when returning from a destructor here.
7333 (finish_function_body): Rather than here.
7334
7335 2002-10-25 Zack Weinberg <zack@codesourcery.com>
7336
7337 PR c++/7266
7338 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7339 SCOPE_REF is not null before dereferencing it.
7340
7341 2002-10-25 Mark Mitchell <mark@codesourcery.com>
7342
7343 * call.c (build_over_call): Use DECL_CONTEXT, not
7344 DECL_VIRTUAL_CONTEXT.
7345 * class.c (modify_vtable_entry): Don't mess with
7346 DECL_VIRTUAL_CONTEXT.
7347 (set_vindex): Remove.
7348 (set_primary_base): Remove vfuns_p parameter.
7349 (determine_primary_base): Likewise.
7350 (modify_all_vtables): Likewise.
7351 (layout_class_type): Likewise. Adjust calls to other functions
7352 accordingly.
7353 (finish_struct_1): Adjust calls to modified functions. Set
7354 DECL_VINDEX here.
7355 * cp-tree.h (lang_type_class): Remove vsize.
7356 (CLASSTYPE_VSIZE): Remove.
7357 (lang_decl): Remove thunks.
7358 (DECL_THUNKS): Adjust.
7359 (DECL_VIRTUAL_CONTEXT): Remove.
7360 (duplicate_decls): Don't copy it.
7361 * pt.c (build_template_decl): Don't set it.
7362 (tsubst_decl): Likewise.
7363 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7364
7365 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7366 (build_vtable_entry): Remove.
7367 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7368 (lang_decl): Add thunks.
7369 (DECL_THUNKS): New macro.
7370 * decl.c (duplicate_decls): Copy it.
7371 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7372 * semantics.c (emit_associated_thunks): Simplify.
7373
7374 2002-10-24 David Edelsohn <edelsohn@gnu.org>
7375
7376 PR c++/7228
7377 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7378 lang_type structure exists before accessing field.
7379 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7380 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7381 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7382 * class.c (check_field_decls): Use new macros.
7383 * typeck2.c (process_init_constructor): Remove redundant check for
7384 existence of lang_type structure.
7385
7386 2002-10-24 Mark Mitchell <mark@codesourcery.com>
7387
7388 * class.c (end_of_base): New method.
7389 (end_of_class): Use it. Check indirect virtual bases.
7390
7391 * class.c (check_field_decls): Fix typo.
7392
7393 2002-10-23 Mark Mitchell <mark@codesourcery.com>
7394
7395 PR c++/8067
7396 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7397 related variables.
7398
7399 PR c++/7679
7400 * spew.c (next_token): Do not return an endless stream of
7401 END_OF_SAVED_INPUT tokens.
7402 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7403 the cached token stream.
7404 (snarf_defarg): Likewise.
7405
7406 2002-10-23 Zack Weinberg <zack@codesourcery.com>
7407
7408 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7409 variably_modified_type_p.
7410 * cp-tree.h: Remove prototype of variably_modified_type_p.
7411 * tree.c (variably_modified_type_p): Remove; now implemented
7412 in language-independent code.
7413
7414 2002-10-22 Mark Mitchell <mark@codesourcery.com>
7415
7416 PR c++/6579
7417 * spew.c (snarf_parenthesized_expression): New function.
7418 (snarf_block): Use it.
7419
7420 2002-10-22 Richard Henderson <rth@redhat.com>
7421
7422 * method.c (use_thunk): Always compute vcall_value; assert that
7423 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
7424 for vcall thunks as well.
7425
7426 2002-10-21 Mark Mitchell <mark@codesourcery.com>
7427
7428 * class.c (empty_base_at_nonzero_offset_p): New function.
7429 (layout_nonempty_base_or_field): Do not check for conflicts when
7430 laying out a virtual base using the GCC 3.2 ABI.
7431 (build_base_field): Correct checking for presence of empty classes
7432 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7433
7434 * class.c (include_empty_classes): Use normalize_rli.
7435 (layout_class_type): Likewise.
7436
7437 * decl.c (reshape_init): Tweak handling of character arrays.
7438
7439 PR c++/8218
7440 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7441 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7442 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7443 (check_field_decls): Likewise.
7444 (layout_class_type): Likewise.
7445 (finish_struct_1): Initialize it.
7446 (walk_subobject_offsets): Use it to prune searches.
7447
7448 2002-10-20 Mark Mitchell <mark@codesourcery.com>
7449
7450 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7451 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7452 TARGET_ASM_OUTPUT_MI_THUNK in comments.
7453
7454 2002-10-18 Zack Weinberg <zack@codesourcery.com>
7455
7456 * decl.c (start_decl): Point users of the old initialized-
7457 typedef extension at __typeof__.
7458
7459 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7460
7461 * Make-lang.in (method.o): Depend on TARGET_H.
7462 * method.c (target.h): Include it.
7463 (use_thunk): Use target hooks. Use vcall thunks, if available.
7464
7465 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7466
7467 * class.c (base_derived_from): Make sure return value is a bool.
7468
7469 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7470
7471 * class.c (find_final_overrider_data_s): Remove overriding_fn and
7472 overriding_base.
7473 (dfs_base_derived_from): New function.
7474 (base_derived_from): Likewise.
7475 (dfs_find_final_overrider): Use base_derived_from.
7476 (find_final_overrider): Adjust.
7477
7478 2002-10-18 Jason Merrill <jason@redhat.com>
7479
7480 PR c++/8080
7481 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7482 with condition decls in a template.
7483
7484 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
7485
7486 * class.c (add_method): Compare template parms too.
7487
7488 2002-10-17 Mark Mitchell <mark@codesourcery.com>
7489
7490 PR c++/7584
7491 * class.c (handle_using_decl): Allow the declaration used to be
7492 from an ambiguous base.
7493
7494 * pt.c (convert_template_argument): Revert this change:
7495 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7496 * pt.c (convert_template_argument): Do not fold non-type
7497 template rguments when inside a template.
7498
7499 * init.c (expand_default_init): Handle brace-enclosed initializers
7500 correctly.
7501
7502 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7503
7504 * mangle.c (write_expression): Correct handling of enumeration
7505 constants.
7506 (write_template_arg): Likewise.
7507 * pt.c (convert_template_argument): Do not fold non-type template
7508 arguments when inside a template.
7509
7510 PR c++/7478
7511 * cvt.c (convert_to_reference): Allow references as the incoming
7512 type.
7513
7514 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7515
7516 PR c++/7524
7517 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7518 build_qualified_type.
7519
7520 2002-10-15 Richard Henderson <rth@redhat.com>
7521
7522 * error.c (dump_expr): Use real_to_decimal directly, and with
7523 the new arguments.
7524
7525 2002-10-15 Mark Mitchell <mark@codesourcery.com>
7526
7527 * decl.c (reshape_init): Fix typo.
7528
7529 * cp-tree.h (operator_name_info_t): Add arity.
7530 * lex.c (init_operators): Initialize it.
7531 * mangle.c (write_conversion_operator_name): New function.
7532 (write_unqualified_name): Use it.
7533 (write_template_args): Accept template arguments as a TREE_LIST.
7534 (write_expression): Adjust handling of qualified names to match
7535 specification.
7536
7537 2002-10-15 Jason Merrill <jason@redhat.com>
7538
7539 * call.c (call_builtin_trap): New fn.
7540 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
7541 (build_call): Don't set current_function_returns_abnormally outside
7542 a function.
7543
7544 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7545
7546 * class.c (check_field_decls): Remove empty_p parameter. Instead,
7547 clear CLASSTYPE_EMPTY_P.
7548 (build_base_field): Likewise.
7549 (build_base_fields): Likewise.
7550 (check_bases_and_members): Likewise.
7551 (create_vtbl_ptr): Likewise.
7552 (layout_class_type): Likewise. Ensure that empty classes have
7553 size zero when used as base classes in the 3.2 ABI.
7554 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7555 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
7556 parameter.
7557 (is_empty_class): Correct definition when using post-3.2 ABI.
7558 * cp-tree.h (lang_type_class): Add empty_p.
7559 (CLASSTYPE_EMPTY_P): New macro.
7560
7561 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
7562
7563 * init.c (build_delete): Do not apply save_expr for arrays.
7564 (build_vec_delete): Likewise.
7565
7566 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7567
7568 * decl.c (layout_var_decl): Call layout_decl even for variables
7569 whose type is an array with unspecified bounds.
7570
7571 PR c++/7176
7572 * lex.c (do_identifier): Add another option for the parsing
7573 parameter.
7574 * parse.y (do_id): Use it.
7575
7576 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
7577
7578 PRs C++/6803, C++/7721 and C++/7803
7579 * decl.c (grokdeclarator): Gracefully handle template-name as
7580 decl-specifier.
7581
7582 2002-10-11 Jason Molenda <jmolenda@apple.com>
7583
7584 * init.c (build_field_list): Provide uses_unions_p with a default
7585 value.
7586
7587 2002-10-11 Mark Mitchell <mark@codesourcery.com>
7588
7589 PR c++/5661
7590 * cp-tree.h (variably_modified_type_p): New function.
7591 (grokdeclarator) Tighten check for variably modified types as
7592 fields.
7593 * pt.c (convert_template_argument): Do not allow variably modified
7594 types as template arguments.
7595 * tree.c (variably_modified_type_p): New function.
7596
7597 * NEWS: Document removal of "new X = ..." extension.
7598 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7599 brace-enclosed initializers.
7600 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7601 (initialize_local_var): Remove declaration.
7602 (expand_static_init): Likewise.
7603 * decl.c (next_initializable_field): New function.
7604 (reshape_init): Likewise.
7605 (check_initializer): Use them. Build dynamic initializer for
7606 aggregates here too.
7607 (initialize_local_var): Simplify, and incorporate cleanup
7608 insertion code as well.
7609 (destroy_local_var): Remove.
7610 (cp_finish_decl): Tidy.
7611 (expand_static_init): Fold checks for whether or not a variable
7612 needs initialization into this function. Simplify.
7613 * decl2.c (do_static_initialization): Simplify.
7614 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7615 be done for us automatically.
7616 (expand_default_init): Handle brace-enclosed initializers
7617 correctly.
7618 (expand_aggr_init_1): Remove RTL-generation code.
7619 (build_vec_init): Remove "new X = ..." support.
7620 * parse.y (new_initializer): Likewise.
7621 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7622 brace-enclosed initializer.
7623 (create_pseudo_type_info): Likewise.
7624 * typeck2.c (store_init_value): Don't try to handle digest_init
7625 being called more than once.
7626 (digest_init): Tidy handling of brace-enclosed initializers.
7627
7628 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7629
7630 * decl.c (typename_hash): Use htab_hash_pointer.
7631
7632 2002-10-10 Jim Wilson <wilson@redhat.com>
7633
7634 * decl.c (duplicate_decls): Don't call decl_attributes.
7635
7636 2002-10-09 Zack Weinberg <zack@codesourcery.com>
7637
7638 PR c/7353
7639 * decl.c (start_decl): Unconditionally issue error for
7640 'typedef foo = bar'.
7641 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7642 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7643
7644 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7645
7646 * decl2.c (prune_vtable_vardecl): Delete unused function.
7647
7648 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7649
7650 PR c++/7754
7651 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7652 procesing template functions.
7653 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7654 type. Call layout_decl.
7655 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7656
7657 2002-10-07 Richard Henderson <rth@redhat.com>
7658
7659 * decl2.c, pt.c: Revert c++/7754 fix.
7660
7661 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7662
7663 PR c++/7804
7664 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7665
7666 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7667
7668 PR c++/7931
7669 * pt.c (for_each_template_parm_r): Handle BASELINKs.
7670
7671 PR c++/7754
7672 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7673 procesing template functions.
7674 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7675 type. Call layout_decl.
7676 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7677
7678 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7679
7680 PR c++/8006
7681 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7682 template parameters.
7683 (globals): Add entity and need_abi_warning.
7684 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7685 CLASSTYPE_TEMPLATE_INFO.
7686 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7687 TYPE_TI_TEMPLATE.
7688 (write_prefix): Handle typename types correctly.
7689 (write_template_prefix): Handle template template parameters
7690 correctly.
7691 (start_mangling): Add entity parameter.
7692 (finish_mangling): Warn about names whose mangling will change.
7693 (mangle_decl_string): Adjust.
7694 (mangle_type_string): Likewise.
7695 (mangle_special_for_type): Likewise.
7696 (mangle_ctor_vtbl_for_type): Likewise.
7697 (mangle_thunk): Likewise.
7698 (mangle_guard_variable): Likewise.
7699 (mangle_ref_init_variable): Likewise.
7700
7701 2002-10-02 Mark Mitchell <mark@codesourcery.com>
7702
7703 PR c++/7188.
7704 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7705 * cp-tree.h (emit_base_init): Rename to ....
7706 (emit_mem_initializers): ... this.
7707 (expand_member_init): Change prototype.
7708 * init.c (perform_member_init): Compute explicit, rather than
7709 requiring it as a parameter.
7710 (sort_member_init): Rename to ...
7711 (sort_mem_initializers): ... this. Process bases and data members
7712 together.
7713 (sort_base_init): Remove.
7714 (emit_base_init): Rename to ...
7715 (emit_mem_initializers): ... this.
7716 (expand_aggr_vbase_init_1): Remove.
7717 (construct_virtual_bases): Rename to ...
7718 (construct_virtual_base): ... this.
7719 (expand_member_init): Rework handling of base initializers.
7720 * method.c (do_build_copy_constructor): Use
7721 finish_mem_initializers.
7722 * parse.y (member_init): Adjust calls to expand_member_init.
7723 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7724 (tsubst_initializer_list): Use expand_member_init.
7725 * semantics.c (finish_mem_intiailizers): Simplify.
7726
7727 2002-10-02 Matt Austern <austern@apple.com>
7728 * decl.c (walk_vtables_r): Fixed typo that caused result to
7729 never get a nonzero value.
7730
7731 2002-10-02 Roger Sayle <roger@eyesopen.com>
7732
7733 PR optimization/6627
7734 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7735 from here, and move it to tree.h.
7736 * decl.c (cxx_init_decl_processing): If storing the vbit
7737 in function pointers, ensure that force_align_functions_log
7738 is atleast one.
7739
7740 2002-10-02 Matt Austern <austern@apple.com>
7741
7742 * class.c (check_field_decls): Changed warning about const member
7743 variables so that it doesn't get issued for a class aggregate.
7744
7745 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7746
7747 * decl.c (cp_finish_decl): Make sure array types are laid out,
7748 even if the array bounds are unknown.
7749
7750 2002-10-01 Steve Ellcey <sje@cup.hp.com>
7751
7752 * class.c (build_vtbl_initializer): Change build_c_cast
7753 to build1.
7754
7755 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7756
7757 * decl.c (cp_finish_decl): Make sure array types are laid out,
7758 even if the array bounds are unknown.
7759
7760 * decl.c (cp_finish_decl): Correct check for dynamic
7761 initialization of thread-local storage.
7762
7763 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
7764
7765 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7766 overloaded.
7767
7768 2002-09-30 Steve Ellcey <sje@cup.hp.com>
7769
7770 * class.c (build_vtbl_initializer): Add cast.
7771 (add_vcall_offset_vtbl_entries_1):
7772 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7773
7774 2002-09-30 Mark Mitchell <mark@codesourcery.com>
7775
7776 * class.c (walk_subobject_offsets): Correct the calculation of
7777 offsets for virtual bases. Correct the counting of array
7778 elements.
7779 (layout_nonempty_base_or_field): Simplify. Correct the
7780 calculation of offsets to be propagated through the binfo
7781 hierarchy.
7782 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7783 Add the FIELD_DECL to TYPE_FIELDS.
7784 (build_base_fields): Adjust accordingly.
7785 (layout_virtual_bases): Use build_base_field.
7786 (end_of_class): Return a tree, not an integer.
7787 (warn_about_ambiguous_direct_bases): Rename to ...
7788 (warn_about_ambiguous_bases): ... this.
7789 (include_empty_classes): New function.
7790 (layout_class_type): Create an alternative version of the type to
7791 be used when as a base class type. Do not call
7792 finish_record_layout until we are done laying out the class.
7793 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
7794 as_base.
7795 (CLASSTYPE_SIZE): Reimplement.
7796 (CLASSTYPE_SIZE_UNIT): Likewise.
7797 (CLASSTYPE_ALIGN): Likweise.
7798 (CLASSTYPE_USER_ALIGN): Likewise.
7799 (CLASSTYPE_AS_BASE): New macro.
7800 (DECL_INITIALIZED_P): Likewise.
7801 (extract_init): Remove prototype.
7802 (build_forced_zero_init): Rename to ...
7803 (build_zero_init): ... this.
7804 (force_store_init_value): Remove.
7805 * decl.c (obscure_complex_init): Remove.
7806 (duplicate_decls): Copy DECL_INITIALIZED_P.
7807 (check_initializer): Do not leave junk in DECL_INITIAL.
7808 (cp_finish_decl): Handle zero-initialization of entities with
7809 static storage duration.
7810 * expr.c (extract_init): Remove.
7811 * init.c (build_forced_zero_init): Remove.
7812 (build_zero_init): New function.
7813 (build_default_init): Use it.
7814 (build_field_list): Skip FIELD_DECLs for base subobjects.
7815 (push_base_cleanups): Likewise.
7816 * method.c (do_build_assign_ref): Likewise.
7817 (synthesize_exception_spec): Likewise.
7818 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7819 (regenerate_decl_from_template): To not set DECL_INITIAL for a
7820 static data member whose initialization took place in its class.
7821 (instantiate_decl): Do not pass an initializer to cp_finish_decl
7822 in that situation.
7823 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7824 (dfs_unuse_fields): Likewise.
7825 * tree.c (pod_type_p): Handle error_mark_node.
7826 (zero_init_p): Likewise.
7827 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7828 subobjects.
7829 * typeck2.c (store_init_value): Remove #if 0'd code.
7830 (force_store_init_value): Remove.
7831 (process_init_constructor): Use build_zero_init.
7832
7833 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
7834
7835 PR c++/7788
7836 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7837
7838 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
7839
7840 * cp-tree.h: Fix comment typos.
7841 * decl.c: Likewise.
7842 * pt.c: Likewise.
7843
7844 2002-09-25 Mark Mitchell <mark@codesourcery.com>
7845
7846 * cp/class.c (contains_empty_class_p): New method.
7847 (walk_subobject_offsets): Correct computation of field offset.
7848 (layout_empty_base): Correct placement of emtpy base classes.
7849 (layout_class_type): Warn about ABI changes.
7850
7851 2002-09-23 Mark Mitchell <mark@codesourcery.com>
7852
7853 * cp/class.c (layout_virtual_bases): Do not round the size of the
7854 type to a multiple of the alignment before laying out virtual bases.
7855 (layout_class_type): Correct handling of bit-fields that are wider
7856 than their type inside unions. Round the size of the type to a
7857 even number of bytes when computing the size without virtual
7858 bases.
7859 * cp/cp-tree.h (abi_version_at_least): New macro.
7860
7861 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
7862
7863 * ChangeLog: Follow spelling conventions.
7864 * ChangeLog.2: Likewise.
7865 * call.c: Likewise.
7866 * class.c: Likewise.
7867 * cp-tree.h: Likewise.
7868 * cvt.c: Likewise.
7869 * decl.c: Likewise.
7870 * decl2.c: Likewise.
7871 * except.c: Likewise.
7872 * friend.c: Likewise.
7873 * g++spec.c: Likewise.
7874 * init.c: Likewise.
7875 * lex.c: Likewise.
7876 * mangle.c: Likewise.
7877 * method.c: Likewise.
7878 * operators.def: Likewise.
7879 * optimize.c: Likewise.
7880 * pt.c: Likewise.
7881 * rtti.c: Likewise.
7882 * search.c: Likewise.
7883 * semantics.c: Likewise.
7884 * spew.c: Likewise.
7885 * tree.c: Likewise.
7886 * typeck.c: Likewise.
7887
7888 2002-09-18 Devang Patel <dpatel@apple.com>
7889
7890 * cp/cp-tree.h: New prototype for walk_vtabls().
7891 * cp/decl.c (walk_vtables_r): New function.
7892 (struct cp_binding_level): Add new members, namespaces,
7893 names_size and vtables.
7894 (add_decl_to_level): Add decl in namespaces or vtables
7895 chain, if conditions match.
7896 (walk_vtables): New function.
7897 (walk_namespaces_r): Travers separate namespace chain
7898 for namespace decls.
7899 (wrapup_globals_for_namespace): Use names_size instead
7900 of list_length().
7901 * cp/decl2.c (finish_file): Use walk_vtables() instead of
7902 walk_globals() to walk vtable decls.
7903
7904 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
7905
7906 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7907 ICE with invalid pointers & references.
7908
7909 2002-09-17 Zack Weinberg <zack@codesourcery.com>
7910
7911 * Make-lang.in: Remove all references to the demangler.
7912 * cxxfilt.c: Moved to binutils.
7913
7914 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7915
7916 PR c++/7718
7917 * pt.c (tsubst_decl): Remove assert.
7918
7919 Remove DR 295 implementation.
7920 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7921 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7922 about ignoring volatile qualifiers.
7923
7924 * search.c (lookup_member): Correct documentation.
7925
7926 2002-09-16 Geoffrey Keating <geoffk@apple.com>
7927
7928 * cp-tree.h (union lang_tree_node): Add chain_next option.
7929
7930 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7931
7932 * parse.y (parse_finish_call_expr): Check lookup_member result.
7933
7934 PR c++/7015
7935 * semantic.c (finish_asm_stmt): Fix operand/output_operands
7936 thinko.
7937 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7938
7939 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
7940
7941 PR c++/7919
7942 * call.c (build_over_call): Convert this pointer for fns found by
7943 using decls.
7944
7945 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
7946
7947 * ChangeLog: Follow spelling conventions.
7948 * ChangeLog.1: Likewise.
7949
7950 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
7951
7952 PR c++/7768
7953 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7954
7955 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
7956
7957 * error.c: Fix comment formatting.
7958 * except.c: Likewise.
7959 * expr.c: Likewise.
7960 * friend.c: Likewise.
7961 * g++spec.c: Likewise.
7962 * init.c: Likewise.
7963 * lex.c: Likewise.
7964 * mangle.c: Likewise.
7965 * method.c: Likewise.
7966 * optimize.c: Likewise.
7967 * pt.c: Likewise.
7968 * rtti.c: Likewise.
7969 * search.c: Likewise.
7970 * semantics.c: Likewise.
7971 * spew.c: Likewise.
7972 * tree.c: Likewise.
7973 * typeck.c: Likewise.
7974 * typeck2.c: Likewise.
7975
7976 2002-09-13 Matt Austern <austern@apple.com>
7977
7978 PR C++/7828
7979 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7980 * cp/call.c: Change call-by-const-reference mechanism to use
7981 non_cast_lvalue_p when deciding whether the create a temporary.
7982 We need a temporary when passing, e.g. (long) x by const ref.
7983
7984 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
7985
7986 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7987
7988 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
7989
7990 * decl.c: Fix comment formatting.
7991 * decl2.c: Likewise.
7992
7993 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
7994
7995 * call.c: Fix comment formatting.
7996 * class.c: Likewise.
7997 * cp-lang.c: Likewise.
7998 * cp-tree.h: Likewise.
7999 * cvt.c: Likewise.
8000
8001 2002-09-11 Zack Weinberg <zack@codesourcery.com>
8002
8003 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8004 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8005 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8006 minor adjustments (use version_string, eliminate yet another
8007 duplicate of xmalloc)
8008
8009 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8010
8011 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8012
8013 2002-09-05 Jason Merrill <jason@redhat.com>
8014
8015 * typeck2.c (add_exception_specifier): Only pedwarn for an
8016 incomplete type.
8017 (require_complete_eh_spec_types): New fn.
8018 (cxx_incomplete_type_diagnostic): Also support pedwarning.
8019 * typeck.c (complete_type_or_diagnostic): Likewise.
8020 * call.c (build_call): Call require_complete_eh_spec_types.
8021 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8022 on an incomplete type.
8023
8024 2002-09-04 Jakub Jelinek <jakub@redhat.com>
8025
8026 * decl.c (start_cleanup_fn): Clear interface_only before
8027 start_function, restore it afterwards.
8028
8029 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
8030
8031 * cp-tree.h (finish_builtin_type): Remove.
8032 * decl2.c (finish_builtin_type): Move to common code.
8033 * decl.c (build_ptrmemfunc_type): Adjust.
8034 * rtti.c (create_pseudo_type_info): Adjust.
8035 (create_tinfo_types): Adjust.
8036
8037 2002-08-31 Jason Merrill <jason@redhat.com>
8038
8039 * cp-lang.c (cp_expr_size): Allow initialization from a
8040 CONSTRUCTOR.
8041
8042 2002-08-30 Richard Henderson <rth@redhat.com>
8043
8044 PR opt/7515
8045 * tree.c: Include target.h.
8046 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8047 don't bind locally.
8048 * Makefile.in (tree.o): Update.
8049
8050 2002-08-27 Mark Mitchell <mark@codesourcery.com>
8051
8052 * class.c (layout_virtual_bases): Warn about bugs in G++ that
8053 result in incorrect object layouts.
8054 (layout_class_type): Likewise.
8055
8056 2002-08-24 Matt Austern <austern@apple.com>
8057
8058 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8059 are allowable.
8060 (real_lvalue_p): Update caller.
8061 (lvalue_p): Ditto.
8062 (non_cast_lvalue_or_else): New.
8063 * tree.h: Declare it.
8064 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8065
8066 2002-08-22 Mark Mitchell <mark@codesourcery.com>
8067
8068 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8069 and COND_EXPR specially; fix error message output.
8070
8071 2002-08-22 Jason Merrill <jason@redhat.com>
8072
8073 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8074 * semantics.c (nullify_returns_r): Likewise.
8075
8076 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
8077
8078 Fix PR/7621
8079 * typeck.c (finish_class_member_access_expr): Diagnose cases where
8080 name lookup finds nothing.
8081
8082 2002-08-15 Jason Merrill <jason@redhat.com>
8083
8084 * semantics.c (finish_then_clause): Remove redundant assignment.
8085 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8086 extra binding level outside the if/switch statement.
8087 (finish_while_cond, finish_for_cond): Rewrite complex condition
8088 into the loop body.
8089
8090 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
8091
8092 * parse.y (sizeof, alignof, typeof): New non-terminals to
8093 increment skip_evaluation. Replace terminals with them and
8094 decrement skip_evaluation at the end of rules using them.
8095 * decl2.c (mark_used): Don't assemble_external if
8096 skipping evaluation.
8097
8098 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
8099
8100 Fix PR/7504
8101 * parse.y (parse_finish_call_expr): Handle incomplete
8102 type used to name a scope.
8103
8104 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
8105
8106 PR c++/7598
8107 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8108 regression caused by my 2002-08-08 patch.
8109
8110 2002-08-13 Mark Mitchell <mark@codesourcery.com>
8111
8112 * decl.c (pushdecl_class_level): Honor requests to bind names to
8113 OVERLOADs.
8114
8115 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8116
8117 * decl2.c (build_call_from_tree): Fix uninitialized variable.
8118 * parse.y (parse_finish_call_expr): Likewise.
8119 * repo.c (old_args, old_dir, old_main): Const-ify.
8120
8121 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
8122
8123 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8124 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8125 * optimize.c (maybe_clone_body): Likewise.
8126 * pt.c (tsubst_enum): Likewise.
8127 (lookup_template_class): Likewise.
8128 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8129
8130 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
8131
8132 * lang-specs.h: Remove -ansi.
8133
8134 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
8135
8136 * tree.c (maybe_dummy_object): Replace // with /* */
8137
8138 2002-08-09 Mark Mitchell <mark@codesourcery.com>
8139
8140 * call.c (standard_conversion): Use build_ptrmem_type.
8141 * cp-tree.h (build_ptrmem_type): New function.
8142 (adjust_result_of_qualified_name_lookup): Likewise.
8143 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8144 static data members.
8145 (build_ptrmem_type): New function.
8146 (grokdeclarator): Do not use build_offset_type when encountering a
8147 qualified name.
8148 * parse.y (parse_finish_call_expr): Use
8149 adjust_result_of_qualified_name_lookup.
8150 * search.c (adjust_result_of_qualified_name_lookup): New function.
8151 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8152 accessing OFFSET_TYPEs directly.
8153
8154 2002-08-08 Mike Stump <mrs@apple.com>
8155
8156 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8157 (type_decays_to): Likewise.
8158 * class.c (find_final_overrider): Likewise.
8159 (maybe_note_name_used_in_class): Likewise.
8160 * decl.c (current_tmpl_spec_kind): Likewise.
8161 (add_binding): Likewise.
8162 (push_class_binding): Likewise.
8163 (duplicate_decls): Likewise.
8164 (layout_var_decl): Likewise.
8165 (grokfndecl): Likewise.
8166 (grokdeclarator): Likewise.
8167 (check_default_argument): Likewise.
8168 * decl2.c (handle_class_head): Likewise.
8169 * error.c (dump_template_decl): Likewise.
8170 * init.c (build_offset_ref): Likewise.
8171 * pt.c (check_specialization_scope): Likewise.
8172 (determine_specialization): Likewise.
8173 (check_explicit_specialization): Likewise.
8174 (maybe_check_template_type): Likewise.
8175 (process_partial_specialization): Likewise.
8176 (check_default_tmpl_args): Likewise.
8177 (push_template_decl_real): Likewise.
8178 (convert_template_argument): Likewise.
8179 (try_class_unification): Likewise.
8180 (get_bindings_real): Likewise.
8181 (do_decl_instantiation): Likewise.
8182 * semantics.c (begin_function_definition): Likewise.
8183 (finish_member_declaration): Likewise.
8184 (check_multiple_declarators): Likewise.
8185 * typeck.c (comp_array_types): Likewise.
8186 (comptypes): Likewise.
8187 (expr_sizeof): Likewise.
8188 (build_binary_op): Likewise.
8189 (dubious_conversion_warnings): Likewise.
8190 (check_return_expr): Likewise.
8191
8192 2002-08-08 Mark Mitchell <mark@codesourcery.com>
8193
8194 * typeck.c (build_class_member_access_expr): Do not return
8195 error_mark_node when no error has occurred.
8196
8197 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8198
8199 * typeck.c (build_component_addr): Remove.
8200 (build_unary_op): Just check it's not a bitfield, and then build
8201 an ADDR_EXPR.
8202
8203 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8204
8205 * class.c (convert_to_base): Correct check for error_mark_node.
8206 (create_vtable_ptr): Remove unused VFUNS_P parm.
8207
8208 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8209
8210 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8211
8212 2002-08-07 Mark Mitchell <mark@codesourcery.com>
8213
8214 Rework build_component_ref.
8215 * call.c (build_vfield_ref): Do not go through build_component_ref.
8216 (build_field_call): Use build_class_member_access_expr.
8217 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8218 (build_object_call): Likewise.
8219 * class.c (convert_to_base): New function.
8220 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8221 (instantiate_type): Handle BASELINKs.
8222 * cp-tree.def (BASELINK): New tree code.
8223 * cp-tree.h (BASELINK_P): Reimplement.
8224 (SET_BASELINK_P): Remove.
8225 (BASELINK_BINFO): Reimplement.
8226 (BASELINK_FUNCTIONS): Likewise.
8227 (BASELINK_ACCESS_BINFO): Likewise.
8228 (BASELINK_OPTYPE): Likewise.
8229 (convert_to_base): New function.
8230 (name_p): Likewise.
8231 (build_object_ref): Remove.
8232 (build_component_ref_1): Likewise.
8233 (build_component_ref): Likewise.
8234 (build_x_component_ref): Likewise.
8235 (build_class_member_access_expr): New function.
8236 (finish_class_member_access_expr): Likewise.
8237 (build_ptrmemfunc_access_expr): Likewise.
8238 * decl.c (grokdeclarator): Handle BASELINKs.
8239 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8240 finish_class_member_access_expr.
8241 (arg_assoc): Handle BASELINKs.
8242 (do_class_using_decl): Likewise.
8243 * error.c (dump_decl): Likewise.
8244 (dump_expr): Use build_ptrmemfunc_access_expr.
8245 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8246 destructors.
8247 (build_throw): Use BASELINK_FUNCTIONS.
8248 * init.c (perform_member_init): Use
8249 build_class_member_access_expr.
8250 (build_offset_ref): Handle BASELINKs. Use
8251 build_class_member_access_expr.
8252 * method.c (hack_identifier): Likewise.
8253 * parse.y (do_id): Use BASELINK, not TREE_LIST.
8254 (primary): Remove uses of build_object_ref.
8255 * pt.c (lookup_template_function): Handle BASELINKs.
8256 (resolve_overloaded_unification): Likewise.
8257 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8258 (lookup_field): Use BASELINK, not TREE_LIST.
8259 (lookup_fnfiels): Likewise.
8260 (setup_class_bindings): Likewise.
8261 * semantics.c (finish_object_call_expr): Do not use
8262 build_method_call when we already know what function is being
8263 called.
8264 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8265 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8266 TREE_CHAIN.
8267 (name_p): New function.
8268 * typeck.c (build_object_ref): Remove.
8269 (build_component_ref_1): Likewise.
8270 (build_x_component_ref): Likewise.
8271 (build_class_member_access_expr): New function.
8272 (finish_class_member_access_expr): Likewise.
8273 (build_ptrmemfunc_access_expr): Likewise.
8274 (get_member_function_from_ptrfunc): Use
8275 build_ptrmemfunc_access_expr.
8276 (build_binary_op): Likewise.
8277 (build_unary_op): Likewise.
8278 (build_ptrmemfunc): Likewise.
8279 (pfn_from_ptrmemfunc): Likewise.
8280 * typeck2.c (build_m_component_ref): Adjust comment.
8281
8282 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
8283
8284 * Make-lang.in (CXX_C_OBJS): Update.
8285 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8286 * cp-tree.h (cxx_decode_option): Remove.
8287 * decl2.c (compare_options, lang_f_options, unsupported_options,
8288 cxx_decode_option): Remove.
8289
8290 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
8291
8292 * typeck.c (build_x_unary_op): Handle pointer-to-member.
8293
8294 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8295
8296 * class.c: Don't include obstack.h.
8297 (popclass):
8298 * decl2.c: Delete bogus comment.
8299 * error.c: Don't include obstack.h.
8300 * except.c: Likewise.
8301 (dump_type): Correct comment.
8302 * method.c: Don't include obstack.h.
8303 * tree.c: Likewise.
8304
8305 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
8306
8307 Fix PR/2213
8308 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8309 expressions to pointer-to-data-member of pointer-to-member-functions.
8310
8311 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8312
8313 * cvt.c (ocp_convert): Delete obsolete code.
8314 * parse.y (permanent_obstack): Delete declaration.
8315 * pt.c (permanent_obstack): Delete declaration.
8316 * repo.c (permanent_obstack): Delete declaration.
8317 (open_repo_file): Use xmalloc instead of permanent_obstack.
8318 (init_repo): Use xstrdup instead of permanent_obstack.
8319
8320 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
8321
8322 * cp-tree.h (VF_DERIVED_VALUE): Remove.
8323 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8324
8325 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
8326
8327 PR 7470.
8328 C++ ABI change - vfunc ordering.
8329 * class.c (add_virtual_function): Remove.
8330 (dfs_modify_all_vtables): Take list of all declared
8331 virtuals. Assign all that are not in primary base.
8332 (check_for_override): Adjust comments.
8333 (create_vtable_ptr): Take single list of virtuals. Build chain
8334 of declared virtuals here.
8335 (layout_class_type): Take single list of virtuals. Adjust.
8336 (finish_struct_1): Keep virtuals on single list. Adjust.
8337
8338 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8339
8340 * init.c (build_member_call): Use build_new_method_call, not
8341 build_method_call.
8342
8343 2002-08-02 Krister Walfridsson <cato@df.lth.se>
8344
8345 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8346
8347 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8348
8349 * call.c (build_method_call): Issue a more helpful error message
8350 about ambiguous method names.
8351
8352 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
8353
8354 * tree.c (build_shared_int_cst): Make cache file scope, and
8355 GTY it.
8356
8357 2002-08-02 Jason Merrill <jason@redhat.com>
8358
8359 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8360 (cp_expr_size): New fn.
8361 * call.c (build_over_call): Lose empty class hackery.
8362 (convert_arg_to_ellipsis): Promote non-POD warning to error.
8363 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8364
8365 * semantics.c (expand_body): Do tree optimization in the function
8366 context, too.
8367
8368 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
8369
8370 * cp-tree.h: Move all warning and flag declarations to c-common.h.
8371 * decl.c: Move all warning and flag variables to c-common.c.
8372 * decl2.c: Move all warning and flag variables to c-common.c.
8373 * lex.c (flag_digraphs): Remove.
8374 (warn_traditional): Now in c-common.c.
8375
8376 2002-07-31 Mark Mitchell <mark@codesourcery.com>
8377
8378 * call.c (build_field_call): Do not look up the field by name.
8379 (build_method_call): Simplify.
8380 (struct z_candidate): Add access_path and conversion_path. Remove
8381 basetype_path.
8382 (convert_class_to_reference): Adjust use of
8383 add_function_candidate.
8384 (add_candidate): Add conversion_path argument.
8385 (add_function_candidate): Use it.
8386 (add_conv_dndidate): Likewise.
8387 (build_builtin_candidate): Likewise.
8388 (add_template_candidate_real): Add conversion_path argument.
8389 (add_template_conv_candidate): Likewise.
8390 (add_template_candidate): Likewise.
8391 (build_user_type_conversion_1): Use it.
8392 (build_new_function_call): Remove name lookup code. Adjust use of
8393 add_template_candidate and add_function_candidate.
8394 (build_new_op): Likewise.
8395 (convert_like_real): Use build_special_member_call.
8396 (build_over_call): Use cand->conversion_path.
8397 (build_special_member_call): New method.
8398 (build_new_method_call): Remove name lookup code.
8399 * cp-tree.def (OFFSET_REF): Update documentation.
8400 (TEMPLATE_ID_EXPR): Likewise.
8401 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8402 (BASELINK_OPTYPE): Likewise.
8403 (build_new_method_call): Adjust prototype.
8404 (build_special_member_call): New method.
8405 (build_baselink): New method.
8406 (build_offset_ref_call_from_tree): Likewise.
8407 (build_call_from_tree): Likewise.
8408 (finish_qualified_call_expr): Remove.
8409 (finish_call_expr): Adjust prototype.
8410 (build_x_function_call): Remove.
8411 * cvt.c (ocp_convert): Use build_special_member_call.
8412 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8413 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8414 CALL_EXPR.
8415 (build_offset_ref_call_from_tree): New function.
8416 (build_call_from_tree): Likewise.
8417 * init.c (expand_cleanup): Use build_special_member_call.
8418 (expand_default_init): Likewise.
8419 (build_member_call): Use finish_call_expr.
8420 (build_new_1): Use build_special_member_call.
8421 (push_base_cleanups): Likewise.
8422 * method.c (do_build_assign_ref): Likewise.
8423 * parse.y (template_id): Do not pass a COMPONENT_REF to
8424 lookup_template_function.
8425 (primary): Use parse_finish_call_epxr, not finish_call_expr.
8426 (parse_finish_call_expr): New function.
8427 * pt.c (lookup_template_function): Add assertions.
8428 * search.c (lookup_base): Allow T to be a binfo.
8429 (build_baselink): New function.
8430 (lookup_member): Use it.
8431 * semantics.c (finish_call_expr): Do not do name lookup.
8432 (finish_object_call_expr): Remove #if 0'd code.
8433 (finish_qualified_call_expr): Remove.
8434 * typeck.c (build_x_function_call): Remove.
8435 (build_static_case): Use build_special_member_call.
8436 * typeck2.c (build_functional_cast): Likewise.
8437
8438 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8439
8440 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8441
8442 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
8443
8444 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8445
8446 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
8447
8448 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8449 documentation.
8450
8451 2002-07-29 Alan Modra <amodra@bigpond.net.au>
8452
8453 * cp-tree.h: Comment typo fix.
8454
8455 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
8456
8457 * spew.c (space_for_token): Allocate zeroed memory for a new token
8458 chunk.
8459
8460 2002-07-27 Roger Sayle <roger@eyesopen.com>
8461
8462 * decl.c (builtin_function_1): No need to explicitly mark
8463 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8464
8465 2002-07-27 Roger Sayle <roger@eyesopen.com>
8466
8467 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8468
8469 2002-07-26 Jason Merrill <jason@redhat.com>
8470
8471 * call.c (build_over_call): Likewise.
8472 (cp_convert_parm_for_inlining): New fn.
8473 (convert_for_arg_passing): New fn.
8474 (convert_default_arg, build_over_call): Use it.
8475 (type_passed_as): New fn.
8476 * pt.c (tsubst_decl): Use it.
8477 * decl2.c (cp_build_parm_decl): New fn.
8478 (build_artificial_parm): Use it.
8479 (start_static_storage_duration_function): Likewise.
8480 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8481 (grokparms): Don't mess with DECL_ARG_TYPE.
8482 * typeck.c (convert_arguments): Use convert_for_arg_passing.
8483 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8484 Define.
8485 * cp-tree.h: Declare new fns.
8486
8487 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
8488
8489 * cp-tree.h (flag_operator_names): Remove.
8490 * decl2.c (flag_operator_names): Remove.
8491 (lang_f_options): Remove operator-names.
8492 * lex.c (D_OPNAME): Remove.
8493 (reswords): Remove operator names.
8494 (rid_to_yy): Remove operator names.
8495 (init_reswords): No need to handle D_OPNAME.
8496 * spew.c (read_process_identifier): There are no operator
8497 names.
8498
8499 2002-07-26 Jason Merrill <jason@redhat.com>
8500
8501 * dump.c (cp_dump_tree): Call c_dump_tree.
8502 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8503
8504 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8505
8506 * error.c (print_whitespace): Remove.
8507 * g++spec.c (LIBUNWIND): Move.
8508 * mangle.c (mangled_position, write_signed_number): Remove.
8509
8510 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8511
8512 * decl2.c (cxx_decode_option): Similarly.
8513
8514 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
8515
8516 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8517 (cxx_sizeof_or_alignof_type): Take a third argument.
8518 (cxx_sizeof): Adjust definition.
8519 (cxx_alignof): Likewise.
8520 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8521 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8522 complaining.
8523 (c_sizeof_nowarn): Remove definition.
8524 (build_unary_op): Use cxx_sizeof_nowarn.
8525
8526 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
8527
8528 * tree.c (cp_build_qualified_type_real): When copying
8529 pointer-to-method types, unshare the record that holds
8530 the cached pointer-to-member-function type.
8531
8532 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8533
8534 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8535
8536 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
8537
8538 Fix PR/7363:
8539 * typeck.c (cxx_sizeof_or_alignof_type): New function.
8540 (c_sizeof): Remove definition.
8541 (expr_sizeof): Use cxx_sizeof.
8542 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8543 * decl.c (finish_destructor_body): Use cxx_sizeof.
8544 * semantics.c (finish_alignof): Likewise.
8545 (finish_alignof): Use cxx_alignof.
8546 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8547 (cxx_sizeof_or_alignof_type): Declare.
8548 (my_friendly_assert): Move to ../c-common.h.
8549
8550 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8551
8552 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8553
8554 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8555
8556 PR c++/7347, c++/7348
8557 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8558 * decl.c (make_typename_type): Use it.
8559 (make_unbound_class_template): Likewise.
8560 (lookup_name_real): Don't call type_access_control if scope is
8561 template parameter dependent.
8562 * parse.y (template_arg): Call make_unbound_class_template with
8563 tf_parsing set.
8564 (nest_name_specifier): Call make_typename_type with tf_parsing set.
8565 (typename_sub0): Likewise.
8566 (typename_sub1): Likewise.
8567 (instantiate_decl): Push class scope.
8568 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8569 for both static variable and member function template.
8570 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8571 and arguments.
8572 * search.c (type_access_control): Do type access for TEMPLATE_DECL
8573 too.
8574
8575 2002-07-20 Roger Sayle <roger@eyesopen.com>
8576
8577 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8578 test by using positive_option. Make whitespace consistent.
8579
8580 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
8581
8582 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8583 members with 'locus'. Adjust use throughout.
8584 (struct feed): Likewise.
8585 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8586 Adjust use.
8587 (snarf_defarg): Use error(), not error_with_file_and_line().
8588
8589 2002-07-19 Chris Demetriou <cgd@broadcom.com>
8590
8591 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8592 cpp_options is included.
8593
8594 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8595
8596 PR c++/2862, c++/2863
8597 * pt.c (determine_specialization): Compare the length of
8598 TYPE_ARG_TYPES. Tidy.
8599
8600 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8601
8602 PR c++/3797
8603 * decl.c (duplicate_decls): Don't propagate inlining parameters from
8604 olddecl to newdecl when newdecl is a specialization of the
8605 instantiation olddecl.
8606
8607 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8608
8609 PR c++/4802, c++/5387
8610 * decl.c (make_typename_type): Use enforce_access.
8611
8612 2002-07-17 Scott Snyder <snyder@fnal.gov>
8613
8614 PR c++/7320
8615 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8616
8617 2002-07-12 Mark Mitchell <mark@codesourcery.com>
8618
8619 * class.c (add_method): Correct handling of conversion operators.
8620
8621 2002-07-11 Mark Mitchell <mark@codesourcery.com>
8622
8623 PR c++/7224
8624 * class.c (add_method): Simplify.
8625
8626 2002-07-11 Jason Merrill <jason@redhat.com>
8627
8628 PR c++/7279
8629 * tree.c (cp_copy_res_decl_for_inlining): Also copy
8630 TREE_ADDRESSABLE.
8631
8632 2002-07-10 Graham Stott <graham.stott@btinternet.com>
8633
8634 * pt.c (template_parm_this_level_p, push_template_decl_real):
8635 Pass depth as int pointer.
8636
8637 2002-07-11 Tim Josling <tej@melbpc.org.au>
8638
8639 Remove front end hard coding from gengtype.c.
8640
8641 * config-lang.in (gtfiles): Add files needed for this front end.
8642
8643 2002-07-10 Mark Mitchell <mark@codesourcery.com>
8644
8645 * cp-tree.h (unqualified_name_lookup_error): Declare it.
8646 (begin_function_definition): Adjust prototype.
8647 * lex.c (unqualified_name_lookup_error): New function, split out
8648 from ...
8649 (do_identifier): ... here.
8650 * parse.y (parse_begin_function_definition): New function.
8651 (fn.def1): Use it.
8652 * semantics.c (begin_function_definition): Accept decl-specifiers
8653 and attributes as separate parameters.
8654
8655 2002-07-10 Jason Merrill <jason@redhat.com>
8656
8657 PR c++/6255
8658 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8659 modifying the old one.
8660
8661 2002-07-09 Mark Mitchell <mark@codesourcery.com>
8662
8663 * cp-tree.h (constructor_name_p): Declare it.
8664 (check_template_template_default_arg): Likewise.
8665 * class.c (handle_using_decl): Use constructor_name_p.
8666 * decl.c (grokdeclarator): Likewise.
8667 * decl2.c (constructor_name_p): Define it.
8668 * init.c (build_member_call): Use constructor_name_p.
8669 * parse.y (template_parm): Use check_template_template_default_arg.
8670 * pt.c (check_explicit_specialization): Use constructor_name_p.
8671 * semantics.c (check_template_template_default_arg): New function.
8672
8673 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8674
8675 * pt.c (can_complete_type_without_circularity): Add static to
8676 function definition.
8677
8678 2002-07-08 Mark Mitchell <mark@codesourcery.com>
8679
8680 * cp-tree.h (have_extern_spec): Declare it
8681 * decl.c (have_extern_spec): Define it.
8682 (start_decl): Eliminate use of used_extern_spec.
8683 (start_function): Likewise.
8684 * parse.y (have_extern_spec): Remove declaration.
8685 (used_extern_spec): Likewise.
8686 (frob_specs): Eliminate use of used_extern_spec.
8687 (.hush_warning): Likewise.
8688
8689 2002-07-07 Mark Mitchell <mark@codesourcery.com>
8690
8691 * Make-lang.in (cp/parse.o): Depend on decl.h.
8692 * cp-tree.h (do_decl_instantiation): Change prototype.
8693 * parse.y: Include decl.h.
8694 (parse_decl_instantiation): New function.
8695 (explicit_instantiation): Use it.
8696 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8697 and DECLSPECS.
8698
8699 2002-07-07 Roger Sayle <roger@eyesopen.com>
8700
8701 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8702 constructor and destructor tests when passed a TEMPLATE_DECL.
8703
8704 2002-07-05 Jason Merrill <jason@redhat.com>
8705
8706 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8707 pointers.
8708
8709 PR optimization/7145
8710 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8711
8712 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
8713
8714 Repair damage on weak-impared targets caused by my previous patch.
8715 * cp-tree.h (import_export_tinfo): Add parameter.
8716 * decl2.c (import_export_tinfo): Add parameter, post adjust
8717 DECL_COMDAT.
8718 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8719 import_export_tinfo.
8720
8721 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8722
8723 PR c++/6944
8724 * init.c (build_aggr_init): Remove qualifiers of init before calling
8725 build_vec_init.
8726 (build_vec_init): Flatten multi-dimensional array during cleanup.
8727 (build_vec_delete_1): Abort if the type of each element is array.
8728
8729 2002-07-03 Graham Stott <graham.stott@btinternet.com>
8730
8731 * pt.c (instantiate_class_template): Fix typo.
8732
8733 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8734
8735 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8736 by CVS conflict in my last patch.
8737
8738 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8739
8740 PR c++/6716
8741 * pt.c (can_complete_type_without_circularity): New function.
8742 (instantiate_class_template): Use it.
8743 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8744 message due to incomplete fields.
8745
8746 2002-07-01 Mark Mitchell <mark@codesourcery.com>
8747
8748 PR c++/7112
8749 * mangle.c (write_expression): Add mangling for sizeof when
8750 applied to a type.
8751 * operators.def: Remove stale comment.
8752
8753 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
8754
8755 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8756 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8757 (tinfo_decl_type): Replace with ...
8758 (type_info_ptr_type): ... this.
8759 (import_export_tinfo): Declare.
8760 (tinfo_decl_p): Rename to ...
8761 (unemitted_tinfo_decl_p): ... this.
8762 * decl2.c (import_export_decl): Break out tinfo handling into ...
8763 (import_export_tinfo): ... here. New function.
8764 (finish_file): Adjust.
8765 * rtti.c (TINFO_REAL_NAME): New macro.
8766 (init_rtti_processing): Create the tinfo types.
8767 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8768 (get_tinfo_decl): Adjust.
8769 (get_tinfo_ptr): New function.
8770 (get_type_id): Use it.
8771 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8772 (ptr_initializer): Use get_tinfo_ptr.
8773 (ptm_initializer): Likewise.
8774 (synthesize_tinfo_var): Break into ...
8775 (get_pseudo_ti_init): ... this. Just create the initializer.
8776 (get_pseudo_ti_desc): .. and this.
8777 (create_real_tinfo_var): Remove.
8778 (create_pseudo_type_info): Don't create the vtable decl here.
8779 (get_vmi_pseudo_type_info): Remove.
8780 (create_tinfo_types): Adjust.
8781 (tinfo_decl_p): Rename to ...
8782 (unemitted_tinfo_decl_p): ... here. Adjust.
8783 (emit_tinfo_decl): Adjust. Create the initializer.
8784
8785 2002-06-27 Mark Mitchell <mark@codesourcery.com>
8786
8787 PR c++/6695
8788 * pt.c (tsubst_friend_class): Substitute into the context of the
8789 friend before using it.
8790
8791 2002-06-26 Mark Mitchell <mark@codesourcery.com>
8792
8793 * cp-tree.h (xref_tag): Change prototype.
8794 (handle_class_head): Likewise.
8795 (build_x_component_ref): Likewise.
8796 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8797 (xref_tag): Take attributes as a separate parameter.
8798 (xref_tag_from_type): Adjust call to xref_tag.
8799 * decl2.c (build_expr_from_tree): Adjust call to
8800 build_x_component_ref.
8801 (handle_class_head): Take attributes as a separate parameter.
8802 * parse.y (parse_xref_tag): New function.
8803 (parse_handle_class_head): Likewise.
8804 (primary): Use parse_xref_tag.
8805 (class_head_decl): Use parse_handle_class_head.
8806 (class_head_defn): Likewise.
8807 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8808 (build_dynamic_cast_1): Likewise.
8809 (create_pseudo_type_info): Likewise.
8810 (emit_support_tinfos): Likewise.
8811 * typeck.c (build_object_ref): Adjust call to
8812 build_x_component_ref.
8813 (build_x_component_ref): Remove protect parameter.
8814
8815 2002-06-25 Mark Mitchell <mark@codesourcery.com>
8816
8817 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8818 * class.c (handle_using_decl): Likewise.
8819 (instantiate_type): Likewise.
8820 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8821 (xref_basetypes): Change prototype.
8822 (begin_mem_initializers): New function.
8823 (get_overloaded_fn): Likewise.
8824 * decl.c (xref_basetypes): Simplify.
8825 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8826 * init.c (build_offset_ref): Likewise.
8827 * parse.y (base_init): Use begin_mem_initializers().
8828 (structsp): Adjust call to xref_basetypes.
8829 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8830 (instantiate_class_template): Adjust call to xref_basetypes.
8831 * semantics.c (begin_mem_initializers): New function.
8832 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8833 (really_overloaded_fn): Likewise.
8834 (get_overloaded_fn): New function.'
8835 (get_first_fn): USe BASELINK_FUNCTIONS.
8836
8837 2002-06-24 Mark Mitchell <mark@codesourcery.com>
8838
8839 * cp-tree.h (SCALAR_TYPE_P): New macro.
8840 (check_for_out_of_scope_variable): New function.
8841 (at_class_scope_p): Likewise.
8842 (finish_fname): Likewise.
8843 * class.c (finish_struct): Use at_function_scope_p.
8844 * decl.c (check_for_out_of_scope_variable): New function, split
8845 out from do_identifier.
8846 (finish_enum): Use at_function_scope_p.
8847 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8848 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
8849 (primary): Use at_function_scope_p.
8850 * search.c (at_class_scope_p): New function.
8851 * semantics.c (finish_fname): Likewise.
8852 (check_multiple_declarators): Use at_function_scope_p.
8853
8854 2002-06-23 Mark Mitchell <mark@codesourcery.com>
8855
8856 * parse.y (parse_scoped_id): New function.
8857 (primary): Use it.
8858 * cp-tree.h (do_scoped_id): Adjust declaration.
8859 * lex.c (do_scoped_id): Remove call to yylex.
8860 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8861 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8862 expanding it inline.
8863
8864 2002-06-23 Matt Thomas <matt@3am-software.com>
8865
8866 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8867 "#if VMS_TARGET".
8868
8869 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8870
8871 * mangle.c (integer_type_codes): Const-ify.
8872
8873 2002-06-20 Richard Henderson <rth@redhat.com>
8874
8875 PR c++/6747
8876 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8877 Call put_var_into_stack.
8878
8879 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8880
8881 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8882 array size calculation.
8883
8884 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8885
8886 PR c++/6892
8887 * pt.c (tsubst_expr): Handle FILE_STMT.
8888
8889 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8890
8891 PR c++/6723
8892 * pt.c (lookup_template_class): Don't build complete argument of
8893 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8894 argument.
8895
8896 2002-06-19 Akim Demaille <akim@epita.fr>
8897
8898 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8899 decl.h's TYPENAME.
8900 * spew.c, lex.c: Adjust.
8901 * parse.y (explicit_instantiation): Add empty action to override
8902 the default $$ = $1 where it introduces a type clash.
8903
8904 2002-06-14 Jason Merrill <jason@redhat.com>
8905
8906 * semantics.c (begin_for_stmt): Push the 'for' scope before
8907 adding the FOR_STMT.
8908
8909 C++ ABI changes.
8910 * class.c (build_base_field): Set DECL_PACKED.
8911 (layout_class_type): Don't use tail padding of PODs.
8912 * mangle.c (write_unqualified_name): Fix template conversion op
8913 mangling.
8914
8915 2002-06-16 Richard Henderson <rth@redhat.com>
8916
8917 PR opt/6793
8918 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8919 after template instantiation.
8920
8921 2002-06-16 Richard Henderson <rth@redhat.com>
8922
8923 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8924
8925 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
8926
8927 * cp-tree.h (compiler_error): Remove declaration.
8928 * lex.c (compiler_error): Remove definition.
8929
8930 2002-06-14 Steve Ellcey <sje@cup.hp.com>
8931
8932 * g++spec.c (LIBUNWIND): New.
8933 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8934
8935 2002-06-13 Jessica Han <jessica@cup.hp.com>
8936
8937 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8938 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8939 (build_vbase_offset_vtbl_entries): Likewise.
8940 * rtti.c (build_headof): Likewise.
8941 (get_tinfo_decl_dynamic): Likewise.
8942 (create_pseudo_type_info): Likewise.
8943
8944 2002-06-12 Stan Shebs <shebs@apple.com>
8945
8946 * mpw-config.in: Remove file, no longer used.
8947 * mpw-make.sed: Ditto.
8948
8949 2002-06-07 Zack Weinberg <zack@codesourcery.com>
8950
8951 * decl2.c: Update call to cpp_handle_option.
8952
8953 2002-06-07 H.J. Lu (hjl@gnu.org)
8954
8955 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8956
8957 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
8958
8959 * error.c (cp_error_at): Fix typo.
8960
8961 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
8962
8963 * error.c (cp_diagnostic_starter): Adjust call.
8964 (maybe_print_instantiation_context): Change prototype to take a
8965 'diagnostic_info *'.
8966 (print_instantiation_full_context): Likewise.
8967 (print_instantiation_partial_context): Likewise.
8968 (cp_diagnostic_starter): Likewise.
8969 (cp_diagnostic_finalizer): Likewise.
8970 (cp_print_error_function): Likewise.
8971 (cp_printer): Take a secondary parameter as a 'text_info *'.
8972 Remove output_state savings. Adjust calls.
8973
8974 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
8975
8976 * pt.c (inline_parm_levels): Mark for GC.
8977
8978 * mangle.c (start_mangling): Allocate G.substitutions here...
8979 (init_mangle): ... rather than here.
8980 (finish_mangling): Clear the varray pointer when done with it.
8981 * spew.c (yylexstring): Don't use VARRAY_FREE.
8982 * search.c (bfs_walk): Don't use VARRAY_FREE.
8983 * decl2.c (pending_statics): Use gengtype to mark.
8984 (deferred_fns): Likewise.
8985 (ssdf_decls): Likewise.
8986 (init_decl2): Delete.
8987 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8988 (cxx_init_decl_processing): Don't call init_decl2.
8989 (cxx_pop_function_context): Don't use VARRAY_FREE.
8990 * cp-tree.h (struct saved_scope): No need for special marking
8991 of varrays.
8992 (struct language_function): Likewise.
8993 (local_classes): Use gengtype to mark.
8994 (init_decl2): Delete prototype.
8995 * class.c (init_class_processing): Don't use
8996 ggc_add_tree_varray_root.
8997 (build_vtbl_initializer): Don't use VARRAY_FREE.
8998
8999 * decl.c (typename_compare): Don't use same_type_p.
9000
9001 * decl.c: Include hashtab.h instead of hash.h.
9002 (typename_hash): Update to use htab_h.
9003 (typename_compare): Likewise.
9004 (typename_htab): Use gengtype to mark.
9005 (build_typename_type): Update to use htab_h.
9006 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9007
9008 * Make-lang.in (gt-cp-tree.h): New rule.
9009 (cp/tree.o): Depend on gt-cp-tree.h.
9010 * config-lang.in (gtfiles): Add cp/tree.c.
9011 * tree.c: Include gt-cp-tree.h.
9012 (list_hash_table): Use gengtype to mark.
9013 (init_tree): Use gengtype to mark trees.
9014
9015 * Make-lang.in (cp/decl.o): Add debug.h dependency.
9016 * call.c (struct z_candidate): Use gengtype.
9017 (USER_CONV_CAND): Use WRAPPER_ZC.
9018 (convert_class_to_reference): Use build_zc_wrapper.
9019 (build_type_conversion_1): Likewise.
9020 (build_over_call): Use WRAPPER_ZC.
9021 (add_warning): Use build_zc_wrapper.
9022 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9023 * cp-tree.h (struct lang_identifier): Use gengtype.
9024 (struct template_parm_index_s): Likewise.
9025 (struct ptrmem_cst): Likewise.
9026 (struct tree_binding): Likewise.
9027 (struct tree_overload): Likewise.
9028 (struct tree_srcloc): Likewise.
9029 (struct tree_wrapper): Likewise. Also modify to have a pointer
9030 to struct z_candidate rather than void.
9031 (enum cp_tree_node_structure_enum): New.
9032 (union lang_tree_node): New.
9033 (cxx_mark_tree): Delete prototype.
9034 (cp_tree_node_structure): New prototype.
9035 (build_ptr_wrapper): Delete prototype.
9036 (build_int_wrapper): Delete prototype.
9037 (build_zc_wrapper): New prototype.
9038 * decl.c: Include debug.h
9039 (cxx_mark_tree): Delete.
9040 (cp_tree_node_structure): New.
9041 * tree.c (build_ptr_wrapper): Delete.
9042 (build_int_wrapper): Delete.
9043 (build_zc_wrapper): New.
9044
9045 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9046 Correct typo. Patch from k_fukui@highway.ne.jp.
9047
9048 * semantics.c (current_stmt_tree): Update for change to
9049 struct language_function.
9050 (finish_mem_initializers): Likewise.
9051 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9052 * cp-tree.h (struct language_function): Rename from
9053 cp_language_function. Change all uses.
9054 (cp_function_chain): Don't need to cast.
9055
9056 * class.c (duplicate_tag_error): Reset discriminator.
9057 (check_bases_and_members): Update for data structure changes.
9058 * cp-tree.h (struct lang_id2): Use gengtype.
9059 (flagged_type_tree): Likewise.
9060 (SET_LANG_ID): Use GGC on struct lang_id2.
9061 (struct cp_language_function): Use gengtype. Remove field
9062 'x_vcalls_possible_p'.
9063 (current_vcalls_possible_p): Delete.
9064 (struct lang_type_header): New.
9065 (struct lang_type_class): Rename from struct lang_type. Include
9066 struct lang_type_header.
9067 (struct lang_type_ptrmem): New.
9068 (struct lang_type): New.
9069 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
9070 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
9071 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9072 (struct lang_decl_flags): Use gengtype. Add discriminators.
9073 (struct lang_decl): Use gengtype. Add and use discriminators.
9074 Update the macros that reference moved fields.
9075 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
9076 (SET_DECL_THUNK_P): Set discriminator too.
9077 (clear_inline_text_obstack): Delete prototype.
9078 (finish_inline_definitions): Delete prototype.
9079 (mark_pending_inlines): Delete prototype.
9080 (lang_check_failed): New prototype.
9081 * decl.c (struct named_label_use_list): Use gengtype.
9082 (struct named_label_list): Likewise.
9083 (mark_binding_level): Delete.
9084 (mark_named_label_lists): Delete.
9085 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9086 (cxx_init_decl_processing): Use generated marker routine.
9087 (begin_destructor_body): Delete dead set to
9088 current_vcalls_possible_p.
9089 (mark_lang_function): Delete.
9090 (mark_cp_function_context): Delete.
9091 (lang_mark_tree): Use generated marker routines.
9092 * decl2.c (start_objects): Set discriminator when setting
9093 GLOBAL_INIT_PRIORITY.
9094 * lex.c (retrofit_lang_decl): Set discriminators.
9095 (copy_lang_type): Update for changes to lang_type structure.
9096 (cp_make_lang_type): Set discriminator.
9097 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
9098 * search.c: Include ggc.h.
9099 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9100 (finish_inline_definitions): Delete.
9101 * spew.c (struct token): Use gengtype.
9102 (struct token_chunk): New.
9103 (struct unparsed_text): Use gengtype. Store tokens in chunks.
9104 (struct feed): Use gengtype.
9105 (feed_obstack): Delete.
9106 (feed): Mark as GC root.
9107 (pending_inlines): Mark as GC root.
9108 (pending_inlines_tail): Likewise.
9109 (processing_these_inlines): Likewise.
9110 (token_obstack): Make static.
9111 (first_token): Likewise.
9112 (init_spew): Don't initialize deleted things; use gengtype for roots.
9113 (clear_inline_text_obstack): Delete.
9114 (feed_input): Use GC for struct feed. Update for changes to
9115 struct unparsed_text.
9116 (mark_pending_inlines): Delete.
9117 (next_token): Rename from add_token. Change all callers. Update
9118 for changes to struct unparsed_text.
9119 (space_for_token): New.
9120 (remove_last_token): New.
9121 (alloc_unparsed_text): New.
9122 (snarf_block): Take an unparsed_text. Update for changes to struct
9123 unparsed_text.
9124 (snarf_method): Update for changes to struct unparsed_text.
9125 (snarf_defarg): Update for changes to struct unparsed_text.
9126 * tree.c (lang_check_failed): New.
9127
9128 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9129 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9130 (cp/spew.o): Add dependency on gt-<filename>.h.
9131 (cp/decl2.o): Add dependency on gt-<filename>.h.
9132 (cp/call.o): Add dependency on gt-<filename>.h.
9133 (cp/pt.o): Add dependency on gt-<filename>.h.
9134 (cp/repo.o): Add dependency on gt-<filename>.h.
9135 (cp/parse.o): Add dependency on gt-<filename>.h.
9136 * call.c: Use gengtype for roots.
9137 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9138 decl2.c parse.y pt.c repo.c spew.c.
9139 * cp-tree.h: Use gengtype for roots.
9140 (struct saved_scope): Use GGC, gengtype.
9141 (cp_parse_init): Delete prototype.
9142 (init_pt): Delete prototype.
9143 * decl.c: Use gengtype for roots.
9144 (mark_saved_scope): Delete.
9145 (cxx_init_decl_processing): Don't call deleted initilisation
9146 routines.
9147 (signed_size_zero_node): Delete, unused.
9148 * decl.h: Use gengtype for roots.
9149 * decl2.c: Use gengtype for roots.
9150 * lex.h: Use gengtype for roots.
9151 * parse.y: Use gengtype for roots.
9152 (cp_parse_init): Delete.
9153 * pt.c: Use gengtype for roots.
9154 (init_pt): Delete.
9155 * repo.c: Use gengtype for roots.
9156 * spew.c: Use gengtype for roots.
9157
9158 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
9159 (cp/decl.o): Add dependency on gtype-cp.h.
9160 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9161 Include gtype-cp.h. Allow for filename changes.
9162
9163 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9164 (cp/decl.o): Add cp/gt-decl.h dependency.
9165 * config-lang.in (gtfiles): New.
9166 * tree.h: Rename struct binding_level to struct cp_binding_level.
9167 * decl.c: Rename struct binding_level to struct cp_binding_level.
9168 Include cp/gt-decl.h.
9169 (struct cp_binding_level): Use gengtype.
9170 (make_binding_level): Use GGC on struct cp_binding_level.
9171 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9172 (cxx_init_decl_processing): Mark free_binding_level as
9173 deletable.
9174
9175 * decl.c (mark_cp_function_context): Update calling sequence.
9176
9177 * decl.c (start_function): Don't free 'struct
9178 cp_language_function'.
9179 (pop_cp_function_context): Likewise.
9180 (save_function_data): Allocate it using GC.
9181 * semantics.c (genrtl_start_function): Don't free 'struct
9182 cp_language_function'.
9183
9184 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
9185
9186 * lang-specs.h: Use cpp_debug_options.
9187
9188 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9189
9190 * mangle.c, tree.c: Include real.h.
9191 * Make-lang.in: Update dependency lists.
9192
9193 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
9194
9195 * lex.c: Don't include c-lex.h.
9196 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9197
9198 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
9199
9200 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9201
9202 2002-05-22 Richard Henderson <rth@redhat.com>
9203
9204 * decl.c (obscure_complex_init): Check for VAR_DECL
9205 before using DECL_THREAD_LOCAL.
9206
9207 2002-05-22 Richard Henderson <rth@redhat.com>
9208
9209 * decl.c (check_tag_decl): Handle RID_THREAD.
9210 (obscure_complex_init): Reject run-time init of tls.
9211 (grokvardecl, grokdeclarator): Handle RID_THREAD.
9212 * lex.c (reswords): Add __thread.
9213 (rid_to_yy): Map RID_THREAD to SCSPEC.
9214
9215 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
9216
9217 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9218 * cp-tree.h (cxx_post_options): Kill.
9219 * cp-lex.c (cxx_post_options): Kill.
9220
9221 2002-05-21 Richard Henderson <rth@redhat.com>
9222
9223 * lex.c (rid_to_yy): Add RID_THREAD.
9224
9225 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
9226
9227 * init.c (build_vec_init): Test for trivial copy-assignment when
9228 copy-assigning arrays.
9229
9230 2002-05-20 Andreas Jaeger <aj@suse.de>
9231
9232 * init.c (build_default_init): Remove unused variable.
9233
9234 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
9235
9236 * call.c (any_strictly_viable): New.
9237 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9238
9239 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9240
9241 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9242
9243 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9244
9245 PR c++/186, DR 259
9246 * pt.c (do_decl_instantiation): Don't complain explicit
9247 instantiation after explicit specialization.
9248 (do_type_instantiation): Likewise.
9249
9250 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
9251
9252 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9253 renamed from...
9254 (complete_type_or_else): ... this. Redefined as macro.
9255 (cxx_incomplete_type_diagnostic): Declare.
9256 (cxx_incomplete_type_error): Define as macro.
9257 * init.c (build_delete): Warn about incomplete types other than
9258 void, and use the built-in operator delete for them.
9259 * typeck.c (complete_type_or_diagnostic): Renamed from
9260 complete_type_or_else. Added warn_only argument, passed to...
9261 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
9262 warnings or errors depending on new warn_only argument. Renamed
9263 from...
9264 (cxx_incomplete_type_error): ... this. New implementation in
9265 terms of cxx_incomplete_type_diagnostic.
9266
9267 2002-05-18 Jason Merrill <jason@redhat.com>
9268
9269 PR c++/6611
9270 * decl2.c (import_export_decl): If we clear
9271 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9272
9273 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9274
9275 PR c++/6620
9276 * pt.c (verify_class_unification): Don't check if PARM is template
9277 parameter dependent. Simplify.
9278 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9279 parameter dependent expression.
9280
9281 2002-05-14 Jason Merrill <jason@redhat.com>
9282
9283 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9284 Do set DECL_COMDAT.
9285 (synthesize_tinfo_var): Take the public decl.
9286 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
9287 (emit_tinfo_decl): Adjust. Call import_export_decl.
9288 * decl2.c (import_export_decl): Simplify tinfo decl handling.
9289
9290 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
9291
9292 * cp-tree.h (struct lang_type): Added non_zero_init.
9293 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9294 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9295 * class.c (check_field_decls): Test non_zero_init.
9296 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9297 zero-to-NULL conversions.
9298 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9299 type that needs zero-initialization without zeros.
9300 (check_initializer_decl): Compute zero-initializer for types
9301 that require a non-trivial one.
9302 * init.c (build_forced_zero_init): New function.
9303 (build_default_init): Use it.
9304 * tree.c (zero_init_p): New function.
9305 * typeck2.c (force_store_init_value): New function.
9306 (process_init_constructor): Create non-trivial zero-initializers
9307 for array members and class fields.
9308
9309 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
9310
9311 * lang-specs.h: Remove redundant -lang-c++.
9312
9313 2002-05-13 Jason Merrill <jason@redhat.com>
9314
9315 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9316 (fixed_type_or_null): See through reference vars.
9317 (build_base_path): Vtable contents are constant.
9318 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9319
9320 2002-05-12 Jason Merrill <jason@redhat.com>
9321
9322 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9323 structs are safe.
9324
9325 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
9326
9327 * cp-tree.h (flag_ansi): Remove.
9328 * decl2.c (flag_ansi): Remove.
9329 (cxx_decode_option): Set flag_iso and flag_undef.
9330
9331 2002-05-09 Jason Merrill <jason@redhat.com>
9332
9333 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9334 Use subtraction rather than a bitmask to get the index.
9335 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9336
9337 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9338
9339 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
9340
9341 * Make-lang.in (decl2.o): Update.
9342 * cp-tree.h (warn_multichar): Remove.
9343 * decl2.c: Include c-common.h.
9344 (warn_multichar): Remove.
9345
9346 2002-05-03 Jason Merrill <jason@redhat.com>
9347
9348 * tree.c (build_cplus_array_type): Only const and volatile get
9349 special handling.
9350
9351 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9352
9353 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9354
9355 ABI change, returning simple classes from functions.
9356 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9357 TYPE_HAS_TRIVIAL_INIT_REF is false or
9358 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9359
9360 2002-04-30 Jason Merrill <jason@redhat.com>
9361
9362 PR debug/6436
9363 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9364 anonymous class with a typedef if there are attributes.
9365
9366 2002-04-29 Paul Eggert <eggert@twinsun.com>
9367
9368 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9369
9370 2002-04-29 Jakub Jelinek <jakub@redhat.com>
9371
9372 PR c++/6477
9373 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9374 non-NULL first.
9375
9376 2002-04-29 Mark Mitchell <mark@codesourcery.com>
9377
9378 PR c++/6492
9379 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9380 enter that scope before name lookup.
9381
9382 PR c++/6486
9383 * method.c (do_build_copy_constructor): Avoid building
9384 cv-qualified reference types.
9385
9386 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
9387
9388 PR c++/5719
9389 * decl.c (grok_op_properties): Assignment ops don't have to return
9390 by value. operator% should.
9391
9392 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
9393
9394 PR c/6343
9395 * decl.c (duplicate_decls): Call merge_weak.
9396
9397 2002-04-26 Richard Henderson <rth@redhat.com>
9398
9399 * parse.y (malloced_yyss, malloced_yyvs): New.
9400 (yyoverflow): Re-add. Set them.
9401 (free_parser_stacks): New.
9402
9403 2002-04-26 Mark Mitchell <mark@codesourcery.com>
9404
9405 PR c++/6497
9406 * method.c (do_build_assign_ref): Pass a derivation to
9407 build_method_call when calling base class assignment operators.
9408
9409 2002-04-26 Richard Henderson <rth@redhat.com>
9410
9411 * parse.y (yyoverflow): Revert.
9412
9413 2002-04-26 Richard Henderson <rth@redhat.com>
9414
9415 PR c/3581
9416 * parse.y (string): Remove. Update all uses to use STRING
9417 instead, and not call combine_strings.
9418 * rtti.c (tinfo_name): Use fix_string_type.
9419 * semantics.c (finish_asm_stmt): Don't call combine_strings.
9420 * spew.c (yylexstring): New.
9421 (read_token): Use it.
9422
9423 2002-04-25 Richard Henderson <rth@redhat.com>
9424
9425 PR c/2161
9426 * parse.y (yyoverflow): New.
9427
9428 2002-04-25 Jason Merrill <jason@redhat.com>
9429
9430 PR c++/5607
9431 * search.c (check_final_overrider): No longer static.
9432 * class.c (update_vtable_entry_for_fn): Call it.
9433 * cp-tree.h: Adjust.
9434
9435 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9436
9437 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9438 * cp-tree.h (cxx_set_yydebug): Die.
9439 * lex.c (YYDEBUG): Get from c-lex.h.
9440 (cxx_set_yydebug): Remove.
9441 * parse.y: Include c-lex.h.
9442 (YYDEBUG): Get from c-lex.h.
9443
9444 2002-04-24 Mark Mitchell <mark@codesourcery.com>
9445
9446 PR c++/6438.
9447 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9448 void.
9449
9450 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
9451
9452 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9453 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9454 Redefine.
9455 * cp-tree.h (cp_attribute_table): Rename.
9456 * decl.c (lang_attribute_table): Remove declaration.
9457 (cxx_init_decl_processing): Don't set it.
9458 * tree.c (cp_attribute_table): Rename.
9459
9460 2002-04-24 Jason Merrill <jason@redhat.com>
9461
9462 PR c++/6331
9463 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9464 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9465 The pedwarn for array assignment is now unconditional.
9466 * tree.c (build_cplus_array_type_1): Still process simple array types
9467 normally in templates.
9468
9469 PR c++/6395
9470 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9471 stuff for comdats.
9472
9473 2002-04-23 Jakub Jelinek <jakub@redhat.com>
9474
9475 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9476 node with attributes.
9477
9478 2002-2-23 David O'Brien <obrien@FreeBSD.org>
9479
9480 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9481 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9482
9483 2002-04-23 Mark Mitchell <mark@codesourcery.com>
9484
9485 PR c++/6256:
9486 * pt.c (tsubst_friend_class): Handle templates with explicit
9487 nested names.
9488
9489 PR c++/6331:
9490 * typeck.c (merge_types): Remember the cv-qualification of pointer
9491 types when merging them.
9492
9493 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
9494
9495 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9496 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9497 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9498 cxx_mark_function_context): New.
9499 * decl.c (push_cp_function_context, pop_cp_function_context,
9500 mark_cp_function_context): Rename for consistency.
9501 (cxx_init_decl_processing): Don't set old hooks.
9502
9503 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
9504
9505 * call.c (convert_type_from_ellipsis): Rename, update.
9506 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9507 * cp-tree.h (convert_type_from_ellipsis): Rename.
9508 * decl.c (cxx_init_decl_processing): Don't set hook.
9509
9510 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9511
9512 * call.c (build_new_method_call): Update.
9513 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9514 * cp-tree.h (cxx_incomplete_type_error): New.
9515 * decl.c (grokdeclarator, grokparms): Update.
9516 * decl2.c (check_classfn): Update.
9517 * pt.c (tsubst): Update.
9518 * typeck.c (complete_type_or_else, expr_sizeof,
9519 decay_conversion): Update.
9520 * typeck2.c (incomplete_type_error): Rename.
9521 (add_exception_specifier): Update.
9522
9523 2002-04-18 Jason Merrill <jason@redhat.com>
9524
9525 PR c++/5658
9526 * search.c (setup_class_bindings): A class template qualifies as a
9527 type binding.
9528
9529 2002-04-17 Jakub Jelinek <jakub@redhat.com>
9530
9531 PR c++/6316
9532 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9533 before expanding.
9534
9535 2002-04-16 Mark Mitchell <mark@codesourcery.com>
9536
9537 * init.c (begin_init_stmts): Remove commented out code.
9538 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9539 * semantics.c (begin_gobal_stmt_expr): Adjust call to
9540 expand_start_stmt_expr.
9541
9542 2002-04-15 Mark Mitchell <mark@codesourcery.com>
9543
9544 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9545 dso_handle itself, to __cxa_atexit.
9546
9547 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9548
9549 * error.c (cxx_print_error_function): Adjust call to macros.
9550
9551 2002-04-14 Jakub Jelinek <jakub@redhat.com>
9552
9553 * class.c (layout_virtual_bases): Do all dsize computation on trees.
9554
9555 2002-04-14 Jason Merrill <jason@redhat.com>
9556
9557 * typeck.c (get_member_function_from_ptrfunc): Don't do
9558 gratuitious division and multiplication on
9559 ptrmemfunc_vbit_in_delta targets.
9560
9561 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9562
9563 PR c++/5373.
9564 * semantics.c (finish_expr_stmt): Remember the type of the
9565 expression before any conversions are performed.
9566
9567 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9568
9569 PR c++/5189.
9570 * call.c (add_template_candidate_real): Do not treat member
9571 templates as copy constructors.
9572
9573 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9574
9575 * decl.c (duplicate_decls): Do not copy the RTL for a variable
9576 declaration if the old variable had an incomplete type and the new
9577 variable does not.
9578 (complete_vars): Do not call layout_decl for completed variables.
9579
9580 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
9581
9582 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9583 with an explicit one.
9584 (follow_tag_typedef): New.
9585 (lookup_tag): Use it to extract the tag of an explicit typedef.
9586 (xref_tag): Likewise.
9587
9588 2002-04-11 Andrew Haley <aph@redhat.com>
9589
9590 * typeck.c (type_after_usual_arithmetic_conversions):
9591 If two types have the same variant, return immediately.
9592 When two floating-point operands are the same precision:
9593 convert to float if one of the operands is float;
9594 if neither operand is one of the standard types, return the type
9595 of the first operand.
9596
9597 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
9598
9599 PR c++/5507
9600 * decl.c (make_typename_type): Remove implicit typenameness.
9601
9602 2002-04-09 Jason Merrill <jason@redhat.com>
9603
9604 PR optimization/6189
9605 * semantics.c (genrtl_start_function): Don't free
9606 DECL_SAVED_FUNCTION_DATA for inline functions.
9607
9608 * init.c (build_member_call): For now, don't convert to
9609 intermediate base if it would cause an error.
9610
9611 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
9612
9613 * parse.y (namespace_qualifier, maybe_identifier,
9614 begin_explicit_instantiation, end_explicit_instantiation,
9615 apparent_template_type, .finish_template_type,
9616 do_id, maybe_init, defarg_again, component_decl_1):
9617 Add ending ';', in accordance with POSIX.
9618
9619 2002-04-06 Mark Mitchell <mark@codesourcery.com>
9620
9621 PR c++/5571
9622 * class.c (layout_class_type): Remember incomplete static
9623 variables.
9624 (finish_struct_1): Call complete_vars, not
9625 hack_incomplete_structures.
9626 * cp-tree.h (hack_incomplete_structures): Rename to ...
9627 (complete_vars): ... this.
9628 (struct saved_scope): Remove incomplete.
9629 (namespace_scope_incomplete): Remove.
9630 * decl.c (struct binding_level): Remove incomplete.
9631 (incomplete_vars): New variable.
9632 (mark_binding_level): Don't mark incomplete.
9633 (print_binding_level): Don't print it.
9634 (mark_saved_scope): Don't mark incomplete.
9635 (pushdecl): Use maybe_register_incopmlete_var.
9636 (cxx_init_decl_processing): Register incomplete_vars for GC.
9637 (start_decl_1): Clarify error message.
9638 (hack_incomplete_vars): Remove.
9639 (maybe_register_incomplete_var): New function.
9640 (complete_vars): Likewise.
9641
9642 2002-04-06 Jason Merrill <jason@redhat.com>
9643
9644 PR c++/4934
9645 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9646 set before checking it.
9647
9648 PR c++/525
9649 * init.c (build_member_call): Use build_scoped_ref.
9650 (resolve_offset_ref): Likewise.
9651 * call.c (build_scoped_method_call): Likewise.
9652 * tree.c (maybe_dummy_object): Kludge around current_class_type being
9653 wrong.
9654 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9655 * cp-tree.h: Adjust.
9656
9657 * init.c (push_base_cleanups): Just use build_scoped_method_call.
9658
9659 PR c++/6179
9660 * method.c (implicitly_declare_fn): Pass unqualified type to
9661 synthesize_exception_spec.
9662
9663 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9664
9665 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9666 * cvt.c: Update comment.
9667 * init.c (expand_cleanup_for_base): Update.
9668 * semantics.c (finish_parenthesized_expr): Update.
9669 * typeck.c (cp_truthvalue_conversion): Update.
9670
9671 2002-04-04 Jason Merrill <jason@redhat.com>
9672
9673 * semantics.c (finish_eh_cleanup): New fn.
9674 * cp-tree.h: Add prototype.
9675 * init.c (perform_member_init, expand_cleanup_for_base): Use
9676 finish_eh_cleanup.
9677 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9678 * cp-tree.h: Remove references.
9679 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9680 * dump.c (cp_dump_tree): Likewise.
9681 * pt.c (tsubst_expr): Likewise.
9682 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9683 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9684 * tree.c (cp_statement_code_p): Likewise.
9685
9686 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9687
9688 PR c++/5636
9689 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9690 cleanup for nrv.
9691
9692 PR c++/5104
9693 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9694 specifiers.
9695 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9696
9697 2002-04-03 Richard Henderson <rth@redhat.com>
9698
9699 * cp-lang.c (cxx_warn_unused_global_decl): New.
9700 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9701
9702 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
9703
9704 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9705 * tree.c (init_tree): Don't set hook.
9706
9707 2002-04-03 Roger Sayle <roger@eyesopen.com>
9708
9709 PR c++/5998:
9710 * decl.c (duplicate_decls): Don't mess with assembler names when
9711 redeclaring builtin functions as static.
9712
9713 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9714
9715 * call.c (build_addr_func): Update.
9716 * class.c (resolve_address_of_overloaded_function): Update.
9717 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9718 * cp-tree.h (cxx_mark_addressable): New.
9719 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9720 * decl2.c (build_cleanup): Update.
9721 * except.c (build_throw): Update.
9722 * init.c (resolve_offset_ref): Update.
9723 * pt.c (convert_nontype_argument): Update.
9724 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9725 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9726 unary_complex_lvalue): Update.
9727 (mark_addressable): Rename.
9728
9729 2002-04-01 Roger Sayle <roger@eyesopen.com>
9730
9731 PR c++/5998:
9732 * decl.c (duplicate_decls): Overwrite the RTL when (and only
9733 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
9734 but follow the SET_DECL_RTL idiom used elsewhere in the function.
9735
9736 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9737
9738 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9739 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9740 * decl.c (grokdeclarator): Update.
9741 * mangle.c (write_integer_cst): Update.
9742 * typeck.c (build_binary_op): Update.
9743
9744 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9745
9746 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9747 * lex.c (cxx_init): Don't set hook.
9748
9749 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9750
9751 * Make-lang.in (error.o): Update.
9752 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9753 * cp-tree.h (struct diagnostic_context): Predeclare.
9754 (cxx_print_error_function): New.
9755 * error.c: Include langhooks-def.h.
9756 (lang_print_error_function): Rename. Update.
9757 (init_error): Don't set hook.
9758
9759 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9760
9761 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9762 Redefine.
9763 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9764 * decl.c (finish_enum): Similarly.
9765 * error.c (dump_type): Similarly.
9766 * lex.c (cxx_init): Similarly.
9767 * mangle.c (write_builtin_type): Similarly.
9768 * typeck.c (comptypes): Similarly.
9769
9770 2002-03-28 Roger Sayle <roger@eyesopen.com>
9771
9772 PR c++/5998:
9773 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9774 in the g++ front-end.
9775 (duplicate_decl): Allow redefinition of anticipated built-ins.
9776 Fix inlining problem by over-writing the old DECL_RTL.
9777 (lookup_namespace_name): Fail to find an identifier in the
9778 specified namespace if its still anticipated.
9779 (builtin_function_1): New function split out from builtin_function
9780 to create a builtin in the current namespace with given context.
9781 (builtin_function): Call builtin_function_1 to define the
9782 appropriate builtins in both the std and global namespaces.
9783 (select_decl): Don't test for anticipated decls here.
9784 (unqualified_namespace_lookup): Instead ignore them whilst
9785 searching through scopes and namespaces.
9786 * decl2.c (do_nonmember_using_decl): If a using declaration
9787 specifies an anticipated built-in function, mark it as no longer
9788 anticipated in that scope.
9789 (ambiguous_decl): Avoid resolving to an anticipated decl.
9790 * lex.c (do_scoped_id): Fail to find an identifier in the global
9791 namespace if its still anticipated.
9792
9793 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9794
9795 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9796 * cp-tree.h (cp_make_lang_type): Rename.
9797 * lex.c (cp_make_lang_type): Rename.
9798 (make_aggr_type): Update.
9799 * tree.c (init_tree): Don't set make_lang_type_fn.
9800
9801 2002-03-29 Jakub Jelinek <jakub@redhat.com>
9802
9803 PR c++/6073
9804 * class.c (finish_struct_1): Update static field's DECL_MODE even
9805 if its type is a variant of t.
9806
9807 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9808
9809 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9810 * cp-tree.h (cxx_insert_default_attributes): New.
9811 * decl.c (insert_default_attributes): Rename.
9812
9813 2002-03-27 Mark Mitchell <mark@codesourcery.com>
9814
9815 PR c++/4884
9816 * call.c (build_op_delete_call): Allow for the fact the placement
9817 may be a COMPOUND_EXPR.
9818
9819 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9820
9821 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9822 * cp-tree.h (init_cplus_expand): Remove.
9823 (cxx_expand_expr): New.
9824 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9825 fix prototype.
9826 (init_cplus_expand): Remove.
9827 * lex.c (cxx_init): Don't call init_cplus_expand.
9828
9829 2002-03-26 Mark Mitchell <mark@codesourcery.com>
9830
9831 PR c++/4884.
9832 * init.c (build_new_1): Allow for the fact the result of
9833 build_function_call may be a COMPOUND_EXPR.
9834
9835 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
9836
9837 PR c++/5682
9838 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9839 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9840 (dfs_skip_nonprimary_vbases_markedp): Remove.
9841 * search.c (get_shared_vbase_if_not_primary): Remove.
9842 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9843 (dfs_skip_nonprimary_vbases_markedp): Remove.
9844 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9845 (dfs_marked_real_bases_queue_p): Likewise.
9846
9847 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9848
9849 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9850 * cp-tree.h (cxx_mark_tree): New.
9851 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9852
9853 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9854
9855 * cp-tree.h (cxx_maybe_build_cleanup): New.
9856 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9857 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9858 * tree.c (build_target_expr): Update.
9859 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9860
9861 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
9862
9863 * decl2.c (cxx_decode_option): Handle -E.
9864 * lang-specs.h (default_compilers): Preprocess with cc1plus.
9865 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9866
9867 2002-03-23 Jakub Jelinek <jakub@redhat.com>
9868
9869 PR c++/6037
9870 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9871
9872 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9873
9874 * error.c (dump_type): Be careful about implicit typenames.
9875
9876 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9877
9878 PR C++/3656
9879 * semantics.c (finish_base_specifier): Handle erronous base
9880 classes.
9881
9882 2002-03-22 Zack Weinberg <zack@codesourcery.com>
9883
9884 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9885 REAL_IS_NOT_DOUBLE.
9886
9887 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
9888
9889 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9890 an index into the vtable_entry array regardless of
9891 TARGET_PTRMEMFUNC_VBIT_LOCATION.
9892
9893 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
9894
9895 * tree.c (cp_cannot_inline_tree_fn): Same.
9896
9897 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9898
9899 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9900 insert_block, getdecls, global_bindings_p): New.
9901
9902 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
9903
9904 PR c++/4361
9905 * mangle.c (struct globals) Add internal_mangling_p member.
9906 (write_template_param): Do internal mangling, if needed.
9907 (mangle_conv_op_name_for_type): Request internal mangling.
9908
9909 2002-03-20 Jason Merrill <jason@redhat.com>
9910
9911 PR c++/2136
9912 * init.c (build_delete): Check access for a member op delete here.
9913 * decl2.c (delete_sanity): Not here.
9914
9915 2002-03-19 Jason Merrill <jason@redhat.com>
9916
9917 PR c++/5118
9918 * class.c (get_vfield_name): Use the constructor_name.
9919
9920 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9921
9922 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9923 * cp-tree.h (lang_printable_name): Rename.
9924 * error.c (lang_decl_name): Use new hook.
9925 * lex.c (cxx_init): Remove old hook.
9926 * pt.c (tsubst_decl): Use new hook.
9927 * tree.c (lang_printable_name): Rename.
9928
9929 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
9930
9931 PR c++/3882
9932 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9933 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9934 only after recording the declaration.
9935
9936 2002-03-18 Jason Merrill <jason@redhat.com>
9937
9938 PR c++/2039
9939 * init.c (resolve_offset_ref): Hand off to build_component_ref.
9940
9941 PR c++/4222, c++/5995
9942 * call.c (build_over_call): Fix empty class logic.
9943
9944 PR c++/3870
9945 * cp-tree.h (struct saved_scope): Add last_parms field.
9946 * decl.c (maybe_push_to_top_level): Save last_function_parms.
9947 (pop_from_top_level): Restore it.
9948
9949 PR c++/4377
9950 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
9951 NON_LVALUE_EXPRs.
9952
9953 PR c++/4003
9954 * pt.c (tsubst_friend_function): Use decl_namespace_context.
9955
9956 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9957 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9958 type with a nontrivial destructor.
9959
9960 2002-03-17 Jason Merrill <jason@redhat.com>
9961
9962 PR c++/4460
9963 * class.c (build_base_path): Virtual base layout is fixed in
9964 in-charge [cd]tors.
9965
9966 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9967
9968 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9969 * parse.y (yyparse): Remove macro.
9970
9971 2002-03-17 Jason Merrill <jason@redhat.com>
9972
9973 PR c++/5757
9974 * init.c (build_new_1): Pass the right pointer to op delete.
9975
9976 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
9977
9978 PR c++/4361
9979 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9980 conversion operators go.
9981 (struct lang_decl_flags): Add template_conv_p and unused
9982 bitfields.
9983 (DECL_TEMPLATE_CONV_FN_P): New macro.
9984 * call.c (build_user_type_conversion_1): Don't check second type
9985 conversion of overload set first.
9986 * class.c (add_method): Make sure templated conversion operators
9987 all end up on slot 2.
9988 * lex.c (do_identifier): A conversion operator token might be
9989 satisfied by a templated conversion operator.
9990 * pt.c (check_explicit_specialization): Use
9991 CLASSTYPE_FIRST_CONVERSION_SLOT.
9992 (template_parm_this_level_p): New function.
9993 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9994 * search.c (lookup_fnfields_1): Template conversions will be on
9995 the first slot.
9996 * typeck.c (build_component_ref): Preserve the type of an
9997 conversion operator name on the overload type.
9998 (build_x_function_call): Retrieve the conversion operator name.
9999
10000 2002-03-15 Richard Henderson <rth@redhat.com>
10001
10002 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10003
10004 2002-03-15 Mark Mitchell <mark@codesourcery.com>
10005
10006 * cp-tree.h (CLEANUP_DECL): Remove.
10007 (CLEANUP_EXPR): Likewise.
10008 * decl.c (destroy_local_var): Simplify.
10009 (maybe_build_cleanup): Tidy.
10010 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10011 * semantics.c (cp_expand_stmt): Likewise.
10012 * cp/tree.c (cp_statement_code_p): Likewise.
10013
10014 2002-03-15 Jason Merrill <jason@redhat.com>
10015
10016 PR c++/5857
10017 * decl.c (duplicate_decls): Use merge_types instead of common_type.
10018 * typeck.c (common_type): Just hand off to
10019 type_after_usual_arithmetic_conversions and
10020 composite_pointer_type.
10021 (merge_types): New fn.
10022 (commonparms): Use it instead of common_type.
10023 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10024 (composite_pointer_type): Also handle attributes.
10025 * cp-tree.h: Declare merge_types.
10026
10027 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10028 variables.
10029 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10030
10031 2002-03-14 Richard Henderson <rth@redhat.com>
10032
10033 * decl.c: Include c-pragma.h.
10034 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10035 * Make-lang.in: Update dependencies.
10036
10037 2002-03-14 Jakub Jelinek <jakub@redhat.com>
10038
10039 PR c++/5908
10040 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10041 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10042
10043 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10044
10045 * mangle.c (write_builtin_type): Handle 128-bit integers even if
10046 they are not a standard integer type.
10047
10048 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10049
10050 * cp-tree.h (init_init_processing): Remove declaration.
10051 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10052 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10053
10054 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10055
10056 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10057 Define.
10058 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10059 tree_code_length.
10060 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10061 cplus_tree_code_name): Delete.
10062 (cxx_init): Don't call add_c_tree_codes, instead set
10063 lang_unsafe_for_reeval. Don't try to copy into the various
10064 tree_code arrays.
10065
10066 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
10067
10068 PR c++/5659
10069 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10070 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10071 definitions.
10072
10073 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10074
10075 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
10076 DR209 is now not a defect.
10077 * cp-tree.h (skip_type_access_control): Remove.
10078 * decl.c (grokdeclarator): Do type access control for friend
10079 declarations.
10080 * semantics.c (decl_type_access_control): Don't reset
10081 current_type_lookups.
10082 (save_type_access_control): Always save the lookups.
10083 (skip_type_access_control): Remove.
10084 (finish_class_definition): Don't change type_lookups.
10085
10086 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10087
10088 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
10089 It is incorrect.
10090 * typeck.c (build_static_cast): Compare non-qualified types
10091 with pointer to member conversions.
10092
10093 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
10094 Daniel Berlin <dan@dberlin.org>
10095
10096 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10097 (cxx_get_alias_set): Use it.
10098
10099 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10100
10101 * cp-tree.h (stabilize_expr): Prototype.
10102
10103 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
10104
10105 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10106 conditional return void.
10107
10108 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
10109
10110 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10111 * cp-tree.h (cxx_unsave): New.
10112 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10113 (init_tree): Update.
10114
10115 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10116
10117 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10118 explicit sizeof/sizeof.
10119 * decl2.c (cxx_decode_option): Likewise.
10120 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10121
10122 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
10123
10124 PR c++/775
10125 * decl.c (lookup_tag): Only reject enum/class mismatch, not
10126 class/union mismatch.
10127 * parse.y (check_class_key): New function.
10128 (structsp): Call it.
10129
10130 2002-03-01 Michael Matz <matz@suse.de>
10131
10132 * typeck.c (cp_pointer_int_sum): Complete inner type which is
10133 used later by size_in_bytes().
10134
10135 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
10136
10137 * cp-tree.h: Require __GNUC__ to be #defined.
10138 (build_init): Add missing prototype.
10139
10140 2002-03-01 Jason Merrill <jason@redhat.com>
10141
10142 * except.c: Don't include decl.h or obstack.h. Do include
10143 tree-inline.h.
10144 (build_throw): Destroy temporaries from the thrown
10145 expression before calling __cxa_throw. Construct a thrown
10146 temporary directly into the exception object.
10147 (stabilize_throw_expr): New function.
10148 (wrap_cleanups_r): New function.
10149 * tree.c (stabilize_expr): New function.
10150 * init.c (build_init): New function.
10151 * Make-lang.in (cp/except.o): Adjust .h deps.
10152
10153 2002-02-28 Jason Merrill <jason@redhat.com>
10154
10155 * search.c (lookup_base_r): Don't clear is_non_public just because
10156 we found a friendly scope.
10157
10158 * decl.c (finish_function): Only warn about missing return
10159 statement with -Wreturn-type.
10160
10161 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
10162
10163 * class.c (build_clone): Update.
10164 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10165 * cp-tree.h (cxx_dup_lang_specific_decl): New.
10166 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10167 (copy_decl): Update.
10168 * method.c (make_thunk): Update.
10169
10170 2002-02-27 Zack Weinberg <zack@codesourcery.com>
10171
10172 * decl2.c: Delete traditional-mode-related code copied from
10173 the C front end but not used, or used only to permit the
10174 compiler to link.
10175
10176 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
10177
10178 PR c++/4093
10179 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10180 to void.
10181
10182 2002-02-22 Jakub Jelinek <jakub@redhat.com>
10183
10184 PR other/5746
10185 * semantics.c (finish_switch_cond): Don't call get_unwidened
10186 if error_mark_node.
10187
10188 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
10189
10190 PR c++/2645, DR 295
10191 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10192 tf_keep_type_decl.
10193 (make_typename_type): Use tsubst_flags_t.
10194 * decl.c (make_typename_type): Adjust. Return non-artificial
10195 TYPE_DECLs, if required.
10196 (grokdeclarator): Simplify CVR qualification handling. Allow bad
10197 qualifiers on typedef types.
10198 * decl2.c (handle_class_head): Adjust make_typename_type call.
10199 * parse.y (nested_name_specifier): Likewise.
10200 (typename_sub0): Likewise.
10201 (typename_sub1): Likewise.
10202 * pt.c (convert_template_argument): Adjust make_typename_type
10203 return value.
10204 (tsubst): Adjust cp_build_qualified_type_real calls.
10205 (check_cv_quals_for_unify): Cope with allowing bad qualifications
10206 on template type parms.
10207 (instantiate_decl): Recheck substitutions to give warnings on bad
10208 qualifications.
10209 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10210
10211 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
10212
10213 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10214
10215 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10216 unless DECL_ALWAYS_INLINE.
10217
10218 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10219
10220 * typeck.c (cp_pointer_int_sum): Renamed from
10221 pointer_int_sum, call pointer_int_sum.
10222
10223 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10224
10225 * decl.c (duplicate_decls): Return 0 if issued error about
10226 redeclaration.
10227
10228 2002-02-19 Jason Merrill <jason@redhat.com>
10229
10230 ABI change: Mangle `void (A::*)() const' as
10231 M1AKFvvE, not MK1AFvvE.
10232 * mangle.c (write_function_type): Write cv-quals for member
10233 function type here.
10234 (write_pointer_to_member_type): Not here.
10235
10236 2002-02-18 Jason Merrill <jason@redhat.com>
10237
10238 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10239 (do_decl_instantiation): Likewise.
10240
10241 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
10242
10243 PR c++/5685
10244 * decl.c (duplicate_decls): Make warning unconditional
10245 if duplicate default argument declarations are present.
10246
10247 2002-02-17 Jakub Jelinek <jakub@redhat.com>
10248
10249 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10250 shortening.
10251
10252 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
10253
10254 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10255 remove incorrect comment. Move #if 0'd code to common path. Use
10256 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10257
10258 2002-02-13 Jason Merrill <jason@redhat.com>
10259
10260 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10261 (finish_function): Don't warn if current_function_returns_null.
10262
10263 * typeck2.c (digest_init): Do handle values of vector type.
10264
10265 * typeck2.c (digest_init, process_init_constructor): Treat vectors
10266 like arrays.
10267
10268 2002-02-11 Jason Merrill <jason@redhat.com>
10269
10270 * parse.y (reserved_declspecs): Don't handle attributes.
10271 (reserved_typespecquals): Handle them here.
10272 * Make-lang.in (parse.c): Adjust expected conflicts.
10273
10274 2002-02-08 Jakub Jelinek <jakub@redhat.com>
10275
10276 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10277 instead of compstmt.
10278 (compstmt_or_stmtexpr): Renamed from compstmt.
10279 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10280
10281 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10282
10283 Rename instantiate_type_flags to tsubst_flags_t & expand use.
10284 * cp-tree.h (instantiate_type_flags): Rename to ...
10285 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10286 add tf_warning flag.
10287 (instantiate_type): Adjust prototype.
10288 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10289 do_type_instantiation, cp_build_qualified_type_real): Likewise.
10290 cp_build_qualified_type: Adjust.
10291 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10292 tf_*.
10293 * call.c (standard_conversion): Rename itf_* to tf_*.
10294 (reference_binding): Likewise.
10295 (convert_like_real): Likewise.
10296 * cvt.c (cp_convert_to_pointer): Likewise.
10297 (convert_to_reference): Likewise.
10298 * decl.c (lookup_namespace_name): Use tf_* flags.
10299 (make_typename_type): Likewise.
10300 (grokdeclarator): Likewise.
10301 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10302 (coerce_template_template_parms, convert_template_argument,
10303 coerce_template_parms, maybe_get_template_decl_from_type_decl,
10304 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10305 instantiate_class_template, tsubst_template_arg_vector,
10306 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10307 tsubst_decl, tsubst_arg_types, tsubst_function_type,
10308 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10309 instantiate_template, fn_type_unification,
10310 resolve_overloaded_unification, verify_class_unification,
10311 unify, get_bindings_real, do_type_instantiation,
10312 regenerate_decl_from_template, instantiate_decl,
10313 tsubst_initializer_list, tsubst_enum,
10314 get_mostly_instantiated_function_type,
10315 invalid_nontype_parm_type_p): Likewise.
10316 * tree.c (cp_build_qualified_type_real): Likewise.
10317 * typeck.c (build_binary_op): Rename itf_* to tf_*.
10318 (build_ptrmemfunc): Likewise.
10319 (convert_for_assignment): Likewise.
10320
10321 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10322
10323 PR c++/109
10324 * decl.c (grokdeclarator): Allow friend declarations from
10325 dependent types.
10326 * decl2.c (handle_class_head): Don't push into template parm contexts.
10327 * pt.c (push_template_decl_real): Template parm contexts are never
10328 being defined.
10329
10330 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
10331
10332 * class.c: Include target.h.
10333 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10334 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10335 bit-field layout.
10336 * Make-lang.in: Adjust deps.
10337
10338 2002-02-05 Jason Merrill <jason@redhat.com>
10339
10340 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10341
10342 2002-02-04 Jakub Jelinek <jakub@redhat.com>
10343
10344 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10345 (finish_switch_cond): Set SWITCH_TYPE.
10346
10347 2002-02-04 Richard Henderson <rth@redhat.com>
10348
10349 * method.c (use_thunk): Always initialize the block tree. Reindent.
10350 * semantics.c (expand_body): Emit thunks after function, not before.
10351
10352 2002-02-04 Jason Merrill <jason@redhat.com>
10353
10354 * decl.c (start_function): Call cplus_decl_attributes immediately
10355 after grokdeclarator.
10356
10357 * decl.c (start_function): Combine DECL_RESULT handling code.
10358
10359 2002-02-03 Jason Merrill <jason@redhat.com>
10360
10361 * xref.c: Remove.
10362 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10363 (cp/xref.o): Remove dependencies.
10364 * class.c (finish_struct_1, check_methods): Don't call xref fns.
10365 (finish_struct_1): Likewise.
10366 * friend.c (make_friend_class): Likewise.
10367 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10368 * spew.c (read_process_identifier): Likewise.
10369
10370 2002-02-01 Jason Merrill <jason@redhat.com>
10371
10372 PR c++/4872
10373 * decl.c (finish_function): Warn about a non-void function with
10374 no return statement and no abnormal exit.
10375 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10376 (current_function_returns_abnormally): New macro.
10377 * call.c (build_call): Set it.
10378
10379 * typeck.c (build_component_ref): Always complain about offsetof
10380 constructs on non-PODs. Only make it an error for members of
10381 virtual bases.
10382
10383 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10384 (dump_function_decl): Always dump parms.
10385
10386 * decl2.c (finish_static_data_member_decl): Complain about a local
10387 class with a static data member.
10388
10389 PR c++/4286
10390 * search.c (lookup_field_1): Don't xref a static data member
10391 just because we looked it up.
10392
10393 2002-01-31 Jason Merrill <jason@redhat.com>
10394
10395 * Make-lang.in (parse.c): Handle .output file.
10396
10397 PR c++/3395
10398 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10399 not TREE_TYPE.
10400 * semantics.c (finish_class_definition): Adjust.
10401
10402 Allow attributes in parms and casts.
10403 * parse.y (named_parm): Don't strip attrs.
10404 (declmods): Remove 'attributes' production.
10405 (nonempty_cv_qualifiers): Accept attributes.
10406 (ATTRIBUTE): Give precedence.
10407 * decl.c (groktypename): Handle attributes.
10408 (grokparms): Likewise.
10409
10410 2002-01-29 Jakub Jelinek <jakub@redhat.com>
10411
10412 * decl2.c (cxx_decode_option): Pass 0 as last argument to
10413 cpp_handle_option.
10414 * lang-specs.h: Use cpp_unique_options instead of cpp_options
10415 when used together with cc1_options.
10416
10417 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
10418
10419 PR c++/5132
10420 * typeck2.c (digest_init): Make sure non-array core type is
10421 instantiated.
10422 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10423 constructor, rather than build a new one.
10424 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10425 PURPOSE of constructor elts.
10426
10427 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10428
10429 * Make-lang.in (parse.c): Adjust expected number of
10430 shift-reduce conflicts.
10431 (decl.o): Depend on diagnostic.h.
10432 * decl.c: Include diagnostic.h.
10433 (grokdeclarator): Check for null pointer.
10434 (finish_function): Don't abort when
10435 current_binding_level->parm_flag != 1, if errors have
10436 occurred; throw away the statement tree and extra binding
10437 levels, and continue.
10438 * lex.c (note_list_got_semicolon): Check for null pointer.
10439 * method.c (hack_identifier): Just return error_mark_node if
10440 value is error_mark_node.
10441 * parse.y (primary: TYPEID(type_id)): No need to use
10442 TYPE_MAIN_VARIANT here.
10443 (handler_seq): Accept an empty list of catch clauses and
10444 generate a fake handler block to avoid later crashes.
10445 (ansi_raise_identifier): Accept the error token too.
10446 * semantics.c (begin_class_definition,
10447 finish_class_definition): Check for error_mark_node.
10448
10449 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10450
10451 * typeck2.c (friendly_abort): Delete definition.
10452 * cp-tree.h (friendly_abort): Don't prototype.
10453 (my_friendly_assert): Use fancy_abort.
10454
10455 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10456
10457 * cp-tree.h (my_friendly_abort): Remove.
10458
10459 2002-01-23 Jakub Jelinek <jakub@redhat.com>
10460
10461 * spew.c (pending_inlines, pending_inlines_tail,
10462 processing_these_inlines): Make static.
10463 (mark_pending_inlines): Remove static.
10464 (begin_parsing_inclass_inline): If in function, save pi
10465 for GC to cp_function_chain->unparsed_inlines instead.
10466 (process_next_inline): Likewise.
10467 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10468 (mark_pending_inlines): Add prototype.
10469 * decl.c (spew_debug): Remove unused extern.
10470 (mark_lang_function): Call mark_pending_inlines.
10471
10472 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10473
10474 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10475 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10476 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10477 Change my_fancy_abort() to abort().
10478
10479 2002-01-23 Jason Merrill <jason@redhat.com>
10480
10481 PR c++/5453
10482 * class.c (fixed_type_or_null): Fix thinko.
10483
10484 PR c++/3331
10485 * init.c (resolve_offset_ref): Use build_indirect_ref.
10486
10487 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10488
10489 2002-01-22 Jason Merrill <jason@redhat.com>
10490
10491 * parse.y (function_body): Suppress the block for the outermost
10492 curly braces.
10493 * decl.c (pushdecl): Don't try to skip it.
10494 (begin_function_body): Keep the block we create, not the next one.
10495 * init.c (emit_base_init): Don't mess with keep_next_level.
10496
10497 * class.c (build_base_path): Tweak formatting.
10498
10499 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
10500
10501 Fix regression introduced with patch for c++/775
10502 * parse.y (class_head_defn): Check for template specializations
10503 with a different class-key.
10504
10505 2002-01-17 Jason Merrill <jason@redhat.com>
10506
10507 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10508 (begin_function_body): Call them and keep_next_level.
10509 * init.c (emit_base_init): Call keep_next_level.
10510 * semantics.c (setup_vtbl_ptr): Lose.
10511 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10512 (vtbls_set_up_p): Lose.
10513 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10514 * method.c (do_build_copy_constructor): Likewise.
10515 (synthesize_method): Call finish_mem_initializers.
10516 * parse.y (nodecls): Likewise.
10517
10518 * error.c (dump_type_suffix): Print the exception specs before
10519 recursing.
10520 (dump_function_decl): Here, too.
10521
10522 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10523
10524 2002-01-10 Ira Ruben <ira@apple.com>
10525
10526 PR c++/907
10527 * decl.c (start_method): Handle attrlist.
10528
10529 2002-01-10 Jakub Jelinek <jakub@redhat.com>
10530
10531 * decl2.c (max_tinst_depth): Increase default limit to 500.
10532
10533 2002-01-10 Graham Stott <grahams@redhat.com>
10534
10535 * spew.c (YYCHAR): Uppercase macro parameter and add
10536 parenthesis.
10537 (YYCODE): Likewise.
10538 (NAME): Uppercase macro parameter.
10539
10540 2002-01-09 Graham Stott <grahams@redhat.com>
10541
10542 * decl.h (grokdeclarator): Wrap long line.
10543
10544 * semantics.c (FINISH_COND): Uppercase macro paramaters and
10545 add parenthesis.
10546
10547 2002-01-08 Graham Stott <grahams@redhat.com>
10548
10549 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10550 (PALLOC): Uppercase macro parameter and whitespace.
10551 (SALLOC): Uppercase macro parameter.
10552 (SFREE): Uppercase macros parameter, add parenthese and
10553 whitespace.
10554 (STREQL): Uppercase macro parameter and whitespace.
10555 (STRNEQ): Likewise.
10556 (STRLSS): Likewise.
10557 (STRLEQ): Likewise.
10558 (STRGTR): Likewise.
10559 (STRGEQ): Likewise.
10560
10561 * call.c (convert_like): Add parenthesis and wrap.
10562 (convert_like_with_context): Likewise.
10563 (ICS_RANK): Whitespace.
10564 (NEED_TEMPORARY_P): Remove parenthesis.
10565
10566 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10567 whitespace.
10568 (VTT_MARKED_BINFO_P): Likewise.
10569
10570 * decl.c (BINDING_LEVEL): Add parenthesis.
10571 (DEF_OPERATOR): Likewise.
10572
10573 * mangle.c (MANGLE_TRACE): Add parenthesis.
10574 (MANGLE_TRACE_TREE): Likewise.
10575 (write_signed_number): Likewise.
10576 (write_unsigned_number): Likewise.
10577
10578 * pt.c (ccat): Uppercase macro parameter.
10579 (cat): Likewise
10580
10581 * search.c (SET_BINFO_ACCESS): Add parenthesis.
10582
10583 2002-01-07 Jason Merrill <jason@redhat.com>
10584
10585 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10586 to pedwarn.
10587
10588 PR c++/3536
10589 * method.c (make_thunk): If !flag_weak, give the thunk the
10590 function's linkage.
10591 (use_thunk): Here, too.
10592
10593 2002-01-07 Graham Stott <grahams@redhat.com>
10594
10595 * error.c: Update copyright date.
10596 (print_scope_operator): Add parenthesis.
10597 (print_left_paren): Likewise.
10598 (print_right_paren): Likewise.
10599 (print_left_bracket): Likewise.
10600 (print_right_bracket): Likewise.
10601 (print_template_argument_list_start): Likewise.
10602 (print_template_argument_list_end): Likewise.
10603 (print_non_consecutive_character): Likewise.
10604 (print_tree_identifier): Likewise.
10605 (print_identifier): Likewise.
10606 (NEXT_CODE): Uppercase macro parameter.
10607 (ident_fndecl): Delete unused.
10608 (GLOBAL_THING): Likewise.
10609
10610 2002-01-06 Graham Stott <grahams@redhat.com>
10611
10612 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10613 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10614 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10615 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10616 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10617 (C_IS_RESERVED_WORD): Uppercase macro parameter.
10618 (C_RID_YYCODE) Likewise.
10619 (ptrmem_cst): Use rtx.
10620 (LOCAL_BINDING_P): Add whitespace.
10621 (INHERITED_VALUE_BINDING_P): Likewise.
10622 (BINDING_SCOPE): Wrap long line.
10623 (BINDING_HAS_LEVEL_P): Remove parenthesis.
10624 (BINDING_VALUE): Wrap long line.
10625 (BINDING_TYPE): Whitespace.
10626 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10627 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10628 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10629 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10630 (same_type_p): Uppercase macro parameters.
10631 (same_type_ignoring_top_level_qualifiers_p): Likewise.
10632 (OVL_FUNCTION): Wrap long line.
10633 (OVL_CHAIN): Whitespace.
10634 (OVL_CURRENT): Add parenthesis and whitespace.
10635 (OVL_NEXT): Whitespace.
10636 (OVL_USED): Likewise.
10637 (IDENTIFIER_TYPE_VALUE): Likewise.
10638 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10639 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10640 (LANG_ID_FIELD): Whitespace.
10641 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10642 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10643 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10644 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10645 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10646 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10647 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10648 (IDENTIFIER_VIRTUAL_P): Likewise.
10649 (IDENTIFIER_OPNAME_P): Likewise.
10650 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10651 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10652 (C_SET_EXP_ORIGINAL_CODE): Likewise.
10653 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10654 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10655 (IS_AGGR_TYPE): Uppercase macro parameter.
10656 (CLASS_TYPE_P): Likewise.
10657 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10658 (IS_AGGR_TYPE_2): Whitespace.
10659 (TAGGED_TYPE_P): Uppercase macro parameter.
10660 (TYPE_BUILT_IN): Whitespace.
10661 (TYPE_FOR_JAVA): Likewise.
10662 (FUNCTION_ARG_CHAIN): Remove parenthesis.
10663 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10664 (FUNCTION_FIRST_USER_PARAM): Likewise.
10665 (PROMOTES_TO_AGGR_TYPE): Whitespace.
10666 (DERIVED_FROM_P): Add parenthesis and wrap.
10667 (UNIQUELY_DERIVED_FROM_P): Likewise.
10668 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10669 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10670 (CLASSTYPE_USE_TEMPLATE): Whitespace.
10671 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10672 (TYPE_GETS_DELETE): Add parenthesis.
10673 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10674 (TYPE_HAS_ASSIGN_REF): Likewise,
10675 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10676 (TYPE_HAS_INIT_REF): Likewise.
10677 (TYPE_HAS_CONST_INIT_REF): Likewise.
10678 (TYPE_BEING_DEFINED): Likewise.
10679 (TYPE_LANG_SPECIFIC): Likewise.
10680 (CLASSTYPE_RTTI): Likewise.
10681 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10682 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10683 (TYPE_OVERLOADS_ARROW): Likewise.
10684 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10685 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10686 (CLASSTYPE_METHOD_VEC): Likewise.
10687 (CLASSTYPE_MARKED_N): Likewise.
10688 (CLASSTYPE_MARKED): Likewise.
10689 (CLASSTYPE_MARKED2): Likewise.
10690 (CLASSTYPE_MARKED3): Likewise.
10691 (CLASSTYPE_MARKED4): Likewise.
10692 (CLASSTYPE_MARKED5): Likewise.
10693 (CLASSTYPE_MARKED6): Likewise.
10694 (SET_CLASSTYPE_MARKED): Whitespace.
10695 (CLEAR_CLASSTYPE_MARKED): Likewise.
10696 (SET_CLASSTYPE_MARKED2): Likewise.
10697 (CLEAR_CLASSTYPE_MARKED2): Likewise.
10698 (SET_CLASSTYPE_MARKED3): Likewise.
10699 (CLEAR_CLASSTYPE_MARKED3): Likewise.
10700 (SET_CLASSTYPE_MARKED4): Likewise.
10701 (CLEAR_CLASSTYPE_MARKED4): Likewise.
10702 (SET_CLASSTYPE_MARKED5): Likewise.
10703 (CLEAR_CLASSTYPE_MARKED5): Likewise.
10704 (SET_CLASSTYPE_MARKED6): Likewise.
10705 (CLEAR_CLASSTYPE_MARKED6): Likewise.
10706 (CLASSTYPE_TAGS): Likewise.
10707 (CLASSTYPE_VSIZE): Likewise.
10708 (CLASSTYPE_VBASECLASSES): Likewise.
10709 (CANONICAL_BINFO): Add parenthesis.
10710 (CLASSTYPE_SIZE(NODE): Likewise.
10711 (CLASSTYPE_SIZE_UNIT): Likewise.
10712 (CLASSTYPE_ALIGN(NODE): Likewise.
10713 (CLASSTYPE_USER_ALIGN): Likewise.
10714 (TYPE_JAVA_INTERFACE): Likewise.
10715 (CLASSTYPE_PURE_VIRTUALS): Likewise.
10716 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10717 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10718 (CLASSTYPE_HAS_MUTABLE): Likewise.
10719 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10720 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10721 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10722 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10723 (CLASSTYPE_INTERFACE_ONLY): Likewise.
10724 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10725 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10726 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10727 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10728 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10729 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10730 (BINFO_UNSHARED_MARKED): Whitespace.
10731 (BINFO_MARKED): Whitespace and wrap.
10732 (SET_BINFO_MARKED): Likewise.
10733 (CLEAR_BINFO_MARKED): Likewise.
10734 (BINFO_VTABLE_PATH_MARKED): Likewise.
10735 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10736 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10737 (BINFO_SUBVTT_INDEX): Remove parenthesis.
10738 (BINFO_VPTR_INDEX): Likewise.
10739 (BINFO_PRIMARY_BASE_OF): Likewise,
10740 (CLASSTYPE_VFIELDS): Whitespace.
10741 (VF_DERIVED_VALUE): Wrap long line.
10742 (NAMESPACE_LEVEL): Whitespace.
10743 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10744 (DEFARG_POINTER): Whitespace.
10745 (DECL_NEEDED_P): Remove parenthesis.
10746 (DECL_LANGUAGE): Whitespace.
10747 (SET_DECL_LANGUAGE): Add parenthesis.
10748 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10749 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10750 (DECL_IN_AGGR_P): Whitespace.
10751 (DECL_FRIEND_P): Likewise.
10752 (DECL_BEFRIENDING_CLASSES): Likewise.
10753 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10754 (DECL_NONCONVERTING_P): Whitespace.
10755 (DECL_PURE_VIRTUAL_P): Likewise.
10756 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10757 (DECL_PENDING_INLINE_INFO): Whitespace.
10758 (DECL_SORTED_FIELDS): Likewise.
10759 (DECL_DEFERRED_FN): Likewise.
10760 (DECL_TEMPLATE_INFO): Likewise.
10761 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10762 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10763 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10764 (TMPL_ARGS_LEVEL): Likewise.
10765 (SET_TMPL_ARGS_LEVEL): Likewise.
10766 (INNERMOST_TEMPLATE_PARMS): Whitespace.
10767 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10768 (INTEGRAL_CODE_P(CODE): Add parenthesis.
10769 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10770 (TYPE_HAS_CONSTRUCTOR): Whitespace.
10771 (TREE_HAS_CONSTRUCTOR): Likewise.
10772 (TYPE_HAS_DESTRUCTOR): Likewise.
10773 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10774 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10775 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10776 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10777 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10778 (TYPE_PTRMEMFUNC_P): Likewise.
10779 (TYPE_PTRMEMFUNC_FLAG): Likewise.
10780 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10781 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10782 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10783 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10784 (DECL_ACCESS): Whitespace.
10785 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10786 (DECL_GLOBAL_DTOR_P): Likewise.
10787 (GLOBAL_INIT_PRIORITY): Likewise.
10788 (DECL_TEMPLATE_PARMS): Likewise.
10789 (DECL_TEMPLATE_RESULT): Likewise.
10790 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10791 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10792 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10793 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10794 (PRIMARY_TEMPLATE_P): Add parenthesis.
10795 (DECL_USE_TEMPLATE): Whitespace.
10796 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10797 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10798 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10799 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10800 (CALL_DECLARATOR_PARMS): Remove parenthesis.
10801 (CALL_DECLARATOR_QUALS): Likewise.
10802 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10803 (TEMP_NAME_P): Wrap.
10804 (VFIELD_NAME_P): Likewise.
10805 (B_SET): Uppercase macro parameters and add parenthesis.
10806 (B_CLR): Likewise.
10807 (B_TST): Likewise.
10808 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10809 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10810 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10811 (same_or_base_type_p): Likewise.
10812 (cp_deprecated): Likewise.
10813
10814 2002-01-05 Richard Henderson <rth@redhat.com>
10815
10816 * semantics.c (expand_body): Revert last change.
10817
10818 2002-01-04 Jason Merrill <jason@redhat.com>
10819
10820 PR c++/4122
10821 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10822 lost primary.
10823
10824 * class.c (build_vtbl_initializer): Check for a lost primary
10825 before calculating the vtable entry to throw away.
10826
10827 2002-01-02 Jason Merrill <jason@redhat.com>
10828
10829 * semantics.c (expand_body): Call outlining_inline_function when
10830 emitting an inline function out of line.
10831
10832 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10833
10834 PR c++/5116, c++/764 reversion
10835 * call.c (build_new_op): Revert the instantiations. They are
10836 incorrect.
10837
10838 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10839
10840 PR c++/5089
10841 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10842
10843 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10844
10845 PR c++/3716
10846 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10847 (tsubst, case POINTER_TYPE): Handle pmfs here.
10848 (tsubst, case OFFSET_TYPE): Check it is not an offset to
10849 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10850
10851 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10852
10853 PR c++/35
10854 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10855 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10856 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10857 PARM_DECL.
10858 (tsubst_template_parms): Break up loop statements.
10859 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10860 parm PARM_DECLs don't get promoted.
10861
10862 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10863
10864 PR c++/5123
10865 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10866 (build_x_function_call): Cope with a COMPONENT_REF containing a
10867 TEMPLATE_ID_EXPR.
10868
10869 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10870
10871 PR c++/5213
10872 * pt.c (convert_template_argument): Be more careful determining
10873 when RECORD_TYPE templates are or are not templates.
10874
10875 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10876
10877 PR c++/775
10878 * cp-tree.h (handle_class_head): Adjust prototype.
10879 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10880 parameters. Use for all class heads.
10881 * parse.y (named_class_head_sans_basetype, named_class_head,
10882 named_complex_class_head_sans_basetype,
10883 named_class_head_sans_basetype_defn,
10884 unnamed_class_head): Remove.
10885 (class_head, class_head_apparent_template): Recognize class heads
10886 (class_head_decl, class_head_defn): New reductions. Process class
10887 heads.
10888 (structsp): Adjust class definition and class declaration
10889 reductions.
10890 (maybe_base_class_list): Give diagnostic on empty list.
10891
10892 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10893
10894 PR c++/4379
10895 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10896 single non-static member.
10897 (unary_complex_lvalue): If it cannot be a pointer to member, don't
10898 make it so. Check it is not pointer to reference.
10899
10900 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10901
10902 PR c++/5132
10903 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10904 are processing a template decl.
10905
10906 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10907
10908 PR c++/5116, c++/764
10909 * call.c (build_new_op): Make sure template class operands are
10910 instantiated. Simplify arglist construction.
10911
10912 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10913
10914 * call.c (build_user_type_conversion_1): Use my_friendly_assert
10915 rather than if ... abort.
10916 * cvt.c (convert_to_reference): Likewise.
10917 * semantics.c (setup_vtbl_ptr): Likewise.
10918 * pt.c (lookup_template_class): Comment typo.
10919
10920 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10921
10922 PR c++/5125
10923 * pt.c (push_template_decl_real): Make sure DECL has
10924 DECL_LANG_SPECIFIC.
10925
10926 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10927
10928 PR c++/335
10929 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10930 for non-reference fields.
10931 * typeck.c (require_complete_type): Use resolve_offset_ref).
10932
10933 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
10934
10935 PR c++/196
10936 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10937
10938 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
10939
10940 PR c++/160
10941 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10942 up. Don't stabilize_references when initializing a reference.
10943
10944 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10945
10946 * decl2.c (lang_f_options): Const-ify.
10947
10948 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
10949
10950 * config-lang.in (diff_excludes): Remove.
10951
10952 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
10953
10954 PR c++/90
10955 * typeck.c (build_function_call_real): Use original function
10956 expression for errors.
10957
10958 2001-12-18 Jason Merrill <jason@redhat.com>
10959
10960 PR c++/3242
10961 * class.c (add_method): Do compare 'this' quals when trying to match a
10962 used function. Don't defer to another used function.
10963
10964 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
10965
10966 * pt.c (instantiate_clone): Remove, fold into ...
10967 (instantiate_template): ... here. Simplify by removing mutual
10968 recursion.
10969 * typeck2.c (build_m_component_ref): Don't cv qualify the function
10970 pointed to by a pointer to function.
10971 * class.c (delete_duplicate_fields_1): Typo.
10972
10973 2001-12-18 Jason Merrill <jason@redhat.com>
10974
10975 C++ ABI change: destroy value arguments in caller.
10976 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10977 create an extra binding level for the parameters.
10978 * decl.c (store_parm_decls): Don't do parameter cleanups.
10979
10980 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
10981
10982 * call.c (build_new_method_call): Use '%#V'.
10983 * error.c (cv_to_string): Use V parameter to determine padding.
10984
10985 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
10986
10987 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10988 spellings in messages.
10989
10990 2001-12-17 Zack Weinberg <zack@codesourcery.com>
10991
10992 * cp-tree.h: Delete #defines for cp_error, cp_warning,
10993 cp_pedwarn, and cp_compiler_error.
10994 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10995 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10996 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10997 typeck2.c: Change calls to the above macros to use their
10998 language-independent equivalents: error, warning, pedwarn, and
10999 internal_error respectively.
11000
11001 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
11002
11003 * decl2.c (finish_file): Remove back_end_hook.
11004
11005 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
11006
11007 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11008 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11009 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11010
11011 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
11012
11013 * lang-options.h: Use American spelling in messages.
11014
11015 2001-12-13 Jason Merrill <jason@redhat.com>
11016
11017 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11018
11019 Use cleanups to run base and member destructors.
11020 * init.c (push_base_cleanups): New function, split out from...
11021 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
11022 * decl.c (finish_destructor_body): Move vbase destruction code to
11023 push_base_cleanups.
11024 (begin_function_body, finish_function_body): New fns.
11025 (finish_function): Move [cd]tor handling and call_poplevel to
11026 finish_function_body.
11027 (pushdecl): Skip the new level.
11028 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11029 (setup_vtbl_ptr): Call push_base_cleanups.
11030 * method.c (synthesize_method): Call {begin,end}_function_body.
11031 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11032 * cp-tree.h: Declare new fns.
11033 * parse.y (function_body, .begin_function_body): New nonterminals.
11034 (fndef, pending_inline, function_try_block): Use function_body.
11035 (ctor_initializer_opt, function_try_block): No longer has a value.
11036 (base_init): Remove .set_base_init token.
11037 (.set_base_init, compstmt_or_error): Remove.
11038 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11039
11040 * optimize.c (maybe_clone_body): Fix parameter updating.
11041
11042 2001-12-12 Jason Merrill <jason@redhat.com>
11043
11044 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11045 * semantics.c (genrtl_start_function): Don't pass
11046 parms_have_cleanups or push an extra binding level.
11047 (genrtl_finish_function): Lose cleanup_label cruft.
11048
11049 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11050 (ctor_label): Remove.
11051 * semantics.c (finish_return_stmt): Lose ctor_label support.
11052 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11053 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11054 dtor_label.
11055
11056 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11057 check for [cd]tors.
11058 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11059
11060 * decl.c (finish_function): Check VMS_TARGET, not VMS.
11061
11062 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11063 (end_cleanup_fn): And poplevel.
11064
11065 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11066 if we're in a template.
11067
11068 2001-12-12 Jakub Jelinek <jakub@redhat.com>
11069
11070 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11071 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11072 THIS_NAME_P): Delete.
11073 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11074 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11075 with internal naming scheme.
11076 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11077
11078 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
11079
11080 * decl.c (grokdeclarator): Deprecated implicit typename use.
11081
11082 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
11083
11084 PR g++/51
11085 * parse.y (frob_specs): Indicate it is a language linkage which
11086 contained the extern.
11087 * decl.c (grokdeclarator): Allow extern language linkage with
11088 other specifiers.
11089
11090 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
11091
11092 PR g++/72
11093 * decl.c (add_binding): Don't reject duplicate typedefs involving
11094 template parameters.
11095
11096 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
11097
11098 * parse.y, semantics.c: Similarly.
11099
11100 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
11101
11102 PR g++/87
11103 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11104 (copy_args_p): Rename to ...
11105 (copy_fn_p): ... here.
11106 (grok_special_member_properties): New function.
11107 (grok_op_properties): Lose VIRTUALP parameter.
11108 (copy_assignment_arg_p): Remove.
11109 * call.c (build_over_call): Use copy_fn_p.
11110 * decl.c (grokfndecl): Reformat. Adjust call to
11111 grok_op_properties.
11112 (copy_args_p): Rename to ...
11113 (copy_fn_p): ... here. Reject template functions. Check for pass
11114 by value.
11115 (grok_special_member_properties): Remember special functions.
11116 (grok_ctor_properties): Don't remember them here, just check.
11117 (grok_op_properties): Likewise.
11118 (start_method): Call grok_special_member_properties.
11119 * decl2.c (grokfield): Likewise.
11120 (copy_assignment_arg_p): Remove.
11121 (grok_function_init): Don't remember abstract assignment here.
11122 * pt.c (instantiate_class_template): Call
11123 grok_special_member_properties.
11124 (tsubst_decl): Adjust grok_op_properties call.
11125
11126 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
11127
11128 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11129 RID_TYPES_COMPATIBLE_P.
11130
11131 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11132
11133 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11134 call to build_aggr_init.
11135 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11136
11137 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
11138
11139 * parse.y: Replace uses of the string non-terminal with STRING.
11140 Don't perform string concatentaion here.
11141 (string): Remove non-terminal.
11142 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11143
11144 2001-12-05 Jason Merrill <jason@redhat.com>
11145
11146 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11147 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11148 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11149 * pt.c (push_tinst_level): No longer static.
11150 * cp-tree.h: Declare them.
11151
11152 * init.c (resolve_offset_ref): Don't check access for the base
11153 conversion to access a FIELD_DECL.
11154
11155 * cp-tree.h (TYPE_REFFN_P): New macro.
11156 * decl.c (bad_specifiers): Check it, too.
11157
11158 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11159 on the __*_type_info type if we haven't seen a definition.
11160
11161 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
11162
11163 * decl.c: Include c-common.h.
11164 (shadow_warning): Move to c-common.c.
11165
11166 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11167
11168 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11169
11170 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11171
11172 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11173
11174 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11175
11176 PR g++/164
11177 * init.c (sort_base_init): Allow binfos to be directly specified.
11178 * method.c (do_build_copy_constructor): Explicitly convert to the
11179 base instance.
11180 (do_build_assign_ref): Likewise.
11181
11182 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
11183
11184 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11185 declaration and initialization.
11186
11187 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
11188
11189 * typeck2.c: Remove leading capital from diagnostic messages, as
11190 per GNU coding standards.
11191
11192 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
11193
11194 PR c++/3394
11195 * decl.c (xref_basetypes): Handle attributes between
11196 'class' and name.
11197
11198 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
11199
11200 PR g++/3381
11201 * parse.y (named_complex_class_head_sans_basetype): Add new
11202 reduction.
11203 * Make-lang.in (parse.c): Adjust expected conflict count.
11204
11205 2001-12-03 Jason Merrill <jason@redhat.com>
11206
11207 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11208 immediate binfos for our virtual bases.
11209
11210 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
11211
11212 * call.c (build_java_interface_fn_ref): Similarly.
11213 * except.c (is_admissible_throw_operand): Similarly.
11214 * init.c (build_java_class_ref): Similarly.
11215 * xref.c (open_xref_file): Similarly.
11216
11217 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
11218
11219 * class.c (finish_struct): Remove trailing periods from messages.
11220 * decl.c (check_tag_decl): Similarly.
11221 * lex.c (cxx_set_yydebug): Similarly.
11222 * typeck2.c (friendly_abort): Similarly.
11223
11224 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11225
11226 PR c++/3048
11227 * cp-tree.h (ovl_member): Remove.
11228 * decl2.c (merge_functions): Handle extern "C" functions
11229 specially.
11230 * tree.c (ovl_member): Remove.
11231
11232 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11233
11234 PR c++/4842
11235 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11236 FUNCTION_DECL, as input.
11237 (mark_overriders): Remove.
11238 (warn_hidden): Rework for the new ABI.
11239
11240 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11241
11242 PR c++/3471
11243 * call.c (convert_like_real): Do not build additional temporaries
11244 for rvalues of class type.
11245
11246 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
11247
11248 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11249 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11250 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11251 (DERIVED_FROM_P): Likewise.
11252 (enum base_access): Renumber, add ba_quiet bit mask.
11253 (get_binfo): Remove.
11254 (get_base_distance): Remove.
11255 (binfo_value): Remove.
11256 (ACCESSIBLY_DERIVED_FROM_P): Remove.
11257 * call.c (standard_conversion): Use lookup_base.
11258 * class.c (strictly_overrides): Likewise.
11259 (layout_virtual_bases): Likewise.
11260 (warn_about_ambiguous_direct_bases): Likewise.
11261 (is_base_of_enclosing_class): Likewise.
11262 (add_vcall_offset_vtbl_entries_1): Likewise.
11263 * cvt.c (build_up_reference): Adjust comment.
11264 * init.c (build_member_call): Reformat.
11265 * search.c (get_binfo): Remove.
11266 (get_base_distance_recursive): Remove.
11267 (get_base_distance): Remove.
11268 (lookup_base_r): Tweak.
11269 (lookup_base): Add ba_quiet control. Complete the types here.
11270 (covariant_return_p): Use lookup_base.
11271 * tree.c (binfo_value): Remove.
11272 (maybe_dummy_object): Use lookup_base.
11273 * typeck.c (build_static_cast): Use lookup_base.
11274 (get_delta_difference): Likewise.
11275 * typeck2.c (binfo_or_else): Use lookup_base.
11276 (build_scoped_ref): Add back error_mark_check.
11277 (build_m_component_ref): Use lookup_base.
11278
11279 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
11280
11281 * Make-lang.in (c++.generated-manpages): New dummy target.
11282
11283 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11284
11285 * Make-lang.in (cp-lang.o): Depends on c-common.h.
11286 * cp-lang.c (c-common.h): Include.
11287 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11288 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11289 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11290
11291 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
11292
11293 * decl2.c (c_language): Move to c-common.c.
11294 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11295 functions.
11296 (cxx_init): Update.
11297
11298 2001-11-26 Jason Merrill <jason@redhat.com>
11299
11300 * call.c (joust): Remove COND_EXPR hack.
11301
11302 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
11303
11304 * search.c (lookup_base_r): Declare bk in variable declaration
11305 space.
11306
11307 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
11308
11309 PR g++/3145
11310 * class.c (build_vbase_pointer): Remove.
11311 (build_vbase_path): Remove.
11312 (build_base_path): New function.
11313 * cp-tree.h (base_access, base_kind): New enumerations.
11314 (build_base_path): Declare.
11315 (convert_pointer_to_real): Remove.
11316 (convert_pointer_to): Remove.
11317 (lookup_base): Declare.
11318 (convert_pointer_to_vbase): Remove.
11319 * call.c (build_scoped_method_call): Use lookup_base &
11320 build_base_path instead of convert_pointer_to_real,
11321 get_base_distance & get_binfo.
11322 (build_over_call): Likewise.
11323 * cvt.c (cp_convert_to_pointer): Likewise.
11324 (convert_to_pointer_force): Likewise.
11325 (build_up_reference): Likewise.
11326 (convert_pointer_to_real): Remove.
11327 (convert_pointer_to): Remove.
11328 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11329 instead of convert_pointer_to_vbase & build_vbase_path.
11330 (emit_base_init): Use build_base_path instead of
11331 convert_pointer_to_real.
11332 (expand_virtual_init): Lose unrequired conversions.
11333 (resolve_offset_ref): Use lookup_base and build_base_path
11334 instead of convert_pointer_to.
11335 * rtti.c (build_dynamic_cast_1): Use lookup_base &
11336 build_base_path instead of get_base_distance & build_vbase_path.
11337 * search.c (get_vbase_1): Remove.
11338 (get_vbase): Remove.
11339 (convert_pointer_to_vbase): Remove.
11340 (lookup_base_r): New function.
11341 (lookup_base): New function.
11342 * typeck.c (require_complete_type): Use lookup_base &
11343 build_base_path instead of convert_pointer_to.
11344 (build_component_ref): Likewise.
11345 (build_x_function_call): Likewise.
11346 (get_member_function_from_ptrfunc): Likewise.
11347 (build_component_addr): Likewise.
11348 * typeck2.c (build_scoped_ref): Likewise.
11349
11350 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11351
11352 * cp-tree.h (CP_TYPE_QUALS): Removed.
11353 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11354 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11355 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11356 * dump.c (cp_dump_tree): Use void* dump_info argument to match
11357 lang-hooks prototype.
11358 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11359 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11360 CP_TYPE_QUALS changed to cp_type_quals.
11361 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11362 (CXX_C_OBJS): Remove c-dump.o.
11363
11364 2001-11-21 Mark Mitchell <mark@codesourcery.com>
11365
11366 PR c++/3637
11367 * pt.c (lookup_template_class): Ensure that all specializations
11368 are registered on the list corresponding to the most general
11369 template.
11370
11371 2001-11-20 Mark Mitchell <mark@codesourcery.com>
11372
11373 * call.c (non_reference): Add documentation.
11374 (convert_class_to_reference): Do not strip reference types
11375 from conversion operators.
11376 (maybe_handle_ref_bind): Simplify.
11377 (compare_ics): Correct handling of references.
11378
11379 2001-11-19 John Wilkinson <johnw@research.att.com>
11380
11381 * dump.c (dump_op): New function.
11382 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
11383 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11384 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11385
11386 2001-11-19 Mark Mitchell <mark@codesourcery.com>
11387
11388 PR4629
11389 * semantics.c (finish_sizeof): Make sure that expression created
11390 while processing a template do not have a type.
11391 (finish_alignof): Likewise.
11392 * typeck.c (c_sizeof): Likewise.
11393 (expr_sizeof): Likewise.
11394
11395 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
11396
11397 * lex.c (cxx_finish): Call c_common_finish.
11398 (finish_parse): Remove.
11399
11400 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11401
11402 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11403 when displaying error message about missing array bounds.
11404
11405 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11406
11407 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11408 CONST_CAST_EXPR.
11409 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11410
11411 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
11412
11413 * cp-tree.h (print_class_statistics): Restore.
11414
11415 2001-11-15 Jason Merrill <jason@redhat.com>
11416
11417 * method.c (use_thunk): Don't emit debugging information for thunks.
11418
11419 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11420 * decl.c (make_typename_type): Handle getting a class template.
11421 * search.c (lookup_field_r): A class template is good enough for
11422 want_type.
11423
11424 * call.c (convert_like_real): Only use cp_convert for the bad part.
11425 (standard_conversion): Also allow bad int->enum.
11426 * typeck.c (ptr_reasonably_similar): Also allow functions to
11427 interconvert. Pointers to same-size integers are reasonably
11428 similar.
11429
11430 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11431 give it void type.
11432
11433 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
11434
11435 PR g++/3154
11436 * init.c (sort_base_init): Remove unreachable code.
11437 (expand_member_init): Adjust comment to reflect reality. Simplify
11438 and remove unreachable code.
11439
11440 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
11441
11442 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11443 (cxx_init): Update prototype.
11444 * decl.c (init_decl_processing): Rename. Move null node init
11445 to its creation time.
11446 * lex.c (cxx_init_options): Update.
11447 (cxx_init): Combine with old init_parse; also call
11448 cxx_init_decl_processing.
11449
11450 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
11451
11452 * decl.c (check_initializer): Try to complete the type of an
11453 array element before checking whether it's complete. Don't
11454 complain about arrays with complete element types but an
11455 unknown size.
11456 (cp_finish_decl): Build the hierarchical constructor before
11457 calling maybe_deduce_size_from_array_init.
11458
11459 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
11460
11461 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11462
11463 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
11464
11465 PR g++/4206
11466 * parse.y (already_scoped_stmt): Remove.
11467 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11468
11469 2001-11-12 H.J. Lu <hjl@gnu.org>
11470
11471 * cvt.c (ocp_convert): Don't warn the address of a weak
11472 function is always `true'.
11473
11474 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11475
11476 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11477 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11478 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11479 * cp-tree.h (print_class_statistics): Remove.
11480 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11481 cxx_print_identifier, cxx_set_yydebug): New.
11482 * lex.c (set_yydebug): Rename c_set_yydebug.
11483 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11484 lang_print_xnode): Rename.
11485 * tree.c (print_lang_statistics): Rename.
11486
11487 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11488
11489 * class.c (dump_array): Fix format specifier warning.
11490
11491 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11492
11493 * cp-lang.c (LANG_HOOKS_NAME): Override.
11494 (struct lang_hooks): Constify.
11495 * lex.c (cxx_init_options): Update.
11496 (lang_identify): Remove.
11497 * parse.y (language_string): Remove.
11498
11499 2001-11-08 Andreas Franck <afranck@gmx.de>
11500
11501 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11502 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11503 suggested by autoconf.
11504 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11505 (c++.install-common): Use the transformed target alias names.
11506
11507 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11508
11509 * Make-lang.in: Update.
11510 * cp-lang.c: Include langhooks-def.h.
11511
11512 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11513
11514 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11515
11516 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11517
11518 * lex.c (copy_lang_type): Add static prototype.
11519
11520 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11521
11522 * pt.c (unify): Handle SCOPE_REF.
11523
11524 2001-11-01 Jakub Jelinek <jakub@redhat.com>
11525
11526 * tree.c (cp_copy_res_decl_for_inlining): Adjust
11527 DECL_ABSTRACT_ORIGIN for the return variable.
11528
11529 2001-10-31 Zack Weinberg <zack@codesourcery.com>
11530
11531 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11532
11533 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
11534
11535 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11536 semantics.c, spew.c: Fix spelling errors.
11537
11538 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11539
11540 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11541
11542 2001-10-25 Zack Weinberg <zack@codesourcery.com>
11543
11544 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11545 pop_everything.
11546
11547 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11548
11549 * cp-lang.c (cxx_get_alias_set): New function.
11550 Point LANG_HOOKS_GET_ALIAS_SET to it.
11551
11552 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11553
11554 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11555 * cp-tree.h (make_unbound_class_template): Prototype new function.
11556 * decl.c (make_unbound_class_template): New function.
11557 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11558 * error.c (dump_type): Likewise.
11559 * mangle.c (write_type): Likewise.
11560 * parse.y (template_parm): Likewise.
11561 (template_argument): Use make_unbound_class_template.
11562 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11563 (tsubst): Likewise.
11564 (tsubst_copy): Likewise.
11565 (unify): Likewise.
11566 * tree.c (walk_tree): Likewise.
11567 * typeck.c (comptypes): Likewise.
11568
11569 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11570
11571 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11572 extra calls into fewer ones.
11573
11574 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
11575
11576 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11577 Warn when merging inline with attribute noinline.
11578 (start_decl, start_function): Warn if inline and attribute
11579 noinline appear in the same declaration.
11580
11581 2001-10-16 H.J. Lu <hjl@gnu.org>
11582
11583 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11584 for tree checking disabled.
11585
11586 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
11587
11588 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11589 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11590
11591 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11592
11593 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11594 (unify): Only handle MINUS_EXPR specially if the above flag is set
11595 and the subtracted constant is 1. Clear the flag on recursive calls.
11596 Set it when unifying the maximum value in an INTEGER_TYPE's range.
11597
11598 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11599
11600 * decl.c (bad_specifiers): Don't allow exception specifications
11601 on any typedefs.
11602
11603 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
11604
11605 * cp/lex.c (init_cp_pragma): Similarly.
11606
11607 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11608
11609 * pt.c (lookup_template_class): Build complete template arguments
11610 for BOUND_TEMPLATE_TEMPLATE_PARM.
11611
11612 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11613
11614 * cp-tree.h (TYPE_BINFO): Update comment.
11615 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11616 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11617 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11618 (copy_type): Prototype new function.
11619 * lex.c (copy_lang_decl): Gather tree node statistics.
11620 (copy_lang_type): New function.
11621 (copy_type): Likewise.
11622 (cp_make_lang_type): Create lang_type for
11623 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
11624 and BOUND_TEMPLATE_TEMPLATE_PARM.
11625 * pt.c (tsubst): Use copy_type instead of copy_node.
11626 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11627
11628 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11629
11630 * pt.c (determine_specialization): Ignore functions without
11631 DECL_TEMPLATE_INFO.
11632
11633 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
11634
11635 PR g++/4476
11636 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11637
11638 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
11639
11640 * typeck2.c (store_init_value): Don't re-digest a bracketed
11641 initializer.
11642
11643 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11644 ANON_AGGR_TYPE_P.
11645
11646 2001-10-11 Richard Henderson <rth@redhat.com>
11647
11648 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11649 of an asm statement.
11650 (build_vtbl_ref_1): Split out from build_vtbl_ref.
11651 (build_vfn_ref): Use it to handle vtable descriptors before
11652 calling build_vtable_entry_ref.
11653 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11654
11655 2001-10-10 Richard Henderson <rth@redhat.com>
11656
11657 * parse.y (asm_operand): Allow named operands.
11658 * semantics.c (finish_asm_stmt): Tweek for changed location
11659 of the operand constraint.
11660
11661 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
11662
11663 * call.c (standard_conversion): Add bad conversion between
11664 integers and pointers.
11665 (convert_like_real): Don't use convert_for_initialization for bad
11666 conversions; complain here and use cp_convert.
11667 (build_over_call): Don't handle bad conversions specially.
11668 (perform_implicit_conversion): Allow bad conversions.
11669 (can_convert_arg_bad): New fn.
11670 * cp-tree.h: Declare it.
11671 * typeck.c (convert_for_assignment): Use it.
11672 (ptr_reasonably_similar): Any target type is similar to void.
11673
11674 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
11675
11676 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11677 (cp/cp-lang.o): New rule.
11678 * cp-tree.h: Declare hooks.
11679 * tree.c: Make hooks non-static.
11680 (init_tree): Don't initialize hooks here.
11681 * lex.c: Likewise. Move definition of lang_hooks to...
11682 * cp-lang.c: ... new file.
11683
11684 2001-10-08 Richard Henderson <rth@redhat.com>
11685
11686 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11687 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11688
11689 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11690
11691 * class.c (build_vtable_entry_ref): Const-ify.
11692 * decl.c (predefined_identifier,
11693 initialize_predefined_identifiers): Likewise.
11694 * init.c (build_new_1): Likewise.
11695 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11696 Likewise.
11697
11698 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
11699
11700 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11701 (INSNS_PER_STMT): Likewise.
11702 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11703 (copy_body, initialize_inlined_parameters): Likewise.
11704 (declare_return_variable, inlinable_function_p): Likewise.
11705 (expand_call_inline, expand_calls_inline): Likewise.
11706 (optimize_inline_calls, clone_body): Likewise.
11707 * tree.c (walk_tree): Moved to ../tree-inline.c.
11708 (walk_tree_without_duplicates): Likewise.
11709 (copy_tree_r, remap_save_expr): Likewise.
11710
11711 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
11712
11713 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11714 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11715 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11716 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11717 (flag_inline_trees): Moved declaration to ../tree-inline.h.
11718 (walk_tree): Moved declaration to ../tree-inline.h.
11719 (walk_tree_without_duplicates, copy_tree_r): Likewise.
11720 (remap_save_expr): Likewise.
11721 * decl.c: Include tree-inline.h.
11722 (lang_mark_tree): Don't mark inlined_fns.
11723 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11724 * optimize.c: Include tree-inline.h.
11725 (optimize_inline_calls): Move declaration to ../tree.h, as
11726 non-static.
11727 (remap_decl): Use language-independent constructs and hooks.
11728 (remap_block, copy_body_r, declare_return_variable): Likewise.
11729 (inlinable_function_p): Likewise. Don't test for
11730 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11731 no longer language-specific.
11732 (optimize_inline_calls): Likewise. Make it non-static. Moved
11733 call of dump_function to...
11734 (optimize_function): Here...
11735 (clone_body): New function, extracted from...
11736 (maybe_clone_body): ... here. Build decl_map locally and pass
11737 it on to clone_body.
11738 * pt.c, semantics.c: Include tree-inline.h.
11739 * tree.c: Likewise.
11740 (cp_walk_subtrees): New language-specific hook for tree inlining.
11741 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11742 cp_is_overload_p, cp_auto_var_in_fn_p,
11743 cp_copy_res_decl_for_inlining): Likewise.
11744 (walk_tree): Move language-specific constructs into...
11745 (cp_walk_subtrees): this new function.
11746 (copy_tree_r): Use language-independent constructs and hooks.
11747 (init_tree): Initialize tree inlining hooks.
11748 (remap_save_expr): Adjust prototype so that the declaration
11749 does not require the definition of splay_tree.
11750
11751 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
11752
11753 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11754 to build the declaration instead of the declaration itself.
11755
11756 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
11757
11758 * decl2.c (cxx_decode_option): Add 'else'.
11759
11760 * spew.c (end_input): No longer static.
11761 * cp-tree.h: Declare it.
11762 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11763
11764 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11765
11766 * call.c (build_over_call), typeck.c (build_function_call_real):
11767 Pass type attributes to check_function_format rather than name or
11768 assembler name. Don't require there to be a name or assembler
11769 name to check formats.
11770
11771 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11772
11773 * decl.c (init_decl_processing): Don't call
11774 init_function_format_info. Initialize lang_attribute_table
11775 earlier.
11776 (builtin_function): Call decl_attributes.
11777 (insert_default_attributes): New.
11778
11779 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
11780
11781 * decl.c (grokdeclarator): Copy array typedef handling from C
11782 frontend.
11783
11784 * decl.c (grokdeclarator): Copy too-large array handling from C
11785 frontend.
11786
11787 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
11788
11789 * config-lang.in (target_libs): Added target-gperf, so that we
11790 don't try to build it if C++ is disabled.
11791
11792 2001-09-23 Zack Weinberg <zack@codesourcery.com>
11793
11794 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11795 (cp/errfn.o): Delete rule.
11796 (cp/error.o): Depend on flags.h.
11797 * errfn.c: Delete file.
11798 * cp-tree.h: Declare warn_deprecated. Remove definitions of
11799 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11800 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11801 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11802 internal_error respectively. Make cp_deprecated into a macro.
11803 Don't define cp_printer typedef or declare cp_printers.
11804 * error.c: Include flags.h.
11805 Delete: struct tree_formatting_info, print_function_argument_list,
11806 print_declaration, print_expression, print_function_declaration,
11807 print_function_parameter, print_type_id, print_cv_qualifier_seq,
11808 print_type_specifier_seq, print_simple_type_specifier,
11809 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11810 print_parameter_declaration_clause, print_exception_specification,
11811 print_nested_name_specifier, and definition of cp_printers.
11812 (locate_error): New function.
11813 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11814 rewritten in terms of locate_error and diagnostic.c.
11815 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11816 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
11817 (init_error): Adjust to match.
11818
11819 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11820
11821 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11822
11823 2001-09-21 Richard Henderson <rth@redhat.com>
11824
11825 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11826 (build_vtbl_initializer): Likewise.
11827 (build_vfn_ref): New.
11828 * cp-tree.h: Declare it.
11829 * call.c (build_over_call): Use it.
11830 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11831 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11832
11833 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
11834
11835 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11836
11837 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
11838
11839 Table-driven attributes.
11840 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11841 * decl2.c (cplus_decl_attributes): Only take one attributes
11842 parameter.
11843 * cp-tree.c (cplus_decl_attributes): Update prototype.
11844 * class.c (finish_struct), decl.c (start_decl, start_function),
11845 decl2.c (grokfield), friend.c (do_friend), parse.y
11846 (parse_bitfield): Update calls to cplus_decl_attributes.
11847 * decl.c (grokdeclarator): Take a pointer to a single ordinary
11848 attribute list.
11849 * decl.h (grokdeclarator): Update prototype.
11850 * decl2.c (grokfield): Take a single ordinary attribute list.
11851 * friend.c (do_friend): Likewise.
11852 * decl.c (shadow_tag, groktypename, start_decl,
11853 start_handler_parms, grokdeclarator, grokparms, start_function,
11854 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11855 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11856 (process_template_parm, do_decl_instantiation): Pass single
11857 ordinary attribute lists around.
11858 * decl.c (grokdeclarator): Correct handling of nested attributes.
11859 Revert the patch
11860 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
11861 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11862 not the left.
11863 .
11864 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11865 (cp_attribute_table): Declare.
11866 * decl.c (valid_lang_attribute): Don't define.
11867 (lang_attribute_table): Define.
11868 (init_decl_processing): Initialize lang_attribute_table instead of
11869 valid_lang_attribute.
11870 * tree.c (cp_valid_lang_attribute): Remove.
11871 (handle_java_interface_attribute, handle_com_interface_attribute,
11872 handle_init_priority_attribute): New functions.
11873 (cp_attribute_table): New array.
11874 * decl2.c (import_export_class): Don't use
11875 targetm.valid_type_attribute.
11876
11877 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11878
11879 * Make-lang.in (cp/error.o): Depend on real.h
11880 * error.c: #include "real.h"
11881
11882 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11883
11884 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11885 xmalloc/strcpy/strcat.
11886
11887 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11888
11889 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11890 Const-ification.
11891 * pt.c (tsubst_decl): Likewise.
11892
11893 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11894
11895 * decl2.c (lang_f_options): Const-ification.
11896 * lex.c (cplus_tree_code_name): Likewise.
11897 * spew.c (yyerror): Likewise.
11898
11899 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11900
11901 PR c++/3986
11902 * class.c (force_canonical_binfo_r): Check & move an indirect
11903 primary base first.
11904 (force_canonical_binfo): Check that it's not already
11905 canonical.
11906 (mark_primary_virtual_base): Remove BINFO parameter.
11907 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11908
11909 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11910
11911 Remove TYPE_NONCOPIED_PARTS.
11912 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11913 CLASSTYPE_PURE_VIRTUALS.
11914 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11915 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11916 (layout_class_type): Don't call fixup_inline_methods here ...
11917 (finish_struct_1): ... call it here.
11918
11919 2001-09-04 Mark Mitchell <mark@codesourcery.com>
11920
11921 * decl.c (duplicate_decls): Remove code deadling with
11922 DECL_SAVED_INSNS.
11923 * decl2.c (finish_file): Likewise.
11924 * pt.c (instantiate_decl): Likewise.
11925 * semantics.c (expand_body): Don't defer local functions if
11926 they wouldn't be deferred for some other reason. Don't
11927 generate RTL for functions that will not be emitted.
11928 (genrtl_start_function): Remove code deadling with
11929 DECL_SAVED_INSNS.
11930 (genrtl_finish_function): Likewise.
11931
11932 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
11933
11934 PR c++/4203
11935 * call.c (build_over_call): Do not optimize any empty base
11936 construction.
11937
11938 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11939
11940 * error.c (dump_template_decl): Output template parameters
11941 together with their specifiers.
11942 Output `class' prefix for template template parameter.
11943 (dump_decl): Fix formatting.
11944
11945 2001-08-30 Kurt Garloff <garloff@suse.de>
11946
11947 * optimize.c (inlinable_function_p): Allow only smaller single
11948 functions. Halve inline limit after reaching recursive limit.
11949
11950 2001-08-30 Joern Rennecke <amylaar@redhat.com>
11951 Jason Merrill <jason_merrill@redhat.com>
11952
11953 * class.c (build_vtable_entry_ref): Subtract in char*, not
11954 ptrdiff_t.
11955
11956 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
11957
11958 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11959 (build_cplus_array_type): Use cp_build_qualified_type, not
11960 TYPE_MAIN_VARIANT, to get an unqualified version.
11961
11962 * decl2.c (grok_alignof): Lose.
11963 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11964 * typeck.c (c_alignof): Lose.
11965 * semantics.c (finish_sizeof, finish_alignof): New.
11966 * parse.y: Use them.
11967 * cp-tree.h: Declare them.
11968
11969 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
11970
11971 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11972 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11973 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11974
11975 2001-08-19 Jakub Jelinek <jakub@redhat.com>
11976
11977 * typeck2.c (add_exception_specifier): Only require complete type if
11978 not in processing template declaration.
11979
11980 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11981
11982 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11983 GNU_xref_start_scope and GNU_xref_end_scope.
11984
11985 * tree.c (TYPE_HASH): Moved to ../tree.h.
11986
11987 2001-08-16 Mark Mitchell <mark@codesourcery.com>
11988
11989 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11990 on COMPOUND_EXPRs.
11991
11992 2001-08-14 Richard Henderson <rth@redhat.com>
11993
11994 * class.c, cp-tree.h (build_vfn_ref): Remove.
11995 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11996
11997 2001-08-13 Mark Mitchell <mark@codesourcery.com>
11998
11999 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12000 empty class assignment as having side-effects to avoid
12001 spurious warnings.
12002
12003 2001-08-13 Zack Weinberg <zackw@panix.com>
12004
12005 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12006 * except.c: Include libfuncs.h.
12007
12008 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12009
12010 * decl.c (grokdeclarator): Clarify diagnostic message.
12011
12012 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12013
12014 * decl2.c (do_nonmember_using_decl): Replace using directive
12015 with using declaration in the error message.
12016
12017 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12018
12019 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12020 criterion to avoid rebuilding expression tree instead of
12021 processing_template_decl.
12022
12023 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12024
12025 Support named return value optimization for inlines, too.
12026 * decl.c (finish_function): Nullify returns here.
12027 * semantics.c (genrtl_start_function): Not here.
12028 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12029 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
12030 Also nullify the CLEANUP_STMT for the nrv.
12031 * cp-tree.h: Declare it.
12032 * optimize.c (declare_return_variable): Replace the nrv with the
12033 return variable.
12034 * typeck.c (check_return_expr): Be more flexible on alignment check.
12035 Ignore cv-quals when checking for a matching type.
12036
12037 2001-08-09 Richard Henderson <rth@redhat.com>
12038
12039 * decl2.c (finish_objects): Use target hooks instead of
12040 assemble_constructor and assemble_destructor.
12041
12042 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
12043
12044 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12045
12046 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
12047
12048 PR c++/3820
12049 Stop using TYPE_NONCOPIED_PARTS.
12050 * call.c (build_over_call): Be careful when copy constructing
12051 or assigning to an empty class.
12052 * class.c (check_bases_and_members): It has a
12053 COMPLEX_ASSIGN_REF if it has a vptr.
12054 (layout_class_type): Don't add empty class padding to
12055 TYPE_NONCOPIED_PARTS.
12056 (finish_struct_1): Don't add the VFIELD either.
12057 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12058 initialization.
12059
12060 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12061
12062 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12063
12064 2001-08-06 Richard Henderson <rth@redhat.com>
12065
12066 * decl2.c (finish_objects): Pass a symbol_ref and priority to
12067 assemble_{constructor,destructor}. Remove priority handling.
12068
12069 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12070
12071 Don't allow template-id in using-declaration.
12072 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12073 (do_class_using_decl): Likewise.
12074
12075 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12076
12077 * cp/spew.c (read_token): No need to pop buffers.
12078
12079 2001-08-02 Stan Shebs <shebs@apple.com>
12080
12081 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12082 (fnaddr_from_vtable_entry): Remove decl.
12083 * method.c (use_thunk): Update comment.
12084
12085 2001-08-01 Andrew Cagney <ac131313@redhat.com>
12086
12087 * repo.c (get_base_filename): Change return value to const char
12088 pointer.
12089
12090 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
12091
12092 Kill -fhonor-std.
12093 * NEWS: Document.
12094 * cp-tree.h (flag_honor_std): Remove.
12095 (CPTI_FAKE_STD): Remove.
12096 (std_node): Remove comment about it being NULL.
12097 (fake_std_node): Remove.
12098 * decl.c (in_fake_std): Remove.
12099 (walk_namespaces_r): Remove fake_std_node check.
12100 (push_namespace): Remove in_fake_std code.
12101 (pop_namespace): Likewise.
12102 (lookup_name_real): Remove fake_std_node check.
12103 (init_decl_processing): Always create std_node. Always add
12104 std:: things there.
12105 (builtin_function): Always put non '_' fns in std.
12106 * decl2.c (flag_honor_std): Remove.
12107 (lang_f_options): Remove honor-std.
12108 (unsupported_options): Add honor-std.
12109 (set_decl_namespace): Remove fake_std_node check.
12110 (validate_nonmember_using_decl): Likewise.
12111 (do_using_directive): Likewise.
12112 (handle_class_head): Likewise.
12113 * dump.c (cp_dump_tree): Likewise.
12114 * except.c (init_exception_processing): Adjust.
12115 * init.c (build_member_call): Remove fake_std_node check.
12116 (build_offset_ref): Likewise.
12117 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12118 * rtti.c (init_rtti_processing): Adjust.
12119
12120 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
12121
12122 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12123 operand while calling cp_tree_equal.
12124
12125 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12126
12127 The 3.0 ABI no longer has vbase pointer fields.
12128 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12129 FORMAT_VBASE_NAME): Remove.
12130 * method.c (do_build_copy_constructor): Adjust.
12131 (do_build_assign_ref): Adjust.
12132 * search.c (lookup_field_r): Adjust.
12133 * typeck.c (build_component_ref): Adjust.
12134
12135 The 3.0 ABI always has a vtable pointer at the start of every
12136 polymorphic class.
12137 * rtti.c (build_headof_sub): Remove.
12138 (build_headof): Adjust.
12139 (get_tinfo_decl_dynamic): No need to check flag_rtti
12140 here. Adjust.
12141 (create_real_tinfo_var): Explain why we need a hidden name.
12142
12143 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12144
12145 PR c++/3631
12146 * class.c (update_vtable_entry_for_fn): The fixed adjustment
12147 of a virtual thunk should be from declaring base.
12148
12149 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12150
12151 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12152 the shared virtual base, so preserving inheritance graph order.
12153
12154 2001-07-30 Andreas Jaeger <aj@suse.de>
12155
12156 * decl2.c: Remove unused var global_temp_name_counter.
12157
12158 2001-07-28 Richard Henderson <rth@redhat.com>
12159
12160 * method.c (pending_inlines): Remove.
12161
12162 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12163
12164 * class.c (mark_primary_virtual_base): Don't adjust base
12165 offsets here.
12166 (dfs_unshared_virtual_bases): Adjust them here.
12167 (mark_primary_bases): Explain why we adjust at the end.
12168
12169 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12170
12171 * class.c (finish_struct_1): When copying the primary base's
12172 VFIELD, make sure we find it is at offset zero.
12173
12174 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12175
12176 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12177 tsubst_expr for default template arguments.
12178
12179 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12180
12181 PR c++/3621
12182 * spew.c (yylex): Only copy the token's lineno, if it is
12183 nonzero.
12184
12185 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12186
12187 PR c++/3624
12188 * call.c (resolve_args): Simplify, call
12189 convert_from_reference.
12190 (build_new_op): Resolve and convert from reference ARG1
12191 earlier. Adjust ARG2 & ARG3 resolve and conversion.
12192
12193 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12194
12195 * decl.c (last_function_parm_tags): Remove.
12196 (current_function_parm_tags): Remove.
12197 (init_decl_processing): Adjust.
12198 (start_function): Adjust.
12199 (store_parm_decls): Adjust.
12200
12201 PR c++/3152
12202 * decl.c (grokdeclarator): Detect when a function typedef is
12203 declaring a function, and create last_function_parms correctly.
12204
12205 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
12206
12207 * call.c (joust): Only prefer a non-builtin candidate to a builtin
12208 one if they have the same signature.
12209
12210 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
12211 it rather than toplevel_bindings_p. Give it a mangled name if static.
12212 (convert_to_reference): Adjust.
12213 * decl2.c (get_temp_name): Lose.
12214 * mangle.c (mangle_ref_init_variable): New fn.
12215 (mangle_guard_variable): Strip the ref-init header.
12216 * cp-tree.h: Adjust.
12217 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12218 initializer.
12219 (grok_reference_init): Always use DECL_INITIAL.
12220
12221 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12222
12223 PR c++/3416
12224 * call.c (build_conditional_expr): Recheck args after
12225 conversions.
12226 * cp-tree.h (build_conditional_expr): Move to correct file.
12227 * typeck.c (decay_conversion): Diagnose any unknown types
12228 reaching here.
12229 (build_binary_op): Don't do initial decay or default
12230 conversions on overloaded functions.
12231 (build_static_cast): Don't do a decay conversion here.
12232
12233 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12234
12235 PR c++/3543
12236 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12237 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12238
12239 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12240
12241 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12242 (create_vtbl_ptr): ... here.
12243
12244 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12245
12246 * class.c (build_vbase_offset_vbtl_entries): Look for
12247 non-primary base of which we are a sub vtable.
12248
12249 2001-07-24 Phil Edwards <pme@sources.redhat.com>
12250
12251 * semantics.c (finish_this_expr): Remove unused code.
12252
12253 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
12254
12255 Simplify rtti, now we've only one ABI.
12256 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12257 CPTI_TINFO_VAR_ID.
12258 (tinfo_decl_id, tinfo_var_id): Remove.
12259 (get_typeid_1): Remove.
12260 * rtti.c
12261 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12262 (typeid_ok_p): New function.
12263 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12264 (get_tinfo_decl): Remove old abi documentation.
12265 (tinfo_from_decl): Remove.
12266 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12267 (get_typeid_1): Remove.
12268 (get_base_offset): Remove.
12269 (synthesize_tinfo_var): Absorb get_base_offset.
12270 (create_real_tinfo_var): Don't use tinfo_decl_id.
12271
12272 2001-07-23 Graham Stott <grahams@redhat.com>
12273
12274 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12275 variable has_two_argument_delete_p.
12276
12277 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
12278
12279 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12280 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12281 (CPTI_INDEX_IDENTIFIER): Remove.
12282 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12283 (delta2_identifier): Remove.
12284 (index_identifier): Remove.
12285 (pfn_or_delta2_identifier): Remove.
12286 (flag_vtable_thunks): Remove.
12287 (VTABLE_DELTA2_NAME): Remove.
12288 (VTABLE_INDEX_NAME): Remove.
12289 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12290 (vfunc_ptr_type_node): Adjust.
12291 (VTABLE_NAME_PREFIX): Adjust.
12292 (build_vfn_ref): Lose first parameter.
12293 (fixup_all_virtual_upcast_offsets): Remove.
12294 * decl.c (initialize_predefined_identifiers): Remove
12295 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12296 (init_decl_processing): Remove no-vtable-thunk code.
12297 * decl2.c (flag_vtable_thunks): Remove.
12298 (mark_vtable_entries): Remove no-vtable-thunk code.
12299 * error.c (dump_decl): Remove no-vtable-thunk code.
12300 (dump_expr): Adjust ptr to member function code.
12301 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12302 code.
12303 * rtti.c (build_headof): Remove no-vtable-thunk code.
12304 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12305 * search.c (get_base_distance): Remove expand_upcast_fixups case.
12306 (virtual_context) Remove.
12307 (expand_upcast_fixups): Remove.
12308 (fixup_virtual_upcast_offsets): Remove.
12309 (fixup_all_virtual_upcast_offsets): Remove.
12310 * typeck.c (get_member_function_from_ptrfunc): Remove
12311 no-vtable-thunk code.
12312 * call.c (build_over_call): Adjust call to build_vfn_ref.
12313 * class.c (build_vfn_ref): Lose first parameter. Remove
12314 no-vtable-thunk code.
12315 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12316 (build_vtable_entry): Remove no-vtable-thunk code.
12317
12318 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
12319
12320 Remove old-abi remnants. Remove comments about old abi
12321 behavior. Remove references to 'new-abi' in comments.
12322 * cp-tree.h: Adjust comments.
12323 (vbase_offsets_in_vtable_p): Delete.
12324 (vcall_offsets_in_vtable_p): Delete.
12325 (vptrs_present_everywhere_p): Delete.
12326 (all_overridden_vfuns_in_vtables_p): Delete.
12327 (merge_primary_and_secondary_vtables_p): Delete.
12328 (TYPE_CONTAINS_VPTR_P): Adjust.
12329 (VTT_NAME_PREFIX): Remove.
12330 (CTOR_VTBL_NAME_PREFIX): Remove.
12331 (init_vbase_pointers): Remove.
12332 * class.c: Adjust coments.
12333 (build_vbase_pointer_fields): Delete.
12334 (build_vbase_pointer): Remove old-abi code.
12335 (build_secondary_vtable): Likewise.
12336 (modify_all_vtables): Likewise.
12337 (create_vtable_ptr): Likewise.
12338 (layout_class_type): Likewise.
12339 (finish_struct_1): Likewise.
12340 (finish_vtbls): Likewise.
12341 (dfs_finish_vtbls): Delete.
12342 (build_vbase_offset_vtbl_entries): Remove old-abi code.
12343 * cvt.c: Adjust comments.
12344 * decl.c: Adjust comments.
12345 * decl2.c: Adjust comments.
12346 * init.c: Adjust comments.
12347 (construct_virtual_bases): Remove old-abi code.
12348 * lang-specs.h: Remove -fno-new-abi.
12349 * mangle.c: Adjust comments.
12350 * rtti.c: Adjust comments.
12351 (get_base_offset): Remove old-abi-code.
12352 * search.c: Adjust comments.
12353 (dfs_init_vbase_pointers): Remove.
12354 (dfs_vtable_path_unmark): Remove.
12355 (init_vbase_pointers): Remove.
12356 * semantics.c: Adjust comments.
12357 (emit_associated_thunks): Remove old-abi code.
12358 * typeck.c: Adjust comments.
12359
12360 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
12361
12362 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12363 params.h.
12364
12365 2001-07-19 Mark Mitchell <mark@codesourcery.com>
12366
12367 * class.c (finish_struct_anon): Forbid nested classes.
12368
12369 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12370
12371 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12372 * optimize.c: Include debug.h.
12373 (maybe_clone_body): Use debug hook.
12374 * semantics.c: Include debug.h.
12375 (expand_body): Use debug hook.
12376
12377 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12378
12379 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12380
12381 2001-07-18 Mark Mitchell <mark@codesourcery.com>
12382
12383 * class.c (type_requires_array_cookie): New function.
12384 (check_methods): Don't try to figure out whether the type needs a
12385 cookie here.
12386 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12387 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12388 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12389 * pt.c (instantiate_class_template): Don't set
12390 TYPE_VEC_DELETE_TAKES_SIZE.
12391 * NEWS: Document ABI changes from GCC 3.0.
12392
12393 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
12394 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12395
12396 * NEWS (Changes in GCC 3.0): Fix typo.
12397
12398 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
12399
12400 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12401 which attributes are to be attached, and a flags argument. Update
12402 call to decl_attributes.
12403 (grokfield): Update call to decl_attributes.
12404 * class.c (finish_struct): Update call to cplus_decl_attributes.
12405 * cp-tree.h (cplus_decl_attributes): Update prototype.
12406 * decl.c (start_decl, grokdeclarator, start_function): Update
12407 calls to decl_attributes and cplus_decl_attributes.
12408 * friend.c (do_friend): Update call to cplus_decl_attributes.
12409 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12410
12411 2001-07-12 Mark Mitchell <mark@codesourcery.com>
12412
12413 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12414 for `register' variables with an asm-specification.
12415
12416 2001-07-11 Mark Mitchell <mark@codesourcery.com>
12417
12418 * semantics.c (finish_asm_stmt): Mark the output operands
12419 to an asm addressable, if necessary.
12420
12421 2001-07-11 Ben Elliston <bje@redhat.com>
12422
12423 * Revert this change -- there is a subtle bug.
12424
12425 PR c++/80
12426 * decl.c (finish_enum): New "attributes" argument; pass it to
12427 cplus_decl_attributes. Use a narrower type if the enum is packed.
12428 * cp-tree.h (finish_enum): Adjust prototype.
12429 * parse.y (enum_head): New non-terminal.
12430 (structsp): Use it. Enums now may be preceded or followed by
12431 optional attributes -- pass their chained tree to finish_enum().
12432 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12433
12434 2001-07-10 Mark Mitchell <mark@codesourcery.com>
12435
12436 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12437 variables.
12438
12439 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
12440
12441 * semantics.c (cp_expand_stmt): Fix for null
12442 current_function_return_value.
12443
12444 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
12445
12446 * call.c (build_op_delete_call): Initialize fn.
12447 (convert_like_real): Delete conditional.
12448 (joust): Initialize *w and *l.
12449 * class.c: Add prototype for binfo_ctor_vtable.
12450 (get_primary_binfo): Initialize result.
12451 * init.c (build_java_class_ref): Initialize name.
12452
12453 2001-07-09 Erik Rozendaal <dlr@acm.org>
12454
12455 * typeck.c (unary_complex_lvalue): Do not duplicate the
12456 argument to modify, pre-, or post-increment when used as an
12457 lvalue and when the argument has side-effects.
12458
12459 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12460
12461 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12462 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
12463 cplus_decl_attributes even if attrs is NULL.
12464 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12465
12466 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12467
12468 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12469 calls to decl_attributes.
12470
12471 2001-07-06 Ira Ruben <ira@apple.com>
12472
12473 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12474 be DECL_TEMPLATE_RESULT.
12475
12476 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12477
12478 * cp-tree.h (copy_template_template_parm): Rename to ...
12479 (bind_template_template_parm): ... here.
12480 * tree.c (copy_template_template_parm): Rename to ...
12481 (bind_template_template_parm): ... here. Remove the case when
12482 NEWARGS is NULL_TREE.
12483 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12484 BOUND_TEMPLATE_TEMPLATE_PARM.
12485 * pt.c (lookup_template_class): Adjust.
12486
12487 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
12488
12489 * cvt.c (convert_lvalue): New fn.
12490 * cp-tree.h: Declare it.
12491 * method.c (do_build_assign_ref): Use it.
12492 (do_build_copy_constructor): Convert parm to base types
12493 before calling base constructors.
12494
12495 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12496 DECL_USER_ALIGN. Check flag_elide_constructors instead of
12497 optimize.
12498 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12499
12500 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
12501
12502 * optimize.c (optimize_inline_calls): New function, broken out
12503 of ...
12504 (optimize_function): ... here. Call it. Don't inline if it is
12505 a thunk.
12506 (dump_function): Print name of dump flag causing this dump.
12507 * semantics.c (expand_body): Move thunk inline check to
12508 optimize_function.
12509
12510 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
12511
12512 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12513 (comptypes): Use target.comp_type_attributes.
12514
12515 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
12516
12517 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12518
12519 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12520
12521 * error.c (lang_print_error_function): Add a `diagnostic_context *'
12522 parameter. Tweak.
12523
12524 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12525
12526 * decl2.c (import_export_class): Update.
12527
12528 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12529
12530 * error.c (init_error): Adjust settings.
12531
12532 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12533
12534 * error.c (init_error): Adjust settings.
12535
12536 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
12537
12538 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12539 return pointers to data members by reference rather than by value.
12540
12541 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
12542
12543 Implement the Named Return Value optimization.
12544 * cp-tree.h (struct cp_language_function): Add x_return_value.
12545 (current_function_return_value): Now a macro.
12546 * decl.c: Don't define it.
12547 (define_label, finish_case_label): Don't clear it.
12548 (init_decl_processing): Don't register it with GC.
12549 * semantics.c (genrtl_finish_function): Don't check it for
12550 no_return_label. Copy the RTL from the return value to
12551 current_function_return_value and walk, calling...
12552 (nullify_returns_r): ...this new fn.
12553 * typeck.c (check_return_expr): Set current_function_return_value.
12554
12555 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
12556
12557 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12558 sharing a ctor vtable with. Merge code for cases 1 and 2.
12559 (binfo_ctor_vtable): New fn.
12560 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12561
12562 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
12563
12564 * class.c (dfs_find_final_overrider): Fix logic.
12565
12566 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12567 virtual thunk instead of non-virtual.
12568 (get_matching_virtual): Uncomment.
12569
12570 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12571 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
12572 PARM, not ARG.
12573
12574 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
12575
12576 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12577 we've not emerged from the hierarchy of RTTI_BINFO on reaching
12578 a non-virtual base.
12579
12580 2001-06-13 Mark Mitchell <mark@codesourcery.com>
12581
12582 * NEWS: Update release number.
12583
12584 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12585
12586 PR c++/3130, c++/3131, c++/3132
12587 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12588 * class.c (force_canonical_binfo_r): Move
12589 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12590 virtual bases unless they're primary and what they're primary
12591 too has been moved.
12592 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12593 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12594 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12595 derived binfo.
12596 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12597 (layout_nonempty_base_or_field): Add most derived type
12598 parameter. Adjust.
12599 (layout_empty_base): Likewise.
12600 (build_base_field): Likewise.
12601 (build_base_fields): Likewise.
12602 (propagate_binfo_offsets): Add most derived type
12603 parameter. Skip non canonical virtual bases too.
12604 (dfs_set_offset_for_unshared_vbases): Don't skip primary
12605 bases. Do skip canonical bases.
12606 (layout_virtual_bases): Adjust.
12607 (layout_class_type): Adjust.
12608 (dfs_get_primary_binfo): Build list of virtual primary base
12609 candidates.
12610 (get_primary_binfo): Check that the shared virtual primary
12611 base candidate was found first.
12612 (accumulate_vtbl_inits): Don't do anything for non-vptr
12613 containing binfos. For case 1 primary virtual bases, keep
12614 checking that we've not emerged from the hierarchy of RTTI_BINFO.
12615
12616 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12617
12618 PR c++/3089
12619 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12620 hierarchy looking for primary bases for a ctor
12621 vtable. Recursively call oneself, if we meet our primary via
12622 this route and haven't met it yet via inheritance graph order.
12623
12624 2001-06-11 Mark Mitchell <mark@codesourcery.com>
12625
12626 * lang-options.h: Emit documentation for -fno-honor-std, not
12627 -fhonor-std.
12628
12629 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
12630
12631 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12632 Don't clobber delta.
12633 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12634
12635 2001-06-10 Mark Mitchell <mark@codesourcery.com>
12636 Gabriel Dos Reis <gdr@codesourcery.com>
12637
12638 * Make-lang.in (cp/call.o): Depend on diagnostic.h
12639 (cp/typeck.o): Depend on diagnostic.h
12640 (cp/typeck2.o): Depend on diagnostic.h
12641 (cp/repo.o): Depend on dignostic.h
12642 * typeck.c: #include diagnostic.h
12643 (convert_for_initialization): Remove extern declaration for
12644 warningcount and errorcount.
12645
12646 * call.c: #include diagnostic.h
12647 (convert_like_real): Remove extern declaration for warnincount and
12648 errorcount.
12649
12650 * repo.c: #include diagnostic.h
12651 * typeck2.c: #include diagnostic.h
12652
12653 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12654
12655 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12656 in previous change.
12657
12658 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12659
12660 PR c++/2929
12661 * friend.c (do_friend): Use push_decl_namespace for classes at
12662 namespace scope.
12663
12664 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12665 Jason Merrill <jason_merrill@redhat.com>
12666
12667 PR c++/3061
12668 * class.c (build_secondary_vtable): Use assert, rather than an error
12669 message.
12670 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12671 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12672 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12673 Don't set BINFO_VTABLE for a primary virtual base.
12674
12675 2001-06-07 Mark Mitchell <mark@codesourcery.com>
12676
12677 * decl.c (duplicate_decls): Update source position information
12678 when a template function is defined.
12679
12680 2001-06-07 Phil Edwards <pme@sources.redhat.com>
12681
12682 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
12683
12684 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
12685
12686 PR c++/2914
12687 * decl.c (pushtag): Don't push into a complete type's scope.
12688
12689 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
12690
12691 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12692 (struct lang_decl_flags): Lose generate_with_vtable_p.
12693 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12694 * class.c (copy_virtuals): Adjust.
12695 * decl2.c (mark_vtable_entries): Adjust.
12696 * method.c (make_thunk, build_vtable_entry): Adjust.
12697 * class.c (update_vtable_entry_for_fn): Only look as far as the
12698 first defining class.
12699 (build_vtbl_initializer): Put nothing in the slot for a function only
12700 defined in a lost primary virtual base.
12701 (add_vcall_offset_vtbl_entries_1): Use the same code for
12702 the lost primary case and the normal case.
12703 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12704 (get_vfield_offset, get_derived_offset): Lose.
12705 (dfs_find_final_overrider): Use look_for_overrides_here.
12706 (get_matching_virtual): New fn.
12707 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12708 not BV_VCALL_INDEX.
12709 * search.c (look_for_overrides_here): Split out from...
12710 (look_for_overrides_r): Here.
12711
12712 * class.c (find_final_overrider): Return error_mark_node on error.
12713
12714 * decl2.c (key_method): #if 0 accidental change.
12715
12716 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
12717
12718 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12719 (build_over_call): Likewise.
12720 * decl.c (grokparms): Likewise.
12721 * pt.c (tsubst_decl): Likewise.
12722 * typeck.c (convert_arguments): Likewise.
12723
12724 2001-06-05 Mark Mitchell <mark@codesourcery.com>
12725
12726 * semantics.c (begin_class_definition): Robustify.
12727
12728 * pt.c (instantiate_decl): Tell the repository code about the
12729 clones, not the cloned functions.
12730 * repo.c (repo_template_used): Explicitly instantiate the cloned
12731 function, not the clones.
12732
12733 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12734
12735 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12736 ICS_BAD_FLAG on created conversion.
12737 (compare_ics): Break out rank.
12738
12739 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12740
12741 * decl.c (xref_tag): Remove extraneous %s on dependent name
12742 lookup warning.
12743
12744 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12745
12746 * class.c (layout_vtable_decl): Fix off by one error on
12747 build_index_type.
12748 (build_vtt): Likewise.
12749 (build_ctor_vtbl_group): Likewise.
12750
12751 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12752
12753 * class.c (maybe_indent_hierarchy): New function.
12754 (dump_class_hierarchy_r): Add flags. Dump extra binfo
12755 information, if enabled. Use maybe_indent_hierarchy. Adjust
12756 output format.
12757 (dump_class_hierarchy): Adjust prototype. Adjust output format.
12758 (dump_array, dump_vtable, dump_vtt): New functions.
12759 (finish_struct_1): Adjust hierarchy dumping.
12760 (initialize_vtable): Call dump_vtable.
12761 (build_vtt): Call dump_vtt.
12762 (build_ctor_vtbl_group): Call dump_vtable.
12763 * decl2.c (flag_dump_class_layout): Remove.
12764 (cxx_decode_option): Remove dump translation unit
12765 and dump class hierarchy check. Call dump_switch_p.
12766 (finish_file): Adjust dumping.
12767 (dump.c): Only dump base classes if not TDF_SLIM.
12768 Only dump namespace members if not TDF_SLIM.
12769 * optimize.c (dump_function): New function.
12770 (optimize_function): Call dump_function.
12771 * semantics.c (expand_body): Use dump_enabled_p.
12772
12773 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
12774
12775 PR g++/2936
12776 Part missed from first commit
12777 * decl2.c (finish_anon_union): Copy context.
12778
12779 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
12780
12781 PR g++/2936
12782 * optimize.c (remap_decl): Remap anonymous aggregate members too.
12783
12784 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
12785
12786 PR g++/2823
12787 * semantics.c (expand_body): Don't optimize thunks.
12788
12789 2001-05-25 Sam TH <sam@uchicago.edu>
12790
12791 * cp-tree.h lex.h: Fix header include guards.
12792
12793 2001-05-25 Mark Mitchell <mark@codesourcery.com>
12794
12795 * decl.c (init_decl_processing): Tweak.
12796
12797 2001-05-24 Mark Mitchell <mark@codesourcery.com>
12798
12799 * decl.c (duplicate_decls): Tidy.
12800 (init_decl_processing): Always set flag_no_builtin.
12801
12802 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
12803
12804 PR c++/2184
12805 * decl2.c (do_local_using_decl): Push the decls, even in a
12806 template.
12807
12808 2001-05-22 Mark Mitchell <mark@codesourcery.com>
12809
12810 * optimize.c (initialize_inlined_parameters): Don't set
12811 TREE_READONLY for a VAR_DECL taking the place of an inlined
12812 PARM_DECL.
12813
12814 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
12815
12816 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12817 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12818 attribute.
12819
12820 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
12821
12822 * parse.y: Refer to compound literals as such, not as
12823 constructor-expressions.
12824
12825 2001-05-21 Mark Mitchell <mark@codesourcery.com>
12826
12827 * call.c (build_op_delete_call): Ignore exception-specifications
12828 when looking for matching delete operators.
12829 * init.c (build_new_1): Compute whether or not the allocation
12830 function used is a placement allocation function or not, and
12831 communicate this information to build_op_delete_call.
12832
12833 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
12834
12835 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
12836 (build_vtbl_ref): Adjust.
12837 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12838 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12839 Re-add vtable-gc.
12840 (unsupported_options): Correspondingly.
12841
12842 * decl2.c (maybe_make_one_only): Check flag_weak, not
12843 supports_one_only().
12844
12845 * cp-tree.def (START_CATCH_STMT): Lose.
12846 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
12847 * tree.c (cp_statement_code_p): Don't case it.
12848 * semantics.c (cp_expand_stmt): Likewise.
12849 * cp-tree.h (START_CATCH_TYPE): Lose.
12850 (HANDLER_TYPE): New.
12851 * except.c (expand_start_catch_block): Don't start any blocks.
12852 Return the type.
12853 (expand_end_catch_block): Don't end any blocks.
12854 * parse.y (handler): Don't pass anything from finish_handler_parms
12855 to finish_handler.
12856 * pt.c (tsubst_expr): Likewise.
12857 * semantics.c (begin_handler): Call note_level_for_catch here.
12858 (finish_handler_parms): Don't return anything.
12859 (genrtl_catch_block, begin_catch_block): Lose.
12860 (genrtl_handler): Call expand_start_catch here.
12861
12862 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
12863
12864 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12865 (get_vtable_decl, build_vtt): Not here.
12866
12867 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
12868
12869 PR c++/2781
12870 * optimize.c (update_cloned_parm): Copy addressability and other
12871 flags.
12872
12873 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12874
12875 * pt.c (determine_specialization): Ignore artificial functions.
12876
12877 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
12878
12879 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12880 (C_RID_CODE): Remove.
12881 * lex.c (cxx_init_options): Call set_identifier_size. Update.
12882 (init_parse): Don't do it here.
12883
12884 2001-05-18 Diego Novillo <dnovillo@redhat.com>
12885
12886 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12887 function declaration to avoid stripping the symbol's attributes.
12888
12889 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
12890
12891 * decl.c (pushdecl): Adjust error string.
12892 (xref_tag): Adjust friend class injection warning. Remove the
12893 inherited name from the class shadowed scope.
12894
12895 2001-05-17 Mark Mitchell <mark@codesourcery.com>
12896
12897 * except.c (cp_protect_cleanup_actions): New function.
12898 (init_exception_processing): Don't set protect_cleanup_actions
12899 here. Do set lang_protect_cleanup_actions.
12900
12901 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12902
12903 * spew.c (read_token): Call yyerror on all unexpected tokens.
12904
12905 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12906
12907 * init.c (member_init_ok_or_else): Take a tree rather than
12908 string for name.
12909 (expand_member_init): Adjust.
12910
12911 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
12912
12913 * decl.c (duplicate_decls): Suppress warning about duplicate
12914 decls if the first decl is a friend.
12915
12916 2001-05-12 Zack Weinberg <zackw@stanford.edu>
12917
12918 * except.c (choose_personality_routine): Export. Add
12919 explanatory comment. Take an enum languages, not a boolean.
12920 (initialize_handler_parm): Adjust to match.
12921 * cp-tree.h: Prototype choose_personality_routine.
12922 * lex.c (handle_pragma_java_exceptions): New function.
12923 (init_cp_pragma): Register #pragma GCC java_exceptions.
12924
12925 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12926
12927 * method.c (build_mangled_C99_name): Remove unused prototype.
12928
12929 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
12930
12931 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12932 * typeck.c (get_member_function_from_ptrfunc,
12933 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12934 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12935
12936 Reverted Geoff Keating's 2001-05-03's patch.
12937
12938 2001-05-11 Ira Ruben <ira@apple.com>
12939
12940 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12941
12942 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
12943
12944 * cp-tree.h (finish_label_expr, lookup_label): Delete.
12945 * parse.y: Update for '&&'; don't issue warning here.
12946 * semantics.c (finish_label_expr): Delete.
12947
12948 2001-05-07 Mark Mitchell <mark@codesourcery.com>
12949
12950 * splay-tree.h (splay_tree_max): New function.
12951 (splay_tree_min): Likewise.
12952
12953 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
12954
12955 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12956 (pfn_vflag_identifier): Define.
12957 Update comment about layout of pointer functions.
12958 (build_ptrmemfunc1): Update prototype.
12959 (expand_ptrmemfunc_cst): Update prototype.
12960 * decl.c (initialize_predefined_identifiers): Initialize
12961 pfn_vflag_identifier.
12962 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12963 an extra field to the type.
12964 * expr.c (cplus_expand_constant): Pass 'flag' between
12965 expand_ptrmemfunc_cst and build_ptrmemfunc1.
12966 * typeck.c (get_member_function_from_ptrfunc): When
12967 FUNCTION_BOUNDARY < 16, look at additional field to determine
12968 if a pointer-to-member is a real pointer or a vtable offset.
12969 (build_ptrmemfunc1): Add new parameter to contain extra field.
12970 (build_ptrmemfunc): Pass the extra field around.
12971 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12972 (pfn_from_ptrmemfunc): Ignore the extra field.
12973
12974 2001-05-03 Mark Mitchell <mark@codesourcery.com>
12975
12976 * cp-tree.h (flag_inline_trees): Update documentation.
12977 * decl.c (init_decl_processing): Adjust handling of
12978 flag_inline_functions and flag_inline_trees to support -O3.
12979 (grokfndecl): Set DECL_INLINE on all functions if that's what
12980 the user requested.
12981 (save_function_data): Clear DECL_INLINE in
12982 current_function_cannot_inline is non-NULL.
12983 * decl2.c (flag_inline_trees): Update documentation.
12984
12985 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
12986
12987 * dump.c (cp_dump_tree, USING_STMT case): New case.
12988 * tree.c (cp_statement_code_p): Add USING_STMT.
12989 * decl2.c (do_using_directive): Add the using directive statement.
12990
12991 * tree.c (walk_tree): Reformat an if block.
12992
12993 2001-05-02 Mark Mitchell <mark@codesourcery.com>
12994
12995 * decl.c (compute_array_index_type): Don't try to do anything with
12996 the indices when processing a template.
12997
12998 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12999
13000 * call.c: NULL_PTR -> NULL.
13001 * class.c: Likewise.
13002 * cvt.c: Likewise.
13003 * decl.c: Likewise.
13004 * decl2.c: Likewise.
13005 * except.c: Likewise.
13006 * init.c: Likewise.
13007 * rtti.c: Likewise.
13008 * search.c: Likewise.
13009 * tree.c: Likewise.
13010 * typeck.c: Likewise.
13011 * typeck2.c: Likewise.
13012
13013 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13014
13015 * decl2.c (do_using_directive): Revert previous patch.
13016
13017 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13018
13019 * cp-tree.def (USING_STMT): New statement node.
13020 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13021 * decl2.c (do_using_directive): Add USING_STMT to statement
13022 tree. Don't emit errors when processing template decl.
13023 * pt.c (tsubst_expr, USING_STMT case): New case.
13024 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13025
13026 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13027
13028 * call.c (build_new_op): Convert args from reference here.
13029 (build_conditional_expr): Don't convert here.
13030
13031 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13032
13033 * spew.c (last_token_id): New static variable.
13034 (read_token): Set it here.
13035 (yyerror): Use it here.
13036
13037 2001-04-30 Richard Henderson <rth@redhat.com>
13038
13039 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13040 * decl.c: Likewise.
13041
13042 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13043
13044 * gxxint.texi: Remove.
13045 * Make-lang.in: Remove all traces of gxxint.texi.
13046
13047 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
13048
13049 * decl2.c (start_static_initialization_or_destruction): Correct
13050 logic to handle the -fno-use-cxa-atexit case.
13051
13052 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13053
13054 * optimize.c (update_cloned_parm): New function.
13055 (maybe_clone_body): Use it. Update the `this' parameter too.
13056
13057 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
13058
13059 * decl2.c (unsupported_options): Add new-abi.
13060 * lang-options.h: Remove no longer supported options.
13061
13062 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13063
13064 * except.c (can_convert_eh): Don't check template parms,
13065 typename types etc.
13066
13067 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13068
13069 * optimize.c (maybe_clone_body): Copy parameter names and locations.
13070
13071 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13072
13073 * cp-tree.h (adjust_clone_args): Prototype new function.
13074 * class.c (adjust_clone_args): New function.
13075 * decl.c (start_function): Call it for in charge ctors.
13076
13077 2001-04-26 Mark Mitchell <mark@codesourcery.com>
13078
13079 * method.c (use_thunk): Make sure that thunks really are emitted
13080 when requested.
13081
13082 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
13083
13084 * mangle.c (write_chars): New macro.
13085 (hwint_to_ascii): New function
13086 (write_number): Use it.
13087 (write_integer_cst): Deal with really big numbers.
13088
13089 2001-04-25 Mark Mitchell <mark@codesourcery.com>
13090
13091 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13092 the clone.
13093
13094 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
13095
13096 * decl.c (grokdeclarator): Set context of namespace scope
13097 TYPE_DECLS.
13098
13099 2001-04-24 Zack Weinberg <zackw@stanford.edu>
13100
13101 * cp/optimize.c: Include hashtab.h.
13102 (struct inline_data): Add tree_pruner.
13103 (expand_call_inline, expand_calls_inline): Use it when calling
13104 walk_tree.
13105 (optimize_function): Initialize and free tree_pruner.
13106
13107 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13108
13109 Lazy __FUNCTION__ generation.
13110 * cp-tree.def (FUNCTION_NAME): Remove.
13111 * cp-tree.h (function_name_declared_p): Remove.
13112 (cp_fname_init): Prototype.
13113 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13114 don't call declare_function_name. Call start_fname_decls.
13115 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13116 clobber the line number.
13117 (cp_fname_init): New function.
13118 (start_function): Call start_fname_decls.
13119 (finish_function): Call finish_fname_decls.
13120 * lex.c (reswords): Add slots for __FUNCTION__ et al.
13121 (rid_to_yy): Add mappings for __FUNCTION__ et al.
13122 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13123 * parse.y (VAR_FUNC_NAME): New token.
13124 (primary): Add VAR_FUNC_NAME.
13125 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13126 generation.
13127 (tsubst, FUNCTION_NAME case): Remove.
13128 (tsubst_copy, FUNCTION_NAME case): Remove.
13129 (tsubst_expr, DECL_STMT case): Be careful with a
13130 DECL_PRETTY_FUNCTION_P.
13131 (instantiate_decl): Remove function_name_declared_p.
13132 * semantics.c (begin_compound_statement): Don't call
13133 declare_function_name here.
13134 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13135 (finish_translation_unit): Call finish_fname_decls.
13136 (expand_body): Remove function_name_declared_p.
13137 * typeck2.c (digest_init): Allow any ERROR_MARK.
13138
13139 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13140
13141 * pt.c (tsubst_decl): Use VOID_TYPE_P.
13142 * semantics.c: Fix some typos.
13143
13144 2001-04-23 Phil Edwards <pme@sources.redhat.com>
13145
13146 * cp/decl2.c (flag_honor_std): Always initialize to 1.
13147
13148 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13149
13150 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13151
13152 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
13153
13154 * except.c (build_throw): Wrap the initialization of the exception
13155 object in a MUST_NOT_THROW_EXPR.
13156 (do_free_exception): #if 0.
13157
13158 2001-04-20 Mark Mitchell <mark@codesourcery.com>
13159
13160 * cp-tree.h (finish_enum): Change prototype.
13161 * decl.c (finish_enum): Reorganize.
13162 * parse.y (structsp): Adjust calls to finish_enum.
13163
13164 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13165
13166 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13167 't' case.
13168
13169 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13170
13171 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13172 (layout_empty_base): Return at end flag.
13173 (build_base_field): Likewise.
13174 (build_base_fields): Likewise.
13175 (layout_virtual_bases): Don't add 1 to eoc value.
13176 (end_of_class): Use full size for empty bases.
13177 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13178 empty bases. Don't add 1 to eoc value. Only add trailing padding
13179 if we're an empty class with no empty bases.
13180 (dump_class_hierarchy): Dump size and alignment.
13181
13182 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13183
13184 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13185 ICS_BAD_FLAG.
13186
13187 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13188
13189 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13190 is found, look first if name does not match the structure name.
13191
13192 2001-04-19 Mark Mitchell <mark@codesourcery.com>
13193
13194 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13195 set.
13196 (SET_DECL_LANGUAGE): New macro.
13197 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13198 (pushdecl): Likewise.
13199 (build_library_fn_1): Likewise.
13200 (build_cp_library_fn): Likewise.
13201 (grokfndecl): Likewise.
13202 (grokvardecl): Mark `extern "C"' variables as having C linkage.
13203 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13204 * lex.c (retrofit_lang_decl): Likewise.
13205 * mangle.c (mangle_decl_string): Don't mangle the names of
13206 variables declared with C language linkage.
13207 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13208
13209 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
13210
13211 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13212 flag_access_control from uninitialized storage.
13213
13214 2001-04-15 Mark Mitchell <mark@codesourcery.com>
13215
13216 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13217 * mangle.c (write_pointer_to_member_type): Fix mangling of
13218 pointers to cv-qualified member function types.
13219
13220 * init.c (build_delete): Create a SAVE_EXPR for the address if
13221 we're going to use it more than once.
13222
13223 2001-04-13 Mark Mitchell <mark@codesourcery.com>
13224
13225 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13226 (expand_ptremfunc_cst): Change prototype.
13227 (delta2_from_ptrmemfunc): Remove.
13228 * expr.c (cplus_expand_constant): Adjust call to
13229 expand_ptrmemfunc_cst.
13230 * typeck.c (build_ptrmemfunc1): Simplify.
13231 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13232 results in a constant.
13233 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13234 (delta2_from_ptrmemfunc): Remove.
13235 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13236
13237 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
13238
13239 * cp-tree.h (decl_namespace_list): New macro.
13240 (struct saved_scope): Add decl_ns_list.
13241 * decl.c (mark_saved_scope): Mark it.
13242 * decl2.c: Lose static decl_namespace_list.
13243 (init_decl2): Don't save it.
13244
13245 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13246
13247 * cp-tree.h (warn_return_type, yylex): Delete redundant
13248 declarations.
13249
13250 * decl.c (current_class_depth, global_namespace): Likewise.
13251
13252 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13253
13254 * repo.c (flag_use_repository): Likewise.
13255
13256 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13257
13258 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13259 set_block, pushdecl, getdecls, gettags, init_decl_processing,
13260 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13261 lvalue_or_else, print_lang_statistics, comp_target_types,
13262 unsigned_type, signed_type, signed_or_unsigned_type,
13263 build_function_call, mark_addressable, incomplete_type_error):
13264 Delete redundant declarations.
13265
13266 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
13267
13268 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13269 (TYPE_ANONYMOUS_P): New macro.
13270 (TAGGED_TYPE_P): New macro.
13271 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13272 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13273 * tree.c (no_linkage_helper): Likewise.
13274 * semantics.c (begin_class_definition): Likewise.
13275 * pt.c (convert_template_argument): Likewise.
13276 * lex.c (check_for_missing_semicolon): Likewise.
13277
13278 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13279
13280 * class.c (dfs_unshared_virtual_bases): New function.
13281 (mark_primary_bases): Call it.
13282 (check_bases): Ignore virtual bases when determining
13283 nearly-emptiness.
13284
13285 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13286
13287 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13288
13289 2001-04-11 Mark Mitchell <mark@codesourcery.com>
13290
13291 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13292 cloned function to the clone.
13293
13294 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13295
13296 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13297
13298 * semantics.c: Include expr.h.
13299
13300 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
13301
13302 * method.c (implicitly_declare_fn): Commonize code for copy ctor
13303 and assignment op. Set TREE_USED for parameter.
13304
13305 2001-04-10 Mark Mitchell <mark@codesourcery.com>
13306
13307 * class.c (find_final_overrider_data): Add `candidates'.
13308 (dfs_find_final_overrider): Don't issue error messages
13309 prematurely.
13310 (find_final_overrider): Issue error messages here.
13311 (build_base_field): Don't warn about amgibuous direct bases here.
13312 (warn_about_ambiguous_direct_bases): New function.
13313 (layout_class_type): Use it.
13314
13315 2001-04-10 Richard Henderson <rth@redhat.com>
13316
13317 * typeck.c (build_array_ref): Push the array reference inside
13318 COMPOUND_EXPR and COND_EXPR.
13319
13320 2001-04-05 Mark Mitchell <mark@codesourcery.com>
13321
13322 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13323 * decl.c (duplicate_decls): Adjust accordingly.
13324 (maybe_commonize_var): Likewise.
13325 (grokfndecl): Likewise.
13326 (start_function): Likewise.
13327 (start_method): Likewise.
13328 * decl2.c (key_method): Likewise.
13329 (import_export_decl): Likewise.
13330 * method.c (implicitly_declare_fn): Likewise.
13331 * optimize.c (maybe_clone_body): Likewise.
13332
13333 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
13334
13335 * lang-specs.h: Add __DEPRECATED.
13336
13337 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
13338
13339 * search.c (get_dynamic_cast_base_type): When building a new
13340 constant, set its type to ssizetype.
13341
13342 2001-04-04 Jakub Jelinek <jakub@redhat.com>
13343
13344 * optimize.c (expand_call_inline): Only add newly inlined statements
13345 into inlined_stmts.
13346
13347 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13348
13349 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13350 (OPERATOR_FORMAT): Likewise.
13351 (OPERATOR_TYPENAME_FORMAT): Likewise.
13352 * operators.def: Remove old name-mangling information.
13353 * decl.c (grok_op_properties): Adjust accordingly.
13354 * lex.c (init_operators): Likewise.
13355 * rtti.c (get_tinfo_decl): Issue error messages about types that
13356 have variable size.
13357
13358 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13359
13360 * decl2.c (import_export_decl): Don't call import_export_class
13361 when processing an inline member function.
13362 * semantics.c (expand_body): Call import_export_decl before
13363 emitting inline functions.
13364
13365 2001-03-28 Richard Henderson <rth@redhat.com>
13366
13367 IA-64 ABI Exception Handling:
13368 * cp-tree.def (EH_SPEC_BLOCK): New.
13369 (MUST_NOT_THROW_EXPR): New.
13370 * cp-tree.h: Update changed function declarations.
13371 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13372 (CPTI_CALL_UNEXPECTED): New.
13373 (struct cp_language_function): Rename x_eh_spec_try_block
13374 to x_eh_spec_block.
13375 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13376 * decl.c (current_binding_level): If no current function
13377 bindings, revert to scope_chain.
13378 (initialize_predefined_identifiers): Remove __cp_push_exception.
13379 (store_parm_decls): Use begin_eh_spec_block.
13380 (finish_function): Use finish_eh_spec_block.
13381 (mark_lang_function): Update for name changes.
13382 * decl2.c (finish_file): No mark_all_runtime_matches.
13383 * dump.c (cp_dump_tree): Handle new tree codes.
13384 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13385 * except.c (catch_language_init, catch_language): Remove.
13386 (init_exception_processing): Don't set language code.
13387 Initialize call_unexpected_node, protect_cleanup_actions,
13388 eh_personality_libfunc, lang_eh_runtime_type.
13389 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13390 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13391 (prepare_eh_type): Split out type canonicalizations ...
13392 (build_eh_type_type): ... from here.
13393 (build_eh_type_type_ref): Remove.
13394 (mark_all_runtime_matches): Remove.
13395 (build_exc_ptr): New.
13396 (do_begin_catch, do_end_catch): New.
13397 (do_pop_exception): Remove.
13398 (build_terminate_handler): Remove.
13399 (choose_personality_routine): Split out language choice from ...
13400 (initialize_handler_parm): ... here.
13401 Use MUST_NOT_THROW_EXPR.
13402 (expand_start_catch_block): Use do_begin_catch. Simplify Java
13403 exception object handling.
13404 (expand_start_eh_spec, expand_end_eh_spec): Remove.
13405 (expand_exception_blocks, alloc_eh_object): Remove.
13406 (begin_eh_spec_block, finish_eh_spec_block): New.
13407 (do_allocate_exception, do_free_exception): New.
13408 (expand_throw): Merge into ...
13409 (build_throw): ... here. Update for abi.
13410 * expr.c (cplus_expand_expr): No expand_internal_throw.
13411 Handle MUST_NOT_THROW_EXPR.
13412 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13413 * semantics.c (*) Update for except.h name changes.
13414 (genrtl_try_block): No protect_with_terminate.
13415 (genrtl_eh_spec_block): New.
13416 (genrtl_handler): Don't emit the goto here.
13417 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13418 (genrtl_finish_function): Don't expand_exception_blocks.
13419 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13420
13421 2001-03-28 Richard Henderson <rth@redhat.com>
13422
13423 * decl.c (struct named_label_list): Rename eh_region to
13424 in_try_scope, add in_catch_scope.
13425 (struct binding_level): Rename eh_region to is_try_scope,
13426 add is_catch_scope.
13427 (note_level_for_try): Rename from note_level_for_eh.
13428 (note_level_for_catch): New.
13429 (poplevel): Copy both is_try_scope and is_catch_scope to
13430 the named_label_list struct.
13431 (check_previous_goto_1): Don't check for catch block via
13432 DECL_ARTIFICIAL; use in_try_scope instead.
13433 (check_goto): Likewise.
13434 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13435 * except.c (expand_start_catch_block): Call note_level_for_catch.
13436 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13437
13438 2001-03-27 Richard Henderson <rth@redhat.com>
13439
13440 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13441 exceptions_via_longjmp.
13442
13443 2001-03-27 Phil Edwards <pme@sources.redhat.com>
13444
13445 * pt.c (check_default_tmpl_args): Make error messages clearer.
13446
13447 2001-03-26 Phil Edwards <pme@sources.redhat.com>
13448
13449 * error.c: Also undefine 'A' macro used for cp_printers definition.
13450
13451 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13452
13453 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13454
13455 2001-03-26 Mike Yang <yang@research.att.com>
13456 Mark Mitchell <mark@codesourcery.com>
13457
13458 * dump.c (dump_access): New function.
13459 (cp_dump_tree): Use it. Dump basetype information for class
13460 types.
13461
13462 2001-03-26 Mark Mitchell <mark@codesourcery.com>
13463
13464 * Makefile.in (optimize.o): Depend on params.h.
13465 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13466 (init_decl_processing): Set flag_no_inline when doing
13467 inlining-on-trees.
13468 * optimize.c: Include params.h.
13469 (struct inline_data): Improve documentation of FNS. Add
13470 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13471 (INSNS_PER_STMT): New macro.
13472 (remap_block): Use CLONING_P.
13473 (inlinable_function_p): Don't inline big functions.
13474 (expand_call_inline): Keep track of how much inlining we've done.
13475 (optimize_function): Set FIRST_INLINED_FN.
13476 (maybe_clone_body): Set CLONING_P.
13477 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13478 tree nodes.
13479 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13480 rest_of_compilation. Clear DECL_RTL for local variables
13481 afterwards.
13482 (clear_decl_rtl): New function.
13483
13484 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
13485
13486 Implement DR 209
13487 * cp-tree.h (skip_type_access_control,
13488 reset_type_access_control): Prototype.
13489 * decl.c (grokdeclarator): Access of friends is not checked.
13490 * parse.y (component_decl_list): Reset type access control.
13491 * semantics.c (decl_type_access_control): Clear
13492 current_type_lookups.
13493 (save_type_access_control): Don't save if not deferring.
13494 (skip_type_access_control, reset_type_access_control): New
13495 functions.
13496 (begin_class_definition): Do type access control for basetypes.
13497 Start deferred access control.
13498 (finish_class_definition): Resume immediate access control if
13499 this is a local class.
13500
13501 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13502
13503 * class.c (add_method): Use memcpy/memmove, not bcopy.
13504
13505 * decl.c (duplicate_decls): Likewise.
13506
13507 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13508
13509 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13510 not `_'.
13511
13512 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13513
13514 * decl.c (local_names): Define.
13515 (push_local_name): New.
13516 (grok_reference_init): Return init if initializing static reference
13517 variable with non-constant instead of emitting it.
13518 Move expand_static_init call to cp_finish_decl.
13519 (layout_var_decl): Call push_local_name.
13520 (maybe_commonize_var): Allow inlining functions even if they have
13521 static local variables, use comdat_linkage for them if flag_weak.
13522 (check_initializer): Call obscure_complex_init if
13523 grok_reference_init returned nonzero.
13524 (save_function_data): Clear x_local_names.
13525 (pop_cp_function_context): Free x_local_names.
13526 (mark_inlined_fns): Remove.
13527 (mark_lang_function): Mark x_local_names.
13528 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13529 Mark inlined_fns as tree, remove call to mark_inlined_fns.
13530 * class.c (alter_access): Ensure DECL_ACCESS is never set if
13531 DECL_DISCRIMINATOR_P.
13532 * cp-tree.h (cp_language_function): Add x_local_names.
13533 (lang_decl_flags): Add discriminator into u2.
13534 (lang_decl_inlined_fns): Remove.
13535 (lang_decl): inlined_fns is now a TREE_VEC.
13536 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13537 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13538 TREE_VEC, not a custom structure.
13539 (optimize_function): Likewise.
13540 * mangle.c (discriminator_for_local_entity): Discriminate among
13541 VAR_DECL local entities.
13542 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13543 is not valid.
13544
13545 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
13546
13547 Add support for Java interface method calls.
13548 * cp-tree.h (struct lang_type): Add java_interface flag.
13549 (TYPE_JAVA_INTERFACE): New macro.
13550 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13551 by setting TYPE_JAVA_INTERFACE.
13552 * call.c (java_iface_lookup_fn): New static.
13553 (build_over_call): If calling a method declared in a
13554 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13555 expression which resolves the function address.
13556 (build_java_interface_fn_ref): New function.
13557
13558 2001-03-22 Richard Henderson <rth@redhat.com>
13559
13560 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13561 * except.c: Don't include it.
13562
13563 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13564 based on an idea from Joe Buck <jbuck@synopsys.com>
13565
13566 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13567 New nonterminals.
13568 (data_def, component_decl): Add reductions to bad_decl.
13569
13570 2001-03-22 Jakub Jelinek <jakub@redhat.com>
13571
13572 * method.c (do_build_assign_ref): Don't use build_modify_expr for
13573 anonymous aggregates, since they don't have assignment operator
13574 method.
13575 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13576 assignment operators for anonymous structure fields.
13577
13578 2001-03-21 Jason Merrill <jason@redhat.com>
13579
13580 * pt.c (instantiate_decl): Abort if we see a member constant
13581 instantiation that doesn't already have its initializer.
13582 Downgrade explicit instantiation without definition to pedwarn.
13583
13584 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13585 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13586 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13587
13588 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13589 (pending_vtables): Remove.
13590 * decl2.c (pending_vtables): Remove.
13591 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13592 CLASSTYPE_VTABLE_NEEDS_WRITING.
13593 (import_export_class): Likewise.
13594 (init_decl2): Don't mark pending_vtables.
13595 * lex.c (handle_pragma_vtable): Just sorry.
13596 * pt.c (instantiate_class_template): Don't mess with
13597 CLASSTYPE_VTABLE_NEEDS_WRITING.
13598 (mark_class_instantiated): Likewise.
13599 * ptree.c (print_lang_type): Don't print it.
13600 * semantics.c (begin_class_definition): Don't set it.
13601
13602 * pt.c (template_tail): Replace with last_pending_template.
13603 (maybe_templates, maybe_template_tail): Remove.
13604 (add_pending_template): Adjust.
13605 (instantiate_pending_templates): Adjust.
13606
13607 * cp-tree.h (struct saved_scope): Remove lang_stack field.
13608 (current_lang_stack): Remove.
13609 * decl.c (maybe_push_to_top_level): Don't initialize it.
13610 (duplicate_decls): Use current_lang_depth.
13611 (xref_basetypes): Likewise.
13612 * class.c (current_lang_depth): New fn.
13613 (push_lang_context): Use more varray functionality.
13614 (pop_lang_context): Likewise.
13615
13616 * error.c (GLOBAL_THING): Always use '__'.
13617
13618 2001-03-21 Mark Mitchell <mark@codesourcery.com>
13619
13620 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13621
13622 * mangle.c (mangle_decl_string): Mangle the names of overloaded
13623 operators, even when they have `extern "C"' linkage.
13624
13625 2001-03-19 Mark Mitchell <mark@codesourcery.com>
13626
13627 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13628 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13629 where it's not necessary.
13630 (add_method): Remove optimization involving comparison of
13631 DECL_ASSEMBLER_NAME.
13632 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13633 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13634 where it's not necessary.
13635 (check_methods): Likewise.
13636 (build_clone): Likewise.
13637 (built_vtt): Likewise.
13638 * cp-tree.h (DECL_NEEDED_P): Likewise.
13639 * decl.c (pushtag): Likewise.
13640 (duplicate_decls): Likewise.
13641 (pushdecl): Likewise.
13642 (builtin_function): Likewise.
13643 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13644 (build_cp_library_fn): Likewise.
13645 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13646 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13647 where it's not necessary.
13648 (make_rtl_for_nonlocal_decl): Likewise.
13649 (cp_finish_decl): Likewise.
13650 (grokfndecl): Likewise.
13651 (grokvardecl): Likewise.
13652 (grokdeclarator): Likewise.
13653 (start_function): Likewise.
13654 (cp_missing_return_ok_p): Likewise.
13655 * decl2.c (grokclassfn): Likewise.
13656 (check_classfn): Likewise.
13657 (finish_static_data_member_decl): Likewise.
13658 (grokfield): Likewise.
13659 * error.c (GLOBAL_IORD_P): Remove.
13660 (dump_global_iord): Improve output.
13661 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13662 * except.c (nothrow_libfn_p): Summarily reject any function not in
13663 namespace-scope.
13664 * init.c (build_java_class_ref): Don't explicitly set
13665 DECL_ASSEMBLER_NAME after calling mangle_decl.
13666 * mangle.c (mangle_decl_string): Handle extern "C" functions.
13667 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13668 * method.c (set_mangled_name_for_decl): Don't explicitly set
13669 DECL_ASSEMBLER_NAME after calling mangle_decl.
13670 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13671 IDENTIFIER_GLOBAL_VALUE for the thunk.
13672 * pt.c (set_mangled_name_for_template_decl): Remove.
13673 (check_explicit_specialization): Don't use it.
13674 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13675 (tsubst_friend_function): Likewise.
13676 (tsubst_decl): Likewise.
13677 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13678 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13679 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13680 where it's not necessary.
13681 (tinfo_base_init): Likewise.
13682 (create_real_tinfo_var): Likewise.
13683 * search.c (looup_field_1): Likewise.
13684 * semantics.c (finish_named_return_value): Likewise.
13685 * tree.c (init_tree): Set lang_set_decl_assembler_name.
13686
13687 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
13688
13689 Correct semantics restrictions checking in throw-expression.
13690 * except.c (is_admissible_throw_operand): New function.
13691 (build_throw): Use it.
13692
13693 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13694
13695 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13696 and its ilk.
13697
13698 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13699
13700 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13701 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13702 * decl.c (duplicate_decls): Likewise.
13703 (builtin_function): Likewise.
13704 (build_library_fn): Likewise.
13705 (build_cp_library_fn): Likewise.
13706 (check_initializer): Likewise.
13707 (cp_finish_decl): Likewise.
13708 * decl2.c (grokfield): Likewise.
13709 (grok_function_init): Remove #if 0'd code.
13710 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13711 * friend.c (do_friend): Likewise.
13712 * init.c (get_temp_regvar): Likewise.
13713 * method.c (make_thunk): Likewise.
13714 * pt.c (tsubst_friend_function): Likewise.
13715 (tsubst_decl): Likewise.
13716 (regenerate_decl_from_template): Likewise.
13717 * semantics.c (genrtl_named_return_value): Likewise.
13718 (expand_body): Likewise.
13719 (genrtl_finish_function): Likewise.
13720 * tree.c (cp_tree_equal): Likewise.
13721
13722 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
13723
13724 * call.c (convert_like_real): Add extra semantics to INNER
13725 parameter. Don't convert to temporary if a user conversion
13726 gives us an lvalue that we're about to bind to a reference.
13727 Set INNER to indicate pending reference binding on recursive
13728 calls.
13729
13730 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13731
13732 * cp/lex.c: Delete duplicate pending_lang_change.
13733
13734 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13735
13736 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13737 Similarly.
13738 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13739 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13740
13741 2001-03-09 Zack Weinberg <zackw@stanford.edu>
13742
13743 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13744
13745 2001-03-08 Stan Shebs <shebs@apple.com>
13746
13747 * cp-tree.h (set_identifier_local_value): Remove unused decl.
13748
13749 2001-03-06 Zack Weinberg <zackw@stanford.edu>
13750
13751 * spew.c: Remove references to CPP_OSTRING.
13752
13753 2001-03-06 Andrew Haley <aph@redhat.com>
13754
13755 * typeck.c (convert_arguments): Check that we have an fndecl.
13756
13757 2001-03-05 Andrew Haley <aph@redhat.com>
13758
13759 * typeck.c (convert_arguments): Don't do ellipsis conversion for
13760 __built_in_constant_p.
13761
13762 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13763
13764 * typeck.c (build_static_cast): Allow enum to enum conversions
13765 as per DR 128.
13766
13767 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13768
13769 * class.c (check_field_decls): Pointers to member do not a
13770 non-pod struct make, as per DR 148.
13771
13772 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13773
13774 * call.c (joust): cp_pedwarn when using gnu extension concerning
13775 worst conversion sequences.
13776
13777 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13778
13779 * decl.c: Replace all uses of 'boolean' with 'bool'.
13780
13781 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13782
13783 * lang-specs.h: Add zero initializer for cpp_spec field to
13784 all array elements that need one. Don't put an #ifdef inside
13785 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13786 use it.
13787
13788 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13789
13790 Implement using decls inside template functions.
13791 * decl2.c (validate_nonmember_using_decl): Don't special case
13792 fake_std_node in the global namespace. Don't reject early when
13793 processing a template.
13794 (do_local_using_decl): Add to statement tree. Don't do further
13795 processing when building a template.
13796 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13797
13798 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13799
13800 * decl2.c (do_nonmember_using_decl): Don't complain if we find
13801 same function. Do complain about ambiguating extern "C"
13802 declarations.
13803
13804 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
13805
13806 Remove floating point and complex type template constant parms.
13807 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13808 COMPLEX_TYPE extensions.
13809 (invalid_nontype_parm_type_p): Likewise.
13810
13811 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
13812
13813 * except.c (call_eh_info): Revert "match_function"'s type.
13814
13815 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
13816
13817 Fix ctor vtable vcall offsets.
13818 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13819 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13820 (get_matching_base): Remove.
13821 (get_original_base): New function.
13822 (build_vtbl_initializer): Initialize vid.rtti_binfo.
13823 Use a virtual thunk for a ctor vtable with an index
13824 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13825 primary base within a constructor vtable. Only set
13826 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13827 when primary base has been lost.
13828 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13829
13830 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
13831
13832 * call.c (joust): Ensure more_specialized()'s argument length
13833 parameter has correct value for constructors.
13834
13835 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
13836
13837 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13838
13839 * decl.c (mark_inlined_fns): Prototype.
13840
13841 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13842
13843 * spew.c (yylex): Correct handling of friends.
13844
13845 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13846
13847 * mangle.c (write_encoding): Pass write_function_type the
13848 FUNCTION_DECL for the function being encoded.
13849 (write_function_type): Pass it along to write_bare_function_type.
13850 (write_bare_function_type): Pass it along to write_method_parms.
13851 (write_method_parms): Don't mangle the compiler-generated
13852 parameters to a constructor or destructor.
13853
13854 2001-02-22 Andreas Jaeger <aj@suse.de>
13855
13856 * optimize.c: Include toplev.h for
13857 note_deferral_of_defined_inline_function prototype.
13858
13859 2001-02-22 Jakub Jelinek <jakub@redhat.com>
13860
13861 * cp-tree.h (struct lang_decl_inlined_fns): New.
13862 (struct lang_decls): Add inlined_fns.
13863 (DECL_INLINED_FNS): New macro.
13864 * optimize.c (struct inline_data): Add inlined_fns.
13865 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13866 (inlinable_function_p): Likewise, fix typo in comment,
13867 function is not inlinable if it already inlined function currently
13868 being optimized.
13869 (expand_call_inline): Add fn to inlined_fns if necessary.
13870 (optimize_function): Initialize inlined_fns.
13871 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13872 * decl.c (mark_inlined_fns): New function.
13873 (lang_mark_tree): Call it.
13874
13875 2001-02-21 Jason Merrill <jason@redhat.com>
13876
13877 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13878 (DECL_UNINLINABLE): Move to middle-end.
13879
13880 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13881 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13882 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13883 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13884 parms and outer BLOCK. note_deferral_of_defined_inline_function.
13885
13886 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13887 second parm of op=.
13888
13889 2001-02-19 Mark Mitchell <mark@codesourcery.com>
13890
13891 * decl2.c (set_decl_namespace): Allow explicit instantiations in
13892 any namespace.
13893
13894 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13895
13896 * optimize.c (expand_call_inline): Don't walk subtrees of type
13897 nodes.
13898
13899 2001-02-18 Mark Mitchell <mark@codesourcery.com>
13900
13901 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13902 for a destructor.
13903
13904 2001-02-18 Jason Merrill <jason@redhat.com>
13905
13906 Do put the VTT parameter in DECL_ARGUMENTS.
13907 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13908 (current_vtt_parm): New macro.
13909 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13910 (DECL_HAS_VTT_PARM_P): New macro.
13911 (DECL_VTT_PARM): Remove.
13912 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13913 * decl.c (duplicate_decls): Only copy the operator code if
13914 appropriate.
13915 (start_function): Set current_vtt_parm.
13916 (lang_mark_tree): Don't mark vtt_parm.
13917 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13918 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
13919 * class.c (build_clone): Maybe remove the VTT parm.
13920 * optimize.c (maybe_clone_body): Set up the VTT parm.
13921 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13922 * call.c (build_over_call): Just allow the VTT arg.
13923 * method.c (make_thunk): Don't set DECL_VTT_PARM.
13924 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13925 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13926 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13927 * error.c (dump_function_decl): Likewise.
13928 * call.c (build_user_type_conversion_1, convert_like_real): Abort
13929 if we try to call a constructor with in-charge or VTT parms.
13930 * method.c (skip_artificial_parms_for): New fn.
13931 * call.c (add_function_candidate, build_over_call): Call it.
13932 * call.c (build_new_method_call): Use current_vtt_parm.
13933 * init.c (expand_virtual_init): Likewise.
13934 * class.c (same_signature_p): No longer static.
13935 * cp-tree.h: Declare it.
13936 * search.c (look_for_overrides_r): Use it.
13937
13938 2001-02-17 Mark Mitchell <mark@codesourcery.com>
13939
13940 * cp-tree.h (new_abi_rtti_p): Remove.
13941 (name_mangling_version): Likewise.
13942 (flag_do_squangling): Likewise.
13943 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13944 * decl.c (grokfndecl): Likewise.
13945 * decl2.c (name_mangling_version): Remove.
13946 (flag_do_squangling): Likewise.
13947 (lang_f_options): Remove `squangle'.
13948 (unsupported_options): Add `squangle'.
13949 (cxx_decode_option): Issue a warning about uses of
13950 -fname-mangling-version.
13951 (finish_file): Remove old ABI support.
13952 * pt.c (check_explicit_specialization): Likewise.
13953 (tsubst_decl): Likewise.
13954 * rtti.c (init_rtti_processing): Likewise.
13955 (build_headof): Likewise.
13956 (get_tinfo_decl_dynamic): Likewise.
13957 (tinfo_from_decl): Likewise.
13958 (build_dynamic_cast_1): Likewise.
13959 (synthesize_tinfo_var): Likewise.
13960 * init.c (build_new): Allow enumeration types for the array-bounds
13961 in a direct-new-declarator.
13962
13963 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13964
13965 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13966 TREE_PROTECTED from the template being specialized.
13967
13968 2001-02-17 Jason Merrill <jason@redhat.com>
13969
13970 * decl2.c (build_artificial_parm): Set TREE_READONLY.
13971
13972 * decl.c (bad_specifiers): Allow throw specs on things with
13973 pointer-to-function or -member-function type.
13974 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13975 a pmf.
13976
13977 2001-02-17 Mark Mitchell <mark@codesourcery.com>
13978
13979 * call.c (check_dtor_name): Handle template names correctly.
13980
13981 2001-02-16 Jason Merrill <jason@redhat.com>
13982
13983 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13984 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13985 * optimize.c (maybe_clone_body): Don't substitute it.
13986 * call.c (build_new_method_call): Check in_chrg instead.
13987 * init.c (expand_virtual_init): Likewise.
13988
13989 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
13990
13991 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13992 class-type introduces at least a type-name.
13993
13994 2001-02-16 Jakub Jelinek <jakub@redhat.com>
13995
13996 * call.c (convert_like_real): Create a temporary for non-lvalue.
13997
13998 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
13999
14000 * cp-tree.h: Fix typos in comments.
14001
14002 2001-02-16 Jason Merrill <jason@redhat.com>
14003
14004 * optimize.c (remap_block): If we're compiling a clone, pass the
14005 new block to insert_block.
14006
14007 2001-02-16 Mark Mitchell <mark@codesourcery.com>
14008
14009 * semantics.c (finish_asm_stmt): Robustify.
14010
14011 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14012
14013 * pt.c (push_template_decl_real): Don't remangle the name of a
14014 class template.
14015
14016 2001-02-15 Jim Meyering <meyering@lucent.com>
14017
14018 * Make-lang.in (c++.install-common): Depend on installdirs.
14019 (c++.install-info): Likewise.
14020 (c++.install-man): Likewise.
14021
14022 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14023
14024 * typeck2.c (build_m_component_ref): Robustify.
14025
14026 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
14027
14028 * friend.c (do_friend): Don't take the nested [template] class
14029 into account when deciding whether to warn about the friend
14030 function not referring to a template function.
14031
14032 2001-02-14 Jakub Jelinek <jakub@redhat.com>
14033
14034 * typeck.c (build_unary_op): Clarify error message.
14035
14036 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
14037
14038 * parse.y (component_constructor_declarator): allow optional
14039 parentheses around constructor class name.
14040
14041 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14042
14043 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14044 section.
14045 * init.c (emit_base_init): Remove incorrect comment about
14046 virtual bases.
14047 * method.c (make_thunk): Fix comment alignment.
14048
14049 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14050
14051 Kill remnants of this is variable.
14052 * cp-tree.h (flag_this_is_variable): Remove.
14053 * decl2.c (flag_this_is_variable): Remove.
14054 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14055 (build_vbase_path): The path is non-static, even in a cdtor.
14056 (resolves_to_fixed_type_p): Add additional return value.
14057 * search.c (init_vbase_pointers): Adjust.
14058 * tree.c (lvalue_p_1): Adjust.
14059 * typeck.c (mark_addressable): Adjust.
14060
14061 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14062
14063 * pt.c (unify): Don't check cv quals of array types.
14064
14065 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14066
14067 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14068 check whether we already have the type.
14069
14070 2001-02-13 Mark Mitchell <mark@codesourcery.com>
14071
14072 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14073 * call.c (build_op_delete_call): Simplify to remove duplicate
14074 code.
14075 * class.c (clone_function_decl): Don't build the deleting variant
14076 of a non-virtual destructor.
14077 * decl.c (finish_destructor_body): Don't call delete if this is a
14078 non-virtual destructor.
14079 * init.c (build_delete): Explicitly call `operator delete' when
14080 deleting an object with a non-virtual destructor.
14081
14082 2001-02-13 Jason Merrill <jason@redhat.com>
14083
14084 * lang-specs.h: Add more __EXCEPTIONS.
14085
14086 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14087
14088 * typeck2.c (process_init_constructor): Check
14089 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14090
14091 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14092
14093 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14094 Remove spurious information in comment. Allow further
14095 adjustments of REFERENCE_TYPE args.
14096
14097 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14098
14099 * errfn.c (cp_deprecated): Tweak diagnostic text.
14100 * parse.y (new_initializer): Deprecate initializer lists
14101 extension.
14102
14103 2001-02-12 Mark Mitchell <mark@codesourcery.com>
14104
14105 Remove old ABI support.
14106
14107 2001-02-11 Mark Mitchell <mark@codesourcery.com>
14108
14109 * decl2.c (flag_vtable_thunks): Always set it to 1.
14110 (flag_new_abi): Likewise.
14111 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14112
14113 * Makefile.in (g++spec.o): Fix typo.
14114
14115 2001-02-09 Jason Merrill <jason@redhat.com>
14116
14117 * lang-specs.h: Restore definition of __EXCEPTIONS.
14118
14119 2001-02-08 Jason Merrill <jason@redhat.com>
14120
14121 * search.c (shared_member_p): New function.
14122 (lookup_field_r): Use it.
14123 * cp-tree.h (SHARED_MEMBER_P): Remove.
14124
14125 * method.c (process_overload_item): Handle template-dependent array
14126 bounds.
14127 * pt.c (type_unification_real): If we end up with undeduced nontype
14128 parms, try again.
14129
14130 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14131 types.
14132
14133 * typeck2.c (friendly_abort): Don't say anything if we have
14134 earlier errors or sorries.
14135
14136 * decl.c (check_tag_decl): Notice attempts to redefine bool and
14137 wchar_t. Ignore if in_system_header.
14138
14139 * decl.c (maybe_push_cleanup_level): New fn...
14140 (start_decl_1): ...split out from here.
14141 * cvt.c (build_up_reference): Use it.
14142 * cp-tree.h: Declare it.
14143
14144 2001-02-07 Mark Mitchell <mark@codesourcery.com>
14145
14146 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14147 spec.
14148
14149 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
14150
14151 * pt.c (lookup_template_class): Make sure it's a primary
14152 template or template_template_parm when called from the parser.
14153 (instantiate_template_class): Add assertion.
14154
14155 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
14156
14157 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14158 from error_mark_node.
14159
14160 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
14161
14162 Fix specification and implementation bugs in V3 ABI
14163 construction vtables.
14164 * cp-tree.h (flag_dump_class_layout): New flag.
14165 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14166 (BINFO_LOST_PRIMARY_P): New flag.
14167 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14168 (BINFO_PRIMARY_MARKED_P): Rename to ...
14169 (BINFO_PRIMARY_P): ... here.
14170 (binfo_via_virtual): New prototype.
14171 * decl2.c (flag_dump_class_layout): New flag.
14172 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14173 use `=' as a file name separator.
14174 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14175 bases.
14176 (build_vtbl_address): If this is a virtual primary base, then
14177 get the vtbl of what it is ultimately primary for.
14178 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14179 for BINFO_PRIMARY_P.
14180 (dfs_skip_nonprimary_vbases_markedp): Likewise.
14181 (get_shared_vbase_if_not_primary): Likewise.
14182 (dfs_get_pure_virtuals): Likewise.
14183 (expand_upcast_fixups): Likewise.
14184 (fixup_virtual_upcast_offsets): Likewise.
14185 (dfs_find_vbase_instance): Likewise.
14186 (find_vbase_instance): Likewise.
14187 (binfo_from_vbase): Adjust comment to reflect reality.
14188 (binfo_via_virtual): New function.
14189 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14190 for binfo walking during VTT construction.
14191 (dfs_mark_primary_bases): Remove.
14192 (force_canonical_binfo_r): New function.
14193 (force_canonical_binfo): New function.
14194 (mark_primary_virtual_base): New function.
14195 (mark_primary_bases): Walk in inheritance graph order, use
14196 mark_primary_virtual_base.
14197 (determine_primary_base): Use some more intermediate variables.
14198 (dfs_find_final_overrider): Don't check for overriding along a
14199 virtual path.
14200 (dfs_modify_vtables): Walk into primary virtual bases too.
14201 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14202 (build_base_fields): Likewise.
14203 (dfs_set_offset_for_unshared_vbases): Likewise.
14204 (layout_virtual_bases): Likewise.
14205 (end_of_class): Likewise.
14206 (finish_struct_1): Call dump_class_hierarchy, if requested.
14207 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14208 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14209 (dump_class_hierarchy): Add file parameter. Append to file, if
14210 required.
14211 (finish_vtbls): Adjust accumulate_vtbl_inits call.
14212 Use canonical base for virtual bases.
14213 (build_vtt): Add more comments. Adjust build_vtt_inits call.
14214 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14215 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14216 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14217 virtual VTTs.
14218 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14219 from DATA. We want virtual primary bases and all bases via virtual.
14220 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14221 virtual base when not a construction vtable.
14222 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14223 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14224 Use canonical bases when processing virtual bases.
14225 (accumulate_vtbl_inits): We're interested in any base via a
14226 virtual path.
14227 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14228 within a construction vtable, determine what is being overridden.
14229 (build_vtbl_initializer): Add more comments
14230 (add_vcall_offset_vtbl_entries_1): Adjust comment.
14231 (build_rtti_vtbl_entries): Check if the base has lost its
14232 primary.
14233
14234 2001-02-05 Mark Mitchell <mark@codesourcery.com>
14235
14236 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14237
14238 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14239
14240 * decl.c (pushdecl): Call abort instead of fatal.
14241 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14242 * init.c (build_new_1): Likewise.
14243 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14244 * decl.c (build_typename_type): hash_table_init now returns void.
14245 decl.c (init_decl_processing): Make an error non-fatal.
14246
14247 2001-02-04 Mark Mitchell <mark@codesourcery.com>
14248
14249 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14250 Document.
14251 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14252 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14253 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14254 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14255 * decl.c (maybe_commonize_var): Use the new name-mangling where
14256 appropriate.
14257 * decl2.c (comdat_linkage): Enhance comments. Make all
14258 compiler-generated things static, if COMDAT is not available.
14259 (get_tinfo_decl): Do not make typeinfo objects that belong in the
14260 library COMDAT.
14261 (tinfo_base_init): Use the correct mangled name for typeinfo
14262 strings, and push them into the global scope.
14263 (typeinfo_in_lib_p): New function.
14264 (synthesize_tinfo_var): Use it.
14265 (create_real_tinfo_var): Likewise.
14266
14267 2001-02-03 Jakub Jelinek <jakub@redhat.com>
14268
14269 * decl.c (push_class_binding): Use context_for_name_lookup instead
14270 of CP_DECL_CONTEXT.
14271 * search.c (context_for_name_lookup): Remove static. Check for NULL
14272 context in the loop.
14273 * cp-tree.h (context_for_name_lookup): Add prototype.
14274
14275 2001-02-02 Jakub Jelinek <jakub@redhat.com>
14276
14277 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14278 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14279 Remove.
14280 * call.c (convert_class_to_reference, build_user_type_conversion_1,
14281 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14282
14283 2001-02-02 Mark Mitchell <mark@codesourcery.com>
14284
14285 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14286 of macros used when compiling g++spec.c.
14287 * g++spec.c (lang_specific_driver): Link with the shared
14288 libgcc by default.
14289
14290 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
14291
14292 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14293 make_reference_declarator, make_call_declarator), method.c
14294 (implicitly_declare_fn), parse.y (namespace_using_decl,
14295 notype_unqualified_id, expr_or_declarator, new_type_id,
14296 after_type_declarator, direct_after_type_declarator,
14297 notype_declarator, complex_notype_declarator,
14298 complex_direct_notype_declarator, qualified_id,
14299 notype_qualified_id, overqualified_id, direct_new_declarator,
14300 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14301 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14302 instead of build_parse_node.
14303
14304 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14305
14306 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14307 (minus_one_node): Moved to top level gcc directory. Renamed
14308 to integer_minus_one_node.
14309
14310 * init.c (init_init_processing): Don't set minus_one_node.
14311 (build_vec_init): Use integer_minus_one_node.
14312
14313 * rtti.c (get_tinfo_decl_dynamic): Likewise.
14314
14315 2001-01-28 Jakub Jelinek <jakub@redhat.com>
14316
14317 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14318 identical and they would be replaced with constant, remove
14319 MODIFY_EXPR from the tree.
14320
14321 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14322
14323 * Make-lang.in: Remove all dependencies on defaults.h.
14324 * call.c: Don't include defaults.h.
14325 * decl.c: Likewise.
14326 * decl2.c: Likewise.
14327 * except.c: Likewise.
14328 * pt.c: Likewise.
14329 * rtti.c: Likewise.
14330 * tree.c: Likewise.
14331 * typeck.c: Likewise.
14332
14333 2001-01-25 Jakub Jelinek <jakub@redhat.com>
14334
14335 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14336 operators even in "C" linkage.
14337 * method.c (set_mangled_name_for_decl): Likewise.
14338 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14339 overloaded operators in "C" linkage.
14340
14341 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14342
14343 * pt.c (tsubst_decl): Remove IN_DECL parameter.
14344 (tsubst_arg_types): Check parameter is not void.
14345 (tsubst): Adjust tsubst_decl call.
14346
14347 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14348
14349 * call.c (add_builtin_candidate): Quote std properly, from
14350 previous change.
14351
14352 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14353
14354 * pt.c (check_explicit_specialization): Clone constructors and
14355 destructors.
14356
14357 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14358
14359 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14360 indicates anything special about template depth. Make sure we
14361 only count the user visible template classes.
14362
14363 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14364
14365 * call.c (build_conv): Typo in comment.
14366 (add_builtin_candidate): Add more explanation.
14367 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14368 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14369 when we have enumeral types.
14370 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14371 candidates for relops and eqops.
14372 (joust): Simplify control flow. Allow a non-template user
14373 function to hide a builtin.
14374
14375 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
14376
14377 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14378 (more_specialized): Add deduction parameter.
14379 * call.c (joust): Adjust more_specialized call.
14380 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14381 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14382 (get_bindings_order): Remove.
14383 (get_bindings_real): Add DEDUCE parameter.
14384 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14385 REFERENCE_TYPE jig for DEDUCE_ORDER.
14386 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14387 maybe_adjust_types_for_deduction.
14388 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14389 directly.
14390 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14391 (check_cv_quals_for_unify): Use new unify qualifier flags.
14392 (unify): Clear new unify qualifier flags.
14393 (get_bindings_real): Add DEDUCE parameter.
14394 (get_bindings): Adjust call to get_bindings_real.
14395 (get_bindings_overload): Likewise.
14396 (most_specialized_instantiation): Adjust call to
14397 more_specialized.
14398
14399 2001-01-19 Jason Merrill <jason@redhat.com>
14400
14401 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14402
14403 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14404 -fnew-abi.
14405
14406 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
14407
14408 * decl2.c (arg_assoc_class): Fix double iteration logic.
14409
14410 2001-01-19 Jason Merrill <jason@redhat.com>
14411
14412 * init.c (build_delete): Always call convert_force to strip cv-quals.
14413
14414 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14415 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14416 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14417
14418 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14419
14420 * search.c (get_vbase_1): Count only virtual bases.
14421
14422 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14423
14424 * class.c (duplicate_tag_error): Robustify flag clearing.
14425
14426 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14427
14428 * cp-tree.h (lookup_template_class): Add complain parm.
14429 * decl.c (lookup_namespace_name): Adjust call to
14430 lookup_template_class.
14431 (make_typename_type): Likewise.
14432 * semantics.c (finish_template_type): Likewise.
14433 * pt.c (lookup_template_class): Add complain parm. Adjust.
14434 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14435 (tsubst): Likewise.
14436
14437 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14438
14439 * pt.c (copy_default_args_to_explicit_spec): Preserve
14440 object's CV quals. Reorganize.
14441
14442 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14443
14444 * typeck.c (build_modify_expr): Say `initialization' for
14445 INIT_EXPRs.
14446 * init.c (build_default_init): Convert to enumeral type, if
14447 needed.
14448
14449 2001-01-18 Jakub Jelinek <jakub@redhat.com>
14450
14451 * parse.y (nomods_initdcl0): Properly set things up for
14452 initdcl0_innards.
14453
14454 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14455
14456 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14457 (type_unification_real): Set it.
14458 (unify): Use it.
14459
14460 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14461
14462 * decl.c (finish_destructor_body): Convert to vbase pointer here.
14463
14464 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14465
14466 * semantics.c (begin_class_definition): Check we're not inside a
14467 template parm list.
14468
14469 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14470
14471 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14472 BASELINK_P.
14473
14474 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14475
14476 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14477 * call.c (build_over_call): Add comment.
14478
14479 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14480
14481 * cvt.c (ocp_convert): Handle vector type conversion
14482 * typeck2.c (digest_init): Handle vector type initializations
14483
14484 2001-01-16 Phil Edwards <pme@sources.redhat.com>
14485
14486 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
14487 was given.
14488
14489 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14490
14491 * pt.c (check_nontype_parm): Rename to ...
14492 (invalid_nontype_parm_type_p): ... here.
14493 (process_template_parm): Adjust.
14494 (convert_template_argument): Adjust.
14495
14496 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14497
14498 * pt.c (check_nontype_parm): New function.
14499 (process_template_parm): Use it.
14500 (convert_template_argument): Use it.
14501 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14502 member.
14503
14504 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
14505
14506 * tree.c: Add defaults.h
14507 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14508 * Make-lang.in (cp/tree.o): Add defaults.h.
14509
14510 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14511
14512 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14513
14514 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14515
14516 * g++.1: Change to be ".so man1/gcc.1".
14517
14518 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14519
14520 * Make-lang.in (c++.info, c++.install-info): Build and install g++
14521 internals info.
14522 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14523 ($(srcdir)/cp/g++int.info): New target.
14524 * gxxint.texi: Add info directory entry. Use @@ in email address.
14525 * .cvsignore: Update.
14526
14527 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14528
14529 * typeck.c (build_c_cast): Do template processing earlier.
14530 Always pedwarn on array casts.
14531
14532 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14533
14534 * friend.c (make_friend_class): Make sure a templated class is
14535 actually a template.
14536
14537 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14538
14539 * decl2.c (get_guard): Set linkage from guarded decl.
14540
14541 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14542
14543 * call.c (convert_default_arg): Check for unprocessed
14544 DEFAULT_ARG.
14545 * cp-tree.h (replace_defarg): Move to spew.c.
14546 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14547 spew.c, which is where they really are.
14548 (done_pending_defargs): Declare.
14549 (unprocessed_defarg_fn): Declare.
14550 * decl.c (replace_defarg): Move to spew.c
14551 * parse.y (structsp): Call done_pending_defargs.
14552 * spew.c (defarg_fns): Rearrange list structure.
14553 (defarg_fnsdone): New static variable.
14554 (defarg_depfns): New static variable.
14555 (init_spew): Adjust.
14556 (add_defarg_fn): Store the type in TREE_TYPE.
14557 (do_pending_defargs): Detect and deal with ordering constraints
14558 and circularity.
14559 (done_pending_defargs): New function.
14560 (unprocessed_defarg_fn): New function.
14561 (replace_defarg): Moved from decl.c. Robustify. Don't save
14562 if circularity detected.
14563
14564 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14565
14566 * pt.c (unify): Check array has a domain, before checking
14567 whether it is variable sized.
14568
14569 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14570
14571 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14572 parameters with pointers to arrays of unknown bound.
14573
14574 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14575
14576 * parse.y (template_parm_header, template_spec_header): New
14577 reductions. Split out from ...
14578 (template_header): ... here. Use them.
14579 (template_template_parm): Use template_parm_header.
14580 * semantics.c (finish_template_template_parm): Add assert.
14581
14582 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14583
14584 * mangle.c (write_builtin_type): Fix thinko.
14585
14586 * pt.c (copy_default_args_to_explicit_spec_1): New function.
14587 (copy_default_args_to_explicit_spec): Likewise.
14588 (check_explicit_specialization): Use it.
14589
14590 * class.c (finish_struct_1): Remove last argument in call to
14591 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14592 * decl.c (builtin_function): Likewise.
14593 (build_cp_library_fn): Likewise.
14594 (check_initializer): Likewise.
14595 (make_rtl_for_nonlocal_decl): Likewise.
14596 (cp_finish_decl): Likewise.
14597 (start_function): Likewise.
14598 * decl2.c (finish_anon_union): Likewise.
14599 * friend.c (do_friend): Likewise.
14600 * init.c (build_java_class_ref): Likewise.
14601 * method.c (make_thunk): Likewise.
14602 * pt.c (tsubst_friend_function): Likewise.
14603 * semantics.c (expand_body): Likewise.
14604
14605 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14606
14607 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14608 looking at DECL_CLONED_FUNCTION for non-functions.
14609
14610 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14611
14612 * error.c (dump_template_parameter): Use parm to determine how
14613 to print default value.
14614
14615 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14616
14617 * class.c (duplicate_tag_error): Clear more flags.
14618
14619 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14620
14621 * call.c (build_new_method_call): Use binfo_for_vbase.
14622
14623 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
14624
14625 * cp-tree.h (flag_cond_mismatch): Don't declare.
14626 * decl2.c (flag_cond_mismatch): Don't define.
14627 (lang_f_options): Remove cond-mismatch.
14628 (unsupported_options): Add cond-mismatch.
14629
14630 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
14631
14632 * class.c (handle_using_decl): Reject using of constructor name
14633 of sourcing class. Allow injecting of a method with same name as
14634 nested class. Fixup error messages.
14635
14636 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
14637
14638 * decl2.c (lang_decode_option): Handle -Wformat=2.
14639
14640 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14641
14642 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14643 initialized_in_class.
14644 (DECL_DEFINED_IN_CLASS_P): Rename to ...
14645 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14646 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14647 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14648 * pt.c (check_default_tmpl_args): Adjust for
14649 DECL_INITIALIZED_IN_CLASS_P.
14650 (instantiate_class_template): Likewise.
14651 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14652
14653 * class.c (finish_struct): Constify saved_filename.
14654
14655 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14656
14657 * class.c (duplicate_tag_error): Adjust diagnostic.
14658 (finish_struct): Locally set location to start of struct.
14659 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14660
14661 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14662
14663 * decl.c (struct binding_level): Adjust class_shadowed comments
14664 to reflect reality.
14665 (push_class_level_binding): Adjust comments to reflect reality.
14666 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14667 Don't set TREE_VALUE on the class_shadowed list.
14668
14669 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14670
14671 * decl2.c (acceptable_java_type): Allow references too.
14672 * init.c (build_java_class_ref): When using the new ABI, search
14673 `class$' and have it mangled with `mangle_decl.'
14674 * mangle.c (write_java_integer_type_codes): New function.
14675 (write_builtin_type): Detect and mangle Java integer and real
14676 types.
14677
14678 2001-01-07 Mark Mitchell <mark@codesourcery.com>
14679
14680 * decl2.c (grokfield): Don't accept `asm' specifiers for
14681 non-static data members.
14682
14683 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14684
14685 * expr.c (cplus_expand_expr): Don't reset `target'.
14686
14687 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
14688
14689 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14690
14691 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14692
14693 * parse.y (template_datadef): Check for error_mark_node.
14694
14695 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14696
14697 * cp-tree.def (DEFAULT_ARG): Make `x' class.
14698
14699 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
14700
14701 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14702 (record_builtin_type): Make non-static.
14703 (flag_short_double): Don't declare.
14704 (init_decl_processing): Remove the creation of many tree nodes now
14705 in c_common_nodes_and_builtins.
14706 (build_void_list_node): New function.
14707 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14708 * cp-tree.h (flag_short_wchar): Don't declare.
14709
14710 2001-01-04 Mark Mitchell <mark@codesourcery.com>
14711
14712 * call.c (build_conv): Don't use build1 for USER_CONV.
14713 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14714
14715 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
14716
14717 * lex.c (lang_init): Call c_common_lang_init.
14718
14719 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14720
14721 * search.c (lookup_fnfields_here): Remove.
14722 (look_for_overrides_r): Use lookup_fnfields_1.
14723 Ignore functions from using declarations.
14724
14725 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14726
14727 Implement exceptions specifiers for implicit member functions.
14728 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14729 * method.c (synthesize_exception_spec): New function.
14730 (locate_dtor, locate_ctor, locate_copy): New functions.
14731 (implicitly_declare_fn): Generate the exception spec too.
14732 * search.c (check_final_overrider): Check artificial functions
14733 too.
14734 * typeck2.c (merge_exception_specifiers): New function.
14735
14736 2001-01-03 Jason Merrill <jason@redhat.com>
14737
14738 * init.c (build_default_init): New fn.
14739 (perform_member_init): Split out from here.
14740 (build_new_1): Use it. Simplify initialization logic.
14741 (build_vec_init): Take an array, rather than a pointer and maxindex.
14742 Speed up simple initializations. Don't clean up if we're assigning.
14743 * cp-tree.h: Adjust.
14744 * decl2.c (do_static_initialization): Remove TREE_VEC case.
14745 * parse.y (new_initializer): Return void_zero_node for ().
14746 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14747 * typeck2.c (digest_init): Only complain about user-written
14748 CONSTRUCTORs.
14749
14750 2000-12-22 Mike Stump <mrs@wrs.com>
14751
14752 * decl2.c: (max_tinst_depth): Increase to 50.
14753
14754 2001-01-02 Mark Mitchell <mark@codesourcery.com>
14755
14756 * class.c (invalidate_class_lookup_cache): Zero the
14757 previous_class_values.
14758 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14759 TREE_INT_CST_HIGH.
14760 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14761 * decl.c (free_bindings): New variable.
14762 (push_binding): Don't create a new binding if we have one on the
14763 free list.
14764 (pop_binding): Put old bindings on the free list.
14765 (init_decl_processing): Use size_int, not build_int_2.
14766 Register free_bindings as a GC root.
14767 (cp_make_fname_decl): Use size_int, not build_int_2.
14768 (push_inline_template_parms_recursive): Likewise.
14769 (end_template_parm_list): Likewise.
14770 (for_each_template_parm): Do not use walk_tree_without_duplicates.
14771 (tsubst_template_parms): Use size_int, not build_int_2.
14772 (tsubst): Likewise.
14773 * rtti.c (get_vmi_pseudo_type_info): Likewise.
14774
14775 2001-01-02 Richard Henderson <rth@redhat.com>
14776
14777 * parse.y (asm): Set ASM_INPUT_P.
14778
14779 2001-01-02 Jason Merrill <jason@redhat.com>
14780
14781 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14782 for v3 ABI.
14783
14784 * typeck.c (cp_truthvalue_conversion): New fn.
14785 * cvt.c (ocp_convert): Use it.
14786
14787 * cp-tree.h: Lose c-common.c decls.
14788
14789 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14790 * cvt.c (convert_to_void): Use type_unknown_p.
14791
14792 * typeck.c (strip_all_pointer_quals): Also strip quals from
14793 pointer-to-member types.
14794
14795 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
14796 parse.y as C.
14797
14798 * call.c (build_new_method_call): Do evaluate the object parameter
14799 when accessing a static member.
14800 * typeck.c (build_component_ref): Likewise.
14801
14802 2001-01-02 Andreas Jaeger <aj@suse.de>
14803
14804 * decl.c (cp_missing_noreturn_ok_p): New.
14805 (init_decl_processing): Set lang_missing_noreturn_ok_p.
14806
14807 2000-12-29 Jakub Jelinek <jakub@redhat.com>
14808
14809 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14810
14811 2000-12-29 Mark Mitchell <mark@codesourcery.com>
14812
14813 * class.c (pushclass): Remove #if 0'd code.
14814 * cp-tree.h (overload_template_name): Remove.
14815 * decl.c (store_bindings): Simplify.
14816 (pop_from_top_level): Likewise.
14817 * pt.c (overload_template_name): Remove.
14818 (instantiate_decl): Don't call push_to_top_level if it's not
14819 needed.
14820
14821 2000-12-28 Mark Mitchell <mark@codesourcery.com>
14822
14823 * pt.c (register_local_specialization): Don't return a value.
14824 (lookup_template_class): Use move-to-front heuristic when looking
14825 up template instantiations.
14826 (instantiate_decl): Only push_to_top_level when we're actually
14827 going to instantiate the template.
14828
14829 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
14830
14831 * search.c (binfo_for_vtable): Return least derived class, not
14832 most. Handle secondary vtables.
14833
14834 2000-12-22 Jason Merrill <jason@redhat.com>
14835
14836 * pt.c (more_specialized): Don't optimize len==0.
14837 (fn_type_unification): If we're adding the return type, increase len.
14838
14839 * typeck.c (build_binary_op): Fix pmf comparison logic.
14840
14841 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14842 DECL_STATIC_FUNCTION_P.
14843
14844 * semantics.c (genrtl_finish_function): Don't try to jump to
14845 return_label unless it exists.
14846
14847 In partial ordering for a call, ignore parms for which we don't have
14848 a real argument.
14849 * call.c (joust): Pass len to more_specialized.
14850 (add_template_candidate_real): Strip 'this', pass len.
14851 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
14852 (get_bindings_order): New fn. Pass len down.
14853 (get_bindings_real): Strip 'this', pass len.
14854 (fn_type_unification): Likewise.
14855 (type_unification_real): Succeed after checking 'len' args.
14856 (most_specialized_instantiation): Lose explicit_args parm.
14857 * class.c (resolve_address_of_overloaded_function): Strip 'this',
14858 pass len.
14859
14860 2000-12-21 Jason Merrill <jason@redhat.com>
14861
14862 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14863 DECL_TEMPLATE_RESULT.
14864
14865 * search.c (lookup_field_r): Call lookup_fnfields_1, not
14866 lookup_fnfields_here.
14867
14868 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14869
14870 * call.c (build_object_call): Also allow conversions that return
14871 reference to pointer to function.
14872 (add_conv_candidate): Handle totype being ref to ptr to fn.
14873 (build_field_call): Also allow members of type reference to function.
14874 Lose support for calling pointer to METHOD_TYPE fields.
14875
14876 * error.c (dump_expr): Handle *_CAST_EXPR.
14877
14878 * typeck2.c (build_scoped_ref): Always convert to the naming class.
14879
14880 * tree.c (break_out_cleanups): Lose.
14881 * cp-tree.h: Remove prototype.
14882 * typeck.c (build_component_ref): Don't break_out_cleanups.
14883 (build_compound_expr): Likewise.
14884 * semantics.c (finish_expr_stmt): Likewise.
14885
14886 2000-12-20 Richard Henderson <rth@redhat.com>
14887
14888 * cp-tree.h: Update declarations.
14889 * decl.c (finish_case_label): Return the new stmt node.
14890 * semantics.c (finish_goto_stmt): Likewise.
14891 (finish_expr_stmt, finish_return_stmt): Likewise.
14892 (finish_break_stmt, finish_continue_stmt): Likewise.
14893 (finish_asm_stmt): Likewise.
14894 * parse.y (already_scoped_stmt): Set STMT_LINENO.
14895 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14896 (simple_if, simple_stmt): Return the new stmt node.
14897 (save_lineno): New.
14898
14899 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
14900
14901 * cp-tree.h: Don't declare warn_long_long.
14902
14903 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14904
14905 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14906 IS_AGGR_TYPE.
14907
14908 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14909
14910 * pt.c (unify): Handle when both ARG and PARM are
14911 BOUND_TEMPLATE_TEMPLATE_PARM.
14912
14913 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14914
14915 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14916 DECL_TEMPLATE_PARM_P.
14917
14918 2000-12-15 Jason Merrill <jason@redhat.com>
14919
14920 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
14921
14922 * init.c (build_new_1): Don't strip quals from type.
14923
14924 * decl.c (pushdecl): Don't check for linkage on a non-decl.
14925
14926 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14927
14928 * call.c (build_new_function_call): Lose space before paren in
14929 error message.
14930 (build_new_method_call): Likewise.
14931
14932 * typeck2.c (build_m_component_ref): Propagate quals from datum.
14933
14934 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14935
14936 * pt.c (check_explicit_specialization): Propagate default
14937 function arguments to explicit specializations.
14938
14939 2000-12-13 DJ Delorie <dj@redhat.com>
14940
14941 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14942 and <? operators.
14943
14944 2000-12-08 Jason Merrill <jason@redhat.com>
14945
14946 * error.c (dump_function_name): Don't let the user see __comp_ctor.
14947
14948 Clean up copy-initialization in overloading code.
14949 * call.c (build_user_type_conversion_1): Die if we are asked to
14950 convert to the same or a base type.
14951 (implicit_conversion): Avoid doing so. Lose reference binding code.
14952 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14953 direct-initialization. Also do direct-init part of copy-init.
14954 (build_user_type_conversion): Don't provide context to convert_like.
14955 * cvt.c (ocp_convert): build_user_type_conversion will now provide
14956 the constructor call for copy-init.
14957
14958 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14959 instantiation of a member template.
14960 (do_decl_instantiation): Not here.
14961
14962 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
14963
14964 * class.c (check_field_decls): Don't special case anonymous
14965 fields in error messages.
14966 (note_name_declared_in_class): Use %D on diagnostic.
14967
14968 * tree.c (pod_type_p): Use strip_array_types.
14969 (cp_valid_lang_attribute): Likewise.
14970 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14971 multiple evaluations.
14972 (cp_has_mutable_p): Use strip_array_types.
14973
14974 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
14975
14976 * cp-tree.h (sufficient_parms_p): Declare new function.
14977 * call.c (sufficient_parms_p): New function, broken out of ...
14978 (add_function_candidate): ... here. Use it.
14979 (add_conv_candidate): Use it.
14980 * decl.c (grok_ctor_properties): Use it.
14981
14982 2000-12-07 Jakub Jelinek <jakub@redhat.com>
14983
14984 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14985
14986 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
14987
14988 * decl2.c (lang_decode_option): Handle -Wformat-security.
14989
14990 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14991
14992 * pt.c (verify_class_unification): New function.
14993 (get_class_bindings): Use it.
14994 (try_class_unification): Tidy.
14995 (unify): Handle when argument of a template-id is not
14996 template parameter dependent.
14997 (template_args_equal): Handle when TREE_CODE's do not match.
14998
14999 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
15000
15001 * lang-specs.h (c++): When invoking the stand-alone preprocessor
15002 for -save-temps, pass all relevant -Defines to it, and then don't
15003 pass them to cc1plus.
15004
15005 2000-12-05 Will Cohen <wcohen@redhat.com>
15006
15007 * decl.c (finish_case_label): Cleared
15008 more_cleanups_ok in surrounding function scopes.
15009 (define_label): Likewise.
15010
15011 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15012
15013 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15014 (get_matching_virtual): Remove.
15015 (look_for_overrides): Declare new function.
15016 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15017 DECL_VINDEX here.
15018 * class.c (check_for_override): Move base class iteration code
15019 to look_for_overrides.
15020 * search.c (next_baselink): Remove.
15021 (get_virtuals_named_this): Remove.
15022 (get_virtual_destructor): Remove.
15023 (tree_has_any_destructors_p): Remove.
15024 (struct gvnt_info): Remove.
15025 (check_final_overrider): Remove `virtual' from error messages.
15026 (get_matching_virtuals): Remove. Move functionality to ...
15027 (look_for_overrides): ... here, and ...
15028 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15029 to be overriding.
15030
15031 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15032
15033 * typeck.c (get_delta_difference): If via a virtual base,
15034 return zero.
15035 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15036 adjustment.
15037
15038 2000-12-04 Richard Henderson <rth@redhat.com>
15039
15040 * error.c (dump_tree): Use output_add_string not OB_PUTS.
15041
15042 2000-12-04 Jason Merrill <jason@redhat.com>
15043
15044 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15045 (write_builtin_type): Pass intSI_type_node and the like through
15046 type_for_mode.
15047 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15048 Pass intSI_type_node and the like through type_for_mode.
15049 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15050 * pt.c (tsubst, unify): Likewise.
15051 * tree.c (walk_tree): Likewise.
15052 * error.c (dump_type): Likewise.
15053 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15054
15055 * Make-lang.in: Tweak top comment for emacs.
15056 (cp/TAGS): Restore.
15057
15058 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15059
15060 * class.c (clone_function_decl): Robustify.
15061
15062 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
15063
15064 * decl.c (store_bindings): Only search in the non modified
15065 old_bindings for duplicates.
15066
15067 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
15068
15069 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15070 TYPE_POLYMORPHIC_P.
15071
15072 * typeck.c (build_static_cast): Remove unused variable.
15073
15074 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15075
15076 * pt.c: Fix typo in comment.
15077
15078 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15079
15080 * decl2.c (warn_format): Remove definition.
15081 (lang_decode_option): Handle -Wformat-nonliteral,
15082 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
15083
15084 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15085
15086 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15087 (init_decl_processing): Don't create string_type_node,
15088 const_string_type_node, wint_type_node, intmax_type_node,
15089 uintmax_type_node, default_function_type, ptrdiff_type_node and
15090 unsigned_ptrdiff_type_node. Adjust position of call to
15091 c_common_nodes_and_builtins.
15092 (identifier_global_value): New function.
15093
15094 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
15095
15096 * call.c (standard_conversion): Reject pointer to member
15097 conversions from ambiguous, inaccessible or virtual bases.
15098 * typeck.c (build_static_cast): Don't check pointers to members
15099 specially.
15100
15101 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15102
15103 * method.c (do_build_copy_constructor): Preserve cv
15104 qualifications when accessing source object members.
15105 (do_build_assign_ref): Likewise. Remove separate diagnostics for
15106 unnamed fields.
15107
15108 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15109
15110 * method.c (do_build_assign_ref): Construct appropriately
15111 CV-qualified base reference. Don't allow const casts in base
15112 conversion.
15113
15114 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15115
15116 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15117 incomplete return type.
15118
15119 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15120
15121 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15122 * semantics.c (finish_base_specifier): Accept a _TYPE not a
15123 _DECL.
15124
15125 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15126
15127 * spew.c (yyerror): Cope if yylval.ttype is NULL.
15128
15129 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15130
15131 * decl.c (grokdeclarator): Diagnose undefined template contexts.
15132
15133 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15134
15135 * decl.c (grokdeclarator): Do type access control on friend
15136 class.
15137
15138 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15139
15140 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15141 bison parser ickiness.
15142 * pt.c (tsubst_friend_function): Enter namespace scope when
15143 tsubsting the function name.
15144 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15145
15146 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15147
15148 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15149 * cvt.c (cp_convert_to_pointer): Add force parameter.
15150 Allow conversions via virtual base if forced.
15151 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15152 (ocp_convert): Likewise.
15153 * search.c (binfo_from_vbase): Return the virtual base's binfo.
15154 * typeck.c (get_delta_difference): Adjust handling of virtual
15155 bases.
15156
15157 2000-11-26 Mark Mitchell <mark@codesourcery.com>
15158
15159 * tree.c (struct list_hash): Remove.
15160 (list_hash_table): Make it be an htab.
15161 (struct list_proxy): New type.
15162 (list_hash_eq): New function.
15163 (list_hash_pieces): Renamed from ...
15164 (list_hash): ... this.
15165 (list_hash_lookup): Remove.
15166 (list_hash_add): Remove.
15167 (hash_tree_cons): Use the generic hashtable.
15168 (mark_list_hash): Remove.
15169 (init_tree): Create the hashtable.
15170
15171 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
15172
15173 * method.c (build_mangled_C9x_name): Rename to
15174 build_mangled_C99_name. Change C9X references in comments to
15175 refer to C99.
15176
15177 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15178
15179 * parse.y (unary_expr): Move VA_ARG from here ...
15180 (primary): ... to here.
15181
15182 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15183
15184 * semantics.c (finish_id_expr): If type is error_mark, return
15185 error_mark.
15186
15187 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
15188
15189 * pt.c (lookup_template_class): Simplify loop exit constructs.
15190 Cope when there is no partial instantiation of a template
15191 template member.
15192
15193 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
15194
15195 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15196
15197 2000-11-22 Mark Mitchell <mark@codesourcery.com>
15198
15199 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15200 prefix.
15201
15202 * pt.c (do_decl_instantiate): Explicitly clone constructors and
15203 destructors that haven't already been cloned.
15204
15205 2000-11-20 Richard Henderson <rth@redhat.com>
15206
15207 * parse.y (yyparse_1): Rename the parser entry point.
15208
15209 2000-11-20 Alex Samuel <samuel@codesourcery.com>
15210
15211 * mangle.c (write_name): Use <unscoped-name> for names directly in
15212 function scope.
15213 (write_unscoped_name): Accept names directly in function scope.
15214
15215 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
15216
15217 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15218 * parse.y (extdef): Add EXPORT reduction.
15219 * spew.c (yylex): Don't skip export here.
15220
15221 2000-11-19 Mark Mitchell <mark@codesourcery.com>
15222
15223 * decl.c (init_decl_processing): Correct name of pure virtual
15224 function under the new ABI.
15225 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15226 (throw_bad_typeid): Likewise for bad typeid function.
15227
15228 2000-11-18 Mark Mitchell <mark@codesourcery.com>
15229
15230 * decl.c (grokparms): Don't even function types of `void' type,
15231 either.
15232 * mangle.c (write_type): Don't crash when confronted with the
15233 error_mark_node.
15234
15235 * decl.c (grokparms): Don't create parameters of `void' type.
15236
15237 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
15238
15239 * lex.c (mark_impl_file_chain): Delete.
15240 (init_parse): Remove call to ggc_add_string_root. No need to
15241 ggc_strdup a string constant. Do not add impl_file_chain to GC
15242 roots.
15243 (handle_pragma_implementation): No need to ggc_strdup main_filename.
15244
15245 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15246
15247 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15248
15249 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15250
15251 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15252 * decl.c (grokdeclarator): Don't reject void parms here.
15253 (require_complete_types_for_parms): Simplify, use
15254 complete_type_or_else.
15255 (grokparms): Remove bitrot. Remove funcdef parm.
15256 Deal with ellipsis parm lists here.
15257 * semantics.c (finish_parmlist): Don't append void_list_node
15258 here. Set PARMLIST_ELLIPSIS_P.
15259
15260 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15261
15262 * typeck2.c (incomplete_type_error): Reorganize to avoid
15263 excessive diagnostics.
15264
15265 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
15266
15267 * lex.c (struct impl_files, internal_filename): Constify a char *.
15268
15269 2000-11-16 Mark Mitchell <mark@codesourcery.com>
15270
15271 * mangle.c (write_special_name_constructor): Don't generate
15272 assembler junk when confronted with an old-style constructor.
15273 (write_special_name_destructor): Likewise.
15274 (mangle_decl_string): Do it here instead.
15275
15276 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
15277
15278 * call.c (op_error): Make error messages clearer.
15279
15280 2000-11-15 Mark Mitchell <mark@codesourcery.com>
15281
15282 * decl.c (wrapup_globals_for_namespace): Don't mark things
15283 TREE_ASM_WRITTEN when they're not.
15284
15285 2000-11-15 Jason Merrill <jason@redhat.com>
15286
15287 * typeck2.c (friendly_abort): Uncount the error before handing
15288 off to fancy_abort.
15289
15290 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
15291
15292 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15293
15294 2000-11-14 Mark Mitchell <mark@codesourcery.com>
15295
15296 * class.c (build_vtbl_initializer): Fix typo in comment.
15297 * typeck.c (expr_sizeof): Don't crash on errors.
15298
15299 2000-11-14 Jim Wilson <wilson@redhat.com>
15300
15301 * lang-specs.h: Add %2 after %(cc1_options).
15302
15303 2000-11-14 Richard Henderson <rth@redhat.com>
15304
15305 * typeck.c (c_sizeof): Be strict about casting result value
15306 back to c_size_type_node.
15307 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15308
15309 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
15310
15311 * typeck.c (build_unary_op): Use boolean_increment from
15312 c-common.c, moving the relevant code there.
15313
15314 2000-11-11 Jason Merrill <jason@redhat.com>
15315
15316 * typeck.c (mark_addressable): Don't call put_var_into_stack.
15317
15318 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15319 in inlines.
15320
15321 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15322
15323 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15324 * lex.c (copy_lang_decl): Likewise.
15325
15326 2000-11-09 Mark Mitchell <mark@codesourcery.com>
15327
15328 * dump.c (cp_dump_tree): Don't dump function bodies here.
15329
15330 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15331 (dump.o): Update dependency list.
15332 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15333 (flag_dump_translation_unit): Likewise.
15334 (CP_TYPE_QUALS): Adjust definition.
15335 (DECL_C_BIT_FIELD): Remove.
15336 (SET_DECL_C_BIT_FIELD): Likewise.
15337 (CLEAR_DECL_C_BIT_FIELD): Likewise.
15338 (add_maybe_template): Likewise.
15339 (strip_array_types): Likewise.
15340 (dump_node_to_file): Likewise.
15341 (cp_dump_tree): New function.
15342 * decl.c (init_decl_processing): Set lang_dump_tree.
15343 * decl2.c (flag_dump_translation_unit): Remove.
15344 * dump.c: Move most of it to ../c-dump.c.
15345 (cp_dump_tree): New function.
15346 * pt.c (add_maybe_template): Remove.
15347 * typeck.c (strip_array_types): Likewise.
15348
15349 2000-11-07 Eric Christopher <echristo@redhat.com>
15350
15351 * decl.c (init_decl_processing): Change definition of
15352 __wchar_t to wchar_t. Remove artificial declaration of
15353 wchar_t.
15354 * lex.c: Change instances of __wchar_t to wchar_t.
15355
15356 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
15357
15358 * lex.c (do_identifier): Don't lookup_name for operators.
15359 * parse.y (operator): Save looking_for_typename.
15360 (unoperator): Restore it.
15361 * spew.c (frob_opname): Use nth_token for lookahead.
15362
15363 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
15364
15365 * decl.c (grok_op_properties): Always use coerce_new_type and
15366 coerce_delete_type.
15367 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15368 exception specification. Tidy up.
15369 (coerce_delete_type): Preserve exception specification. Tidy up.
15370
15371 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
15372
15373 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15374 (push_binding_level), error.c (cp_tree_printer), pt.c
15375 (process_partial_specialization, tsubst_template_arg_vector),
15376 search.c (lookup_member): Use memset () instead of bzero ().
15377
15378 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
15379
15380 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15381
15382 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
15383
15384 * Make-lang.in (c++.distdir): Remove.
15385
15386 2000-11-04 Mark Mitchell <mark@codesourcery.com>
15387
15388 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15389 declarations from different namespaces to be combined.
15390
15391 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
15392
15393 * decl.c: Include tm_p.h.
15394
15395 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
15396
15397 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15398
15399 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
15400
15401 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15402 (build_overload_value), repo.c (open_repo_file), xref.c
15403 (open_xref_file): Use strchr () and strrchr () instead of index ()
15404 and rindex ().
15405
15406 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
15407
15408 * call.c (build_over_call): Call fold on the CALL_EXPR.
15409
15410 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
15411
15412 * error.c (dump_template_decl): Separate template hearders with
15413 space not comma.
15414
15415 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
15416
15417 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
15418 TS_* flags with corresponding TFF_*. Adjust prototypes of
15419 functions (which used to take a tree_string_flags) to take an int.
15420
15421 * cp-tree.h (enum tree_string_flags): Remove
15422 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15423 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15424 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15425 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15426 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15427 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15428 (type_as_string, decl_as_string, expr_as_string,
15429 context_as_string): Adjust prototype.
15430
15431 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15432 instead of TS_PLAIN.
15433
15434 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15435 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15436 plain `0'.
15437
15438 2000-10-30 Mark Mitchell <mark@codesourcery.com>
15439
15440 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15441 (linkage_kind): New enumeration.
15442 (decl_linkage): New function.
15443 * decl2.c (comdat_linkage): Extend comment.
15444 * error.c (dump_function_decl): Print the arguments used to
15445 instantiate a template, even when not printing the type of the
15446 function.
15447 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15448 not TREE_PUBLIC, to test for external linkage.
15449 * tree.c (decl_linkage): New function.
15450
15451 2000-10-28 Mark Mitchell <mark@codesourcery.com>
15452
15453 * pt.c (instantiate_decl): Always instantiate static data members
15454 initialized in-class.
15455
15456 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
15457
15458 * Make-lang.in: Move all build rules here from Makefile.in,
15459 adapt to new context. Wrap all rules that change the current
15460 directory in parentheses. Expunge all references to $(P).
15461 When one command depends on another and they're run all at
15462 once, use && to separate them, not ;. Add OUTPUT_OPTION to
15463 all object-file generation rules. Delete obsolete variables.
15464
15465 * Makefile.in: Delete.
15466 * config-lang.in: Delete outputs= line.
15467
15468 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
15469
15470 * error.c (dump_function_decl): Print no space between
15471 `ptr-operator' the `type-specifier' of the return type.
15472 (dump_type_prefix): Make sure we put space at the appropriate
15473 place.
15474
15475 2000-10-23 Jason Merrill <jason@redhat.com>
15476
15477 * call.c (equal_functions): Also call decls_match for extern "C" fns.
15478
15479 2000-10-22 Jason Merrill <jason@redhat.com>
15480
15481 * call.c (build_conditional_expr): Use ocp_convert to force
15482 rvalue conversion.
15483
15484 2000-10-22 Mark Mitchell <mark@codesourcery.com>
15485
15486 * call.c (standard_conversion): Use RVALUE_CONVs for all
15487 expressions that satisfy lvalue_p, not just those that satisfy
15488 real_lvalue_p.
15489
15490 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15491
15492 * typeck.c (c_sizeof): Return an expression of `size_t' type,
15493 not one with TYPE_IS_SIZETYPE set.
15494 (dubious_conversion_warnings): Remove special-case code.
15495
15496 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
15497
15498 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15499 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15500 (dump_type_prefix): Print vector-of-int as 'int vector'.
15501 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15502 * tree.c (walk_tree): Handle VECTOR_TYPE.
15503
15504 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15505
15506 2000-10-21 Jason Merrill <jason@redhat.com>
15507
15508 * parse.y (operator): Set got_object from got_scope.
15509 Set looking_for_typename.
15510 * decl.c (lookup_name_real): Clear val after setting from_obj.
15511 Reorganize diagnostic.
15512
15513 2000-10-20 Jason Merrill <jason@redhat.com>
15514
15515 * tree.c (walk_tree): Don't walk into default args.
15516
15517 * error.c (dump_expr): Use host_integerp.
15518
15519 2000-10-20 David Edelsohn <edelsohn@gnu.org>
15520
15521 * typeck2.c (abstract_virtuals_error): Use "because" instead of
15522 "since" in error message.
15523
15524 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15525
15526 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15527
15528 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
15529
15530 * decl.c (revert_static_member_fn): Fixed typo.
15531
15532 2000-10-19 Mark Mitchell <mark@codesourcery.com>
15533
15534 * class.c (subobject_offset_fn): New type.
15535 (dfs_record_base_offsets): Remove.
15536 (record_base_offsets): Likewise.
15537 (dfs_search_base_offsets): Likewise.
15538 (record_subobject_offset): New function.
15539 (check_subobject_offset): Likewise.
15540 (walk_subobject_offsets): Likewise.
15541 (record_subobject_offsets): Likewise.
15542 (layout_conflict_p): Reimplement.
15543 (layout_nonempty_base_or_field): Correct handling of type
15544 conflicts during layout.
15545 (layout_empty_base): Likewise.
15546 (build_base_field): Adjust to handle new representation of empty
15547 base offset table.
15548 (build_base_fields): Likewise.
15549 (layout_virtual_bases): Likewise.
15550 (splay_tree_compare_integer_csts): New function.
15551 (layout_class_type): Use a splay_tree, rather than a varray, to
15552 represent the offsets of empty bases.
15553
15554 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15555 * decl.c (select_decl): Don't return declarations that are
15556 DECL_ANTICIPATED.
15557
15558 2000-10-18 Mark Mitchell <mark@codesourcery.com>
15559
15560 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15561 (fake_std_node): New macro.
15562 * decl.c (in_std): Rename to ...
15563 (in_fake_std): ... this.
15564 (flag_no_builtin): Remove.
15565 (flag_no_nonansi_builtin): Likewise.
15566 (walk_namespaces_r): Use fake_std_node.
15567 (push_namespace): Use std_identifier.
15568 (pop_namespace): Use in_fake_std.
15569 (lookup_name_real): Use fake_std_node.
15570 (init_decl_processing): When -fhonor-std, create the `std'
15571 namespace. Don't create a dummy fake_std_node in that case.
15572 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
15573 (builtin_function): Put builtins whose names don't begin
15574 with `_' in the std namespace.
15575 * decl2.c (flag_no_builtin): Remove.
15576 (flag_no_nonansi_builtin): Likewise.
15577 (set_decl_namespace): Use fake_std_node.
15578 (validate_nonmember_using_decl): Likewise.
15579 (do_using_directive): Likewise.
15580 (handle_class_head): Likewise.
15581 * dump.c (dequeue_and_dump): Likewise.
15582 * except.c (init_exception_processing): Use std_identifier.
15583 * init.c (build_member_call): Use fake_std_node.
15584 * rtti.c (init_rtti_processing): Use std_identifier.
15585
15586 2000-10-17 Mark Mitchell <mark@codesourcery.com>
15587
15588 * cp-tree.h (back_end_hook): Remove declaration.
15589 * decl2.c (back_end_hook): Remove definition.
15590
15591 * dump.c (dequeue_and_dump): Dump TREE_USED.
15592
15593 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
15594
15595 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15596
15597 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15598
15599 * decl.c (WINT_TYPE): Define.
15600 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15601 c_size_type_node, signed_size_type_node and wint_type_node.
15602
15603 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15604
15605 * decl2.c (warn_missing_format_attribute): New variable.
15606 (lang_decode_option): Decode -Wmissing-format-attribute.
15607
15608 2000-10-16 Mark Mitchell <mark@codesourcery.com>
15609
15610 * typeck.c (qualify_type): Remove.
15611 (composite_pointer_type): Fix handling of conversions to `cv void*'.
15612
15613 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15614
15615 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15616
15617 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15618
15619 * Makefile.in (parse.c, parse.h): Create atomically.
15620
15621 2000-10-12 Mark Mitchell <mark@codesourcery.com>
15622
15623 * class.c (current_obstack): Remove.
15624 * decl.c (ggc_p): Remove.
15625 (start_decl): Don't use decl_tree_cons.
15626 (grokdeclarator): Don't use build_decl_list.
15627 (start_function): Don't use decl_tree_cons.
15628 (finish_function): Don't mess with obstacks.
15629 * decl2.c (grok_x_components): Don't use build_decl_list.
15630 * lex.c (make_call_declarator): Don't call decl_tree_cons.
15631 (implicitly_declare_fn): Don't call build_decl_list.
15632 * parse.y (frob_specs): Don't call build_decl_list or
15633 decl_tree_cons.
15634 (expr_or_declarator_intern): Don't call decl_tree_cons.
15635 (primary): Don't call build_decl_list.
15636 (fcast_or_absdcl): Likewise.
15637 (typed_declspecs): Don't call decl_tree_cons.
15638 (reserved_declspecs): Don't call build_decl_list.
15639 (declmods): Likewise.
15640 (reserved_typespecquals): Likewise.
15641 (aggr): Likewise.
15642 (new_type_id): Likewise.
15643 (cv_qualifiers): Likewise.
15644 (after_type_declarator_intern): Likewise.
15645 (notype_declarator_intern): Likewise.
15646 (absdcl_intern): Likewise.
15647 (named_parm): Likewise.
15648 * pt.c (most_specialized_class): Likewise.
15649 * repo.c (temporary_obstack): Make it a structure, not a pointer.
15650 (init_repo): Initialize it.
15651 * search.c (current_obstack): Remove.
15652 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15653
15654 2000-10-09 Richard Henderson <rth@cygnus.com>
15655
15656 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15657 (c++ language support bits for libgcc): Remove.
15658 (c++.clean): Remove cplib2.txt cleanup.
15659 * config-lang.in (headers, lib2funcs): Remove.
15660
15661 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15662 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15663 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15664 * inc/new.h, inc/typeinfo: Remove files.
15665
15666 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
15667
15668 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15669 defined.
15670 (init_decl_processing): Initialize intmax_type_node and
15671 uintmax_type_node.
15672
15673 2000-10-06 Richard Henderson <rth@cygnus.com>
15674
15675 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15676 (original_result_rtx): Remove.
15677 * decl.c (save_function_data): Don't clear x_result_rtx.
15678 (mark_lang_function): Don't mark it either.
15679 * expr.c (fixup_result_decl): Remove.
15680 * semantics.c (genrtl_named_return_value): Frob the return decl
15681 before calling emit_local_var.
15682 (genrtl_finish_function): Don't call fixup_result_decl.
15683 Always emit the jump to return_label.
15684
15685 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
15686
15687 * pt.c (lookup_template_class): Set current access for enum.
15688 (tsubst_enum): Set file & line for enum decl.
15689
15690 * spew.c (yylex): Remove unused variable.
15691
15692 2000-10-05 Richard Henderson <rth@cygnus.com>
15693
15694 * semantics.c (genrtl_finish_function): Don't init or check
15695 can_reach_end; remove noreturn and return value checks.
15696
15697 2000-10-05 Tom Tromey <tromey@cygnus.com>
15698
15699 * init.c (build_java_class_ref): Use `build_static_name' with a
15700 suffix, not a prefix, to build the class object's name.
15701
15702 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15703
15704 * cp-tree.h (access_kind): Fix comment typo.
15705 * decl2.c (grokfield): Fix diagnostic typo.
15706 * semantics.c (finish_template_type): Fix comment typo.
15707 (finish_qualified_object_call_expr): Likewise.
15708
15709 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15710
15711 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15712 tsubsting fails.
15713
15714 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15715
15716 * spew.c (frob_id): New static function.
15717 (frob_opname): Use it.
15718 (yylex): Use it.
15719
15720 2000-10-01 Mark Mitchell <mark@codesourcery.com>
15721
15722 * decl.c (lang_mark_false_label_stack): Remove.
15723 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15724
15725 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
15726
15727 * gxxint.texi: Use @email for formatting email addresses.
15728
15729 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
15730
15731 * error.c: Remove direct obstack manipulation. Replace with
15732 output_buffer-based formatting. Adjust calls to removed macros.
15733 (obstack_chunk_alloc, obstack_chunk_free): Remove.
15734 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15735 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15736
15737 2000-09-24 Mark Mitchell <mark@codesourcery.com>
15738
15739 * ir.texi: Move to ../c-tree.texi.
15740
15741 2000-09-20 Jason Merrill <jason@redhat.com>
15742
15743 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15744
15745 2000-09-21 Andreas Jaeger <aj@suse.de>
15746
15747 * errfn.c: Move declaration of cp_printer and cp_printers to ...
15748 * cp-tree.h: ... here.
15749
15750 * error.c: Remove declaration of cp_printer.
15751
15752 2000-09-20 Mark Mitchell <mark@codesourcery.com>
15753
15754 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15755
15756 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
15757
15758 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15759 users.
15760
15761 2000-09-18 Mark Mitchell <mark@codesourcery.com>
15762
15763 * decl.c (start_function): Robustify.
15764
15765 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15766
15767 * cp-tree.h (check_function_format): Accept a `status' parameter.
15768
15769 * call.c, typeck.c: Updates calls to `check_function_format'.
15770
15771 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
15772
15773 * decl2.c (handle_class_head): Always push some scope even
15774 in the error case.
15775
15776 2000-09-16 Mark Mitchell <mark@codesourcery.com>
15777
15778 * cp-tree.h (struct cp_language_function): Remove
15779 x_scope_stmt_stack and name_declared.
15780 (current_scope_stmt_stack): Remove.
15781 (function_name_declared_p): New macro.
15782 (struct lang_decl_flags): Use c_lang_decl as a base class.
15783 (context): Remove.
15784 (struct lang_decl): Replace saved_tree with context.
15785 (DECL_FRIEND_CONTEXT): Adjust accordingly.
15786 (SET_DECL_FRIEND_CONTEXT): Likewise.
15787 (DECL_VIRTUAL_CONTEXT): Likewise.
15788 (DECL_SAVED_TREE): Remove.
15789 (C_DECLARED_LABEL_FLAG): Likewise.
15790 (cplus_expand_expr_stmt): Don't declare.
15791 (add_decl_stmt): Likewise.
15792 (add_scope_stmt): Likewise.
15793 * decl.c (mark_stmt_tree): Remove.
15794 (case_compare): Likewise.
15795 (finish_case_label): Use c_add_case_label.
15796 (init_decl_processing): Set more language-specific hooks.
15797 (build_enumerator): Fix typo in comment.
15798 (cplus_expand_expr_stmt): Remove.
15799 (mark_lang_function): Use mark_c_language_function.
15800 (lang_mark_tree): Use c_mark_lang_decl.
15801 * decl2.c: Change order of inclusion.
15802 * except.c: Likewise.
15803 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
15804 back on c_expand_expr.
15805 * friend.c: Include expr.h.
15806 * init.c: Change order of inclusion.
15807 * Makefile.in: Update dependencies.
15808 * lex.h (free_lang_decl_chain): Remove.
15809 * optimize.c (maybe_clone_body): Use function_name_declared_p.
15810 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15811 it doesn't exist.
15812 (instantiate_decl): Use function_name_declared_p.
15813 * semantics.c (lang_expand_expr_stmt): Remove.
15814 (set_current_function_name_declared): Likewise.
15815 (current_function_name_declared): Likewise.
15816 (begin_compound_stmt): Use function_name_declared_p.
15817 (add_decl_stmt): Remove.
15818 (setup_vtbl_ptr): Use function_name_declared_p.
15819 (add_scope_stmt): Remove.
15820 (current_scope_stmt_stack): New function.
15821 (cp_expand_stmt): Don't handle SCOPE_STMTs.
15822 (expand_body): Use function_name_declared_p.
15823 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15824 * typeck.c: Change order of includes.
15825 (convert_sequence): Remove.
15826
15827 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
15828
15829 * lex.c (reswords): Add _Complex.
15830
15831 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15832
15833 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15834
15835 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
15836
15837 * init.c (begin_init_stmts): Don't use // comments.
15838
15839 2000-09-12 Jason Merrill <jason@redhat.com>
15840
15841 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15842 all non-extern arrays.
15843
15844 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15845 typenames, too. Downgrade complaint to pedwarn.
15846 (xref_tag): Warn about surprising behavior of 'friend struct T'.
15847 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15848 'class This::Inherited'.
15849
15850 2000-09-12 Mark Mitchell <mark@codesourcery.com>
15851
15852 * decl.c (finish_case_label): Given the LABEL_DECL a
15853 DECL_CONTEXT.
15854
15855 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
15856
15857 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15858 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15859 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15860 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15861 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15862 New macros.
15863 (sorry_for_unsupported_tree, print_scope_operator,
15864 print_left_paren, print_right_paren, print_left_bracket,
15865 print_right_bracket, print_whitespace): Likewise.
15866 (aggr_variety): Rename to class_key_or_enum.
15867 (print_type): Rename to print_type_id.
15868 (print_type_specifier_seq, print_simple_type_specifier,
15869 print_elaborated_type_specifier,
15870 print_rest_of_abstract_declarator,
15871 print_parameter_declaration_clause, print_exception_specification,
15872 print_nested_name_specifier, print_template_id,
15873 typedef_original_name, print_template_argument_list_start,
15874 print_template_argument_list_end): New functions.
15875
15876 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
15877
15878 * ir.texi: Add more documentation.
15879
15880 2000-09-11 Mark Mitchell <mark@codesourcery.com>
15881
15882 * cp-tree.h (struct saved_scope): Remove x_function_parms.
15883 (current_function_parms): Don't define.
15884 (struct cp_language_function): Remove parms_stored.
15885 (current_function_just_assigned_this): Don't define.
15886 (current_function_parms_stored): Likewise.
15887 (static_ctors): Declare.
15888 (static_dtors): Likewise.
15889 (SF_EXPAND): Don't define.
15890 (expand_start_early_try_stmts): Remove declaration.
15891 (store_parm_decls): Likewise.
15892 * decl.c (static_ctors): Don't declare.
15893 (static_dtors): Likewise.
15894 (struct binding_level): Remove this_block.
15895 (poplevel): Remove dead code.
15896 (set_block): Likewise.
15897 (mark_binding_level): Don't mark this_block.
15898 (mark_saved_scope): Don't mark x_function_parms.
15899 (init_decl_processing): Don't add current_function_parms as a GC
15900 root.
15901 (check_function_type): Change prototype.
15902 (start_function): Remove RTL-generation code.
15903 (expand_start_early_try_stmts): Remove.
15904 (store_parm_decls): Give it internal linkage. Remove
15905 RTL-generation code.
15906 (finish_function): Remove RTL-generation code.
15907 * decl2.c (static_ctors): Fix formatting.
15908 (static_dtors): Likewise.
15909 * method.c (use_thunk): Don't call store_parm_decls.
15910 (synthesize_method): Likewise.
15911 * optimize.c (maybe_clone_body): Likewise.
15912 * parse.y (fn.def2): Likewise.
15913 (.set_base_init): Likewise.
15914 (nodecls): Likewise.
15915 * pt.c (instantiate_decl): Likewise.
15916 * rtti.c (synthesize_tinfo_fn): Likewise.
15917 * semantics.c (genrtl_try_block): Simplify.
15918 (expand_body): Use genrtl_start_function and
15919 genrtl_finish_function.
15920 (genrtl_start_function): New function.
15921 (genrtl_finish_function): Likewise.
15922
15923 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15924
15925 * error.c (cp_tree_printer, case 'P'): Append break.
15926
15927 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15928
15929 * cp-tree.h (frob_opname): Declare.
15930 * parse.y (saved_scopes): New static variable.
15931 (cp_parse_init): Adjust.
15932 (do_id): If lastiddecl is NULL, do do_identifier.
15933 (operator): Save scope information.
15934 (unoperator): New reduction. Restore scope information.
15935 (operator_name): Append unoperator. Call frob_opname.
15936 * spew.c (frob_opname): Define.
15937
15938 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
15939
15940 * decl.c, rtti.c: Include defaults.h if not already included.
15941 Don't define the *_TYPE_SIZE macros.
15942
15943 2000-09-09 Mark Mitchell <mark@codesourcery.com>
15944
15945 * cp-tree.h (push_switch): Change prototype.
15946 (check_cp_case_value): Remove declaration.
15947 (decl_constant_value): Likewise.
15948 * decl.c (struct cp_switch): Add switch_stmt and cases.
15949 (case_compare): New function.
15950 (push_switch): Set switch_stmt. Initialize cases.
15951 (pop_switch): Clean up cases.
15952 (define_case_label): Rename to ...
15953 (finish_case_label): ... this. Do semantic analysis for case
15954 labels here.
15955 (start_function): Correct comment.
15956 * decl2.c (check_cp_case_value): Remove.
15957 * expr.c (do_case): Remove.
15958 * pt.c (tsubst_expr): Adjust call to finish_case_label.
15959 * semantics.c (genrtl_do_poplevel): Remove declaration.
15960 (RECHAIN_STMTS): Remove.
15961 (finish_break_stmt): Use build_break_stmt.
15962 (finish_continue_stmt): Use build_continue_stmt.
15963 (finish_switch_cond): Adjust condition here, rater than in
15964 c_expand_start_case.
15965 (finish_case_label): Remove.
15966 * typeck.c (c_expand_return): Remove.
15967 (c_expand_start_case): Likewise.
15968
15969 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
15970
15971 * ir.texi: Document type nodes.
15972
15973 2000-09-06 Mark Mitchell <mark@codesourcery.com>
15974
15975 * cp-tree.h (init_cp_semantics): Declare.
15976 (genrtl_try_block): Don't declare.
15977 (genrtl_handler): Likewise.
15978 (genrtl_catch_block): Likewise.
15979 (genrtl_ctor_stmt): Likewise.
15980 (genrtl_subobject): Likewise.
15981 (genrtl_do_poplevel): Likewise.
15982 (genrtl_named_return_value): Likewise.
15983 * lex.c (init_parse): Call init_cp_semantics.
15984 * semantics.c (genrtl_try_block): Give it internal linkage.
15985 (genrtl_handler): Likewise.
15986 (genrtl_catch_block): Likewise.
15987 (genrtl_ctor_stmt): Likewise.
15988 (genrtl_subobject): Likewise.
15989 (genrtl_do_poplevel): Likewise.
15990 (genrtl_named_return_value): Likewise.
15991 (lang_expand_stmt): Rename to ...
15992 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
15993 (init_cp_semantics): Define.
15994
15995 * decl.c (initialize_local_var): Remove RTL-generating code.
15996 * semantics.c (genrtl_try_block): Fix formatting.
15997
15998 Move statement-tree facilities from C++ to C front-end.
15999 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16000 (void_zero_node): Remove.
16001 (stmt_tree): Likewise.
16002 (scope_chain): Adjust.
16003 (language_function): Rename to cp_language_function.
16004 (cp_function_chain): Adjust.
16005 (current_stmt_tree): Remove.
16006 (last_tree): Likewise.
16007 (last_expr_type): Likewise.
16008 (struct lang_decl): Adjust.
16009 (STMT_IS_FULL_EXPR_P): Remove.
16010 (add_tree): Remove.
16011 (begin_stmt_tree): Likewise.
16012 (finish_stmt_tree): Likewise.
16013 (walk_tree_fn): Likewise.
16014 (walk_stmt_tree): Likewise.
16015 * class.c (finish_struct): Replace use of add_tree with add_stmt.
16016 * decl.c (mark_stmt_tree): Adjust type.
16017 (init_decl_processing): Don't build void_zero_node.
16018 (initialize_local_var): Adjust usage of current_stmt_tree.
16019 (finish_enum): Use add_stmt, not add_tree.
16020 (save_function_data): Adjust use of language_function.
16021 (finish_constructor_body): Use add_stmt, not add_tree.
16022 (finish_destructor_body): Likewise.
16023 (push_cp_function_context): Adjust use of language_function.
16024 (pop_cp_function_context): Likewise.
16025 (mark_lang_function): Likewise.
16026 (mark_cp_function_context): Likewise.
16027 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16028 (build_vec_init): Likewise.
16029 * semantics.c (SET_LAST_STMT): Remove.
16030 (RECHAIN_STMTS): Don't use it.
16031 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16032 (current_stmt_tree): Define.
16033 (add_tree): Remove.
16034 (finish_goto_stmt): Use add_stmt, not add_tree.
16035 (finish_expr_stmt): Likewise.
16036 (begin_if_stmt): Likewise.
16037 (finish_then_clause): Likewise.
16038 (begin_while_stmt): Likewise.
16039 (begin_do_stmt): Likewise.
16040 (finish_return_stmt): Likewise.
16041 (begin_for_stmt): Likewise.
16042 (finish_break_stmt): Likewise.
16043 (finish_continue_stmt): Likewise.
16044 (begin_switch_stmt): Likewise.
16045 (finish_case_label): Likewise.
16046 (begin_try_block): Likewise.
16047 (begin_function_try_block): Likewise.
16048 (begin_handler): Likewise.
16049 (begin_catch_block): Likewise.
16050 (begin_compound_stmt): Likewise.
16051 (begin_asm_stmt): Likewise.
16052 (finish_asm_stmt): Likewise.
16053 (finish_label_stmt): Likewise.
16054 (add_decl_stmt): Likewise.
16055 (finish_subobject): Likewise.
16056 (finish_decl_cleanup): Likewise.
16057 (finish_named_return_value): Likewise.
16058 (setup_vtbl_ptr): Likewise.
16059 (add_scope_stmt): Likewise.
16060 (finish_stmt_expr): Likewise.
16061 (prune_unused_decls): Remove.
16062 (begin_stmt_tree): Likewise.
16063 (finish_stmt_tree): Likewise.
16064 (prep_stmt): Adjust use of current_stmt_tree.
16065 (lang_expand_stmt): Likewise.
16066 * tree.c (statement_code_p): Remove.
16067 (cp_statement_code_p): New function.
16068 (walk_stmt_tree): Remove.
16069 (init_tree): Set lang_statement_code_p.
16070
16071 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
16072
16073 Integrated preprocessor.
16074
16075 * Make-lang.in, Makefile.in: Remove all references to input.c,
16076 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
16077 * gxx.gperf, hash.h, input.c: Delete.
16078 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16079 initialized properly.
16080
16081 * class.c (fixup_pending_inline): Take a tree, not a
16082 struct pending_inline *. All callers changed.
16083 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16084 RID_PROTECTED entries in ridpointers[] array here.
16085 * decl.c (duplicate_decls): Do not refer to struct
16086 pending_inline.
16087 (record_builtin_type, init_decl_processing): Use RID_MAX not
16088 CP_RID_MAX.
16089 (grokdeclarator): Use C_IS_RESERVED_WORD.
16090 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16091 cpplib.
16092 (grok_x_components): Do not inspect pending_inlines chain.
16093
16094 * cp-tree.h (struct lang_identifier): Add rid_code entry.
16095 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16096 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16097 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16098 TIME_IDENTIFIER_FILEINFO): Kill.
16099 Update prototypes.
16100 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
16101 single 32-bit word.
16102 * parse.y: Call do_pending_inlines unconditionally.
16103 reinit_parse_for_method is now snarf_method. fn.defpen is no
16104 longer necessary. Remove unnecessary <itype> annotation on
16105 SCOPE. Do not refer to end_of_file or struct pending_inline.
16106 * semantics.c (begin_inline_definitions): Call
16107 do_pending_inlines unconditionally.
16108
16109 * lex.c: Remove all code now shared with C front end.
16110 Initialize cpplib properly if USE_CPPLIB. Put reserved words
16111 into the get_identifier table. Rewrite pragma handling to
16112 work with the registry. Move code to save tokens for later
16113 processing to spew.c.
16114
16115 * spew.c: Rewrite everything in terms of token streams instead
16116 of text. Move routines here from lex.c / input.c as
16117 appropriate. GC-mark trees hanging off the pending inlines
16118 chain.
16119
16120 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16121
16122 * NEWS: Mention that the named return value extension has been
16123 deprecated.
16124 * cp-tree.h (original_result_rtx): Define.
16125 (TREE_REFERENCE_EXPR): Remove.
16126 (DECL_VPARENT): Likewise.
16127 (pushdecl_nonclass_level): Likewise.
16128 (store_return_init): Likewise.
16129 (reinit_lang_specific): Likewise.
16130 (genrtl_named_return_value): Change prototype.
16131 * decl.c (original_result_rtx): Remove.
16132 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16133 Do not generate RTL for local variables here.
16134 (store_return_init): Remove.
16135 * semantics.c (genrtl_named_return_value): Simplify. Fold in
16136 store_return_init.
16137 (finish_named_return_value): Adjust accordingly. Warn that this
16138 extension is deprecated.
16139 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16140
16141 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16142
16143 * pt.c (type_unification_real): Replace switch with if.
16144 (unify): Tsubst non-type parms before comparing.
16145
16146 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16147
16148 * error.c (dump_typename): New function, broken out of ...
16149 (dump_type): ... here. Use it.
16150 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16151
16152 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16153
16154 * init.c (build_offset_ref): Deal with namespace scoped
16155 TEMPLATE_ID_EXPRs.
16156
16157 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16158
16159 * class.c (resolve_address_of_overloaded_function): Add
16160 explanation message.
16161 * decl.c (define_case_label): Reformat explanation.
16162 * decl2.c (finish_static_data_member_decl): Likewise.
16163 (grokfield): Likewise.
16164 * friend.c (do_friend): Likewise.
16165
16166 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
16167
16168 * tree.c (walk_tree): Expose tail recursion.
16169 (walk_stmt_tree): New function.
16170 * cp-tree.h: Prototype walk_stmt_tree.
16171 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16172 the BLOCKs directly. If a BLOCK has no variables after
16173 pruning, discard it.
16174 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
16175 restore the line number.
16176
16177 2000-09-05 Mark Mitchell <mark@codesourcery.com>
16178
16179 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16180 (pt.o): Remove dependency on HTAB_H.
16181 * cp-tree.h: Include hashtab.h.
16182 (walk_tree): Change prototype.
16183 (walk_tree_without_duplicates): New function.
16184 * decl.c (check_default_argument): Use it.
16185 * optimize.c (remap_decl): Adjust calls to walk_tree.
16186 (copy_body): Likewise.
16187 (expand_calls_inline): Likewise.
16188 (calls_setjmp_p): Use walk_tree_without_duplicates.
16189 * pt.c: Don't include hashtab.h.
16190 (for_each_template_parm): Use walk_tree_without_duplicates.
16191 * semantics.c (finish-stmt_tree): Likewise.
16192 (expand_body): Likewise.
16193 * tree.c (walk_tree): Add additional parameter.
16194 (walk_tree_without_duplicates): New function.
16195 (count_trees): Use it.
16196 (verify_stmt_tree): Adjust call to walk_tree.
16197 (find_tree): Use walk_tree_without_duplicates.
16198 (no_linkage_check): Likewise.
16199 (break_out_target_exprs): Adjust call to walk_tree.
16200 (cp_unsave): Likewise.
16201
16202 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16203
16204 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16205 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16206 * cp-tree.h (TYPE_BINFO): Adjust comment.
16207 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16208 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16209 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16210 (TYPE_TEMPLATE_INFO): Likewise.
16211 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16212 * class.c (push_nested_class): Likewise.
16213 * decl.c (lookup_name_real): Likewise.
16214 (grokdeclarator): Likewise.
16215 (grok_op_properties): Likewise.
16216 (xref_tag): Likewise.
16217 (xref_basetypes): Likewise.
16218 * decl2.c (constructor_name_full): Likewise.
16219 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16220 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16221 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16222 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16223 (dump_type_suffix): Likewise.
16224 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16225 instead.
16226 (get_aggr_from_typedef): Likewise.
16227 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16228 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16229 (write_template_parm): Likewise.
16230 (write_template_template_parm): Check tree code instead of
16231 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16232 * method.c (build_overload_nested_name): Add
16233 BOUND_TEMPLATE_TEMPLATE_PARM.
16234 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16235 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16236 * pt.c (convert_template_argument): Check tree code instead of
16237 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16238 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16239 (for_each_template_parm): Adjust comment.
16240 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
16241 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16242 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
16243 template_args_equal to compare template template parameter cases.
16244 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16245 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16246 instead.
16247 * tree.c (copy_template_template_parm): Decide whether to create
16248 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16249 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16250 (copy_tree_r): Likewise.
16251 * typeck.c (comptypes): Likewise. Check tree code instead of
16252 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16253
16254 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
16255
16256 * decl.c (finish_function): Move the code for handling functions
16257 marked with the constructor and destructor attributes inside the
16258 expand_p block.
16259
16260 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16261
16262 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16263
16264 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16265
16266 * pt.c (lookup_template_class): Remove abort.
16267 * tree.c (get_type_decl): Allow error_mark_node.
16268
16269 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16270
16271 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16272 TEMPLATE_ID_EXPRs.
16273
16274 2000-09-03 Mark Mitchell <mark@codesourcery.com>
16275
16276 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16277 new ABI mangling.
16278
16279 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16280
16281 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16282 union tag mismatch error reporting.
16283
16284 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16285
16286 * call.c (build_scoped_method_call): Check it is not a namespace.
16287
16288 2000-08-30 Jason Merrill <jason@redhat.com>
16289
16290 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16291
16292 * tree.c (bot_manip): Check TREE_CONSTANT rather than
16293 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
16294 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16295
16296 * decl.c (start_function): Always call make_function_rtl.
16297
16298 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16299
16300 * semantics.c (prune_unused_decls): New function.
16301 (finish_stmt_tree): Call it via walk_tree.
16302
16303 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16304
16305 * class.c (build_secondary_vtable): Constify a char *.
16306 * decl.c (init_decl_processing): Initialize function_id_node,
16307 pretty_function_id_node, and func_id_node.
16308 * input.c (struct input_source): Constify 'str'.
16309 (feed_input): Constify first argument.
16310 * mangle.c (write_identifier): Constify argument.
16311 * pt.c (mangle_class_name_for_template): Constify argument.
16312
16313 2000-08-29 Mark Mitchell <mark@codesourcery.com>
16314
16315 * typeck.c (mark_addressable): Remove code that pokes around in
16316 RTL.
16317
16318 2000-08-28 Jason Merrill <jason@redhat.com>
16319
16320 * lex.c (file_name_nondirectory): Move to toplev.c.
16321
16322 * cp-tree.h (LOCAL_CLASS_P): New macro.
16323 * class.c (finish_struct_1): Use it.
16324
16325 2000-08-27 Alex Samuel <samuel@codesourcery.com>
16326
16327 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16328 (write_encoding): Pass another argument to write_name.
16329 (write_name): Add ignore_local_scope parameter. Fix handling of
16330 local names.
16331 (write_nested_name): Use write_unqualified_name.
16332 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
16333 (write_template_prefix): Use write_unqualified_name.
16334 (write_component): Remove.
16335 (write_local_name): Add parameter. Use direct local entity to
16336 discriminator calculation.
16337 (write_class_enum_type): Pass another argument to write_name.
16338 (write_template_template_arg): Likewise.
16339 (make_guard_variable): Likewise.
16340
16341 2000-08-27 Jason Merrill <jason@redhat.com>
16342
16343 * decl.c (pushdecl): Matching decls for local externs are found in
16344 the current level. Propagate linkage information from previous
16345 declarations.
16346
16347 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
16348
16349 * ir.texi (Expressions): Fix typo.
16350
16351 2000-08-25 Greg McGary <greg@mcgary.org>
16352
16353 * tree.c (init_tree): Use ARRAY_SIZE.
16354
16355 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16356
16357 * error.c (cp_tree_printer): Rework.
16358
16359 2000-08-25 Mark Mitchell <mark@codesourcery.com>
16360
16361 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16362 dyn-string.o.
16363 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16364 (cp-demangle.o): Remove target.
16365 (dyn-string.o): Likewise.
16366
16367 * decl.c (grokfndecl): Require that `main' return an `int'.
16368 * mangle.c (write_encoding): Don't mangle return types for
16369 conversion functions.
16370
16371 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16372
16373 * error.c (tree_formatting_info): New data type.
16374 (tree_being_formatted): New macro.
16375 (tree_formatting_flags): Likewise.
16376 (put_whitespace): Likewise.
16377 (print_tree_identifier): Likewise.
16378 (print_identifier): Likewise.
16379 (cp_tree_printer, print_function_argument_list, print_declaration,
16380 print_expression, print_function_declaration,
16381 print_function_parameter, print_type, print_cv_qualifier): New
16382 functions.
16383 (init_error): Initialize lang_printer.
16384
16385 2000-08-24 Jason Merrill <jason@redhat.com>
16386
16387 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16388 adjustment necessary.
16389
16390 2000-08-24 Greg McGary <greg@mcgary.org>
16391
16392 * cp-tree.h (MAIN_NAME_P): Remove macro.
16393
16394 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
16395
16396 * error.c (print_instantiation_context): Don't forget to flush the
16397 buffer.
16398
16399 2000-08-23 Jason Merrill <jason@redhat.com>
16400
16401 * typeck.c (build_ptrmemfunc): Save the input pmf.
16402
16403 * method.c (process_modifiers): Use same_type_p.
16404
16405 2000-08-23 Mark Mitchell <mark@codesourcery.com>
16406
16407 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16408 * mangle.c (write_function_type): Change prototype.
16409 (write_encoding): Don't mangle return types for
16410 constructors or destructors.
16411 (write_type): Adjust call to write_function_type.
16412 * pt.c (instantiate_template): Instantiate alternate entry points
16413 when instantiating the main function.
16414
16415 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16416
16417 * error.c (cp_print_error_function): Don't use embedded '\n' in
16418 output_printf.
16419
16420 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16421
16422 * decl.c (init_decl_processing): Remove bogus initialization.
16423 * error.c (lang_print_error_function): Restore here.
16424 (init_error): Initialize print_error_function.
16425
16426 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16427
16428 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16429
16430 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
16431
16432 * Makefile.in (error.o): Depends on diagnostic.h
16433
16434 * cp-tree.h (problematic_instantiation_changed,
16435 record_last_problematic_instantiation, current_instantiation,
16436 print_instantiation_context): Declare.
16437 (maybe_print_template_context): Remove.
16438
16439 * decl.c (init_decl_processing): Set print_error_function to NULL.
16440 (lang_print_error_function): Remove, since we're using a new
16441 machinery.
16442
16443 * error.c: #include diagnostic.h
16444 (function_category): New function.
16445 (cp_diagnostic_starter): Likewise.
16446 (cp_diagnostic_finalizer): Likewise.
16447 (cp_print_error_function): Likewise.
16448 (maybe_print_instantiation_context): Likewise.
16449 (print_instantiation_full_context): Likewise.
16450 (print_instantiation_partial_context): Likewise.
16451 (print_instantiation_context): Define.
16452 (init_error): Initialize diagnostic pager and finalizer.
16453
16454 * pt.c (problematic_instantiation_changed): Define.
16455 (record_last_problematic_instantiation): Likewise.
16456 (current_instantiation): Likewise.
16457 (maybe_print_template_context): Remove.
16458 (print_template_context): Likewise.
16459 (current_tinst_level): Make static to reflect Brendan Kehoe's
16460 change of 1995-04-13.
16461 (push_tinst_level): Call print_instantiation_context.
16462
16463 2000-08-21 Nix <nix@esperi.demon.co.uk>
16464
16465 * lang-specs.h: Do not process -o or run the assembler if
16466 -fsyntax-only.
16467
16468 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
16469
16470 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16471 variables.
16472 * decl2.c (lang_decode_option): Disable gettext attributes for
16473 -ansi.
16474
16475 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
16476
16477 * lex.c (lang_init_options): Default diagnostic message maximum
16478 length to 80, when line-wrapping.
16479
16480 2000-08-20 Mark Mitchell <mark@codesourcery.com>
16481
16482 * class.c (build_vtbl_initializer): Clear the entire
16483 vtbl_init_data. Start keeping track of the functions for which we
16484 have created vcall offsets here.
16485 (dfs_build_vcall_offset_vtbl_entries): Remove.
16486 (build_vcall_offset_vtbl_entries): Reimplement.
16487 (add_vcall_offset_vtbl_entries_r): New function.
16488 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
16489 computing when vcall offsets are necessary.
16490
16491 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16492
16493 * decl.c (member_function_or_else): Use cp_error ... %T.
16494 (grokdeclarator): Likewise.
16495 (start_method): Likewise.
16496 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16497
16498 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16499
16500 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16501 TYPE_DECLs.
16502
16503 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16504
16505 * cp-tree.h (PTRMEM_OK_P): New macro.
16506 (itf_ptrmem_ok): New enumeration value.
16507 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16508 argument. Diagnose implicit pointer to member.
16509 (instantiate_type): Don't diagnose implicit pointer to member
16510 here. Pass itf_ptrmem_ok if ok. Adjust calls to
16511 resolve_address_of_overloaded_function.
16512 * init.c (build_offset_ref): Set PTRMEM_OK_P.
16513 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16514 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16515 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16516 (build_unary_op): Deal with single non-static member in
16517 microsoft-land.
16518
16519 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16520
16521 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16522
16523 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16524
16525 * cp-tree.h (enum_name_string): Remove prototype.
16526 (report_case_error): Remove prototype.
16527 * cp/typeck2.c (enum_name_string): Remove.
16528 (report_case_error): Remove.
16529 * error.c (dump_expr): Deal with enum values directly.
16530 Correctly negate integer constant.
16531
16532 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16533
16534 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16535 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16536 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16537 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16538 (__cxa_vec_new): Use __cxa_vec_new2.
16539 (__cxa_vec_delete): Use __cxa_vec_delete2.
16540
16541 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16542
16543 * vec.cc (__cxa_vec_new): Set "C" linkage.
16544 (__cxa_vec_ctor): Likewise.
16545 (__cxa_vec_cctor): Likewise.
16546 (__cxa_vec_dtor): Likewise.
16547 (__cxa_vec_delete): Likewise.
16548 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16549 (__cxa_vec_ctor): Likewise.
16550 (__cxa_vec_cctor): Likewise.
16551 (__cxa_vec_dtor): Likewise.
16552 (__cxa_vec_delete): Likewise.
16553
16554 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16555
16556 * class.c (instantiate_type): Reinstate local variable
16557 deleted in previous change.
16558
16559 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16560 itf_no_attributes.
16561
16562 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16563
16564 * cp-tree.h (instantiate_type_flags): New enumeration.
16565 (instantiate_type): Change parameter.
16566 * class.c (instantiate_type): Adjust prototype. Adjust.
16567 * call.c (standard_conversion): Adjust instantiate_type call.
16568 (reference_binding): Likewise.
16569 (build_op_delete_call): Likewise.
16570 (convert_like_real): Likewise.
16571 * cvt.c (cp_convert_to_pointer): Likewise.
16572 (convert_to_reference): Likewise.
16573 * pt.c (convert_nontype_argument): Likewise.
16574 * typeck.c (build_binary_op): Likewise.
16575 (build_ptrmemfunc): Likewise.
16576 (convert_for_assignment): Likewise.
16577
16578 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16579
16580 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16581 (current_aggr): Define.
16582 * decl.c (grokdeclarator): Make sure a friend class is an
16583 elaborated type specifier.
16584 * parse.y (current_aggr): Remove static definition.
16585 (cp_parse_init): Adjust.
16586 (structsp): Clear and restore current_aggr.
16587 (component_decl_list): Clear current_aggr.
16588
16589 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16590 aggregate tag on the typename's context.
16591
16592 * pt.c (tsubst_friend_class): Return error_mark_node, if
16593 parms becomes NULL.
16594 (instantiate_class_template): Ignore error_mark_node friend types.
16595
16596 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
16597
16598 * cvt.c (warn_ref_binding): New static function, broken out of ...
16599 (convert_to_reference): ... here. Use it.
16600
16601 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16602
16603 * parse.y (template_arg): Add rule for template qualified with
16604 global scope.
16605
16606 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16607
16608 * decl2.c (add_function): Reorganize.
16609 (arg_assoc): Do not consider function template decls.
16610
16611 2000-08-11 Jason Merrill <jason@redhat.com>
16612
16613 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16614 looking inside.
16615
16616 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16617
16618 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16619 (lookup_nested_tag): Likewise.
16620
16621 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16622 can be produced.
16623
16624 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16625
16626 * parse.y (named_complex_class_head_sans_basetype): Remove
16627 always true if.
16628
16629 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16630
16631 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16632 explicit TEMPLATE_ID_EXPR args.
16633 (build_expr_from_tree, case CALL_EXPR): Likewise.
16634
16635 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16636
16637 * decl.c (check_tag_decl): Diagnose typename's which don't
16638 declare anything.
16639
16640 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
16641
16642 * init.c (build_aggr_init): Reject bogus array initializers
16643 early.
16644
16645 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16646
16647 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16648 runtime.
16649 * cp/tinfo.cc (__dynamic_cast): Likewise.
16650 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16651
16652 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16653
16654 * cvt.c (convert_to_pointer_force): Fix error message when
16655 attempting to cast from ambiguous base.
16656
16657 2000-08-08 Jason Merrill <jason@redhat.com>
16658
16659 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16660 (tsubst_template_arg_vector): Likewise.
16661
16662 * decl2.c (build_anon_union_vars): Choose the largest field; don't
16663 assume that one will be as large as the union.
16664
16665 2000-08-07 Kazu Hirata <kazu@hxi.com>
16666
16667 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16668 * decl.c (pop_labels): Likewise.
16669
16670 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
16671
16672 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16673 specifications.
16674 (__pointer_to_member_type_info): Likewise.
16675 (__base_class_info): Likewise.
16676 (__class_type_info): Likewise.
16677 (__si_class_type_info): Likewise.
16678 (__vmi_class_type_info): Likewise.
16679 * tinfo.cc (__si_class_type_info::__do_find_public_src):
16680 Changed member names to match specifications.
16681 (__vmi_class_type_info::__do_find_public_src): Likewise.
16682 (__si_class_type_info::__do_dyncast): Likewise.
16683 (__vmi_class_type_info::__do_dyncast): Likewise.
16684 (__si_class_type_info::__do_upcast): Likewise.
16685 (__vmi_class_type_info::__do_upcast): Likewise.
16686 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16687 (__pbase_type_info::__pointer_catch): Likewise.
16688 (__pointer_type_info::__pointer_catch): Likewise.
16689 (__pointer_to_member_type_info::__pointer_catch): Likewise.
16690
16691 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
16692
16693 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16694 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16695 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16696
16697 2000-08-04 Mark Mitchell <mark@codesourcery.com>
16698
16699 * cp-tree.h (add_method): Change prototype.
16700 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
16701 Don't double the size of the method vector in the error case.
16702 (handle_using_decl): Adjust call to add_method.
16703 (add_implicitly_declared_members): Likewise.
16704 (clone_function_decl): Likewise.
16705 * decl2.c (check_classfn): Likewise.
16706 * semantics.c (finish_member_declaration): Likewise.
16707
16708 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
16709
16710 * decl.c (flag_isoc94): New variable.
16711
16712 2000-08-02 Jason Merrill <jason@redhat.com>
16713
16714 * pt.c (do_type_instantiation): Add complain parm; don't complain
16715 if called recursively.
16716 * cp-tree.h, parse.y: Adjust.
16717
16718 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
16719
16720 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16721 -Wno-strict-prototypes.
16722
16723 * g++spec.c: Adjust type of second argument to
16724 lang_specific_driver, and update code as necessary.
16725
16726 * cp-tree.h: Don't prototype min_precision here.
16727 (my_friendly_assert): Cast expression to void.
16728 * semantics.c (do_poplevel): Initialize scope_stmts.
16729
16730 2000-08-02 Mark Mitchell <mark@codesourcery.com>
16731
16732 * cp-tree.h (DECL_NEEDED_P): Tweak.
16733
16734 2000-07-28 Jason Merrill <jason@redhat.com>
16735
16736 * lang-specs.h: Use %i in rule for .ii files.
16737
16738 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
16739
16740 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16741
16742 2000-07-30 Mark Mitchell <mark@codesourcery.com>
16743
16744 Allow indirect primary bases.
16745 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
16746 primary_base.
16747 (CLASSTYPE_VFIELD_PARENT): Remove.
16748 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16749 (BINFO_PRIMARY_BINFO): Remove.
16750 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16751 (BINFO_VBASE_PRIMARY_P): Likewise.
16752 (BINFO_PRIMARY_BASE_OF): New macro.
16753 (BINFO_INDIRECT_PRIMARY_P): Likewise.
16754 (get_primary_binfo): New function.
16755 * decl.c (lang_mark_tree): Make lang_type::primary_base.
16756 * class.c (vcall_offset_data_s): Rename to ...
16757 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
16758 and add ctor_vtbl_p.
16759 (get_derived_offset): Use get_primary_binfo.
16760 (dfs_mark_primary_bases): Adjust handling of virtual primary
16761 bases.
16762 (mark_primary_bases): Likewise.
16763 (set_primary_base): Take a binfo, not an integer, as a
16764 representation of the primary base.
16765 (indirect_primary_base_p): Remove.
16766 (determine_primary_base): Adjust for indirect primary bases.
16767 (dfs_find_final_overrider): Fix typo in coment.
16768 (update_vtable_entry_for_fn): Use get_primary_binfo.
16769 (layout_nonempty_base_or_field): Tweak.
16770 (build_base_fields): Adjust for new primary base semantics.
16771 (dfs_propagate_binfo_offsets): Remove.
16772 (propagate_binfo_offsets): Rewrite.
16773 (dfs_set_offset_for_shared_vbases): Remove.
16774 (layout_virtual_bases): Don't use it.
16775 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16776 ABI.
16777 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16778 CLASSTYPE_VFIELD_PARENT.
16779 (dfs_get_primary_binfo): New function.
16780 (get_primary_binfo): Likewise.
16781 (dump_class_hierarchy_r): Tweak printing of primary bases.
16782 (build_vtbl_initializer): Fix typo in comments. Use
16783 vtbl_init_data.
16784 (build_vcall_and_vbase_vtbl_entries): Likewise.
16785 (build_vbaes_offset_vtbl_entries): Likewise.
16786 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16787 BV_VCALL_INDEX to handle indirect primary bases.
16788 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16789 (build_rtti_vtbl_entries): Likewise.
16790 * search.c (get_shared_vbase_if_not_primary): Tweak.
16791 (find_vbase_instance): Likewise.
16792 (binfo_for_vtable): Simplify.
16793 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16794 (make_binfo): Make it have 11 entries.
16795
16796 2000-07-30 Alex Samuel <samuel@codesourcery.com>
16797
16798 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16799 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16800 ascertaining primaryness.
16801 (G): Remove template_args.
16802 (decl_is_template_id): New function.
16803 (write_encoding): Use decl_is_template_id.
16804 (write_name): Likewise. Handle type_decls. Get main variant of
16805 type decls.
16806 (write_nested_name): Likewise.
16807 (write_prefix): Likewise.
16808 (write_template_prefix): Likewise.
16809 (write_special_name_constructor): Remove defunct production from
16810 comment.
16811 (write_bare_function_type): Remove comment about absent parameter.
16812 (write_template_template_arg): Add missing grammar production to
16813 comment.
16814
16815 2000-07-27 Jason Merrill <jason@redhat.com>
16816
16817 * decl.c (duplicate_decls): If common_type produces a non-typedef
16818 type for a typedef, just use the old type.
16819
16820 2000-07-27 Mark Mitchell <mark@codesourcery.com>
16821
16822 * cp-tree.h (function_depth): Declare.
16823 (verify_stmt_tree): Likewise.
16824 (find_tree): Likewise.
16825 * decl.c (function_depth): Give it external linkage.
16826 * optimize.c (optimize_function): Increment and decrement it.
16827 * tree.c (verify_stmt_tree_r): New function.
16828 (verify_stmt_tree): Likewise.
16829 (find_tree_r): Likewise.
16830 (find_tree): Likewise.
16831
16832 2000-07-27 Jason Merrill <jason@redhat.com>
16833
16834 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16835 TYPE_PTRMEMFUNC_P.
16836 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16837
16838 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16839
16840 * decl.c (start_cleanup_fn): Mark the function as `inline'.
16841 * decl2.c (get_guard): Call cp_finish_decl, not
16842 rest_of_decl_compilation, for local guards.
16843 * lex.c (do_identifier): Remove unused variable.
16844
16845 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
16846
16847 * parse.y: Add missing ';'.
16848
16849 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16850
16851 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16852 of `extern "C++"'.
16853
16854 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16855
16856 Kill strict_prototype. Backwards compatibility only for
16857 non NO_IMPLICIT_EXTERN_C systems.
16858 * cp-tree.h (flag_strict_prototype): Remove.
16859 (strict_prototype): Remove.
16860 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16861 * decl.c (maybe_push_to_top_level): Adjust.
16862 (pop_from_top_level): Adjust.
16863 (decls_match): Only allow sloppy parm matching for ancient
16864 system headers.
16865 (init_decl_processing): Adjust.
16866 (grokdeclarator): Adjust.
16867 * decl2.c (flag_strict_prototype): Remove.
16868 (strict_prototype): Remove.
16869 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16870 (lang_f_options): Remove "strict-prototype".
16871 (unsupported-options): Add "strict-prototype".
16872 * lex.c (do_identifier): Adjust.
16873 (do_scoped_id): Adjust.
16874 * parse.y (empty_parms): Adjust.
16875 * class.c (push_lang_context): Adjust.
16876 (pop_lang_context): Adjust.
16877 * typeck.c (comp_target_parms): Adjust.
16878
16879 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16880
16881 * decl.c (poplevel): Deal with anonymous variables at for scope.
16882 (maybe_inject_for_scope_var): Likewise.
16883
16884 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
16885
16886 * decl.c: Remove all signal handling code, now done in toplev.c.
16887
16888 2000-07-23 Mark Mitchell <mark@codesourcery.com>
16889
16890 * decl.c (make_rtl_for_nonlocal_decl): Rework.
16891
16892 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16893 correctly.
16894
16895 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
16896
16897 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16898 Define my_friendly_assert and my_friendly_abort as macros
16899 which may call friendly_abort. Prototype friendly abort, not
16900 my_friendly_abort or my_friendly_assert.
16901 * decl.c (signal_catch): Report the signal caught in the error
16902 message. Call fatal directly.
16903 * typeck2.c (ack, my_friendly_assert): Delete.
16904 (my_friendly_abort): Rename to friendly_abort. Expect file,
16905 line, and function parameters. Report the abort code, then
16906 call fancy_abort. Do not mask an abort if errors have
16907 already occurred.
16908
16909 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
16910
16911 * typeck.c (comp_target_parms): Remove obsolete parameter.
16912 (comp_target_types): Adjust.
16913
16914 2000-07-17 Jason Merrill <jason@redhat.com>
16915
16916 * typeck.c (mark_addressable): Never set TREE_USED.
16917 * call.c (build_call): Don't abort on calls to library functions
16918 that have been declared normally.
16919
16920 * typeck.c (build_binary_op): Fix grammar in warning.
16921
16922 * exception.cc (__eh_free): Fix prototype.
16923
16924 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16925
16926 * decl.c (pushdecl): Handle seeing an OVERLOAD in
16927 IDENTIFIER_NAMESPACE_VALUE.
16928
16929 2000-07-16 Mark Mitchell <mark@codesourcery.com>
16930
16931 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16932 * method.c (use_thunk): Correct handling of vcall offsets.
16933
16934 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
16935
16936 * .cvsignore: parse.h and parse.c have no cp- prefix.
16937
16938 2000-07-13 Mark Mitchell <mark@codesourcery.com>
16939
16940 * .cvsignore: New file.
16941
16942 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
16943
16944 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
16945
16946 2000-07-12 Mark Mitchell <mark@codesourcery.com>
16947
16948 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16949 * parse.c: Remove.
16950 * parse.h: Likewise.
16951
16952 2000-07-11 Mark Mitchell <mark@codesourcery.com>
16953
16954 * class.c (layout_class_type): Add pointers to virtual bases after
16955 base classes under the old ABI.
16956
16957 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
16958
16959 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16960 (finish_continue_stmt): Likewise.
16961 (begin_for_stmt): Remove call to note_level_for_for.
16962 (finish_goto_stmt): Change call from build_min_nt
16963 to build_stmt.
16964 (finish_expr_stmt): Likewise.
16965 (begin_if_stmt): Likewise.
16966 (begin_while_stmt): Likewise.
16967 (finish_while_stmt): Likewise.
16968 (finish_return_stmt): Likewise.
16969 (begin_for_stmt): Likewise.
16970 (finish_for_stmt): Likewise.
16971 (finish_break_stmt): Likewise.
16972 (begin_switch_stmt): Likewise.
16973 (finish_case_label): Likewise.
16974 (genrtl_try_block): Likewise.
16975 (begin_try_block): Likewise.
16976 (begin_handler): Likewise.
16977 (begin_compound_stmt): Likewise.
16978 (finish_asm_stmt): Likewise.
16979 (finish_label_stmt): Likewise.
16980 (add_decl_stmt): Likewise.
16981 (finish_subobject): Likewise.
16982 (finish_decl_cleanup): Likewise.
16983 (finish_named_return_value): Likewise.
16984 (setup_vtbl_ptr): Likewise.
16985 (add_scope_stmt): Likewise.
16986 * decl.c (finish_constructor_body): Likewise.
16987 (finish_destructor_body): Likewise.
16988 * optimize.c (copy_body_r): Likewise.
16989 (initialize_inlined_parameters): Likewise.
16990 (declare_return_variable): Likewise.
16991 (expand_call_inline): Likewise.
16992
16993 2000-07-10 Jakub Jelinek <jakub@redhat.com>
16994
16995 * semantics.c (expand_body): Sync interface information
16996 at the end of function body expansion.
16997
16998 2000-07-09 Jason Merrill <jason@redhat.com>
16999
17000 * init.c (build_new_1): Bail early if the call to new fails.
17001
17002 * decl.c (compute_array_index_type): Check specifically for
17003 an INTEGER_CST, not just TREE_CONSTANT.
17004
17005 * decl.c (duplicate_decls): Don't call duplicate_decls on
17006 the DECL_TEMPLATE_RESULT.
17007 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17008 codes.
17009
17010 * error.c (dump_template_bindings): Don't crash if we had an
17011 invalid argument list.
17012
17013 * typeck.c (c_expand_start_case): Do narrowing here.
17014 * semantics.c (finish_switch_cond): Not here.
17015
17016 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
17017
17018 * parse.y (asm_clobbers): Do string concatenation.
17019
17020 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17021
17022 * decl.c (pushtag): Don't put local classes in template functions
17023 on the local_classes list.
17024
17025 2000-07-04 Scott Snyder <snyder@fnal.gov>
17026
17027 * decl2.c (get_guard): Add missing return for old ABI local
17028 variable case.
17029
17030 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17031
17032 * cp-tree.h (char_type_p): New function.
17033 * decl.c (init_decl_processing): Don't initialize
17034 signed_wchar_type_node or unsigned_wchar_type_node.
17035 (complete_array_type): Handle brace-enclosed string-constants.
17036 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17037 * tree.c (char_type_p): New function.
17038 * typeck2.c (digest_init): Use char_type_p.
17039
17040 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17041
17042 * pt.c (tsubst): Don't layout type, if it's error_mark.
17043
17044 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17045
17046 * pt.c (instantiate_pending_templates): Reset template level.
17047
17048 2000-07-05 Jason Merrill <jason@redhat.com>
17049
17050 * call.c (joust): Don't complain about `operator char *()' beating
17051 `operator const char *() const'.
17052
17053 2000-07-04 scott snyder <snyder@fnal.gov>
17054 Jason Merrill <jason@redhat.com>
17055
17056 * repo.c (repo_get_id): Handle the case where a class with virtual
17057 bases has a null TYPE_BINFO_VTABLE.
17058
17059 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
17060 Jason Merrill <jason@redhat.com>
17061
17062 * parse.y (member_init): Just pass in the type.
17063 * init.c (expand_member_init): Handle getting a type.
17064
17065 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17066 Jason Merrill <jason@redhat.com>
17067
17068 * decl.c (finish_function): Warn if a function has no return
17069 statement.
17070 Suggested by Andrew Koenig.
17071 * typeck.c (check_return_expr): Do set current_function_returns_value
17072 if we got an error_mark_node.
17073
17074 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17075
17076 * decl2.c (push_decl_namespace): Push the original namespace.
17077
17078 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17079
17080 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17081 * semantics.c (begin_class_definition): Clear it.
17082
17083 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
17084
17085 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17086 (genrtl_expr_stmt): Likewise.
17087 (genrtl_decl_stmt): Likewise.
17088 (genrtl_if_stmt): Likewise.
17089 (genrtl_while_stmt): Likewise.
17090 (genrtl_do_stmt): Likewise.
17091 (genrtl_return_stmt): Likewise.
17092 (genrtl_for_stmt): Likewise.
17093 (genrtl_break_stmt): Likewise.
17094 (genrtl_continue_stmt): Likewise.
17095 (genrtl_scope_stmt): Likewise.
17096 (genrtl_switch_stmt): Likewise.
17097 (genrtl_case_label): Likewise.
17098 (genrtl_begin_compound_stmt): Likewise.
17099 (genrtl_finish_compound_stmt): Likewise.
17100 (genrtl_compound_stmt): Likewise.
17101 (genrtl_asm_stmt): Likewise.
17102
17103 * init.c (begin_init_stmts): Remove call to
17104 genrtl_begin_compound_stmt.
17105 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17106
17107 * semantics.c (lang_expand_stmt): Changed call to
17108 genrtl_compound_stmt to ignore return value.
17109
17110 2000-07-02 Mark Mitchell <mark@codesourcery.com>
17111
17112 * mangle.c (canonicalize_for_substitution): Return the canonical
17113 variant of a type.
17114
17115 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17116 TYPE_DECL.
17117 * typeck.c (commonparms): Remove obstack manipulations.
17118
17119 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
17120
17121 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17122
17123 * Makefile.in (OBJS): Added ../c-semantics.o.
17124 (OBJDEPS): Likewise.
17125
17126 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17127 ../c-common.h.
17128 (struct stmt_tree): Added comment.
17129 (current_function_name_declared): Removed.
17130 (stmts_are_full_exprs_p): Likewise.
17131 (genrtl_do_pushlevel): Likewise.
17132 (genrtl_clear_out_block): Likewise.
17133 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17134 (DECL_ANON_UNION_ELEMS): Likewise.
17135 (emit_local_var): Likewise.
17136 (make_rtl_for_local_static): Likewise.
17137 (do_case): Likewise.
17138 (expand_stmt): Likewise.
17139 (genrtl_decl_cleanup): Likewise.
17140 (c_expand_asm_operands): Likewise.
17141 (c_expand_return): Likewise.
17142 (c_expand_start_case): Likewise.
17143
17144 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17145 (emit_local_var): Likewise.
17146 (initialize_local_var): Change reference to
17147 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17148 Change reference to stmts_are_full_exprs_p to
17149 current_stmt_tree->stmts_are_full_exprs_p.
17150 (push_cp_function_context): Likewise.
17151
17152 * expect.c (expand_throw): Change reference to
17153 stmts_are_full_exprs_p.
17154
17155 * init.c (build_aggr_init): Change reference to
17156 stmts_are_full_exprs_p.
17157 (build_vec_init): Likewise.
17158
17159 * optimize.c (maybe_clone_body): Change reference to
17160 current_function_name_declared to
17161 cp_function_chain->name_declared.
17162
17163 * pt.c (instantiate_decl): Change reference to
17164 current_function_name_declared to
17165 cp_function_chain->name_declared.
17166
17167 * semantics.c (expand_cond): Moved declaration to c-common.h.
17168 (genrtl_do_pushlevel): Moved to c-semantics.c.
17169 (genrtl_clear_out_block): Likewise.
17170 (genrtl_goto_stmt): Likewise.
17171 (genrtl_expr_stmt): Likewise.
17172 (genrtl_decl_stmt): Likewise.
17173 (gerntl_if_stmt): Likewise.
17174 (genrtl_while_stmt): Likewise.
17175 (genrtl_do_stmt): Likewise.
17176 (genrtl_return_stmt): Likewise.
17177 (genrtl_for_stmt): Likewise.
17178 (genrtl_break_stmt): Likewise.
17179 (genrtl_continue_stmt): Likewise.
17180 (genrtl_scope_stmt): Likewise.
17181 (genrtl_switch_stmt): Likewise.
17182 (genrtl_case_label): Likewise.
17183 (genrtl_begin_compound_stmt): Likewise.
17184 (genrtl_finish_compound_stmt): Likewise.
17185 (genrtl_compound_stmt): Likewise.
17186 (genrtl_asm_stmt): Likewise.
17187 (genrtl_decl_cleanup): Likewise.
17188 (expand_cond): Likewise.
17189 (expand_stmt): Renamed to ...
17190 (lang_expand_stmt): ... this.
17191 (lang_expand_expr_stmt): Initialize.
17192 (set_current_function_name_declared): Likewise.
17193 (stmts_are_full_exprs_p): Likewise.
17194 (current_function_name_declared): Likewise.
17195 (anon_aggr_type_p): Likewise.
17196 (do_poplevel): Change reference to
17197 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17198 Change reference to stmts_are_full_exprs_p to
17199 current_stmt_tree->stmts_are_full_exprs_p.
17200 (add_tree): Likewise.
17201 (finish_expr_stmt): Likewise.
17202 (prep_stmt): Likewise.
17203 (lang_expand_stmt): Likewise.
17204 (begin_compound_stmt): Change reference to
17205 current_function_name_declared to
17206 cp_function_chain->name_declared and call to
17207 current_function_name_declared().
17208 (setup_vtbl_ptr): Likewise.
17209 (genrtl_do_poplevel): Removed.
17210
17211 2000-06-30 Jason Merrill <jason@redhat.com>
17212
17213 * init.c (init_init_processing): Go back to aligning like
17214 double_type_node for old ABI.
17215 (get_cookie_size): Make cookie larger if we get a type that needs
17216 more alignment.
17217 (build_vec_delete): Call it.
17218
17219 * typeck.c (qualify_type_recursive): New fn.
17220 (composite_pointer_type): Use it.
17221 (build_binary_op): Use composite_pointer_type.
17222
17223 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
17224 Jason Merrill <jason@redhat.com>
17225
17226 * typeck.c (check_return_expr): Don't complain about returning
17227 NULL from operator new if -fcheck-new.
17228 * cp-tree.h: Declare flag_check_new here.
17229 * init.c: Not here.
17230
17231 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17232
17233 * mangle.c (find_substitution): Use same_type_p.
17234 (write_encoding): Don't check for substitutions.
17235
17236 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17237
17238 * parse.y (expr_no_comma_rangle): New non-terminal.
17239 (template_parm): Use it for default parameter case.
17240 (template_arg): Use it.
17241 (expr_no_commas): Remove commented out undefined extensions.
17242 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17243 * parse.h, parse.c: Rebuilt.
17244
17245 2000-06-30 Mark Mitchell <mark@codesourcery.com>
17246
17247 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17248 (finish_asm_stmt): Do it here, instead.
17249
17250 * cp-tree.h (ridpointers): Don't declare.
17251 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17252 (record_builtin_java_type): Likewise.
17253 (init_decl_processing): Likewise.
17254 * lex.c: Move inclusion of lex.h.
17255 (ridpointers): Don't define.
17256 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
17257 RID_MAX.
17258 * lex.h (enum rid): Rename to ...
17259 (enum cp_rid): ... this.
17260 (ridpointers): Don't declare.
17261 * parse.y: Move inclusion of lex.h.
17262 * parse.c: Regenerated.
17263 * spew.c: Move inclusion of lex.h.
17264
17265 * cp-tree.h (struct language_function): Remove temp_name_counter.
17266 (temp_name_counter): Remove.
17267 (get_temp_name): Change prototype.
17268 (get_guard): New function.
17269 (get_guard_cond): Likewise.
17270 (set_guard): Likewise.
17271 * cvt.c (build_up_reference): Adjust call to get_temp_name.
17272 * decl.c (expand_static_init): Use get_guard and friends to
17273 implement guard variables.
17274 * decl2.c (get_temp_name): Assume that the variables created are
17275 always static.
17276 (get_sentry): Rename to ...
17277 (get_guard): ... this. Implement new ABI guard variables.
17278 (get_guard_bits): New function.
17279 (get_guard_cond): Likewise.
17280 (set_guard): Likewise.
17281 (start_static_initialization_or_destruction): Use them.
17282 (do_static_initialization): Replace sentry with guard throughout.
17283 (do_static_destruction): Likewise.
17284 * init.c (create_temporary_var): Add comment.
17285
17286 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17287
17288 * mangle.c (find_substitution): Use same_type_p.
17289 (write_encoding): Don't check for substitutions.
17290
17291 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17292
17293 * parse.y (expr_no_comma_rangle): New non-terminal.
17294 (template_parm): Use it for default parameter case.
17295 (template_arg): Use it.
17296 (expr_no_commas): Remove commented out undefined extensions.
17297 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17298 * parse.h, parse.c: Rebuilt.
17299
17300 2000-06-29 Mark Mitchell <mark@codesourcery.com>
17301
17302 * cp-tree.h (flag_const_strings): Remove.
17303 (warn_parentheses): Likewise.
17304 (warn_format): Likewise.
17305 (common_type): Likewise.
17306 (default_conversion): Likewise.
17307 (build_binary_op): Likewise.
17308 (cp_build_binary_op): New macro.
17309 * call.c (build_new_op): Use cp_build_binary_op instead of
17310 build_binary_op.
17311 * class.c (build_vtable_entry_ref): Likewise.
17312 * decl.c (expand_static_init): Likewise.
17313 (compute_array_index_type): Likewise.
17314 (build_enumerator): Likewise.
17315 * decl2.c (delete_sanity): Likewise.
17316 (start_static_initialization_or_destruction): Likewise.
17317 * error.c (dump_type_suffix): Likewise.
17318 * init.c (resolve_offset_ref): Likewise.
17319 (build_new): Likewise.
17320 (build_new_1): Likewise.
17321 (build_vec_delete_1): Likewise.
17322 (build_vec_init): Likewise.
17323 (build_delete): Likewise.
17324 * rtti.c (synthesize_tinfo_fn): Likewise.
17325 (synthesize_tinfo_var): Likewise.
17326 * search.c (expand_upcast_fixups): Likewise.
17327 (fixup_all_virtual_upcast_offsets): Likewise.
17328 * typeck.c (build_array_ref): Likewise.
17329 (get_member_function_from_ptrfunc): Likewise.
17330 (build_binary_op): Add parameter.
17331 (pointer_int_sum): Use cp_build_binary_op.
17332 (pointer_diff): Likewise.
17333 (build_modify_expr): Likewise.
17334 (get_delta_difference): Likewise.
17335 (build_ptrmemfunc): Likewise.
17336
17337 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
17338
17339 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17340 * decl.c (create_implicit_typedef): Adjust.
17341 * decl2.c (build_artificial_parm): Adjust.
17342 * method.c (implicitly_declare_fn): Adjust.
17343 * pt.c (push_inline_template_parms_recursive): Adjust.
17344 (process_template_parm): Adjust.
17345 (overloaded_template_name): Adjust.
17346 * semantics.c (finish_template_template_parm): Adjust.
17347
17348 2000-06-28 Mark Mitchell <mark@codesourcery.com>
17349
17350 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17351 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17352 where to emit thunks.
17353 (build_vtt): Adjust call to build_vtt_inits.
17354 (build_vtt_inits): Add parameter to indicate whether or not
17355 sub-VTTs for virtual bases should be included. Adjust handling of
17356 construction vtables.
17357 (get_matching_base): New function.
17358 (dfs_build_vtt_inits): Rename to ...
17359 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17360 construction vtables.
17361 (dfs_fixup_binfo_vtbls): Likewise.
17362 (build_ctor_vtbl_groups): Build construction vtables for virtual
17363 bases, too.
17364 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17365 to build construction vtbls.
17366 (dfs_accumulate_vtbl_inits): Adjust handling of
17367 construction vtables.
17368
17369 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17370 types correctly.
17371
17372 2000-06-27 Mark Mitchell <mark@codesourcery.com>
17373
17374 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17375
17376 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17377
17378 * search.c (hides): Remove.
17379 (is_subobject_of_p): Add most_derived parameter. Use
17380 CANONICAL_BINFO.
17381 (lookup_field_queue_p): Adjust.
17382 (lookup_field_r): Adjust.
17383
17384 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17385
17386 * decl2.c (handle_class_head): Bash typedefs to the type's main
17387 decl.
17388
17389 2000-06-25 Mark Mitchell <mark@codesourcery.com>
17390
17391 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17392 (begin_global_stmt_expr): ... this.
17393 (genrtl_finish_stmt_expr): Rename to ...
17394 (finish_global_stmt_expr): ... this.
17395 * init.c (begin_init_stmts): Adjust calls.
17396 (finish_init_stmts): Likewise.
17397 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17398 (begin_global_stmt_expr): ... this.
17399 (genrtl_finish_stmt_expr): Rename to ...
17400 (finish_global_stmt_expr): ... this.
17401
17402 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17403
17404 * search.c (lookup_member): Fix typo in comment.
17405
17406 2000-06-24 Jason Merrill <jason@redhat.com>
17407
17408 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17409 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17410
17411 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17412
17413 * parse.y (complex_direct_notype_declarator): Support global_scope.
17414 * Makefile.in: Adjust conflict count.
17415
17416 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17417
17418 * parse.y (template_arg): Convert TEMPLATE_DECL
17419 that is a template template parameter to
17420 TEMPLATE_TEMPLATE_PARM here.
17421
17422 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17423 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17424 (copy_template_template_parm): Adjust prototype.
17425 * decl.c (grokdeclarator): Remove dead code.
17426 * pt.c (process_template_parm): Tidy.
17427 (lookup_template_class): Construct nodes in
17428 copy_template_template_parm.
17429 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17430 lookup_template_class. Use TYPE_TI_TEMPLATE.
17431 * tree.c (copy_template_template_parm): Add NEWARGS
17432 parameter.
17433 (mapcar): Adjust call to copy_template_template_parm.
17434 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17435 * method.c (build_template_template_parm_names): Change error
17436 code to avoid compilation warning.
17437
17438 * gxxint.texi: Document template template parameter
17439 name mangling.
17440
17441 2000-06-21 Alex Samuel <samuel@codesourcery.com>
17442
17443 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17444 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17445 (cp-demangle.o): New rule.
17446 (dyn-string.o): Likewise.
17447 * inc/cxxabi.h (__cxa_demangle): New declaration.
17448
17449 2000-06-22 Mark Mitchell <mark@codesourcery.com>
17450
17451 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17452 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17453 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
17454 a tree, not an int.
17455 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17456 (make_thunk): Change prototype.
17457 (emit_thunk): Rename to use_thunk.
17458 (mangle_thunk): Change prototype.
17459 * class.c (get_derived_offset): Simplify.
17460 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17461 BV_GENERATE_THUNK_WITH_VTABLE_P.
17462 (build_primary_vtable): Simplify.
17463 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17464 (dfs_find_base): Remove.
17465 (update_vtable_entry_for_fn): Correct bug in finding the base
17466 where a virtual function was first declared. Figure out whether
17467 or not to emit a vcall-thunk with the vtables in which it appears.
17468 Correct logic for deciding whether to use an ordinary thunk, or a
17469 vcall thunk.
17470 (finish_struct_1): Remove unnecssary code.
17471 (build_vtbl_initializer): Use ssize_int for the running counter of
17472 negative indices.
17473 (build_vtbl_initializer): Only use vcall thunks where necessary.
17474 Mark thunks as needing to be emitted with their vtables, or not.
17475 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17476 indices. Use size_binop.
17477 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17478 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
17479 size_binop.
17480 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17481 (build_vtable_entry): Mark thunks as needing to be emitted with
17482 their vtables, or not.
17483 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17484 * decl2.c (mark_vtable_entries): Use use_thunk instead of
17485 emit_thunk.
17486 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
17487 information.
17488 * error.c (dump_expr): Use BV_FN.
17489 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17490 not an int.
17491 * method.c (make_thunk): Likewise.
17492 (emit_thunk): Rename to use_thunk. Allow callers to decide
17493 whether or not to actually emit the thunk. Adjust for changes in
17494 representation of vcall offsets.
17495 * search.c (dfs_get_pure_virtuals): Use BV_FN.
17496 * semantics.c (emit_associated_thunks): New function.
17497 (expand_body): Use it.
17498 * ir.texi: Adjust decriptions of thunks.
17499
17500 2000-06-22 Jason Merrill <jason@redhat.com>
17501
17502 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17503 (tsubst_friend_function): Copy it here.
17504
17505 * decl.c (grok_op_properties): Fix typo.
17506
17507 * decl2.c (delete_sanity): Clarify warning, avoid failure on
17508 deleting void*.
17509
17510 * pt.c (check_explicit_specialization): Clarify error.
17511
17512 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17513 an old OVERLOAD when we're declaring a non-function.
17514 (pushdecl, destroy_local_var): Check for error_mark_node.
17515 (warn_extern_redeclared_static): Also bail early if
17516 we're a CONST_DECL.
17517 (push_overloaded_decl): Ignore an old error_mark_node.
17518
17519 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
17520
17521 * call.c (build_x_va_arg): Check if in a template decl.
17522 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17523
17524 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17525
17526 * class.c (push_lang_context): TYPE_NAME gets you to the Java
17527 types DECLs.
17528 * decl.c (check_goto): Computed gotos assumed OK.
17529
17530 2000-06-20 Jason Merrill <jason@redhat.com>
17531
17532 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17533 for which we don't need to look for instantiations.
17534
17535 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
17536
17537 * parse.y (program): Always call finish_translation_unit.
17538 * parse.c, parse.h: Rebuilt.
17539
17540 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
17541
17542 * method.c: Don't include hard-reg-set.h.
17543
17544 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17545
17546 * rtti.c (get_base_offset): Cope when vbase field is in a base.
17547
17548 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17549
17550 * call.c (build_conditional_expr): Use VOID_TYPE_P.
17551 * cvt.c (cp_convert_to_pointer): Likewise.
17552 (convert_to_void): Likewise.
17553 * error.c (dump_expr): Likewise.
17554 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17555 * init.c (build_delete): Likewise.
17556 * method.c (emit_thunk): Likewise.
17557 * optmize.c (declare_return_variable): Likewise.
17558 * rtti.c (get_tinfo_decl_dynamic): Likewise.
17559 (get_typeid): Likewise.
17560 (build_dynamic_cast_1): Likewise.
17561 * typeck.c (composite_pointer_type): Likewise.
17562 (common_type): Likewise.
17563 (build_indirect_ref): Likewise.
17564 (build_binary_op): Likewise.
17565 (build_x_compound_expr): Likewise.
17566 (check_return_expr): Likewise.
17567 * typeck2.c (add_exception_specifier): Likewise.
17568
17569 * mangle.c (write_method_parms): Use direct comparison for end
17570 of parmlist.
17571
17572 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
17573
17574 * cp-tree.h (genrtl_try_block): Declare 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.
17604 (finish_switch_stmt): Likewise.
17605
17606 * semantics.c (genrtl_try_block): Define function.
17607 (genrtl_handler): Likewise.
17608 (genrtl_catch_block): Likewise.
17609 (genrtl_ctor_stmt): Likewise.
17610 (genrtl_subobject): Likewise.
17611 (genrtl_decl_cleanup): Likewise.
17612 (genrtl_do_poplevel): Likewise.
17613 (genrtl_do_pushlevel): Likewise.
17614 (genrtl_clear_out_block): Likewise.
17615 (genrtl_goto_stmt): Likewise.
17616 (genrtl_expr_stmt): Likewise.
17617 (genrtl_decl_stmt): Likewise.
17618 (genrtl_if_stmt): Likewise.
17619 (genrtl_while_stmt): Likewise.
17620 (genrtl_do_stmt): Likewise.
17621 (genrtl_return_stmt): Likewise.
17622 (genrtl_for_stmt): Likewise.
17623 (genrtl_break_stmt): Likewise.
17624 (genrtl_continue_stmt): Likewise.
17625 (genrtl_scope_stmt): Likewise.
17626 (genrtl_switch_stmt): Likewise.
17627 (genrtl_case_label): Likewise.
17628 (genrtl_begin_compound_stmt): Likewise.
17629 (genrtl_finish_compound_stmt): Likewise.
17630 (genrtl_compound_stmt): Likewise.
17631 (genrtl_asm_stmt): Likewise.
17632 (genrtl_named_return_value): Likewise.
17633 (genrtl_begin_stmt_expr): Likewise.
17634 (genrtl_finish_stmt_expr): Likewise.
17635 (finish_for_stmt): Removed first argument and generate rtl
17636 specific code.
17637 (finish_switch_stmt): Likewise.
17638 (do_poplevel): Removed generate rtl specific code.
17639 (do_pushlevel): Likewise.
17640 (add_tree): Likewise.
17641 (finish_goto_stmt): Likewise.
17642 (finish_expr_stmt): Likewise.
17643 (begin_if_stmt): Likewise.
17644 (finish_if_stmt_cond): Likewise.
17645 (finish_then_clause): Likewise.
17646 (begin_else_clause): Likewise.
17647 (finish_else_clause): Likewise.
17648 (finish_if_stmt): Likewise.
17649 (clear_out_block): Likewise.
17650 (begin_while_stmt): Likewise.
17651 (finish_while_stmt_cond): Likewise.
17652 (finish_while_stmt): Likewise.
17653 (begin_do_stmt): Likewise.
17654 (finish_do_body): Likewise.
17655 (finish_do_stmt): Likewise.
17656 (finish_return_stmt): Likewise.
17657 (begin_for_stmt): Likewise.
17658 (finish_for_init_stmt): Likewise.
17659 (finish_for_cond): Likewise.
17660 (finish_for_expr): Likewise.
17661 (finish_break_stmt): Likewise.
17662 (finish_continue_stmt): Likewise.
17663 (begin_switch_stmt): Likewise.
17664 (finish_switch_cond): Likewise.
17665 (finish_case_label): Likewise.
17666 (begin_try_block): Likewise.
17667 (begin_function_try_block): Likewise.
17668 (finish_try_block): Likewise.
17669 (finish_cleanup_try_block): Likewise.
17670 (finish_cleanup): Likewise.
17671 (finish_function_try_block): Likewise.
17672 (finish_handler_sequence): Likewise.
17673 (finish_function_handler_sequence): Likewise.
17674 (begin_handler): Likewise.
17675 (finish_handler_parms): Likewise.
17676 (begin_catch_block): Likewise.
17677 (finish_handler): Likewise.
17678 (begin_compound_stmt): Likewise.
17679 (finish_compound_stmt): Likewise.
17680 (finish_asm_stmt): Likewise.
17681 (finish_label_stmt): Likewise.
17682 (finish_label_decl): Likewise.
17683 (finish_subobject): Likewise.
17684 (finish_decl_cleanup): Likewise.
17685 (finish_named_return_value): Likewise.
17686 (begin_stmt_expr): Likewise.
17687 (finish_stmt_expr): Likewise.
17688
17689 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17690 to call genrtl_expr_stmt when appropriate.
17691
17692 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17693 begin_compound_expr to call genrtl_begin_stmt_expr and
17694 genrtl_begin_compound_expr when appropriate.
17695 (finish_init_stmts): Changed calls to finish_compound_expr and
17696 finish_stmt_expr to call genrtl_finish_compound_expr and
17697 genrtl_finish_stmt_expr when appropriate.
17698 (expand_default_init): Changed call to finish_expr_stmt to call
17699 genrtl_expr_stmt when appropriate.
17700 (build_vec_init): Likewise.
17701
17702 * parse.y (simple_stmt): Removed first argument from call to
17703 finish_for_stmt. Removed first argument from call to
17704 finish_switch_stmt.
17705
17706 * parse.c: Regenerated.
17707
17708 * pt.c (tsubst_expr): Removed first argument from call to
17709 finish_for_stmt. Removed first argument from call to
17710 finish_switch_stmt.
17711
17712 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
17713
17714 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17715 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17716
17717 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17718 (cplus_tree_code_length[]): Likewise.
17719 (cplus_tree_code_name[]): Likewise.
17720 (init_parse): Added call to add_c_tree_codes. Changed
17721 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17722
17723 2000-06-16 Mark Mitchell <mark@codesourcery.com>
17724
17725 * cp-tree.h (finish_mem_initializers): Declare.
17726 (count_trees): Likewise.
17727 * parse.y (base_init): Use finish_mem_initializers.
17728 * semantics.c (finish_mem_initializers): New function.
17729
17730 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
17731 the number of trees.
17732 (n_trees): Remove.
17733 (count_trees): Don't use it.
17734
17735 2000-06-15 Jason Merrill <jason@redhat.com>
17736
17737 * tree.c (count_trees): New debugging function.
17738
17739 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17740 * init.c (build_member_call): Pull out the name of a DECL.
17741
17742 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17743 * semantics.c (expand_body): Push to TV_INTEGRATION here.
17744 * optimize.c (optimize_function): Not here.
17745 * pt.c (instantiate_decl): Push to TV_PARSE.
17746
17747 2000-06-15 Mark Mitchell <mark@codesourcery.com>
17748
17749 * cp-tree.h (struct language_function): Remove x_base_init_list
17750 and x_member_init_list.
17751 (current_base_init_list): Remove.
17752 (current_member_init_list): Likewise.
17753 (setup_vtbl_ptr): Change prototype.
17754 (emit_base_init): Likewise.
17755 (expand_member_init): Likewise.
17756 (reinit_parse_for_function): Remove.
17757 * decl.c (save_function_data): Don't clear x_base_init_list and
17758 x_member_init_list.
17759 (mark_language_function): Don't mark them.
17760 * init.c (perform_member_init): Tweak comment.
17761 (sort_member_init): Take the list of initializers as an argument.
17762 (sort_base_init): Likewise.
17763 (emit_base_init): Likewise.
17764 (expand_member_init): Return the initializer. Don't use global
17765 variables.
17766 * lex.c (reinit_parse_for_function): Remove.
17767 * method.c (build_template_parm_names): Correct substitution.
17768 (do_build_copy_constructor): Don't use current_member_init_list
17769 and current_base_init_list.
17770 (synthesize_method): Likewise.
17771 * parse.y (base_init): Split mem-initializers into
17772 base-initializers and field-initializers.
17773 (member_init_list): Build up the list here.
17774 (member_init): Return the initializer.
17775 (fn.depfn): Don't use reinit_parse_for_function.
17776 * parse.c: Regenerated.
17777 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17778 ERROR_MARK.
17779 (tsubst_expr): Don't use current_member_init_list
17780 and current_base_init_list.
17781 (tsubst_expr_values): Rename to ...
17782 (tsubst_initializer_list): ... this. Use convert_from_reference.
17783 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17784 and current_base_init_list.
17785 (begin_function_definition): Don't call reinit_parse_for_function.
17786
17787 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17788
17789 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17790 correctly.
17791
17792 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17793
17794 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
17795
17796 * cp-tree.h (IF_COND): Move to c-common.h.
17797 (THEN_CLAUSE): Likewise.
17798 (ELSE_CLAUSE): Likewise.
17799 (WHILE_COND): Likewise.
17800 (WHILE_BODY): Likewise.
17801 (DO_COND): Likewise.
17802 (DO_BODY): Likewise.
17803 (RETURN_EXPR): Likewise.
17804 (EXPR_STMT_EXPR): Likewise.
17805 (FOR_INIT_STMT): Likewise.
17806 (FOR_COND): Likewise.
17807 (FOR_EXPR): Likewise.
17808 (FOR_BODY): Likewise.
17809 (SWITCH_COND): Likewise.
17810 (SWITCH_BODY): Likewise.
17811 (CASE_LOW): Likewise.
17812 (CASE_HIGH): Likewise.
17813 (GOTO_DESTINATION): Likewise.
17814 (COMPOUND_BODY): Likewise.
17815 (ASM_CV_QUAL): Likewise.
17816 (ASM_STRING): Likewise.
17817 (ASM_OUTPUTS): Likewise.
17818 (ASM_INPUTS): Likewise.
17819 (ASM_CLOBBERS): Likewise.
17820 (DECL_STMT_DECL): Likewise.
17821 (STMT_EXPR_STMT): Likewise.
17822 (LABEL_STMT_LABEL): Likewise.
17823 (SCOPE_BEGIN_P): Likewise.
17824 (SCOPE_END_P): Likewise.
17825 (SCOPE_STMT_BLOCK): Likewise.
17826 (SCOPE_NULLIFIED_P): Likewise.
17827 (SCOPE_NO_CLEANUPS_P): Likewise.
17828 (SCOPE_PARTIAL_P): Likewise.
17829 (ASM_VOLATILE_P): Likewise.
17830 (STMT_LINENO): Likewise.
17831 (STMT_LINENO_FOR_FN_P): Likewise.
17832
17833 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17834 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17835 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17836 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17837 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17838
17839 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17840
17841 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17842 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17843
17844 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17845 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17846 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17847
17848 2000-06-14 Mark Mitchell <mark@codesourcery.com>
17849
17850 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17851 * class.c (dfs_find_final_overrider): Set it appropriately.
17852 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17853 avoid unneeded secondary vptrs.
17854
17855 2000-06-13 Jakub Jelinek <jakub@redhat.com>
17856
17857 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17858 (check_bitfield_decl, check_field_decl): Likewise.
17859 (build_vtbl_or_vbase_field, build_base_field): Likewise.
17860 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17861 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17862 (xfer_tag, finish_enum): Likewise.
17863 * decl2.c (finish_builtin_type): Likewise.
17864 * init.c (init_init_processing): Likewise.
17865 * pt.c (instantiate_class_template): Likewise.
17866 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17867 * cp-tree.h (struct lang_type): Add user_align member.
17868 (CLASSTYPE_USER_ALIGN): Define.
17869
17870 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
17871
17872 * Make-lang.in (c++.install-common): Install g++-cross in
17873 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17874 $(target_alias)-g++ and $(target_alias)-c++.
17875
17876 2000-06-12 Mark Mitchell <mark@codesourcery.com>
17877
17878 * class.c (vcall_offset_data_s): Add last_init and fns.
17879 (overrides): Rename to same_signature_p.
17880 (dfs_find_final_overrider): Adjust accordingly.
17881 (mark_overriders): Likewise.
17882 (warn_hidden): Likewise.
17883 (build_vtbl_initializer): Reorganize machinery for building things
17884 at negative offsets.
17885 (build_vcall_and_vbase_vtbl_entries): Likewise.
17886 (build_vbase_offset_vtbl_entries): Likewise.
17887 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17888 offset entries. Do not create two entries for functions with the
17889 same signature.
17890 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17891 (build_rtti_vtbl_entries): Reorganize machinery for building things
17892 at negative offsets.
17893
17894 * optimize.c (expand_call_inline): Don't recurse into the code
17895 used to initialize the parameters more than once.
17896
17897 2000-06-11 Mark Mitchell <mark@codesourcery.com>
17898
17899 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17900 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17901 (find_substitution): Only use the `Sa' substitution for
17902 std::allocator, not instantiations of it.
17903 (write_template_prefix): Move comment. Only use a TREE_LIST to
17904 represent substitutions for a member template.
17905 (write_array_type): Mangle array dimensions correctly.
17906 * optimize.c (maybe_clone_body): Copy more information from the
17907 cloned function.
17908 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17909 on the regenerated declaration.
17910
17911 2000-06-11 Chip Salzenberg <chip@valinux.com>
17912 Mark Mitchell <mark@codesourcery.com>
17913
17914 * class.c (build_vtable): Clarify comment.
17915 (build_ctor_vtbl_group): Pass the most derived type to
17916 build_vtable.
17917
17918 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17919
17920 * decl2.c (compare_options): Don't needlessly cast away const-ness.
17921
17922 2000-06-10 Mark Mitchell <mark@codesourcery.com>
17923
17924 * decl.c (add_binding): Handle duplicate declarations of external
17925 variables.
17926
17927 2000-06-09 Chip Salzenberg <chip@valinux.com>
17928 Mark Mitchell <mark@codesourcery.com>
17929
17930 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17931 argument.
17932 (write_signed_number): New macro.
17933 (write_unsigned_number): Likewise.
17934 (write_source_name): Use them.
17935 (write_number): Handle signed and unsigned values.
17936 (write_integer_cst): Use tree_int_cst_sgn, and use
17937 write_unsigned_number or write_signed_number as appropriate.
17938 (write_discriminator): Use write_unsigned_number or
17939 write_signed_number as appropriate.
17940 (write_template_arg_literal): Likewise.
17941 (write_array_type): Use tree_low_cst.
17942 (write_template_parm): Use write_unsigned_number or
17943 write_signed_number as appropriate.
17944 (write_substitution): Adjust call to write_number.
17945 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17946 (write_expression): Handle non-type template arguments of
17947 reference type correctly.
17948 (mangle_thunk): Use write_signed_number.
17949
17950 2000-06-09 Chip Salzenberg <chip@valinux.com>
17951
17952 * mangle.c (find_substition): Don't mangle objects with typename
17953 substitutions (e.g. "cin" as "Si").
17954
17955 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
17956
17957 * call.c (add_candidate): Use ggc_alloc_cleared.
17958 * decl.c (lookup_label): Likewise.
17959 * lex.c (retrofit_lang_decl): Likewise.
17960
17961 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
17962
17963 * semantics.c (expand_body): Push to TV_EXPAND.
17964 * optimize.c (optimize_function): Push to TV_INTEGRATION.
17965 * decl.c (start_function): Always call announce_function.
17966
17967 * tinfo2.cc: Just declare abort.
17968
17969 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
17970
17971 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17972 whenever @ is a symbolic name.
17973
17974 2000-06-08 Jakub Jelinek <jakub@redhat.com>
17975
17976 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17977
17978 2000-06-07 Mark Mitchell <mark@codesourcery.com>
17979
17980 * decl.c (pushdecl): Look up functions by DECL_NAME, not
17981 DECL_ASSEMBLER_NAME.
17982
17983 2000-06-06 Mark Mitchell <mark@codesourcery.com>
17984
17985 * decl2.c (c_language): Define.
17986
17987 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
17988
17989 * lex.c (lang_init_options): Tweak.
17990
17991 * decl2.c: Remove #inclusion of diagnostic.h
17992 (lang_decode_option): Move diagnostic formatting options to
17993 toplevel.
17994
17995 * lang-options.h: Remove documentation for diagnostic options.
17996
17997 * Makefile.in (lex.o): Depends upon diagnostic.h
17998
17999 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18000
18001 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18002 the same DECL_RESULT, it's not a redefinition.
18003 * pt.c (tsubst_decl): Remove code to handle illegal
18004 specializations.
18005
18006 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
18007
18008 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18009
18010 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
18011
18012 * search.c (maybe_suppress_debug_info): Don't check
18013 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18014
18015 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18016 here if extern_p.
18017
18018 Remember instantiation context in deferred instantiations.
18019 * cp-tree.h (struct tinst_level): Remove.
18020 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18021 * pt.c (current_tinst_level): Now a tree.
18022 (print_template_context, push_tinst_level, pop_tinst_level,
18023 tinst_for_decl): Adjust.
18024 (reopen_tinst_level): New fn.
18025 (init_pt): Register current_tinst_level as a root.
18026 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18027 of the pending templates list.
18028 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
18029 * lex.c (extract_interface_info): Adjust.
18030 * decl2.c (warn_if_unknown_interface): Adjust.
18031
18032 2000-06-05 Mark Mitchell <mark@codesourcery.com>
18033
18034 * class.c (indirect_primary_base_p): New function.
18035 (determine_primary_base): Use it.
18036
18037 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
18038
18039 Update new-abi dynamic cast algorithm.
18040 * tinfo.cc (__class_type_info::__dyncast_result): Add
18041 whole_details. Adjust constructor.
18042 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18043 Avoid unnecessary searching.
18044 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18045
18046 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18047
18048 * decl.c (init_decl_processing): Don't call record_component_aliases.
18049 * tree.c (build_cplus_array_type_1): Likewise.
18050
18051 2000-06-04 Mark Mitchell <mark@codesourcery.com>
18052
18053 * ir.texi: Correct typo.
18054 * mangle.c (write_expression): Handle non-type template arguments
18055 with reference type.
18056 * method.c (build_overload_value): Likewise.
18057 * pt.c (convert_nontype_argument): Explicitly represent conversion
18058 to a reference with an ADDR_EXPR.
18059 (unify): Always unify arguments in left-to-right order.
18060
18061 2000-06-03 Alex Samuel <samuel@codesourcery.com>
18062 Mark Mitchell <mark@codesourcery.com>
18063
18064 * Make-lang.in (CXX_SRCS): Add mangle.c.
18065 * Makefile.in (CXX_OBJS): Add mangle.o.
18066 (mangle.o): New rule.
18067
18068 * class.c (local_classes): New variable.
18069 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18070 (get_vtt_name): Use mangle_vtt_name for new ABI.
18071 (init_class_processing): Initialize local_classes.
18072 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18073 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18074 (std_identifier): New macro.
18075 (DECL_VOLATILE_MEMFUNC_P): New macro.
18076 (DECL_NAMESPACE_STD_P): Likewise.
18077 (local_classes): Declare.
18078 (get_mostly_instantiated_function_type): Declare.
18079 (init_mangle): Declare.
18080 (mangle_decl): Likewise.
18081 (mangle_type_string): Likewise.
18082 (mangle_type): Likewise.
18083 (mangle_typeinfo_for_type): Likewise.
18084 (mangle_typeinfo_string_for_type): Likewise.
18085 (mangle_vtbl_for_type): Likewise.
18086 (mangle_vtt_for_type): Likewise.
18087 (mangle_ctor_vtbl_for_type): Likewise.
18088 (mangle_thunk): Likewise.
18089 (mangle_conv_op_name_for_type): Likewise.
18090 (mangle_guard_variable): Likewise.
18091 * decl.c (pushtag): Keep track of local classes.
18092 (initialize_predefined_identifiers): Initialize std_identifier.
18093 (init_decl_processing): Use std_identifier.
18094 (start_decl): Don't treat instantiations as specializations.
18095 (grokdeclarator): Likewise.
18096 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
18097 name for fully-instantiated templates.
18098 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18099 destructors with the new ABI.
18100 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18101 (grokfield): Use mangle_type for new ABI.
18102 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18103 (get_sentry): Use mangle_guard_variable for new ABI.
18104 (start_static_initialization_or_destruction): Likewise.
18105 * expr.c (extract_aggr_init): Remove.
18106 (extract_scalar_init): Likewise.
18107 (extract_init): Remove #if 0'd code.
18108 * mangle.c: New function.
18109 * method.c (build_mangled_name): Assert not flag_new_abi.
18110 (build_static_name): Likewise.
18111 (build_decl_overload_real): Likewise.
18112 (build_typename_overload): Likewise.
18113 (build_overload_with_type): Likewise.
18114 (build_overload_name): Likewise.
18115 (get_ctor_vtbl_name): Likewise.
18116 (start_squangling): Likewise.
18117 (get_id_2): Likewise.
18118 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18119 (init_method): Call init_mangle for new ABI.
18120 (make_thunk): Call mangle_thunk for new ABI.
18121 * operators.def: Correct new ABI manglings for the `%' operator.
18122 Add `::' operator.
18123 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18124 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18125 (lookup_template_class): Call mangle_decl for new ABI.
18126 (get_mostly_instantiated_function_type): New function.
18127 (set_mangled_name_for_template_decl): Use it.
18128 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18129 the new ABI. Use mangle_conv_op_name_for_type for instantiated
18130 conversion op names.
18131 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18132 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18133 (tinfo_base_init): Likewise. Mangle typeinfo string name with
18134 mangle_typeinfo_string_for_type.
18135
18136 2000-06-03 Mark Mitchell <mark@codesourcery.com>
18137
18138 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18139 (INNERMOST_TEMPLATE_ARGS): New macro.
18140 (innermost_args): Remove.
18141 (get_innermost_template_args): New function.
18142 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18143 * error.c (dump_function_decl): Be caution when using
18144 most_general_template.
18145 * method.c (build_template_parm_names): Use
18146 INNERMOST_TEMPLATE_ARGS.
18147 * pt.c (add_to_template_args): Tidy comment
18148 (get_innermost_template_args): New function.
18149 (check_explicit_specialization): Clear DECL_INITIAL for a new
18150 specialization.
18151 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18152 Tidy.
18153 (push_template_decl): Always register specializations of the most
18154 general template.
18155 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18156 (coerce_template_parms): Likewise.
18157 (lookup_template_class): Likewise.
18158 (innermost_args): Remove.
18159 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18160 (tsubst_decl): Handle tricky specializations. Use
18161 get_innermost_template_args.
18162 (instantiate_template): Simplify handling of partial
18163 instantiations.
18164 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18165 (most_general_template): Reimplement, in a more straightforward
18166 manner.
18167 (regenerate_decl_from_template): Tweak formatting. Use
18168 TMPL_ARGS_DEPTH for clarity.
18169 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18170
18171 * dump.c (dequeue_and_dump): Dump information about thunks.
18172
18173 2000-06-01 Richard Henderson <rth@cygnus.com>
18174
18175 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18176
18177 2000-06-01 Richard Henderson <rth@cygnus.com>
18178
18179 * decl2.c (unsupported_options): Fix typo, make const.
18180 (lang_decode_option): Fix bsearch argument order.
18181
18182 2000-06-01 Mark Mitchell <mark@codesourcery.com>
18183
18184 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18185 on FIELD_DECLs.
18186
18187 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18188
18189 * cp-tree.h (c_get_alias_set): Deleted.
18190 * Makefile.in (decl.o): Include ../expr.h.
18191 * decl.c (expr.h): Include.
18192 (init_decl_processing): Call record_component_aliases for arrays.
18193 (grokdeclarator): Likewise.
18194 Set TREE_ADDRESSABLE for fields that aren't bitfields.
18195 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18196
18197 2000-05-31 Mark Mitchell <mark@codesourcery.com>
18198
18199 Remove guiding declaration support.
18200 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18201 (flag_guiding_decls): Remove.
18202 * call.c (build_user_type_conversion_1): Remove support for
18203 guiding decls.
18204 (build_new_function_call): Likewise.
18205 (build_new_op): Likewise.
18206 (build_new_method_call): Likewise.
18207 * decl.c (start_function): Likewise.
18208 * friend.c (is_friend): Likewise.
18209 (do_friend): Likewise.
18210 * decl2.c ((flag_dump_translation_unit): Make it const.
18211 (flag_guiding_decls): Remove.
18212 (unsupported_options): New variable
18213 (compare_options): New function.
18214 (lang_decode_option): Use them.
18215
18216 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18217
18218 * method.c (mangle_expression): Adjust test for legal expression
18219 operators.
18220
18221 * pt.c (instantiate_decl): Save and restore the local
18222 specializations list.
18223
18224 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
18225
18226 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18227
18228 2000-05-30 Mark Mitchell <mark@codesourcery.com>
18229
18230 * call.c (add_template_candidate_real): Handle member template
18231 constructors for classes with virtual bases.
18232 (build_user_type_conversion_1): Use in_charge_arg_for_name.
18233 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18234
18235 * ir.texi: Update thunk documentation.
18236
18237 * call.c (joust): Fix handling of overloaded builtin operators.
18238
18239 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
18240
18241 * cp-tree.h (DECL_ANTICIPATED): New macro.
18242 Document new use of DECL_LANG_FLAG_7.
18243 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18244 in the user namespace.
18245 * lex.c (do_identifier): If the identifier's declaration has
18246 DECL_ANTICIPATED on, it has not yet been declared. But do not
18247 replace it with an ordinary implicit declaration.
18248
18249 * tinfo2.cc: Include stdlib.h.
18250
18251 2000-05-29 Mark Mitchell <mark@codesourcery.com>
18252
18253 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18254 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18255 CLASSTYPE_ALIGN.
18256
18257 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
18258
18259 * decl2.c (lang_decode_option): Use skip_leading_substring instead
18260 of plain strncmp.
18261
18262 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
18263
18264 * operators.def (<?): Duplicated, should have been...
18265 (>?): this. Fixed.
18266
18267 2000-05-27 Alex Samuel <samuel@codesourcery.com>
18268 Mark Mitchell <mark@codesourcery.com>
18269
18270 * cp-tree.h (ansi_opname): Make it a macro.
18271 (ansi_assopname): Likewise.
18272 (struct lang_decl_flags): Add assignment_operator_p.
18273 (struct lang_decl): Add operator_code.
18274 (DECL_VTT_PARM): Adjust.
18275 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18276 overloaded operator.
18277 (SET_OVERLOADED_OPERATOR_CODE): New macro.
18278 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18279 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18280 (opname_tab): Remove.
18281 (assignop_tab): Likewise.
18282 (operator_name_info_t): New type.
18283 (operator_name_info): New variable.
18284 (assignment_operator_name_info): Likewise.
18285 (build_cp_library_fn): Remove declaration.
18286 (push_cp_library_fn): Likewise.
18287 (operator_name_string): Likewise.
18288 (build_decl_overload): Likewise.
18289 * call.c (print_z_candidates): Simplify.
18290 (build_object_call): Adjust usage of ansi_opname. Use
18291 DECL_OVERLOADED_OPERATOR_P.
18292 (op_error): Adjust operator name lookup.
18293 (build_conditional_expr): Adjust usage of ansi_opname.
18294 (build_new_op): Likewise.
18295 (build_op_delete_call): Likewise.
18296 (build_over_call): Likewise.
18297 (joust): Use DECL_OVERLOADED_OPERATOR_P.
18298 * decl.c (duplicate_decls): Copy operator_code.
18299 (init_decl_processing): Adjust parameters to push_cp_library_fn.
18300 (builtin_function): Adjust parameters to build_library_fn_1.
18301 (build_library_fn_1): Accept an overloaded operator code.
18302 (build_library_fn): Pass ERROR_MARK.
18303 (build_cp_library_fn): Accept an overloaded operator code.
18304 (push_cp_library_fn): Likewise.
18305 (grokfndecl): Tweak.
18306 (grokdeclarator): Simplify code to compute names of overloaded
18307 operators. Adjust use of ansi_opname.
18308 (ambi_op_p): Work on tree_codes, not identifiers.
18309 (unary_op_p): Likewise.
18310 (grok_op_properties): Likewise.
18311 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18312 (lang_mark_tree): Don't try to mark the operator_code.
18313 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18314 * error.c (dump_decl): Remove special handling for operator
18315 names.
18316 (dump_function_name): Likewise.
18317 (dump_expr): Adjust name lookup of operators.
18318 (op_to_string): Simplify.
18319 (assop_to_string): Likewise.
18320 * init.c (build_new_1): Adjust use of ansi_opname.
18321 * lex.c (opname_tab): Remove.
18322 (assignop_tab): Likewise.
18323 (ansi_opname): Likewise.
18324 (ansi_assopname): Likewise.
18325 (operator_name_string): Likewise.
18326 (reinit_lang_specific): Likewise.
18327 (operator_name_info): New variable.
18328 (assignment_operator_name_info): Likewise.
18329 (init_operators): New function.
18330 (init_parse): Use it.
18331 (do_identifier): Adjust use of ansi_opname.
18332 * method.c (mangle_expression): Don't use ansi_opname for
18333 mangling.
18334 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18335 (build_decl_overload): Remove.
18336 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18337 (do_build_assign_ref): Adjust use of ansi_opname.
18338 (synthesize_method): Likewise.
18339 (implicitly_declare_fn): Likewise.
18340 * operators.def: New file.
18341 * parse.y (operator): Adjust use of ansi_opname.
18342 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18343 (set_mangled_name_for_template_decl): Don't play games with
18344 current_namespace.
18345 (special_function_p): Adjust use of ansi_opname.
18346 * typeck.c (check_return_expr): Likewise.
18347 * Make-lang.in (cc1plus): Depend on operators.def.
18348 * Makefile.in (lex.o): Likewise.
18349 (decl.o): Likewise.
18350
18351 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
18352
18353 * Make-lang.in (cplib2.ready): Eradicate.
18354
18355 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18356
18357 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18358 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18359 (built_min, cp_tree_equal): Likewise.
18360
18361 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18362
18363 * class.c (layout_nonempty_base_or_field): Replace
18364 `record_layout_info' with `record_layout_info_s'.
18365
18366 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
18367
18368 Fix goto checking.
18369 * cp-tree.h (struct language_function): x_named_labels is now
18370 a struct named_label_list*.
18371 * decl.c (struct named_label_use_list): Renamed from...
18372 (struct named_label_list): ...this. New struct.
18373 (push_binding_level): Don't set eh_region.
18374 (note_level_for_eh): New fn.
18375 (pop_label): Take label and old value directly.
18376 (pop_labels): Adjust for new named_labels format.
18377 (lookup_label): Likewise.
18378 (poplevel): Note characteristics of a binding level containing a
18379 named label. Mess with named label lists earlier.
18380 (mark_named_label_lists): New fn.
18381 (mark_lang_function): Call it.
18382 (use_label): New fn, split out from...
18383 (make_label_decl): ...here. Don't call it.
18384 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18385 check_previous_gotos): New fns, split out from...
18386 (define_label): ...here.
18387 (check_switch_goto): New fn.
18388 (define_case_label): Call it.
18389 (check_goto): New fn.
18390 * semantics.c (finish_goto_stmt): Call it and use_label.
18391 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18392 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18393
18394 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18395
18396 * class.c (build_vtable_entry_ref): Correct usage of
18397 get_vtbl_decl_for_binfo.
18398
18399 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18400 * method.c (implicitly_declare_fn): Not here.
18401
18402 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
18403
18404 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18405 (CPTI_PTMD_DESC_TYPE): ... here.
18406 (ptmd_desc_type_node): Rename to ...
18407 (ptm_desc_type_node): ... here.
18408 * decl.c: Likewise.
18409 * rtti.c (ptmd_initializer): Rename to ...
18410 (ptm_initializer): ... here.
18411 (sythesize_tinfo_var): Adjust. Deal with pointer to member
18412 function.
18413 (create_tinfo_types): Adjust.
18414
18415 2000-05-25 Mark Mitchell <mark@codesourcery.com>
18416
18417 Finish implementation of VTTs.
18418 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18419 CPTI_VTT_PARM_IDENTIFIER.
18420 (vtt_parm_identifier): New macro.
18421 (vtt_parm_type): Likewise.
18422 (BINFO_SUBVTT_INDEX): Likewise.
18423 (BINFO_VPTR_INDEX): Likewise.
18424 (struct lang_decl): Add vtt_parm.
18425 (DECL_VTT_PARM): New macro.
18426 (DECL_USE_VTT_PARM): Likewise.
18427 (DECL_NEEDS_VTT_PARM_P): Likewise.
18428 (get_vtt_name): Declare.
18429 (build_artificial_parm): Likewise.
18430 (fixup_all_virtual_upcast_offsets): Likewise.
18431 (expand_indirect_vtbls_init): Remove.
18432 * call.c (build_new_method_call): Pass the vtt to subobject
18433 constructors and destructors.
18434 * class.c (get_vtt_name): Give it external linkage.
18435 (build_clone): Handle the magic VTT parameters for clones.
18436 (clone_function_decl): Fix typo in comment.
18437 (build_vtt): Keep track of the indices in the VTTs where various
18438 entities are stored.
18439 (build_vtt_inits): Likewise.
18440 (dfs_build_vtt_inits): Likewise.
18441 (build_ctor_vtbl_group): Tweak type of construction vtables.
18442 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18443 primary bases, when building construction vtables.
18444 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18445 (initialize_predefined_identifiers): Add vtt_parm_identifier.
18446 (init_decl_processing): Initialize vtt_parm_type.
18447 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18448 (lang_mark_tree): Make vtt_parm.
18449 * decl2.c (build_artificial_parm): New function.
18450 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
18451 (grokclassfn): Use build_artificial_parm.
18452 * init.c (initialize_vtbl_ptrs): Call
18453 fixup_all_virtual_upcast_offsets directly.
18454 (perform_member_init): Use the complete subobject destructor for
18455 member cleanups.
18456 (build_vtbl_address): New function.
18457 (expand_virtual_init): Handle VTTs.
18458 * optimize (maybe_clone_body): Likewise.
18459 * search.c (fixup_all_virtual_upcast_offsets): Give it external
18460 linkage.
18461 (expand_indirect_vtbls_init): Remove.
18462 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18463 * tree.c (make_binfo): Make them bigger.
18464
18465 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18466
18467 * inc/cxxabi.h (__pbase_type_info): Define, based on
18468 __pointer_type_info.
18469 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18470 (__pointer_to_member_type_info): Likewise.
18471 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18472 (__pointer_to_member_type_info::__is_pointer_p): Remove.
18473 (__pointer_type_info::__do_catch): Rename to ...
18474 (__pbase_type_info::__do_catch): ... here. Adjust.
18475 (__pbase_type_info::__pointer_catch): Implement.
18476 (__pointer_type_info::__pointer_catch): Adjust.
18477 (__pointer_to_member_type_info::__pointer_catch): Adjust.
18478
18479 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18480
18481 * tinfo.h (__user_type_info::contained_virtual_p): New
18482 predicate.
18483 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18484 shaped hierarchy.
18485 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18486 diamond shaped hierarchy. Add early out for mixed diamond and
18487 duplicate shaped hierarchy.
18488
18489 2000-05-24 Mark Mitchell <mark@codesourcery.com>
18490
18491 * cp-tree.h (build_delete): Change prototype.
18492 (build_vec_delete): Likewise.
18493 * call.c (build_scoped_method_call): Use special_function_kind
18494 values to indicate the kind of destruction to be done.
18495 (build_method_call): Likewise.
18496 * decl.c (finish_destructor_body): Likewise.
18497 (maybe_build_cleanup_1): Likewise. Rename to ...
18498 (maybe_build_cleanup): ... this.
18499 * decl2.c (delete_sanity): Use special_function_kind
18500 values to indicate the kind of destruction to be done.
18501 (build_cleanup): Likewise.
18502 * init.c (perform_member_init): Likewise.
18503 (build_vec_delete_1): Likewise.
18504 (build_dtor_call): Simplify.
18505 (build_delete): Use special_function_kind
18506 values to indicate the kind of destruction to be done.
18507 (build_vbase_delete): Likewise.
18508 (build_vec_delete): Likewise.
18509
18510 * init.c (sort_member_init): Fix typo in error message generation
18511 code.
18512
18513 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
18514
18515 * semantics.c (begin_class_definition): make the packed
18516 attribute be sensitive to the "-fpack-struct" command line flag
18517
18518 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
18519
18520 Update new-abi upcast algorithm.
18521 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18522 prototype and meaning of return value.
18523 (__si_class_type_info::__do_upcast): Likewise.
18524 (__vmi_class_type_info::__do_upcast): Likewise.
18525 * tinfo.cc (__class_type_info::__upcast_result): Replace
18526 whole2dst with part2dst. Adjust ctor.
18527 (__class_type_info::__do_upcast): Adjust call of worker function.
18528 (__class_type_info::__do_upcast): Adjust.
18529 (__si_class_type_info::__do_upcast): Adjust. Use parent's
18530 __do_upcast.
18531 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18532 virtual base in diamond hierarchy bug.
18533
18534 2000-05-23 Mark Mitchell <mark@codesourcery.com>
18535
18536 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18537 and bitfield to tinfo_fn_p.
18538 (DECL_TINFO_FN_P): Adjust.
18539 (SET_DECL_TINFO_FN_P): Likewise.
18540 (DECL_MUTABLE_P): Likewise.
18541 (DECL_C_BIT_FIELD): Likewise.
18542 (SET_DECL_C_BIT_FIELD): Likewise.
18543 (CLEAR_DECL_C_BIT_FIELD): Likewise.
18544 (DECL_UNINLINABLE): Likewise.
18545 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18546 (handle_using_decl): Remove assertion.
18547 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18548 to build FIELD_DECLs.
18549 (build_base_field): Likewise.
18550 (layout_class_type): Likewise.
18551 * decl.c (init_decl_processing): Likewise.
18552 (build_ptrmemfunc_type): Likewise.
18553 (grokdeclarator): Likewise.
18554 * decl2.c (grok_x_components): Likewise.
18555 * except.c (call_eh_info): Likewise.
18556 * init.c (init_init_processing): Likewise.
18557 * rtti.c (expand_class_desc): Likewise.
18558 (create_pseudo_type_info): Likewise.
18559 (get_vmi_pseudo_type_info): Likewise.
18560 (create_tinfo_types): Likewise.
18561 * ptree.c (print_lang_decl): Adjust.
18562 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18563 before checking DECL_MUTABLE_P.
18564
18565 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18566 parameters for template functions.
18567 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18568 destructors as well as constructors.
18569
18570 2000-05-22 Mark Mitchell <mark@codesourcery.com>
18571
18572 * class.c (build_ctor_vtbl_group): Set inits.
18573 * optimize.c (maybe_clone_body): Set DECL_INLINE and
18574 DECL_THIS_INLINE appropriately for clones.
18575
18576 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18577 (DECL_CONV_FN_P): Simplify.
18578 (DECL_OPERATOR): Remove.
18579 (language_to_string): Declare.
18580 * decl.c (duplicate_decls): Fix typo in comment.
18581 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18582 (grok_op_properties): Use DECL_CONV_FN_P instead of
18583 IDENTIFIER_TYPENAME_P.
18584 * dump.c (dequeue_and_dump): Dump the language linkage of
18585 declarations.
18586 * error.c (language_to_string): Give it external linkage.
18587 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18588 (implicitly_declare_fn): Set DECL_LANGUAGE.
18589 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18590 IDENTIFIER_TYPENAME_P.
18591 (tsubst_decl): Likewise.
18592 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18593 * semantics.c (finish_member_declaration): Don't mark members of
18594 classes declared in an extern "C" region as extern "C".
18595
18596 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18597
18598 * decl2.c (qualified_lookup_using_namespace): Look through
18599 namespace aliases.
18600
18601 * decl.c (push_using_decl): Return the old decl on namespace level.
18602
18603 2000-05-21 Mark Mitchell <mark@codesourcery.com>
18604
18605 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18606 (VTT_NAME_PREFIX): New macro.
18607 (CTOR_VTBL_NAME_PREFIX): Likewise.
18608 (get_ctor_vtbl_name): New function.
18609 * class.c (get_vtable_name): Simplify.
18610 (get_vtt_name): New function.
18611 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18612 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18613 when a virtual base becomes primary.
18614 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
18615 VTTs.
18616 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18617 additional parameters.
18618 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18619 (initialize_array): New function.
18620 (build_vtt): Likewise.
18621 (build_vtt_inits): Likewise.
18622 (dfs_build_vtt_inits): Likewise.
18623 (dfs_fixup_binfo_vtbls): Likewise.
18624 (build_ctor_vtbl_group): Likewise.
18625 (initialize_vtable): Use initialize_array.
18626 (accumulate_vtbl_inits): Reimplement to handle construction
18627 vtables.
18628 (dfs_accumulate_vtbl_inits): Likewise.
18629 (bulid_vtbl_initializer): Adjust parameter name.
18630 * method.c (build_typename_overload): Remove #if 0'd code.
18631 (get_ctor_vtbl_name): New function.
18632 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18633 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18634
18635 * cp-tree.h (struct lang_type): Remove search_slot.
18636 (CLASSTYPE_SEARCH_SLOT): Remove.
18637 (emit_base_init): Change prototype.
18638 (initialize_vtbl_ptrs): Likewise.
18639 (expand_indirect_vtbls_init): Likewise.
18640 (clear_search_slots): Remove.
18641 * decl.c (lang_mark_tree): Don't mark search_slot.
18642 * init.c (initialize_vtbl_ptrs): Simplify.
18643 (emit_base_init): Likewise.
18644 * search.c (struct vbase_info): Document decl_ptr.
18645 (convert_pointer_to_single_level): Remove.
18646 (dfs_find_vbases): Remove.
18647 (dfs_init_base_pointers): Simplify.
18648 (dfs_clear_vbase_slots): Remove.
18649 (dfs_vtable_path_unmark): New function.
18650 (init_vbase_pointers): Simplify.
18651 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18652 (expand_indirect_vtbls_init): Simplify. Don't call
18653 mark_all_temps_used.
18654 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18655 initialize_vtbl_ptrs.
18656
18657 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
18658
18659 * except.c: Add static prototypes.
18660
18661 2000-05-20 H.J. Lu <hjl@gnu.org>
18662
18663 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18664
18665 2000-05-19 Mark Mitchell <mark@codesourcery.com>
18666
18667 Don't create a separate copy of virtual bases for the
18668 CLASSTYPE_VBASECLASSES list.
18669 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18670 (BINFO_FOR_VBASE): Remove.
18671 (CANONICAL_BINFO): Adjust.
18672 (binfo_for_vbase): New function.
18673 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18674 instead of BINFO_FOR_VBASE.
18675 (build_vbase_pointer): Likewise.
18676 (build_secondary_vtable): Likewise.
18677 (dfs_mark_primary_bases): Likewise.
18678 (mark_primary_bases): Likewise.
18679 (layout_nonempty_base_or_field): Likewise.
18680 (dfs_set_offset_for_shared_vbases): Likewise.
18681 (dfs_set_offset_for_unshared_vbases): Likewise.
18682 (layout_virtual_bases): Likewise. Adjust for changes to the
18683 CLASSTYPE_VBASECLASSES list.
18684 (dump_class_hierarchy_r): Use binfo_for_vbase
18685 instead of BINFO_FOR_VBASE.
18686 (dump_class_hierarchy): Likewise.
18687 (finish_vtbls): Likewise.
18688 (build_vtbl_initializer): Adjust for changes to the
18689 CLASSTYPE_VBASECLASSES list.
18690 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18691 * decl.c (finish_destructor_body): Adjust for changes to the
18692 CLASSTYPE_VBASECLASSES list.
18693 * init.c (sort_base_init): Use binfo_for_vbase.
18694 (construct_virtual_bases): Adjust for changes to the
18695 CLASSTYPE_VBASECLASSES list.
18696 (expand_member_init): Use binfo_for_vbase.
18697 (build_vbase_delete): Adjust for changes to the
18698 CLASSTYPE_VBASECLASSES list.
18699 * method.c (do_build_copy_constructor): Likewise.
18700 * rtti.c (get_base_offset): Use binfo_for_vbase.
18701 (expand_class_desc): Remove #if 0'd code.
18702 * search.c (struct vbase_info): Remove vbase_types.
18703 (get_base_distance): Use binfo_for_vbase.
18704 (lookup_field_queue_p): Use CANONICAL_BINFO.
18705 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18706 (get_pure_virtuals): Adjust for changes to the
18707 CLASSTYPE_VBASECLASSES list.
18708 (dfs_find_vbases): Use binfo_for_vbase.
18709 (dfs_init_vbase_pointers): Likewise.
18710 (init_vbase_pointers): Don't initialize vi.vbase_types.
18711 (virtual_context): Use binfo_for_vbase.
18712 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18713 CLASSTYPE_VBASECLASSES list.
18714 (expand_indirect_vtbls_init): Simplify.
18715 (dfs_get_vbase_types): Don't replicate virtual bases.
18716 (find_vbase_instance): Use binfo_for_vbase.
18717 (binfo_for_vbase): New function.
18718 * typeck.c (get_delta_difference): Use binfo_for_vbase.
18719
18720 2000-05-17 Mark Mitchell <mark@codesourcery.com>
18721
18722 * decl2.c (finish_anon_union): Generalize error messages to handle
18723 anonymous structures.
18724 * init.c (perform_member_init): Remove `name' parameter.
18725 (build_field_list): New function.
18726 (sort_member_init): Handle anonymous union initialization order
18727 correctly. Check for multiple initializations of the same union.
18728 (emit_base_init): Don't look up fields by name here.
18729 (expand_member_init): Record the result of name lookup for future
18730 reference.
18731 * typeck.c (build_component_ref): Fix formatting.
18732
18733 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
18734
18735 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18736 * typeck.c (build_x_compound_expr): Replace warn_unused with
18737 warn_unused_value.
18738
18739 * decl2.c (lang_decode_option): Update -Wall unused flags by
18740 calling set_Wunused.
18741
18742 2000-05-16 Mark Mitchell <mark@codesourcery.com>
18743
18744 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18745 * init.c (dfs_vtable_path_unmark): Remove.
18746 * search.c (marked_new_vtable_p): Likewise.
18747 (unmarked_new_vtable_p): Likewise.
18748 (dfs_search_slot_nonempty_p): Likewise.
18749 (dfs_mark): Likewise.
18750 (dfs_vtable_path_unmark): Likewise.
18751 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18752 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18753 (dfs_init_vbase_pointers): Remove special-case new ABI code.
18754 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18755 (init_vbase_pointers): Simplify.
18756 (expand_indirect_vtbls_init): Likewise.
18757
18758 * class.c (copy_virtuals): New function.
18759 (build_primary_table): Use it.
18760 (build_secondary_vtable): Likewise.
18761 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18762 indicate that no vcall offset is required.
18763 (add_virtual_function): Likewise.
18764 (modify_all_vtables): Likewise.
18765 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18766 (dfs_accumulate_vtbl_inits): Likewise.
18767 (build_vtbl_initializer): Make changes to handle construction
18768 vtables.
18769 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18770 (build_rtti_vtbl_entries): Likewise.
18771 (build_vtable_entries): Handle a NULL vcall_index.
18772
18773 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
18774
18775 * decl2.c (lang_decode_option): Fix thinko.
18776
18777 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
18778
18779 * except.c (check_handlers): New fn.
18780 * cp-tree.h: Declare it.
18781 * semantics.c (finish_handler_sequence): Call it.
18782 (finish_function_handler_sequence): Likewise.
18783 (finish_handler_parms): Set TREE_TYPE on the handler.
18784 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18785 * search.c (get_base_distance_recursive): If protect>1, ignore
18786 special access.
18787 (get_base_distance): Don't reduce watch_access.
18788
18789 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
18790
18791 * lex.c: #include diagnostic.h.
18792 (lang_init_options): Set default prefixing rules.
18793
18794 * lang-options.h: Add -fdiagnostics-show-location=.
18795
18796 * decl2.c: #include diagnostic.h.
18797 (lang_decode_option): Handle -fdiagnostics-show-location=.
18798
18799 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
18800
18801 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18802 * vec.cc: Revert my 2000-05-07 change.
18803
18804 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
18805
18806 * class.c (check_field_decls): Complain about non-static data
18807 members with same name as class in class with constructor.
18808
18809 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
18810
18811 * decl.c (grokdeclarator): Allow non-static data members with
18812 same name as class.
18813
18814 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
18815
18816 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18817 and pending_inline.filename. Update prototypes.
18818 * decl.c (define_label): Constify filename parameter.
18819 * decl2.c (warn_if_unknown_interface): Constify local char *.
18820 * input.c Constify input_source.filename. Don't declare
18821 input_filename or lineno. Constify filename parameter to feed_input.
18822 * lex.c (init_parse): Constify parameter and return value.
18823 (cp_pragma_interface, cp_pragma_implementation): Constify
18824 filename argument.
18825 (reinit_parse_for_method, reinit_parse_for_block,
18826 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18827 Constify local char *.
18828 * pt.c: Don't declare lineno or input_filename.
18829 (print_template_context, tsubst_friend_function, tsubst_decl,
18830 tsubst, instantiate_decl): Constify local char *.
18831 * semantics.c (expand_body): Constify local char *.
18832 * tree.c (build_srcloc): Constify filename parameter.
18833 * typeck.c (c_expand_asm_operands): Constify filename
18834 parameter.
18835
18836 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
18837
18838 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18839 offsetof expansion.
18840
18841 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
18842
18843 * inc/cxxabi.h: Fix typos in comment.
18844 (__base_class_info::__offset): Use a static_cast.
18845
18846 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
18847
18848 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18849 of std::size_t and std::ptrdiff_t respectively.
18850 * tinfo.cc: Likewise.
18851 * vec.cc: Likewise.
18852
18853 2000-05-06 Richard Henderson <rth@cygnus.com>
18854
18855 * typeck.c (build_c_cast): Don't warn integer->pointer size
18856 mismatch for constants.
18857
18858 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
18859
18860 * rtti.c (ptmd_initializer): Set non-public, if class is
18861 incomplete.
18862
18863 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18864 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18865 __cxa_vec_delete): Likewise.
18866 * tinfo.cc (__dynamic_cast): Likewise.
18867 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18868 __cxa_vec_delete): Likewise.
18869
18870 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18871
18872 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18873 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18874 (lang_decl_flags): Add vcall_offset.
18875 (THUNK_VCALL_OFFSET): Use it.
18876 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18877 * method.c (make_thunk): Create the lang_decl here, not in
18878 emit_thunk.
18879 (emit_thunk): Make generic thunks into ordinary functions once
18880 they have been fed to expand_body.
18881 * semantics.c (expand_body): Set current_function_is_thunk here.
18882
18883 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18884
18885 * class.c (update_vtable_entry_for_fn): Prototype.
18886
18887 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18888 and `tmpl'.
18889
18890 * search.c (dfs_build_inheritance_graph_order): Prototype.
18891
18892 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18893
18894 * cp-tree.h (special_function_kind): Add various kinds of
18895 destructors.
18896 (special_function_p): New function.
18897 * class.c (overrides): Don't let one kind of destructor override
18898 another.
18899 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18900 whether or not to instantiate a template.
18901 * tree.c (special_function_p): Define.
18902
18903 2000-05-03 Mark Mitchell <mark@codesourcery.com>
18904
18905 * cp-tree.def (THUNK_DECL): Remove.
18906 * cp-tree.h (DECL_THUNK_P): New macro.
18907 (DECL_NON_THUNK_FUNCTION_P): Likewise.
18908 (DECL_EXTERN_C_FUNCTION_P): Likewise.
18909 (SET_DECL_THUNK_P): Likewise.
18910 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18911 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18912 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18913 * decl.c (decls_match): Use DECL_EXTERN_C_P.
18914 (duplicate_decls): Likewise.
18915 (pushdecl): Likewise. Adjust thunk handling.
18916 (grokfndecl): Use DECL_EXTERN_C_P.
18917 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18918 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18919 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18920 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18921 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
18922 DECL_NO_STATIC_CHAIN.
18923 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
18924 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18925 * search.c (covariant_return_p): Remove THUNK_DECL handling.
18926 * ir.texi: Update.
18927
18928 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
18929
18930 * tree.c (walk_tree): Set lineno.
18931
18932 2000-05-01 Mark Mitchell <mark@codesourcery.com>
18933
18934 * exception.cc: Update license notice.
18935 * new.cc: Likewise.
18936 * new1.cc: Likewise.
18937 * new2.cc: Likewise.
18938 * tinfo.cc: Likewise.
18939 * tinfo2.cc: Likewise.
18940 * vec.cc: Likewise.
18941 * inc/cxxabi.h: Likewise.
18942 * inc/exception: Likewise.
18943 * inc/new: Likewise.
18944 * inc/new.h: Likewise.
18945 * inc/typeinfo: Likewise.
18946
18947 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
18948
18949 * tree.c (build_target_expr_with_type): If we already have a
18950 TARGET_EXPR, just return it.
18951
18952 * optimize.c (initialize_inlined_parameters): Don't generate an
18953 EXPR_STMT if we can just use DECL_INITIAL.
18954 * decl.c (emit_local_var): Only make the initialization a
18955 full-expression if stmts_are_full_exprs_p.
18956
18957 2000-05-01 Mark Mitchell <mark@codesourcery.com>
18958
18959 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18960 macro.
18961 * call.c (standard_conversion): Use it.
18962 (direct_reference_binding): Likewise.
18963 (build_over_call): Likewise.
18964 (is_properly_derived_from): Likewise.
18965 (compare_ics): Likewise.
18966 * class.c (resolves_to_fixed_type_p): Likewise.
18967 * optimize.c (declare_return_variable): Likewise.
18968 * pt.c (is_specialization_of): Likewise.
18969 (unify): Likewise.
18970 * typeck.c (comp_target_parms): Likeiwse.
18971 (build_static_cast): Likewise.
18972 (build_reinterpret_cast): Likewise.
18973 (build_const_cast): Likewise.
18974 (comp_ptr_ttypes_real): Likewise.
18975 (comp_ptr_ttypes_const): Likewise.
18976 * typeck2.c (process_init_constructor): Likewise.
18977
18978 2000-04-30 Scott Snyder <snyder@fnal.gov>
18979
18980 * decl.c (finish_destructor_body): Use the base destructor when
18981 destroying virtual bases.
18982
18983 2000-04-30 Mark Mitchell <mark@codesourcery.com>
18984
18985 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18986 STMT_EXPRs.
18987 * optimize.c (struct inline_data): Add target_exprs field.
18988 (declare_return_variable): When a function returns an aggregate,
18989 use the variable declared in the TARGET_EXPR as the remapped
18990 DECL_RESULT.
18991 (expand_call_inline): Update the pending target_exprs stack.
18992 (optimize_function): Initialize the stack.
18993
18994 * decl2.c (finish_file): Fix typo in comment.
18995
18996 * method.c (emit_thunk): Don't try to return a `void' value.
18997
18998 * optimize.c (initialize_inlined_parameters): If the parameter is
18999 addressable, we need to make a new VAR_DECL, even if the
19000 initializer is constant.
19001
19002 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
19003
19004 * decl.c (grok_op_properties): Add an extra check of argtypes.
19005
19006 2000-04-27 Mark Mitchell <mark@codesourcery.com>
19007
19008 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19009 variables.
19010 (initialize_inlined_parameters): Try to avoid creating new
19011 VAR_DECLs.
19012
19013 2000-04-27 Alex Samuel <samuel@codesourcery.com>
19014
19015 * lex.c (my_get_run_time): Remove.
19016 (init_filename_times): Use get_run_time instead of my_get_run_time.
19017 (check_newline): Likewise.
19018 (dump_time_statistics): Likewise.
19019 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19020 of computing elapsed time explicitly.
19021
19022 2000-04-26 Mark Mitchell <mark@codesourcery.com>
19023
19024 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19025 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19026 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19027 before calling decl_constant_value.
19028 * class.c (check_bitfield_decl): Likewise.
19029 * cvt.c (ocp_convert): Likewise.
19030 (convert): Likewise.
19031 * decl.c (compute_array_index_type): Likewise.
19032 (build_enumerator): Likewise.
19033 * decl2.c (check_cp_case_value): Likewise.
19034 * pt.c (convert_nontype_argument): Likewise.
19035 (tsubst): Likewise.
19036 * typeck.c (decay_conversion): Likewise.
19037 (build_compound_expr): Likewise.
19038 (build_reinterpret_cast): Likewise.
19039 (build_c_cast): Likewise.
19040 (convert_for_assignment): Likewise.
19041
19042 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
19043
19044 * decl.c (finish_function): Don't play games with DECL_INLINE.
19045
19046 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
19047
19048 * ir.texi: Correct typo.
19049
19050 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19051
19052 * decl.c (grokdeclarator): Reject VLAs as members.
19053
19054 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
19055
19056 * call.c (standard_conversion): Accept conversion between
19057 COMPLEX_TYPEs.
19058
19059 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19060
19061 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
19062
19063 * decl2.c (finish_file): Remove double setup for accounting
19064 compile time.
19065
19066 2000-04-24 Robert Lipe <robertlipe@usa.net>
19067
19068 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19069
19070 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
19071
19072 * new.cc (set_new_handler): Needs to be in std::.
19073
19074 2000-04-23 Mark Mitchell <mark@codesourcery.com>
19075
19076 * cp-tree.h (lang_decl): Remove pretty_function_p.
19077 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19078 language-specific node.
19079 * decl.c (cp_make_fname_decl): Use build_decl, not
19080 build_lang_decl, to build the variables.
19081 (grokvardecl): Don't call build_lang_decl for local variables in
19082 templates.
19083 (grokdeclarator): Don't call build_lang_decl for local type
19084 declarations in templates.
19085 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19086 zero'd memory, rather than calling memset.
19087 * pt.c: Include hashtab.h.
19088 (local_specializations): New variable.
19089 (retrieve_local_specialization): Use it.
19090 (register_local_specialization): Likewise.
19091 (tsubst_decl): Don't assume local variables have
19092 DECL_LANG_SPECIFIC.
19093 (instantiate_decl): Set up local_specializations.
19094 * Makefile.in (HTAB_H): New variable.
19095
19096 2000-04-23 Richard Henderson <rth@cygnus.com>
19097
19098 * typeck.c (c_expand_asm_operands): Restore the original
19099 contents of the output list.
19100
19101 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
19102
19103 * ir.texi: Document complex number representation.
19104
19105 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
19106
19107 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19108 (target_incomplete_p): New function.
19109 (tinfo_base_init): Create comdat NTBS name variable.
19110 (ptr_initializer): Add non_public parameter. Calculate it.
19111 (ptmd_initializer): Likewise.
19112 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19113 (create_real_tinfo_var): Add non_public parameter. Use it.
19114 Push proxy into global namespace.
19115 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19116 New enumeration.
19117 * inc/typeinfo (type_info::before, type_info::operator==):
19118 Compare __name addresses.
19119
19120 * tinfo2.cc: Remove new-abi builtins comment.
19121
19122 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
19123
19124 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19125
19126 * call.c (joust): Exit early if we get the same function, too.
19127
19128 * decl2.c (key_method): Return NULL_TREE for template classes.
19129 (import_export_class): Don't need to check for template classes.
19130
19131 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
19132
19133 * lex.c: Remove references to cccp.c.
19134
19135 2000-04-18 Mark Mitchell <mark@codesourcery.com>
19136
19137 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19138 volatile_memfunc. Add destructor_attr. Adjust dummy.
19139 (DECL_DESTRUCTOR_P): Use destructor_attr.
19140 (DECL_CONST_MEMFUNC_P): Reimplement.
19141 (DECL_VOLATILE_MEMFUNC_P): Remove.
19142 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19143 (overrides): Use DECL_DESTRUCTOR_P.
19144 (check_for_override): Likewise.
19145 * decl.c (start_function): Likewise.
19146 * decl2.c (grokfclassfn): Likewise.
19147 (check_classfn): Likewise.
19148 (grok_function_init): Likewise.
19149
19150 2000-04-17 Mark Mitchell <mark@codesourcery.com>
19151
19152 * decl2.c (grokfield): Issue error on illegal data member
19153 declaration.
19154
19155 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
19156
19157 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19158
19159 2000-04-16 Mark Mitchell <mark@codesourcery.com>
19160
19161 * class.c (build_vtable_entry): Don't build thunks for type-info
19162 functions.
19163
19164 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
19165
19166 * decl.c (decls_match): Allow a redeclaration of a builtin to
19167 specify args while the builtin did not.
19168
19169 2000-04-15 Mark Mitchell <mark@codesourcery.com>
19170
19171 * cp-tree.def (THUNK_DECL): Add to documentation.
19172 * cp-tree.h (flag_huge_objects): Declare.
19173 * class.c (modify_vtable_entry): Tidy.
19174 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19175 Calculate delta appropriately for the new ABI.
19176 (dfs_modify_vtables): Use it.
19177 (modify_all_vtables): Fix thinko in code to add overriding copies
19178 of functions to primary vtables.
19179 (build_clone): Fix typo in comment.
19180 (clone_function_decl): Correct order of destructors in vtable.
19181 (build_vbase_offset_vtbl_entries): Adjust comment.
19182 (dfs_vcall_offset_queue_p): Remove.
19183 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19184 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19185 (build_vtable_entry): Correct check for pure virtual functions.
19186 Don't declare flag_huge_objects.
19187 * decl.c (flag_huge_objects): Remove declaration.
19188 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19189 Use int_size_in_bytes.
19190 (emit_thunk): Handle vcall offset thunks.
19191
19192 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19193
19194 * decl2.c (parse_time, varconst_time): Delete declarations.
19195 (finish_file): Delete LINENO declaration.
19196 START_TIME and THIS_TIME now long.
19197
19198 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
19199
19200 * class.c (build_base_field): Reformat comment.
19201
19202 * inc/cxxabi.h (stddef.h): Comment inclusion.
19203 (__base_class_info::__offset): Comment shift.
19204
19205 2000-04-12 Mark Mitchell <mark@codesourcery.com>
19206
19207 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19208 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19209 (cp_push_exception_identifier): New macro.
19210 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19211 (DECL_BASE_DESTRUCTOR_P): Likewise.
19212 (DECL_DELETING_DESTRUCTOR_P): Likewise.
19213 (get_vtbl_decl_for_binfo): Fix formatting.
19214 (in_charge_arg_for_name): New macro.
19215 (maybe_build_cleanup_and_delete): Remove declaration.
19216 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19217 (in_charge_arg_for_name): New function.
19218 (build_new_method_call): Use it. Handle cloned destructors.
19219 (build_clone): Don't make the base constructor virtual.
19220 Automatically defer generated functions.
19221 (clone_function_decl): Handle destructors, too.
19222 (clone_constructors_and_destructors): Likewise.
19223 (create_vtable_ptr): Don't create a vtable entry for a cloned
19224 function.
19225 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19226 (initialize_predefined_identifiers): Update appropriately.
19227 (finish_destructor_body): Simplify.
19228 (maybe_build_cleanup_and_delete): Remove.
19229 * except.c (expand_throw): Handle new-ABI destructors.
19230 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19231 (build_dtor_call): New function.
19232 (build_delete): Use it. Simplify.
19233 * optimize.c (maybe_clone_body): Handle destructors.
19234 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19235
19236 * exception.cc (cleanup_fn): New typedef.
19237 (CALL_CLEANUP): New macro.
19238 (cp_eh_info): Use them.
19239 (__cp_push_exception): Likewise.
19240 (__cp_pop_exception): Likewise.
19241
19242 2000-04-11 Mark Mitchell <mark@codesourcery.com>
19243
19244 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19245 (complete_dtor_identifier): New macro.
19246 (CLASSTYPE_FIRST_CONVERSION): Remove.
19247 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19248 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19249 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19250 (CLASSTYPE_CONSTRUCTORS): Likewise.
19251 (CLASSTYPE_DESTRUCTORS): Likewise.
19252 (lang_decl): Add cloned_function.
19253 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19254 (DECL_BASE_CONSTRUCTOR_P): Likewise.
19255 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19256 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19257 (DECL_CLONED_FUNCTION_P): Likewise.
19258 (DECL_CLONED_FUNCTION): Likewise.
19259 (clone_function_decl): Declare.
19260 (maybe_clone_body): Likewise.
19261 * call.c (build_user_type_conversion_1): Call complete object
19262 constructors in the new ABI.
19263 (build_new_method_call): Don't add in-charge parameters under the
19264 new ABI.
19265 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19266 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19267 CLASSTYPE_DESTRUCTOR_SLOT.
19268 (build_clone): New function.
19269 (clone_function_decl): Likewise.
19270 (clone_constructors_and_destructors): Likewise.
19271 (check_bases_and_members): Use it.
19272 * decl.c (iniitialize_predefined_identifiers): Initialize
19273 complete_dtor_identifier.
19274 (finish_function): Don't add extra code to a clone.
19275 (lang_mark_tree): Mark cloned_function.
19276 * decl2.c (mark_used): Don't bother trying to instantiate things
19277 we synthesized.
19278 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19279 * method.c (set_mangled_name_for_decl): Don't treat clones as
19280 constructors.
19281 (synthesize_method): Sythesize cloned functions, not the clones.
19282 * optimize.c (inline_data): Update comment on ret_label.
19283 (remap_block): Don't assume DECL_INITIAL exists.
19284 (copy_body_r): Allow ret_label to be NULL.
19285 (maybe_clone_body): Define.
19286 * pt.c (tsubst_decl): Handle clones.
19287 (instantiate_clone): New function.
19288 (instantiate_template): Use it.
19289 (set_mangled_name_for_template_decl): Don't treat clones as
19290 constructors.
19291 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19292 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19293 * semantics.c (expand_body): Clone function bodies as necessary.
19294
19295 * optimize.c (remap_decl): Avoid sharing structure for arrays
19296 whose size is only known at run-time.
19297 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19298
19299 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19300 to has_in_charge_parm_p.
19301 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19302 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19303 (DECL_COPY_CONSTRUCTOR_P): New macro.
19304 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19305 (build_user_type_conversion_1): Likewise.
19306 (convert_like_real): Likewise.
19307 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
19308 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19309 (copy_args_p): Likewise.
19310 (grok_ctor_properties): Likewise.
19311 (start_function): Likewise.
19312 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
19313 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19314 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19315 * method.c (do_build_copy_constructor): Use
19316 DECL_HAS_IN_CHARGE_PARM_P.
19317 (synthesize_method): Likewise.
19318 * pt.c (instantiate_template): Remove goto.
19319 * tree.c (build_cplus_method_type): Remove mention of obstacks in
19320 comment.
19321
19322 * cp-tre.h (finish_function): Change prototype.
19323 * decl.c (end_cleanup_fn): Adjust caller.
19324 (finish_function): Take only one parameter.
19325 * decl2.c (finish_objects): Adjust caller.
19326 (finish_static_storage_duration_function): Likewise.
19327 * method.c (emit_thunk): Likewise.
19328 * parse.y: Likewise.
19329 * parse.c: Regenerated.
19330 * pt.c (instantiate_decl): Likewise.
19331 * rtti.c (synthesize_tinfo_fn): Likewise.
19332 * semantics.c (expand_body): Likewise.
19333
19334 * cp-tree.h (copy_decl): New function.
19335 * class.c (finish_struct_1): Use it.
19336 * lex.c (copy_decl): Define it.
19337 * pt.c (tsubst_decl): Likewise.
19338 * tree.c (copy_template_template_parm): Likewise.
19339
19340 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19341 has_nonpublic_assign_ref.
19342 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19343 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19344 * class.c (finish_struct_methods): Don't set
19345 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19346 (interface_only): Don't declare.
19347 (interface_unknown): Likewise.
19348
19349 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19350
19351 * tree.h (HAVE_TEMPLATES): Remove definition.
19352 * lang-options.h (-fthis-is-variable): Remove documentation.
19353
19354 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
19355
19356 * class.c (instantiate_type): Handle object-relative template-id.
19357
19358 * semantics.c (finish_expr_stmt): Call convert_to_void here.
19359 * decl.c (cplus_expand_expr_stmt): Not here.
19360
19361 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19362 Initialize exprtype earlier.
19363
19364 * parse.y (fn.def1): Check for defining types in return types.
19365
19366 * decl.c (check_tag_decl): Notice extra fundamental types.
19367 Diagnose empty decls in classes, too.
19368
19369 * decl.c (grokdeclarator): Don't override an anonymous name if no
19370 declarator was given.
19371
19372 * cvt.c (convert_to_void): Call resolve_offset_ref.
19373
19374 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19375
19376 * decl2.c (decl_namespace): Handle getting a type.
19377
19378 * typeck.c (build_c_cast): Re-enable warning for cast between
19379 pointer and integer of different size.
19380
19381 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
19382
19383 * inc/cxxabi.h (__pointer_type_info): Add restrict and
19384 incomplete flags.
19385 (__pointer_type_info::__pointer_catch): New virtual function.
19386 (__pointer_to_member_type_info): Derive from
19387 __pointer_type_info. Adjust.
19388 (__pointer_to_member_type_info::__do_catch): Remove.
19389 (__pointer_to_member_type_info::__is_pointer_p): Declare.
19390 (__pointer_to_member_type_info::__pointer_catch): Declare.
19391 * rtti.c (qualifier_flags): Add restrict flag.
19392 (ptmd_initializer): Reorder members.
19393 (create_tinfo_types): Expand comments. Reorder
19394 ptmd_desc_type_node members.
19395 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19396 Implement.
19397 (__pointer_type_info::__do_catch): Move specific code into
19398 __pointer_catch. Call it.
19399 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19400 specific catch checking. Fix void conversion check.
19401 (__pointer_to_member_type_info::__do_catch): Remove.
19402 (__pointer_to_member_type_info::__pointer_catch): Implement.
19403
19404 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19405
19406 * lex.c (init_parse): Remove traces of classof and headof.
19407 * decl2.c (flag_operator_names): Default to 1.
19408 (lang_decode_option): Do not set it for -ansi.
19409
19410 2000-04-09 Mark Mitchell <mark@codesourcery.com>
19411
19412 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19413 (DECL_MAIN_VARIANT): Remove.
19414 * decl.c (duplicate_decls): Don't set it.
19415 (start_function): Likewise.
19416 (lang_mark_tree): Don't mark it.
19417 * decl2.c (defer_fn): Don't use it.
19418 * lex.c (retrofit_lang_decl): Don't set it.
19419 * pt.c (tsubst_decl): Likewise.
19420 * ptree.c (print_lang_decl): Don't print it.
19421 * typeck.c (mark_addressable): Don't use it.
19422
19423 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19424
19425 * vec.cc: Include <new> and <exception>.
19426 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19427 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19428 terminate.
19429 (__cxa_vec_delete): Catch dtor exceptions.
19430
19431 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19432
19433 Prepend __ to implementation defined names.
19434 * inc/typeinfo (type_info): Rename _name to __name.
19435 (type_info::type_info): Rename parameter.
19436 (type_info::operator==, type_info::operator!=,
19437 type_info::before): Likewise.
19438 (type_info::is_pointer_p, type_info::is_function_p,
19439 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19440 parameters.
19441 * inc/cxxabi.h
19442 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19443 (__pointer_type_info::__pointer_type_info): Likewise.
19444 (__pointer_type_info::is_pointer_p,
19445 __pointer_type_info::do_catch): Prepend __. Rename parameters.
19446 (__array_type_info::__array_type_info): Rename parameters.
19447 (__function_type_info::__function_type_info): Likewise.
19448 (__function_type_info::is_function_p): Prepend __.
19449 (__enum_type_info::__enum_type_info): Rename parameters.
19450 (__pointer_to_member_type_info::__pointer_to_member_type_info):
19451 Likewise.
19452 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19453 parameters.
19454 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19455 (__class_type_info::__class_type_info): Rename parameters.
19456 (__class_type_info::sub_kind): Prepend __. Adjust member names.
19457 (__class_type_info::upcast_result,
19458 __class_type_info::dyncast_result): Prepend __. Move definition
19459 into tinfo.cc.
19460 (__class_type_info::do_upcast, __class_type_info::do_catch,
19461 __class_type_info::find_public_src,
19462 __class_type_info::do_dyncast,
19463 __class_type_info::do_find_public_src): Prepend __. Rename
19464 parameters.
19465 (__si_class_type_info::__si_class_type_info): Rename parameters.
19466 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19467 __si_class_type_info::do_find_public_src): Prepent __. Rename
19468 parameters.
19469 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19470 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19471 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19472 parameters.
19473 (__dynamic_cast): Rename parameters.
19474 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19475 type_info::do_catch, type_info::do_upcast): Prepend __.
19476 (contained_p, public_p, virtual_p, contained_public_p,
19477 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19478 (__class_type_info::do_catch,
19479 __class_type_info::do_upcast): Prepend __. Adjust.
19480 (__class_type_info::__upcast_result,
19481 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19482 Adjust.
19483 (__class_type_info::find_public_src): Prepend __. Adjust.
19484 (__class_type_info::do_find_public_src,
19485 __si_class_type_info::do_find_public_src,
19486 __vmi_class_type_info::do_find_public_src): Likewise.
19487 (__class_type_info::do_dyncast,
19488 __si_class_type_info::do_dyncast,
19489 __vmi_class_type_info::do_dyncast): Likewise.
19490 (__class_type_info::do_upcast,
19491 __si_class_type_info::do_upcast,
19492 __vmi_class_type_info::do_upcast): Likewise.
19493 (__dynamic_cast): Adjust.
19494 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19495 (__function_type_info::is_function_p): Likewise.
19496 (__pointer_type_info::do_catch): Likewise. Adjust.
19497 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19498 (__throw_type_match_rtti_2): Adjust.
19499 (__is_pointer): Adjust.
19500
19501 2000-04-08 Mark Mitchell <mark@codesourcery.com>
19502
19503 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19504 (complete_ctor_identifier): New macro.
19505 (special_function_kind): Add sfk_copy_constructor and
19506 sfk_assignment_operator.
19507 (LOOKUP_HAS_IN_CHARGE): Remove.
19508 (cons_up_default_function): Rename to ...
19509 (implicitly_declare_fn): ... this.
19510 * call.c (build_new_method_call): Add in-charge parameters for
19511 constructors here.
19512 * class.c (add_implicitly_declared_members): Change parameter name
19513 from cant_have_assignment to cant_have_const_assignment.
19514 Replace calls to cons_up_default_function to implicitly_declare_fn.
19515 * cvt.c (ocp_convert): Use complete_ctor_identifier.
19516 * decl.c (initialize_predefined_identifiers): Initialize it.
19517 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19518 complex expression.
19519 * init.c (expand_default_init): Don't calculate the in-charge
19520 parameter here.
19521 (build_new_1): Likewise.
19522 * lex.c (cons_up_default_function): Move to method.c.
19523 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19524 (implicitly_declare_fn): New function.
19525 * typeck.c (build_static_cast): Use complete_ctor_identifier.
19526 (build_modify_expr): Likewise.
19527 * typeck2.c (build_functional_cast): Likewise.
19528
19529 Under the new ABI, constructors don't return `this'.
19530 * cp-tree.h (warn_reorder): Declare.
19531 (special_function_kind): New enum.
19532 (global_base_init_list): Remove declaration.
19533 (emit_base_init): Don't return a value.
19534 (check_base_init): Don't declare.
19535 (is_aggr_typedef): Likewise.
19536 * decl.c (check_special_function_return_type): New function.
19537 (return_types): Remove.
19538 (grokdeclarator): Use check_special_function_return_type.
19539 (start_function): Don't initialize ctor_label under the new ABI.
19540 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19541 * init.c (begin_init_stmts): Move to top of file.
19542 (finish_init_stmts): Likewise.
19543 (warn_reorder): Don't declare.
19544 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
19545 value.
19546 (check_base_init): Remove.
19547 (is_aggr_typedef): Likewise.
19548 (build_new_1): Don't use the return value of a constructor.
19549 * semantics.c (setup_vtbl_ptr): Don't use the return value
19550 of emit_base_init.
19551 * typeck.c (check_return_expr): Don't magically convert return
19552 statements into `return this' in constructors under the new ABI.
19553
19554 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19555 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19556 (base_ctor_identifier): New macro.
19557 (base_dtor_identifier): Likewise.
19558 (deleting_dtor_identifier): Likewise.
19559 * decl.c: Don't include obstack.h.
19560 (obstack_chunk_alloc): Don't define.
19561 (obstack_chunk_free): Likewise.
19562 (struct predefined_identifier): New type.
19563 (initialize_predefined_identifiers): New function.
19564 (init_decl_processing): Use it.
19565 (debug_temp_inits): Remove.
19566 (start_method): Don't call preserve_data.
19567 (hack_incomplete_structures): Update comment.
19568 * init.c (init_init_processing): Don't initialize
19569 nelts_identifier.
19570 (build_offset_rf): Remove dead code.
19571 (build_delete): Use CLASSTYPE_N_BASECLASSES.
19572 * search.c (init_search_processing): Don't initialize
19573 vptr_identifier.
19574
19575 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19576
19577 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19578 some sign_compare warnings.
19579
19580 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19581
19582 Rename abi::__vmi_class_type_info members.
19583 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19584 base_list, detail_masks members to vmi_flags, vmi_base_count,
19585 vmi_bases and vmi_flags_masks respectively.
19586 (__vmi_class_type_info::vmi_flags_masks): Rename
19587 details_unknown_mask to flags_unknown_mask.
19588 * tinfo.cc (__class_type_info::do_upcast): Adjust.
19589 (__vmi_class_type_info::do_find_public_src): Adjust.
19590 (__vmi_class_type_info::do_dyncast): Adjust.
19591 (__vmi_class_type_info::do_upcast): Adjust.
19592
19593 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19594
19595 * tinfo.cc (convert_to_base): New function.
19596 (get_vbase_offset): Remove. Move into convert_to_base.
19597 (__vmi_class_type_info::do_find_public_src): Adjust.
19598 (__vmi_class_type_info::do_dyncast): Adjust.
19599 (__vmi_class_type_info::do_upcast): Adjust.
19600
19601 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
19602
19603 * tinfo.cc (operator=): Use __builtin_strcmp.
19604 * tinfo2.cc (before): Likewise.
19605
19606 2000-04-06 Mark Mitchell <mark@codesourcery.com>
19607
19608 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19609 (DECL_SAVED_INLINE): Rename to ...
19610 (DECL_DEFERRED_FN): ... this.
19611 (in_function_p): Remove declaration.
19612 (mark_inline_for_output): Rename to ...
19613 (defer_fn): ... this.
19614 * decl.c (finish_function): Adjust call to mark_inline_for_output.
19615 (in_function_p): Remove definition.
19616 * decl2.c (saved_inlines): Rename to ...
19617 (deferred_fns): ... this.
19618 (saved_inlines_used): Rename to ...
19619 (deferred_fns_used): ... this.
19620 (mark_inline_for_output): Rename to ...
19621 (defer_fn): ... this.
19622 (finish_file): Adjust accordingly.
19623 (init_decl2): Likewise.
19624 * lex.c (cons_up_default_function): Likewise.
19625 * pt.c (mark_decl_instantiated): Likewise.
19626 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19627 circumstances.
19628 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19629 * semantics.c (expand_body): Defer more functions.
19630
19631 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19632
19633 * vec.cc: New file.
19634 * Make-lang.in (CXX_LIB2FUNCS): Add it.
19635 (vec.o): Build it.
19636 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19637 __cxa_vec_delete): Declare.
19638
19639 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19640
19641 * rtti.c (dfs_class_hint_mark): New static function.
19642 (dfs_class_hint_unmark): New static function.
19643 (class_hint_flags): Use them.
19644
19645 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
19646
19647 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19648
19649 2000-04-05 Mark Mitchell <mark@codesourcery.com>
19650
19651 * cp-tree.h (instantiate_decl): Change prototype.
19652 * decl2.c (mark_used): Adjust call.
19653 * optimize.c (inlinable_function_p): Adjust handling of templates.
19654 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19655 (do_type_instantiation): Likewise.
19656 (instantiate_decl): Defer more templates.
19657 (instantiate_pending_templates): Adjust logic to handle inline
19658 friend functions.
19659
19660 * Makefile.in (GGC_H): New variable. Use it throughout in place
19661 of ggc.h.
19662
19663 * call.c: Don't include obstack.h. Include ggc.h.
19664 (obstack_chunk_alloc): Don't define.
19665 (obstack_chunk_free): Likewise.
19666 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19667 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19668 (pop_switch): Free it.
19669
19670 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19671
19672 * dump.c (dequeue_and_dump): Don't try to print the bit_position
19673 if we don't have a DECL_FIELD_OFFSET.
19674
19675 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
19676
19677 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19678 special_function_p.
19679
19680 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19681
19682 * cfns.gperf (hash, libc_name_p): Prototype.
19683
19684 * rtti.c (build_dynamic_cast_1): Constification.
19685
19686 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19687
19688 * semantics.c (deferred_type_access_control): Prototype.
19689
19690 2000-04-04 Mark Mitchell <mark@codesourcery.com>
19691
19692 Correct many new ABI issues regarding vbase and vcall offset
19693 layout.
19694 * cp-tree.h (BINFO_VTABLE): Document.
19695 (struct lang_type): Tweak formatting.
19696 (BINFO_PRIMARY_BINFO): Add to documentation.
19697 (CLASSTYPE_VSIZE): Fix typo in comment.
19698 (CLASSTYPE_VBASECLASSES): Update documentation.
19699 (BINFO_VBASE_MARKED): Remove.
19700 (SET_BINFO_VBASE_MARKED): Likewise.
19701 (CLEAR_BINFO_VBASE_MARKED): Likewise.
19702 (BINFO_FIELDS_MARKED): Remove.
19703 (SET_BINFO_FIELDS_MARKED): Likewise.
19704 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19705 (enum access_kind): New enumeration.
19706 (num_extra_vtbl_entries): Remove declaration.
19707 (size_extra_vtbl_entries): Likewise.
19708 (get_vtbl_decl_for_binfo): New function.
19709 (dfs_vbase_unmark): Remove declaration.
19710 (mark_primary_bases): Likewise.
19711 * class.c (SAME_FN): Remove.
19712 (struct vcall_offset_data_s): Move definition.
19713 (build_vbase_pointer): Use `build', not `build_binary_op', to
19714 access the vbase pointer under the new ABI.
19715 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19716 (build_primary_vtable): Likewise.
19717 (dfs_mark_primary_bases): Move here from search.c.
19718 (mark_primary_bases): Likewise.
19719 (determine_primary_bases): Under the new ABI, don't make a base
19720 class a primary base just because we don't yet have any virtual
19721 functions.
19722 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19723 (num_vfun_entries): Remove.
19724 (dfs_count_virtuals): Likewise.
19725 (num_extra_vtbl_entries): Likewise.
19726 (size_extra_vtbl_entries): Likewise.
19727 (layout_virtual_bases): Iterate in inheritance graph order under
19728 the new ABI.
19729 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19730 indicate that a vfield is present.
19731 (init_class_processing): Initialize access_public_node, etc., from
19732 ak_public, etc.
19733 (get_vtbl_decl_for_binfo): New function.
19734 (dump_class_hierarchy_r): Likewise.
19735 (dump_class_hierarchy): Use it.
19736 (finish_vtbls): Build the vtbls in inheritance graph order.
19737 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19738 (initialize_vtable): Use get_vtbl_decl_for_binfo.
19739 (accumulate_vtbl_inits): Add comments explaining why a pre-order
19740 walk is required.
19741 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19742 where the vptr points, even for primary vtables.
19743 (build_vtbl_initializer): Adjust handling of vbase and vcall
19744 offsets.
19745 (build_vcall_and_vbase_vtable_entries): New function.
19746 (dfs_build_vbase_offset_vtbl_entries): Remove.
19747 (build_vbase_offset_vtbl_entries): Reimplement.
19748 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19749 were already handled in a primary base class vtable.
19750 (build_vcall_offset_vtbl_entries): Adjust.
19751 (build_rtti_vtbl_entries): Adjust.
19752 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19753 * init.c (expand_virtual_init): Simplify.
19754 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19755 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19756 * search.c (BINFO_ACCESS): New macro.
19757 (SET_BINFO_ACCESS): Likewise.
19758 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19759 (access_in_type): Likewise.
19760 (dfs_accessible_p): Likewise.
19761 (protected_accessible_p): Likewise.
19762 (lookup_fnfields_1): Adjust documentation.
19763 (dfs_mark_primary_bases): Move to class.c
19764 (mark_primary_bases): Likewise.
19765 (dfs_vbase_unmark): Remove.
19766 (virtual_context): Use BINFO_FOR_VBASE.
19767 (dfs_get_vbase_types): Simplify.
19768 (dfs_build_inheritance_graph_order): New function.
19769 (get_vbase_types): Use it.
19770 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19771
19772 * tinfo.cc (get_vbase_offset): New function.
19773 (__vmi_class_type_info::do_find_public_src): Use it.
19774 (__vmi_class_type_info::do_dyncast): Likewise.
19775 (__vmi_class_type_info::do_upcast): Likewise.
19776
19777 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
19778
19779 * lang-specs.h: Pass -fno-show-column to the preprocessor.
19780
19781 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
19782
19783 * rtti.c (class_hint_flags): Rename flags.
19784 (class_initializer): Remove flags.
19785 (synthesize_tinfo_var): Combine offset and flags. Add flags
19786 for __vmi_class_type_info.
19787 (create_tinfo_types): Remove flags from __class_type_info and
19788 __si_class_type_info. Merge flags and offset from
19789 base_class_type_info.
19790 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19791 (__base_class_info::is_virtual_p): Adjust.
19792 (__base_class_info::is_public_p): Adjust.
19793 (__base_class_info::offset): New accessor.
19794 (__class_type_info::details): Remove member.
19795 (__class_type_info::__class_type_info): Lose details.
19796 (__class_type_info::detail_masks): Remove.
19797 (__si_class_type_info::__si_class_type_info): Lose details.
19798 (__vmi_class_type_info::details): New member.
19799 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19800 (__vmi_class_type_info::detail_masks): New member.
19801 * tinfo.cc (__class_type_info::do_upcast): Initialize result
19802 with unknown_details_mask.
19803 (__vmi_class_type_info::do_find_public_src): Adjust
19804 (__vmi_class_type_info::do_dyncast): Adjust.
19805 (__vmi_class_type_info::do_upcast): Set result details, if
19806 needed. Adjust.
19807 (__dynamic_cast): Temporarily #if out optimization.
19808
19809 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
19810
19811 * rtti.c (get_tinfo_decl): Mark used.
19812 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19813 mark as dealt with, if we output it.
19814
19815 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19816
19817 * class.c: Reorganize to put virtual function table initialization
19818 machinery at the end of the file.
19819
19820 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
19821
19822 * class.c (finish_struct): Use bitsize_zero_node.
19823 * pt.c (instantiate_class_template): Likewise.
19824
19825 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19826
19827 Put RTTI entries at negative offsets in new ABI.
19828 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19829 vbase offset at index -3, not -1.
19830 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19831 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19832 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19833 (build_rtti_vtbl_entries): New function.
19834 (set_rtti_entry): Remove.
19835 (build_primary_vtable): Don't use it.
19836 (build_secondary_vtable): Likewise.
19837 (start_vtable): Remove.
19838 (first_vfun_index): New function.
19839 (set_vindex): Likewise.
19840 (add_virtual_function): Don't call start_vtable. Do call
19841 set_vindex.
19842 (set_primary_base): Rename parameter.
19843 (determine_primary_base): Likewise.
19844 (num_vfun_entries): Don't use skip_rtti_stuff.
19845 (num_extra_vtbl_entries): Include RTTI information.
19846 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19847 (skip_rtti_stuff): Remove.
19848 (dfs_modify_vtables): Don't use it.
19849 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
19850 (layout_nonempty_base_or_field): Update size handling.
19851 (create_vtable_ptr): Tweak.
19852 (layout_class_type): Adjust parameter names.
19853 (finish_struct_1): Simplify.
19854 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19855 (skip_rtti_stuff): Remove.
19856 (first_vfun_index): New function.
19857 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19858 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19859 (marked_vtable_pathp): Declare.
19860 (unmarked_vtable_pathp): Likewise.
19861 * error.c (dump_expr): Use first_vfun_index to calculate vtable
19862 offsets.
19863 * rtti.c (build_headof): Look for RTTI at negative offsets.
19864 (get_tinfo_decl_dynamic): Likewise.
19865 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19866 here.
19867 (create_pseudo_type_info): Do it here instead. Adjust so that
19868 vptr points at first virtual function.
19869 * search.c (marked_vtable_pathp): Make it global.
19870 (unmarked_vtable_pathp): Likewise.
19871 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19872 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19873 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19874 (get_pure_virtuals): Likewise.
19875 (expand_upcast_fixups): Likewise.
19876 * tree.c (debug_binfo): Likewise.
19877 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19878 negative offset.
19879
19880 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19881
19882 * class.c (check_field_decl): Fix typo.
19883 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19884 (check_methods): Likewise.
19885 (check_field_decls): Likewise.
19886 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19887 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19888 Use DECL_RESULT_FLD, not DECL_RESULT.
19889 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19890 * lex.c (identifier_type): Likewise.
19891 * pt.c (determine_specialization, lookup_template_class): Likewise.
19892 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19893 (resolve_overloaded_unification, more_specialized): Likewise.
19894 * semantics.c (finish_member_declaration): Likewise.
19895 * typeck.c (build_x_function_call): Likewise.
19896
19897 2000-03-26 Mark Mitchell <mark@codesourcery.com>
19898
19899 * class.c (layout_empty_base): Handle empty bases with non-byte
19900 alignment.
19901 (build_base_field): Likewise.
19902 (layout_virtual_bases): Likewise.
19903
19904 * class.c (finish_struct_1): Fix typo in this change:
19905
19906 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19907
19908 2000-03-25 Mark Mitchell <mark@codesourcery.com>
19909
19910 * decl.c (grokdeclarator): Count partial specializations when
19911 keeping track of how many template classes have been seen.
19912
19913 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19914
19915 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19916
19917 * class.c (build_vbase_pointer_fields): layout_field now place_field.
19918 (get_vfield_offset): Use byte_position.
19919 (set_rtti_entry): Set OFFSET to ssizetype zero.
19920 (get_binfo_offset_as_int): Deleted.
19921 (dfs_record_base_offsets): Use tree_low_cst.
19922 (dfs_search_base_offsets): Likewise.
19923 (layout_nonempty_base_or_field): Reflect changes in RLI format
19924 and call byte_position.
19925 (layout_empty_base): Convert offset to ssizetype.
19926 (build_base_field): use rli_size_unit_so_far.
19927 (dfs_propagate_binfo_offsets): Do computation in proper type.
19928 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19929 (layout_class_type): Reflect changes in RLI names and fields.
19930 (finish_struct_1): Set DECL_FIELD_OFFSET.
19931 * dump.c (dequeue_and_dump): Call bit_position.
19932 * expr.c (cplus_expand_constant): Use byte_position.
19933 * rtti.c (expand_class_desc): Use bitsize_one_node.
19934 * typeck.c (build_component_addr): Use byte_position and don't
19935 special case for zero offset.
19936
19937 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
19938
19939 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19940
19941 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19942 tinfo object.
19943 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19944 vtable.
19945
19946 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19947
19948 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19949 DECL_P macros.
19950 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19951 make_typename_type, check_initializer, cp_finish_decl,
19952 xref_tag): Likewise.
19953 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19954 decl_namespace, arg_assoc_template_arg, arg_assoc,
19955 validate_nonmember_using_decl, do_class_using_decl): Likewise.
19956 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19957 args_to_string): Likewise.
19958 * friend.c (is_friend): Likewise.
19959 * lex.c (note_got_semicolon, note_list_got_semicolon,
19960 is_global): Likewise.
19961 * method.c (build_overload_nested_name, build_overload_value,
19962 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19963 * parse.y (typename_sub, typename_sub1): Likewise.
19964 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19965 process_partial_specialization, convert_template_argument,
19966 template_args_equal, add_pending_template, lookup_template_class,
19967 for_each_template_parm_r, maybe_fold_nontype_arg,
19968 tsubst, instantiate_template, type_unification_real, unify,
19969 instantiate_pending_templates, set_mangled_name_for_template_decl):
19970 Likewise.
19971 * repo.c (repo_get_id, repo_template_used): Likewise.
19972 * search.c (lookup_field_1): Likewise.
19973 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19974 * xref.c (classname): Likewise.
19975
19976 2000-03-22 Mark Mitchell <mark@codesourcery.com>
19977
19978 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19979 (CANONICAL_BINFO): New macro.
19980 (BINFO_NEW_VTABLE_MARKED): Use it.
19981 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19982 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19983 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19984 not TREE_TYPE.
19985 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19986 (build_secondary_vtable): Likewise.
19987 (dfs_finish_vtbls): Likewise.
19988 (dfs_accumulate_vtbl_inits): Likewise.
19989 (accumulate_vtbl_inits): New function.
19990 (finish_vtbls): Make sure that virtual bases come after
19991 non-virtual bases in the vtable group.
19992 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19993 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19994 * search.c (struct vbase_info): Move definition.
19995 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19996 (unmarked_new_vtable_p): Likewise.
19997 (dfs_mark_vtable_path): Remove.
19998 (dfs_mark_new_vtable): Remove.
19999 (dfs_unmark_new_vtable): Likewise.
20000 (dfs_clear_search_slot): Likewise.
20001 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20002 (dfs_clear_vbase_slots): Likewise.
20003 (init_vbase_pointers): LIkewise.
20004
20005 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
20006
20007 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20008 SIZETYPE to a non-SIZETYPE.
20009
20010 2000-03-21 Mark Mitchell <mark@codesourcery.com>
20011
20012 * class.c (layout_virtual_bases): Adjust names in conditionally
20013 compiled code.
20014
20015 * class.c (record_base_offsets): New function.
20016 (layout_conflict_p): Likewise.
20017 (layout_nonempty_base_or_field): Use it.
20018 (layout_empty_base): New function.
20019 (build_base_field): Use it.
20020 (build_base_fields): Update comment.
20021 (layout_virtual_bases): Fold in a little code form
20022 layout_basetypes. Use layout_empty_base.
20023 (layout_basetypes): Remove.
20024 (end_of_class): New function.
20025 (layout_class_type): Use it. Adjust.
20026
20027 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20028 (fntype_p): Remove.
20029 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20030 comment.
20031 (dfs_skip_nonprimary_vbases_markedp): Likewise.
20032 * typeck.c (fntype_p): Remove.
20033
20034 * cp-tree.h (TI_SPEC_INFO): Remove.
20035 (CLASSTYPE_TI_SPEC_INFO): Likewise.
20036 * pt.c (process_partial_specialization): Likewise.
20037
20038 * class.c (build_base_field): Fix thinko in computation of binfo
20039 offsets.
20040
20041 * tree.c (mark_local_for_remap_p): Mark variables declared in
20042 TARGET_EXPRs as well.
20043
20044 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20045
20046 * typeck.c (require_complete_type, complete_type,
20047 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20048 build_array_ref, convert_arguments, pointer_diff,
20049 build_x_unary_op, build_unary_op, build_c_cast,
20050 build_modify_expr): Use COMPLETE_TYPE_P etc.
20051 * call.c (is_complete, convert_like_real,
20052 build_new_method_call): Likewise.
20053 * class.c (build_vbase_pointer_fields, check_bases,
20054 build_base_field, finish_struct_1, pushclass): Likewise.
20055 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20056 * decl.c (maybe_process_template_type_declaration, pushtag,
20057 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20058 layout_var_decl, check_initializer, cp_finish_decl,
20059 grokdeclarator, require_complete_types_for_parms,
20060 grok_op_properties, xref_tag, xref_basetypes,
20061 check_function_type): Likewise.
20062 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20063 * friend.c (do_friend): Likewise.
20064 * init.c (build_offset_ref): Likewise.
20065 * parse.y (structsp): Likewise.
20066 * pt.c (maybe_process_partial_specialization,
20067 tsubst_friend_function, instantiate_class_template, tsubst,
20068 do_type_instantiation, instantiate_pending_templates): Likewise.
20069 * repo.c (repo_get_id): Likewise.
20070 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20071 synthesize_tinfo_var, emit_support_tinfos): Likewise.
20072 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20073 * semantics.c (begin_class_definition): Likewise.
20074 * tree.c (build_cplus_method_type): Likewise.
20075 * typeck2.c (digest_init, build_functional_cast,
20076 add_exception_specifier): Likewise.
20077 * parse.h, parse.c: Regenerated.
20078
20079 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20080
20081 * inc/cxxabi.h: New header file. Define new-abi entry points.
20082 (__pointer_type_info::target): Rename member to ...
20083 (__pointer_type_info::type): ... here.
20084 (__base_class_info::type): Rename member to ...
20085 (__base_class_info::base): ... here.
20086 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20087 * cp-tree.h (CPTI_ABI): New global tree enumeration.
20088 (abi_node): New global tree node.
20089 * decl.c (abi_node): Document.
20090 (init_decl_processing): Initialize abi_node.
20091 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20092 (get_vmi_pseudo_type_info): Likewise.
20093 (create_tinfo_types): Likewise.
20094 (emit_support_tinfos): Likewise.
20095 * tinfo.h (cxxabi.h): Include for new-abi.
20096 Move rtti class definitions to new header file.
20097 * tinfo.cc (abi): Use the namespace.
20098 (std): Move new abi rtti classes from here ...
20099 (__cxxabiv1): ... to here.
20100 * tinfo2.cc (cxxabi.h): Include for new-abi.
20101 Move rtti class definitions to new header file.
20102 (std): Move new abi rtti classes from here ...
20103 (__cxxabiv1): ... to here.
20104 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20105 namespace.
20106
20107 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20108 Jason Merrill <jason@casey.cygnus.com>
20109
20110 * method.c (build_overload_int): Use host_integerp.
20111
20112 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20113
20114 * init.c (build_offset_ref): Handle the case of a templated member
20115 function.
20116
20117 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20118
20119 * except.c (expand_exception_blocks): Clear catch_clauses_last.
20120
20121 2000-03-18 Mark Mitchell <mark@codesourcery.com>
20122
20123 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20124 * class.c (check_bitfield_decl): Turn illegal bitfields into
20125 non-bitfields.
20126 (dfs_propagate_binfo_offsets): Adjust for new size_binop
20127 semantics.
20128 (dfs_offset_for_unshared_vbases): Likewise.
20129 * cvt.c (cp_convert_to_pointer): Convert NULL to a
20130 pointer-to-member correctly under the new ABI.
20131 * expr.c (cplus_expand_constant): Don't use cp_convert when
20132 turning an offset into a pointer-to-member.
20133 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20134 when dereferencing them under the new ABI.
20135 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20136 of pointers-to-members under the new ABI.
20137
20138 * class.c (check_bitfield_decl): Remove restriction on really long
20139 bitfields.
20140 (layout_class_type): Implement new ABI handling of bitfields
20141 longer than their types.
20142
20143 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20144
20145 * parse.y (extdefs): Call ggc_collect.
20146 * parse.c: Regenerated.
20147
20148 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
20149
20150 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20151 (note_name_declared_in_class): Use OVL_CURRENT to get at a
20152 potential overload.
20153
20154 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20155
20156 * class.c (build_vbase_path): Use integer_zerop.
20157 (build_vtable_entry): Use tree_low_cst.
20158 (get_vfield_offset): Use bit_position.
20159 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20160 Use tree_low_cst.
20161 (check_bitfield_decl): Set DECL_SIZE using convert.
20162 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20163 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20164 Use tree_low_cst.
20165 (finish_struct_1): Use bit_position.
20166 (dump_class_hierarchy): Use tree_low_cst.
20167 * cp-tree.h (min_precision): Add declaration.
20168 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20169 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20170 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20171 * expr.c (cplus_expand_constant): Use bit_position.
20172 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20173 * rtti.c (get_base_offset): Use bit_position.
20174 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20175 host_integerp, and tree_low_cst.
20176 (pointer_int_sum): Use integer_zerop.
20177 (build_component_addr): Use bit_position.
20178
20179 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
20180
20181 * typeck.c (require_complete_type): Don't assume size_zero_node.
20182 (complete_type_or_else): Likewise.
20183
20184 2000-03-16 Steven Grady <grady@digitaldeck.com>
20185 Jason Merrill <jason@casey.cygnus.com>
20186
20187 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20188
20189 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
20190
20191 * decl2.c (grokfield): Bail out if type is error_mark_node.
20192
20193 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20194
20195 * tinfo2.cc (__ptr_to_member_data): Rename to ...
20196 (__pointer_to_member_data): ... here. Adjust.
20197 * rtti.c (create_tinfo_types): Adjust.
20198
20199 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20200
20201 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20202 * decl.c (ref_desc_type_node): Undocument.
20203 * rtti.c (ptr_ref_initializer): Rename to ...
20204 (ptr_initializer): ... here. Adjust comments.
20205 (ptmd_initializer): Fix comment thinko.
20206 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20207 (create_tinfo_types): Remove ref_desc_type_node init.
20208 * tinfo2.cc (__reference_type_info): Remove.
20209
20210 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20211
20212 * decl.c (cp_finish_decl): Remove obsolete comment.
20213
20214 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20215
20216 2000-03-14 Mark Mitchell <mark@codesourcery.com>
20217
20218 * cp-tree.h: Tweak documentation.
20219 * class.c (build_vbase_pointer_fields): Layout the fields, too.
20220 (avoid_overlap): Remove.
20221 (get_binfo_offset_as_int): New function.
20222 (dfs_serach_base_offsets): Likewise.
20223 (layout_nonempty_base_or_field): Likewise.
20224 (build_base_field): Layout fields here. Avoid placing two objects
20225 of the same type at the same address, under the new ABI.
20226 (build_base_fields): Adjust accordingly.
20227 (create_vtable_ptr): Return the new field, but don't attach it to
20228 TYPE_FIELDS.
20229 (remove_base_field): Remove.
20230 (remove_base_fields): Remove.
20231 (layout_basetypes): Adjust accordingly.
20232 (layout_class_type): Call layout_field for each field, rather than
20233 just making a wholesale call to layout_type.
20234
20235 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
20236
20237 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20238
20239 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
20240
20241 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20242
20243 * except.c (dtor_nothrow): New fn.
20244 (do_pop_exception): Use it. Take type parm.
20245 (push_eh_cleanup): Take type parm.
20246 (expand_start_catch_block): Pass it.
20247 (build_eh_type_type_ref): Accept null type.
20248
20249 2000-03-12 Mark Mitchell <mark@codesourcery.com>
20250
20251 * cp-tree.h (revert_static_member_fn): Change prototype.
20252 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20253 (grok_op_properties): Likewise.
20254 (start_function): Likewise.
20255 (revert_static_member_fn): Simplify.
20256 * pt.c (check_explicit_specialization): Adjust call to
20257 revert_static_member_fn.
20258
20259 2000-03-11 Mark Mitchell <mark@codesourcery.com>
20260
20261 * cp-tree.h (scope_kind): New type.
20262 (tmpl_spec_kind): Likewise.
20263 (declare_pseudo_global_level): Remove.
20264 (pseudo_global_level_p): Rename to template_parm_scope_p.
20265 (pushlevel): Remove declaration.
20266 (begin_scope): New function.
20267 (finish_scope): Likewise.
20268 (current_tmpl_spec_kind): Likewise.
20269 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20270 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
20271 Add template_spec_p.
20272 (toplevel_bindings_p): Adjust.
20273 (declare_pseudo_global_level): Remove.
20274 (pseudo_global_level_p): Rename to template_parm_scope_p.
20275 (current_tmpl_spec_kind): New function.
20276 (begin_scope): Likewise.
20277 (finish_scope): Likewise.
20278 (maybe_push_to_top_level): Adjust.
20279 (maybe_process_template_type_declaration): Likewise.
20280 (pushtag): Likewise.
20281 (pushdecl_nonclass_level): Likewise.
20282 (lookup_tag): Likewise.
20283 (grokfndecl): Handle member template specializations. Share
20284 constructor and non-constructor code.
20285 * decl2.c (check_classfn): Handle member template specializations.
20286 * pt.c (begin_template_parm_list): Use begin_scope.
20287 (begin_specialization): Likewise.
20288 (end_specialization): Likewise.
20289 (check_explicit_specialization): Use current_tmpl_spec_kind.
20290 Handle member template specializations.
20291 (end_template_decl): Use finish_scope. Remove call to
20292 get_pending_sizes.
20293 (push_template_decl_real): Remove bogus error message.
20294 (tsubst_decl): Fix typo in code contained in comment.
20295 (instantiate_template): Handle member template specializations.
20296 (most_general_template): Likewise.
20297
20298 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
20299
20300 * lex.c (whitespace_cr): Compress consecutive calls to warning().
20301 (do_identifier): Ditto for error().
20302
20303 * pt.c (convert_nontype_argument): Ditto for cp_error().
20304 (convert_template_argument): Ditto for cp_pedwarn().
20305
20306 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
20307
20308 * exception.cc (__check_null_eh_spec): New fn.
20309 * except.c (expand_end_eh_spec): Call it if the spec is throw().
20310
20311 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20312
20313 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20314 * except.c (expand_end_eh_spec): Add the return type.
20315 * rtti.c (throw_bad_cast): Add the parmtypes.
20316 (throw_bad_typeid): Likewise.
20317
20318 * semantics.c (expand_stmt): Only leave out rtl for unused
20319 artificials, and set DECL_IGNORED_P on them as well.
20320 * decl.c (wrapup_globals_for_namespace): Likewise.
20321
20322 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
20323
20324 * decl.c (maybe_commonize_var): Skip all artificial decls.
20325 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20326
20327 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20328
20329 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20330 * cp-tree.h: Declare flag_enforce_eh_specs.
20331 * decl.c (store_parm_decls, finish_function): Check it.
20332
20333 C library functions don't throw.
20334 * Makefile.in (cfns.h): New target.
20335 (except.o): Depend on it.
20336 * Make-lang.in (cc1plus): Depend on cfns.gperf.
20337 * cfns.gperf: New file.
20338 * cfns.h: Generated.
20339 * except.c: Include it.
20340 (nothrow_libfn_p): New fn.
20341 * decl.c (grokfndecl): Use it.
20342 * cp-tree.h: Declare it.
20343
20344 * decl.c (push_overloaded_decl_1, auto_function,
20345 define_function): Lose.
20346 (build_library_fn_1): New static fn.
20347 (builtin_function): Use it.
20348 (get_atexit_node): Use build_library_fn_ptr.
20349 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20350 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20351 push_void_library_fn, push_throw_library_fn): New fns.
20352 * cp-tree.h: Declare them.
20353 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20354 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20355 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20356 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20357 * rtti.c (build_runtime_decl): Lose.
20358 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20359 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20360 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20361
20362 * call.c (build_call): Remove result_type parm.
20363 Call mark_used on unused artificial fns.
20364 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20365
20366 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
20367
20368 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20369 appropriate.
20370 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20371 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20372 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20373 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20374 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20375 expand_generic_desc): Likewise.
20376
20377 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20378
20379 * exception.cc (__cp_pop_exception): Cleanup the original object.
20380
20381 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20382
20383 * decl.c (grok_op_properties): Merge conversion to void warning
20384 with other silly op warnings.
20385
20386 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
20387
20388 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20389 array CONSTRUCTOR elements. Don't use expr_tree_cons.
20390
20391 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20392
20393 * decl.c (cp_make_fname_decl): New function.
20394 (wrapup_globals_for_namespace): Don't emit unused static vars.
20395 (init_decl_processing): Remove comment about use of
20396 array_domain_type. Set make_fname_decl.
20397 (cp_finish_decl): Remove __FUNCTION__ nadgering.
20398 * semantics.c (begin_compound_stmt): Remove
20399 current_function_name_declared flagging.
20400 (expand_stmt): Don't emit unused local statics.
20401 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20402 specially.
20403
20404 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20405
20406 * typeck.c (convert_for_assignment): Don't look at array
20407 initializer.
20408 * call.c (convert_like_real): Likewise.
20409
20410 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
20411
20412 Add initial support for '\uNNNN' specifier.
20413 * lex.c (read_ucs): New fn.
20414 (readescape, skip_white_space): Call it.
20415 (is_extended_char, is_extended_char_1): New fns.
20416 (utf8_extend_token): New fn, #if 0'd out.
20417 (real_yylex): Treat extended chars like letters.
20418
20419 * search.c (note_debug_info_needed): Walk the bases even if we
20420 weren't deferring the type itself.
20421
20422 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20423
20424 * decl2.c (finish_objects): Constify a char*.
20425
20426 * method.c (emit_thunk): Likewise.
20427
20428 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
20429
20430 * typeck.c (dubious_conversion_warnings): Look through
20431 REFERENCE_TYPE.
20432
20433 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20434
20435 * class.c (dfs_modify_vtables): I is now unsigned.
20436 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20437 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20438 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20439 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20440 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20441 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20442 Call integer_all_onesp.
20443 * typeck2.c (process_init_constructor): Use compare_tree_int.
20444
20445 * lang-specs.h (as): Don't call if -syntax-only.
20446
20447 2000-03-06 Mark Mitchell <mark@codesourcery.com>
20448
20449 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20450 RTL_EXPR_HAS_NO_SCOPE after all.
20451
20452 2000-03-05 Mark Mitchell <mark@codesourcery.com>
20453
20454 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20455 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
20456 RTL_EXPR_HAS_NO_SCOPE.
20457
20458 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20459 later.
20460
20461 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20462
20463 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
20464
20465 * call.c (convert_like): Macrofy.
20466 (convert_like_with_context): New macro.
20467 (convert_like_real): Renamed from convert_like. Add calling
20468 context parameters, for diagnostics. Add recursive flag. Call
20469 dubious_conversion_warnings for outer conversion.
20470 (build_user_type_conversion): Use convert_like_with_context.
20471 (build_over_call): Likewise. Don't warn about dubious
20472 conversions here. Adjust convert_default_arg calls.
20473 (convert_default_arg): Add context parameters for diagnostics.
20474 Pass through to convert_like_with_context.
20475 * cp-tree.h (convert_default_arg): Add context parameters.
20476 (dubious_conversion_warnings): Prototype new function.
20477 * typeck.c (convert_arguments): Adjust convert_default_arg call.
20478 (dubious_conversion_warnings): New function, broken
20479 out of convert_for_assignment.
20480 (convert_for_assignment): Adjust.
20481
20482 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
20483
20484 * decl2.c (key_method): Break out from...
20485 (import_export_vtable, import_export_class): ...here.
20486
20487 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20488 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20489
20490 * search.c (note_debug_info_needed, dfs_debug_mark,
20491 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
20492 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20493
20494 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
20495
20496 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20497 typos.
20498
20499 2000-03-02 Mark Mitchell <mark@codesourcery.com>
20500
20501 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20502 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20503 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20504 (lang_type): Split gets_new into has_new and has_array_new.
20505 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20506 (TYPE_GETS_NEW): Split into ...
20507 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20508 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20509 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20510 (build_op_new_call): Don't declare.
20511 (build_new_1): Likewise.
20512 * call.c (build_op_new_call): Remove.
20513 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20514 instead of TYPE_NEEDS_DESTRUCTOR.
20515 (finish_struct_bits): Likewise.
20516 (add_implicitly_declared_members): Likewise.
20517 (check_field_decl): Likewise.
20518 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20519 correctly under the new ABI.
20520 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20521 instead of TYPE_NEEDS_DESTRUCTOR.
20522 (initialize_local_var): Likewise.
20523 (destroy_local_var): Likewise.
20524 (cp_finish_decl): Likewise.
20525 (register_dtor_fn): Likewise.
20526 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20527 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
20528 TYPE_VEC_DELETE_TAKES_SIZE here.
20529 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20530 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20531 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20532 (finish_destructor_body): Likewise.
20533 (maybe_build_cleanup_1): Likewise.
20534 * decl2.c (do_static_destruction): Likewise.
20535 * init.c (build_new_1): Make it static.
20536 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20537 (expand_cleanup_for_base): Likewise.
20538 (get_cookie_size): New function.
20539 (build_new_1): Handle array-new cookies correctly under the new
20540 ABI.
20541 (build_vec_delete_1): Likewise.
20542 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20543 (build_delete): Likewise.
20544 (build_vec_delete): Handle array-new cookies correctly under the new
20545 ABI.
20546 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20547 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20548 TYPE_HAS_ARRAY_NEW_OPERATOR.
20549 * ptree.c (print_lang_type): Check them.
20550 * search.c (context_for_name_lookup): Fix typo in comment.
20551 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20552 * tree.c (break_out_cleanups): Likewise.
20553 (build_cplus_array_test_1): Likewise.
20554 (cp_build_qualified_type_real): Likewise.
20555 * typeck.c (complete_type): Likewise.
20556
20557 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20558 the command-line, not the end.
20559
20560 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
20561
20562 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20563
20564 2000-03-02 Tom Tromey <tromey@cygnus.com>
20565
20566 * cp-tree.h (build_java_class_ref): Declare.
20567 * init.c (build_java_class_ref): No longer static.
20568 * except.c (expand_throw): Generate a Java-style `throw' if the
20569 thrown object is a "Java" object.
20570 (initialize_handler_parm): Generate a Java-style lookup of
20571 exception info if the caught object is a "Java" object.
20572 (catch_language, catch_language_init): New globals.
20573 (decl_is_java_type): New function.
20574 (expand_start_catch_block): Don't call push_eh_info() or
20575 push_eh_cleanup() when handling a Java-style "catch". Pass Java
20576 class reference to build_catch_block.
20577
20578 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20579
20580 * typeck.c (comptypes): Treat sizetype like its language equivalent.
20581
20582 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
20583
20584 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20585 to merge reference/pointer code and fix incorrect warnings.
20586
20587 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
20588
20589 * search.c (protected_accessible_p): Use context_for_name_lookup.
20590
20591 * init.c (construct_virtual_bases): Fix thinko.
20592 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20593
20594 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
20595
20596 * decl.c (current_function_decl): Move to toplev.c.
20597
20598 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
20599
20600 * pt.c (fn_type_unification): Unify return type, whenever
20601 provided.
20602 (get_bindings_real): Only pass return type when necessary.
20603 Remove explicit return type check.
20604 * class.c (resolve_address_of_overloaded_function): Pass desired
20605 return type to fn_type_unification.
20606
20607 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20608
20609 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20610 DECL_FIELD_SIZE.
20611 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20612 DECL_FIELD_SIZE.
20613 * rtti.c (expand_class_desc): Likewise.
20614 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20615 (THUNK_VCALL_OFFSET): Likewise.
20616 (THUNK_DELTA): Reflect changes in ../tree.h.
20617
20618 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
20619
20620 * search.c (protected_accessible_p): Also allow the access if
20621 the member is public in DERIVED. Lose TYPE parm.
20622 (friend_accessible_p): Lose TYPE parm.
20623 (accessible_p): Adjust.
20624
20625 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20626
20627 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20628 on things that are not sizes; ssize_binop deleted.
20629 Call size_diffop when appropriate.
20630 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20631 (build_primary_vtable, build_secondary_vtable): Likewise.
20632 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20633 Variable I is HOST_WIDE_INT.
20634 (get_vfield_offset): Pass proper types to size_binop.
20635 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20636 (finish_struct_1): Likewise.
20637 (skip_rtti_stuff): Arg N is now pointer to signed.
20638 (layout_class_type): Use size_zero_node.
20639 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20640 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20641 * decl.c (complete_arry_type): Pass proper types to size_binop.
20642 (xref_basetypes): BINFO_OFFSET is sizetype.
20643 * error.c (dump_expr): Don't use size_binop non-sizes.
20644 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20645 * init.c (construct_virtual_bases): Fix type error.
20646 (build_vec_delete_1): Pass proper type to size_binop and don't
20647 fold result.
20648 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20649 * rtti.c (get_base_offset): Pass proper type to size_binop.
20650 * search.c (dfs_find_vbases): Fix type error.
20651 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20652 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20653 * tree.c (debug_binfo): Variable N is signed.
20654 Use HOST_WIDE_INT_PRINT_DEC.
20655 * typeck.c (comptypes): sizetype is same as equivalent integer type.
20656 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20657 size_one_node and size_zero_node.
20658 (c_alignof): Use size_one_node.
20659 (build_component_addr): Pass proper types to size_binop.
20660 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20661
20662 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
20663
20664 Implement class scope using-declarations for functions.
20665 * class.c (handle_using_decl): Call add_method for used functions.
20666 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20667 (add_method): Used functions are hidden by local functions.
20668 (check_bases_and_members): Handle using-decls before finalizing
20669 CLASSTYPE_METHOD_VEC.
20670 * call.c (add_function_candidate): Add ctype parm; if nonzero,
20671 override the type of 'this' accordingly.
20672 (add_template_candidate, add_template_candidate_real): Add ctype parm.
20673 (convert_class_to_reference, build_user_type_conversion_1,
20674 build_new_function_call, build_object_call, build_new_op,
20675 build_new_method_call): Pass ctype parm.
20676
20677 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20678 the baselink.
20679 * call.c (convert_class_to_reference, build_user_type_conversion_1,
20680 build_new_function_call, build_object_call, build_new_op,
20681 build_new_method_call, build_op_delete_call): Don't get basetype_path
20682 from a baselink.
20683 * typeck.c (build_component_ref): Likewise.
20684 * init.c (build_offset_ref): Likewise.
20685 (resolve_offset_ref): Don't call enforce_access.
20686 Call build_scoped_ref.
20687 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
20688 would cause an error or if -pedantic.
20689 * class.c (alter_access): Lose binfo parm.
20690
20691 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20692
20693 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20694 types.
20695
20696 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
20697
20698 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20699 pseudo_type_info creation into the std namespace
20700
20701 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20702
20703 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20704 (import_export_class): Remove declaration.
20705 * decl2.c (import_export_class): Make it static.
20706 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20707 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20708 EXPR_WITH_FILE_LOCATION.
20709 * lex.c (check_newline): Tweak filename/lineno setting.
20710 * semantics.c (begin_while_stmt): Fix typo in comment.
20711
20712 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20713
20714 * lang-options.h (-fmessage-length=): Add missing option.
20715
20716 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20717
20718 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
20719
20720 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20721
20722 2000-02-25 Jim Wilson <wilson@cygnus.com>
20723
20724 * optimize.c (expand_call_inline): Emit the return label before
20725 evaluating the return value.
20726
20727 2000-02-24 Mark Mitchell <mark@codesourcery.com>
20728
20729 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20730 than duplicating functionality here.
20731 * optimize.c: Include input.h.
20732 (expand_call_inline): Use push_srcloc and pop_srcloc.
20733 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20734 * parse.c: Regenerated.
20735 * Makefile.in (lex.o): Depend on input.h.
20736 (optimize.o): Likewise.
20737
20738 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
20739
20740 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20741 function type, rather than ICE.
20742
20743 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
20744
20745 * decl.c (grokdeclarator): Call decl_type_access_control.
20746 * parse.y (parse_end_decl): Don't call decl_type_access_control if
20747 decl is null.
20748
20749 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
20750
20751 * decl.c (decls_match): Remove obsolete static member nadgering.
20752
20753 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20754
20755 * decl.c (grokdeclarator): Change ANSI to ISO.
20756 * lex.c (consume_string, readescape, do_identifier): Likewise.
20757 (parse_float, real_yylex): Likewise.
20758 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20759 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20760 new_type_id, maybe_label_decls, simple_stmt,
20761 for.init.statement): Likewise.
20762 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20763 * semantics.c (finish_named_return_value): Likewise.
20764 * parse.c: Regenerate.
20765
20766 2000-02-21 Mark Mitchell <mark@codesourcery.com>
20767
20768 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20769 (CPTI_CLASS_STAR_TYPE): Remove.
20770 (vtable_index_type): Likewise.
20771 (class_star_type_node): Remove.
20772 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20773 (build_binary_op_nodefault): Remove.
20774 * call.c (build_new_op): Use build_binary_op instead of
20775 build_binary_op_nodefault.
20776 * decl.c (init_decl_processing): Remove class_star_type_node
20777 initialization. Make delta_type_node ptrdiff_type_node under the
20778 new ABI. Initialize vtable_index_type.
20779 (build_ptrmemfunc_type): Build different structures for the new
20780 ABI.
20781 (build_enumerator): Use build_binary_op instead of
20782 build_binary_op_nodefault.
20783 * method.c (build_overload_value): Mangle pointers-to-members
20784 appropriately under the new ABI.
20785 * typeck.c (build_array_ref): Use build_binary_op instead of
20786 build_binary_op_nodefault.
20787 (get_member_function_from_ptrfunc): Adjust for the new ABI.
20788 (build_binary_op_nodefault): Rename to ...
20789 (build_binary_op): ... this. Remove old version. Adjust for
20790 pointer-to-member comparisons under the new ABI.
20791 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
20792 (build_ptrmemfunc): Adjust for the new ABI.
20793 (expand_ptrmemfunc_cst): Likewise.
20794 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20795 (pfn_from_ptrmemfunc): Adjust for the new ABI.
20796
20797 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
20798
20799 * call.c (build_object_call): Compress consecutive calls to
20800 cp_error.
20801 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20802 (build_op_delete_call): Adjust message formatting.
20803
20804 * class.c (check_bases): Compress consecutive calls to
20805 cp_pedwarn.
20806 (finish_struct_anon): Say 'ISO C++'.
20807
20808 * decl.c (start_decl): Same here.
20809 (grok_reference_init): Likewise.
20810 (grokfndecl): Correct message formatting.
20811 (grokfndecl): Improve diagnostic.
20812 (check_static_variable_definition): Likewise. Say 'ISO C++'
20813 (compute_array_index_type): Say 'ISO C++'
20814 (create_array_type_for_decl): Compress consecutive calls to
20815 cp_error.
20816 (grokdeclarator): Say 'ISO C++'
20817 (grok_op_properties): Likewise.
20818
20819 * decl2.c (delete_sanity): Clairify diagnostic.
20820 (check_member_template): Same here.
20821 (grok_function_init): Use consistent terminology.
20822
20823 * expr.c (do_case): Say 'ISO C++'
20824
20825 * friend.c (do_friend): Compress consecutive calls to warning.
20826
20827 2000-02-20 Mark Mitchell <mark@codesourcery.com>
20828
20829 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20830 * class.c (build_secondary_vtable): Reorganize. Don't create a
20831 new vtable under the new ABI.
20832 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20833 computing the size.
20834 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20835 the initializing elements.
20836 (initialize_vtable): New function.
20837 (dfs_finish_vtbls): Use it.
20838 (dfs_accumulate_vtbl_inits): New function.
20839 (finish_vtbls): Merge primary and secondary vtables under the new
20840 ABI.
20841 (finish_struct_1): Remove redundant call to layout_vtable_decl.
20842 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20843 aren't VAR_DECLs.
20844
20845 * class.c (build_vtable): New function, split out from ...
20846 (get_vtable_decl): ... here, and ...
20847 (build_secondary_vtable): ... here.
20848
20849 * pt.c (tsubst_decl): Fix formatting.
20850
20851 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20852
20853 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20854 (avoid_overlap, build_base_field): Likewise.
20855 (build_base_field, build_base_fields, is_empty_class):
20856 Test DECL_SIZE with integer_zero.
20857 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20858 * cp-tree.h (struct lang_type): New field size_unit.
20859 (CLASSTYPE_SIZE_UNIT): New macro.
20860 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20861 (cp_finish_decl): Delete -Wlarger-than processing.
20862 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20863 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20864 * tree.c (make_binfo): binfo vector is one entry longer.
20865 (walk_tree): Walk DECL_SIZE_UNIT.
20866
20867 2000-02-19 Mark Mitchell <mark@codesourcery.com>
20868
20869 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20870 comment.
20871 (build_vtable_entry): Don't assume all vtable entries are
20872 functions.
20873 (build_vtbl_initializer): Adjust accordingly.
20874 (get_vtable_decl): Fix formatting.
20875
20876 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
20877
20878 * semantics.c (deferred_type_access_control): Walk the entire
20879 type_lookups list.
20880 (save_type_access_control): Rename from
20881 initial_deferred_type_access_control. Just remember the value.
20882 (decl_type_access_control): New fn.
20883 (begin_function_definition): Use deferred_type_access_control, after
20884 we've started the function. Set type_lookups to error_mark_node.
20885 * parse.y (frob_specs, fn.def1): Adjust.
20886 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20887 (parse_end_decl, parse_bitfield0, parse_method): New fns.
20888 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20889 (after_type_component_declarator0): Likewise.
20890 (after_type_component_declarator): Likewise.
20891 (notype_component_declarator): Likewise.
20892 * cp-tree.h: Adjust.
20893
20894 * decl.c (redeclaration_error_message): Allow redeclaration of
20895 namespace-scope decls.
20896
20897 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
20898
20899 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20900
20901 2000-02-17 Mark Mitchell <mark@codesourcery.com>
20902
20903 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20904 * decl2.c (grokclassfn): Likewise.
20905
20906 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20907
20908 * decl2.c (lang_decode_option): Don't set default message length
20909 here.
20910 * lex.c (lang_init_options): Set it here.
20911
20912 2000-02-16 Mark Mitchell <mark@codesourcery.com>
20913
20914 Make DECL_CONTEXT mean the class in which a member function was
20915 declared, even for a virtual function.
20916 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20917 (DECL_FRIEND_CONTEXT): New macro.
20918 (DECL_REAL_CONTEXT): Remove.
20919 (SET_DECL_FRIEND_CONTEXT): Likewise.
20920 (DECL_VIRTUAL_CONTEXT): Adjust.
20921 (DECL_CLASS_SCOPE_P): Use TYPE_P.
20922 (add_friends): Remove.
20923 (hack_decl_function_context): Likewise.
20924 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20925 CP_DECL_CONTEXT.
20926 (build_over_call): Fix indentation. Use DECL_CONTEXT
20927 instead of DECL_CLASS_CONTEXT.
20928 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20929 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20930 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20931 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20932 (build_base_field): Likewise.
20933 (finish_struct_1): Likewise.
20934 (build_self_reference): Likewise.
20935 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20936 DECL_REAL_CONTEXT.
20937 (pushtag): Use decl_function_context, not
20938 hack_decl_function_context.
20939 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20940 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20941 (pushdecl): Remove bogus code.
20942 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20943 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20944 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20945 Use decl_function_context, nothack_decl_function_context.
20946 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20947 (grokdeclarator): Likewise. Use decl_function_context, not
20948 hack_decl_function_context.
20949 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
20950 (start_function): Use DECL_FRIEND_CONTEXT, not
20951 DECL_CLASS_CONTEXT. Use decl_function_context, not
20952 hack_decl_function_context.
20953 (finish_function): Use decl_function_context, not
20954 hack_decl_function_context.
20955 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20956 DECL_CLASS_CONTEXT.
20957 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20958 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20959 (grokfield): Likewise.
20960 (finish_builtin_type): Likewise.
20961 (finish_vtable_vardec): Use decl_function_context, not
20962 hack_decl_function_context.
20963 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20964 (start_static_initialization_or_destruction): Likewise.
20965 (finish_static_initialization_or_destruction): Likewise.
20966 (mark_used): Adjust logic for deciding when to synthesize methods.
20967 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20968 DECL_REAL_CONTEXT.
20969 * error.c (dump_function_decl): Use DECL_CONTEXT, not
20970 DECL_CLASS_CONTEXT.
20971 * friend.c (is_friend): Likewise.
20972 (add_friends): Remove.
20973 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20974 * lex.c (begin_definition_of_inclass_inline): Use
20975 decl_function_context, not hack_decl_function_context.
20976 (process_next_inline): Likewise.
20977 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20978 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20979 DECL_CLASSS_CONTEXT.
20980 (hack_identifier): Likewise.
20981 (synthesize_method): Use decl_function_context, not
20982 hack_decl_function_context.
20983 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20984 DECL_REAL_CONTEXT.
20985 (is_member_template): Use decl_function_context, not
20986 hack_decl_function_context. Use DECL_CONTEXT, not
20987 DECL_CLASS_CONTEXT.
20988 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20989 DECL_CLASS_CONTEXT.
20990 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20991 DECL_REAL_CONTEXT.
20992 (push_template_decl_real): Likewise.
20993 (instantiate_class_template): Don't call add_friends.
20994 (tsubst_default_argument): Use DECL_CONTEXT, not
20995 DECL_REAL_CONTEXT.
20996 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20997 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20998 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20999 DECL_CLASS_CONTEXT.
21000 * repo.c (repo_inline_used): Likewise.
21001 * search.c (current_scope): Adjust for new _CONTEXT macros.
21002 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21003 DECL_REAL_CONTEXT.
21004 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21005 (lookup_fnfields_here):Likewise.
21006 (check_final_overrider): Likewise.
21007 (init_vbase_pointers): Likewise.
21008 (virtual_context): Likewise.
21009 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21010 (expand_body): Use decl_function_context, not
21011 hack_decl_function_context.
21012 * tree.c (hack_decl_function_context): Remove.
21013 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21014 DECL_CLASS_CONTEXT.
21015 * typeck2.c (error_not_base_type): Likewise.
21016
21017 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
21018
21019 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21020
21021 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21022
21023 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21024
21025 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
21026
21027 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21028
21029 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
21030
21031 * decl2.c (lang_decode_option): Enable automatic line wrapping.
21032
21033 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
21034
21035 * parse.y (frob_specs): Split out...
21036 (parse_decl): From here.
21037 (fn.def2): Call initial_deferred_type_access_control.
21038 (after_type_component_declarator0): Call frob_specs.
21039 (notype_component_declarator0): Likewise.
21040 * search.c (friend_accessible_p): Nested classes are friends of their
21041 enclosing classes.
21042
21043 2000-02-10 Mark Mitchell <mark@codesourcery.com>
21044
21045 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21046 used to create an implicit temporary.
21047
21048 * class.c (dfs_modify_vtables): Tweak calculation of functions to
21049 override.
21050
21051 2000-02-08 Nathan Sidwell <nathan@acm.org>
21052
21053 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21054 strip array element qualifiers too.
21055
21056 2000-02-07 Mark Mitchell <mark@codesourcery.com>
21057
21058 * decl.c (store_parm_decls): Don't build cleanups for parameters
21059 while processing_template_decl.
21060
21061 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
21062
21063 * cp-tree.h (struct saved_scope): Add incomplete field.
21064 (namespace_scope_incomplete): New macro.
21065 * decl.c (pushdecl): Use it.
21066 (hack_incomplete_structures): Use it. See through artificial
21067 binding levels.
21068 (mark_saved_scope): Mark it.
21069
21070 Implement access control for nested types.
21071 * search.c (type_access_control): New fn.
21072 (accessible_p): Now we do perform access control for types.
21073 * semantics.c (deferred_type_access_control): New fn.
21074 (initial_deferred_type_access_control): New fn.
21075 (begin_function_definition): Call it. Add lookups parm.
21076 * decl.c (struct binding_level): Add this_class field.
21077 (pushlevel_class): Set it.
21078 (mark_binding_level): Mark it.
21079 (lookup_name_real): Use it. Call type_access_control.
21080 (mark_saved_scope): Mark lookups field.
21081 * cp-tree.h (flagged_type_tree): Add lookups field.
21082 (struct saved_scope): Add lookups field.
21083 (type_lookups): New macro.
21084 * parse.y (declmods): Now <ftype>.
21085 (parse_decl): Add lookups parm. Call
21086 initial_deferred_type_access_control.
21087 (lang_extdef): Clear type_lookups.
21088 (typed_declspecs, declmods, typespec): Set lookups field.
21089 (initdcl): Call deferred_type_access_control.
21090 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21091 component_decl_1, named_parm): Adjust.
21092 * friend.c (is_friend): Nested classes are friends of their
21093 enclosing classes.
21094
21095 * class.c (currently_open_derived_class): New fn.
21096 * method.c (hack_identifier): Use it.
21097
21098 * lex.c (do_identifier): Remove obsolete code.
21099
21100 * parse.y (typed_typespecs): Propagate new_type_flag properly.
21101
21102 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
21103
21104 * tinfo.h: Remove apostrophes from C++ comment (xgettext
21105 thinks this file is plain C).
21106
21107 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21108
21109 * Makefile.in (call.o): Depend on $(EXPR_H).
21110
21111 * call.c: Include "expr.h".
21112
21113 * class.c (dump_class_hierarchy): Add prototype.
21114
21115 * search.c (dfs_get_pure_virtuals): Likewise.
21116
21117 2000-02-1 Ulrich Drepper <drepper@redhat.com>
21118
21119 * parse.y (simple_stmt): Allow :: token in asm parameter list.
21120 * parse.c: Rebuilt.
21121
21122 2000-01-31 Jim Wilson <wilson@cygnus.com>
21123
21124 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21125 Store it in DECL_FCONTEXT.
21126 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21127
21128 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
21129
21130 * tinfo.h (old abi): #include "tconfig.h".
21131 * tinfo.cc (convert_to_base): Move into old abi section.
21132
21133 2000-01-31 Mark Mitchell <mark@codesourcery.com>
21134
21135 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21136 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21137 (BINFO_PRIMARY_BINFO): New macro.
21138 (BF_DELTA): Rename to ...
21139 (BV_DELTA): ... this.
21140 (BF_VCALL_INDEX): Rename to ...
21141 (BV_VCALL_INDEX): ... this.
21142 (BF_FN): Rename to ...
21143 (BV_FN): ... this.
21144 * class.c (build_vbase_path): Adjust for changes to reverse_path.
21145 (set_rtti_entry): Rename BF_ macros to BV_ variants.
21146 (modify_vtable_entry): Simplify.
21147 (add_virtual_function): Rename BF_ macros to BV_ variants.
21148 (build_vtable_initializer): Likewise.
21149 (get_class_offset_1): Remove.
21150 (dfs_get_class_offset): Likewise.
21151 (get_class_offset): Likewise.
21152 (dfs_find_final_overrider): New function.
21153 (find_final_overrider): Likewise.
21154 (modify_one_vtable): Remove.
21155 (dfs_find_base): New function.
21156 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
21157 find_final_overrider.
21158 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
21159 virtuals.
21160 (dfs_fixup_vtable_deltas): Remove.
21161 (override_one_vtable): Remove.
21162 (merge_overrides): Likewise.
21163 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21164 unreal chilren of virtual bases.
21165 (finish_struct_1): Don't use merge_overrides. Don't use
21166 dfs_fixup_vtable_deltas.
21167 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21168 BINFOs.
21169
21170 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21171 Jason Merrill <jason@yorick.cygnus.com>
21172
21173 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21174
21175 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
21176
21177 * exception.cc (__throw_bad_typeid): Add missing std::.
21178
21179 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21180
21181 * cp-tree.h (make_thunk): PROTO -> PARAMS.
21182
21183 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
21184
21185 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21186
21187 Runtime support for new-abi rtti.
21188 * inc/typeinfo (type_info::operator!=): Define in class.
21189 (type_info::before, type_info::name, type_info::operator==,
21190 type_info::operator!=): Define new ABI implementations.
21191 (type_info::is_pointer_p, type_info::is_function_p): Declare
21192 new virtual functions.
21193 (type_info::do_catch, type_info::do_upcast): Likewise.
21194
21195 * tinfo.h (__base_class_info): Define new class.
21196 (__class_type_info): Likewise.
21197 (__si_class_type_info): Likewise.
21198 (__vmi_class_type_info): Likewise.
21199 (__dynamic_cast): Prototype.
21200
21201 * tinfo.cc: Conditionalize old and new rtti mechanisms.
21202 (type_info::is_pointer_p): Define new function.
21203 (type_info::is_function_p): Likewise.
21204 (type_info::do_catch): Likewise.
21205 (type_info::do_upcast): Likewise.
21206 (vtable_prefix): New structure for vtable access.
21207 (adjust_pointer): Define new template function.
21208 (contained_p, public_p, virtual_p, contained_public_p,
21209 contained_nonpublic_p, contained_nonvirtual_p): Define new
21210 functions.
21211 (nonvirtual_base_type): New local variable.
21212 (__class_type_info::~__class_type_info): Define.
21213 (__si_class_type_info::~__si_class_type_info): Likewise.
21214 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21215 (__class_type_info::do_catch): Define new function.
21216 (__class_type_info::do_upcast): Likewise.
21217 (__class_type_info::find_public_src): Likewise.
21218 (__class_type_info::do_find_public_src): Likewise.
21219 (__si_class_type_info::do_find_public_src): Likewise.
21220 (__vmi_class_type_info::do_find_public_src): Likewise.
21221 (__class_type_info::do_dyncast): Likewise.
21222 (__si_class_type_info::do_dyncast): Likewise.
21223 (__vmi_class_type_info::do_dyncast): Likewise.
21224 (__class_type_info::do_upcast): Likewise.
21225 (__si_class_type_info::do_upcast): Likewise.
21226 (__vmi_class_type_info::do_upcast): Likewise.
21227 (__dynamic_cast): Likewise.
21228
21229 * tinfo2.cc (__fundamental_type_info): Define new class.
21230 (__pointer_type_info): Likewise.
21231 (__reference_type_info): Likewise.
21232 (__array_type_info): Likewise.
21233 (__function_type_info): Likewise.
21234 (__enum_type_info): Likewise.
21235 (__ptr_to_member_type_info): Likewise.
21236 (__fundamental_type_info::~__fundamental_type_info): Define.
21237 (__pointer_type_info::~__pointer_type_info): Likewise.
21238 (__reference_type_info::~__reference_type_info): Likewise.
21239 (__array_type_info::~__array_type_info): Likewise.
21240 (__function_type_info::~__function_type_info): Likewise.
21241 (__enum_type_info::~__enum_type_info): Likewise.
21242 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21243 (__pointer_type_info::do_catch): Define new function.
21244 (__ptr_to_member_type_info::do_catch): Define new function.
21245
21246 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21247 (__is_pointer): Likewise.
21248
21249 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21250
21251 2000-01-30 Mark Mitchell <mark@codesourcery.com>
21252
21253 * cp/class.c (build_vtable): Rename to build_primary_vtable.
21254 (prepare_fresh_vtable): Rename to build_secondary_vtable.
21255 (make_new_vtable): New function.
21256 (modify_vtable_entry): Handle generation of new vtables correctly.
21257 (modify_one_vtable): Remove unused parameter.
21258 (dfs_fixup_vtable_deltas): Likewise.
21259 (override_one_vtable): Use build_secondary_vtable.
21260 (finish_struct_1): Use build_primary_vtable and
21261 build_secondary_vtable.
21262
21263 2000-01-28 Ulrich Drepper <drepper@redhat.com>
21264
21265 * cp/decl.c: Adjust variable names, comments, help strings.
21266
21267 2000-01-29 Nathan Sidwell <nathan@acm.org>
21268
21269 * new2.cc (operator delete[]): Use operator delete, don't assume
21270 implementation.
21271
21272 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
21273
21274 * class.c (build_vtbl_initializer): Add argument to
21275 build_vtable_entry call.
21276
21277 2000-01-27 Mark Mitchell <mark@codesourcery.com>
21278
21279 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21280 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21281 (BF_DELTA): New macro.
21282 (BF_VCALL_INDEX): Likewise.
21283 (BF_FN): Likewise.
21284 (THUNK_VCALL_OFFSET): Likewise.
21285 (make_thunk): Change prototype.
21286 * class.c (build_vtable_entry): Integrate
21287 build_vtable_entry_for_fn. Handle vcall indices.
21288 (build_vtable_entry_for_fn): Remove.
21289 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
21290 BF_VCALL_INDEX, BF_FN.
21291 (modify_vtable_entry): Integrate common code from
21292 modify_one_vtable and dfs_fixup_vtable_deltas.
21293 (add_virtual_function): Set BF_VCALL_INDEX.
21294 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
21295 and BF_FN.
21296 (modify_one_vtable): Simplify.
21297 (dfs_fixup_vtable_deltas): Likewise.
21298 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21299 * method.c (make_thunk): Handle vcall indices.
21300
21301 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
21302
21303 Compiler side new abi rtti (not enabled).
21304 * cp-tree.h (new_abi_rtti_p): New macro.
21305 (emit_support_tinfos): Prototype new function.
21306 (tinfo_decl_p): Likewise.
21307 (emit_tinfo_decl): Likwise.
21308 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21309 macros.
21310 (doing_runtime): New local static.
21311 (init_rtti_processing): Add new-abi initializer.
21312 (get_tinfo_decl): Add new-abi logic.
21313 (tinfo_from_decl): Likewise.
21314 (build_dynamic_cast_1): Likewise.
21315 (qualifier_flags): New static function.
21316 (tinfo_base_init): Likewise.
21317 (generic_initializer): Likewise.
21318 (ptr_ref_initializer): Likewise.
21319 (ptmd_initializer): Likewise.
21320 (class_hint_flags): Likewise.
21321 (class_initializer): Likewise.
21322 (synthesize_tinfo_var): Likewise.
21323 (create_real_tinfo_var): Likewise.
21324 (create_pseudo_type_info): Likewise.
21325 (get_vmi_pseudo_type_info): Likewise.
21326 (create_tinfo_types): Likewise.
21327 (emit_support_tinfos): New global function.
21328 (tinfo_decl_p): New global predicate.
21329 (emit_tinfo_decl): New global function.
21330 * class.c (set_rtti_entry): Generalize for old and new rtti.
21331 (build_vtbl_initializer): Likewise.
21332 * decl2.c (finish_file): Likewise.
21333
21334 2000-01-27 Jim Wilson <wilson@cygnus.com>
21335
21336 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21337 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21338
21339 2000-01-27 Mike Stump <mrs@wrs.com>
21340
21341 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21342 for scopes.
21343
21344 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
21345
21346 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21347
21348 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
21349
21350 * optimize.c (calls_setjmp_r): Supply new argument
21351 to special_function_p.
21352
21353 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21354
21355 * call.c: PROTO -> PARAMS.
21356 * class.c: Likewise.
21357 * cp-tree.h: Likewise.
21358 * cvt.c: Likewise.
21359 * decl.c: Likewise.
21360 * decl.h: Likewise.
21361 * decl2.c: Likewise.
21362 * dump.c: Likewise.
21363 * errfn.c: Likewise.
21364 * error.c: Likewise.
21365 * except.c: Likewise.
21366 * expr.c: Likewise.
21367 * init.c: Likewise.
21368 * input.c: Likewise.
21369 * lex.c: Likewise.
21370 * lex.h: Likewise.
21371 * method.c: Likewise.
21372 * optimize.c: Likewise.
21373 * parse.y: Likewise.
21374 * pt.c: Likewise.
21375 * repo.c: Likewise.
21376 * rtti.c: Likewise.
21377 * search.c: Likewise.
21378 * semantics.c: Likewise.
21379 * spew.c: Likewise.
21380 * tree.c: Likewise.
21381 * typeck.c: Likewise.
21382 * typeck2.c: Likewise.
21383 * xref.c: Likewise.
21384
21385 2000-01-25 Richard Henderson <rth@cygnus.com>
21386
21387 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21388
21389 2000-01-25 Mark Mitchell <mark@codesourcery.com>
21390
21391 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21392 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21393 (struct vcall_offset_data_s): New type.
21394 (dfs_vcall_offset_queue_p): New function.
21395 (dfs_build_vcall_offset_vtbl_entries): Likewise.
21396 (build_vcall_offset_vtbl_entries): Likewise.
21397 (layout_vtable_decl): Likewise.
21398 (num_vfun_entries): Likewise.
21399 (num_extra_vtbl_entries): Add the entries for vcall offsets.
21400 (build_vtbl_initializer): Likewise.
21401 (dfs_finish_vtabls): Use layout_vtable_decl.
21402 (modify_one_vtables): Always duplicate vtables under the new ABI.
21403 (finish_struct_1): Use layout_vtable_decl.
21404
21405 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21406
21407 * decl.c (member_function_or_else): Change third arg from a format
21408 specifier to an `enum overload_flags'. Callers changed.
21409
21410 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
21411
21412 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21413 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21414 build_const_cast, get_delta_difference, check_return_expr): Avoid
21415 ANSI string concatenation usage.
21416
21417 2000-01-24 Mark Mitchell <mark@codesourcery.com>
21418
21419 * class.c (layout_class_type): Put the fields required to make a
21420 class non-empty at the end, not the beginning, of the TYPE_FIELDs
21421 list.
21422
21423 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
21424
21425 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21426 template.
21427
21428 * decl2.c (mark_used): Do instantiate inlines that have been
21429 explicitly instantiated.
21430
21431 2000-01-24 Richard Henderson <rth@cygnus.com>
21432
21433 * call.c (build_over_call): Use expand_tree_builtin.
21434 * typeck.c (build_function_call_real): Likewise.
21435 (build_binary_op_nodefault): Handle unordered compares.
21436
21437 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21438
21439 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21440 cp_tree_index values.
21441 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21442 New global node #defines for them.
21443 * rtti.c (call_void_fn): Replace with ...
21444 (build_runtime_decl): ... new static function.
21445 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21446 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21447 (build_dynamic_cast_1): Always produce correctly typed result.
21448 Explicitly produce type_info addresses. Use dynamic_cast_node.
21449 * exception.cc (__throw_bad_cast): Return `void *'.
21450 (__throw_bad_typeid): Return `const type_info &'.
21451
21452 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21453
21454 * cp-tree.h (get_vtable_decl): Prototype new function.
21455 * class.c (get_vtable_decl): New function. Broken out from ...
21456 (build_vtable): ... here. Use it.
21457 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21458 by get_vtable_decl.
21459
21460 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21461
21462 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21463 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21464 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21465 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21466 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21467 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21468 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21469 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21470 (CPTI_TINFO_VAR_ID): New enumeration.
21471 (__tp_desc_type_node, __access_mode_type_node,
21472 __bltn_desc_type_node, __user_desc_type_node,
21473 __class_desc_type_node, __ptr_desc_type_node,
21474 __attr_desc_type_node, __func_desc_type_node,
21475 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21476 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21477 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21478 enum_desc_type_node, class_desc_type_node,
21479 si_class_desc_type_node, vmi_class_desc_type_node,
21480 ptmd_desc_type_node, base_desc_type_node): New #defines.
21481 (tinfo_fn_id, tinfo_fn_type): Rename to ...
21482 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21483 (tinfo_var_id): New enumeration.
21484 (DECL_TINFO_FN_P): Augment comment.
21485 * decl.c (cp_global_trees): Adjust documentation.
21486 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21487 tinfo_decl_type and tinfo_var_id.
21488 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21489 (build_typeid): Remove unused variable.
21490 (get_tinfo_var): Use tinfo_var_id.
21491 (tinfo_name): New static function.
21492 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21493 (tinfo_from_decl): Likewise.
21494 (get_base_offset): New static function, broken out of
21495 expand_class_desc.
21496 (expand_si_desc): Use tinfo_name.
21497 (expand_class_desc): Likewise. Lose local static variable.
21498 Use base_desc_type_node. Use get_base_offset.
21499 (expand_ptr_desc): Use tinfo_name.
21500 (expand_attr_desc): Likewise.
21501 (expand_generic_desc): Likewise.
21502
21503 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21504 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21505
21506 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21507
21508 * cp-tree.h (__eprintf): Remove declaration.
21509 * tree.c (__eprintf): Remove definition.
21510
21511 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
21512 Mark Mitchell <mark@codesourcery.com>
21513
21514 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21515 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21516
21517 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
21518
21519 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21520
21521 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21522
21523 * cp-tree.h (register_dtor_fn): New function.
21524 * decl.c (destroy_local_static): Rename to ...
21525 (register_dtor_fn): ... this. Give it external linkage.
21526 (expand_static_init): Use it.
21527 * decl2.c (do_static_initialization): Likewise, if using
21528 __cxa_atexit.
21529 (do_static_destruction): Check that __cxa_atexit is not in use.
21530 (finish_file): Don't call do_static_destruction if using
21531 __cxa_atexit.
21532
21533 * typeck.c (convert_arguments): Restore two-message error
21534 reporting.
21535
21536 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
21537
21538 Remap dynamic cast hint values to be consistent across ABIs.
21539 * search.c (dynamic_cast_base_recurse): Remap generated value.
21540 (get_dynamic_cast_base_type): Adjust documentation.
21541 * tinfo.h (__user_type_info::dyncast): Likewise.
21542 (__user_type_info::find_public_subobj): Remap BOFF meaning.
21543 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21544 (__class_type_info::do_dyncast): Likewise.
21545 (__class_type_info::do_find_public_subobj): Likewise.
21546 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21547
21548 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21549
21550 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21551
21552 * typeck2.c (incomplete_type_error): Restore previous
21553 cp_error and cp_error_at call sequence.
21554
21555 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
21556
21557 * class.c (dump_class_hierarchy): Make format agree with argument;
21558 cast pointer to unsigned long and print with %lx.
21559
21560 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21561
21562 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21563
21564 * typeck.c (composite_pointer_type, common_type,
21565 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21566 build_function_call_real, convert_arguments,
21567 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21568 build_unary_op, mark_addressable, build_compound_expr,
21569 build_static_cast, build_reinterpret_cast, build_const_cast,
21570 build_c_cast, build_modify_expr, get_delta_difference,
21571 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21572 'ISO C++'. Fusion consecutive calls to diagnostic message routines
21573 into a single one.
21574 * typeck2.c (readonly_error, abstract_virtuals_error,
21575 process_init_constructor, check_for_new_type): Likewise.
21576
21577 2000-01-19 Mark Mitchell <mark@codesourcery.com>
21578
21579 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21580 VAR_DECLs.
21581
21582 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
21583
21584 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21585 (build_x_typeid): Likewise.
21586 (get_tinfo_fn): Likewise.
21587 (get_tinfo_fn_unused): Rename to ...
21588 (get_tinfo_decl): ... here.
21589 * rtti.c (build_headof): Replace logic error with assertion.
21590 (get_tinfo_fn_dynamic): Rename to ...
21591 (get_tinfo_decl_dynamic): ... here. Make static. Use
21592 complete_type_or_else.
21593 (build_x_typeid): Move into ...
21594 (build_typeid): ... here. Adjust call to
21595 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21596 throw_bad_typeid expression.
21597 (get_tinfo_fn_unused): Rename to ...
21598 (get_tinfo_decl): ... here. Adjust comment.
21599 (get_tinfo_fn): Delete.
21600 (tinfo_from_decl): New static function.
21601 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21602 (get_typeid): Use complete_type_or_else.
21603 (build_dynamic_cast_1): Adjust calls to
21604 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21605 * parse.y (primary): Adjust call to build_typeid.
21606 * except.c (build_eh_type_type_ref): Adjust call to
21607 get_tinfo_decl. Mark as used.
21608 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21609 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21610 * parse.c: Regenerated.
21611
21612 2000-01-17 Mark Mitchell <mark@codesourcery.com>
21613
21614 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
21615 calling convention.
21616 (resolves_to_fixed_type_p): Document calling convention.
21617 * rtti.c (build_x_typeid): Initialize NONNULL.
21618
21619 * cp-tree.h (build_shared_int_cst): New function.
21620 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21621 * class.c (modify_vtable_entry): Likewise.
21622 (add_virtual_function): Split out code to generated shared
21623 INTEGER_CSTs to build_share_int_cst.
21624 (modify_all_vtables): Handle all the overridden functions here.
21625 Add overridden functions from non-primary virtual bases to the
21626 primary vtable.
21627 (finish_struct_1): Adjust call to modify_all_vtables. Add
21628 overridden functions from non-primary bases to the vtable.
21629 * tree.c (build_shared_int_cst): New function.
21630
21631 * cp-tree.h (scratchalloc): Remove.
21632 (build_scratch_list): Likewise.
21633 * call.c (convert_class_to_reference): Replace build_scratch_list
21634 and build_expr_list with build_tree_list.
21635 (add_candidate): Replace scratchalloc with expralloc. Note memory
21636 leak.
21637 (build_user_type_conversion_1): Replace build_scratch_list
21638 and build_expr_list with build_tree_list.
21639 (build_new_op): Likewise.
21640 (build_op_delete_call): Likewise.
21641 (convert_like): Likewise.
21642 * cvt.c (ocp_convert): Likewise.
21643 * decl.c (start_decl): Likewise.
21644 (start_function): Likewise.
21645 (finish_destructor_body): Likewise.
21646 (maybe_build_cleanup_1): Likewise.
21647 * decl2.c (reparse_decl_as_expr): Likewise.
21648 * init.c (perform_member_init): Likewise.
21649 (expand_cleanup_for_base): Likewise.
21650 (build_builtin_delete_call): Likewise.
21651 (build_new_1): Likewise.
21652 (build_delete): Likewise.
21653 * method.c (do_build_assign_ref): Likewise.
21654 * parse.y (already_scoped_stmt): Likewise.
21655 (nontrivial_exprlist): Likewise.
21656 (net_initializer): Likewise.
21657 (initlist): Likewise.
21658 * parse.c: Regenerated.
21659 * rtti.c (build_x_typeid): Likewise.
21660 (build_dynamic_cast_1): Likewise.
21661 * typeck.c (build_x_compound_expr): Likewise.
21662 (build_static_cast): Likewise.
21663 (build_modify_expr): Likewise.
21664
21665 * cp-tree.h (DECL_VINDEX): Add documentation.
21666 * class.c (build_vtable_entry): Likewise.
21667 (start_vtable): Add comment.
21668 (add_virtual_function): Replace pending_hard_virtuals with
21669 overridden_virtuals and pending_virtuals with new_virtuals.
21670 Replace redundant assignments with assertions.
21671 (check_for_override): Add comment.
21672 (check_bases_and_members): Replace pending_hard_virtuals with
21673 overridden_virtuals and pending_virtuals with new_virtuals.
21674 (create_vtbl_ptr): Likewise.
21675 (layout_class_type): Likewise.
21676 (finish_struct_1): Likewise. Add comments.
21677
21678 2000-01-16 Mark Mitchell <mark@codesourcery.com>
21679
21680 * class.c (finish_struct_1): Replace redundant code with
21681 assertions.
21682
21683 * cp-tree.h (flag_new_abi): Move.
21684 (flag_use_cxa_atexit): Likewise.
21685 (flag_honor_std): Likewise.
21686 (flag_rtti): Likewise.
21687 (vbase_offsets_in_vtable_p): Define.
21688 (vptrs_present_everywhere_p): Likewise.
21689 (TYPE_CONTAINS_VPTR_P): Likewise.
21690 (dfs_walk_real): Declare.
21691 * class.c (build_vbase_pointer_fields): Check
21692 vbase_offsets_in_vtable_p.
21693 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21694 BINFO_VPTR_FIELD.
21695 (build_vbase_offset_vtbl_entries): Simplify.
21696 (build_vbase_offset_vtbl_entries): Adjust.
21697 (build_vbase_pointer): Add ability to look up vbase offsets in
21698 vtable.
21699 (start_vtable): New function.
21700 (add_virtual_function): Use it.
21701 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21702 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21703 (build_vtbl_initializer): Take the type of the complete object as
21704 input. Use it to correctly calculate vbase offsets.
21705 (dfs_finish_vtbls): Pass the complete type to
21706 build_vtbl_initializer.
21707 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21708 (create_vtable_ptr): Create a vtable even if there are no
21709 new virtual functions, under the new ABI.
21710 (finish_struct_1): Likewise.
21711 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21712 * decl.c (exapnd_static_init): Remove call to
21713 preserve_initializer.
21714 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21715 vtables.
21716 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21717 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21718 (construct_virtual_bases): Don't initialize virtual base pointers
21719 under the new ABI.
21720 (build_aggr_init): Clean up comment.
21721 (expand_aggr_init_1): Likewise.
21722 * rtti.c (expand_class_desc): Store the virtual function table
21723 index where the vbase offset lives in the offset field.
21724 * search.c (dfs_walk_real): Make it global.
21725 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21726 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21727
21728 * tinfo.h (USItype): Make it signed under the new ABI.
21729 * tinfo.cc (convert_to_base): New function. Encapsulate base
21730 conversion logic here.
21731 (__class_type_info::do_upcast): Use it.
21732 (__class_type_info::do_dyncast): Likewise.
21733 (__class_type_info::do_find_public_subobj): Likewise.
21734
21735 * init.c (construct_virtual_bases): Don't look up the addresses of
21736 virtual bases at run-time.
21737
21738 * class.c (build_vbase_pointer): Relocate.
21739 (build_vbase_pointer_fields): Likewise.
21740 (dfs_build_vbase_offset_vtbl_entries): Likewise.
21741 (build_vbase_offset_vtbl_entries): Likewise.
21742
21743 * decl.c (init_decl_processing): Complain if -fnew-abi
21744 -fno-vtable-thunks is used.
21745
21746 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21747 flag_new_abi.
21748
21749 2000-01-15 Mark Mitchell <mark@codesourcery.com>
21750
21751 * cp-tree.h (num_extra_vtbl_entries): New function.
21752 (size_extra_vtbl_entries): Likewise.
21753 (dfs_vtable_path_unmark): Likewise.
21754 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21755 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21756 * class.c (num_extra_vtbl_entries): New function.
21757 (size_extra_vtbl_entries): Likewise.
21758 (dfs_build_vbase_offset_vtbl_entries): New function.
21759 (build_vbase_offset_vtbl_entries): Likewise.
21760 (build_vtbl_initializer): Use it.
21761 (finish_struct_1): Adjust vtable sizes (using
21762 num_extra_vtbl_entries).
21763 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21764 THUNK_DECL is non-NULL before expanding it.
21765 * init.c (expand_virtual_init): Adjust the vtable pointer by
21766 size_extra_vtbl_entries before storing it.
21767 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21768 Handle TREE_LIST parameters here, not in the dfs_* functions.
21769 (dfs_unmarked_real_bases_queue_p): Adjust.
21770 (dfs_marked_real_bases_queue_p): Likewise.
21771 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21772 (dfs_vtable_path_marked_real_bases_queue_p): New function.
21773 (dfs_vtable_path_unmark): Likewise.
21774
21775 2000-01-14 Mark Mitchell <mark@codesourcery.com>
21776
21777 * optimize.c (copy_body_r): Clear the operand three of a
21778 TARGET_EXPR when copying it.
21779
21780 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21781
21782 * method.c (build_decl_overload_real): Check whether we are in ::
21783 before returning __builtin_new/delete.
21784
21785 2000-01-13 Mark Mitchell <mark@codesourcery.com>
21786
21787 * pt.c (tsubst_friend_function): Improve comment.
21788 (instantiate_decl): Avoid crashing when a "nested" function is
21789 instantiated from the top level.
21790
21791 * dump.c (dqeueue_and_dump): Dump
21792 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21793
21794 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21795
21796 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21797
21798 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
21799
21800 * g++spec.c (lang_specific_driver): Add -fnew-abi if
21801 ENABLE_NEW_GXX_ABI defined.
21802 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21803 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21804 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21805
21806 2000-01-12 Mark Mitchell <mark@codesourcery.com>
21807
21808 * decl.c (start_cleanup_fn): Call pushdecl.
21809
21810 * call.c (convert_class_to_reference): Fix typos.
21811 (build_conditional_expr): Handle errors gracefully.
21812 * class.c (push_nested_class): Likewise.
21813 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21814 (DECL_THIS_EXTERN): Use it.
21815 (DECL_THIS_STATIC): Likewise.
21816 * cvt.c (convert_to_void): Handle errors gracefully.
21817 (build_expr_type_conversion): Likewise.
21818 * decl.c (maybe_push_decl): Likewise.
21819 (start_decl_1): Likewise.
21820 (require_complete_types_for_parms): Likewise.
21821 * parse.y (structsp): Likewise.
21822 (base_class): Likewise.
21823 * parse.c: Regenerated.
21824 * pt.c (finish_member_template_decl): Likewise.
21825 * typeck.c (decay_conversion): Likewise.
21826
21827 * cp-tree.h (dfs_skip_vbases): New function.
21828 (find_vbase_instance): Likewise.
21829 * class.c (determine_primary_base): Allow a nearly empty base to
21830 serve as a primary base class under the new ABI.
21831 (get_class_offset_1): Rename to ...
21832 (dfs_get_class_offset): ... this. Simplify. Don't issue error
21833 messages here.
21834 (get_class_offset): Use it. Issue error messages here.
21835 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21836 find the right copies of virtual bases.
21837 (fixup_vtable_deltas1): Rename to ...
21838 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
21839 bases as primary bases.
21840 (fixup_vtable_deltas): Remove.
21841 (override_one_vtable): Handle virtual bases as primary bases.
21842 (merge_overrides): Likewise.
21843 (finish_struct_1): Likewise.
21844 (dump_class_hierarchy): Dump primary-ness of bases as well.
21845 * search.c (mark_primary_bases): Use a pre-order traversal to
21846 handle primary virtual bases.
21847 (dfs_skip_vbases): New fiunction.
21848 (expand_upcast_fixups): Adjust to handle primary virtual bases.
21849 (fixup_virtual_upcast_offsets): Likewise.
21850 (fixup_all_virtual_upcast_offsets): Likewise.
21851 (dfs_find_vbase_instances): New function.
21852 (find_vbase_instance): Likewise.
21853
21854 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
21855
21856 * lex.c (DIR_SEPARATOR): Delete macro.
21857
21858 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
21859
21860 * decl2.c (lang_decode_option): Handle automatic line wrapping
21861 option.
21862
21863 2000-01-11 Mark Mitchell <mark@codesourcery.com>
21864
21865 * friend.c (do_friend): Don't resolve scopes when processing
21866 template declarations, even if the qualifying scope doesn't
21867 involve template parameters.
21868
21869 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
21870
21871 * class.c (dfs_modify_vtables_queue_p): Remove.
21872 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21873 and dfs_marked_real_bases_queue_p instead of
21874 dfs_modify_vtables_queue_p.
21875
21876 * class.c (build_vbase_path): Simplify.
21877 (dfs_propagate_binfo_offsets): New function.
21878 (propagate_binfo_offsets): Use it.
21879 (remove_base_field): Simplify.
21880 (dfs_set_offset_for_vbases): Remove.
21881 (dfs_set_offset_for_shared_vbases): New function.
21882 (dfs_set_offset_for_unshared_vbases): Likewise.
21883 (layout_virtual_bases): Use them.
21884 (layout_basetypes): Don't call propagate_binfo_offsets.
21885 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21886 for the vbases.
21887
21888 * class.c (build_base_field): New function, split out from ...
21889 (build_base_fields): ... here. Use it. Allocate primary bases
21890 first, under the new ABI.
21891 (get_vtable_entry): Remove.
21892 (remove_base_field): New function, split out from ...
21893 (remove_base_fields): ... here. Adjust since primary bases come
21894 first under the new ABI.
21895
21896 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21897 (initialize_vtbl_ptrs): New function.
21898 (expand_indirect_vtbls_init): Change prototype.
21899 (convert_pointer_to_vbase): Declare.
21900 * init.c (expand_direct_vtbls_init): Remove.
21901 (dfs_initialize_vtbl_ptrs): New function.
21902 (initialize_vtbl_ptrs): Likewise.
21903 (emit_base_init): Use initialize_vtbl_ptrs.
21904 * search.c (convert_pointer_to_vbase): Make it global.
21905 (expand_indirect_vtbls_init): Remove vtable initialization code.
21906 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21907
21908 * class.c (dfs_finish_vtbls): New function.
21909 (finish_vtbls): Use it.
21910 (dump_class_hierarchy): New function.
21911
21912 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21913 (BINFO_VBASE_PRIMARY_P): New macro.
21914 (BINFO_VIRTUALS): Add to documentation.
21915 (SET_BINFO_PRIMARY_MARKED_P): Remove.
21916 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21917 (dfs_mark_primary_bases_queue_p): Likewise.
21918 (dfs_unmarked_real_bases_queue_p): New function.
21919 (dfs_marked_real_bases_queue_p): Likewise.
21920 * search.c (dfs_mark_primary_bases): Adjust.
21921 (mark_primary_bases): Likewise.
21922 (get_shared_vbase_if_not_primary): New function.
21923 (dfs_unmarked_real_bases_queue_p): Likewise.
21924 (dfs_marked_real_bases_queue_p): Likewise.
21925 (dfs_get_pure_virtuals): Simplify.
21926 (get_pure_virtuals): Likewise.
21927
21928 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21929
21930 * lex.c: Include tm_p.h.
21931
21932 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
21933
21934 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21935
21936 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
21937
21938 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21939 * pt.c (instantiate_decl): Defer comdat templates that might not be
21940 needed.
21941
21942 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21943 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21944 (finish_file): Likewise.
21945
21946 * decl2.c (import_export_class): Undo 12/14 change.
21947
21948 * error.c (dump_decl): operator new, not operatornew.
21949
21950 * class.c (field_decl_cmp): A nontype is "greater" than a type.
21951 * search.c (lookup_field_1): Look for the last field with the
21952 desired name.
21953
21954 2000-01-05 Nathan Sidwell <nathan@acm.org>
21955
21956 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21957 FUNCTION_DECL.
21958
21959 2000-01-05 Nathan Sidwell <nathan@acm.org>
21960
21961 * typeck.c (build_static_cast): Don't strip target qualifiers
21962 when casting from a class.
21963
21964 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21965
21966 * class.c (warn_hidden): Initialize variable `fndecl'.
21967
21968 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
21969
21970 * decl.c (flag_isoc9x): New variable to be able to use code in
21971 c-common.c. For now always zero.
21972
21973 2000-01-03 Mark Mitchell <mark@codesourcery.com>
21974
21975 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21976 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21977 or unshare_base_binfos for virtual bases here.
21978 * search.c (dfs_get_vbase_types): Do it here.
21979 (get_vbase_types): Adjust.
21980
21981 2000-01-02 Mark Mitchell <mark@codesourcery.com>
21982
21983 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21984 (BINFO_PRIMARY_MARKED_P): Use flag 5.
21985 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21986 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21987 (unmark_primary_bases): Remove declaration.
21988 (unmarkedp): Declare.
21989 (dfs_vbase_unmark): Likewise.
21990 * class.c (determine_primary_base): Return immediately if there
21991 are no base classes. Call mark_primary_bases here.
21992 (modify_all_direct_vtables): Remove.
21993 (modify_all_indirect_vtables): Remove.
21994 (dfs_modify_vtables_queue_p): New function.
21995 (dfs_modify_vtables): New function.
21996 (modify_all_vtables): Use them.
21997 (build_base_fields): Build FIELD_DECLs for primary virtual base
21998 classes.
21999 (create_vtable_ptr): Don't call determine_primary_base here.
22000 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22001 (dfs_set_offset_for_vbases): ... this.
22002 (layout_virtual_bases): Use it.
22003 (layout_class_type): Call determine_primary_base here.
22004 * search.c (unmarkedp): Make it global.
22005 (shared_marked_p): Simplify.
22006 (shared_unmarked_p): Likewise.
22007 (dfs_primary_bases_queue_p): Remove.
22008 (dfs_unmark_primary_bases): Likewise.
22009 (unmark_primary_bases): Likewise.
22010 (mark_primary_bases): Simplify.
22011 (get_pure_virtuals): Don't call mark_primary_bases here.
22012 (dfs_vbase_unmark): New function.
22013 (get_vbase_types): Simplify.
22014
22015 * class.c (struct base_info): Remove.
22016 (determine_primary_base): Take has_virtual_p rather than a
22017 base_info as input. Don't calculate max_has_virtual.
22018 (finish_struct_bits): Remove max_has_virtual argument.
22019 (create_vtable_ptr): Remove max_has_virtual_p argument.
22020 (layout_virtual_bases): Remove max argument.
22021 (layout_basetypes): Likewise.
22022 (layout_class_type): Remove max_has_virtual_p argument.
22023 (finish_struct_1): Remove max_has_virtual.
22024
22025 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22026 (layout_basetypes): Remove.
22027 * class.c (propagate_binfo_offsets): Moved here from tree.c.
22028 Update to handle primary virtual bases.
22029 (remove_base_fields): New function, split out from
22030 layout_basetypes.
22031 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22032 (layout_virtual_bases): New function, split out from
22033 layout_basetypes. Update to handle primary virtual bases.
22034 (layout_basetypes): Moved here from tree.c. Use
22035 remove_base_fields and layout_virtual_bases.
22036 * search.c (dfs_mark_primary_bases_queue_p): New function.
22037 (mark_primary_bases): Use it.
22038 * tree.c (CEIL): Remove.
22039 (propagate_binfo_offsets): Remove.
22040 (layout_basetypes): Remove.
22041
22042 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22043
22044 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22045 (BINFO_PRIMARY_MARKED_P): New macro.
22046 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22047 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22048 (mark_primary_bases): New function.
22049 (unmark_primary_bases): Likewise.
22050 * search.c (get_abstract_virtuals_1): Remove.
22051 (dfs_mark_primary_bases): New function.
22052 (mark_primary_bases): Likewise.
22053 (dfs_unmark_primary_bases): Likewise.
22054 (unmark_primary_bases): Likewise.
22055 (dfs_get_pure_virtuals): Likewise.
22056
22057 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22058
22059 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22060 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22061 (modify_one_vtable): Adjust.
22062 (fixup_vtable_deltas1): Likewise.
22063 (override_one_vtable): Likewise.
22064 * search.c (get_abstract_virtuals_1): Likewise.
22065 (get_pure_virtuals): Likewise.
22066 (expand_upcast_fixups): Likewise.
22067 * tree.c (debug_binfo): Likewise.
22068
22069 * class.c (build_vtable): Don't return a value. Don't rebuild
22070 vtables for bases that have already been handled.
22071 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22072 already been handled.
22073 (modify_one_vtable): Adjust accordingly.
22074 (fixup_vtable_deltas1): Likewise.
22075 (finish_struct_1): Likewise.
22076
22077 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
22078
22079 * call.c (build_new_method_call): Also check destructors.