Makefile.in (program_transform_cross_name): Delete.
[gcc.git] / gcc / cp / ChangeLog
1 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
2
3 * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
4 (c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
5 (c++.uninstall): Likewise.
6
7 2003-12-05 Danny Smith <dannysmith@gcc.gnu.org>
8 Mark Mitchell <mark@codesourcery.com>
9
10 PR c++/13305
11 * parser.c (cp_parser_elaborated_type_specifier): Accept
12 attributes.
13
14 2003-12-05 Mark Mitchell <mark@codesourcery.com>
15
16 PR c++/13314
17 * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
18 calls.
19 (cp_parser_class_head): Likewise.
20
21 2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
22
23 PR c++/13166
24 * parser.c (cp_parser_late_parsing_default_args): Make sure the
25 context is a class before calling push_nested_class and
26 pop_nested_class.
27
28 2003-12-03 James E Wilson <wilson@specifixinc.com>
29
30 * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
31 support.
32
33 2003-12-03 Mark Mitchell <mark@codesourcery.com>
34
35 PR c++/9127
36 * cp-tree.h (at_namespace_scope_p): New function.
37 * parser.c (cp_parser_class_head): Handle invalid explicit
38 specializations.
39 * search.c (at_namespace_scope_p): New function.
40
41 PR c++/13179
42 * semantics.c (finish_handler_parms): Do not call eh_type_info for
43 types used in templates.
44
45 PR c++/10771
46 * parser.c (cp_parser_check_for_invalid_template_id): New
47 function.
48 (cp_parser_simple_type_specifier): Use it.
49 (cp_parser_elaborated_type_specifier): Likewise.
50 (cp_parser_class_head): Likewise.
51
52 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
53
54 PR c++/10126
55 * pt.c (convert_nontype_argument): Handle default conversions
56 while converting a pointer to member function.
57
58 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
59
60 PR c++/12573
61 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
62 looking into them recursively.
63
64 2003-12-02 Richard Henderson <rth@redhat.com>
65
66 * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
67 * parser.c (struct cp_token): Likewise.
68 (struct cp_parser_token_tree_map_node): Likewise.
69 * lex.c (struct resword): Move const after ENUM_BITFIELD.
70
71 2003-11-30 Mark Mitchell <mark@codesourcery.com>
72
73 PR c++/9849
74 * parser.c (cp_lexer_prev_token): New function.
75 (cp_parser_skip_to_closing_parenthesis): Add consume_paren
76 parameter.
77 (cp_parser_nested_name_specifier_opt): Add is_declaration
78 parameter.
79 (cp_parser_nested_name_specifier): Likewise.
80 (cp_parser_class_or_namespace_name): Likewise.
81 (cp_parser_class_name): Likewise.
82 (cp_parser_template_id): Likewise.
83 (cp_parser_template_name): Likewise.
84 (cp_parser_id_expression): Adjust calls to
85 cp_parser_nested_name_specifier_op, cp_parser_template_id,
86 cp_parser_class_name.
87 (cp_parser_unqualified_id): Likewise.
88 (cp_parser_postfix_expression): Likewise.
89 (cp_parser_pseudo_destructor_name): Likewise.
90 (cp_parser_cast_expression): Likewise.
91 (cp_parser_mem_initializer_id): Likewise.
92 (cp_parser_simple_type_specifier): Likewise.
93 (cp_parser_type_name): Likewise.
94 (cp_parser_elaborated_type_specifier): Likewise.
95 (cp_parser_qualified_namespace_specifier): Likewise.
96 (cp_parser_using_declaration): Likewise.
97 (cp_parser_using_directive): Likewise.
98 (cp_parser_ptr_operator): Likewise.
99 (cp_parser_declarator_id): Likewise.
100 (cp_parser_class_head): Likewise.
101 (cp_parser_base_specifier): Likewise.
102 (cp_parser_constructor_declarator_p): Likewise.
103 (cp_parser_direct_declarator): Fix typo in comment.
104 (cp_parser_parenthesized_expression_list): Adjust call to
105 cp_parser_skip_to_closing_parenthesis.
106 (cp_parser_selection_statement): Likewise.
107
108 2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
109
110 PR c++/12924
111 * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
112 with OVERLOAD and DECL nodes as the first operand.
113
114 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
115
116 * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
117
118 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
119
120 PR c++/5369
121 * friend.c (is_friend): Handle member function of a class
122 template as template friend.
123 (do_friend): Likewise.
124 * decl2.c (check_classfn): Add template_header_p parameter.
125 * decl.c (start_decl): Adjust check_classfn call.
126 (grokfndecl): Likewise.
127 * pt.c (is_specialization_of_friend): New function.
128 (uses_template_parms_level): Likewise.
129 (push_template_decl_real): Use uses_template_parms_level.
130 (tsubst_friend_function): Adjust check_classfn call.
131 * cp-tree.h (check_classfn): Adjust declaration.
132 (uses_template_parms_level): Add declaration.
133 (is_specialization_of_friend): Likewise.
134
135 2003-11-21 Mark Mitchell <mark@codesourcery.com>
136
137 PR c++/12515
138 * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
139 operator.
140
141 2003-11-21 Jan Hubicka <jh@suse.cz>
142
143 * parser.c (cp_parser_postfix_expression): Initialize 's' to
144 NULL_TREE.
145
146 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
147
148 * Make-lang.in (c++.extraclean): Delete.
149
150 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
151
152 * Make-lang.in (check-g++, lang_checks): Add.
153
154 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
155
156 PR c++/12932
157 * class.c (currently_open_derived_class): Check if
158 current_class_type is NULL_TREE.
159 * semantics.c (finish_call_expr): Check if
160 currently_open_derived_class returns NULL_TREE.
161 * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
162 parameter.
163
164 2003-11-17 Jason Merrill <jason@redhat.com>
165
166 * init.c (build_new_1): Preevaluate placement args.
167 * call.c (build_op_delete_call): Don't expose placement args to
168 overload resolution.
169
170 2003-11-16 Jason Merrill <jason@redhat.com>
171
172 * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
173 and TAGS files that include them for each front end.
174
175 2003-11-15 Bernardo Innocenti <bernie@develer.com>
176
177 PR c++/2294
178 * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
179 build failure on libjava.
180
181 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
182
183 PR c++/2294
184 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
185 unless the declaration is a built-in.
186 (set_namespace_binding): While binding OVERLOADs with only one
187 declaration, we still need to call supplement_binding.
188
189 2003-11-14 Mark Mitchell <mark@codesourcery.com>
190
191 PR c++/12762
192 * parser.c (cp_parser_enclosed_template_argument_list): New
193 function.
194 (cp_parser_template_id): Use it.
195 (cp_parser_simple_type_specifier): Recognize invalid template
196 syntax.
197
198 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
199
200 PR c++/2094
201 * pt.c (unify): Add support for PTRMEM_CST and
202 FIELD_DECL unification.
203
204 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
205
206 * decl.c (grokfndecl): Change OK to type tree.
207
208 2003-11-12 Mark Mitchell <mark@codesourcery.com>
209
210 * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
211 CONSTRUCTOR.
212
213 * decl.c (cp_make_fname_decl): When creating a top-level
214 __FUNCTION__-like symbol, do register it with pushdecl.
215
216 * decl.c (finish_case_label): Do not check that we are within a
217 switch statement here.
218 * parser.c (struct cp_parser): Add in_iteration_statement_p and
219 in_switch_statement_p.
220 (cp_parser_new): Initialize them.
221 (cp_parser_labeled_statement): Check validity of case labels
222 here.
223 (cp_parser_selection_statement): Set in_switch_statement_p.
224 (cp_parser_iteration_statement): Set in_iteration_statement_p.
225 (cp_parser_jump_statement): Check validity of break/continue
226 statements here.
227
228 PR c++/12735
229 * cp-tree.h (duplicate_decls): Return a tree.
230 * decl.c (duplicate_decls): Clarify documentation. Return
231 error_mark_node to indicate a failed redeclaration.
232 * friend.c (do_friend): Handle that case.
233 * name-lookup.c (pushdecl): Likewise.
234
235 2003-11-11 Jason Merrill <jason@redhat.com>
236
237 * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
238 * name-lookup.c (parse_using_directive): New fn.
239 (is_associated_namespace): New fn.
240 (arg_assoc_namespace): Also check associated namespaces.
241 * name-lookup.h: Declare new fns.
242 * pt.c (maybe_process_partial_specialization): Allow
243 specialization in associated namespace.
244 * parser.c (cp_parser_using_directive): Accept attributes. Use
245 parse_using_directive.
246
247 2003-11-10 Richard Henderson <rth@redhat.com>
248
249 * cvt.c (convert_to_void): Use void_zero_node after overload failure.
250
251 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
252
253 PR c++/12832
254 * name-lookup.c (supplement_binding): Gracefully handle names
255 used at non-class scope prior declaration.
256
257 2003-11-06 Matt Austern <austern@apple.com>
258
259 * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
260 * method.c (use_thunk): give thunk same visibility as function.
261 * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
262
263 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
264
265 PR c++/11616
266 * pt.c (instantiate_pending_templates): Save and restore
267 input_location.
268
269 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
270
271 PR c++/2019
272 * friend.c (add_friend): Don't display previous declaration in
273 case of duplicate friend warning.
274
275 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
276
277 PR c++/9810
278 * call.c (build_over_call): Check access using primary template
279 if FN is a member function template.
280
281 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
282
283 PR c++/12796
284 * class.c (handle_using_decl): Set input_location before calling
285 error_not_base_type.
286
287 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
288
289 PR c++/10371
290 * semantics.c (finish_non_static_data_member): Handle when
291 both processing_template_decl and qualifying_scope are true.
292
293 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
294
295 PR c++/11076
296 * class.c (handle_using_decl): Swap arguments of error_not_base_type.
297 * parser.c (cp_parser_direct_declarator): Only resolve typename for
298 namespace scope declarations.
299
300 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
301
302 PR c++/12698, c++/12699, c++/12700, c++/12566
303 * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
304 (debug_class, debug_thunks): New.
305 * class.c (dump_class_hierarchy_1): New break out from ...
306 (dump_class_hierarchy): ... here.
307 (dump_thunk, debug_thunks, debug_class): New.
308 (update_vtable_entry_for_fn): Add ssizetype casts. Correct
309 continued search for primary binfo via virtual.
310 (build_vtbl_initializer): Follow covariant thunk alias.
311 * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
312 (finish_thunk): Look for an alias of the covariant thunk and point
313 to it.
314 (use_thunk): We should never use an alias.
315 * semantics.c (emit_associated_thunks): Do not emit aliases.
316
317 PR c++/12566
318 * cp-tree.h (cp_fname_init): Add TYPE pointer param.
319 * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
320 create an ad-hoc ERROR_MARK.
321 (cp_make_fname_decl): Adjust.
322 * pt.c (tsubst_expr): Adjust.
323
324 2003-10-23 Jason Merrill <jason@redhat.com>
325
326 PR c++/12726
327 * tree.c (build_target_expr_with_type): Don't call force_rvalue
328 for CONSTRUCTORs.
329
330 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
331
332 * call.c: Fix comment formatting.
333 * class.c: Likewise.
334 * cxx-pretty-print.c: Likewise.
335 * init.c: Likewise.
336 * parser.c: Likewise.
337 * pt.c: Likewise.
338 * semantics.c: Likewise.
339 * tree.c: Likewise.
340 * typeck.c: Likewise.
341 * typeck2.c: Likewise.
342
343 2003-10-21 Mark Mitchell <mark@codesourcery.com>
344
345 PR c++/11962
346 * typeck.c (build_x_conditional_expr): Handle missing middle
347 operands in templates.
348 * mangle.c (write_expression): Issue errors about attempts to
349 mangle a non-existant middle operator to the ?: operator.
350
351 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
352 * decl.c (cp_finish_decl): Remove clause intended for asm directives
353 in struct or class fields: this code is never executed.
354
355 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
356
357 * decl.c (start_decl): Exit if push_template_decl returns
358 error_mark_node.
359
360 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
361
362 * ChangeLog: Fix typos.
363 * call.c: Fix comment typos.
364 * class.c: Likewise.
365 * cp-tree.h: Likewise.
366 * cvt.c: Likewise.
367 * cxx-pretty-print.c: Likewise.
368 * decl.c: Likewise.
369 * decl2.c: Likewise.
370 * init.c: Likewise.
371 * mangle.c: Likewise.
372 * name-lookup.c: Likewise.
373 * parser.c: Likewise.
374 * search.c: Likewise.
375 * semantics.c: Likewise.
376 * tree.c: Likewise.
377 * typeck.c: Likewise.
378
379 2003-10-20 Jan Hubicka <jh@suse.cz>
380
381 * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
382 the expansion.
383
384 2003-10-20 Mark Mitchell <mark@codesourcery.com>
385
386 * Make-lang.in (c++.install-info): Remove.
387
388 2003-10-20 Jason Merrill <jason@redhat.com>
389
390 * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
391 field.
392
393 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
394
395 PR c++/9781, c++/10583, c++/11862
396 * decl.c (cp_finish_decl): Exit immediately if decl is an
397 error_mark_node.
398 * pt.c (push_template_decl_real): Return error_mark_node for
399 invalid template declaration of variable.
400
401 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
402
403 PR c++/12495
404 * pt.c (lookup_template_class): Handle when current_class_type
405 is a local class.
406
407 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
408
409 PR c++/2513
410 * decl.c (make_typename_type): Use dependent_type_p.
411 (make_unbound_class_template): Likewise.
412 * pt.c (instantiate_class_template): Increment
413 processing_template_decl during substitution of template friend
414 function. Preincrement processing_template_decl rather than
415 postincrement.
416 (get_mostly_instantiated_function_type): Increment
417 processing_template_decl during partial substitution of function
418 type.
419
420 2003-10-15 Jan Hubicka <jh@suse.cz>
421
422 PR c++/12574
423 * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
424
425 2003-10-14 Jason Merrill <jason@redhat.com>
426
427 PR c++/11878
428 * tree.c (build_target_expr_with_type): Call force_rvalue for
429 classes with non-trivial copy ctors.
430
431 PR c++/11063
432 * typeck.c (build_modify_expr): Call convert rather than abort.
433
434 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
435
436 Breack out decl.c (3/n)
437 * name-lookup.c: Include flags.h
438 (lookup_name_current_level): Make static.
439 (add_decl_to_level): Likewise.
440 (push_local_binding): Likewise.
441 (push_overloaded_decl): Likewise.
442 (lookup_using_namespace): Likewise.
443 (qualified_lookup_using_namespace): Likewise.
444 (lookup_type_current_level): Likewise.
445 (unqualified_namespace_lookup): Likewise.
446 (namespace_ancestor): Likewise.
447 (push_using_directive): Likewise.
448 * decl.c (pushdecl): Move to name-lookup.c.
449 (pushdecl_top_level_1): Likewise.
450 (pushdecl_top_level): Likewise.
451 (pushdecl_top_level_and_finish): Likewise.
452 (maybe_push_decl): Likewise.
453 (push_using_decl): Likewise.
454 (push_overloaded_decl): Likewise.
455 (make_anon_name): Likewise.
456 (anon_cnt): Likewise.
457 (clear_anon_tags): Likewise.
458 (maybe_inject_for_scope_var): Likewise.
459 (check_for_out_of_scope_variable): Likewise.
460 * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
461 * decl.c (warn_extern_redeclared_static): Export.
462 * cp-tree.h (warn_extern_redeclared_static): Declare.
463
464 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
465
466 * Make-lang.in: Replace uses of $(target_alias) with
467 $(target_noncanonical).
468
469 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
470
471 * ChangeLog: Add PR number to patch for PR c++/12370.
472
473 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
474
475 * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
476 (binding_for_name): Likewise.
477 (cxx_binding_clear): Move to name-lookup.c.
478 * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
479 (binding_for_name): Likewise.
480 * decl2.c (is_ancestor): Move to name-lookup.c
481 (namespace_ancestor): Likewise.
482 (add_using_namespace): Likewise.
483 (ambiguous_decl): Likewise.
484 (lookup_using_namespace): Likewise.
485 (qualified_lookup_using_namespace): Likewise.
486 (set_decl_namespace): Likewise.
487 (decl_namespace): Likewise.
488 (current_decl_namespace): Likewise.
489 (push_decl_namespace): Likewise.
490 (pop_decl_namespace): Likewise.
491 (push_scope): Likewise.
492 (pop_scope): Likewise.
493 (struct arg_lookup): Likewise.
494 (arg_assoc): Likewise.
495 (arg_assoc_args): Likewise.
496 (arg_assoc_type): Likewise.
497 (add_function): Likewise.
498 (arg_assoc_namespace): Likewise.
499 (arg_assoc_class): Likewise.
500 (arg_assoc_template_arg): Likewise.
501 (do_namespace_alias): Likewise.
502 (validate_nonmember_using_decl): Likewise.
503 (do_nonmember_using_decl): Likewise.
504 (do_toplevel_using_decl): Likewise.
505 (do_local_using_decl): Likewise.
506 (do_class_using_decl): Likewise.
507 (do_using_directive): Likewise.
508 (constructor_name_full): Likewise.
509 (constructor_name): Likewise.
510 (constructor_name_p): Likewise.
511
512 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
513
514 Break out decl.c (2/n)
515 * name-lookup.c: Include diagnostic.h
516 (cxx_binding_free): Make static.
517 (cxx_binding_make): Likewise.
518 (binding_table_new): Likewise
519 (binding_table_free): Likewise.
520 (binding_table_insert): Likewise.
521 (binding_table_find_anon_type): Likewise.
522 (binding_table_reverse_maybe_remap): Likewise.
523 (supplement_binding): Likewise.
524 * name-lookup.h (global_scope_name): Declare extern.
525 (global_type_node): Likewise.
526 (cxx_binding_free): Don't export.
527 (cxx_binding_make): Likewise.
528 (binding_table_new): Likewise.
529 (binding_table_free): Likewise.
530 (binding_table_insert): Likewise.
531 (binding_table_find_anon_type): Likewise.
532 (binding_table_reverse_maybe_remap): Likewise.
533 * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
534 * decl.c (lookup_namespace_name): Move to name-lookup.c
535 (select_decl): Likewise.
536 (unqualified_namespace_lookup): Likewise.
537 (lookup_qualified_name): Likewise.
538 (lookup_name_real): Likewise.
539 (lookup_name_nonclass): Likewise.
540 (lookup_function_nonclass): Likewise.
541 (lookup_name): Likewise.
542 (lookup_name_current_level): Likewise.
543 (lookup_type_current_level): Likewise.
544 (lookup_flags): Likewise.
545 (qualify_lookup): Likewise.
546 (lookup_tag): Likewise.
547 (lookup_tag_reverse): Likewise.
548 (getdecls): Likewise.
549 (storedecls): Remove.
550 (cxx_remember_type_decls): Move to name-lookup.c.
551 (global_bindings_p): Likewise.
552 (innermost_nonclass_level): Likewise.
553 (toplevel_bindings_p): Likewise.
554 (namespace_bindings_p): Likewise.
555 (kept_level_p): Likewise.
556 (innermost_scope_kind): Likewise.
557 (template_parm_scope_p): Likewise.
558 (push_binding): Likewise.
559 (push_local_binding): Likewise.
560 (add_decl_to_level): Likewise. Make extern.
561 (push_class_binding): Move to name-lookup.c.
562 (resume_level): Likewise. Rename to resume_scope.
563 (begin_scope): Move to name-lookup.c.
564 (indent): Likewise.
565 (binding_depth): Likewise.
566 (is_class_level): Likewise.
567 (cxx_scope_descriptor): Likewise.
568 (cxx_scope_debug): Likewise.
569 (namespace_scope_ht_size): Likewise.
570 (leave_scope): Likewise.
571 (pushlevel_class): Likewise.
572 (poplevel_class): Likewise.
573 (clear_identifier_class_values): Likewise.
574 (pushdecl_with_scope): Likewise.
575 (pushdecl_namespace_level): Likewise.
576 (pushdecl_class_level): Likewise.
577 (push_class_level_binding): Likewise.
578 (push_using_directive): Likewise.
579 (identifier_global_value): Likewise.
580 (keep_next_level_flag): Likewise.
581 (keep_next_level): Likewise.
582 (free_binding_level): Likewise.
583 (set_class_shadows): Likewise.
584 (maybe_push_cleanup_level): Likewise.
585 (cp_namespace_decls): Likewise.
586 (bt_print_entry): Likewise.
587 (print_binding_level): Likewise.
588 (print_other_binding_stack): Likewise.
589 (print_binding_stack): Likewise.
590 (push_namespace): Likewise.
591 (pop_namespace): Likewise.
592 (push_nested_namespace): Likewise.
593 (pop_nested_namespace): Likewise.
594 (cxx_saved_binding_make): Likewise.
595 (struct cxx_saved_binding_make): Likewise.
596 (store_bindings): Likewise.
597 (maybe_push_to_top_level): Likewise.
598 (push_to_top_level): Likewise.
599 (pop_from_top_level): Likewise.
600 (identifier_type_value): Likewise.
601 (set_identifier_type_value): Likewise.
602 (set_identifier_type_value_with_scope): Likewise.
603 (pop_everything): Likewise.
604 (pushtag): Likewise.
605 (follow_tag_typedef): Likewise.
606 (maybe_process_template_type_declaration): Likewise.
607 (pop_binding): Likewise.
608 * cp-tree.h: Move corresponding declarations to name-lookup.h
609
610 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
611
612 * cvt.c (ocp_convert): Move warning to C common code.
613
614 2003-10-09 Jason Merrill <jason@redhat.com>
615
616 PR c++/6392
617 * tree.c (build_cplus_array_type): Handle all quals the same.
618 (cp_build_qualified_type_real): Look through arrays first.
619
620 * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
621 (build_target_expr_with_type): Likewise.
622
623 * pt.c (instantiate_class_template): Sanity check that our
624 enclosing class has been instantiated.
625
626 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
627
628 * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
629 * error.c (dump_function_decl): Use it to skip the dump of the
630 arguments.
631 (dump_expr): When dumping a declaration found within an
632 expression, always set TFF_NO_FUNCTION_ARGUMENTS
633 in the flags.
634
635 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
636
637 PR c++/11097
638 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
639 USING_DECL.
640
641 2003-10-06 Mark Mitchell <mark@codesourcery.com>
642
643 PR c++/10147
644 * call.c (initialize_reference): Tweak error message.
645 * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
646 pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
647 * cxx-pretty-print.c (pp_cxx_id_expression): Always display
648 qualified entities using qualified names.
649
650 PR c++/12337
651 * init.c (build_new_1): Make sure that the expression returned is
652 not an lvalue.
653
654 PR c++/12344, c++/12236, c++/8656
655 * decl.c (start_function): Do not ignore attributes embedded in a
656 function declarator.
657
658 2003-10-06 Mark Mitchell <mark@codesourcery.com>
659
660 * Make-lang.in (c++.info): Remove.
661 (c++.dvi): Remove.
662 (c++.generated-manpages): Replace with ...
663 (generated-manpages): ... this.
664
665 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
666
667 * decl.c (struct cp_binding_level): Move to name-lookup.h
668 (current_binding_level): Likewise.
669 (class_binding_level): Likewise.
670 * cp-tree.h (enum scope_kind): Likewise.
671
672 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
673
674 * name-lookup.c (binding_entry_free): Nullify name and type
675 fields.
676
677 2003-10-02 Mark Mitchell <mark@codesourcery.com>
678
679 PR c++/12486
680 * typeck.c (finish_class_member_access_expr): Issue diagnostic
681 on erroneous use of qualified name.
682
683 2003-09-30 Richard Henderson <rth@redhat.com>
684
685 PR c++/12370
686 * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
687
688 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
689
690 * g++spec.c: Convert to ISO C90 prototypes.
691 * parser.c: Likewise.
692
693 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
694
695 * decl.c (pop_binding): Don't mess with nullifying binding->scope
696 here.
697 * name-lookup.c: Re-format.
698 (cxx_binding_free): Nullify binding->scope.
699
700 2003-09-29 Jan Hubicka <jh@suse.cz>
701
702 PR C++/12047
703 * except.c (build_eh_type_type): Call mark_used on the type.
704
705 2003-09-28 Richard Henderson <rth@redhat.com>
706
707 * typeck.c (c_expand_asm_operands): Take location_t, instead of
708 individual file and line.
709
710 2003-09-28 Andreas Jaeger <aj@suse.de>
711
712 * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
713 definition.
714 * init.c (push_base_cleanups): Likewise.
715 * decl2.c (finish_file): Likewise.
716 * mangle.c (init_mangle): Likewise.
717 (dump_substitution_candidates): Likewise.
718 * search.c: Likewise.
719
720 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
721
722 * name-lookup.h (get_global_value_if_present): New function.
723 (is_typename_at_global_scope): Likewise.
724 * except.c (do_begin_catch): Use get_global_value_if_present.
725 (do_end_catch): Likewise.
726 (do_allocate_exception): Likewise.
727 (do_free_exception): Likewise.
728 (build_throw): Likewise.
729 * parser.c (cp_parser_member_declaration): Likewise.
730 * rtti.c (throw_bad_cast): Likewise.
731 (throw_bad_typeid): Likewise.
732 * decl.c (check_tag_decl): Use is_typename_at_global_scope.
733 (grokdeclarator): Likewise.
734 * cp-tree.h (global_namespace): Move to name-lookup.h
735 * call.c (call_builtin_trap): Tidy.
736
737 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
738
739 PR c++/11415
740 * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
741 error message when parser->scope is global_namespace.
742
743 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
744
745 * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
746 macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
747
748 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
749
750 * decl.c (pop_binding_level, suspend_binding_level,
751 find_class_binding_level): Merge into leave_scope. Remove.
752 (leave_scope): New function.
753 (poplevel): Update.
754 (poplevel_class): Likewise.
755 (pop_namespace): Likewise.
756
757 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
758
759 PR c++/5655
760 * parser.c (cp_parser_check_access_in_redeclaration): New function.
761 (cp_parser_member_declaration): Use it.
762 (cp_parser_template_declaration_after_export): Likewise.
763
764 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
765
766 * cp-tree.h (scope_kind): Add new enumerator.
767 (keep_next_level): Change parameter type to bool.
768 (begin_scope): Change prototype.
769 (pushlevel): Remove declaration.
770 * decl.c (push_binding_level): Fold in begin_scope. Remove.
771 (struct cp_binding_level): Remove tag_tranparent field. Make keep
772 of bitsize one.
773 (keep_next_level_flag): Make a bool.
774 (cxx_scope_descriptor): Update scope names table
775 (make_cxx_scope): Fold in begin_scope. Remove..
776 (namespace_scope_ht_size): New function.
777 (begin_scope): Change prototype. Return a scope. Tidy.
778 (kept_level_p): Update.
779 (pushlevel): Remove.
780 (maybe_push_cleanup_level): Simplify.
781 (poplevel): Update for sk_cleanup and keep change.
782 (print_binding_level): Likewise.
783 (initial_push_namespace_scope): Fold in begin_scope. Remove.
784 (push_namespace): Update.
785 (pushtag): Likewise.
786 (lookup_tag): Likewise.
787 (lookup_name_current_level): Likewise.
788 (lookup_type_current_level): Likewise.
789 (cxx_init_decl_processing): Likewise.
790 (start_function): Likewise.
791 (begin_function_body): Likewise.
792 (start_method): Likewise.
793 * pt.c (push_inline_template_parms_recursive): Likewise.
794 (begin_template_parm_list): Likewise.
795 (begin_specialization): Likewise.
796 * semantics.c (do_pushlevel): Likewise.
797 (begin_compound_stmt): Likewise.
798 (begin_stmt_expr): Likewise.
799
800 2003-09-21 Richard Henderson <rth@redhat.com>
801
802 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
803 method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
804
805 2003-09-21 Richard Henderson <rth@redhat.com>
806
807 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
808 method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
809 DECL_SOURCE_LOCATION rename and change to const.
810
811 2003-09-20 Richard Henderson <rth@redhat.com>
812
813 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
814
815 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
816
817 PR c++/157
818 * parser.c (cp_parser_direct_declarator): Clear
819 parser->num_template_parameter_lists when parsing function
820 parameters.
821 (cp_parser_constructor_declarator_p): Likewise.
822
823 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
824
825 PR c++/495
826 * pt.c (tsubst_friend_class): Only use innermost template
827 arguments for the injected friend class template.
828
829 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
830
831 PR c++/12332
832 * pt.c (instantiate_class_template): Increment
833 processing_template_decl around the tsubst of a template member
834 function.
835
836 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
837
838 * decl.c (cxx_scope_descriptor): Fix thinko.
839 (struct cp_binding_level): Adjust type of binding_depth field.
840
841 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
842
843 PR c++/12320
844 * call.c (type_passed_as): Check for incomplete type.
845 (convert_for_arg_passing): Likewise.
846
847 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
848
849 PR c++/9848
850 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
851 here.
852 * semantics.c (expand_body): Set it here on the remaining clones.
853
854 2003-09-18 Roger Sayle <roger@eyesopen.com>
855
856 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
857 * class.c (instantiate_type): Remove FFS_EXPR case.
858
859 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
860
861 * ChangeLog: Fix recent commit.
862
863 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
864
865 * ChangeLog: Add PR number to patch for PR c++/12316.
866
867 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
868
869 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
870 "C" types.
871 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
872
873 2003-09-17 Richard Henderson <rth@redhat.com>
874
875 * semantics.c (expand_body): Don't save/restore input_location.
876
877 2003-09-17 Mark Mitchell <mark@codesourcery.com>
878
879 PR c++/12266
880 * cp-tree.h (tsubst_flags_t): Add tf_conv.
881 * class.c (standard_conversion): Pass tf_conv to
882 instantiate_type.
883 (resolve_address_of_overloaded_function): Do not call mark_used
884 when just checking conversions.
885
886 PR debug/12066
887 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
888 * cp-tree.h (cxx_builtin_type_decls): Declare.
889 * decl.c (builtin_type_decls): New variables.
890 (cxx_builtin_type_decls): New function.
891 (record_builtin_type): Add to builtin_type_decls.
892
893 2003-09-17 Richard Henderson <rth@redhat.com>
894
895 PR c++/12316
896 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
897
898 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
899
900 PR c++/7939
901 * typeck.c (comptypes): Don't ICE when its first argument is
902 error_mark_node.
903 (compparms): Reverse the arguments of same_type_p.
904
905 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
906
907 PR c++/12184
908 * typeck.c (convert_arguments): Return error_mark_node for an
909 incomplete parameter. Make error message more informative.
910
911 2003-09-12 Mark Mitchell <mark@codesourcery.com>
912
913 PR c++/3907
914 * class.c (maybe_note_name_used_in_class): Refine test for whether
915 or not we are in a class scope.
916
917 * cp-tree.h (language_function): Remove x_expanding_p.
918 (expanding_p): Remove.
919 (doing_semantic_analysis_p): Remove.
920 (scope_kind): Add sk_function_parms, sk_class,
921 sk_namespace.
922 (innermost_scope_kind): New method.
923 * call.c (cxx_type_promotes_to): Use type_decays_to.
924 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
925 (LANG_HOOKS_POPLEVEL): Likewise.
926 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
927 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
928 is_catch_scope. Add kind and explicit_spec_p.
929 (cxx_scope_descriptor): Use a lookup table.
930 (find_class_binding_level): Use "kind" field in binding_level, not
931 the various flags.
932 (pop_binding_level): Likewise.
933 (innermost_nonclass_level): Likewise.
934 (toplevel_bindings_p): Likewise.
935 (namespace_bindings_p): Likewise.
936 (template_parm_scope_p): Likewise.
937 (innermost_scope_kind): New method.
938 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
939 the various flags.
940 (pushlevel): Remove check for doing_semantic_analysis_p.
941 (begin_scope): Simplify.
942 (add_decl_to_level): Use "kind" field in binding_level, not
943 the various flags.
944 (push_local_binding): Likewise.
945 (pop_label): Remove check for doing_semantic_analysis_p.
946 (poplevel): Use "kind" field in binding_level, not
947 the various flags.
948 (set_block): Remove check for doing_semantic_analysis_p.
949 (pushlevel_class): Use "kind" field in binding_level, not
950 the various flags.
951 (poplevel_class): Likewise.
952 (initial_push_namespace_scope): Likewise.
953 (maybe_push_to_top_level): Likewise.
954 (set_identifier_type_value_with_scope): Likewise.
955 (pop_everything): Likewise.
956 (maybe_process_template_type_declaration): Likewise.
957 (pushtag): Likewise.
958 (pushdecl): Likewise.
959 (pushdecl_with_scope): Likewise.
960 (check_previous_goto_1): Likewise.
961 (define_label): Likewise.
962 (finish_case_label): Likewise.
963 (lookup_tag): Likewise.
964 (unqualified_namespace_lookup): Likewise.
965 (lookup_name_real): Likewise.
966 (lookup_name_current_level): Likewise.
967 (lookup_type_current_level): Likewise.
968 (record_builtin_type): Likewise.
969 (cp_make_fname_decl): Likewise.
970 (maybe_inject_for_scope_var): Likewise.
971 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
972 (start_function): Use begin_scope, not pushlevel.
973 (finish_function): Use "kind" field in binding_level, not
974 the various flags.
975 (start_method): Use begin_scope, not pushlevel.
976 (make_label_decl): Do not check expanding_p.
977 (save_function-data): Do not set expanding_p.
978 (cxx_push_function_context): Do not clear expanding_p.
979 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
980
981 2003-09-14 Mark Mitchell <mark@codesourcery.com>
982
983 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
984 an bit-field whose width exceeds that of its type.
985
986 2003-09-14 Geoffrey Keating <geoffk@apple.com>
987
988 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
989
990 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
991
992 * ChangeLog: Follow spelling conventions.
993 * parser.c: Likewise.
994
995 2003-09-13 Richard Henderson <rth@redhat.com>
996
997 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
998 during relaxation loop.
999
1000 2003-09-11 David Edelsohn <edelsohn@gnu.org>
1001
1002 * decl2.c (var_finalized_p): Swap arms of conditional.
1003
1004 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
1005
1006 PR c++/11788
1007 * typeck.c (build_address): If it is a function, mark it used.
1008 (build_unary_op): Do not lose object's side-effects when taking
1009 address of static member function.
1010 * class.c (resolve_address_of_overloaded_function): Use
1011 tsubst_flags_t parameter. Only expect overload sets. Adjust.
1012 (instantiate_type): Adjust flags passing. Do not lose object's
1013 side-effects when taking address of static member function.
1014
1015 2003-09-11 Richard Henderson <rth@redhat.com>
1016
1017 * semantics.c (expand_or_defer_fn): Update for new
1018 cgraph_finalize_function argument.
1019
1020 2003-09-10 Richard Henderson <rth@redhat.com>
1021
1022 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
1023
1024 2003-09-10 Jan Hubicka <jh@suse.cz>
1025
1026 * decl2.c (var_finalized_p): New.
1027 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
1028
1029 2003-09-10 Richard Henderson <rth@redhat.com>
1030
1031 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
1032 mark_member_pointers.
1033 (lower_function): Remove.
1034 * cp-tree.h: Update to match.
1035 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
1036 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
1037
1038 2003-09-09 Richard Henderson <rth@redhat.com>
1039
1040 * semantics.c (expand_or_defer_fn): Update call to
1041 cgraph_finalize_function.
1042
1043 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1044 always.
1045
1046 * decl2.c (finish_file): Avoid out-of-bounds array reference
1047 during memmove.
1048
1049 2003-09-09 Richard Henderson <rth@redhat.com>
1050
1051 * decl2.c (mark_member_pointers): Rename from
1052 mark_member_pointers_and_eh_handlers and don't check eh handlers.
1053
1054 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
1055
1056 PR bootstrap/12168
1057 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1058
1059 2003-09-08 Mark Mitchell <mark@codesourcery.com>
1060
1061 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1062 c_register_builtin_type.
1063
1064 PR c++/11786
1065 * decl2.c (add_function): Do not complain about seeing the same
1066 non-function twice.
1067 * semantics.c (perform_koenig_lookup): Improve documentation.
1068
1069 PR c++/5296
1070 * pt.c (try_one_overload): Add addr_p parameter.
1071 (resolve_overloaded_unification): Pass it.
1072
1073 2003-09-08 Richard Henderson <rth@redhat.com>
1074
1075 * optimize.c (maybe_clone_body): Inc/dec function_depth.
1076
1077 2003-09-08 Richard Henderson <rth@redhat.com>
1078
1079 * decl.c (finish_function): Clear current_function_decl.
1080 * decl2.c (mark_used): Don't push/pop gc context.
1081 * optimize.c (optimize_function): Likewise.
1082 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1083 * pt.c (instantiate_decl): Inc/dec function_depth instead.
1084 * semantics.c (expand_body): Update for tree_rest_of_compilation
1085 nested argument.
1086
1087 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
1088
1089 PR c++/11762
1090 * error.c (dump_decl): Handle namespace-alias-definition.
1091 * decl.c (warn_extern_redeclared_static): There is no point in
1092 checking changes in storage class specifier for a namespace
1093 declaration.
1094 (duplicate_decls): Tidy diagnostic message.
1095 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1096 (pp_cxx_right_brace): Likewise.
1097 (pp_cxx_original_namespace_definition): New function.
1098 (pp_cxx_namespace_alias_definition): Likewise.
1099 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
1100
1101 2003-09-07 Jan Hubicka <jh@suse.cz>
1102
1103 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1104 Avoid re-emitting variables in unit-at-a-time mode.
1105
1106 2003-09-06 Mark Mitchell <mark@codesourcery.com>
1107
1108 PR c++/11867
1109 * call.c (standard_conversion): Improve comments.
1110 (perform_direct_initialization): Make sure we return an expression
1111 of the correct type.
1112 * typeck.c (build_static_cast): Check for ambiguity and
1113 accessibility when performing conversions.
1114
1115 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
1116
1117 * cp-tree.h (add_binding): Remove declaration.
1118 * name-lookup.h (supplement_binding): Declare.
1119 * decl.c (add_binding): Move to name-lookup.c.
1120 (push_local_binding): Adjust.
1121 (push_class_binding): Likewise.
1122 (set_identifier_type_value_with_scope): Likewise.
1123 * name-lookup.c (supplement_binding): Rename from add_binding.
1124 Return a bool. Improve documentation.
1125 (set_namespace_binding): Adjust.
1126 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1127
1128 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1129
1130 PR c++/11794
1131 * class.c (pushclass): Push dependent using decls for nested
1132 classes of templates too.
1133
1134 2003-09-06 Roger Sayle <roger@eyesopen.com>
1135
1136 PR c++/11409
1137 * class.c (resolve_address_of_overloaded_function): When building
1138 list of matching non-template function decls, ignore anticipated
1139 declarations of undeclared or shadowed GCC builtins.
1140
1141 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
1142
1143 PR c++/11595
1144 * decl.c (define_label): Remove unreachable timevar pop.
1145 Always return the decl, even if the definition is invalid.
1146
1147 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1148
1149 PR c++/12167
1150 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1151 unparsed functions queue.
1152
1153 2003-09-05 Mark Mitchell <mark@codesourcery.com>
1154
1155 PR c++/12163
1156 * call.c (perform_direct_initialization): Correct logic for
1157 direct-initialization of a class type.
1158
1159 PR c++/12146
1160 * pt.c (lookup_template_function): Robustify.
1161
1162 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
1163
1164 PR c++/11922
1165 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1166 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1167 is_type_p to lookup_qualified_name.
1168
1169 * semantics.c (finish_call_expr): Refactor some code.
1170
1171 PR c++/12037
1172 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1173 (build_min_non_dep): Declare.
1174 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1175 (build_min_non_dep): New.
1176 * cvt.c (convert_to_void): Don't explicitly copy
1177 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1178 * call.c (build_new_method_call): Use build_min_non_dep.
1179 * decl2.c (grok_array_decl): Likewise.
1180 (build_offset_ref_call_from_tree): Likewise.
1181 * typeck.c (finish_class_member_access_expr,
1182 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1183 build_x_conditional_expr, build_x_compound_expr): Likewise.
1184 (build_static_cast, build_reinterpret_cast,
1185 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1186 * typeck2.c (build_x_arrow): Use build_min_non_dep.
1187 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1188 template.
1189 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1190 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1191 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1192
1193 2003-09-04 Richard Henderson <rth@redhat.com>
1194
1195 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1196 change in cgraph_mark_needed_node arguments.
1197
1198 2003-09-02 Geoffrey Keating <geoffk@apple.com>
1199
1200 PR 12161
1201 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1202 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1203
1204 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
1205
1206 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1207 (expr_sizeof): Replace with ...
1208 (cxx_sizeof_or_alignof_expr): ... here.
1209 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1210 * parser.c (cp_parser_unary_expression): Commonize alignof and
1211 sizeof handling.
1212 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1213 substitution.
1214 * semantics.c (finish_sizeof, finish_alignof): Remove.
1215 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1216 becomes bool. Set TREE_READONLY.
1217 (expr_sizeof): Replace with ...
1218 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1219
1220 2003-09-04 Mark Mitchell <mark@codesourcery.com>
1221
1222 Remove cast-as-lvalue extension.
1223 * call.c (build_conditional_expr): Correct formatting.
1224 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1225 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1226 * cp-tree.h (non_cast_lvalue_p): Remove.
1227 (real_non_cast_lvalue_p): Remove.
1228 (non_cast_lvalue_or_else): Remove.
1229 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1230 (real_lvalue_p): Adjust call to lvalue_p_1.
1231 (non_cast_lvalue_p): Remove.
1232 (non_cast_lvalue_or_else): Remove.
1233 (lvalue_p): Adjust call to lvalue_p_1.
1234 (lvalue_or_else): Simplify.
1235 * typeck.c (build_unary_op): Use lvalue_or_else, not
1236 non_cast_lvalue_or_else.
1237 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1238
1239 2003-09-03 DJ Delorie <dj@redhat.com>
1240
1241 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1242
1243 2003-09-03 Mark Mitchell <mark@codesourcery.com>
1244
1245 PR c++/12053
1246 * class.c (include_empty_classes): Correct logic for ABI version 1.
1247
1248 2003-09-03 Richard Henderson <rth@redhat.com>
1249
1250 * optimize.c (optimize_function): Push/pop ggc context around
1251 the call to optimize_inline_calls.
1252
1253 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
1254
1255 PR c++/11553
1256 * parser.c (cp_parser_decl_specifier_seq): Add check for a
1257 duplicate friend decl-specifier.
1258
1259 2003-09-02 Mark Mitchell <mark@codesourcery.com>
1260
1261 PR c++/11847
1262 * pt.c (convert_nontype_argument): Correct representation of
1263 REFERENCE_TYPE expressions.
1264
1265 PR c++/11808
1266 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1267 (finish_call_expr): Change prototype.
1268 * parser.c (cp_parser_postfix_expression): Adjust call to
1269 finish_call_expr.
1270 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1271 * semantics.c (finish_call_expr): Add koenig_p parameter.
1272
1273 2003-09-01 Mark Mitchell <mark@codesourcery.com>
1274
1275 PR c++/12114
1276 * cp-tree.h (initialize_reference): Change prototype.
1277 * call.c (initialize_reference): Add cleanup parameter.
1278 * decl.c (grok_reference_init): Likewise.
1279 (check_initializer): Likewise.
1280 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1281 (duplicate_decls): When replacing an anticipated builtin, do not
1282 honor TREE_NOTHROW.
1283 * typeck.c (convert_for_initialization): Correct call to
1284 initialize_reference.
1285
1286 PR c++/11972
1287 * pt.c (dependent_type_p_r): Pass only the innermost template
1288 arguments to any_dependent_template_arguments_p.
1289
1290 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
1291
1292 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1293 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1294 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1295 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1296 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1297
1298 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1299
1300 PR c++/12093
1301 * pt.c (build_non_dependent_expr): Do not build a
1302 NON_DEPENDENT_EXPR for a STRING_CST.
1303
1304 PR c++/11928
1305 * search.c (add_conversions): Avoid adding two conversion
1306 operators for the same type.
1307
1308 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1309
1310 PR c++/6196
1311 * pt.c (tsubst_copy_and_build): Correct handling of
1312 address-of-label extension.
1313 * semantics.c (finish_goto_stmt): The address of a label must go
1314 through the lvalue-to-rvalue conversion.
1315
1316 2003-08-29 Richard Henderson <rth@redhat.com>
1317 Jason Merrill <jason@redhat.com>
1318
1319 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1320 (LANG_HOOKS_RTL_EXPAND_STMT): New.
1321 * cp-tree.h (cxx_expand_function_start): Declare.
1322 * decl.c (start_function): Use allocate_struct_function.
1323 Move stmts_are_full_exprs_p assertion from expand_body.
1324 Do not free_after_parsing or free_after_compilation.
1325 (cxx_push_function_context): Move code to set struct function
1326 data from genrtl_start_function.
1327 * optimize.c (optimize_function): Don't inc/dec function_depth.
1328 * semantics.c (expand_body): Use tree_rest_of_compilation.
1329 (cxx_expand_function_start): Rename from genrtl_start_function,
1330 omit bits done by tree_rest_of_compilation.
1331 (genrtl_finish_function): Remove.
1332 (clear_decl_rtl): Move to ../tree-optimize.c.
1333
1334 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1335
1336 PR c++/11811
1337 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1338 function.
1339 * cxx-pretty-print.h: Declare.
1340 * error.c (dump_template_parameter): Use it.
1341 (dump_type): Likewise.
1342
1343 2003-08-28 Mark Mitchell <mark@codesourcery.com>
1344
1345 * init.c (decl_constant_value): Deal with COND_EXPR specially.
1346 * call.c (build_conditional_expr): Revert previous patch.
1347
1348 PR optimization/5079
1349 * call.c (build_conditional_expr): Use decl_constant_value to
1350 simplify the arguments.
1351
1352 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
1353
1354 * parser.c (struct cp_token): Use enum bitfields.
1355 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1356 512B allocation unit.
1357 (cp_parser_token_tree_map_node): Use enum bitfields.
1358
1359 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
1360
1361 PR c++/11871
1362 * decl.c (push_class_level_binding): Correct old_decl value from
1363 my 2003-07-29 reorganization.
1364
1365 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1366 (build_new_method_call): Add goto finish.
1367 * semantics.c (simplify_aggr_init_exprs_r): Don't set
1368 TREE_SIDE_EFFECTS on a call.
1369
1370 2003-08-25 Richard Henderson <rth@redhat.com>
1371
1372 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1373
1374 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1375
1376 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1377 (cxx_pretty_printer): Adjust base type.
1378 (pp_cxx_function_specifier): Declare.
1379 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1380 (pp_cxx_left_paren): Likewise.
1381 (pp_cxx_right_paren): Likewise.
1382 (pp_cxx_dot): Likewise.
1383 (pp_cxx_arrow): Likewise.
1384 (pp_cxx_semicolon): Likewise.
1385 (pp_cxx_identifier): Likewise.
1386 (pp_cxx_cv_qualifier_seq): Likewise.
1387 (pp_cxx_storage_class_specifier): Likewise.
1388 (pp_cxx_expression_list): Likewise.
1389 (pp_cxx_space_for_pointer_operator): Likewise.
1390 (pp_cxx_init_declarator): Likewise.
1391 (pp_cxx_call_argument_list): Likewise.
1392 (pp_cxx_nonconsecutive_character): Tidy.
1393 (pp_cxx_conversion_function_id): New function.
1394 (pp_cxx_template_id): Likewise.
1395 (pp_cxx_template_keyword_if_needed): Likewise.
1396 (pp_cxx_nested_name_specifier): Likewise.
1397 (pp_cxx_unqualified_id): Tidy
1398 (pp_cxx_qualified_id): Handle more nodes.
1399 (pp_cxx_primary_expression): Tidy.
1400 (pp_cxx_postfix_expression): Likewise.
1401 (pp_cxx_new_expression): Tidy.
1402 (pp_cxx_delete_expression): Likewise.
1403 (pp_cxx_cast_expression): New function.
1404 (pp_cxx_pm_expression): Tidy.
1405 (pp_cxx_conditional_expression): Likewise.
1406 (pp_cxx_assignment_operator): New function.
1407 (pp_cxx_assignment_expression): Tidy.
1408 (pp_cxx_expression): New function.
1409 (pp_cxx_function_specifier): Likewise.
1410 (pp_cxx_decl_specifier_seq): Likewise.
1411 (pp_cxx_simple_type_specifier): Tidy.
1412 (pp_cxx_type_specifier_seq): Likewise.
1413 (pp_cxx_ptr_operator): New function.
1414 (pp_cxx_implicit_parameter_type): Likewise.
1415 (pp_cxx_parameter_declaration): Tidy.
1416 (pp_cxx_parameter_declaration_clause): New function.
1417 (pp_cxx_exception_specification): Likewise.
1418 (pp_cxx_direct_declarator): Tidy.
1419 (pp_cxx_declarator): Likewise.
1420 (pp_cxx_ctor_initializer): New function.
1421 (pp_cxx_function_definition): Likewise.
1422 (pp_cxx_abstract_declarator): Tidy.
1423 (pp_cxx_direct_abstract_declarator): Likewise.
1424 (pp_cxx_type_id): Likewise.
1425 (pp_cxx_exception_declaration): New function.
1426 (pp_cxx_statement): Likewise.
1427 (pp_cxx_simple_declaration): Likewise.
1428 (pp_cxx_template_parameter_list): Likewise.
1429 (pp_cxx_template_parameter): Likewise.
1430 (pp_cxx_template_declaration): Likewise.
1431 (pp_cxx_explicit_specialization): Likewise.
1432 (pp_cxx_explicit_instantiation): Likewise.
1433 (pp_cxx_declaration): Tidy.
1434 (pp_cxx_pretty_printer_init): Initialize more fields.
1435
1436 2003-08-25 Mark Mitchell <mark@codesourcery.com>
1437
1438 PR c++/8795
1439 * cp-tree.h (build_cplus_method_type): Remove.
1440 * call.c (standard_conversion): Use build_method_type_directly
1441 instead of build_cplus_method_type.
1442 * class.c (build_clone): Likewise.
1443 (adjust_clone_args): Likewise.
1444 * decl.c (build_ptrmem_type): Likewise.
1445 (grokdeclarator): Likewise.
1446 (check_function_type): Likewise.
1447 * decl2.c (grok_method_quals): Likewise.
1448 (maybe_retrofit_in_chrg): Likewise.
1449 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1450 (tsubst_function_type): Likewise.
1451 (tsubst): Likewise.
1452 * tree.c (build_cplus_method_type): Remove.
1453 * typeck.c (merge_types): Use build_method_type_directly.
1454
1455 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1456
1457 PR c++/3765
1458 * search.c (dfs_access_in_type): Fix typo in comment.
1459 (dfs_accessible_queue_p): Likewise.
1460 (dfs_accessible_p): Only terminate when a friend is found.
1461 (accessible_p): Return immediately if access_in_type allows
1462 access.
1463
1464 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1465
1466 PR c++/641, c++/11876
1467 * friend.c (add_friend): Add complain parameter.
1468 (make_friend_class): Likewise.
1469 (do_friend): Adjust add_friend call.
1470 * decl.c (grokdeclarator): Adjust make_friend_class call.
1471 * parser.c (cp_parser_member_declaration): Likewise.
1472 (cp_parser_template_declaration_after_export): Likewise.
1473 * pt.c (instantiate_class_template): Adjust make_friend_class
1474 and add_friend call.
1475 * cp-tree.h (make_friend_class): Adjust declaration.
1476 (add_friend): Likewise.
1477
1478 2003-08-21 Jason Merrill <jason@redhat.com>
1479
1480 PR c++/11283
1481 * call.c (build_conditional_expr): Ignore cv-qual differences for
1482 non-class types.
1483
1484 2003-08-21 Mark Mitchell <mark@codesourcery.com>
1485
1486 PR c++/11551
1487 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1488 (cp_parser_primary_expression): Adjust call to
1489 cp_parser_id_expression.
1490 (cp_parser_unqualified_id): Complain about the use of
1491 typedef-names in a destructor declarator.
1492 (cp_parser_postfix_expression): Adjust call to
1493 cp_parser_id_expression.
1494 (cp_parser_type_parameter): Likewise.
1495 (cp_parser_template_argument): Likewise.
1496 (cp_parser_declarator_id): Likewise.
1497
1498 PR c++/11919
1499 * call.c (standard_conversion): Use same_type_p, not pointer
1500 equality, to compare types.
1501
1502 PR c++/10762
1503 * parser.c (cp_parser_using_declaration): Check for invalid uses
1504 of template-ids here...
1505 * decl2.c (do_class_using_decl): ... rather than here.
1506
1507 2003-08-20 Mark Mitchell <mark@codesourcery.com>
1508
1509 PR c++/11834
1510 * pt.c (more_specialized): Bump processing_template_decl.
1511
1512 2003-08-21 Jason Merrill <jason@redhat.com>
1513
1514 PR c++/11614
1515 * decl.c (grokdeclarator): Recognize a flexible array based on the
1516 type, not the form of the declarator.
1517
1518 2003-08-20 Jason Merrill <jason@redhat.com>
1519
1520 * semantics.c (simplify_aggr_init_expr): Split out from
1521 simplify_aggr_init_exprs_r. Convert slot address to match
1522 the return type.
1523 * cp-tree.h: Declare it.
1524 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1525 DECL_NAME of a user variable.
1526
1527 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
1528
1529 PR c++/11945
1530 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1531 COMPOUND_EXPR.
1532 * semantics.c (finish_expr_stmt): Always convert to void.
1533 * typeck.c (build_x_compound_exp): Always convert to void.
1534
1535 2003-08-19 Mark Mitchell <mark@codesourcery.com>
1536
1537 PR c++/11684
1538 * cp-tree.h (grok_op_properties): Change prototype.
1539 * decl.c (grok_op_properties): Add complain parameter.
1540 (grokfndecl): Pass it.
1541 * pt.c (tsubst_decl): Adjust accordingly.
1542
1543 PR c++/10926
1544 * decl.c (start_method): Return immediately if push_template_decl
1545 does not like the declaration.
1546 * pt.c (push_template_decl_real): Disallow member template
1547 destructors.
1548
1549 PR c++/11036
1550 * cp-tree.h (add_binding): Add prototype.
1551 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1552 (maybe_warn_about_overly_private_class): Use
1553 CLASSTYPE_DESTRUCTORS.
1554 (pushclass): Adjust call to set_identifier_type_value.
1555 * decl.c (add_binding): Give it external linkage.
1556 (push_local_binding): Adjust call to add_binding.
1557 (push_class_binding): Likewise.
1558 (set_identifier_type_value_with_scope): Change prototype. Use
1559 add_binding for global bindings.
1560 (set_identifier_type_value): Adjust accordingly.
1561 (pushtag): Likewise.
1562 (pushdecl): Use set_identifier_type_value, not
1563 set_identifier_type_value_with_scope.
1564 (pushdecl_namespace_level): Adjust calls to
1565 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1566 (pushdecl_class_level): Likewise.
1567 (lookup_tag): Use select_decl.
1568 (select_decl): Improve comment.
1569 (record_builtin_type): Do not call pushdecl.
1570 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1571 (cp_finish_decl): Adjust call to set_identifier_type_value.
1572 (check_elaborated_type_specifier): Improve checks for invalid uses
1573 of typedefs.
1574 (xref_tag): Adjust call to check_elaborated_type_specifier.
1575 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1576 * name-lookup.c (set_namespace_binding): Use add_binding.
1577 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1578 rather than an IDENTIFIER_NODE, to represent built-in types, if
1579 requested by the caller.
1580 (cp_parser_postfix_expression): Adjust call.
1581 (cp_parser_type_specifier): Likewise.
1582 (cp_parser_elaborated_type_specifier): Adjust call to
1583 check_elaborated_type_specifier.
1584 * typeck2.c (build_functional_cast): Do not perform name lookups.
1585
1586 PR c++/10717
1587 * decl.c (expand_static_init): Remove unnecessary code.
1588
1589 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
1590
1591 PR c++/10538, PR c/5582
1592 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1593
1594 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1595
1596 PR c++/11174
1597 * init.c (build_offset_ref): Perform access checking for
1598 pointer to member correctly.
1599
1600 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
1601
1602 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1603
1604 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
1605
1606 PR c++/11957
1607 * cp-tree.h (finish_stmt_expr): Add bool parameter.
1608 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1609 adjust the stmt_expr here.
1610 (build_vec_init): Use finish_stmt_expr_expr, convert result to
1611 array type.
1612 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1613 call.
1614 * pt.c (tsubst_copy): Likewise.
1615 * semantics.c (finish_stmt_expr): Add parameter.
1616
1617 * pt.c (instantiate_class_template): Push to class's scope before
1618 tsubsting base.
1619
1620 2003-08-17 Jan Hubicka <jh@suse.cz>
1621
1622 PR C++/11702
1623 * semantics.c (finish_id_expression): Mark all functions as used.
1624
1625 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
1626
1627 PR c++/11512
1628 * cvt.c (convert_to_void): Indicate which side of conditional has
1629 no effects, and rhs of comma operator. Test for no sideeffect
1630 expressions here and always build a convert expr.
1631 * init.c (expand_default_init): Convert the init to void.
1632 * typeck.c (build_x_compound_expr): Do not check for side effects
1633 here.
1634 (build_compound_expr): Do not convert lhs when building a
1635 template.
1636
1637 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1638
1639 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1640 * decl2.c (build_offset_ref_call_from_tree): Use
1641 build_non_dependent_expr.
1642 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1643 * pt.c (build_non_dependent_expr): Set operand.
1644
1645 2003-08-14 Jan Hubicka <jh@suse.cz>
1646
1647 * decl2.c (mark_member_pointers): Rename to...
1648 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1649 (lower_function): Update call.
1650 * except.c (eh_type_info): Break out from ...
1651 (build_eh_type): ... here; tinfo is already used.
1652 (finish_eh_spec_block): Mark tinfos as used.
1653 * semantics.c (finish_handler_params): Mark tinfo as used.
1654 * cp-tree.h (eh_type_info): Declare.
1655
1656 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1657
1658 * pt.c (instantiate_class_template): Set location before
1659 substuting bases.
1660
1661 * decl.c (make_typename_type): Use my_friendly_assert.
1662 * pt.c (tsubst_aggr_type): Rearrange context substitution.
1663
1664 2003-08-14 Jan Hubicka <jh@suse.cz>
1665
1666 * method.c (use_thunk): Expand body directly.
1667
1668 2003-08-12 Mark Mitchell <mark@codesourcery.com>
1669
1670 PR c++/11703
1671 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1672 determine whether or not to promote types.
1673 (convert_for_arg_passing): Likewise.
1674 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1675 templates.
1676 * pt.c (tsubst_decl): Do not expect it to be set.
1677
1678 PR c++/9512
1679 PR c++/10923
1680 * cp-tree.h (check_elaborated_type_specifier): Declare.
1681 (handle_class_head): Remove.
1682 (note_got_semicolon): Likewise.
1683 (note_list_got_semicolon): Likewise.
1684 (finish_class_definition): Likewise.
1685 * decl.c (check_elaborated_type_specifier): Make it public.
1686 Robustify.
1687 (handle_class_head): Remove.
1688 * parser.c (cp_parser_elaborated_type_specifier): Use
1689 check_elaborated_type_specifier.
1690 (cp_parser_class_specifier): Do not call finish_class_definition.
1691 (cp_parser_class_head): Or handle_class_head. Check for
1692 over-qualified names.
1693 * semantics.c (finish_class_definition): Remove.
1694
1695 * parser.c (cp_parser_check_for_definition_in_return_type): New
1696 function.
1697 (cp_parser_simple_declaration): Adjust call to
1698 cp_parser_init_declarator.
1699 (cp_parser_decl_specifier_seq): Change type of
1700 declares_class_or_enum parameter.
1701 (cp_parser_explicit_instantiation): Adjust accordingly.
1702 (cp_parser_type_specifier): Change type of
1703 declares_class_or_enum parameter.
1704 (cp_parser_init_declarator): Add declares_class_or_enum
1705 parameter.
1706 (cp_parser_parameter_declaration): Adjust call to
1707 cp_parser_decl_specifier_seq.
1708 (cp_parser_function_definition): Likewise.
1709 (cp_parser_member_declaration): Likewise.
1710 (cp_parser_single_declaration): Likewise.
1711
1712 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1713 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1714 (TYPE_OVERLOADS_CALL_EXPR): Remove.
1715 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1716 (TYPE_OVERLOADS_ARROW): Likewise.
1717 (CLASSTYPE_GOT_SEMICOLON): Likewise.
1718 * class.c (check_bases): Do not set them.
1719 (finish_struct_1): Likewise.
1720 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1721 (build_ptrmemfunc_type): Likewise.
1722 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1723 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1724 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1725 * lex.c (note_got_semicolon): Remove.
1726 (note_list_got_semicolon): Likewise.
1727 * parser.c (cp_parser_simple_declaration): Do not call
1728 note_list_got_semicolon.
1729 * pt.c (list_eq): Remove.
1730 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1731 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1732 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1733 * ptree.c (cxx_print_type): Do not print them.
1734 * semantics.c (finish_member_class_template): Do not call
1735 note_list_got_semicolon.
1736
1737 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
1738
1739 * call.c (standard_conversion): Opaque pointers interconvert.
1740
1741 * testsuite/g++.dg/other/opaque-3.C: New.
1742
1743 2003-08-11 Mark Mitchell <mark@codesourcery.com>
1744
1745 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1746 types correctly.
1747
1748 2003-08-10 Mark Mitchell <mark@codesourcery.com>
1749
1750 PR c++/11789
1751 * cp-tree.h (get_vbase): Remove.
1752 (get_vbase_types): Remove.
1753 * init.c (expand_member_init): Correct logic for looking up base
1754 classes.
1755
1756 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1757
1758 * error.c (dump_expr): Tidy.
1759 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1760 (pp_cxx_begin_template_argument_list): Likewise.
1761 (pp_cxx_end_template_argument_list): Likewise.
1762 (is_destructor_name): Likewise.
1763 (pp_cxx_unqualified_id): Likewise.
1764 (pp_cxx_qualified_id): Likewise.
1765 (pp_cxx_id_expression): Likewise.
1766 (pp_cxx_new_expression): Likewise.
1767 (pp_cxx_delete_expression): Likewise.
1768 (pp_cxx_pm_expression): Likewise.
1769 (pp_cxx_type_specifier): Rework.
1770 (pp_cxx_type_id): Likewise.
1771 (pp_cxx_primary_expression): Likewise.
1772 (pp_cxx_postfix_expression): Likewise.
1773 (pp_cxx_unary_expression): Likewise.
1774 (pp_cxx_multiplicative_expression): Likewise.
1775 (pp_cxx_conditional_expression): Likewise.
1776 (pp_cxx_assignment_expression): Likewise.
1777 (pp_cxx_pretty_printer_init): Tidy.
1778
1779 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
1780
1781 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1782 NODE is always a TREE_VEC of nonzero size.
1783 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1784 * decl2.c (arg_assoc): Template args will be a vec.
1785 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1786 dump_template_argument_list.
1787 (dump_template_parms): Args will be a vec.
1788 * parser.c (cp_parser_template_argument_list): Produce a
1789 vector, not a list.
1790 * pt.c (coerce_template_parms): Args are always vectors.
1791 (mangle_class_name_for_template): Likewise.
1792 (lookup_template_function): Likewise.
1793 (lookup_template_class): Likewise.
1794 (tsubst_template_args): Likewise.
1795 (tsubst_baselink): Use tsubst_template_args.
1796 (tsubst_qualified_id): Likewise.
1797 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1798 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1799 (any_dependent_template_args_p): Args are always vectors.
1800 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1801
1802 PR c++/11670
1803 * call.c (convert_like_real): Add rvalue binding error message.
1804 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1805 really a cast.
1806
1807 PR c++/10530
1808 * pt.c (dependent_type_p_r): A dependent template-id is a class
1809 type with dependent template arguments, or a bound template
1810 template parameter.
1811 (type_dependent_expression_p): A template function decl cannot
1812 have a dependent context.
1813
1814 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1815
1816 PR c++/5767
1817 * parser.c (cp_parser_class_name): Return immediately when scope
1818 is error_mark_node.
1819
1820 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
1821
1822 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1823
1824 * cp/call.c (standard_conversion): Support opaque types.
1825 Include target.h.
1826 (strip_top_quals): Use cp_build_qualified_type instead of
1827 TYPE_MAIN_VARIANT.
1828
1829 * cp/typeck.c (convert_for_assignment): Support opaque types.
1830
1831 * testsuite/g++.dg/other/opaque-1.C: New.
1832
1833 * testsuite/g++.dg/other/opaque-2.C: New.
1834
1835 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
1836
1837 * decl.c (grokparms): Use cp_build_qualified_type instead
1838 TYPE_MAIN_VARIANT.
1839
1840 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1841
1842 * cxx-pretty-print.h: New file.
1843 * cxx-pretty-print.c: Likewise.
1844 * error.c (scratch_pretty_printer): Change type.
1845 (init_error): Tidy.
1846 (dump_aggr_type): Likewise.
1847 (dump_global_iord): Likewise.
1848 (dump_expr): Likewise.
1849 (dump_char): Remove.
1850 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1851 (cxx_initialize_diagnostics): New function.
1852 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1853 (CXX_PRETTY_PRINT_H): New variable.
1854 (cp/cxx-pretty-print.o): New rule.
1855 (cp/cp-lang.o): Update dependence.
1856 (cp/error.o): Likewise.
1857
1858 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1859
1860 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1861 (DECL_DECLARED_INLINE_P): Remove.
1862 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1863 if decl is a FUNCTION_DECL. This never made sense, but now it is
1864 required to avoid a tree check failure.
1865 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1866 * optimize.c (maybe_clone_body): Likewise.
1867
1868 2003-08-04 Roger Sayle <roger@eyesopen.com>
1869
1870 * decl.c (cxx_insert_default_attributes): Delete.
1871 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1872 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1873
1874 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
1875
1876 PR c++/11704
1877 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1878 unknown type.
1879
1880 PR c++/11766
1881 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1882 member functions.
1883
1884 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1885
1886 PR c++/9447
1887 * cp-tree.def (USING_DECL): Document its type.
1888 * class.c (pushclass): If we're entering a template, push any
1889 dependent using decls it has.
1890 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1891 a dependent scope.
1892 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1893 (tsubst): Remove USING_DECL checks.
1894 (type_dependent_expression_p): Remove USING_DECL case.
1895 * semantics.c (finish_member_declaration): A USING_DECL's type
1896 indicates whether it is dependent.
1897
1898 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1899
1900 * cp-tree.h (pushclass): Remove unneeded parameter.
1901 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1902 (push_nested_class): Adjust pushclass call.
1903 * pt.c (instantiate_class_template): Likewise.
1904 * semantics.c (begin_class_definition): Likewise.
1905
1906 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
1907
1908 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1909
1910 2003-08-01 Mark Mitchell <mark@codesourcery.com>
1911
1912 PR c++/11697
1913 * decl.c (decls_match): Don't ignore the types of template
1914 classes.
1915
1916 PR c++/11744
1917 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1918
1919 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1920
1921 PR c++/8442, c++/8806
1922 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1923 preferred.
1924 (check_elaborated_type_specifier): Add allow_template_p
1925 parameter. Check tag mismatch and class template.
1926 (xref_tag): Add template_header_p parameter. Add assertion
1927 that name is an IDENTIFIER_NODE. Remove implicit typename
1928 warning. Simplify lookup process if globalize is true.
1929 (cxx_init_decl_processing): Adjust call to xref_tag.
1930 (xref_tag_from_type): Likewise.
1931 * decl2.c (handle_class_head): Likewise.
1932 * parser.c (cp_parser_elaborated_type_specifier,
1933 cp_parser_class_head): Likewise.
1934 * rtti.c (init_rtti_processing, build_dynamic_cast1,
1935 tinfo_base_init, emit_support_tinfos): Likewise.
1936 * class.c (is_base_of_enclosing_class): Remove.
1937 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1938 template template argument.
1939 * cp-tree.h (xref_tag): Adjust declaration.
1940 (is_base_of_enclosing_class): Remove.
1941 * NEWS: Document template template argument change.
1942
1943 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
1944
1945 * parser.c (cp_parser_init_declarator,
1946 cp_paser_member_declaration): Reformat.
1947 * pt.c (lookup_template_class, type_unification_real, unify,
1948 type_dependent_expression_p): Reformat.
1949
1950 PR c++/11295
1951 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1952 tf_stmt_expr_body.
1953 (finish_stmt_expr_expr): Declare.
1954 * parser.c (cp_parser_primary_expression): Tell
1955 cp_parser_compount_statement that it is a statement expression.
1956 (cp_parser_statement, cp_parser_labeled_statement,
1957 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1958 in_statement_expr_p parameter.
1959 (cp_parser_expression_statement): Likewise. Call
1960 finish_stmt_expr_expr for final expression of a statement
1961 expression.
1962 (cp_parser_for_init_statement,
1963 cp_parser_implicitly_scoped_statement,
1964 cp_parser_already_scoped_statement, cp_parser_function_definition,
1965 cp_parser_try_block, cp_parser_handled): Adjust.
1966 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1967 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1968 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1969 * semantics.c (finish_expr_stmt): Do not deal with statement
1970 expressions.
1971 (begin_stmt_expr): Clear last_expr_type.
1972 (finish_stmt_expr_expr): New.
1973 (finish_stmt_expr): Process the value expression.
1974
1975 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1976 compound expr inside the target's initializer.
1977
1978 PR c++/11525
1979 * parser.c (cp_parser_primary_expression): Do not set
1980 non-constant-p merely because it is a dependent scope.
1981
1982 PR c++/9447
1983 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1984 * semantics.c (finish_expr_stmt): Do not convert to void in a
1985 template.
1986
1987 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
1988
1989 * pt.c (coerce_template_parms): Refactor.
1990 (fn_type_unification): Increment processing_template_decl when
1991 tsubsting an incomplete set of explicit args.
1992
1993 PR c++/11347
1994 * pt.c (instantiate_class_template): Increment
1995 processing_template_decl around the tsubst of a template member
1996 class.
1997 (tsubst_qualified_id): Assert we do not have a dependent scope.
1998
1999 * pt.c (coerce_template_template_parms, lookup_template_class,
2000 can_complete_type_without_circularity, instantiate_class_template,
2001 tsubst_decl, unify): Reformat.
2002
2003 2003-07-31 Jan Hubicka <jh@suse.cz>
2004
2005 * decl2.c (maybe_make_one_only): Use mark_referenced.
2006 * method.c (use_thunk): Likewsie.
2007
2008 2003-07-30 Jan Hubicka <jh@suse.cz>
2009
2010 * class.c (build_vtable_entry_ref): Kill.
2011 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
2012 (build_vfn_ref): Do not call build_vtable_entry_ref.
2013 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
2014 * cp-tree.h (prepare_assemble_variable): Kill.
2015 * cp-decl.c (prepare_assemble_variable): Kill.
2016
2017 2003-07-29 Geoffrey Keating <geoffk@apple.com>
2018
2019 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
2020 of setting valid_pch by hand.
2021
2022 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2023
2024 * decl.c (finish_enum): Initialize underlying_type.
2025
2026 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
2027
2028 PR c++/9447
2029 * decl.c (add_binding): Add bval local variable.
2030 (push_class_level_binding): Likewise. Allow a USING_DECL to be
2031 pushed.
2032 * decl2.c (do_class_using_decl): The type of a using decl is
2033 unknown.
2034 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
2035 function call lookup code.
2036 * pt.c (tsubst): A USING_DECL will have unknown type.
2037 (tsubst_copy_and_build): Allow a using decl.
2038 (type_dependent_expression_p): A USING_DECL will make it
2039 dependent.
2040 * semantics.c (finish_member_declaration): Push a dependent using
2041 declaration.
2042
2043 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2044
2045 PR c++/11530
2046 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2047 * semantics.c (finish_id_expression): Call mark_used for all
2048 declarations.
2049
2050 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2051
2052 PR c++/11667
2053 * call.c (standard_conversion): Allow all integral->enumeral
2054 conversions, after marking them as bad.
2055 * decl.c (finish_enum): Make sure that all enumerators are
2056 properly converted to the underlying type.
2057 (build_enumerator): Set DECL_CONTEXT for namespace-scope
2058 enumeration types.
2059 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2060 (tsubst_enum): Tidy.
2061
2062 * Make-lang.in (typeck.o): Depend on convert.h.
2063 (class.o): Likewise.
2064 (rtti.o): Likewise.
2065 * call.c: Include convert.h.
2066 (convert_arg_to_ellipsis): Use convert_to_real.
2067 * class.c: Include convert.h.
2068 (build_base_path): Use convert_to_integer.
2069 * rtti.c: Include convert.h.
2070 (build_headof): Use convert_to_integer.
2071 * typeck.c: Include convert.h.
2072 (decay_conversion): Use convert_to_integer.
2073 (build_unary_op): Use build_nop.
2074 (get_delta_difference): Use convert_to_integer.
2075 (build_ptrmemfunc): Avoid unnecessary conversions.
2076
2077 2003-07-28 Jan Hubicka <jh@suse.cz>
2078
2079 * decl2.c (mark_member_pointers): Verify that member pointer points to
2080 the function.
2081
2082 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
2083
2084 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2085 (finish_compound_stmt): Remove no scope arg.
2086 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2087 end_compound_stmt calls.
2088 (expand_static_init, begin_destructor_body, begin_function_body,
2089 finish_function_body): Likewise.
2090 * decl2.c (start_objects, finish_objects,
2091 start_static_storage_duration_function,
2092 finish_static_storage_duration_function): Likewise.
2093 * init.c (begin_init_stmts, finish_init_stmts,
2094 construct_virtual_base, build_vec_init): Likewise.
2095 * method.c (do_build_assign_ref, synthesize_method): Likewise.
2096 * parser.c (cp_parser_compound_statement,
2097 cp_parser_implicitly_scoped_statement,
2098 cp_parser_already_scoped_statement): Likewise.
2099 * pt.c (tsubst_expr): Likewise.
2100 * semantics.c (begin_compound_stmt): No scope arg is a bool.
2101 (finish_compound_stmt): Remove no scope arg.
2102
2103 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2104 always dyadic.
2105
2106 2003-07-27 Mark Mitchell <mark@codesourcery.com>
2107
2108 * call.c (standard_conversion): Tweak handling of
2109 pointer-to-member types.
2110 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2111 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2112 pointer-to-data member types.
2113
2114 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
2115
2116 * parser.c (cp_parser_type_parameter): Reformat.
2117 (cp_parser_parameter_declaration): Deprecate default args where
2118 not allowed.
2119
2120 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
2121
2122 * cfns.h: Rebuilt.
2123
2124 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2125 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2126 * init.c (begin_init_stmts): Make static. Return is_global
2127 value. Always call begin_stmt_expr.
2128 (finish_init_stmts): Make static. Add is_global parm. Always
2129 building a stmt tree.
2130 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2131 (build_vec_init): Likewise. Always building a stmt tree.
2132 (expand_default_init): Always building a stmt tree.
2133 (get_temp_regvar): Likewise.
2134 * semantics.c (begin_global_stmt_expr,
2135 finish_global_stmt_expr): Remove.
2136
2137 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2138
2139 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2140 (build_x_compound_expr_from_list): Declare.
2141 * typeck.c (build_x_compound_expr_from_list): New.
2142 (build_x_compound_expr): Adjust.
2143 (build_compound_expr): Remove unreachable code. Take two
2144 parameters, adjust.
2145 * decl.c (grok_reference_init): Use
2146 build_x_compound_expr_from_list.
2147 (expand_static_init): Adjust build_compound_expr call.
2148 (cxx_maybe_build_cleanup): Likewise.
2149 * init.c (perform_member_init): Use
2150 build_x_compound_expr_from_list.
2151 (build_new_1): Likewise.
2152 (build_vec_delete): Adjust build_compound_expr calls.
2153 (build_vbase_delete): Likewise.
2154 * typeck2.c (store_init_value): Use
2155 build_x_compound_expr_from_list.
2156 (build_functional_cast): Likewise.
2157
2158 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2159
2160 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2161 * decl.c (make_typename_type): Pass it.
2162 * pt.c (lookup_template_class): Use it.
2163 (resolve_typename_type): Pass it.
2164 * semantics.c (finish_template_type): Pass it.
2165
2166 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2167
2168 PR c++/11617
2169 * cp-tree.h (qualified_name_lookup_error): Declare.
2170 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2171 errors.
2172 (tsubst_expr) <DECL_STMT case>: Likewise.
2173 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2174 * semantics.c (qualified_name_lookup_error): New, broken out of ...
2175 (finish_id_expression): ... here. Use it.
2176
2177 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
2178
2179 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2180
2181 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2182
2183 PR c++/11596
2184 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2185 (tsubst_template_arg): New.
2186 (tsubst_template_arg_vector): Rename to ...
2187 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2188 tsubst_template_arg.
2189 (coerce_template_parms): Use tsubst_template_arg for default
2190 value.
2191 (tsubst_template_parms): Likewise.
2192 (tsubst_aggr_type): Adjust.
2193 (tsubst_decl): Likewise.
2194 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2195 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2196
2197 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2198
2199 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2200 * error.c: Use the new pretty-printer framework.
2201
2202 2003-07-24 Per Bothner <pbothner@apple.com>
2203
2204 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2205 which causes errors messages to incorrectly mention included files.
2206
2207 2003-07-24 Mark Mitchell <mark@codesourcery.com>
2208
2209 * cp-tree.h (convert_to_base_statically): Declare.
2210 * call.c (build_special_member_call): Convert INSTANCE to the base
2211 type.
2212 * class.c (convert_to_base_statically): New method.
2213 * init.c (construct_virtual_base): Use it.
2214 * method.c (do_build_assign_ref): Fix typo in comment.
2215
2216 2003-07-24 Jason Merrill <jason@redhat.com>
2217
2218 * decl.c: Just set truthvalue_* to boolean_*.
2219
2220 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
2221
2222 * decl.c (reshape_init): Remove unreachable code.
2223
2224 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2225
2226 PR c++/11513
2227 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2228
2229 2003-07-23 Mark Mitchell <mark@codesourcery.com>
2230
2231 PR c++/11645
2232 * cp-tree.h (accessible_base_p): Declare.
2233 * call.c (build_over_call): Use it.
2234 * search.c (accessible_base_p): New function, split out from ...
2235 (lookup_base): ... here.
2236
2237 PR c++/11517
2238 * call.c (build_conditional_expr): Use perform_implicit_conversion
2239 and error_operand_p. Robustify.
2240 * typeck.c (build_unary_op): Use perform_implicit_conversion.
2241
2242 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
2243
2244 PR c++/10953
2245 * parser.c (cp_parser_nested_name_specifier): Reset scope on
2246 failure.
2247 (cp_parser_elaborated_type_specifier): Likewise.
2248
2249 2003-07-22 Mark Mitchell <mark@codesourcery.com>
2250
2251 Eliminate use of POINTER_TYPE for pointers-to-members.
2252 * call.c (standard_conversion): Rework pointer-to-member handling.
2253 Add comments.
2254 (add_builtin_candidate): Likewise.
2255 (resolve_scoped_fn_name): Remove.
2256 (build_conditional_expr): Rework pointer-to-member handling.
2257 (compare_ics): Likewise.
2258 * class.c (check_field_decls): Use TYPE_PTR_P.
2259 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2260 handling.
2261 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2262 (TYPE_PTRMEM_P): Add comment.
2263 (TYPE_PTR_P): Simplify.
2264 (TYPE_PTROB_P): Correct definition.
2265 (TYPE_PTR_TO_MEMBER_P): New macro.
2266 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2267 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2268 (resolved_scoped_fn_name): Remove declaration.
2269 (build_offset_ref): Change prototype.
2270 (resolve_offset_ref): Remove.
2271 (comp_target_types): Remove.
2272 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2273 handling.
2274 (convert_to_reference): Use can_convert.
2275 (ocp_convert): Improve error handling. Rework pointer-to-member
2276 handling.
2277 (perform_qualification_conversions): Rework pointer-to-member
2278 handling.
2279 * decl.c (build_ptrmem_type): Handle functions too.
2280 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2281 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2282 (grokparms): Remove OFFSET_TYPE error message.
2283 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2284 * error.c (dump_type_prefix): Likewise.
2285 * expr.c (cplus_expand_constant): Use build_nop.
2286 * init.c (build_offset_ref): Add address_p parameter. Fold in
2287 necessary bits from resolve_offset_ref.
2288 (resolve_offset_ref): Remove.
2289 * parser.c (cp_parser_postfix_expression): Remove special case
2290 code for OFFSET_TYPE.
2291 * pt.c (convert_nontype_argument): Rework pointer-to-member
2292 handling.
2293 (convert_template_argument): Likewise.
2294 (unify): Likewise.
2295 (invalid_nontype_parm_type_p): Likewise.
2296 (dependent_type_p_r): Likewise.
2297 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2298 (target_incomplete_p_): Rework pointer-to-member
2299 handling.
2300 (get_pseudo_ti_init): Likewise.
2301 (get_pseudo_ti_desc): Likewise.
2302 * semantics.c (finish_qualified_id_expr): Adjust call to
2303 build_offset_ref. Remove use of resolve_offset_ref.
2304 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2305 * typeck.c (target_type): Use TYPE_PTRMEM_P.
2306 (type_unknown_p): Remove obsolete code about the time before
2307 non-dependent expressions were handled correctly.
2308 (qualify_type_recursive): Remove.
2309 (composite_pointer_type_r): New function.
2310 (composite_pointer_type): Use it.
2311 (merge_types): Remove dead comments.
2312 (comp_cv_target_types): Remove.
2313 (comp_target_types): Likewise.
2314 (comp_target_parms): Likewise.
2315 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2316 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2317 (build_binary_op): Do not use of comp_target_types.
2318 (pointer_diff): Remove OFFSET_TYPE case.
2319 (build_unary_op): Adjust pointer-to-member handling.
2320 (unary_complex_lvalue): Likewise.
2321 (check_for_casting_away_constness): Add description parameter.
2322 (build_static_cast): Pass it.
2323 (build_reinterpret_cast): Use check_for_casting_away_constness.
2324 (build_const_cast): Adjust pointer-to-member handling.
2325 (build_c_cast): Likewise.
2326 (convert_for_assignment): Remove OFFSET_TYPE error message.
2327 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2328 (comp_ptr_ttypes_reinterpret): Remove.
2329 (casts_away_constness_r): Adjust pointer-to-member handling.
2330 (casts_away_constness): Liekwise.
2331 (strip_all_pointer_quals): Remove.
2332 * typeck2.c (digest_init): Adjust pointer-to-member handling.
2333 (build_m_component_ref): Likewise.
2334
2335 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
2336
2337 * lex.c (unqualified_fn_lookup_error): Mention that the error
2338 message needs to be kept in synch with the manual.
2339
2340 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2341
2342 PR c++/11614
2343 * decl.c (grokdeclarator): An array member is only a flexible
2344 array member if the field itself is the array.
2345
2346 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2347
2348 PR c++/10793
2349 * decl.c (xref_basetypes): Handle error_mark_node.
2350
2351 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2352
2353 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2354 * tree.c (lvalue_p_1): Set it.
2355 * class.c (check_field): Don't allow non-packed non-POD fields to
2356 be packed.
2357 * call.c (reference_binding): Need a temporary for all bitfield
2358 and packed fields.
2359 (convert_like_real): Check it is ok to make a temporary here.
2360
2361 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
2362
2363 * cp-tree.h (hack_identifier): Remove.
2364 * method.c (hack_identifier): Remove.
2365 * semantics.c (finish_id_expression): Expand hack_identifier
2366 here. Simplify.
2367
2368 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2369
2370 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2371 semantics.c typeck.c: Remove unnecessary casts.
2372
2373 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2374
2375 * cp-tree.h (hack_identifier): Remove.
2376 * method.c (hack_identifier): Remove.
2377 * semantics.c (finish_id_expression): Expand hack_identifier
2378 here. Simplify.
2379
2380 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2381
2382 * cp-tree.h (finish_non_static_data_member): Add object param.
2383 * method.c (hack_identifier): Adjust.
2384 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2385 again for a FIELD_DECL.
2386 * semantics.c (finish_non_static_data_member): Add object
2387 parameter. Always save the DECL in the COMPONENT_REF.
2388 * call.c (resolve_scoped_fn_name): Adjust.
2389
2390 2003-07-17 Zack Weinberg <zack@codesourcery.com>
2391
2392 * pt.c (get_bindings): Make definition consistent with
2393 forward declaration.
2394
2395 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2396
2397 PR c++/7809
2398 * friend.c (add_friend): Check access for member functions
2399 and templates.
2400
2401 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2402
2403 PR c++/10668
2404 * typeck.c (build_class_member_access_expr): Improve diagnostic.
2405
2406 2003-07-16 Mark Mitchell <mark@codesourcery.com>
2407
2408 PR c++/11547
2409 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2410 macro.
2411 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2412 * decl.c (duplicate_decls): Merge
2413 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2414 * parser.c (cp_parser_postfix_expression): Adjust call to
2415 cp_parser_initializer_list and
2416 cp_parser_parenthesized_expression_list.
2417 (cp_parser_parenthesized_expression_list): Add non_constant_p.
2418 (cp_parser_new_placement): Adjust call to
2419 cp_parser_parenthesized_expression_list.
2420 (cp_parser_direct_new_declarator): Likewise.
2421 (cp_parser_conditional_expression): Remove.
2422 (cp_parser_constant_expression): Parse an assignment-expression,
2423 not a conditional-expression.
2424 (cp_parser_simple_declaration): Resolve expression/declaration
2425 ambiguity more quickly.
2426 (cp_parser_mem_initializer): Adjust call to
2427 cp_parser_parenthesized_expression_list.
2428 (cp_parser_init_declarator): Keep track of whether or not the
2429 initializer is a constant-expression.
2430 (cp_parser_initializer): Add non_constant_p parameter.
2431 (cp_parser_initializer_clause): Likewise.
2432 (cp_parser_initializer_list): Likewise.
2433 (cp_parser_attribute_list): Adjust call to
2434 cp_parser_parenthesized_expression_list.
2435 (cp_parser_functional_cast): Likewise.
2436 * pt.c (tsubst_decl): Copy
2437 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2438 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2439 * semantics.c (finish_id_expression): Use
2440 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2441
2442 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
2443
2444 * lang-options.h: Remove.
2445
2446 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
2447
2448 PR c/10962
2449 * class.c (field_decl_cmp): Remove.
2450 (resort_field_decl_cmp): Remove.
2451 (resort_sorted_fields): Remove.
2452 (add_fields_to_vec): Rename to ...
2453 (add_fields_to_record_type): this.
2454 (finish_struct_1): Change to be using
2455 sorted_fields_type's fields.
2456 * cp-tree.h (lang_decl): In lang_decl_u3
2457 change sorted_fields to be a pointer to
2458 sorted_fields_type.
2459 (resort_sorted_fields): Remove prototype.
2460 * search.c (lookup_field_1): Change to be using
2461 sorted_fields_type's fields.
2462
2463 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2464
2465 PR c++/5421
2466 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2467 is a member of other class.
2468 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2469 is a specialization of function template.
2470
2471 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2472
2473 PR c++/10903
2474 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2475 Improve.
2476
2477 2003-07-15 Mark Mitchell <mark@codesourcery.com>
2478
2479 * cp-tree.def (LOOKUP_EXPR): Remove.
2480 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2481 (LOOKUP_EXPR_GLOBAL): Remove.
2482 (get_bindings): Remove.
2483 (is_aggr_type_2): Remove.
2484 * call.c (resolved_scoped_fn_name): Remove support for
2485 LOOKUP_EXPR.
2486 * decl.c (grokfndecl): Likewise.
2487 (grokdeclarator): Likewise.
2488 * error.c (dump_decl): Likewise.
2489 (dump_expr): Likewise.
2490 * friend.c (do_friend): Likewise.
2491 * init.c (build_offset_ref): Likewise.
2492 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
2493 LOOKUP_EXPRs
2494 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2495 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2496 test.
2497 * pt.c (get_bindings): Give it internal linkage.
2498 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2499 (lookup_template_function): Likewise.
2500 (for_each_tempalte_parm_r): Likewise.
2501 (tsubst_decl): Likewise.
2502 (tsubst_qualified_id): Handle template template parameters.
2503 (tsubst_copy): Remove support for LOOKUP_EXPR.
2504 (tsubst_copy_and_build): Likewise.
2505 (most_general_template): Likewise.
2506 (value_dependent_expression_p): Likewise.
2507 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2508 always dependent.
2509 * semantics.c (perform_koenig_lookup): Do not create
2510 IDENTIFIER_NODEs.
2511 (finish_fname): Likewise.
2512 (finish_id_expression): Likewise.
2513 * tree.c (is_aggr_type_2): Remove.
2514
2515 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2516
2517 PR c++/11531
2518 * typeck.c (check_return_expr): Fix thinko in diagnostic.
2519
2520 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2521
2522 PR c++/10108
2523 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2524 error_mark_node.
2525
2526 2003-07-14 Mark Mitchell <mark@codesourcery.com>
2527
2528 PR c++/11509
2529 * pt.c (dependent_scope_ref_p): New function.
2530 (value_dependent_expression_p): Use it.
2531 (type_dependent_expression_p): Likewise.
2532
2533 * pt.c (tsubst_friend_function): Use reregister_specialization.
2534
2535 PR c++/7019
2536 * cp-tree.h (lookup_qualified_name): Adjust prototype.
2537 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
2538 call to is_aggr_type.
2539 * parser.c (cp_parser_lookup_name): Adjust call to
2540 lookup_qualified_name.
2541 * pt.c (tsubst_qualified_id): Likewise.
2542 (tsubst_copy_and_build): Likewise.
2543 * semantics.c (finish_qualified_id_expr): Deal with erroneous
2544 expressions.
2545
2546 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2547
2548 PR c++/11510
2549 * call.c (op_error): Properly format REALPART_EXPR and
2550 IMAGPART_EXPR.
2551 * error.c (dump_expr): Likewise.
2552
2553 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2554
2555 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2556
2557 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2558
2559 PR c++/5293
2560 * call.c (initialize_reference): Improve diagnostic.
2561
2562 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2563
2564 PR c++/11154
2565 * pt.c (more_specialized_class): Add full_args parameter.
2566 (most_specialized_class): Adjust calls to more_specialized_class.
2567 * cp-tree.h (more_specialized_class): Adjust declaration.
2568
2569 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
2570
2571 * lex.c (enum tree_node_kind): Delete.
2572
2573 2003-07-13 Mark Mitchell <mark@codesourcery.com>
2574
2575 PR c++/11503
2576 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2577 (SET_DECL_SELF_REFERENCE_P): Likewise.
2578 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2579 * pt.c (tsubst_decl): Copy it.
2580 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2581
2582 * pt.c (reregister_specialization): Fix thinko in previous change.
2583
2584 * cp-tree.h (cp_id_kind): New type.
2585 (unqualified_name_lookup_error): Change prototype.
2586 (unqualified_fn_lookup_error): New function.
2587 (do_identifier): Remove.
2588 (do_scoped_id): Likewise.
2589 (tsubst_copy_and_build): Change prototype.
2590 (reregister_specialization): New function.
2591 (perform_koenig_lookup): Likewise.
2592 (finish_id_expression): Likewise.
2593 * call.c (build_method_call): Adjust call to
2594 unqualified_name_lookup_error.
2595 * decl.c (duplicate_decls): Use reregister_specialization.
2596 * lex.c (is_global): Remove.
2597 (unqualified_name_lookup_error): Return a value.
2598 (do_identifier): Remove.
2599 (do_scoped_id): Likewise.
2600 (identifier_typedecl_value): Remove.
2601 (unqualified_fn_lookup_error): New function.
2602 * parser.c (cp_parser_id_kind): Remove.
2603 (cp_parser_non_constant_id_expression): Remove.
2604 (cp_parser_primary_expression): Use finish_id_expression.
2605 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2606 cp_parser_id_kind.
2607 (cp_parser_postfix_expression): Use perform_koenig_lookup.
2608 (cp_parser_template_argument): Use cp_id_kind.
2609 (cp_parser_fold_non_dependent_expr): Adjust call to
2610 tsubst_copy_and_build.
2611 * pt.c (unregister_specialization): Rename to ...
2612 (reregister_specialization): This.
2613 (tsubst_friend_function): Use it.
2614 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2615 (tsubst_qualified_id): Likewise.
2616 (tsubst_expr): Likewise.
2617 (tsubst_copy_and_build): Add function_p parameter. Use
2618 finish_id_expression. Introduce RECUR macro.
2619 (tsubst_non_call_postfix_expression): New function.
2620 (regenerate_decl_from_template): Use reregister_specialization.
2621 * semantics.c (perform_koenig_lookup): New function.
2622 (finish_id_expression): Likewise.
2623
2624 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2625
2626 * pt.c (push_access_scope_real): Remove.
2627 (push_access_scope): Move code from push_access_scope_real.
2628 (pop_access_scope): Don't check for TEMPLATE_DECL.
2629 (instantiate_template): Defer access checking during template
2630 substitution.
2631 (regenerate_decl_from_template): Tidy.
2632
2633 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
2634
2635 PR c++/11437
2636 * operators.def: Add definitions for __imag__, __real__.
2637
2638 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
2639
2640 PR c++/11050
2641 * parser.c (cp_parser_expression_list): Rename to ...
2642 (cp_parser_parenthesized_expression_list): ... here. Add attribute
2643 parameter, parse the surounding parentheses.
2644 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2645 parameters. Return int.
2646 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2647 (cp_parser_postfix_expression): Adjust function call parsing.
2648 (cp_parser_new_placement): Adjust.
2649 (cp_parser_new_initializer): Likewise.
2650 (cp_parser_cast_expression): Likewise.
2651 (cp_parser_selection_statement): Likewise.
2652 (cp_parser_mem_initializer): Likewise.
2653 (cp_parser_asm_definition): Likewise.
2654 (cp_parser_init_declarator): Likewise.
2655 (cp_parser_declarator): Make
2656 cdtor_or_conv_p an int ptr.
2657 (cp_parser_direct_declarator): Likewise. Check for a parameter
2658 list on cdtors & conv functions.
2659 (cp_parser_initializer): Adjust.
2660 (cp_parser_member_declaration): Adjust.
2661 (cp_parser_attribute_list): Move code into
2662 cp_parser_parens_expression_list.
2663 (cp_parser_functional_cast): Adjust.
2664 * pt.c (type_dependent_expression_p): Erroneous expressions are
2665 non-dependent.
2666
2667 2003-07-11 Geoffrey Keating <geoffk@apple.com>
2668
2669 * decl.c (cp_finish_decl): Handle 'used' attribute.
2670
2671 * cp-lang.c (c_reset_state): New dummy routine.
2672 * cp-tree.h (finish_file): Move prototype to c-common.h.
2673 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2674
2675 2003-07-11 Mark Mitchell <mark@codesourcery.com>
2676
2677 PR c++/8327
2678 * pt.c (tsubst_qualified_id): Implement suggested resolution for
2679 Core Issue 2.
2680 (type_dependent_expression_p): Likewise.
2681
2682 2003-07-10 Mark Mitchell <mark@codesourcery.com>
2683
2684 * typeck.c (build_binary_op): Do not warn about signed
2685 vs. unsigned comparisons in the bodies of templates.
2686
2687 PR c++/9411
2688 * parser.c (cp_parser_postfix_expression): Check dependency of
2689 functions.
2690
2691 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2692
2693 PR c++/10032
2694 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2695 still errors.
2696
2697 PR c++/10527
2698 * error.c (decl_to_string): Do not print default argument
2699 expressions.
2700
2701 * cp-tree.h (break_out_calls): Remove declaration.
2702 * tree.c (break_out_calls): Remove.
2703 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2704
2705 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
2706
2707 PR c++ 9483
2708 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2709 * decl2.c (constructor_name_p): Avoid repeated constructor_name
2710 calls.
2711 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2712
2713 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2714
2715 * typeck.c (build_x_unary_op): Take note of the fact that
2716 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2717 trees.
2718
2719 * parser.c (cp_parser_primary_expression): Preserve the form of
2720 qualified expressions in templates, even if they are not
2721 dependent.
2722 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2723 (tsubst_qualified_id): Likewise.
2724 * search.c (accessible_p): Treat everything in the body of a
2725 template as accessible.
2726
2727 2003-07-08 Mark Mitchell <mark@codesourcery.com>
2728
2729 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2730 * cp-tree.h (build_call_from_tree): Remove.
2731 (build_member_call): Likewise.
2732 (dependent_template_arg_p): Remove.
2733 (any_dependent_template_arguments_p): New function.
2734 (dependent_template_id_p): Likewise.
2735 (any_type_dependent_arguments_p): Likewise.
2736 (build_non_dependent_expr): Likewise.
2737 (build_non_dependent_args): Likewise.
2738 (build_x_compound_expr): Adjust prototype.
2739 * call.c (build_new_method_call): Handle non-dependent expressions
2740 correctly.
2741 * decl2.c (grok_array_decl): Likewise.
2742 (build_offset_ref_call_from_tree): Likewise.
2743 (build_call_from_tree): Remove.
2744 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2745 (dump_expr): Likewise.
2746 * init.c (build_member_call): Remove.
2747 * mangle.c (write_expression): Update handling for template-ids.
2748 * parser.c (cp_parser_primary_expression): Use
2749 any_dependent_template_arguments_p. Update constant-expression
2750 handling.
2751 (cp_parser_postfix_expression): Use
2752 any_type_dependent_arguments_p. Simplify call processing.
2753 (cp_parser_unary_expression): Simplify.
2754 (cp_parser_expression): Adjust for changes to
2755 build_x_compound_expr.
2756 (cp_parser_template_argument): Implement standard-conforming
2757 parsing of non-type template arguments.
2758 (cp_parser_direct_declarator): Use
2759 cp_parser_fold_non_dependent_expr.
2760 (cp_parser_fold_non_dependent_expr): New function.
2761 (cp_parser_next_token_ends_template_argument_p): Likewise.
2762 * pt.c (convert_template_argument): Do not call
2763 maybe_fold_nontype_arg.
2764 (tsubst_baselink): Likewise.
2765 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
2766 processing work correctly for non-dependent expressions. Adjust
2767 handling of COMPOUND_EXPR. Simplify call processing.
2768 (value_dependent_expression_p): Deal with functional casts and
2769 sizeof/alignof correctly.
2770 (type_dependent_expression_p): Handle overloaded functions.
2771 (any_type_dependent_arguments_p): New function.
2772 (any_dependent_template_arguments_p): Likewise.
2773 (dependent_template_p): Treat SCOPE_REFs as dependent.
2774 (dependent_template_id_p): Simplify.
2775 (build_non_dependent_expr): New function.
2776 (build_non_dependent_args): Likewise.
2777 * semantics.c (finish_stmt_expr): Don't make dependent
2778 statement-expresions have void type.
2779 (finish_call_expr): Handle non-dependent expressions
2780 correctly.
2781 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2782 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2783 type size_t, even in templates.
2784 (expr_sizeof): Likewise.
2785 (finish_class_member_access_expr): Handle non-dependent expressions
2786 correctly.
2787 (build_x_indirect_ref): Likewise.
2788 (build_x_binary_op): Likewise.
2789 (build_x_unary_op): Likewise.
2790 (build_x_conditional_expr): Likewise.
2791 (build_x_compound_expr): Likewise.
2792 * typeck2.c (build_x_arrow): Likewise.
2793
2794 2003-07-09 Jan Hubicka <jh@suse.cz>
2795
2796 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2797 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2798 (start_function): Use DECL_ESTIMATED_INSNS.
2799 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2800
2801 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2802 unit-at-a-time
2803
2804 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2805
2806 PR c++/11030
2807 * pt.c (instantiate_class_template): Don't call xref_tag to
2808 inject name when the friend class is a specialization.
2809
2810 2003-07-07 Mark Mitchell <mark@codesourcery.com>
2811
2812 * cp-tree.h (build_scoped_method_call): Remove.
2813 (lookup_qualified_name): Remove parameter.
2814 (tsubst_copy_and_build): Declare.
2815 (finish_qualified_object_call_expr): Remove.
2816 (check_accessibility_of_qualified_id): New function.
2817 (finish_qualified_id_expr): Likewise.
2818 (non_reference): Likewise.
2819 (build_expr_from-tree): Remove.
2820 * call.c (non_reference): Remove.
2821 (build_scoped_method_call): Likewise.
2822 (build_method_call): Use error_operand_p. Assert that we are not
2823 processing a template.
2824 (standard_conversion): Use non_reference.
2825 * class.c (build_vtbl_entry_ref): Likewise.
2826 (build_vtbl_ref_1): Likewise.
2827 * cvt.c (build_expr_type_conversion): Use non_reference.
2828 * decl.c (lookup_qualified_name): Remove flags parameter.
2829 (grok_op_properties): Use non_reference.
2830 * decl2.c (grok_array_decl): Likewise.
2831 (build_expr_from_tree): Remove.
2832 (build_offset_ref_call_from_tree): Update comment.
2833 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2834 * except.c (prepare_eh_types): Use non_reference.
2835 (can_convert_eh): Likewise.
2836 * init.c (build_dtor_call): Avoid using build_method_call.
2837 * mangle.c (write_template_param): Remove misleading comment.
2838 * method.c (locate_copy): Use non_reference.
2839 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2840 (cp_parser_primary_expression): Do not create SCOPE_REFs is
2841 non-dependent contexts.
2842 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2843 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2844 build_expr_from_tree.
2845 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2846 Use check_accessibility_of_qualified_id.
2847 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2848 build_expr_from_tree.
2849 (tsubst_baselink): New function.
2850 (tsubst_qualified_id): Likewise.
2851 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
2852 (tsubst_expr): Adjust call to lookup_qualified_name.
2853 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
2854 handling of CALL_EXPRs.
2855 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2856 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2857 * search.c (check_final_overrider): Likewise.
2858 * semantics.c (check_accessibility_of_qualified_id): New function.
2859 (finish_qualified_object_call_expr): Remove.
2860 * typeck.c (target_type): Use non_reference.
2861 (cxx_sizeof_or_alignof_type): Likewise.
2862 (dubious_conversion_warnings): Likewise.
2863 (convert_for_initialization): Likewise.
2864 (non_reference): New function.
2865
2866 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2867
2868 * decl.c (print_binding_level, print_other_binding_stack,
2869 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2870 stdio calls.
2871 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2872
2873 2003-07-07 Andreas Jaeger <aj@suse.de>
2874
2875 * friend.c: Convert to ISO C90 prototypes.
2876
2877 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2878 language.
2879 * cfns.h: Regenerate.
2880
2881 * typeck.c: Convert remaining prototypes to ISO C90.
2882 * search.c: Likewise.
2883
2884 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2885 * semantics.c (expand_or_defer_fn): Likewise
2886 * mangle.c (discriminator_for_string_literal): Likewise.
2887 * g++spec.c (lang_specific_driver): Likewise.
2888
2889 * search.c (lookup_base_r): Remove unused variable.
2890
2891 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
2892
2893 * semantics.c: (genrtl_try_block) Adjust emit_line_note
2894 calls.
2895
2896 2003-07-07 Andreas Jaeger <aj@suse.de>
2897
2898 * search.c (lookup_base_r): Remove unused variable.
2899
2900 2003-07-06 Michael Chastain <mec@shout.net>
2901
2902 PR debug/10055
2903 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2904 assigning to input_filename directly.
2905
2906 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
2907
2908 * call.c: Fix comment formatting.
2909 * class.c: Likewise.
2910 * cp-tree.h: Likewise.
2911 * decl.c: Likewise.
2912 * decl2.c: Likewise.
2913 * error.c: Likewise.
2914 * method.c: Likewise.
2915 * name-lookup.c: Likewise.
2916 * parser.c: Likewise.
2917 * pt.c: Likewise.
2918 * rtti.c: Likewise.
2919 * search.c: Likewise.
2920 * typeck.c: Likewise.
2921
2922 2003-07-06 Mark Mitchell <mark@codesourcery.com>
2923
2924 PR c++/11345
2925 * search.c (lookup_base_r): Remove is_non_public and
2926 within_current_scope parameters. Remove other dead code.
2927 (lookup_base): Adjust call to lookup_base_r.
2928 (adjust_result_of_qualified_name_lookup): Improve comment.
2929 * semantics.c (finish_call_expr): Use maybe_dummy_object.
2930
2931 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
2932
2933 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2934 LANG_HOOKS_MISSING_ARGUMENT): Override.
2935
2936 2003-07-05 Mark Mitchell <mark@codesourcery.com>
2937
2938 PR c++/11431
2939 * typeck.c (build_static_cast): Check for reference conversions
2940 earlier.
2941
2942 2003-07-04 Mark Mitchell <mark@codesourcery.com>
2943
2944 * cp-tree.h (perform_integral_promotions): Declare.
2945 * call.c (build_addr_func): Use decay_conversion.
2946 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
2947 (convert_for_arg_passing): Use perform_integral_promotions.
2948 * cvt.c (build_expr_type_conversion): Use decay_conversion.
2949 (type_promotes_to): Do not return a cv-qualified type.
2950 * decl.c (grok_reference_init): Fix formatting.
2951 (get_atexit_node): Use decay_conversion.
2952 (build_enumerator): Use perform_integral_promotions.
2953 * init.c (build_vec_init): Use decay_conversion.
2954 * semantics.c (finish_expr_stmt): Likewise.
2955 (finish_switch_cond): Use perform_integral_promotions.
2956 * typeck.c (default_conversion): Likewise.
2957 (perform_integral_promotions): New function.
2958 (build_indirect_ref): Use decay_conversion.
2959 (build_array_ref): Use perform_integral_promotions.
2960 (convert_arguments): Use decay_conversion.
2961 (build_unary_op): Use perform_integral_promotions.
2962 (build_c_cast): Use decay_conversion.
2963 (build_modify_expr): Likewise.
2964 (convert_for_initialization): Likewise.
2965 * typeck2.c (build_x_arrow): Likewise.
2966
2967 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
2968
2969 * call.c: Fix comment typos.
2970 * class.c: Likewise.
2971 * cp-tree.h: Likewise.
2972 * cvt.c: Likewise.
2973 * decl2.c: Likewise.
2974 * decl.c: Likewise.
2975 * init.c: Likewise.
2976 * mangle.c: Likewise.
2977 * parser.c: Likewise.
2978 * pt.c: Likewise.
2979 * search.c: Likewise.
2980 * semantics.c: Likewise.
2981 * tree.c: Likewise.
2982 * typeck.c: Likewise.
2983
2984 2003-07-04 Zack Weinberg <zack@codesourcery.com>
2985
2986 * parser.c (cp_lexer_read_token): No need to handle string
2987 constant concatenation.
2988
2989 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2990
2991 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2992 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2993 ATTRIBUTE_GCC_CXXDIAG.
2994
2995 2003-07-03 Mark Mitchell <mark@codesourcery.com>
2996
2997 * call.c (build_addr_func): Handle bound pointers-to-members.
2998 (build_method_call): Do not call resolve_offset_ref.
2999 (implicit_conversion): Likewise.
3000 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
3001 resolve_offset_ref.
3002 (resolve_args): Do not call resolve_offset_ref.
3003 (build_conditional_expr): Likewise.
3004 (build_new_method_call): Likewise.
3005 * cp-tree.def (OFFSET_REF): Update documentation.
3006 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
3007 pointers to members to pointers.
3008 (ocp_convert): Do not call resolve_offset_ref.
3009 (convert_to_void): Likewise.
3010 (build_expr_type_conversion): Likewise.
3011 * decl2.c (delete_sanity): Likewise.
3012 * init.c (resolve_offset_ref): Simplify greatly.
3013 (build_vec_delete): Do not call resolve_offset_ref.
3014 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
3015 if appropriate.
3016 (cp_parser_unary_expression): Use
3017 cp_parser_simple_cast_expression.
3018 (cp_parser_delete_expression): Likewise.
3019 (cp_parser_cast_expression): Likewise.
3020 (cp_parser_pm_expression): Use cp_parser_binary_op.
3021 (cp_parser_simple_cast_expression): New function.
3022 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
3023 * semantics.c (finish_increment_expr): Likewise.
3024 (finish_typeof): Likewise.
3025 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
3026 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
3027 (decay_conversion): Do not call resolve_offset_ref.
3028 (finish_class_member_access_expr): Likewise.
3029 (convert_arguments): Likewise.
3030 (build_x_binary_op): Handle DOTSTAR_EXPR.
3031 (condition_conversion): Do not call resolve_offset_ref.
3032 (unary_complex_lvalue): Likewise.
3033 (build_static_cast): Likewise.
3034 (build_reinterpret_cast): Likewise.
3035 (build_const_cast): Likewise.
3036 (build_c_cast): Likewise.
3037 (build_modify_expr): Likewise.
3038 (convert_for_assignment): Likewise.
3039 (convert_for_initialization): Likewise.
3040 * typeck2.c (build_x_arrow): Likewise.
3041 (build_m_component_ref): Simplify.
3042
3043 * call.c (build_scoped_method_call): Use convert_to_void.
3044 (build_method_call): Likewise.
3045 * class.c (check_field_decls): Remove dead code.
3046 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3047 * decl2.c (grok_array_decl): Remove dead code.
3048 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3049 as pointer-to-member representation.
3050 * init.c (build_offset_ref): Tidy.
3051 (build_vec_delete_1): Use convert_to_void.
3052 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3053 as pointer-to-member representation.
3054
3055 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
3056
3057 PR c++/9162
3058 * decl.c (grokdeclarator): Return friend decls, not
3059 void_type_node.
3060 * decl2.c (grokfield): Alter friend decl check.
3061 * parser.c (struct cp_parser): Document default_arg chain on
3062 unparsed_functions_queue.
3063 (cp_parser_save_default_args): New.
3064 (cp_parser_init_declarator, cp_parser_function_definition,
3065 cp_parser_member_declaration): Call it.
3066 (cp_parser_class_specifier): Remove unused variable. Alter
3067 processing of unparsed_functions_queue.
3068
3069 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3070
3071 * class.c (add_method, check_field_decl): Fix format specifier.
3072 * decl.c (duplicate_decls, pushdecl, check_goto,
3073 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3074 start_enum): Likewise.
3075 * decl2.c (ambiguous_decl): Likewise.
3076 * pt.c (redeclare_class_template): Likewise.
3077
3078 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
3079
3080 PR c++/10219
3081 * pt.c (type_unification_real): Don't unify exprs of error type.
3082 * tree.c (error_type): Don't die on error_type.
3083
3084 PR c++/9779
3085 * decl2.c (arg_assoc_class): Don't die on NULL type.
3086 * typeck.c (type_unknown_p): Don't die on untyped expressions.
3087
3088 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3089
3090 PR c++/6949
3091 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3092 classes.
3093
3094 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3095
3096 * error.c (locate_error): %P takes an `int', not a `tree'.
3097
3098 2003-07-02 Jan Hubicka <jh@suse.cz>
3099
3100 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3101 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3102 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3103 massaging.
3104
3105 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3106 (expand_or_defer_fn): Declare.
3107 (lower_function): Declare.
3108 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3109 * decl2.c: Include cgraph.h and varpool.h
3110 (maybe_emit_vtables): Make explicit instantations as needed.
3111 (mark_member_pointers, lower_function): New functions.
3112 (finish_file): Do unit-at-a-time.
3113 * method.c (synthesize_method): Use expand_or_defer_fn.
3114 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3115 * parser.c (cp_parser_function_definition_after_decl): Use
3116 expand_or_defer_fn.
3117 * pt.c (instantiate_decl): Likewise.
3118 * semantics.c: Include cgraph.h
3119 (expand_or_defer_fn): Break out from ...
3120 (expand_body): ... here; deal with unit-at-a-time.
3121 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3122 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3123
3124 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3125
3126 * call.c (resolve_scoped_fn_name): Return error_mark_node for
3127 erroneous cases.
3128
3129 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3130
3131 PR c++/11149
3132 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3133 is a class type.
3134
3135 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
3136
3137 PR c++/8046
3138 * error.c (dump_decl): Handle BIT_NOT_EXPR as
3139 pseudo destructor calls.
3140
3141 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3142
3143 * cp-tree.h (define_label): Replace filename and lineno
3144 arguments with a location_t.
3145 * decl.c (pop_label): Adjust define_label call.
3146 (define_label): Replace filename and lineno arguments with a
3147 location_t.
3148 * semantics.c (finish_label): Adjust define_label call.
3149
3150 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3151
3152 PR c++/9559
3153 * decl2.c (grokfield): Do not build NOP_EXPRs around the
3154 error_mark_node.
3155
3156 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
3157
3158 * Make-lang.in: Update.
3159 * cp-lang.c (c_language): Define.
3160 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3161 * cp-tree.h (cxx_init_options): Remove.
3162 * lex.c: Don't include diagnostic.h.
3163 (cxx_init_options): Remove.
3164
3165 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3166
3167 PR c++/4933
3168 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3169 tree generated within a template. Use dump_expr to dump an
3170 expression sizeof.
3171
3172 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3173
3174 * mangle.c (write_expression): Exit gracefully when trying to
3175 mangle a CALL_EXPR.
3176
3177 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3178
3179 PR c++/10750
3180 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3181 (value- or type-) dependent expression as DECL_INITIAL is a
3182 valid constant-expression (at parser time).
3183
3184 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3185
3186 PR c++/11106
3187 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3188 USING_DECL, instead of print_tree_identifier.
3189
3190 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3191
3192 * cp-tree.h (language_to_string): Adjust declaration.
3193 * dump.c (cp_dump_tree): Adjust usage.
3194 * error.c (dump_char): Use output_formatted_scalar. Tidy.
3195 (parm_to_string): Lose unused parameter. Tidy.
3196 (expr_to_string): Likewise.
3197 (code_to_string): Likewise.
3198 (language_to_string): Likewise.
3199 (op_to_string): Likewise.
3200 (assop_to_string): Likewise.
3201 (digit_buffer): Remove.
3202 (dump_type): Format builtin vector type as __vector__.
3203
3204 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3205
3206 * error.c (print_integer): Remove.
3207 (dump_type_suffix): Adjust.
3208 (dump_expr): Likewise.
3209
3210 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3211
3212 * error.c (print_instantiation_partial_context): Take a
3213 location_t.
3214 (print_instantiation_full_context): Adjust.
3215 (print_instantiation_context): Adjust.
3216
3217 * cp-tree.h (cp_line_of, cp_file_of): Remove.
3218 * error.c (cp_line_of, cp_file_of): Merge into ...
3219 (location_of): ... here. Make static, return a location_t.
3220 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3221
3222 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3223
3224 PR c++/10784
3225 * call.c (joust): Move warn_conversion check outwards.
3226
3227 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3228
3229 * decl.c (build_typename_type)
3230 * mangle.c (write_template_template_arg)
3231 * parser.c (cp_parser_scope_through_which_access_occurs)
3232 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3233 * repo.c (get_base_filename)
3234 * semantics.c (maybe_convert_cond):
3235 Mark the definition static, matching the forward declaration.
3236
3237 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3238
3239 PR c++/10468
3240 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3241
3242 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3243
3244 PR c++/10796
3245 * decl.c (finish_enum): Implement DR377.
3246
3247 * decl.c (cp_finish_decl): Don't make variables with reference
3248 type readonly while they are being initialized.
3249
3250 2003-06-26 Mark Mitchell <mark@codesourcery.com>
3251
3252 PR c++/11332
3253 * typeck.c (build_static_cast): Avoid returning expressions with
3254 reference type.
3255
3256 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
3257
3258 * call.c (build_op_delete_call): Use strip_array_call. Correct
3259 error message to say 'delete' or 'delete[]'.
3260
3261 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
3262
3263 PR c++/8266
3264 * pt.c (check_explicit_specialization): When looking up a
3265 template function from an identifier outside class-scope, bind
3266 it to CP_DECL_CONTEXT.
3267
3268 2003-06-25 Mark Mitchell <mark@codesourcery.com>
3269
3270 PR c++/10990
3271 * search.c (lookup_base_r): Rely on accessible_p, rather than
3272 trying to emulate that logic here.
3273
3274 PR c++/10931
3275 * call.c (convert_like): Pass issue_conversion_warnings.
3276 (convert_like_with_context): Likewise.
3277 (convert_like_real): Add issue_conversion_warnings parameter.
3278 (perform_direct_initialization_if_possible): New function.
3279 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3280 * typeck.c (check_for_casting_away_constness): New function.
3281 (build_static_cast): Rewrite.
3282
3283 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
3284
3285 * call.c (enforce_access): Assert we get a binfo.
3286 (build_op_delete_call): Pass a binfo to
3287 perform_or_defer_access_check.
3288 * class.c (alter_access): Likewise.
3289 * decl.c (make_typename_type): Likewise.
3290 (make_unbound_class_template): Likewise.
3291 * lex.c (do_identifier): Likewise.
3292 * method.c (hack_identifier): Likewise.
3293 * parser.c (cp_parser_lookup_name): Likewise.
3294 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3295 test.
3296 * semantics.c (finish_non_static_data_member): Likewise.
3297 (perform_or_defer_access_check): Expect a binfo.
3298 * typeck.c (comptypes): Expect types.
3299
3300 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3301 * friend.c (make_friend_class): Likewise.
3302 * pt.c (check_default_tmpl_args): Likewise.
3303 (lookup_template_class): Likewise.
3304
3305 2003-06-24 Jan Hubicka <jh@suse.cz>
3306
3307 * method.c (thunk_labelno): Move outside ifdef block to make garbage
3308 collector happy.
3309
3310 2003-06-24 Jan Hubicka <jh@suse.cz>
3311
3312 * class.c (build_vtable): Make vtables.
3313 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3314 * decl2.c (output_vtable_inherit): Rename to ...
3315 (prepare_assemble_variable): ... this one; change interface.
3316 (maybe_emit_vtables): Do not call output_vtable_inherit.
3317 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3318 * cp-tree.h (prepare_assemble_variable): New.
3319
3320 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
3321
3322 * method.c: add prototype for make_alias_for_thunk.
3323 (thunk_labelno, make_alias_for_thunk): only define
3324 if ASM_OUTPUT_DEF is defined.
3325
3326 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3327
3328 * method.c (thunk_labelno): New variable.
3329 (make_alias_for_thunk): New function.
3330 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
3331 into the same section as the function it is calling.
3332 Include gt-cp-method.h.
3333 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3334 (cp/method.o): Depend on gt-cp-method.h.
3335 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3336
3337 2003-06-23 Jan Hubicka <jh@suse.cz>
3338
3339 * decl.c (register_dtor_fn): Mark cleanup as used.
3340 * decl2.c (mark_vtable_entries): Skip nops.
3341 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3342 (build_dynamic_cast_1): Likewise.
3343 (tinfo_base_init): Likewise.
3344 (emit_tinfo_decl): Likewise.
3345
3346 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3347
3348 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3349 to it.
3350
3351 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3352
3353 PR c++/10784
3354 * call.c (joust): Warn about choosing conversion sequence only if
3355 -Wconversion.
3356
3357 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3358
3359 PR c++/10864
3360 * call.c (op_error): Tidy.
3361 * error.c (dump_expr): Properly format 'T()' when T is an
3362 aggregate type.
3363
3364 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3365
3366 PR c++/10915
3367 * decl.c (grok_op_properties): Warn possible confusing conversion
3368 only if -Wconversion.
3369
3370 2003-06-20 Mark Mitchell <mark@codesourcery.com>
3371
3372 PR c++/10749
3373 * parser.c (cp_parser_class_head): See through dependent names
3374 when parsing a class-head.
3375
3376 PR c++/10845
3377 * pt.c (try_class_unification): Correct handling of member class
3378 templates.
3379
3380 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3381
3382 * semantics.c (genrtl_finish_function): Adjust
3383 expand_function_end call.
3384
3385 2003-06-19 Mark Mitchell <mark@codesourcery.com>
3386
3387 PR c++/10939
3388 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3389 functions.
3390 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3391
3392 PR c++/9649
3393 * cp-tree.h (pushdecl_class_level): Change prototype.
3394 (push_class_level_binding): Likewise.
3395 * decl.c (add_binding): Reject duplicate static data members.
3396 (pushdecl_class_level): Return a value indicating whether or not
3397 the binding was valid.
3398 (push_class_level_binding): Likewise.
3399 * semantics.c (finish_member_declaration): Don't keep invalid
3400 declarations.
3401
3402 PR c++/11041
3403 * call.c (initialize_reference): Do not use cp_finish_decl to emit
3404 temporary variables.
3405 * cp-tree.h (static_aggregates): Declare.
3406 (pushdecl_top_level_and_finish): Likewise.
3407 * decl.c (pushdecl_top_level_1): New function.
3408 (pushdecl_top_level): Use it.
3409 (pushdecl_top_level_and_finish): New function.
3410 (initialize_local_var): Remove redundant code.
3411 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
3412 building_stmt_tree.
3413 * decl.h (static_aggregates): Remove.
3414 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3415 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3416 (tinfo_base_init): Likewise.
3417
3418 2003-06-19 Matt Austern <austern@apple.com>
3419
3420 PR c++/11228
3421 * init.c (build_zero_init): Assert that number of array elements
3422 is an integer constant.
3423 (build_default_init) Don't use build_zero_init for arrays with
3424 variable number of elements.
3425
3426 2003-06-19 Andreas Jaeger <aj@suse.de>
3427
3428 * cp-tree.h: Remove duplicated declarations.
3429
3430 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
3431
3432 * pt.c: Convert to ISO C.
3433 * semantics.c: Convert to ISO C.
3434
3435 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3436
3437 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3438 at_least_as_qualified_p, more_qualified_p): Return bool.
3439 * typeck.c: ANSIFY function definitions.
3440 (comp_array_types): Take redeclaration bool parameter.
3441 (comptypes): Rearrange STRICT handling.
3442 (at_least_as_qualified_p, more_qualified_p,
3443 comp_cv_qualification): Cache cv quals.
3444 (compparms): Rearrange loop.
3445
3446 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3447
3448 * cp-tree.h (COMPARE_RELAXED): Rename to ...
3449 (COMPARE_DERIVED): ... here. Adjust comment.
3450 (resolve_typename_type_in_current_instantiation): Remove.
3451 (cp_tree_equal, comptypes): Return a bool.
3452 * cvt.c (convert_to_reference): Adjust comptypes call.
3453 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3454 (resolve_typename_type_in_current_instantiation): Remove.
3455 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3456 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3457 calls. Refactor code.
3458 * typeck.c (comp_array_types): Return bool. Lose callback.
3459 parameter. Adjust cp_tree_equal calls.
3460 (comptypes): Return bool. Adjust strict handling. Remove relaxed
3461 enumeration and java type handling. Deal with typename types here.
3462 Adjust recursive and cp_tree_equals calls. Adjust base and derived
3463 checking.
3464 (comp_target_types): Remove unreachable code. Adjust
3465 same_or_base_type_p calls.
3466 (ptr_reasonably_similar): Adjust base and derived check.
3467
3468 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3469 unused calculation.
3470 (check_return_expr): Adjust error messages.
3471 * cp-tree.def (SCOPE_REF): Correct comment.
3472
3473 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3474
3475 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3476 string again.
3477
3478 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3479
3480 * optimize.c (dump_function): Form complete flag name by
3481 prefixing 'fdump-' to string returned by dump_flag_name().
3482
3483 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3484
3485 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3486 string.
3487
3488 2003-06-17 Jason Merrill <jason@redhat.com>
3489
3490 PR c++/10929
3491 * decl.c (grokfndecl): Don't mark a function inline for
3492 -finline-functions if it isn't defined.
3493
3494 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3495
3496 PR c++/10712
3497 * class.c (handle_using_decl): Robustify.
3498
3499 PR c++/11105
3500 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3501 * mangle.c (struct globals): Remove internal_mangling_p.
3502 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3503 (write_template_parm): Don't write out the level number.
3504 (conv_type_names): New variable.
3505 (hash_type): New function.
3506 (compare_type): Likewise.
3507 (mangle_conv_op_name_for_type): Don't try to mangle conversion
3508 operator names.
3509 * search.c (lookup_conversion_operator): New function.
3510 (lookup_fnfields_1): Use it.
3511
3512 2003-06-17 Andreas Jaeger <aj@suse.de>
3513
3514 * except.c: Remove duplicate declaration of push_eh_cleanup.
3515
3516 * call.c: Remove extra declaration of inhibit_warnings.
3517
3518 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3519
3520 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
3521 * mangle.c: Convert to ISO C.
3522
3523 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3524
3525 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3526 macro.
3527
3528 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3529
3530 * tree.c: Convert to ISO C.
3531
3532 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
3533
3534 * cp-tree.h: Follow spelling conventions.
3535 * mangle.c: Likewise.
3536 * method.c: Likewise.
3537 * parser.c: Likewise.
3538
3539 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3540
3541 * decl.c (start_function): Adjust init_function_start call.
3542 * method.c (use_thunk): Likewise.
3543 * semantics.c (genrtl_start_function): Likewise.
3544
3545 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3546
3547 * Make-lang.in: Remove c-options.o.
3548
3549 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
3550
3551 * lex.c: Convert to ISO C.
3552
3553 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
3554 * init.c: removes use of PARAMS macro. Use ISO style function
3555 declarations. (Not copyright-significant change.)
3556
3557 * rtti.c: Remove PARAMS.
3558
3559 * typeck2.c: Convert to ISO C.
3560
3561 2003-06-12 Mark Mitchell <mark@codesourcery.com>
3562
3563 PR c++/10635
3564 * typeck.c (build_c_cast): Check that the destination type is
3565 complete.
3566
3567 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3568
3569 PR c++/10432
3570 * cp-tree.h (finish_declarator): Remove.
3571 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3572 erroneous declarations.
3573 * semantics.c (finish_declarator): Remove.
3574
3575 2003-06-11 Roger Sayle <roger@eyesopen.com>
3576
3577 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3578 global static constructor/destructor if it will be empty, i.e.
3579 either doesn't call any ctors/dtors or only calls pure or const
3580 ctors/dtors.
3581
3582 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3583
3584 * mangle.c (tm_p.h): Include it.
3585 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3586
3587 PR c++/11131
3588 * tree.c (cp_cannot_inline_fn): Check for "inline" before
3589 instantiation.
3590
3591 2003-06-10 Jason Merrill <jason@redhat.com>
3592
3593 PR c++/10968
3594 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3595
3596 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
3597
3598 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3599 (start_cleanup_cnt): New.
3600
3601 2003-06-10 Mark Mitchell <mark@codesourcery.com>
3602
3603 PR c++/11131
3604 * cp-tree.h (template_for_substitution): Declare.
3605 * decl2.c (mark_used): Use it when figuring out whether or not a
3606 function is inline.
3607 * pt.c (template_for_substitution): Give it external linkage.
3608 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3609 possible.
3610
3611 2003-06-09 Zack Weinberg <zack@codesourcery.com>
3612
3613 PR 8861
3614 * mangle.c (write_real_cst): New function. Implement
3615 ABI-compliant mangling of floating-point literals when
3616 -fabi-version>=2; provide backward compatibility with 3.3 when
3617 -fabi-version=1 (with warning). Clarify commentary.
3618 (write_template_arg_literal): Use write_real_cst.
3619
3620 2003-06-07 Andreas Jaeger <aj@suse.de>
3621
3622 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3623
3624 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3625
3626 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3627 (LANG_HOOKS_HANDLE_OPTION): Override.
3628 * cp-tree.h (cxx_init_options): Update.
3629 * lex.c (cxx_init_options): Update.
3630
3631 2003-06-05 Jan Hubicka <jh@suse.cz>
3632
3633 * Make-lang.in: Add support for stageprofile and stagefeedback
3634
3635 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
3636
3637 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3638
3639 2003-06-04 Andreas Jaeger <aj@suse.de>
3640
3641 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3642
3643 2003-06-03 Jason Merrill <jason@redhat.com>
3644
3645 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3646
3647 * cp/decl.c (reshape_init): Handle vectors.
3648
3649 * testsuite/g++.dg/init/array10.C: New.
3650
3651 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3652
3653 PR c++/10940
3654 * pt.c (check_explicit_specialization): Check for 'static'
3655 earlier.
3656
3657 2003-05-31 Diego Novillo <dnovillo@redhat.com>
3658
3659 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3660 the operand of a CONSTRUCTOR node.
3661
3662 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3663
3664 * decl.c (cp_binding_level::this_entity): Rename from this_class.
3665 (cxx_scope_descriptor): New function.
3666 (cxx_scope_debug): Likewise.
3667 (push_binding_level): Use it.
3668 (pop_binding_level): Likewise.
3669 (suspend_binding_level): Likewise.
3670 (resume_binding_level): Likewise.
3671 (pushlevel_class): Adjust use of this_class.
3672 (pushtag): Likewise.
3673 (lookup_name_real): Likewise.
3674 (global_scope_name): New variable.
3675 (initialize_predefined_identifiers): Initialize it.
3676 (push_namespace): Use it.
3677 (make_cxx_scope): New function.
3678 (pushlevel): Use it.
3679 (pushlevel_class): Likewise.
3680 (push_binding_level): Simplify. Loose the last two arguments.
3681 (make_binding_level): Remove.
3682 (initial_push__namespace_scope): New function.
3683 (push_namespace): Use it. Simplify.
3684 (cxx_init_decl_processing): Likewise.
3685 (declare_namespace_level): Remove.
3686
3687 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3688
3689 PR c++/10956
3690 * pt.c (instantiate_decl): Don't use full template arguments if
3691 we are dealing with specializations.
3692
3693 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3694
3695 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3696 (binding_depth): Unconditionally define.
3697 (is_class_level): Likewise.
3698 (indent): Likewise. Take an indenting parameter.
3699 (push_binding_level): Remove conditional definittion.
3700 (pop_binding_level): Likewise.
3701 (suspend_binding_level): Likewise.
3702 (resume_binding_level): Likewise.
3703 (pushlevel): Likewise.
3704 (pushlevel_class): Likewise.
3705 (poplevel_class): Likewise.
3706 (pop_everything): Likewise.
3707
3708 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3709
3710 * name-lookup.h (global_scope_p): New macro.
3711 * decl.c (pop_binding_level): Use it. Don't refer directly to
3712 global_binding_level.
3713 (suspend_binding_level): Likewise.
3714 (global_bindings_p): Likewise.
3715 (print_other_binding_stack): Likewise.
3716 (print_binding_stack): Likewise.
3717 (maybe_push_to_top_level): Likewise.
3718 (pushdecl_namespace_level): Likewise.
3719 (cxx_init_decl_processing): Likewise.
3720 (start_decl): Likewise.
3721 (cp_finish_decl): Likewise.
3722 (start_function): Likewise.
3723 (global_binding_level): Remove.
3724
3725 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3726
3727 * parser.c (cp_parser_explicit_instantiation): Restore old
3728 access before template instantiation.
3729
3730 2003-05-23 Geoffrey Keating <geoffk@apple.com>
3731
3732 * lang-specs.h: Use -o to specify preprocessor's output file.
3733 Make -no-integrated-cpp work when building PCH files.
3734
3735 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3736
3737 PR c++/10682
3738 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3739 check for implicitly created typedef to an enum.
3740
3741 2003-05-21 Jason Merrill <jason@redhat.com>
3742
3743 * init.c (build_vec_delete): Copy the address into a temporary
3744 variable before calling build_vec_delete_1.
3745 * decl2.c (delete_sanity): Don't call stabilize_reference.
3746
3747 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
3748
3749 * pt.c (register_specialization): Update the decl's location,
3750 if necessary.
3751 (check_explicit_specialization): Likewise.
3752
3753 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3754
3755 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3756
3757 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
3758
3759 PR c++/9738
3760 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3761 if the old decl had instantiated DECL_RTL.
3762 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3763
3764 2003-05-19 Matt Austern <austern@apple.com>
3765
3766 * lang-options.h: Document -Wno-invalid-offsetof
3767 * typeck.c (build_class_member_access_expr): Don't complain about
3768 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3769
3770 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3771
3772 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3773 (binding_entry_make): Make entry->chain NULL after getting an entry.
3774 fix the spelling of chain in a comment.
3775 (binding_table_free): speed up by having temporary variable.
3776 (binding_table_new): set table->chain to be NULL after allocating
3777 a table.
3778 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3779 binding->previous to NULL after getting an binding for speed.
3780
3781 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3782
3783 * cp-tree.h (struct lang_type_class): Replace data member tags
3784 with hash-table nested_udts.
3785 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3786 * class.c (unreverse_member_declarations): Don't touch
3787 CLASSTYPE_TAGS.
3788 (pushclass): Use cxx_remember_type_decls.
3789 * decl.c (struct cp_binding_level): Replace data member tags with
3790 hash-table type_decls.
3791 (pop_binding_level): Handle level->type_decls.
3792 (kept_level_p): Adjust.
3793 (poplevel): Remove unused local variable.
3794 (bt_print_entry): New function.
3795 (print_binding_level): Use it.
3796 (push_namespace): Build current_binding_level->type_decls.
3797 (maybe_process_template_type_declaration): Adjust.
3798 (pushtag): Likewise.
3799 (clear_anon_tags): Use binding_table_remove_anonymous_types.
3800 (gettags): Remove.
3801 (cxx_remember_type_decls): Rename from storetags. Adjust.
3802 (lookup_tag): Use binding_table_find_anon_type. Tidy.
3803 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3804 (cxx_init_decl_processing): Build global_binding_level->type_decls.
3805 (store_parm_decls): Remove pointless code.
3806 * name-lookup.c (free_binding_entry): New variable.
3807 (ENTRY_INDEX): New macro.
3808 (struct binding_table_s): New datatype.
3809 (binding_entry_make): New function.
3810 (binding_entry_free): Likewise.
3811 (binding_table_construct): Likewise.
3812 (binding_table_free): Likewise.
3813 (binding_table_new): Likewise.
3814 (binding_table_expand): Likewise.
3815 (binding_table_insert): Likewise.
3816 (binding_table_find): Likewise.
3817 (binding_table_find_anon_type): Likewise.
3818 (binding_table_reverse_maybe_remap): Likewise.
3819 (binding_table_remove_anonymous_types): Likewise.
3820 (binding_table_foreach): Likewise.
3821 * name-lookup.h (binding_table): New type.
3822 (binding_entry): Likewise.
3823 (bt_foreach_proc): Likewise.
3824 (struct binding_entry_s): New datatype.
3825 (SCOPE_DEFAULT_HT_SIZE): New macro.
3826 (CLASS_SCOPE_HT_SIZE): Likewise.
3827 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3828 (NAMESPACE_STD_HT_SIZE): Likewise.
3829 (GLOBAL_SCOPE_HT_SIZE): Likewise.
3830 (binding_table_new): Declare.
3831 (binding_table_free): Likewise.
3832 (binding_table_insert): Likewise.
3833 (binding_table_find_anon_type): Likewise.
3834 (binding_table_reverse_maybe_remap): Likewise.
3835 (binding_table_remove_anonymous_types): Likewise.
3836 (binding_table_foreach): Likewise.
3837 (binding_table_find): Likewise.
3838 (cxx_remember_type_decls): Likewise.
3839 * pt.c (bt_instantiate_type_proc): New function.
3840 (do_type_instantiation): Use it.
3841 * search.c (lookup_field_r): Use binding_table_find.
3842
3843 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3844
3845 * semantics.c (perform_deferred_access_checks): Don't discard
3846 checked access.
3847
3848 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3849
3850 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3851 libiberty VA_ macros, always use stdarg.
3852 * rtti.c (create_pseudo_type_info): Likewise.
3853 * tree.c (build_min_nt, build_min): Likewise.
3854
3855 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3856
3857 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3858 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3859 collapse multiple function calls into one.
3860 * tree.c (debug_binfo): Likewise.
3861
3862 2003-05-15 Jason Merrill <jason@redhat.com>
3863
3864 PR c++/5388
3865 * call.c (conditional_conversion): Don't consider implicit
3866 conversions if T2 is a base of T1.
3867 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3868 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3869
3870 * parser.c (cp_parser_primary_expression): Convert a static data
3871 member from reference.
3872
3873 2003-05-15 Mark Mitchell <mark@codesourcery.com>
3874
3875 * call.c (build_op_delete_call): Avoid creating unnecessary types.
3876 * class.c (instantiate_type): Remove tests for tf_no_attributes.
3877 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3878 (COMPARE_NO_ATTRIBUTES): Remove.
3879 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3880
3881 PR c++/8385
3882 * semantics.c (finish_typeof): Refine type-dependency check.
3883
3884 2003-05-13 Jason Merrill <jason@redhat.com>
3885
3886 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3887 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3888
3889 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3890
3891 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3892
3893 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3894
3895 PR c++/10230, c++/10481
3896 * semantics.c (finish_non_static_data_member): Handle when the
3897 non-static member is not from a base of the current class type.
3898
3899 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3900
3901 PR c++/10552
3902 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3903 template and has dependent context.
3904
3905 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3906
3907 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3908
3909 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3910
3911 PR c++/9252
3912 * cp-tree.h (saved_scope): Remove check_access field.
3913 (tsubst_flags_t): Remove tf_parsing.
3914 * decl.c (maybe_push_to_top_level): Don't initialize
3915 scope_chain->check_access.
3916 (make_typename_type, make_unbound_class_template): Don't use
3917 tf_parsing.
3918 (register_dtor_fn): Use push/pop_deferring_access_checks
3919 instead of scope_chain->check_access.
3920 * method.c (use_thunk): Likewise.
3921 * parser.c (cp_parser_explicit_instantiation
3922 (cp_parser_constructor_declarator_p): Don't call
3923 push/pop_deferring_access_checks here.
3924 (cp_parser_template_argument, cp_parser_class_name): Don't use
3925 tf_parsing.
3926 (yyparse): Check flag_access_control.
3927 * pt.c (instantiate_class_template): Call
3928 push/pop_deferring_access_checks.
3929 * semantics.c (push_deferring_access_checks): Propagate
3930 dk_no_check.
3931 (perform_or_defer_access_check): Make sure basetype_path is
3932 a type before comparison.
3933 * call.c (build_op_delete_call, build_over_call): Use
3934 perform_or_defer_access_check.
3935 * class.c (alter_access): Likewise.
3936 * init.c (build_offset_ref): Likewise.
3937 * lex.c (do_identifier): Likewise.
3938 * method.c (hack_identifier): Likewise.
3939 * search.c (lookup_member): Likewise.
3940 * semantics.c (finish_non_static_data_member): Likewise.
3941 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3942 instead of flag_access_control.
3943
3944 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3945
3946 PR c++/9554
3947 * parser.c (cp_parser_class_name): Remove check_access parameter.
3948 All caller adjusted. Update declaration.
3949 (cp_parser_lookup_name): Likewise.
3950 * semantics.c (push_deferring_access_checks): Change parameter type
3951 to enum deferring_kind. All caller adjusted.
3952 (resume_deferring_access_checks): Adjust to use new enum.
3953 (stop_deferring_access_checks): Likewise.
3954 (perform_or_defer_access_check): Likewise.
3955 * cp-tree.h (deferring_kind): New enum.
3956 (deferred_access): Adjust field type.
3957 (push_deferring_access_checks): Update declaration.
3958
3959 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3960
3961 PR c++/10555, c++/10576
3962 * pt.c (lookup_template_class): Handle class template with
3963 multiple levels of parameters when one of the levels contain
3964 errors.
3965
3966 2003-05-08 Jason Merrill <jason@redhat.com>
3967
3968 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3969 expression. Undo some of the recent reorg.
3970
3971 2003-05-07 Richard Henderson <rth@redhat.com>
3972
3973 PR c++/10570
3974 * cfns.gperf: Comment out POSIX thread cancellation points,
3975 plus abort and raise.
3976 * cfns.h: Regenerate.
3977
3978 2003-05-07 Jason Merrill <jason@redhat.com>
3979
3980 * call.c (build_conditional_expr): Don't assume that the folded
3981 expression has result_type.
3982
3983 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3984
3985 * typeck.c (build_unary_op): Deal with const qualifier in
3986 invalid pointer-to-member earlier.
3987
3988 2003-05-05 Jason Merrill <jason@redhat.com>
3989
3990 PR c++/9537
3991 * call.c (conditional_conversion): Build an RVALUE_CONV if
3992 we're just changing the cv-quals.
3993 (build_conditional_expr): Don't call convert to change
3994 cv-quals.
3995
3996 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3997
3998 PR c++/10496
3999 * typeck.c (build_unary_op): Don't output const qualifier when
4000 output invalid pointer-to-member diagnostics.
4001
4002 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4003
4004 * decl.c: Fix typos.
4005
4006 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4007
4008 PR c++/4494
4009 * decl.c (start_function): Use same_type_p to check return type
4010 of main.
4011
4012 2003-05-03 Zack Weinberg <zack@codesourcery.com>
4013
4014 PR c/10604
4015 * cp/typeck.c (build_x_compound_expr): No need to check
4016 extra_warnings as well as warn_unused_value.
4017
4018 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4019
4020 PR c++/9364, c++/10553, c++/10586
4021 * decl.c (make_typename_type): Don't crash on illegal code.
4022
4023 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
4024
4025 * class.c (finish_struct): Use location_t and input_location
4026 directly.
4027 * decl.c (make_label_decl): Likewise.
4028 (use_label): Likewise.
4029 * decl2.c (warn_if_unknown_interface): Likewise.
4030 (start_static_initialization_or_destruction): Likewise.
4031 (generate_ctor_or_dtor_function): Likewise.
4032 (finish_file): Likewise.
4033 * error.c (print_instantiation_full_context): Likewise.
4034 * init.c (create_temporary_var): Likewise.
4035 * method.c (synthesize_method): Likewise.
4036 * parser.c (cp_token): Likewise.
4037 (cp_lexer_set_source_position_from_token): Likewise.
4038 (cp_lexer_get_preprocessor_token): Likewise.
4039 (cp_parser_statement): Likewise.
4040 * pt.c (tsubst_friend_function): Likewise.
4041 (instantiate_class_template): Likewise.
4042 (tsubst_decl): Likewise.
4043 (tsubst): Likewise.
4044 (instantiate_decl): Likewise.
4045 * semantics.c (begin_class_definition): Likewise.
4046 (expand_body): Likewise.
4047
4048 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
4049
4050 * class.c (finish_struct): Rename lineno to input_line.
4051 * decl.c (push_binding_level, pop_binding_level,
4052 suspend_binding_level, resume_binding_level, make_label_decl,
4053 use_label, start_function): Likewise.
4054 * decl2.c (warn_if_unknown_interface,
4055 start_static_initialization_or_destruction,
4056 generate_ctor_or_dtor_function, finish_file): Likewise.
4057 * error.c (cp_line_of, print_instantiation_full_context,
4058 print_instantiation_context): Likewise.
4059 * except.c (check_handlers_1, check_handlers): Likewise.
4060 * init.c (create_temporary_var): Likewise.
4061 * method.c (use_thunk, synthesize_method): Likewise.
4062 * parser.c (cp_lexer_set_source_position_from_token,
4063 cp_lexer_get_preprocessor_token): Likewise.
4064 * pt.c (push_tinst_level, pop_tinst_level,
4065 tsubst_friend_function, instantiate_class_template, tsubst_decl,
4066 tsubst, tsubst_expr, instantiate_decl): Likewise.
4067 * semantics.c (genrtl_try_block, finish_label_stmt,
4068 begin_class_definition, expand_body,
4069 genrtl_finish_function): Likewise.
4070 * tree.c (build_min_nt, build_min): Likewise.
4071
4072 2003-05-01 Mark Mitchell <mark@codesourcery.com>
4073
4074 * decl2.c (comdat_linkage): Don't externalize explicit
4075 instantiations.
4076
4077 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4078
4079 PR c++/10554
4080 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4081 is not NULL.
4082
4083 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
4084
4085 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
4086 (struct lang_identifier): ... to here.
4087 (LANG_ID_FIELD): Remove.
4088 (SET_LANG_ID): Remove.
4089 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4090 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4091 (IDENTIFIER_IMPLICIT_DECL): Likewise.
4092 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4093 (IDENTIFIER_ERROR_LOCUS): Likewise.
4094 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4095
4096 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4097
4098 PR c++/8772
4099 * pt.c (convert_template_argument): Correct diagnostic.
4100
4101 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4102
4103 PR c++/9432, c++/9528
4104 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4105
4106 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
4107
4108 * decl.c (check_previous_goto_1): Adjust prototype.
4109 (check_previous_goto): Adjust use.
4110 (check_switch_goto): Likewise.
4111 (use_label): Adjust.
4112 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4113 (struct named_label_use_list): Use location_t datatype.
4114
4115 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4116
4117 PR c++/10551
4118 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4119 that have not yet been written out.
4120
4121 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4122
4123 PR c++/10549
4124 * class.c (layout_class_type): Mark overlong bitfields as having
4125 the maximum size permitted by their type, after layout.
4126
4127 PR c++/10527
4128 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4129
4130 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4131
4132 * call.c (build_operator_new_call): Fix typo.
4133 * lang-options.h: Likewise.
4134
4135 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4136
4137 PR c++/10515
4138 * cp-tree.h (lookup_field_1): Declare it.
4139 * search.c (lookup_field_1): Make it public.
4140 * decl.c (reshape_init): Handle designated initializers.
4141
4142 * decl.c (maybe_commonize_var): Further tweak support for systems
4143 without weak symbols.
4144
4145 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4146
4147 * decl.c (maybe_commonize_var): Fix thinko in last patch.
4148
4149 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4150
4151 PR c++/10506
4152 * method.c (use_thunk): Decrement immediate_size_expand.
4153
4154 PR c++/10503
4155 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4156 (DECL_MAYBE_TEMPLATE): Remove.
4157 * class.c (fixed_type_or_null): Avoid infinite recursion.
4158
4159 * decl.c (maybe_commonize_var): Make the code match the comments.
4160 * pt.c (instantiate_decl): Move call to import_export_decl.
4161
4162 2003-04-26 Mark Mitchell <mark@codesourcery.com>
4163
4164 * decl2.c (finish_file): Fix merge botch.
4165
4166 2003-04-25 Mark Mitchell <mark@codesourcery.com>
4167
4168 * decl2.c (finish_file): Don't call import_export_decl for
4169 functions that are not defined.
4170 (handle_class_head): Robustify.
4171 * pt.c (instantiate_decl): Do not call cp_finish_decl for
4172 variables that are not defined.
4173
4174 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
4175
4176 * call.c (print_z_candidates): Fix off by one error.
4177
4178 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
4179
4180 PR c++/10337
4181 * call.c (joust): Don't warn about conversion ops that are exact
4182 or cv-conversions. Rearrange to avoid multiple type comparisons.
4183
4184 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4185
4186 PR c++/10471
4187 * call.c (build_cxx_call): Robustify.
4188
4189 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
4190
4191 * Make-lang.in (lex.o): Remove mbchar.h.
4192 * lex.c (MULTIBYTE_CHARS): Lose.
4193 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4194 in c-lex.c.
4195
4196 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4197
4198 PR c++/9847
4199 * cp-tree.h (duplicate_tag_error): Remove.
4200 * class.c (duplicate_tag_error): Remove.
4201 * semantics.c (begin_class_definition): Return immediately for a
4202 duplicate class definition.
4203
4204 PR c++/10451
4205 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4206
4207 2003-04-22 Mark Mitchell <mark@codesourcery.com>
4208
4209 PR c++/10446
4210 * search.c (lookup_fnfields_1): Handle empty slots in the method
4211 vector.
4212
4213 PR c++/10428
4214 * decl.c (check_elaborated_type_specifier): New function, split
4215 out from ...
4216 (xref_tag): ... here. Use the new function in more places.
4217
4218 * rtti.c (throw_bad_typeid): Use build_cxx_call.
4219
4220 2003-04-21 Mark Mitchell <mark@codesourcery.com>
4221
4222 * call.c (build_over_call): Use build_cxx_call.
4223 (build_cxx_call): New method, split out of build_over_call.
4224 * cp-tree.h (language_function): Add can_throw.
4225 (build_cxx_call): Declare it.
4226 * decl.c (finish_function): If a function does not contain any
4227 calls to functions that can throw an exception, indicate that
4228 fact.
4229 * decl2.c (mark_used): Do not defer the instantiation of
4230 functions, if the current function does not throw.
4231 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4232 * pt.c (instantiate_decl): Make sure import_export_decl is called
4233 before emitting things.
4234 * rtti.c (throw_bad_cast): Use build_cxx_call.
4235 (build_dynamic_cast_1): Likewise.
4236 * typeck.c (build_function_call): Likewise.
4237
4238 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
4239
4240 PR c++/9881
4241 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4242 expressions. Reverts my 2002-08-08 patch.
4243
4244 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4245 cheaper early exit.
4246
4247 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4248
4249 * cp/decl2.c (start_static_storage_duration_function): Take count
4250 arg, don't check if it wraps round.
4251 (generate_ctor_or_dtor_function): Add locus arg, use it.
4252 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4253 locus.
4254 (finish_file): Set line numbers to past EOF for synthesized
4255 functions.
4256
4257 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4258
4259 PR c++/10405
4260 * search.c (lookup_field_1): Final scan goes backwards for
4261 types, forwards for non-types.
4262
4263 2003-04-17 Roger Sayle <roger@eyesopen.com>
4264
4265 PR c/10375
4266 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4267 "nothrow" function attributes.
4268
4269 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4270
4271 PR c++/10347
4272 * pt.c (type_dependent_expression_p): Handle array new.
4273
4274 2003-04-15 Mark Mitchell <mark@codesourcery.com>
4275
4276 PR c++/10381
4277 * parser.c (cp_parser_primary_expression): Reorganize logic for
4278 dealing with name lookup failures.
4279
4280 2003-04-15 Jason Merrill <jason@redhat.com>
4281
4282 * decl2.c (mark_used): Don't instantiate anything if
4283 skip_evaluation.
4284
4285 2003-04-14 Ziemowit Laski <zlaski@apple.com>
4286
4287 * tree.c (build_cplus_array_type_1): Do not call
4288 uses_template_parms() on a NULL index_type.
4289
4290 2003-04-13 Roger Sayle <roger@eyesopen.com>
4291
4292 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4293
4294 2003-04-12 Mark Mitchell <mark@codesourcery.com>
4295
4296 PR c++/10300
4297 * init.c (build_new_1): Reorganize.
4298
4299 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4300
4301 * class.c (initialize_array)
4302 * decl.c (reshape_init)
4303 * decl2.c (build_expr_from_tree)
4304 * init.c (build_zero_init)
4305 * pt.c (tsubst_copy, tsubst_copy_and_build)
4306 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4307 (ptm_initializer, class_initializer, get_pseudo_ti_init)
4308 * semantics.c (finish_compound_literal)
4309 * typeck.c (build_ptrmemfunc1)
4310 * typeck2.c (store_init_value, process_init_constructor)
4311 (build_functional_cast): Use build_constructor.
4312
4313 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4314
4315 * call.c (print_z_candidates): Use gcc_gettext_width, not
4316 strlen, to determine how much padding to use.
4317
4318 2003-04-10 Zack Weinberg <zack@codesourcery.com>
4319
4320 * decl.c: Update all calls to shadow_warning.
4321
4322 2003-04-10 Mark Mitchell <mark@codesourcery.com>
4323
4324 * class.c (layout_class_type): Correct handling for overlong
4325 bit-fields whose width is the same as an integer type.
4326
4327 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4328
4329 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4330 * cp-lang.c (cp_tree_size): New function.
4331 (LANG_HOOKS_TREE_SIZE): Override.
4332
4333 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4334 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4335 (union lang_tree_node): Remove common and srcloc members.
4336 (build_srcloc_here): Don't prototype.
4337 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4338 * pt.c (pending_templates): Correct comment.
4339 * tree.c (build_srcloc, build_srcloc_here): Kill.
4340
4341 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4342
4343 * call.c: Include intl.h.
4344 (print_z_candidate): Always use inform; get rid of errfn
4345 argument. Reorganize so that all the strings get picked up
4346 by xgettext. Note obligation of caller to pass first argument
4347 through gettext.
4348 (print_z_candidates): Update to match. Indent second and
4349 successive candidates by strlen() of translated message.
4350 (joust): Restructure ambiguous-conversion pedwarn so that
4351 translators see a complete sentence. Update calls to
4352 print_z_candidate.
4353
4354 * Make-lang.in (cp/call.o): Update dependencies.
4355
4356 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4357
4358 * decl.c (set_current_binding_level): Delete, revert last change.
4359 (current_binding_level): Modify to allow it as as lvalue.
4360
4361 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4362
4363 * name-lookup.c (find_binding): Pass appropriate pointer type to
4364 POP_TIMEVAR_AND_RETURN.
4365
4366 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4367
4368 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4369 * cp-tree.h: Don't insist on having GNUC.
4370
4371 2003-04-03 Jason Merrill <jason@redhat.com>
4372
4373 * cvt.c (ocp_convert): Only abort if we try to convert an object
4374 of TREE_ADDRESSABLE type.
4375
4376 * class.c (build_vtable): Set DECL_ALIGN here.
4377 (get_vtable_decl): Not here.
4378 (layout_vtable_decl): Or here.
4379 (create_vtable_ptr): Or here.
4380 (layout_class_type): Or here.
4381 (check_bitfield_decl): Don't mess with field alignment.
4382
4383 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4384
4385 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4386 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4387 * rtti.c (dfs_class_hint_mark): Likewise.
4388
4389 * decl.c (push_local_name, push_class_level_binding,
4390 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4391 functions returning void.
4392 * decl2.c (add_using_namespace): Likewise.
4393
4394 * decl.c (print_binding_level, print_other_binding_stack,
4395 print_binding_stack): Cast argument of %p specifier to void*.
4396 * ptree.c (cxx_print_decl): Likewise.
4397
4398 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4399 VAR_FUNCTION_OR_PARM_DECL_CHECK,
4400 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4401 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4402 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4403
4404 * decl.c (set_current_binding_level): New macro. Use throughout
4405 when setting the current binding level.
4406
4407 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4408 in enum.
4409 * method.c (mangling_flags): Likewise.
4410
4411 * cp-tree.h (lang_type_header): Add __extension__ and use
4412 CHAR_BITFIELD for members.
4413
4414 2003-04-02 Geoffrey Keating <geoffk@apple.com>
4415
4416 PR other/9274
4417 * mangle.c: Include gt-cp-mangle.h.
4418 (subst_identifiers): Mark with GTY.
4419 * config-lang.in (gtfiles): Add cp/mangle.c.
4420 * Make-lang.in: (gt-cp-mangle.h): New rule.
4421 (cp/mangle.o): Depends on gt-cp-mangle.h.
4422
4423 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
4424
4425 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4426 after \$(srcdir)/cp/name-lookup.h.
4427 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4428 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
4429 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4430 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4431
4432 2003-03-31 Jason Merrill <jason@redhat.com>
4433
4434 PR java/10145
4435 * class.c (check_field_decl): Don't set DECL_ALIGN.
4436
4437 2003-03-30 Mark Mitchell <mark@codesourcery.com>
4438
4439 PR c++/7647
4440 * decl.c (grokdeclarator): Tidy, slightly.
4441 * search.c (lookup_field_1): Add want_type parameter.
4442 (lookup_field_r): Adjust call to lookup_field_1.
4443
4444 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4445
4446 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4447
4448 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4449
4450 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
4451 prototype.
4452 (cxx_scope_find_binding_for_name): Likewise.
4453 * decl.c (find_binding: Move to name-lookup.c.
4454 (binding_for_name): Likewise.
4455 (cxx_scope_find_binding_for_name): Likewise.
4456 (BINDING_LEVEL): Remove.
4457 (push_binding): Tidy.
4458 (push_class_binding): Likewise.
4459 (pop_binding): Likewise.
4460 (poplevel): Likewise.
4461 (poplevel_class): Likewise.
4462 (set_identifier_type_value_with_scope): Likewise.
4463 (push_overloaded_decl): Likewise.
4464 (lookup_tag): Likewise.
4465 (unqualified_namespace_lookup): Likewise.
4466 (lookup_name_current_level): Likewise.
4467 (maybe_inject_for_scope_var): Likewise.
4468 (namespace_binding): Move to name-lookup.c.
4469 (set_namespace_binding): Likewise.
4470 * decl2.c (lookup_using_namespace): Tidy.
4471 (qualified_lookup_using_namespace): Likewise.
4472 (do_toplevel_using_decl): Likewise.
4473 * name-lookup.c: Include "timevar.h"
4474 * name-lookup.h (cxx_scope): Declare.
4475 (struct cxx_binding): Lose member "has_level". Adjust "scope"
4476 member declaration.
4477 (BINDING_SCOPE): Adjust definition.
4478 (BINDING_HAS_LEVEL_P): Remove.
4479
4480 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4481
4482 * name-lookup.c: New file.
4483 * name-lookup.h: Likewise..
4484 * decl.c (push_binding): Adjust use cxx_binding_make.
4485 (free_bindings): Move to name-lookup.c
4486 (pop_binding): Use cxx_binding_free.
4487 (binding_for_name): Tidy.
4488 * cp-tree.h: Include "name-lookup.h"
4489 (cxx_binding_make): Move to name-lookup.h
4490 (cxx_binding_clear): Likewise.
4491 (struct cxx_binding): Likewise.
4492 (LOCAL_BINDING_P): Likewise.
4493 (INHERITED_VALUE_BINDING_P): Likewise.
4494 (BINDING_SCOPE): Likewise.
4495 (BINDING_HAS_LEVEL_P): Likewise.
4496 (BINDING_VALUE): Likewise.
4497 (BINDING_TYPE): Likewise.
4498 * config-lang.in (gtfiles): Add cp/name-lookup.h
4499 * Make-lang.in (cp/name-lookup.o): New rule.
4500 (CXX_OBJS): Add cp/name-lookup.o
4501 (CXX_TREE_H): Add cp/name-lookup.h
4502
4503 2003-03-28 Jason Merrill <jason@redhat.com>
4504
4505 PR c++/10245
4506 * cvt.c (force_rvalue): New fn.
4507 * call.c (build_conditional_expr): Use it.
4508 * cp-tree.h: Declare it.
4509
4510 2003-03-28 Mike Stump <mrs@apple.com>
4511
4512 * error.c (dump_expr): Add 0x to printed hex numbers to make
4513 output match source code better.
4514
4515 2003-03-28 Mark Mitchell <mark@codesourcery.com>
4516
4517 PR c++/10218
4518 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4519 definitions.
4520
4521 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4522 non-existant ssdf_decls array.
4523 (finish_file): Call generator_ctor_or_dtor_function when there are
4524 static constructors or destructors and no other static
4525 initializations.
4526
4527 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
4528
4529 PR c++/10047
4530 * decl2.c (finish_file): Don't warn about explicitly instantiated
4531 inline decls.
4532
4533 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4534
4535 PR c++/10224
4536 * pt.c (lookup_template_class): Only check instantiated args if
4537 they do not contain template parameters.
4538
4539 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4540
4541 PR c++/10158
4542 * parser.c (cp_parser_function_definition): Set
4543 DECL_INITIALIZED_IN_CLASS for members.
4544 * pt.c (instantiate_decl): Only reduce the template args for
4545 friends that are not defined in class.
4546
4547 2003-03-25 Jason Merrill <jason@redhat.com>
4548
4549 * call.c (print_z_candidate): Change name of first arg to msgid.
4550 (joust): Add comment for translators.
4551
4552 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4553
4554 PR c++/9898, PR c++/383, DR 322
4555 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4556 through reference types on both PARM and ARG.
4557
4558 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4559
4560 PR c++/10119
4561 * error.c (dump_expr) <BASELINK>: Use dump_expr.
4562 * pt.c (maybe_fold_nontype_args): New function.
4563 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4564 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4565 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4566 maybe_fold_nontype_args.
4567
4568 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4569
4570 PR c++/10026
4571 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4572
4573 2003-03-23 Mark Mitchell <mark@codesourcery.com>
4574
4575 PR c++/7086
4576 * typeck.c (cxx_mark_addressable): Adjust call to
4577 gen_mem_addressof or put_var_into_stack.
4578
4579 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
4580
4581 PR c++/9978, c++/9708
4582 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4583 * call.c (add_template_candidate_real): Adjust
4584 instantiate_template call.
4585 * class.c (resolve_address_of_overloaded_function): Likewise.
4586 * decl.c (build_enumerator): Set TREE_CONSTANT.
4587 * pt.c (check_instantiated_args): New.
4588 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4589 TREE_READONLY.
4590 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4591 (reduce_template_parm_level): Likewise.
4592 (process_template_parm): Likewise.
4593 (check_explicit_specialization): Adjust instantiate_template call.
4594 (convert_template_argument): Don't check non-type argument here.
4595 (lookup_template_class): Check them here.
4596 (tsubst_friend_function): Adjust instantiate_template call.
4597 (instantiate_template): Add tsubst_flags parameter, use it. Check
4598 instantiated args.
4599
4600 2003-03-21 Zack Weinberg <zack@codesourcery.com>
4601
4602 * decl.c: Update calls to shadow_warning.
4603
4604 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
4605
4606 PR c++/9898
4607 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4608 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4609
4610 2003-03-20 Mark Mitchell <mark@codesourcery.com>
4611
4612 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4613 friends.
4614 * cp/pt.c (instantiate_class_template): Fix formatting.
4615
4616 2003-03-14 Matt Austern <austern@apple.com>
4617
4618 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4619 (unemitted_tinfo_decl_p): Remove.
4620 (emit_tinfo_decl): Change declaration to remove unused parameter.
4621 * decl2.c (finish_file): Change tinfo emission to loop through
4622 unemitted_tinfo_decls array instead of looping through all decls.
4623 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4624 unused second parameter.
4625 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4626 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4627 (emit_tinfo_decl): remove unused second parameter, add assertion
4628 that decl hasn't already been emitted.
4629
4630 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
4631
4632 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4633 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4634 return statements.
4635
4636 2003-03-19 Jason Merrill <jason@redhat.com>
4637
4638 PR c++/8316, c++/9315, c++/10136
4639 * call.c (print_z_candidate): Split out from...
4640 (print_z_candidiates): ...here.
4641 (joust): Use it.
4642
4643 2003-03-17 Roger Sayle <roger@eyesopen.com>
4644
4645 PR c++/10031
4646 * decl.c (duplicate_decls): Use the new type when prototyping
4647 anticipated decls, even when the types match. This defines the
4648 exception list for the built-in function.
4649
4650 2003-03-17 Jason Merrill <jason@redhat.com>
4651
4652 PR c++/10091
4653 * typeck.c (build_class_member_access_expr): Compare
4654 TYPE_MAIN_VARIANTs.
4655
4656 2003-03-17 Mark Mitchell <mark@codesourcery.com>
4657
4658 PR c++/9639
4659 * parser.c (cp_parser_declarator_id): Clear parser->scope.
4660
4661 2003-03-16 Jason Merrill <jason@redhat.com>
4662
4663 PR c++/9993
4664 * decl.c (finish_function): Only allow the NRVO to use variables
4665 declared at function scope.
4666
4667 2003-03-17 Andreas Jaeger <aj@suse.de>
4668
4669 * Make-lang.in (cp/TAGS): Remove.
4670
4671 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
4672
4673 PR c++/9629
4674 * cp-tree.h (struct language_function): Add in_base_initializer.
4675 (in_base_initializer): define it.
4676 (expand_member_init): Remove INIT param.
4677 * init.c (expand_member_init): Remove INIT param, return the member.
4678 (emit_mem_initializers): Set in_base_initializer.
4679 * class.c (build_base_path): Check in_base_initializer.
4680 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4681 * pt.c (tsubst_initializer_list): Likewise.
4682
4683 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
4684
4685 * decl.c (binding_for_name): Fix initialization thinko.
4686
4687 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4688
4689 Compile-time improvement: 2/n.
4690 * cp-tree.h (struct cxx_binding): New datatype;
4691 (struct lang_identifier): Use it.
4692 (LOCAL_BINDING_P): Adjust definition.
4693 (INHERITED_VALUE_BINDING_P): Likewise.
4694 (BINDING_SCOPE): Likewise.
4695 (BINDING_HAS_LEVEL_P): Likewise.
4696 (BINDING_VALUE): Likewise.
4697 (BINDING_TYPE): Likewise.
4698 (IDENTIFIER_VALUE): Likewise.
4699 (struct tree_binding): Remove.
4700 (TS_CP_BINDING): Likewise.
4701 ((union lang_tree_node): Remove field "binding".
4702 (cxx_binding_clear): New macro.
4703 (binding_for_name): Adjust return type.
4704 (qualified_lookup_using_namespace): Adjust prototype.
4705 (lookup_using_namespace): Adjust prototype.
4706 (cxx_scope_find_binding_for_name): Declare.
4707 * cp-tree.def: Remove CPLUS_BINDING definition.
4708 * decl.c (push_binding): Adjust local variable type.
4709 (add_binding): Likewise.
4710 (push_class_binding): Likewise.
4711 (pop_binding): Likewise.
4712 (poplevel): Likewise.
4713 (poplevel_class): Likewise.
4714 (free_bindings): Adjust type.
4715 (find_binding): Adjust return type, add a third parameter. Remove
4716 non-useful assertion now that we use static typing.
4717 (cxx_scope_find_binding_for_name): New function.
4718 (binding_for_name): Use it. Adjust local variable type. Simplify.
4719 (namespace_binding): Simplify.
4720 (set_namespace_binding): Likewise.
4721 (set_identifier_type_value_with_scope): Adjust local variable type.
4722 (lookup_tag): Don't type-abuse of local variable 'old'.
4723 (lookup_namespace_name): Likewise. Allocate binding on stack.
4724 (select_decl): Adjust prototype.
4725 (unqualified_namespace_lookup): Allocate binding on stack.
4726 Don't type-abuse of local variable 'val'.
4727 (lookup_name_real): Likewise.
4728 (maybe_inject_for_scope_var): Adjust local variable type.
4729 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4730 (namespace_binding): Adjust logic, simplify.
4731 (BINDING_LEVEL): Adjust definition.
4732 (push_class_level_binding): Adjust local variable type.
4733 (struct cxx_saved_binding): Adjust field 'binding' type.
4734 * decl2.c (ambiguous_decl): Adjust prototype.
4735 (lookup_using_namespace): Adjust local variable type.
4736 (qualified_lookup_using_namespace): Catch type error and correct
4737 ensueing logic error.
4738 (do_nonmember_using_decl): Adjust local variable type. Allocate
4739 temporary cxx_binding on stack.
4740 (do_toplevel_using_decl): Adjust local variable type.
4741 * ptree.c (cxx_print_cxx_binding): New function.
4742 (cxx_print_identifier): Use it.
4743 (cxx_print_xnode): Delete CPLUS_BINDING case label.
4744
4745 2003-03-15 Roger Sayle <roger@eyesopen.com>
4746
4747 * tree.c (count_functions): Fix whitespace.
4748
4749 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
4750
4751 * Make-lang.in: Update.
4752
4753 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4754
4755 PR c++/6440
4756 * pt.c (maybe_process_partial_specialization): Handle
4757 member class template when enclosing class template is
4758 explicit specialized.
4759 (most_general_template): Stop looking when DECL is already
4760 specialized.
4761
4762 2003-03-13 Jason Merrill <jason@redhat.com>
4763
4764 PR c++/9420
4765 * search.c (lookup_conversions): Call complete_type here.
4766 * call.c (implicit_conversion): Not here.
4767
4768 2003-03-13 Mark Mitchell <mark@codesourcery.com>
4769
4770 * decl2.c (do_nonmember_using_decl): Correct handling of
4771 simultaneous type/non-type bindings.
4772
4773 * call.c (initialize_reference): Remove bogus assertion.
4774 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4775
4776 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
4777
4778 PR c++/7050
4779 * expr.c (cxx_expand_expr): Return const0_rtx for throw
4780 expressions.
4781
4782 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4783
4784 PR c++/9474
4785 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4786 to merge old and new declarations.
4787
4788 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4789
4790 * g++.1: Remove.
4791 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4792 (cp/g++.1): Build it from scratch in the build tree.
4793 (c++.install-man): Depend on it. Install it from the build tree.
4794 (c++.mostlyclean): Clean it.
4795
4796 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4797
4798 PR c++/9474
4799 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4800 to merge old and new declarations.
4801
4802 PR c++/9924
4803 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4804
4805 2003-03-11 Jason Merrill <jason@redhat.com>
4806
4807 PR c++/9820
4808 * search.c (lookup_member): Fix handling of functions in a class
4809 being defined.
4810
4811 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4812
4813 PR c++/8700
4814 * call.c (convert_class_to_reference): Adjust usage of
4815 splice_viable.
4816 (any_viable): Remove.
4817 (splice_viable): Combine with any_viable.
4818 (print_z_candidates): Avoid printing duplicates.
4819 (build_user_type_conversion_1): Adjust usage of splice_viable.
4820 (build_new_function_call): Likewise.
4821 (build_operator_new_call): Likewise.
4822 (build_object_call): Likewise.
4823 (build_conditional_expr): Likewise.
4824 (build_new_op): Likewise.
4825 (build_new_method_call): Likewise.
4826 (joust): Remove spurious comment.
4827 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4828 * decl2.c (arg_assoc_class): Simplify.
4829 * friend.c (add_friend): Likewise.
4830
4831 2003-03-11 Jason Merrill <jason@redhat.com>
4832
4833 PR c++/8660
4834 * decl2.c (check_classfn): A member template only matches a
4835 member template.
4836
4837 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
4838
4839 * Make-lang.in (CXX_C_OBJS): Update.
4840 * lang-specs.h: Don't define __GNUG__ here.
4841
4842 2003-03-10 Mark Mitchell <mark@codesourcery.com>
4843
4844 * call.c (perform_overload_resolution): New function.
4845 (build_new_function_call): Use it.
4846 (build_operator_new_call): Likewise.
4847 (add_candidates): Add explicit_targs and template_only parameters.
4848 (build_new_op): Adjust accordingly.
4849 * cp-tree.h (build_operator_new_call): New function.
4850 (build_function_call_real): Remove.
4851 (build_function_call_maybe): Likewise.
4852 * init.c (build_new_1): Use build_operator_new_call.
4853 * typeck.c (build_function_call_real): Rename to ...
4854 (build_function_call): ... this.
4855
4856 2003-03-10 Devang Patel <dpatel@apple.com>
4857
4858 PR c++/9394
4859 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4860
4861 2003-03-10 Jason Merrill <jason@redhat.com>
4862
4863 PR c++/9798
4864 * decl.c (push_using_directive): Push before recursing.
4865
4866 PR c++/9868, c++/9524
4867 * call.c (resolve_scoped_fn_name): Handle the case of a function
4868 pointer member.
4869
4870 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4871 argument in the pointer-to-member case.
4872
4873 2003-03-09 Mark Mitchell <mark@codesourcery.com>
4874
4875 PR c++/9373
4876 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4877 pointers to member functions.
4878
4879 PR c++/8534
4880 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4881 in pointer-to-member-function types.
4882
4883 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4884
4885 * expr.c (cplus_expand_constant): Use C90 prototype style.
4886 (cxx_expand_expr): Likewise.
4887
4888 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4889
4890 PR c++/9970
4891 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4892 functions.
4893
4894 2003-03-08 Geoffrey Keating <geoffk@apple.com>
4895
4896 * lang-specs.h (c++-header): Change .pch to .gch.
4897
4898 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
4899
4900 * cp-tree.h (cxx_init): Update prototype.
4901 * lex.c (cxx_init): Similarly.
4902
4903 2003-03-08 Mark Mitchell <mark@codesourcery.com>
4904
4905 PR c++/9823
4906 * cp-tree.h (begin_mem_initializers): Remove.
4907 * parser.c (cp_parser_mem_initializer_list): Inline it here.
4908 Do not call finish_mem_initializers if not in a constructor.
4909 (cp_parser_class_head): Fix typo in error message.
4910 * semantics.c (begin_mem_initializers): Remove.
4911 * testsuite/g++.dg/parser/constructor1.C: New test.
4912
4913 PR c++/9809
4914 * call.c (add_function_candidate): Skip builtin fuctions that have
4915 not yet been declared.
4916
4917 PR c++/9982
4918 * init.c (build_new_1): Correct logic for determining whether or
4919 not to use an array cookie.
4920
4921 PR c++/9524
4922 * parser.c (cp_parser_postfix_expression): Call
4923 finish_non_static_data_member, even when processing_template_decl.
4924
4925 PR c++/9912
4926 * cp-tree.h (is_ancestor): New function.
4927 (handle_class_head): Change prototype.
4928 * decl2.c (is_namespace_ancestor): Rename to ...
4929 (namespace_anecestor): ... this.
4930 (set_decl_namespace): Adjust accordingly.
4931 (handle_class_head): Remove unnecessary parameters.
4932 * parser.c (cp_parser_class_head): Check that
4933 nested-name-specifiers are used appropriately.
4934
4935 2003-03-07 Mark Mitchell <mark@codesourcery.com>
4936
4937 * call.c (reference_binding): Remove REF_IS_VAR parameter.
4938 (implicit_conversion): Adjust call to reference_binding.
4939 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4940 (initialize_reference): Adjust handling for references bound to
4941 rvalues.
4942 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4943 prototype.
4944 (real_non_cast_lvalue_p): New method.
4945 * cvt.c (build_up_reference): Adjust use of
4946 make_temporary_var_for_ref_to_temp.
4947 * tree.c (real_non_cast_lvalue_p): New method.
4948
4949 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4950
4951 * except.c (init_exception_processing): Use C90 prototype style.
4952 (cp_protect_cleanup_actions): Likewise.
4953 (prepare_eh_type): Likewise.
4954 (build_eh_type_type): Likewise.
4955 (build_exc_ptr): Likewise.
4956 (do_begin_catch): Likewise.
4957 (dtor_nothrow): Likewise.
4958 (do_end_catch): Likewise.
4959 (push_eh_cleanup): Likewise.
4960 (decl_is_java_type): Likewise.
4961 (choose_personality_routine): Likewise.
4962 (initialize_handler_parm): Likewise.
4963 (expand_start_catch_block): Likewise.
4964 (expand_end_catch_block): Likewise.
4965 (begin_eh_spec_block): Likewise.
4966 (finish_eh_spec_block): Likewise.
4967 (do_allocate_exception): Likewise.
4968 (do_free_exception): Likewise.
4969 (wrap_cleanups_r): Likewise.
4970 (stabilize_throw_expr): Likewise.
4971 (build_throw): Likewise.
4972 (complete_ptr_ref_or_void_ptr_p): Likewise.
4973 (is_admissible_throw_operand): Likewise.
4974 (nothrow_libfn_p): Likewise.
4975 (can_convert_eh): Likewise.
4976 (check_handlers_1): Likewise.
4977 (check_handlers): Likewise.
4978
4979 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4980
4981 * call.c (merge_conversion_sequences): New function.
4982 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4983 (convert_class_to_reference): Correct handling of second
4984 standard conversion sequence in a user-defined conversion
4985 sequence.
4986 (build_user_type_conversion_1): Use merge_conversion_sequences.
4987 * cp-tree.def: Add comments for CONV nodes.
4988 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4989
4990 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4991
4992 * error.c (init_error): Use C90 prototype style.
4993 (dump_scope): Likewise.
4994 (dump_qualifiers): Likewise.
4995 (dump_template_argument): Likewise.
4996 (dump_template_argument_list): Likewise.
4997 (dump_template_parameter): Likewise.
4998 (dump_template_bindings): Likewise.
4999 (dump_type): Likewise.
5000 (dump_typename): Likewise.
5001 (class_key_or_enum): Likewise.
5002 (dump_aggr_type): Likewise.
5003 (dump_type_prefix): Likewise.
5004 (dump_type_suffix): Likewise.
5005 (dump_global_iord): Likewise.
5006 (dump_simple_decl): Likewise.
5007 (dump_decl): Likewise.
5008 (dump_template_decl): Likewise.
5009 (dump_function_decl): Likewise.
5010 (dump_parameters): Likewise.
5011 (dump_exception_spec): Likewise.
5012 (dump_function_name): Likewise.
5013 (dump_template_parms): Likewise.
5014 (dump_char): Likewise.
5015 (dump_expr_list): Likewise.
5016 (dump_expr): Likewise.
5017 (dump_binary_op): Likewise.
5018 (dump_unary_op): Likewise.
5019 (type_as_string): Likewise.
5020 (expr_as_string): Likewise.
5021 (decl_as_string): Likewise.
5022 (context_as_string): Likewise.
5023 (lang_decl_name): Likewise.
5024 (cp_file_of): Likewise.
5025 (cp_line_of): Likewise.
5026 (decl_to_string): Likewise.
5027 (expr_to_string): Likewise.
5028 (fndecl_to_string): Likewise.
5029 (code_to_string): Likewise.
5030 (language_to_string): Likewise.
5031 (parm_to_string): Likewise.
5032 (op_to_string): Likewise.
5033 (type_to_string): Likewise.
5034 (assop_to_string): Likewise.
5035 (args_to_string): Likewise.
5036 (cv_to_string): Likewise.
5037 (cxx_print_error_function): Likewise.
5038 (cp_diagnostic_starter): Likewise.
5039 (cp_diagnostic_finalizer): Likewise.
5040 (cp_print_error_function): Likewise.
5041 (function_category): Likewise.
5042 (print_instantiation_full_context): Likewise.
5043 (print_instantiation_partial_context): Likewise.
5044 (maybe_print_instantiation_context): Likewise.
5045 (print_instantiation_context): Likewise.
5046 (cp_printer): Likewise.
5047 (print_integer): Likewise.
5048 (print_non_consecutive_character): Likewise.
5049 (locate_error): Likewise.
5050
5051 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5052
5053 PR c++/9965
5054 * call.c (reference_binding): Add ref_is_var parameter.
5055 (implicit_conversion): Adjust call to reference_binding.
5056 (initialize_reference): Likewise.
5057
5058 PR c++/9400
5059 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5060 PARM_DECLs.
5061
5062 PR c++/9791
5063 * class.c (get_basefndecls): Use lookup_fnfields_1.
5064
5065 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5066
5067 PR c++/9188
5068 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5069 in error message.
5070 (cp_parser_single_declaration): Likewise.
5071
5072 2003-03-05 Jason Merrill <jason@redhat.com>
5073
5074 PR c++/9440
5075 * call.c (build_conditional_expr): Use convert rather than an
5076 explicit NOP_EXPR.
5077
5078 2003-03-02 Matt Austern <austern@apple.com>
5079
5080 * decl.c (cp_binding_level): Add static_decls varray member.
5081 (add_decl_to_level): Add static/inline namespace scope
5082 declarations to static_decls array.
5083 (wrapup_global_for_namespace): Pass static_decls only, instead of
5084 all decls, to wrapup_global_declarations/check_global_declarations.
5085 (push_namespace): Initialize static_decls for ordinary namespaces.
5086 (cxx_init_decl_processing): Initialize static_decls for global
5087 namespace.
5088
5089 2003-03-05 Mark Mitchell <mark@codesourcery.com>
5090
5091 * class.c (end_of_class): Correct thinko.
5092
5093 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
5094
5095 * config-lang.in: Replace ${libstdcxx_version} by its value.
5096
5097 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5098
5099 * cp-tree.h (cxx_saved_binding): Declare.
5100 (struct saved_scope): Adjust type of field 'old_binding'.
5101 * decl.c (cxx_saved_binding_make): New macro.
5102 (struct cxx_saved_binding): Define.
5103 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
5104 C++ bindings.
5105 (maybe_push_to_top_level): Adjust local variable type.
5106 (pop_from_top_level): Likewise.
5107
5108 2003-03-04 Tom Tromey <tromey@redhat.com>
5109
5110 * Make-lang.in (c++.tags): New target.
5111
5112 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
5113
5114 * Make-lang.in: Update.
5115
5116 2003-03-03 Jason Merrill <jason@redhat.com>
5117
5118 * decl.c (finish_enum): Do set the type in a template. Simplify.
5119 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5120
5121 2003-03-03 Mark Mitchell <mark@codesourcery.com>
5122
5123 PR c++/9878
5124 * call.c (convert_class_to_reference): Correct conversion
5125 sequences.
5126 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5127 (implicit_conversion): Adjust call to reference_binding.
5128 (add_candidate): Change type of candidates parameter.
5129 (add_function_candidate): Likewise.
5130 (add_conv_candidate): Likewise.
5131 (build_builtin_candidate): Likewise.
5132 (add_builtin_candidate): Likewise.
5133 (add_builtin_candidates): Likewise.
5134 (add_template_candidate_real): Likewise.
5135 (add_template_candidate): Likewise.
5136 (add_template_conv_candidate): Likewise.
5137 (build_user_type_conversion_1): Adjust accordingly.
5138 (build_object_call): Likewise.
5139 (build_conditional_expr): Likewise.
5140 (add_candidates): Likewise.
5141 (build_new_op): Likewise.
5142 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
5143 (build_new_method_call): Adjust calls to add_function_candidate.
5144 (make_temporary_var_for_ref_to_temp): New function.
5145 (initialize_reference): Add decl parameter.
5146 * class.c (build_rtti_vtbl_entries): Use build_address and
5147 build_nop.
5148 * cp-tree.h (initialize_reference): Change prototype.
5149 (make_temporary_var_for_ref_to_temp): New function.
5150 (build_type_conversion): Change prototype.
5151 (build_address): New function.
5152 (build_nop): Likewise.
5153 * cvt.c (cp_convert_to_pointer): Adjust call to
5154 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
5155 Use build_nop.
5156 (convert_to_pointer_force): Use build_nop.
5157 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5158 (convert_to_reference): Adjust call to build_type_conversion.
5159 (ocp_convert): Likewise.
5160 (build_type_conversion): Remove for_sure parameter.
5161 * decl.c (grok_reference_init): Use initialize_reference.
5162 * typeck.c (build_address): New function.
5163 (build_nop): Likewise.
5164 (build_unary_op): Use them.
5165 (build_ptrmemfunc): Tidy slightly.
5166 (convert_for_initialization): Adjust call to
5167 initialize_reference.
5168 * typeck2.c (store_init_value): Remove #if 0'd code.
5169
5170 2003-03-03 Jason Merrill <jason@redhat.com>
5171
5172 * decl.c (start_function): Clear DECL_NUM_STMTS.
5173
5174 * class.c (get_vtable_decl): Use vtbl_type_node.
5175 (build_primary_vtable): Check for it.
5176
5177 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
5178
5179 * decl.c (check_initializer): Check for vector_opaque_p.
5180
5181 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
5182
5183 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5184 invoke an external cpp during compilation.
5185
5186 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5187
5188 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5189 that of warning().
5190 (start_decl): Likewise.
5191 (start_function): Likewise.
5192
5193 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
5194
5195 * Make-lang.in (CXX_C_OBJS): Update.
5196
5197 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5198
5199 PR c++/9892
5200 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5201 instantiating it.
5202
5203 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
5204
5205 * parser.c (cp_parser_init_declarator): Revert opaque
5206 vector_opaque_p change.
5207 Do not include target.h.
5208
5209 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5210
5211 PR c++/9879
5212 * cp-tree.h (build_zero_init): Add parameter.
5213 * decl.c (cp_finish_decl): Adjust call.
5214 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
5215 calls.
5216 (build_default_init): Add nelts parameter. Adjust calls to
5217 build_zero_init.
5218 (build_new_1): Adjust call to build_default_init.
5219 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5220
5221 2003-02-26 Devang Patel <dpatel@apple.com>
5222
5223 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5224 required. Postpone enum setting for template decls.
5225 (build_enumerator): Delay copying value node until finish_enum
5226 (). Remove #if 0'ed code.
5227 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5228 (tsubst_copy): Add check for enum type.
5229
5230 2003-02-25 Mark Mitchell <mark@codesourcery.com>
5231
5232 PR c++/9683
5233 * decl2.c (prune_vars_needing_no_initialization): Do not throw
5234 away initializations for DECL_EXTERNAL VAR_DECLs.
5235 (finish_file): Adjust accordingly.
5236 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5237
5238 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5239
5240 * decl.c (add_binding): Time TV_NAME_LOOKUP.
5241 (push_class_binding): Likewise.
5242 (set_namespace_binding): Likewise.
5243
5244 2003-02-24 Mark Mitchell <mark@codesourcery.com>
5245
5246 PR c++/9836
5247 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5248 specializations back to the main template.
5249 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5250 * pt.c (resolve_typename_type): Likewise.
5251
5252 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
5253
5254 PR c++/9778
5255 * pt.c (tsubst_copy_and_build): For a templated function inside a
5256 scope, process template arguments.
5257
5258 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5259
5260 PR c++/9602
5261 * typeck2.c (abstract_virtuals_error): Don't check when
5262 TYPE is still template parameter dependent.
5263
5264 2003-02-23 Mark Mitchell <mark@codesourcery.com>
5265
5266 PR c++/5333
5267 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5268 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5269 * pt.c (instantiate_class_template): Don't try to instantiate
5270 dependent types.
5271 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5272
5273 2003-02-21 Mark Mitchell <mark@codesourcery.com>
5274
5275 PR c++/9749
5276 * decl.c (grokdeclarator): Do not allow parameters with variably
5277 modified types.
5278
5279 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
5280
5281 * search.c (grow_bfs_bases): Remove. Fold into ...
5282 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5283 in previous patch.
5284
5285 2003-02-20 Mark Mitchell <mark@codesourcery.com>
5286
5287 PR c++/9729
5288 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5289 when the G++ 3.2 ABI prevents correct compilation.
5290
5291 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
5292
5293 Change base class access representation. Share virtual base
5294 binfos.
5295 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5296 call.
5297 * cp/class.c (build_base_path): Likewise.
5298 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5299 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5300 (make_new_vtable): Adjust.
5301 (force_canonical_binfo_r): Delete.
5302 (force_canonical_binfo): Delete.
5303 (mark_primary_virtual_base): Delete.
5304 (dfs_unshared_virtual_bases): Delete.
5305 (mark_primary_bases): Adjust.
5306 (maybe_warn_about_overly_private_class): Adjust.
5307 (dfs_base_derived_from): Delete.
5308 (base_derived_from): Follow the inheritance chain.
5309 (struct find_final_overrider_data): Add vpath member.
5310 (dfs_find_final_overrider): Adjust.
5311 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5312 (find_final_overrider): Adjust.
5313 (update_vtable_entry_for_fn): Adjust.
5314 (modify_all_vtables): Adjust.
5315 (walk_subobject_offsets): Adjust.
5316 (layout_nonempty_base_or_field): Adjust.
5317 (layout_empty_base): Remove last parameter. Adjust.
5318 (build_base_field): Adjust.
5319 (build_base_fields): Adjust.
5320 (propagate_binfo_offsets): Remove last parameter. Adjust.
5321 (dfs_set_offset_for_unshared_vbases): Delete.
5322 (layout_virtual_bases): Adjust.
5323 (finish_struct_1): Adjust.
5324 (init_class_processing): Don't init access nodes.
5325 (dfs_get_primary_binfo): Delete.
5326 (get_primary_binfo): Adjust.
5327 (dump_class_hierarchy_r): Remove most derived arg, add IGO
5328 parameter. Adjust.
5329 (dump_class_hierarchy): Adjust.
5330 (finish_vtbls): Adjust.
5331 (get_original_base): Delete.
5332 (build_vtt_inits): Adjust.
5333 (dfs_build_secondary_vptr_vtt_inits): Adjust.
5334 (dfs_ctor_vtable_bases_queue_p): Adjust.
5335 (build_ctor_vtbl_group): Adjust.
5336 (dfs_accumulate_vtbl_inits): Adjust.
5337 (build_vtbl_initializer): Adjust.
5338 (build_vbase_offset_vtbl_entries): Adjust.
5339 (add_vcall_offset_vtbl_entries_1): Adjust.
5340 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5341 (access_*_node): Remove.
5342 (CANONICAL_BINFO): Delete.
5343 (BINFO_UNSHARED_MARKED): Remove.
5344 (BINFO_MARKED): Set LANG_FLAG_0 directly.
5345 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5346 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5347 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5348 Delete.
5349 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5350 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5351 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5352 Delete.
5353 (BINFO_DEPENDENT_BASE_P): New.
5354 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5355 index.
5356 (markedp, unmarkedp): Adjust.
5357 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5358 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5359 find_vbase_instance, binfo_for_vbase): Delete.
5360 (copied_binfo, original_binfo): Declare.
5361 (finish_base_specifier): Add virtual_p arg.
5362 (unshare_base_binfos): Delete.
5363 (copy_base_binfos): Declare.
5364 (reverse_path): Delete.
5365 * cp/decl.c (xref_basetypes): Access and virtuality passed
5366 differently. Don't copy direct base binfos here. Call
5367 copy_base_binfos.
5368 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5369 (initialize_vtbl_ptrs): Adjust.
5370 (expand_member_init): Adjust.
5371 * cp/parser.c (cp_parser_base_specifier): Adjust.
5372 * cp/pt.c (instantiate_class_template): Adjust.
5373 (get_template_base_recursive): Adjust.
5374 * cp/rtti.c (get_pseudo_ti_init): Adjust.
5375 (get_pseudo_ti_desc): Adjust.
5376 * cp/tree.c (unshare_base_binfos): Rename to ...
5377 (copy_base_binfos): ... here, reimplement.
5378 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5379 (reverse_path): Remove.
5380 * cp/typeck.c (get_delta_difference): Adjust error messages.
5381 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5382 * cp/search.c (lookup_base_r): Adjust.
5383 (dynamic_cast_base_recurse): Adjust.
5384 (canonical_binfo): Remove.
5385 (dfs_canonical_queue): Remove.
5386 (dfs_assert_unmarked_p): Remove.
5387 (assert_canonical_unmarked): Remove.
5388 (shared_marked_p, shared_unmarked_p): Remove.
5389 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5390 (dfs_access_in_type): Adjust.
5391 (access_in_type): Adjust.
5392 (dfs_accessible_queue_p): Adjust.
5393 (dfs_accessible_p): Adjust.
5394 (is_subobject_of_p_1, is_subobject_of_p): Remove.
5395 (struct lookup_field_info): Remove from_dep_base_p field.
5396 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5397 (lookup_field_r): Remove dependent base code.
5398 (lookup_member): Likewise.
5399 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5400 (dfs_unmarked_real_bases_queue_p): Remove.
5401 (dfs_marked_real_bases_queue_p): Remove.
5402 (dfs_skip_vbases): Remove.
5403 (dfs_get_pure_virtuals): Adjust.
5404 (markedp, unmarkedp): Adjust.
5405 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5406 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5407 (dfs_unmark): Adjust.
5408 (dfs_get_vbase_types):Remove.
5409 (dfs_build_inheritance_graph_order): Remove.
5410 (get_vbase_types): Remove
5411 (dfs_find_vbase_instance): Remove.
5412 (find_vbase_instance): Remove.
5413 (dfs_debug_unmarkedp): Adjust.
5414 (dependent_base_p): Remove.
5415 (dfs_push_type_decls): Adjust.
5416 (dfs_push_decls): Adjust.
5417 (dfs_no_overlap_yet): Adjust.
5418 (copied_binfo): New function.
5419 (original_binfo): New function.
5420 (binfo_for_vbase): Remove.
5421
5422 2003-02-18 Zack Weinberg <zack@codesourcery.com>
5423
5424 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5425 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5426 vectors, for speed.
5427
5428 2003-02-18 Mark Mitchell <mark@codesourcery.com>
5429
5430 PR c++/9704
5431 * class.c (layout_class_type): In the 3.2 ABI, take into account
5432 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5433
5434 2003-02-18 Matt Austern <austern@apple.com>
5435
5436 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5437 nothing for C++.
5438 * cp/decl.c (wrapup_globals_for_namespace): Remove special
5439 handling of global namespace.
5440
5441 2003-02-18 Geoffrey Keating <geoffk@apple.com>
5442
5443 * cp-tree.h (rid_to_yy): Delete.
5444 (C_RID_YYCODE): Delete.
5445 (finish_file): Delete redundant declaration.
5446
5447 2003-02-18 Jason Merrill <jason@redhat.com>
5448
5449 PR c++/9623
5450 * decl.c (reshape_init): Don't mess with initializer labels.
5451
5452 PR c++/9485
5453 * parser.c (cp_parser_postfix_expression): Set idk properly for
5454 object->scope::member.
5455
5456 2003-02-18 Ben Elliston <bje@redhat.com>
5457
5458 PR other/7350
5459 * decl.c (duplicate_decls): Fix typo in comment.
5460
5461 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
5462
5463 PR debug/9717
5464 * class.c (build_base_field): Mark fields for base classes with
5465 DECL_IGNORED_P.
5466
5467 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5468
5469 PR c++/9457
5470 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5471 CONSTRUCTOR_ELTS only once.
5472
5473 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5474
5475 PR c++/9459
5476 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5477 (dump_type_suffix): Likewise.
5478
5479 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
5480
5481 * search.c: ANSIfy function declarations and definitions.
5482 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5483 * call.c (build_method_call, resolve_scoped_fn_name,
5484 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5485 calls.
5486 * class.c (handle_using_decl): Likewise.
5487 * decl.c (make_typename_type, make_unmound_class_template,
5488 start_decl, compute_array_index_type): Likewise.
5489 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5490 * init.c (expand_member_init, build_member_call): Likewise.
5491 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5492 resolve_typename_type): Likewise.
5493 * typeck.c (lookup_destructor, finish_class_member_access_exprm
5494 build_prememfunc_access_expr): Likewise.
5495
5496 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5497
5498 * decl2.c: Include "timevar.h".
5499 (namespace_ancestor): Time name lookup.
5500 (add_using_namespace): Likewise.
5501 (lookup_using_namespace): Likewise.
5502 (qualified_lookup_using_namespace): Likewise.
5503 (decl_namespace): Likewise.
5504 (lookup_arg_dependent): Likewise.
5505 * lex.c (do_identifier): Likewise.
5506 (do_scoped_id): Likewise.
5507 * pt.c (lookup_template_class): Likewise.
5508
5509 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
5510
5511 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5512
5513 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5514
5515 * decl.c: Include "timevar.h".
5516 (poplevel): Time name lookup.
5517 (find_binding): Likewise.
5518 (push_namespace): Likewise.
5519 (pop_nested_namespace): Likewise.
5520 (store_bindings): Likewise.
5521 (maybe_push_to_top_level): Likewise.
5522 (pop_from_top_level): Likewise.
5523 (push_local_name): Likewise.
5524 (pushtag): Likewise.
5525 (pushdecl): Likewise.
5526 (pushdecl_with_scope): Likewise.
5527 (pushdecl_namespace_level): Likewise.
5528 (pushdecl_top_level): Likewise.
5529 (pushdecl_class_level): Likewise.
5530 (push_class_level_binding): Likewise.
5531 (push_using_decl): Likewise.
5532 (push_using_directive): Likewise.
5533 (push_overloaded_decl): Likewise.
5534 (lookup_label): Likewise.
5535 (define_label): Likewise.
5536 (lookup_tag): Likewise.
5537 (lookup_tag_reverse): Likewise.
5538 (lookup_namespace_name): Likewise.
5539 (select_decl): Likewise.
5540 (unqualified_namespace_lookup): Likewise.
5541 (lookup_name_real): Likewise.
5542 (lookup_name_current_level): Likewise.
5543 (lookup_type_current_level): Likewise.
5544 (maybe_inject_for_scope_var): Likewise.
5545 (xref_tag): Likewise.
5546
5547 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5548
5549 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
5550
5551 * decl.c (build_enumerator): Remove unneeded test.
5552
5553 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
5554
5555 * cp-tree.h (struct lang_type_header): Make all fields unsigned
5556 char.
5557
5558 2003-02-03 Mark Mitchell <mark@codesourcery.com>
5559
5560 PR c++/7129
5561 * call.c (z_candidate): Add args.
5562 (convert_class_to_reference): Set it.
5563 (implicit_conversion): Tidy.
5564 (add_candidate): Add args parameter.
5565 (add_function_candidate): Adjust call to add_candidate.
5566 (add_conv_candidate): Likewise.
5567 (build_builtin_candidate): Likewise.
5568 (build_user_type_conversion_1): Eliminate wasteful tree_cons
5569 usage.
5570 (build_new_function_call): Likewise.
5571 (build_object_call): Likewise.
5572 (add_candidates): New function.
5573 (build_new_op): Use it.
5574 (covert_like_real): Adjust call to build_over_call.
5575 (build_over_call): Remove args parameter.
5576 * operators.def: Add <?= and >?=.
5577
5578 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
5579
5580 * typeck.c (build_indirect_ref): Don't check flag_volatile.
5581
5582 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5583
5584 PR c++/8849
5585 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5586
5587 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
5588
5589 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5590 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5591 (BINFO_LANG_ELTS): New #define.
5592 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5593
5594 2003-01-30 Geoffrey Keating <geoffk@apple.com>
5595
5596 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5597
5598 2003-01-30 Mark Mitchell <mark@codesourcery.com>
5599
5600 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5601 for class types.
5602 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5603 rather than TYPE_LANG_FLAG_0.
5604 (TYPE_BUILT_IN): Remove.
5605 (TYPE_DEPENDENT_P): New macro.
5606 (TYPE_DEPENDENT_P_VALID): Likewise.
5607 (lang_type_class): Add fields_readonly.
5608 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5609 * pt.c (dependent_type_p_r): New function, split out from ...
5610 (dependent_type_p): ... here. Memoize results.
5611 * search.c (dependent_base_p): Use dependent_type_p, not
5612 uses_template_parms.
5613 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5614 for class types.
5615
5616 2003-01-29 Mark Mitchell <mark@codesourcery.com>
5617
5618 * call.c (build_field_call): Use build_new_op, not build_opfncall.
5619 (prep_operand): New function.
5620 (build_new_op): Use it. Remove dead code.
5621 * class.c (pushclass): Change "modify" parameter type from int to
5622 bool.
5623 (currently_open_class): Use same_type_p, not pointer equality.
5624 (push_nested_class): Adjust calls to pushclass, remove modify
5625 parameter.
5626 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5627 (pushclass): Change prototype.
5628 (push_nested_class): Likewise.
5629 (grokoptypename): Remove.
5630 (build_opfncall): Remove.
5631 (value_dependent_expression_p): Declare.
5632 (resolve_typename_type): Likewise.
5633 (resolve_typename_type_in_current_instantiation): Likewise.
5634 (enter_scope_of): Remove.
5635 (tsubst): Remove.
5636 (tsubst_expr): Likewise.
5637 (tsubst_copy): Likewise.
5638 (tsubst_copy_and_build): Likewise.
5639 * decl.c (warn_about_implicit_typename_lookup): Remove.
5640 (finish_case_label): Return error_mark_node for erroneous labels.
5641 (start_decl): Adjust calls to push_nested_class.
5642 (grokfndecl): Call push_scope/pop_scope around call to
5643 duplicate_decls.
5644 (grokdeclarator): Do not call tsubst.
5645 (start_function): Adjust calls to push_nested_class.
5646 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5647 (check_classfn): Use push_scope/pop_scope around type comparisions.
5648 (grokoptypename): Remove.
5649 (push_sscope): Adjust call to push_nested_class.
5650 * error.c (dump_type): Show cv-qualification of typename types.
5651 * init.c (build_member_call): Use build_new_op, not
5652 build_opfncall.
5653 * method.c (build_opfncall): Remove.
5654 * parser.c (cp_parser): Add allow_non_constant_expression_p and
5655 non_constant_expression_p.
5656 (cp_parser_constant_expression): Adjust prototype.
5657 (cp_parser_resolve_typename_type): Remove.
5658 (cp_parser_non_constant_expression): New function.
5659 (cp_parser_non_constant_id_expression): Likewise.
5660 (cp_parser_new): Set allow_non_constant_expression_p and
5661 non_constant_expression_p.
5662 (cp_parser_primary_expression): Reject `this' and `va_arg' in
5663 constant-expressions. Note that dependent names aren't really
5664 constant.
5665 (cp_parser_postfix_expression): Reject conversions to non-integral
5666 types in constant-expressions. Neither are increments or
5667 decrements.
5668 (cp_parser_unary_expression): Reject increments and decrements in
5669 constant-expressions.
5670 (cp_parser_direct_new_declarator): Adjust call to
5671 cp_parser_constant_expression.
5672 (cp_parser_cast_expression): Reject conversions to non-integral
5673 types in constant-expressions.
5674 (cp_parser_assignment_expression): Rejects assignments in
5675 constant-expressions.
5676 (cp_parser_expression): Reject commas in constant-expressions.
5677 (cp_parser_labeled_statement): Adjust call to
5678 cp_parser_constant_expression.
5679 (cp_parser_direct_declarator): Simplify array bounds, even in
5680 templates, when they are non-dependent. Use
5681 resolve_typename_type, not cp_parser_resolve_typename_type.
5682 (cp_parser_class_head): Use resolve_typename_type, not
5683 cp_parser_resolve_typename_type.
5684 (cp_parser_member_declaration): Adjust call to
5685 cp_parser_constant_expression.
5686 (cp_parser_constant_initializer): Likewise.
5687 (cp_parser_constructor_declarator): Use resolve_typename_type, not
5688 cp_parser_resolve_typename_type.
5689 (cp_parser_late_parsing_default_args): Adjust call to
5690 push_nested_class.
5691 * pt.c (tsubst): Give it internal linkage.
5692 (tsubst_expr): Likewise.
5693 (tsubst_copy): Likewise.
5694 (tsubst_copy_and_build): Likewise.
5695 (push_access_scope_real): Likewise.
5696 (tsubst_friend_class): Likewise.
5697 (instantiate_class_template): Adjust call to pushclass.
5698 (value_dependent_expression_p): Give it external linkage.
5699 Robustify.
5700 (resolve_typename_type): New function.
5701 * semantics.c (finish_call_expr): Use build_new_op, not
5702 build_opfncall.
5703 (begin_constructor_declarator): Remove.
5704 (begin_class_definition): Adjust call to pushclass.
5705 (enter_scope_of): Remove.
5706 * typeck.c (comptypes): Resolve typename types as appropriate.
5707 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5708 (build_x_compound_expr): Likewise.
5709 (build_modify_expr): Likewise.
5710 (build_x_modify_expr): Likewise.
5711 * typeck2.c (build_x_arrow): Likewise.
5712
5713 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
5714
5715 * pt.c (last_pending_template) Declare GTY().
5716
5717 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5718
5719 PR c++/8591
5720 * parser.c (cp_parser_elaborated_type_specifier): Convert
5721 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5722 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5723
5724 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
5725
5726 PR c++/9437
5727 * pt.c (unify): Don't unify '*T' with 'U C::*'.
5728
5729 PR c++/3902
5730 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5731 inside a declarator.
5732
5733 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
5734
5735 * class.c (update_vtable_entry_for_fn): Add index parameter.
5736 Generate vcall thunk for covariant overriding from a virtual
5737 primary base.
5738 (dfs_modify_vtables): Adjust.
5739
5740 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
5741
5742 PR c++/9403
5743 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5744 template keyword.
5745 (cp_parser_base_specifier): Look for and consume a
5746 TEMPLATE keyword. Replace switch with array index.
5747
5748 PR c++/795
5749 * semantics.c (finish_non_static_data_member): Remember the
5750 field's type even in a template.
5751
5752 PR c++/9415
5753 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5754 already scoped.
5755
5756 PR c++/8545
5757 * parser.c (cp_parser_cast_expression): Be more tentative.
5758
5759 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5760
5761 * cp-tree.h (flagged_type_tree_s): Remove.
5762 (check_for_new_type): Likewise.
5763 * typeck2.c (check_for_new_type): Likewise.
5764
5765 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
5766
5767 * dump.c: ANSIfy function declarations and definitions.
5768
5769 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
5770
5771 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5772
5773 PR c++/9354
5774 * init.c (build_new): Set the type of the new-expression, even
5775 when processing_templte_decl.
5776
5777 PR c++/9216
5778 * parser.c (cp_parser_primary_expression): Improve error message
5779 for templates used in an expression context.
5780
5781 PR c++/8696
5782 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5783 parse when encountering "typedef".
5784
5785 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
5786
5787 * class.c, parser.c: ANSIfy function definitions and declarations.
5788
5789 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5790
5791 PR c++/9328
5792 * error.c (dump_decl): For an OVERLOAD, just print the name of the
5793 function; it doesn't make sense to try to print its type.
5794 * semantics.c (finish_typeof): Issue errors about invalid uses.
5795
5796 PR c++/9298
5797 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5798 function.
5799 (cp_parser_expression_statement): Use it.
5800 (cp_parser_explicit_instantiation): Likewise.
5801 * pt.c (do_decl_instantiation): Improve error handling logic.
5802
5803 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5804
5805 PR c++/9384
5806 * parser.c (cp_parser_using_declaration): Issue error messages
5807 about name resolution failures here.
5808
5809 PR c++/9388
5810 * class.c (currently_open_derived_class): Use dependent_type_p.
5811 * cp-tree.h (dependent_type_p): New function.
5812 (dependent_template_arg_p): Likewise.
5813 (dependent_template_p): Likewise.
5814 (type_dependent_expression_p): Likewise.
5815 * parser.c (cp_parser_dependent_type_p): Remove.
5816 (cp_parser_value_dependent_type_p): Likewise.
5817 (cp_parser_type_dependent_expression_p): Likewise.
5818 (cp_parser_dependent_template_arg_p): Likewise.
5819 (cp_parser_dependent_template_id_p): Likewise.
5820 (cp_parser_dependent_template_p): Likewise.
5821 (cp_parser_diagnose_invalid_type_name): Replace
5822 cp_parser_dependent_type_p with dependent_type_p, etc.
5823 (cp_parser_primary_expresion): Likewise.
5824 (cp_parser_nested_name_specifier_opt): Likewise.
5825 (cp_parser_postfix_expression): Likewise.
5826 (cp_parser_unary_expression): Likewise.
5827 (cp_parser_template_name): Likewise.
5828 (cp_parser_class_name): Likewise.
5829 (cp_parser_lookup_name): Likewise.
5830 * pt.c (dependent_type_p): New function.
5831 (value_dependent_expression_p): Likewise.
5832 (type_dependent_expression_p): Likewise.
5833 (dependent_template_arg_p): Likewise.
5834 (dependent_template_id_p): Likewise.
5835 (dependent_template_p): Likewise.
5836
5837 PR c++/9285
5838 PR c++/9294
5839 * parser.c (cp_parser_simple_declaration): Return quickly when
5840 encountering errors.
5841
5842 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5843
5844 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5845
5846 2003-01-17 Jason Merrill <jason@redhat.com>
5847
5848 PR c++/9167, c++/9358
5849 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5850
5851 2003-01-17 Jason Merrill <jason@redhat.com>
5852
5853 PR c++/9342
5854 * call.c (build_conditional_expr): Always do lvalue-rvalue
5855 conversion.
5856
5857 2003-01-17 Mark Mitchell <mark@codesourcery.com>
5858
5859 PR c++/9294
5860 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5861 * cp-tree.h (BASELINK_BINFO): Adjust.
5862 (BASELINK_FUNCTIONS): Likewise.
5863 (BASELINK_ACCESS_BINFO): Likewise.
5864 (tree_baselink): New structure.
5865 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5866 (lang_tree_node): Add baselink.
5867 * decl.c (cp_tree_node_structure): Add BASELINK case.
5868 * search.c (build_baselink): Adjust.
5869 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
5870 test from TREE_LIST case.
5871
5872 PR c++/9272
5873 * parser.c (cp_parser_constructor_declarator_p): Do not assume
5874 that a constructor cannot be declared outside of its own class.
5875
5876 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5877 be resolved, neither can the qualified name.
5878
5879 * rtti.c (get_pseudo_ti_desc): Fix thinko.
5880
5881 2003-01-16 Jason Merrill <jason@redhat.com>
5882
5883 PR c++/8564
5884 * init.c (build_vec_init): Re-add maxindex parm.
5885 (perform_member_init, build_aggr_init): Pass it.
5886 (build_new_1): Pass it. Use an incomplete array type for full_type.
5887 * typeck.c (build_modify_expr): Pass it.
5888 * cp-tree.h: Adjust.
5889
5890 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
5891
5892 * cp-tree.h (tsubst_copy_and_build): New declaration.
5893 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5894 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
5895 (tsubst_copy_and_build): New function.
5896
5897 2003-01-16 Mark Mitchell <mark@codesourcery.com>
5898
5899 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5900 (PARTIAL_INSTANTIATION_P): Remove.
5901 (IMPLICIT_TYPENAME_P): Likewise.
5902 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5903 (build_typename_type): Remove declaration.
5904 (parmlist_is_exprlist): Likewise.
5905 * decl.c (build_typename_type): Make it static, remove third
5906 parameter.
5907 (push_class_binding): Don't do implicit typename stuff.
5908 (make_typename_type): Likewise.
5909 (lookup_name_real): Likewise.
5910 (grokdeclarator): Don't try to convert declarations into
5911 initializations. Don't do implicit typename stuff.
5912 (parmlist_is_exprlist): Remove.
5913 (xref_basetypes): Simplify.
5914 * decl2.c (grokfield): Don't try to convert declarations into
5915 initializations.
5916 (build_anon_union_vars): Do this while processing templates, too.
5917 (finish_anon_union): Likewise.
5918 * error.c (dump_type): Remove implicit typename handling.
5919 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5920 (cp_parser_primary_expression): Correct handling of names not
5921 found by unqualified name lookup in templates.
5922 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5923 of types when possible.
5924 (cp_parser_simple_declaration): Complain intelligently about some
5925 invalid declarations.
5926 (cp_parser_member_declaration): Likewise.
5927 (cp_parser_constructor_declarator_p): Don't check when we're in a
5928 function scope.
5929 * pt.c (instantiate_class_template): Remove
5930 PARTIAL_INSTANTIATION_P gunk.
5931 * search.c (lookup_field_r): Don't build implicit typenames.
5932 (marked_pushdecls_p): Don't enter dependent base types.
5933 (unmarked_pushdecls_p): Likewise.
5934 * semantics.c (begin_class_definition): Remove implicit typename
5935 stuff.
5936
5937 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
5938
5939 PR c++/9212
5940 * parser.c (cp_parser_direct_declarator): If accepting either
5941 abstract or named, the name must be an unqualified-id.
5942
5943 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5944
5945 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5946
5947 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5948
5949 * decl2.c (check_classfn): Fix uninitialized warning.
5950 (build_anon_union_vars): Likewise.
5951 * pt.c (tsubst_copy): Likewise.
5952
5953 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
5954
5955 Further conform g++'s __vmi_class_type_info to the C++ ABI
5956 specification.
5957 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5958 the specification.
5959 (class_hint_flags): Likewise.
5960
5961 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5962
5963 * config-lang.in: Add semantics.c to gtfiles.
5964 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5965 (saved_scope): Likewise.
5966 (type_lookups): Remove.
5967 (deferred_access): New structure.
5968 (type_access_control): Remove.
5969 (save_type_access_control): Likewise.
5970 (reset_type_access_control): Likewise.
5971 (decl_type_access_control): Likewise.
5972 (push_deferring_access_checks): Declare.
5973 (resume_deferring_access_checks): Likewise.
5974 (stop_deferring_access_checks): Likewise.
5975 (pop_deferring_access_checks): Likewise.
5976 (get_deferred_access_checks): Likewise.
5977 (pop_to_parent_deferring_access_checks): Likewise.
5978 (perform_deferred_access_checks): Likewise.
5979 (perform_or_defer_access_check): Likewise.
5980 * decl.c (make_typename_type): Use perform_or_defer_access_check.
5981 (make_unbound_class_template): Likewise.
5982 (grokdeclarator): Don't call decl_type_access_control.
5983 * parser.c (cp_parser_context): Remove deferred_access_checks
5984 and deferring_access_checks_p fields.
5985 (cp_parser_context_new): Adjust.
5986 (cp_parser): Remove access_checks_lists.
5987 (cp_parser_defer_access_check): Remove.
5988 (cp_parser_start_deferring_access_checks): Remove.
5989 (cp_parser_stop_deferring_access_checks): Remove.
5990 (cp_parser_perform_deferred_access_checks): Remove.
5991 (cp_parser_nested_name_specifier_opt): Use new deferred access
5992 functions.
5993 (cp_parser_simple_declaration): Likewise.
5994 (cp_parser_template_id): Likewise.
5995 (cp_parser_function_definition): Likewise.
5996 (cp_parser_class_specifier): Likewise.
5997 (cp_parser_lookup_name): Likewise.
5998 (cp_parser_single_declaration): Likewise.
5999 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
6000 (cp_parser_parse_tentatively): Likewise.
6001 (cp_parser_parse_definitely): Likewise.
6002 (yyparse): Likewise.
6003 (cp_parser_init_declarator): Remove access_checks parameter.
6004 Use new deferred access functions.
6005 (cp_parser_function_definition_from_specifiers_and_declarator):
6006 Likewise.
6007 (cp_parser_class_head): Remove deferring_access_checks_p and
6008 saved_access_checks parameters. Use new deferred access functions.
6009 (cp_parser_member_specification_opt): Don't call
6010 reset_type_access_control.
6011 * search.c (type_access_control): Remove.
6012 * semantics.c: Include "gt-cp-semantics.h".
6013 (deferred_type_access_control): Remove.
6014 (deferred_access_stack): New variable.
6015 (deferred_access_free_list): Likewise.
6016 (push_deferring_access_checks): New function.
6017 (resume_deferring_access_checks): Likewise.
6018 (stop_deferring_access_checks): Likewise.
6019 (pop_deferring_access_checks): Likewise.
6020 (get_deferred_access_checks): Likewise.
6021 (pop_to_parent_deferring_access_checks): Likewise.
6022 (perform_deferred_access_checks): New function, adapted from
6023 cp_parser_perform_deferred_access_checks.
6024 (perform_or_defer_access_check): New function, adapted from
6025 cp_parser_defer_access_check.
6026 (current_type_lookups): Remove.
6027 (deferred_type_access_control): Likewise.
6028 (decl_type_access_control): Likewise.
6029 (save_type_access_control): Likewise.
6030 (reset_type_access_control): Likewise.
6031 (begin_function_definition): Adjust.
6032 (begin_class_definiton): Likewise.
6033
6034 2003-01-13 Jason Merrill <jason@redhat.com>
6035
6036 PR c++/8748
6037 * class.c (build_base_path): Take the address before calling save_expr.
6038
6039 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6040 all the ambiguous conversions are bad.
6041
6042 * class.c (maybe_warn_about_overly_private_class): Don't stop
6043 searching when we find a nonprivate method.
6044
6045 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6046
6047 2003-01-12 Mark Mitchell <mark@codesourcery.com>
6048
6049 * cp-tree.h (get_arglist_len_in_bytes): Remove.
6050
6051 PR c++/9264
6052 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6053 typeame types more robustly.
6054
6055 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
6056
6057 * parser.c: Fix comment typos.
6058
6059 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6060
6061 PR c++/9099
6062 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6063 an object_type which is not a class type.
6064
6065 2003-01-10 Geoffrey Keating <geoffk@apple.com>
6066
6067 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6068 (cp_parser_late_parsing_default_args): Likewise.
6069
6070 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
6071
6072 * cfns.gperf: ANSIfy function declarations.
6073 * cfns.h: Regenerate.
6074 * cp-tree.h: ANSIfy function declarations.
6075
6076 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6077
6078 * cp-tree.h (reparse_absdcl_as_expr): Remove.
6079 (reparse_absdcl_as_casts): Likewise.
6080 (reparse_decl_as_expr): Likewise.
6081 (finish_decl_parsing): Likewise.
6082 * decl2.c (reparse_absdcl_as_expr): Remove.
6083 (reparse_absdcl_as_casts): Likewise.
6084 (repase_decl_as_expr): Likewise.
6085 (finish_decl_parsing): Likewise.
6086
6087 PR c++/9128
6088 PR c++/9153
6089 PR c++/9171
6090 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6091 function.
6092 (cp_parser_nested_name_specifier_opt): Correct the
6093 check_dependency_p false.
6094 (cp_parser_postfix_expression): Fix formatting.
6095 (cp_parser_decl_specifier_seq): Avoid looking for constructor
6096 declarators when possible.
6097 (cp_parser_template_id): Avoid performing name-lookup when
6098 possible.
6099 (cp_parser_class_head): Do not count specializations when counting
6100 levels of templates.
6101 (cp_parser_constructor_declarator_p): Return immediately if
6102 there's no chance that the tokens form a constructor declarator.
6103 * rtti.c (throw_bad_typeid): Add comment. Do not return an
6104 expression with reference type.
6105 (get_tinfo_decl_dynamic): Do not return an expression with
6106 reference type.
6107 (build_typeid): Add comment. Do not return an expression with
6108 reference type.
6109 * typeck.c (build_class_member_access_expr): Improve handling of
6110 conditionals and comma-expressions as objects.
6111
6112 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6113
6114 * cfns.gperf: ANSIfy function declarations.
6115 * cfns.h: Regenerate.
6116 * cp-tree.h: ANSIfy function declarations.
6117 * parser.c: ANSIfy function declarations & definitions.
6118
6119 * decl.c (bad_specifiers): Fix parameter order error I introduced.
6120
6121 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6122
6123 Merge from pch-branch:
6124
6125 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6126
6127 Merge to tag pch-merge-20030102:
6128
6129 * semantics.c (finish_translation_unit): Don't call finish_file.
6130 * parser.c: Don't include ggc.h.
6131 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6132 read first token here. Don't allow PCH files after the first
6133 token is read.
6134 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6135 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6136 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6137 (cp_parser_late_parsing_for_member): Don't duplicate call to
6138 cp_lexer_set_source_position_from_token.
6139 (cp_parser_late_parsing_default_args): Likewise.
6140 (yyparse): Call finish_file after clearing the_parser.
6141
6142 2002-12-11 Geoffrey Keating <geoffk@apple.com>
6143
6144 * Make-lang.in: Remove $(GGC_H) from all dependencies.
6145 (CXX_TREE_H): Add $(GGC_H).
6146 * class.c: Don't include ggc.h.
6147 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6148 (method_name_cmp): Likewise.
6149 (resort_data): New variable.
6150 (resort_field_decl_cmp): New.
6151 (resort_method_name_cmp): New.
6152 (resort_sorted_fields): New.
6153 (resort_type_method_vec): New.
6154 (finish_struct_methods): Delete cast.
6155 (finish_struct_1): Delete cast.
6156 * cp-tree.h: Include ggc.h.
6157 (struct lang_type_class): Add reorder attribute to field `methods'.
6158 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6159 (resort_sorted_fields): New prototype.
6160 (resort_type_method_vec): New prototype.
6161 * call.c: Don't include ggc.h.
6162 * decl.c: Likewise.
6163 * decl2.c: Likewise.
6164 * init.c: Likewise.
6165 * lex.c: Likewise.
6166 * method.c: Likewise.
6167 * optimize.c: Likewise.
6168 * parse.y: Likewise.
6169 * pt.c: Likewise.
6170 * repo.c: Likewise.
6171 * search.c: Likewise.
6172 * semantics.c: Likewise.
6173 * spew.c: Likewise.
6174 * tree.c: Likewise.
6175
6176 * lang-specs.h: Remove comment.
6177
6178 2002-12-03 Geoffrey Keating <geoffk@apple.com>
6179
6180 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6181 (operator_name_info): Mark to be saved for PCH, specify size.
6182 (assignment_operator_name_info): Likewise.
6183
6184 2002-11-19 Geoffrey Keating <geoffk@apple.com>
6185
6186 * decl.c (anon_cnt): Mark to be saved for PCH.
6187
6188 2002-10-25 Geoffrey Keating <geoffk@apple.com>
6189
6190 * lex.c (init_reswords): Delete now-untrue comment.
6191 Allocate ridpointers using GGC.
6192
6193 2002-10-04 Geoffrey Keating <geoffk@apple.com>
6194
6195 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6196
6197 * g++spec.c (lang_specific_driver): Don't include standard
6198 libraries in `added'.
6199
6200 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
6201
6202 * decl2.c (finish_file): Call c_common_write_pch.
6203 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6204
6205 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
6206
6207 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6208 files when using g++.
6209 * lang-specs.h: Handle compiling C++ header files.
6210
6211 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6212
6213 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6214
6215 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6216
6217 * pt.c (push_access_scope_real): Call push_to_top_level for
6218 function in namespace scope.
6219 (pop_access_scope): Call pop_from_top_level for function in
6220 namespace scope.
6221
6222 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6223
6224 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6225
6226 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6227
6228 * Make-lang.in (c++.install-common, c++.install-man,
6229 c++.uninstall): Prepend $(DESTDIR) to destination paths in
6230 all (un)installation commands.
6231 (c++.install-common): Rewrite $(LN) commands to support
6232 DESTDIR with "ln" as well as with "ln -s".
6233
6234 2003-01-08 Jason Merrill <jason@redhat.com>
6235
6236 * parser.c (cp_parser_primary_expression): See through explicitly
6237 scoped ALIAS_DECLs, too.
6238
6239 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6240
6241 * decl.c: Remove some #if 0 code.
6242
6243 * decl.c: ANSIfy function declarations.
6244
6245 2003-01-07 Mark Mitchell <mark@codesourcery.com>
6246
6247 * parser.c (cp_parser_asm_definition): Correct handling of omitted
6248 operands.
6249
6250 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6251
6252 PR c++/9030
6253 * decl.c (make_typename_type): Check access only when tf_error.
6254 (make_unbound_class_template): Likewise.
6255 * pt.c (saved_access_scope): New variable.
6256 (push_access_scope_real): New function.
6257 (push_access_scope): Likewise.
6258 (pop_access_scope): Likewise.
6259 (tsubst_default_argument): Use them.
6260 (instantiate_template): Likewise.
6261 (regenerate_decl_from_template): Likewise.
6262 (instantiate_decl): Likewise.
6263 (get_mostly_instantiated_function_type): Likewise.
6264
6265 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
6266
6267 * tree.c: Delete bogus #if 0 code.
6268
6269 2003-01-07 Andreas Schwab <schwab@suse.de>
6270
6271 * class.c (layout_class_type): Don't use
6272 PCC_BITFIELD_TYPE_MATTERS if not defined.
6273
6274 2003-01-06 Mark Mitchell <mark@codesourcery.com>
6275
6276 PR c++/9165
6277 * decl2.c (build_cleanup): Mark the object as used.
6278
6279 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6280 (hash_local_specialization): New function.
6281 (register_local_specialization): Revert 2003-01-05 change.
6282 (instantiate_decl): Use hash_local_specialization when creating
6283 the local_specializations table.
6284
6285 * decl2.c (mark_used): Do not synthesize thunks.
6286
6287 * class.c (layout_class_type): Correct handling of unnamed
6288 bitfields wider than their types.
6289
6290 PR c++/9189
6291 * parser.c (cp_parser): Remove default_arg_types. Update
6292 documentation for unparsed_functions_queues.
6293 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6294 parameter.
6295 (cp_parser_new): Don't set parser->default_arg_types.
6296 (cp_parser_function_definition): Adjust usage of
6297 unparsed_funtions_queues.
6298 (cp_parser_class_specifier): Don't mess with
6299 parser->default_arg_types. Handle default argument processing in
6300 a separate phase from function body processing.
6301 (cp_parser_template_declaration_after_export): Adjust usage of
6302 unparsed_functions_queues.
6303 (cp_parser_late_parsing_for_member): Do not handle default
6304 arguments.
6305
6306 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
6307
6308 PR c++/9109
6309 * parser.c (cp_parser_declarator_kind): New enum.
6310 (cp_parser_declarator): Adjust.
6311 (cp_parser_direct_declarator): Adjust. Allow for either named or
6312 abstract declarator. Prefer abstract, if possible. Allow
6313 parenthesized function name.
6314 (cp_parser_condition): Adjust cp_parser_declarator call.
6315 (cp_parser_explicit_instantiation): Likewise.
6316 (cp_parser_init_declarator): Likewise.
6317 (cp_parser_type_id): Likewise.
6318 (cp_parser_function_definition): Likewise.
6319 (cp_parser_member_declaration): Likewise.
6320 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6321 the tentative parsing.
6322 (cp_parser_exception_declaration): Likewise.
6323
6324 2003-01-05 Mark Mitchell <mark@codesourcery.com>
6325
6326 * parser.c (cp_parser_template_parameter): Adjust call to
6327 cp_parser_parameter_declaration.
6328 (cp_parser_parameter_declaration_list): Likewise.
6329 (cp_parser_parameter_declaration): Replace
6330 greater_than_is_operator_p with template_parm_p parameter. Do not
6331 cache tokens for template default arguments.
6332
6333 * pt.c (retrieve_local_specialization): Use htab_find, not
6334 htab_find_with_hash.
6335 (register_local_specialization): Use htab_find_slot, not
6336 htab_find_slot_with_hash.
6337 (instantiate_decl): Pass a hash function to htab_create.
6338
6339 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6340
6341 * parser.c (cp_parser_binary_expression,
6342 cp_parser_multiplicative_expression,
6343 cp_parser_additive_expression, cp_parser_shift_expression,
6344 cp_parser_relational_expression, cp_parser_equality_expression,
6345 cp_parser_and_expression, cp_parser_exclusive_or_expression,
6346 cp_parser_inclusive_or_expression,
6347 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6348 cp_parser_binary_expression): Const-ify.
6349
6350 2003-01-04 Mark Mitchell <mark@codesourcery.com>
6351
6352 * method.c (use_thunk): Disable access control while building the
6353 body of the thunk.
6354
6355 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
6356
6357 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6358 front end.
6359
6360 2003-01-03 Matt Austern <austern@apple.com>
6361
6362 * cp-tree.h (struct lang_type_class): add field for key method
6363 (cp_global_trees): rename dynamic_classes to keyed_classes
6364 (key_method): add definition
6365 * class.c (finish_struct_1): compute class's key method, and add
6366 the class to keyed_classes list if there is no key method.
6367 * decl.c (finish_function): add class to keyed_classes list if we
6368 see a definition of the class's key method.
6369 * pt.c (instantiate_class_template): add template specialization
6370 of a dynamic class to keyed_classes list.
6371 * decl2.c (key_method): remove
6372 (finish_file): iterate only through keyed_classes list when
6373 deciding whether to emit vtables, remove class from its list after
6374 we do the emission.
6375
6376 2003-01-02 Jason Merrill <jason@redhat.com>
6377
6378 * call.c (build_conditional_expr): Stabilize lvalues properly.
6379 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6380 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6381 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6382
6383 * call.c (convert_like_real): Call decl_constant_value for an
6384 IDENTITY_CONV even if there are no more conversions.
6385
6386 * cvt.c (build_up_reference): Don't push unnamed temps.
6387
6388 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6389
6390 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6391 for a backend struct.
6392
6393 * except.c (wrap_cleanups_r, build_throw): Make
6394 MUST_NOT_THROW_EXPRs void.
6395 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6396
6397 * init.c (build_vec_delete_1): Pre-evaluate the base address.
6398
6399 * init.c (get_temp_regvar): Simplify logic.
6400
6401 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6402 our replacement is a decl.
6403
6404 * decl.c (cp_make_fname_decl): Push the decls inside the
6405 outermost scope.
6406
6407 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
6408
6409 PR c++/45, c++/3784
6410 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6411 the same too.
6412
6413 2003-01-03 Graham Stott <graham.stott@btinternet.com>
6414
6415 * parser.c (struct cp_parser): Add access_checks_lists field
6416 (cp_parser_simple_declaration): Use.
6417 (cp_parser_init_declarator): Likewise.
6418
6419 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6420
6421 * parser.c (cp_parser_declaration): Accept the __extension__
6422 keyword before the declaration.
6423
6424 PR c++/2843
6425 * parser.c (cp_parser_parameter_declaration): Allow attributes to
6426 appear after the declarator.
6427
6428 * call.c (build_new_method_call): Fix typo in message format
6429 string.
6430
6431 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6432
6433 * parser.c (cp_lexer_next_token_is): Declare it inline.
6434 (cp_lexer_set_source_position_from_token): Likewise.
6435 (cp_lexer_debugging_p): Likewise.
6436 (cp_parser_parsing_tentatively): Likewise.
6437 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6438 to the cp_lexer_peek_token.
6439
6440 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6441 expression.
6442
6443 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6444
6445 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6446 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6447 cp/repo.c: Fix copyright years.
6448
6449 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
6450
6451 * lex.c: Remove superfluous include of cpplib.h.
6452 (CONSTRAINT): Define without conditions.
6453 (init_cp_pragma): Use c_register_pragma.
6454
6455 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6456
6457 * .cvsignore: Remove.
6458
6459 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
6460
6461 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6462 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6463 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6464 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6465 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6466 copyright header.
6467 * lex.h: parse.y is dead, so don't mention it. Also replace the
6468 copyright header with the default GNU copyright header.
6469
6470 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6471
6472 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6473 (lookup_name_namespace_only): Likewise.
6474 (begin_only_namespace_names): Likewise.
6475 (end_only_namespace_names): Likewise.
6476 * decl.c (only_namespace_names): Remove.
6477 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6478 (lookup_name_real): Do not check only_namespace_names.
6479 (lookup_name_namespace_only): Remove.
6480 (begin_only_namespace_names): Likewise.
6481 (end_only_namespace_names): Likewise.
6482 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6483 nested-name-specifiers more gracefully.
6484 (cp_parser_class_or_namespace_name): Avoid looking up namespace
6485 names when they cannot possibly appear.
6486 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6487 (cp_parser_elaborated_type_specifier): Likewise.
6488 (cp_parser_namespace_name): Only look for namespace names.
6489 (cp_parser_lookup_name): Add is_namespace parameter.
6490 (cp_parser_lookup_name_simple): Adjust call to
6491 cp_parser_lookup_name.
6492
6493 * parser.c (cp_parser_dependent_type_p): Fix thinko.
6494
6495 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6496
6497 * .cvsignore: Update.
6498
6499 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
6500
6501 * class.c (modify_vtable_entry): Remove unused variable.
6502 (get_vcall_index): Always expect a non-thunk.
6503 (update_vtable_entry_for_fn): Combine covariant adjustments, when
6504 overriding a thunk. Pass get_vcall_index a non-thunk.
6505
6506 * decl2.c (finish_file): Mark undefined inlines as extern.
6507
6508 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6509
6510 * cp-tree.def (RETURN_INIT): Remove.
6511 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6512 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6513 (note_level_for_for): Remove.
6514 (note_level_for_try): Likewise.
6515 (note_level_for_catch): Likewise.
6516 (finish_named_return_value): Likewise.
6517 (do_pushlevel): Change prototype.
6518 (pending_lang_change): Remove.
6519 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6520 sk_for.
6521 (note_level_for_for): Remove.
6522 (note_level_for_try): Likewise.
6523 (note_level_for_catch): Likewise.
6524 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6525 * parser.c (cp_parser_context_free_list): Make it "deletable".
6526 (cp_parser_template_argument): Remove misleading comment.
6527 * pt.c (tsubst_expr): Remove RETURN_INIT code.
6528 * semantics.c (genrtl_named_return_value): Remove.
6529 (do_pushlevel): Take a scope kind as an argument.
6530 (begin_if_stmt): Adjust.
6531 (begin_while_stmt): Likewise.
6532 (begin_for_stmt): Likewise.
6533 (finish_for_init_stmt): Likewise.
6534 (begin_switch_stmt): Likewise.
6535 (begin_handler): Likewise.
6536 (begin_compound_stmt): Likewise.
6537 (finish_named_return_value): Remove.
6538 (cp_expand_stmt): Remove RETURN_INIT case.
6539 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6540
6541 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6542
6543 PR c++/9112
6544 * parser.c (cp_parser_direct_declarator): Handle erroneous
6545 parenthesized declarators correctly.
6546
6547 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6548
6549 * cp-tree.h (pending_lang_change): Declare.
6550
6551 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6552
6553 * parser.c (cp_parser_context_free_list): New variable.
6554 (cp_parser_context_new): Use it.
6555 (cp_parser_error): Check return code from
6556 cp_parser_simulate_error.
6557 (cp_parser_simulate_error): Return a value.
6558 (cp_parser_id_expression): Optimize common case.
6559 (cp_parser_class_name): Likewise.
6560 (cp_parser_class_specifier): Adjust call to
6561 cp_parser_late_parsing_default_args.
6562 (cp_parser_lookup_name): Optimize common case.
6563 (cp_parser_late_parsing_for_member): Adjust call to
6564 cp_parser_late_parsing_default_args.
6565 (cp_parser_late_parsing_default_args): Add scope parameter.
6566 (cp_parser_require): Avoid creating the error message unless it's
6567 needed.
6568 (cp_parser_parse_definitely): Place free'd contexts on the free
6569 list.
6570
6571 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6572
6573 2002-12-30 David Edelsohn <edelsohn@gnu.org>
6574
6575 * parser.c (cp_parser_parameter_declaration_clause): Treat system
6576 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6577
6578 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6579
6580 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6581 GCC, not GNU CC.
6582
6583 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6584
6585 * parse.y: Remove.
6586 * spew.c: Likewise.
6587 * Make-lang.in (gt-cp-spew.h): Remove.
6588 * cp-tree.h (do_pending_lang_change): Remove.
6589 (do_identifier): Change prototype.
6590 (finish_id_expr): Remove.
6591 * decl.c (lookup_name_real): Remove yylex variable.
6592 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6593 * lex.c (init_cpp_parse): Remove.
6594 (reduce_cmp): Likewise.
6595 (token_cmp): Likewise.
6596 (yychar): Likewise.
6597 (lastiddecl): Likewise.
6598 (token_count): Likewise.
6599 (reduce_count): Likewise.
6600 (yyhook): Likewise.
6601 (print_parse_statistics): Likewise.
6602 (do_pending_lang_change): Likewise.
6603 (do_identifier): Remove parsing parameter.
6604 * lex.h (lastiddecl): Remove.
6605 (looking_for_typename): Remove.
6606 (looking_for_template): Likewise.
6607 (pending_lang_change): Likewise.
6608 (yylex): Likewise.
6609 * semantics.c (finish_id_expr): Remove.
6610
6611 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6612 thread" correctly.
6613
6614 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6615
6616 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
6617 end, not the C front end.
6618
6619 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
6620
6621 * cp-tree.h (THUNK_TARGET): New macro.
6622 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6623 (finish_thunk): Remove offset parms.
6624 * class.c (find_final_overrider): Look through thunks.
6625 (get_vcall_index): Use THUNK_TARGET.
6626 (update_vtable_entry_for_fn): Look through thunks. Set covariant
6627 fixed offset here. Adjust finish_thunk call.
6628 (build_vtbl_initializer): Adjust finish_thunk calls.
6629 * mangle.c (mangle_call_offset): Remove superfluous if.
6630 (mangle_thunk): Adjust.
6631 * method.c (make_thunk): Adjust.
6632 (finish_thunk): Adjust.
6633 (thunk_adjust): Remove assert.
6634 (use_thunk): Use THUNK_TARGET
6635 * dump1.c (cp_dump_tree): Adjust thunk dumping.
6636
6637 PR c++/9054
6638 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6639 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6640
6641 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6642
6643 Remove traditional C constructs 4/n.
6644 * decl2.c (grok_method_quals, warn_if_unknown_interface,
6645 grok_x_components, cp_build_parm_decl, build_artificial_parm,
6646 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6647 delete_sanity, check_member_template, check_java_method,
6648 check_classfn, finish_static_data_member_decl, grokfield,
6649 grokbitfield, grokoptypename, grok_function_init,
6650 cplus_decl_attributes, constructor_name, defer_fn,
6651 build_anon_union_vars, finish_anon_union, coerce_new_type,
6652 coerce_delete_type, comdat_linkage, maybe_make_one_only,
6653 key_method, import_export_vtable, import_export_class,
6654 output_vtable_inherit, import_export_decl, import_export_tinfo,
6655 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6656 set_guard, start_objects, finish_objects,
6657 start_static_storage_duration_function,
6658 finish_static_storage_duration_function, get_priority_info,
6659 start_static_initialization_or_destruction,
6660 finish_static_initialization_or_destruction,
6661 do_static_initialization, do_static_destruction,
6662 prune_vars_needing_no_initialization, write_out_vars,
6663 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6664 add_using_namespace, merge_functions, ambiguous_decl,
6665 lookup_using_namespace, lookup_using_namespace,
6666 qualified_lookup_using_namespace, set_decl_namespace,
6667 decl_namespace, current_decl_namespace, push_decl_namespace,
6668 pop_decl_namespace, push_scope, pop_scope, add_function,
6669 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6670 lookup_arg_dependent, do_namespace_alias,
6671 validate_nonmember_using_decl, do_nonmember_using_decl,
6672 do_toplevel_using_decl, do_local_using_decl,
6673 do_class_using_decl, do_using_directive, check_default_args,
6674 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
6675 * parser.c (cp_parser_class_head): Use booleanss.
6676 * decl.c (walk_globals, walk_vtables): Likewise.
6677 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6678 walk_globals): Change return type from 'int' to 'bool'.
6679 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6680 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6681 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6682 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6683 qualifier_flags, tinfo_base_init, generic_initializer,
6684 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6685 dfs_class_hint_unmark, class_hint_flags, class_initializer,
6686 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6687 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6688 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6689 * repo.c (repo_compile_flags, repo_template_declared,
6690 repo_template_defined, repo_class_defined, repo_get_id,
6691 repo_template_used, repo_vtable_used, repo_inline_used,
6692 repo_tinfo_used, repo_template_instantiated, extract_string,
6693 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6694 finish_repo): Likewise.
6695 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6696 cxx_print_xnode): Likewise..
6697 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6698 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6699 * cxxfilt.c (demangle_it, print_demangler_list, usage,
6700 standard_symbol_characters, hp_symbol_characters, main, fatal):
6701 Likewise.
6702 (strip_underscore): Change type from 'int' to 'bool'.
6703 (main): Use boolean constants.
6704
6705 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6706
6707 Remove traditional C constructs 3/n.
6708 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6709 build_up_reference, warn_ref_binding, convert_to_reference,
6710 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6711 convert_to_void, convert, convert_force, build_type_conversion,
6712 build_expr_type_conversion, type_promotes_to,
6713 perform_qualification_conversions): Use C90 prototyping style.
6714 * decl2.c (grok_array_decl): Use boolean constant.
6715 (delete_sanity): Likewise.
6716 * typeck.c (build_unary_op): Likewise.
6717 * semantics.c (finish_switch_cond): Likewise.
6718 * parser.c (cp_parser_direct_new_declarator): Likewise.
6719 * init.c (build_new): Likewise.
6720
6721 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6722
6723 * Make-lang.in (po-generated): Remove parse.c.
6724 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
6725 ($(srcdir)/cp/parse.h): Remove target.
6726 ($(srcdir)/cp/parse.c): Likewise.
6727 (gt-cp-parse.h): Likewise.
6728 (gt-cp-parser.h): New target.
6729 (c++.distclean): Do not remove parse.output.
6730 (c++.maintainer-clean): Do not remove parse.c or parse.h.
6731 (cp/spew.o): Remove target.
6732 (cp/lex.o): Adjust dependencies.
6733 (cp/pt.o): Likewise.
6734 (cp/parse.o): Likewise.
6735 (cp/TAGS): Do not mention parse.c.
6736 (cp/parser.o): New target.
6737 * NEWS: Mention the new parser.
6738 * call.c (build_scoped_method_call): Simplify.
6739 (build_method_call): Likewise.
6740 (build_new_function_call): Adjust calls to add_function_candidate
6741 and add_template_candidate.
6742 (build_new_op): Improve handling of erroroneous operands.
6743 (convert_default_arg): Remove circular argument processing.
6744 (name_as_c_string): New function.
6745 (build_new_method_call): Use it.
6746 (perform_implicit_conversion): Use error_operand_p.
6747 * class.c (finish_struct_anon): Use constructor_name_p.
6748 (check_field_decls): Likewise.
6749 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6750 (resolve_address_of_overloaded_function): Likewise.
6751 (instantiate_type): Tweak pointer-to-member handling.
6752 (get_primary_binfo): Remove incorrect assertion.
6753 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6754 * cp-tree.h (DEFARG_TOKENS): New macro.
6755 (default_arg): New structure.
6756 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6757 (lang_tree_node): Add default_arg.
6758 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6759 (type_info_ref_type): New macro.
6760 (saved_scope): Make processing_explicit_instantiation a boolean.
6761 (check_access): New field.
6762 (unparsed_text): Remove.
6763 (language_function): Remove unparsed_inlines.
6764 (error_operand_p): New macro.
6765 (lang_decl): Adjust pending_inline_info.
6766 (DEFARG_POINTER): Remove.
6767 (tag_types): Add typenames.
6768 (lookup_ualified_name): Declare.
6769 (lookup_name_real): Likewise.
6770 (shadow_tag): Adjust prototype.
6771 (get_scope_of_declarator): Declare it.
6772 (process_next_inline): Remove it.
6773 (check_for_missing_semicolon): Likewise.
6774 (maybe_get_template_decl_from_type_decl): Declare it.
6775 (finish_label_stmt): Adjust prototype.
6776 (finish_non_static_data_meber): Declare it.
6777 (finish_pseudo_destructor_call_expr): Rename to ...
6778 (finish_pseudo_destructor_expr): ... this.
6779 (finish_compound_literal): Declare it.
6780 (begin_inline_definitions): Remove it.
6781 (init_spew): Remove.
6782 (peekyylex): Likewise.
6783 (arbitrate_lookup): Likewise.
6784 (frob_opname): Likewise.
6785 (maybe_snarf_defarg): Likewise.
6786 (add_defarg_fn): Likewise.
6787 (do_pending_defargs): Likewise.
6788 (done_pending_defargs): Likewise.
6789 (unprocessed_defarg_fn): Likewise.
6790 (replace_defarg): Likewise.
6791 (end_input): Likewise.
6792 (get_overloaded_fn): Likewise.
6793 * cvt.c (convert_to_reference): Improve error handling.
6794 * decl.c (lookup_name_real): Do not declare it static.
6795 (maybe_push_to_top_level): Set check_access.
6796 (identifier_type_value): Adjust call to lookup_name_real.
6797 (lookup_qualified_name): New method.
6798 (lookup_name_real): Remove special-case parsing code.
6799 (lookup_name-nonclass): Adjust call to lookup_name_real.
6800 (lookup_name_namespace_only): Likewise.
6801 (lookup_name): Likewise.
6802 (check_tag_decl): Return the type declared.
6803 (shadow_tag): Likewise.
6804 (register_dtor_fn): Tweak check_access.
6805 (grokfndecl): Use constructor_name_p.
6806 (get_scope_of_declarator): New function.
6807 (grokdeclarator): Obscure tweaks for slightly different declarator
6808 representations.
6809 (start_method): Return error_mark_node to indicate failure.
6810 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6811 * decl2.c (constructor_name_full): Simplify.
6812 (constructor_name): Use it.
6813 (build_expr_from_tree): Adjust for changes to do new parser.
6814 (push_scope): Improve robustness.
6815 (validate_nonmember_using_decl): Process declarations, not names.
6816 (do_class_using_decl): Likewise.
6817 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6818 here.
6819 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6820 * expr.c (cxx_expand_expr): Handle BASELINKs.
6821 * init.c (member_init_ok_or_else): Issue more errors.
6822 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6823 * lex.c: Do not include parse.h.
6824 (yypring): Do not declare.
6825 (yylval): Likewise.
6826 (make_reference_declarator): Remove error-generating code.
6827 (rid_to_yy): Remove.
6828 (cxx_init): Do not call init_spew.
6829 (yypring): Remove.
6830 (check_for_missing_semicolon): Remove.
6831 * lex.h (got_scope): Remove.
6832 (got_object): Remove.
6833 * method.c (hack_identifier): Use finish_non_static_data_member.
6834 (implicitly_declare_fn): Adjust use of constructor_name.
6835 * parser.c: New file.
6836 * pt.c (parse.h): Do not include it.
6837 (maybe_get_template_decl_from_template): Do not declare it.
6838 (finish_member_template_decl): Tweak.
6839 (begin_explicit_instantiation): Adjust for
6840 processing_explicit_instantiation being boolean.
6841 (end_explicit_instantiation): Likewise.
6842 (maybe_process_partial_specialization): Tighten specialization
6843 test.
6844 (retrieve_local_specialization): Adjust ue of hash table.
6845 (eq_local_specializations): New function.
6846 (register_local_specialization): Likewise.
6847 (push_template_decl_real): Remove unnecessary test.
6848 (maybe_get_template_decl_from_type_decl): Don't make it static.
6849 (for_each_template_parm_r): Handle TYPEOF_TYPE.
6850 (tsubst_copy): Use retrieive_local_specialization to handle
6851 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
6852 Handle COMPONENT_REFs with pseudo-destructor-expressions.
6853 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6854 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6855 (unify): Tweak handling of CONST_DECLs.
6856 (regenerate_decl_from_template): Use push_nested_class.
6857 (template_for_substitution): New funciton.
6858 (instantiate_decl): Use it. Register parameters as local
6859 specializations.
6860 * rtti.c (init_rtti_processing): Set type_info_ref_type.
6861 (build_typeid): Use it.
6862 (get_typeid): Likeise.
6863 * search.c (accessible_p): Use check_access, not
6864 flag_access_control.
6865 (adjust_result_of_qualified_name_lookup): Pay attention to the
6866 context_class.
6867 * semantics.c (finish_asm_stmt): Adjust error handling.
6868 (finish_label_stmt): Return the statement.
6869 (finish_non_static_data_member): New function.
6870 (finish_class_expr): Handle BASELINKs.
6871 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6872 (finish_object_call_expr): Simplify handling during templates.
6873 (finish_pseudo_destructor_call_expr): Rename to ...
6874 (finish_pseudo_dtor_expr): ... this.
6875 (finish_compound_literal): New function.
6876 (begin_inline_definitions): Remove.
6877 (finish_sizeof): Remove special template handling.
6878 * spew.c: Do not include parse.h.
6879 * tree.c (get_overloaded_fn): Remove.
6880 * typeck.c (build_class_member_access_expr): Handle
6881 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
6882 (lookup_destructor): New function.
6883 (finish_class_member_access_expr): Use it.
6884 (convert_arguments): Simplify.
6885 (build_unary_op): Handle BASELINKs.
6886
6887 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
6888
6889 PR c++/4803
6890 * decl2.c (mark_used): Defer inline functions.
6891 (finish_file): Merge deferred_fns loops. Check all used
6892 inline functions have a definition.
6893 * method.c (make_thunk): Thunks are not inline.
6894
6895 PR c++/5116, c++/764
6896 * call.c (build_new_op): Make sure template class operands are
6897 instantiated.
6898
6899 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
6900
6901 PR C++/7964
6902 * cp-tree.h (resolve_scoped_fn_name): Prototype.
6903 * call.c (resolve_scoped_fn_name): New function. Deal with
6904 more template expansion. Broken out of ...
6905 * parse.y (parse_finish_call_expr): ... here. Call it.
6906 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6907 resolve_scoped_fn_name and build_call_from_tree.
6908
6909 PR c++/9053
6910 * decl.c (duplicate_decls): Templates may be disambiguated by
6911 return type.
6912
6913 PR c++/8702
6914 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6915 conversion operators on failure.
6916
6917 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6918
6919 Remove traditional C constructs 2/n.
6920 * call.c (tourney, build_field_call, equal_functions, joust,
6921 compare_ics, build_over_call, build_java_interface_fn_ref,
6922 convert_like_real, op_error, build_object_call, resolve_args,
6923 build_vfield_ref, check_dtor_name, build_scoped_method_call,
6924 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6925 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6926 standard_conversion, reference_related_p,
6927 reference_compatible_p, convert_class_to_reference,
6928 direct_reference_binding, reference_binding,
6929 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6930 add_template_conv_candidate, any_viable, any_strictly_viable,
6931 build_this, splice_viable, print_z_candidates,
6932 build_user_type_conversion, build_new_function_call,
6933 conditional_conversion, build_conditional_expr, build_new_op,
6934 build_op_delete_call, enforce_access, call_builtin_trap,
6935 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6936 convert_default_arg, type_passed_as, convert_for_arg_passing,
6937 in_charge_arg_for_name, is_properly_derived_from,
6938 maybe_handle_implicit_object, maybe_handle_ref_bind,
6939 source_type, add_warning, can_convert, can_convert_arg,
6940 perform_implicit_conversion, can_convert_arg_bad,
6941 initialize_reference, add_conv_candidate,
6942 add_template_candidate_real, add_template_candidate): Ansify.
6943
6944 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
6945
6946 PR c++/8572
6947 * cp-tree.h (grokoptypename): Add SCOPE parameter.
6948 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6949 if in a template scope.
6950 * parse.y (unoperator): Return the scope.
6951 (operator_name): Adjust grokoptypename call.
6952
6953 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6954
6955 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6956 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
6957 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6958
6959 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
6960
6961 * ChangeLog: Fix a typo.
6962 * class.c: Fix comment typos.
6963 * cp-tree.h: Likewise.
6964
6965 2002-12-18 Jason Merrill <jason@redhat.com>
6966
6967 Handle anonymous unions at the tree level.
6968 C++ ABI change: Mangle anonymous unions using the name of their
6969 first named field (by depth-first search). Should not cause
6970 binary compatibility problems, though, as the compiler previously
6971 didn't emit anything for affected unions.
6972 * cp-tree.def (ALIAS_DECL): New tree code.
6973 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
6974 first field, not the largest.
6975 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
6976 push the decl, and write it out at namespace scope.
6977 * decl.c (lookup_name_real): See through an ALIAS_DECL.
6978 (pushdecl): Add namespace bindings for ALIAS_DECLs.
6979 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6980 of a decl which doesn't have one.
6981 * typeck.c (build_class_member_access_expr): Don't recurse if
6982 we already have the type we want.
6983
6984 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6985
6986 PR c++/8099
6987 * friend.c (make_friend_class): Allow partial specialization
6988 when declaration is not a template friend.
6989
6990 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6991
6992 PR c++/3663
6993 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6994 TREE_PROTECTED to created decl nodes.
6995
6996 2002-12-18 Mark Mitchell <mark@codesourcery.com>
6997
6998 * class.c (build_base_field): Do not set DECL_PACKED on the
6999 FIELD_DECL.
7000
7001 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
7002
7003 * cp-tree.h (struct tree_srcloc): Use location_t.
7004 (SOURCE_LOCUS): New.
7005 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
7006
7007 2002-12-17 Jason Merrill <jason@redhat.com>
7008
7009 * decl.c (finish_function): Also complain about no return in
7010 templates.
7011 * semantics.c (finish_return_stmt): Also call check_return_expr in
7012 templates.
7013 * typeck.c (check_return_expr): In a template, just remember that we
7014 saw a return.
7015
7016 2002-12-16 Jason Merrill <jason@redhat.com>
7017
7018 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
7019 of the CALL_EXPR.
7020
7021 * semantics.c (do_pushlevel): Call pushlevel after adding the
7022 SCOPE_STMT.
7023 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
7024 * parse.y (function_body): Go back to using compstmt.
7025 * decl.c (pushdecl): Skip another level to get to the parms level.
7026
7027 * call.c (build_new_method_call): Use is_dummy_object to determine
7028 whether or not to evaluate the object parameter to a static member
7029 function.
7030
7031 2002-12-14 Jason Merrill <jason@redhat.com>
7032
7033 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
7034 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
7035 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
7036 don't bother with an AGGR_INIT_EXPR.
7037 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
7038 just generate a new decl normally. Take return slot parm.
7039 * cp-tree.h: Adjust prototype.
7040
7041 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
7042
7043 PR C++/8031
7044 * cvt.c (convert_to_pointer_force): Don't try comparing against
7045 erronous type.
7046
7047 2002-12-13 Geoffrey Keating <geoffk@apple.com>
7048
7049 * cp-tree.h: Have the multiple-include guards around
7050 the entire file.
7051
7052 2002-12-10 David Edelsohn <edelsohn@gnu.org>
7053
7054 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
7055 for SPEW_DEBUG.
7056 (snarf_method): Same.
7057 (snarf_defarg): Same.
7058
7059 2002-12-10 Mark Mitchell <mark@codesourcery.com>
7060
7061 PR c++/8372
7062 * pt.c (tsubst_copy): Handle destructor names more correctly.
7063
7064 2002-12-10 Matt Austern <austern@apple.com>
7065
7066 * cp-tree.h: get rid of needs_virtual_reinit bit.
7067
7068 2002-12-09 Mark Mitchell <mark@codesourcery.com>
7069
7070 * NEWS: Document removal of in-class initialization extension for
7071 static data members of non-arithmetic, non-enumeration type.
7072 * decl.c (check_static_variable_definition): Do not allow that
7073 extension.
7074 * decl2.c (grokfield): Do not call digest_init when processing
7075 templates.
7076
7077 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7078
7079 * error.c (dump_expr): Fix format specifier warning.
7080
7081 2002-12-04 Geoffrey Keating <geoffk@apple.com>
7082
7083 * class.c (finish_struct_1): Correct comment.
7084 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
7085
7086 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7087
7088 PR C++/8799
7089 * error.c (dump_expr): Don't ever try to dump a non-existent
7090 expression.
7091
7092 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
7093
7094 Implement covariant returns.
7095 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
7096 (struct lang_decl_flags): Add this_thunk_p flag.
7097 Rename vcall_offset to virtual_offset.
7098 (struct lang_decl): Rename delta to fixed_offset.
7099 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
7100 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
7101 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
7102 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
7103 (make_thunk): Add this_adjusting arg.
7104 (finish_thunk): Declare.
7105 (mangle_thunk): Add this_adjusting arg.
7106 * class.c (get_vcall_index): Use base function for lookup.
7107 (update_vtable_entry_for_fn): Generate covariant thunk.
7108 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
7109 (build_vtbl_initializer): Use base function for lookup.
7110 Finish covariant thunk here. Adjust thunk generation.
7111 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
7112 Adjust thunk dumping.
7113 * mangle.c (mangle_call_offset): New function.
7114 (mangle_thunk): Adjust for covariant thunks.
7115 * method.c (make_thunk): Adjust. Do not set name here.
7116 (finish_thunk): New function. Set name here.
7117 (use_thunk): Generate covariant thunks too.
7118 (thunk_adjust): New function.
7119 * search.c (covariant_return_p): Remove. Fold into ...
7120 (check_final_overrider): ... here. Simplify.
7121 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7122
7123 2002-12-03 Jason Merrill <jason@redhat.com>
7124
7125 PR c++/8674
7126 * call.c (build_over_call): Check specifically for TARGET_EXPR
7127 when eliding.
7128
7129 PR c++/8461, c++/8625
7130 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7131 (cp_convert_parm_for_inlining): Remove.
7132 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7133 Remove.
7134 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7135 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7136
7137 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7138 an ambiguous conversion.
7139
7140 2002-12-03 Mark Mitchell <mark@codesourcery.com>
7141
7142 PR c++/8688
7143 * decl.c (reshape_init): Handle erroneous initializers.
7144
7145 2002-12-02 Mark Mitchell <mark@codesourcery.com>
7146
7147 PR c++/8720
7148 * spew.c (remove_last_token): Make sure that last_chunk is set
7149 correctly.
7150
7151 PR c++/8615
7152 * error.c (dump_expr): Handle character constants with
7153 TREE_OVERFLOW set.
7154
7155 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7156
7157 DR 180
7158 * decl.c (grokdeclarator): Require class-key for all friend class.
7159 Output the correct type and context in the error message.
7160
7161 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7162
7163 PR c++/5919
7164 * pt.c (unify): Use variably_modified_type_p to test validity of
7165 template argument types.
7166
7167 PR c++/8727
7168 * cp-tree.h (lang_type_class): Add typeinfo_var.
7169 (CLASSTYPE_TYPEINFO_VAR): New macro.
7170 * rtti.c (get_tinfo_decl): Use it.
7171
7172 PR c++/8663
7173 * init.c (expand_member_init): Always get the main variant of a
7174 base class.
7175
7176 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7177
7178 PR c++/8332
7179 PR c++/8493
7180 * decl.c (cxx_init_decl_processing): Use size_type_node, not
7181 c_size_type_node.
7182 * decl2.c (coerce_new_type): Likewise.
7183 * except.c (do_allocate_exception): Likewise.
7184
7185 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7186
7187 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7188 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7189 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7190 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7191 typeck2.c: Include coretypes.h and tm.h.
7192 * Make-lang.in: Update dependencies.
7193
7194 2002-11-30 Mark Mitchell <mark@codesourcery.com>
7195
7196 PR c++/8227
7197 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7198 (check_initializer): Validate the type of the initialized
7199 variable, even if the initializer is absent.
7200 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7201
7202 PR c++/8214
7203 * typeck.c (convert_for_assignment): Do not use
7204 decl_constant_value on the operand.
7205
7206 PR c++/8511
7207 * pt.c (instantiate_decl): Handle template friends defined outside
7208 of the class correctly.
7209
7210 2002-11-29 Joe Buck <jbuck@synopsys.com>
7211
7212 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7213 anonymous structs.
7214
7215 2002-11-29 Mark Mitchell <mark@codesourcery.com>
7216
7217 * class.c (walk_subobject_offsets): Recur on binfos as well as on
7218 types.
7219 (layout_nonempty_base_or_field): Pass it a binfo when processing a
7220 base class.
7221 (layout_empty_base): Likewise.
7222 (build_base_field): Likewise.
7223
7224 2002-11-27 Mark Mitchell <mark@codesourcery.com>
7225
7226 * class.c (build_base_field): Make sure we get the canonical base
7227 when descending through primary bases.
7228
7229 2002-11-26 Geoffrey Keating <geoffk@apple.com>
7230
7231 * decl.c (check_initializer): Don't error on initialisation of
7232 a scalar with a brace-enclosed expression.
7233
7234 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
7235
7236 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7237 (template_parms_equal): Remove prototype.
7238 * typeck.c (buuld_indirect_ref): Reformat.
7239
7240 2002-11-25 Jason Merrill <jason@redhat.com>
7241
7242 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7243 and a DO_STMT.
7244
7245 2002-11-25 Mark Mitchell <mark@codesourcery.com>
7246
7247 * tree.c (cp_build_qualified_type_real): Correct handling of
7248 array types.
7249 * class.c (walk_subobject_offsets): Fix thinko.
7250 (build_base_field): Record offsets of empty bases in primary
7251 virtual bases.
7252 (layout_class_type): Record offsets of empty bases in fields.
7253
7254 * search.c (is_subobject_of_p_1): Fix thinko.
7255 (lookup_field_queue_p): Likewise.
7256
7257 2002-11-24 Mark Mitchell <mark@codesourcery.com>
7258
7259 * class.c (layout_class_type): Reuse tail padding when laying out
7260 virtual bases.
7261
7262 2002-11-22 Mark Mitchell <mark@codesourcery.com>
7263
7264 * rtti.c (qualifier_flags): Fix thinko.
7265
7266 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7267
7268 Remove traditional C constructs 1/n.
7269 * cp-tree.h (init_method, set_mangled_name_for_decl,
7270 build_opfncall, hack_identifier, make_thunk, use_thunk,
7271 synthesize_method, implicitly_declare_fn,
7272 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7273 maybe_clone_body): Remove use of PARAMS.
7274
7275 * method.c (do_build_assign_ref, do_build_copy_constructor,
7276 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7277 Likewise.
7278 (synthesize_method): Use 'bool' type and constants instead of
7279 'int'.
7280 (locate_copy): Likewise.
7281 (implicitly_declare_fn): Likewise.
7282
7283 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7284 Remove old-style declaration.
7285 (maybe_clone_body): Use 'bool' type and constants.
7286
7287 2002-11-21 Glen Nakamura <glen@imodulo.com>
7288
7289 PR c++/8342
7290 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7291 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7292 of the branches of a COND_EXPR.
7293
7294 2002-11-19 Mark Mitchell <mark@codesourcery.com>
7295
7296 * pt.c (for_each_template_parm): Free allocated memory.
7297 * search.c (is_subobject_of_p_1): New function.
7298 (is_subobject_of_p): Avoid walking virtual bases multiple times.
7299
7300 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7301
7302 * g++spec.c (lang_specific_spec_functions): New.
7303
7304 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
7305
7306 * ChangeLog: Follow spelling conventions.
7307 * class.c: Likewise.
7308 * decl2.c: Likewise.
7309
7310 2002-11-14 Zack Weinberg <zack@codesourcery.com>
7311
7312 * search.c (dfs_push_decls): Do not try to reorder elements
7313 3..n of method_vec if method_vec has only two elements.
7314 Reverse order of two tests to avoid accessing unallocated
7315 memory.
7316
7317 2002-11-14 Mark Mitchell <mark@codesourcery.com>
7318
7319 * class.c (dfs_find_final_overrider): Adjust so that the most
7320 derived object is a binfo, rather than a class type.
7321 (find_final_overrider): Likewise.
7322 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7323 (add_vcall_offset): Likewise.
7324
7325 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7326
7327 PR c++/8389
7328 * pt.c (instantiate_template): Push class scope for member
7329 functions.
7330 (get_mostly_instantiated_function_type): Likewise. Don't call
7331 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
7332 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7333 * mangle.c (write_encoding, write_unqualified_name): Adjust.
7334
7335 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7336
7337 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7338 vcall offfsets. Split out ...
7339 (add_vcall_offset): ... new function.
7340
7341 PR c++/8338
7342 * pt.c (for_each_template_parm): Add htab parameter.
7343 (process_partial_specialization): Adjust call.
7344 (push_template_decl_real): Likewise.
7345 (pair_fn_data): Add visited.
7346 (for_each_template_parm_r): Avoid walking duplicates more than
7347 once.
7348 (uses_template_parms): Adjust call to for_each_template_parm.
7349
7350 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7351
7352 * class.c (add_implicitly_declared_members): Put implicitly
7353 declared functions at the end of TYPE_METHODs when -fabi-version
7354 is at least 2.
7355
7356 2002-11-05 Geoffrey Keating <geoffk@apple.com>
7357
7358 * decl2.c (finish_file): Correct spelling.
7359
7360 2002-11-03 Mark Mitchell <mark@codesourcery.com>
7361
7362 * call.c (build_special_member_call): Do not try to lookup VTTs by
7363 name.
7364 * class.c (vtbl_init_data): Add generate_vcall_entries.
7365 (get_vtable_decl): Do not look up virtual tables by name.
7366 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7367 (set_primary_base): Do not set CLASSTYPE_RTTI.
7368 (determine_primary_base): Likewise.
7369 (get_matching_virtual): Remove.
7370 (get_vcall_index): New function.
7371 (update_vtable_entry_for_fn): Do not try to use virtual thunks
7372 when they are not required. Assign vcall indices at this point.
7373 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7374 Do update dynamic_classes.
7375 (build_vtt): Do not add VTTs to the symbol table.
7376 (build_ctor_vtbl_group): Likewise.
7377 (build_vtbl_initializer): Simplify handling of vcall indices.
7378 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7379 for the most derived class.
7380 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7381 the vtable.
7382 * cp-tree.h (dynamic_classes): New macro.
7383 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
7384 (CLASSTYPE_RTTI): Remove.
7385 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7386 (CLASSTYPE_VCALL_INDICES): New macro.
7387 (CLASSTYPE_VTABLES): Likewise.
7388 (BV_USE_VCALL_INDEX_P): Remove.
7389 (build_vtable_path): Remove.
7390 * decl2.c (finish_vtable_vardecl): Remove.
7391 (key_method): Remove #if 0'd code.
7392 (finish_vtable_vardecl): Rename to ...
7393 (maybe_emit_vtables): ... this.
7394 (finish_file): Use it.
7395 * search.c (look_for_overrides_here): Update comment.
7396
7397 2002-11-01 Zack Weinberg <zack@codesourcery.com>
7398
7399 PR c/7353 redux
7400 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7401
7402 2002-10-30 Jason Merrill <jason@redhat.com>
7403
7404 PR c++/8186
7405 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7406 * call.c (convert_for_arg_passing): Set it.
7407 * except.c (stabilize_throw_expr): Recurse for such an arg.
7408
7409 2002-10-31 Mark Mitchell <mark@codesourcery.com>
7410
7411 * cp-tree.h (lang_decl_flags): Remove init_priority.
7412 (lang_decl): Add delta.
7413 (GLOBAL_INIT_PRIORITY): Remove.
7414 (THUNK_DELTA): Revise definition.
7415 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7416 * dump.c (cp_dump_tree): Don't dump it.
7417
7418 2002-10-30 Mark Mitchell <mark@codesourcery.com>
7419
7420 PR c++/8160
7421 * typeck2.c (process_init_constructor): Call complete_array_type.
7422
7423 PR c++/8149
7424 * decl.c (make_typename_type): Issue errors about invalid results.
7425
7426 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7427
7428 Core issue 287, PR c++/7639
7429 * cp-tree.h (lang_type_class): Add decl_list field.
7430 (CLASSTYPE_DECL_LIST): New macro.
7431 (maybe_add_class_template_decl_list): Add declaration.
7432 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7433 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7434 (maybe_add_class_template_decl_list): New function.
7435 (add_implicitly_declared_members): Use it.
7436 * decl.c (maybe_process_template_type_declaration): Likewise.
7437 (pushtag): Likewise.
7438 * friend.c (add_friend): Likewise.
7439 (make_friend_class): Likewise.
7440 * semantics.c (finish_member_declaration): Likewise.
7441 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7442 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7443 to process members and friends in the order of declaration.
7444
7445 2002-10-29 Mark Mitchell <mark@codesourcery.com>
7446
7447 PR c++/8287
7448 * decl.c (finish_destructor_body): Create the label to jump to
7449 when returning from a destructor here.
7450 (finish_function_body): Rather than here.
7451
7452 2002-10-25 Zack Weinberg <zack@codesourcery.com>
7453
7454 PR c++/7266
7455 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7456 SCOPE_REF is not null before dereferencing it.
7457
7458 2002-10-25 Mark Mitchell <mark@codesourcery.com>
7459
7460 * call.c (build_over_call): Use DECL_CONTEXT, not
7461 DECL_VIRTUAL_CONTEXT.
7462 * class.c (modify_vtable_entry): Don't mess with
7463 DECL_VIRTUAL_CONTEXT.
7464 (set_vindex): Remove.
7465 (set_primary_base): Remove vfuns_p parameter.
7466 (determine_primary_base): Likewise.
7467 (modify_all_vtables): Likewise.
7468 (layout_class_type): Likewise. Adjust calls to other functions
7469 accordingly.
7470 (finish_struct_1): Adjust calls to modified functions. Set
7471 DECL_VINDEX here.
7472 * cp-tree.h (lang_type_class): Remove vsize.
7473 (CLASSTYPE_VSIZE): Remove.
7474 (lang_decl): Remove thunks.
7475 (DECL_THUNKS): Adjust.
7476 (DECL_VIRTUAL_CONTEXT): Remove.
7477 (duplicate_decls): Don't copy it.
7478 * pt.c (build_template_decl): Don't set it.
7479 (tsubst_decl): Likewise.
7480 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7481
7482 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7483 (build_vtable_entry): Remove.
7484 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7485 (lang_decl): Add thunks.
7486 (DECL_THUNKS): New macro.
7487 * decl.c (duplicate_decls): Copy it.
7488 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7489 * semantics.c (emit_associated_thunks): Simplify.
7490
7491 2002-10-24 David Edelsohn <edelsohn@gnu.org>
7492
7493 PR c++/7228
7494 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7495 lang_type structure exists before accessing field.
7496 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7497 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7498 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7499 * class.c (check_field_decls): Use new macros.
7500 * typeck2.c (process_init_constructor): Remove redundant check for
7501 existence of lang_type structure.
7502
7503 2002-10-24 Mark Mitchell <mark@codesourcery.com>
7504
7505 * class.c (end_of_base): New method.
7506 (end_of_class): Use it. Check indirect virtual bases.
7507
7508 * class.c (check_field_decls): Fix typo.
7509
7510 2002-10-23 Mark Mitchell <mark@codesourcery.com>
7511
7512 PR c++/8067
7513 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7514 related variables.
7515
7516 PR c++/7679
7517 * spew.c (next_token): Do not return an endless stream of
7518 END_OF_SAVED_INPUT tokens.
7519 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7520 the cached token stream.
7521 (snarf_defarg): Likewise.
7522
7523 2002-10-23 Zack Weinberg <zack@codesourcery.com>
7524
7525 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7526 variably_modified_type_p.
7527 * cp-tree.h: Remove prototype of variably_modified_type_p.
7528 * tree.c (variably_modified_type_p): Remove; now implemented
7529 in language-independent code.
7530
7531 2002-10-22 Mark Mitchell <mark@codesourcery.com>
7532
7533 PR c++/6579
7534 * spew.c (snarf_parenthesized_expression): New function.
7535 (snarf_block): Use it.
7536
7537 2002-10-22 Richard Henderson <rth@redhat.com>
7538
7539 * method.c (use_thunk): Always compute vcall_value; assert that
7540 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
7541 for vcall thunks as well.
7542
7543 2002-10-21 Mark Mitchell <mark@codesourcery.com>
7544
7545 * class.c (empty_base_at_nonzero_offset_p): New function.
7546 (layout_nonempty_base_or_field): Do not check for conflicts when
7547 laying out a virtual base using the GCC 3.2 ABI.
7548 (build_base_field): Correct checking for presence of empty classes
7549 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7550
7551 * class.c (include_empty_classes): Use normalize_rli.
7552 (layout_class_type): Likewise.
7553
7554 * decl.c (reshape_init): Tweak handling of character arrays.
7555
7556 PR c++/8218
7557 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7558 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7559 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7560 (check_field_decls): Likewise.
7561 (layout_class_type): Likewise.
7562 (finish_struct_1): Initialize it.
7563 (walk_subobject_offsets): Use it to prune searches.
7564
7565 2002-10-20 Mark Mitchell <mark@codesourcery.com>
7566
7567 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7568 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7569 TARGET_ASM_OUTPUT_MI_THUNK in comments.
7570
7571 2002-10-18 Zack Weinberg <zack@codesourcery.com>
7572
7573 * decl.c (start_decl): Point users of the old initialized-
7574 typedef extension at __typeof__.
7575
7576 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7577
7578 * Make-lang.in (method.o): Depend on TARGET_H.
7579 * method.c (target.h): Include it.
7580 (use_thunk): Use target hooks. Use vcall thunks, if available.
7581
7582 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7583
7584 * class.c (base_derived_from): Make sure return value is a bool.
7585
7586 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7587
7588 * class.c (find_final_overrider_data_s): Remove overriding_fn and
7589 overriding_base.
7590 (dfs_base_derived_from): New function.
7591 (base_derived_from): Likewise.
7592 (dfs_find_final_overrider): Use base_derived_from.
7593 (find_final_overrider): Adjust.
7594
7595 2002-10-18 Jason Merrill <jason@redhat.com>
7596
7597 PR c++/8080
7598 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7599 with condition decls in a template.
7600
7601 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
7602
7603 * class.c (add_method): Compare template parms too.
7604
7605 2002-10-17 Mark Mitchell <mark@codesourcery.com>
7606
7607 PR c++/7584
7608 * class.c (handle_using_decl): Allow the declaration used to be
7609 from an ambiguous base.
7610
7611 * pt.c (convert_template_argument): Revert this change:
7612 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7613 * pt.c (convert_template_argument): Do not fold non-type
7614 template rguments when inside a template.
7615
7616 * init.c (expand_default_init): Handle brace-enclosed initializers
7617 correctly.
7618
7619 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7620
7621 * mangle.c (write_expression): Correct handling of enumeration
7622 constants.
7623 (write_template_arg): Likewise.
7624 * pt.c (convert_template_argument): Do not fold non-type template
7625 arguments when inside a template.
7626
7627 PR c++/7478
7628 * cvt.c (convert_to_reference): Allow references as the incoming
7629 type.
7630
7631 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7632
7633 PR c++/7524
7634 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7635 build_qualified_type.
7636
7637 2002-10-15 Richard Henderson <rth@redhat.com>
7638
7639 * error.c (dump_expr): Use real_to_decimal directly, and with
7640 the new arguments.
7641
7642 2002-10-15 Mark Mitchell <mark@codesourcery.com>
7643
7644 * decl.c (reshape_init): Fix typo.
7645
7646 * cp-tree.h (operator_name_info_t): Add arity.
7647 * lex.c (init_operators): Initialize it.
7648 * mangle.c (write_conversion_operator_name): New function.
7649 (write_unqualified_name): Use it.
7650 (write_template_args): Accept template arguments as a TREE_LIST.
7651 (write_expression): Adjust handling of qualified names to match
7652 specification.
7653
7654 2002-10-15 Jason Merrill <jason@redhat.com>
7655
7656 * call.c (call_builtin_trap): New fn.
7657 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
7658 (build_call): Don't set current_function_returns_abnormally outside
7659 a function.
7660
7661 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7662
7663 * class.c (check_field_decls): Remove empty_p parameter. Instead,
7664 clear CLASSTYPE_EMPTY_P.
7665 (build_base_field): Likewise.
7666 (build_base_fields): Likewise.
7667 (check_bases_and_members): Likewise.
7668 (create_vtbl_ptr): Likewise.
7669 (layout_class_type): Likewise. Ensure that empty classes have
7670 size zero when used as base classes in the 3.2 ABI.
7671 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7672 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
7673 parameter.
7674 (is_empty_class): Correct definition when using post-3.2 ABI.
7675 * cp-tree.h (lang_type_class): Add empty_p.
7676 (CLASSTYPE_EMPTY_P): New macro.
7677
7678 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
7679
7680 * init.c (build_delete): Do not apply save_expr for arrays.
7681 (build_vec_delete): Likewise.
7682
7683 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7684
7685 * decl.c (layout_var_decl): Call layout_decl even for variables
7686 whose type is an array with unspecified bounds.
7687
7688 PR c++/7176
7689 * lex.c (do_identifier): Add another option for the parsing
7690 parameter.
7691 * parse.y (do_id): Use it.
7692
7693 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
7694
7695 PRs C++/6803, C++/7721 and C++/7803
7696 * decl.c (grokdeclarator): Gracefully handle template-name as
7697 decl-specifier.
7698
7699 2002-10-11 Jason Molenda <jmolenda@apple.com>
7700
7701 * init.c (build_field_list): Provide uses_unions_p with a default
7702 value.
7703
7704 2002-10-11 Mark Mitchell <mark@codesourcery.com>
7705
7706 PR c++/5661
7707 * cp-tree.h (variably_modified_type_p): New function.
7708 (grokdeclarator) Tighten check for variably modified types as
7709 fields.
7710 * pt.c (convert_template_argument): Do not allow variably modified
7711 types as template arguments.
7712 * tree.c (variably_modified_type_p): New function.
7713
7714 * NEWS: Document removal of "new X = ..." extension.
7715 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7716 brace-enclosed initializers.
7717 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7718 (initialize_local_var): Remove declaration.
7719 (expand_static_init): Likewise.
7720 * decl.c (next_initializable_field): New function.
7721 (reshape_init): Likewise.
7722 (check_initializer): Use them. Build dynamic initializer for
7723 aggregates here too.
7724 (initialize_local_var): Simplify, and incorporate cleanup
7725 insertion code as well.
7726 (destroy_local_var): Remove.
7727 (cp_finish_decl): Tidy.
7728 (expand_static_init): Fold checks for whether or not a variable
7729 needs initialization into this function. Simplify.
7730 * decl2.c (do_static_initialization): Simplify.
7731 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7732 be done for us automatically.
7733 (expand_default_init): Handle brace-enclosed initializers
7734 correctly.
7735 (expand_aggr_init_1): Remove RTL-generation code.
7736 (build_vec_init): Remove "new X = ..." support.
7737 * parse.y (new_initializer): Likewise.
7738 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7739 brace-enclosed initializer.
7740 (create_pseudo_type_info): Likewise.
7741 * typeck2.c (store_init_value): Don't try to handle digest_init
7742 being called more than once.
7743 (digest_init): Tidy handling of brace-enclosed initializers.
7744
7745 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7746
7747 * decl.c (typename_hash): Use htab_hash_pointer.
7748
7749 2002-10-10 Jim Wilson <wilson@redhat.com>
7750
7751 * decl.c (duplicate_decls): Don't call decl_attributes.
7752
7753 2002-10-09 Zack Weinberg <zack@codesourcery.com>
7754
7755 PR c/7353
7756 * decl.c (start_decl): Unconditionally issue error for
7757 'typedef foo = bar'.
7758 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7759 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7760
7761 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7762
7763 * decl2.c (prune_vtable_vardecl): Delete unused function.
7764
7765 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7766
7767 PR c++/7754
7768 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7769 procesing template functions.
7770 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7771 type. Call layout_decl.
7772 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7773
7774 2002-10-07 Richard Henderson <rth@redhat.com>
7775
7776 * decl2.c, pt.c: Revert c++/7754 fix.
7777
7778 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7779
7780 PR c++/7804
7781 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7782
7783 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7784
7785 PR c++/7931
7786 * pt.c (for_each_template_parm_r): Handle BASELINKs.
7787
7788 PR c++/7754
7789 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7790 procesing template functions.
7791 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7792 type. Call layout_decl.
7793 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7794
7795 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7796
7797 PR c++/8006
7798 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7799 template parameters.
7800 (globals): Add entity and need_abi_warning.
7801 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7802 CLASSTYPE_TEMPLATE_INFO.
7803 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7804 TYPE_TI_TEMPLATE.
7805 (write_prefix): Handle typename types correctly.
7806 (write_template_prefix): Handle template template parameters
7807 correctly.
7808 (start_mangling): Add entity parameter.
7809 (finish_mangling): Warn about names whose mangling will change.
7810 (mangle_decl_string): Adjust.
7811 (mangle_type_string): Likewise.
7812 (mangle_special_for_type): Likewise.
7813 (mangle_ctor_vtbl_for_type): Likewise.
7814 (mangle_thunk): Likewise.
7815 (mangle_guard_variable): Likewise.
7816 (mangle_ref_init_variable): Likewise.
7817
7818 2002-10-02 Mark Mitchell <mark@codesourcery.com>
7819
7820 PR c++/7188.
7821 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7822 * cp-tree.h (emit_base_init): Rename to ....
7823 (emit_mem_initializers): ... this.
7824 (expand_member_init): Change prototype.
7825 * init.c (perform_member_init): Compute explicit, rather than
7826 requiring it as a parameter.
7827 (sort_member_init): Rename to ...
7828 (sort_mem_initializers): ... this. Process bases and data members
7829 together.
7830 (sort_base_init): Remove.
7831 (emit_base_init): Rename to ...
7832 (emit_mem_initializers): ... this.
7833 (expand_aggr_vbase_init_1): Remove.
7834 (construct_virtual_bases): Rename to ...
7835 (construct_virtual_base): ... this.
7836 (expand_member_init): Rework handling of base initializers.
7837 * method.c (do_build_copy_constructor): Use
7838 finish_mem_initializers.
7839 * parse.y (member_init): Adjust calls to expand_member_init.
7840 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7841 (tsubst_initializer_list): Use expand_member_init.
7842 * semantics.c (finish_mem_intiailizers): Simplify.
7843
7844 2002-10-02 Matt Austern <austern@apple.com>
7845 * decl.c (walk_vtables_r): Fixed typo that caused result to
7846 never get a nonzero value.
7847
7848 2002-10-02 Roger Sayle <roger@eyesopen.com>
7849
7850 PR optimization/6627
7851 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7852 from here, and move it to tree.h.
7853 * decl.c (cxx_init_decl_processing): If storing the vbit
7854 in function pointers, ensure that force_align_functions_log
7855 is atleast one.
7856
7857 2002-10-02 Matt Austern <austern@apple.com>
7858
7859 * class.c (check_field_decls): Changed warning about const member
7860 variables so that it doesn't get issued for a class aggregate.
7861
7862 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7863
7864 * decl.c (cp_finish_decl): Make sure array types are laid out,
7865 even if the array bounds are unknown.
7866
7867 2002-10-01 Steve Ellcey <sje@cup.hp.com>
7868
7869 * class.c (build_vtbl_initializer): Change build_c_cast
7870 to build1.
7871
7872 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7873
7874 * decl.c (cp_finish_decl): Make sure array types are laid out,
7875 even if the array bounds are unknown.
7876
7877 * decl.c (cp_finish_decl): Correct check for dynamic
7878 initialization of thread-local storage.
7879
7880 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
7881
7882 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7883 overloaded.
7884
7885 2002-09-30 Steve Ellcey <sje@cup.hp.com>
7886
7887 * class.c (build_vtbl_initializer): Add cast.
7888 (add_vcall_offset_vtbl_entries_1):
7889 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7890
7891 2002-09-30 Mark Mitchell <mark@codesourcery.com>
7892
7893 * class.c (walk_subobject_offsets): Correct the calculation of
7894 offsets for virtual bases. Correct the counting of array
7895 elements.
7896 (layout_nonempty_base_or_field): Simplify. Correct the
7897 calculation of offsets to be propagated through the binfo
7898 hierarchy.
7899 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7900 Add the FIELD_DECL to TYPE_FIELDS.
7901 (build_base_fields): Adjust accordingly.
7902 (layout_virtual_bases): Use build_base_field.
7903 (end_of_class): Return a tree, not an integer.
7904 (warn_about_ambiguous_direct_bases): Rename to ...
7905 (warn_about_ambiguous_bases): ... this.
7906 (include_empty_classes): New function.
7907 (layout_class_type): Create an alternative version of the type to
7908 be used when as a base class type. Do not call
7909 finish_record_layout until we are done laying out the class.
7910 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
7911 as_base.
7912 (CLASSTYPE_SIZE): Reimplement.
7913 (CLASSTYPE_SIZE_UNIT): Likewise.
7914 (CLASSTYPE_ALIGN): Likweise.
7915 (CLASSTYPE_USER_ALIGN): Likewise.
7916 (CLASSTYPE_AS_BASE): New macro.
7917 (DECL_INITIALIZED_P): Likewise.
7918 (extract_init): Remove prototype.
7919 (build_forced_zero_init): Rename to ...
7920 (build_zero_init): ... this.
7921 (force_store_init_value): Remove.
7922 * decl.c (obscure_complex_init): Remove.
7923 (duplicate_decls): Copy DECL_INITIALIZED_P.
7924 (check_initializer): Do not leave junk in DECL_INITIAL.
7925 (cp_finish_decl): Handle zero-initialization of entities with
7926 static storage duration.
7927 * expr.c (extract_init): Remove.
7928 * init.c (build_forced_zero_init): Remove.
7929 (build_zero_init): New function.
7930 (build_default_init): Use it.
7931 (build_field_list): Skip FIELD_DECLs for base subobjects.
7932 (push_base_cleanups): Likewise.
7933 * method.c (do_build_assign_ref): Likewise.
7934 (synthesize_exception_spec): Likewise.
7935 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7936 (regenerate_decl_from_template): To not set DECL_INITIAL for a
7937 static data member whose initialization took place in its class.
7938 (instantiate_decl): Do not pass an initializer to cp_finish_decl
7939 in that situation.
7940 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7941 (dfs_unuse_fields): Likewise.
7942 * tree.c (pod_type_p): Handle error_mark_node.
7943 (zero_init_p): Likewise.
7944 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7945 subobjects.
7946 * typeck2.c (store_init_value): Remove #if 0'd code.
7947 (force_store_init_value): Remove.
7948 (process_init_constructor): Use build_zero_init.
7949
7950 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
7951
7952 PR c++/7788
7953 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7954
7955 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
7956
7957 * cp-tree.h: Fix comment typos.
7958 * decl.c: Likewise.
7959 * pt.c: Likewise.
7960
7961 2002-09-25 Mark Mitchell <mark@codesourcery.com>
7962
7963 * cp/class.c (contains_empty_class_p): New method.
7964 (walk_subobject_offsets): Correct computation of field offset.
7965 (layout_empty_base): Correct placement of emtpy base classes.
7966 (layout_class_type): Warn about ABI changes.
7967
7968 2002-09-23 Mark Mitchell <mark@codesourcery.com>
7969
7970 * cp/class.c (layout_virtual_bases): Do not round the size of the
7971 type to a multiple of the alignment before laying out virtual bases.
7972 (layout_class_type): Correct handling of bit-fields that are wider
7973 than their type inside unions. Round the size of the type to a
7974 even number of bytes when computing the size without virtual
7975 bases.
7976 * cp/cp-tree.h (abi_version_at_least): New macro.
7977
7978 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
7979
7980 * ChangeLog: Follow spelling conventions.
7981 * ChangeLog.2: Likewise.
7982 * call.c: Likewise.
7983 * class.c: Likewise.
7984 * cp-tree.h: Likewise.
7985 * cvt.c: Likewise.
7986 * decl.c: Likewise.
7987 * decl2.c: Likewise.
7988 * except.c: Likewise.
7989 * friend.c: Likewise.
7990 * g++spec.c: Likewise.
7991 * init.c: Likewise.
7992 * lex.c: Likewise.
7993 * mangle.c: Likewise.
7994 * method.c: Likewise.
7995 * operators.def: Likewise.
7996 * optimize.c: Likewise.
7997 * pt.c: Likewise.
7998 * rtti.c: Likewise.
7999 * search.c: Likewise.
8000 * semantics.c: Likewise.
8001 * spew.c: Likewise.
8002 * tree.c: Likewise.
8003 * typeck.c: Likewise.
8004
8005 2002-09-18 Devang Patel <dpatel@apple.com>
8006
8007 * cp/cp-tree.h: New prototype for walk_vtabls().
8008 * cp/decl.c (walk_vtables_r): New function.
8009 (struct cp_binding_level): Add new members, namespaces,
8010 names_size and vtables.
8011 (add_decl_to_level): Add decl in namespaces or vtables
8012 chain, if conditions match.
8013 (walk_vtables): New function.
8014 (walk_namespaces_r): Travers separate namespace chain
8015 for namespace decls.
8016 (wrapup_globals_for_namespace): Use names_size instead
8017 of list_length().
8018 * cp/decl2.c (finish_file): Use walk_vtables() instead of
8019 walk_globals() to walk vtable decls.
8020
8021 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
8022
8023 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
8024 ICE with invalid pointers & references.
8025
8026 2002-09-17 Zack Weinberg <zack@codesourcery.com>
8027
8028 * Make-lang.in: Remove all references to the demangler.
8029 * cxxfilt.c: Moved to binutils.
8030
8031 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8032
8033 PR c++/7718
8034 * pt.c (tsubst_decl): Remove assert.
8035
8036 Remove DR 295 implementation.
8037 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
8038 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
8039 about ignoring volatile qualifiers.
8040
8041 * search.c (lookup_member): Correct documentation.
8042
8043 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8044
8045 * cp-tree.h (union lang_tree_node): Add chain_next option.
8046
8047 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8048
8049 * parse.y (parse_finish_call_expr): Check lookup_member result.
8050
8051 PR c++/7015
8052 * semantic.c (finish_asm_stmt): Fix operand/output_operands
8053 thinko.
8054 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
8055
8056 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
8057
8058 PR c++/7919
8059 * call.c (build_over_call): Convert this pointer for fns found by
8060 using decls.
8061
8062 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8063
8064 * ChangeLog: Follow spelling conventions.
8065 * ChangeLog.1: Likewise.
8066
8067 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
8068
8069 PR c++/7768
8070 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
8071
8072 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
8073
8074 * error.c: Fix comment formatting.
8075 * except.c: Likewise.
8076 * expr.c: Likewise.
8077 * friend.c: Likewise.
8078 * g++spec.c: Likewise.
8079 * init.c: Likewise.
8080 * lex.c: Likewise.
8081 * mangle.c: Likewise.
8082 * method.c: Likewise.
8083 * optimize.c: Likewise.
8084 * pt.c: Likewise.
8085 * rtti.c: Likewise.
8086 * search.c: Likewise.
8087 * semantics.c: Likewise.
8088 * spew.c: Likewise.
8089 * tree.c: Likewise.
8090 * typeck.c: Likewise.
8091 * typeck2.c: Likewise.
8092
8093 2002-09-13 Matt Austern <austern@apple.com>
8094
8095 PR C++/7828
8096 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
8097 * cp/call.c: Change call-by-const-reference mechanism to use
8098 non_cast_lvalue_p when deciding whether the create a temporary.
8099 We need a temporary when passing, e.g. (long) x by const ref.
8100
8101 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
8102
8103 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
8104
8105 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
8106
8107 * decl.c: Fix comment formatting.
8108 * decl2.c: Likewise.
8109
8110 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
8111
8112 * call.c: Fix comment formatting.
8113 * class.c: Likewise.
8114 * cp-lang.c: Likewise.
8115 * cp-tree.h: Likewise.
8116 * cvt.c: Likewise.
8117
8118 2002-09-11 Zack Weinberg <zack@codesourcery.com>
8119
8120 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8121 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8122 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8123 minor adjustments (use version_string, eliminate yet another
8124 duplicate of xmalloc)
8125
8126 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8127
8128 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8129
8130 2002-09-05 Jason Merrill <jason@redhat.com>
8131
8132 * typeck2.c (add_exception_specifier): Only pedwarn for an
8133 incomplete type.
8134 (require_complete_eh_spec_types): New fn.
8135 (cxx_incomplete_type_diagnostic): Also support pedwarning.
8136 * typeck.c (complete_type_or_diagnostic): Likewise.
8137 * call.c (build_call): Call require_complete_eh_spec_types.
8138 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8139 on an incomplete type.
8140
8141 2002-09-04 Jakub Jelinek <jakub@redhat.com>
8142
8143 * decl.c (start_cleanup_fn): Clear interface_only before
8144 start_function, restore it afterwards.
8145
8146 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
8147
8148 * cp-tree.h (finish_builtin_type): Remove.
8149 * decl2.c (finish_builtin_type): Move to common code.
8150 * decl.c (build_ptrmemfunc_type): Adjust.
8151 * rtti.c (create_pseudo_type_info): Adjust.
8152 (create_tinfo_types): Adjust.
8153
8154 2002-08-31 Jason Merrill <jason@redhat.com>
8155
8156 * cp-lang.c (cp_expr_size): Allow initialization from a
8157 CONSTRUCTOR.
8158
8159 2002-08-30 Richard Henderson <rth@redhat.com>
8160
8161 PR opt/7515
8162 * tree.c: Include target.h.
8163 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8164 don't bind locally.
8165 * Makefile.in (tree.o): Update.
8166
8167 2002-08-27 Mark Mitchell <mark@codesourcery.com>
8168
8169 * class.c (layout_virtual_bases): Warn about bugs in G++ that
8170 result in incorrect object layouts.
8171 (layout_class_type): Likewise.
8172
8173 2002-08-24 Matt Austern <austern@apple.com>
8174
8175 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8176 are allowable.
8177 (real_lvalue_p): Update caller.
8178 (lvalue_p): Ditto.
8179 (non_cast_lvalue_or_else): New.
8180 * tree.h: Declare it.
8181 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8182
8183 2002-08-22 Mark Mitchell <mark@codesourcery.com>
8184
8185 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8186 and COND_EXPR specially; fix error message output.
8187
8188 2002-08-22 Jason Merrill <jason@redhat.com>
8189
8190 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8191 * semantics.c (nullify_returns_r): Likewise.
8192
8193 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
8194
8195 Fix PR/7621
8196 * typeck.c (finish_class_member_access_expr): Diagnose cases where
8197 name lookup finds nothing.
8198
8199 2002-08-15 Jason Merrill <jason@redhat.com>
8200
8201 * semantics.c (finish_then_clause): Remove redundant assignment.
8202 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8203 extra binding level outside the if/switch statement.
8204 (finish_while_cond, finish_for_cond): Rewrite complex condition
8205 into the loop body.
8206
8207 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
8208
8209 * parse.y (sizeof, alignof, typeof): New non-terminals to
8210 increment skip_evaluation. Replace terminals with them and
8211 decrement skip_evaluation at the end of rules using them.
8212 * decl2.c (mark_used): Don't assemble_external if
8213 skipping evaluation.
8214
8215 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
8216
8217 Fix PR/7504
8218 * parse.y (parse_finish_call_expr): Handle incomplete
8219 type used to name a scope.
8220
8221 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
8222
8223 PR c++/7598
8224 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8225 regression caused by my 2002-08-08 patch.
8226
8227 2002-08-13 Mark Mitchell <mark@codesourcery.com>
8228
8229 * decl.c (pushdecl_class_level): Honor requests to bind names to
8230 OVERLOADs.
8231
8232 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8233
8234 * decl2.c (build_call_from_tree): Fix uninitialized variable.
8235 * parse.y (parse_finish_call_expr): Likewise.
8236 * repo.c (old_args, old_dir, old_main): Const-ify.
8237
8238 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
8239
8240 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8241 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8242 * optimize.c (maybe_clone_body): Likewise.
8243 * pt.c (tsubst_enum): Likewise.
8244 (lookup_template_class): Likewise.
8245 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8246
8247 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
8248
8249 * lang-specs.h: Remove -ansi.
8250
8251 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
8252
8253 * tree.c (maybe_dummy_object): Replace // with /* */
8254
8255 2002-08-09 Mark Mitchell <mark@codesourcery.com>
8256
8257 * call.c (standard_conversion): Use build_ptrmem_type.
8258 * cp-tree.h (build_ptrmem_type): New function.
8259 (adjust_result_of_qualified_name_lookup): Likewise.
8260 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8261 static data members.
8262 (build_ptrmem_type): New function.
8263 (grokdeclarator): Do not use build_offset_type when encountering a
8264 qualified name.
8265 * parse.y (parse_finish_call_expr): Use
8266 adjust_result_of_qualified_name_lookup.
8267 * search.c (adjust_result_of_qualified_name_lookup): New function.
8268 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8269 accessing OFFSET_TYPEs directly.
8270
8271 2002-08-08 Mike Stump <mrs@apple.com>
8272
8273 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8274 (type_decays_to): Likewise.
8275 * class.c (find_final_overrider): Likewise.
8276 (maybe_note_name_used_in_class): Likewise.
8277 * decl.c (current_tmpl_spec_kind): Likewise.
8278 (add_binding): Likewise.
8279 (push_class_binding): Likewise.
8280 (duplicate_decls): Likewise.
8281 (layout_var_decl): Likewise.
8282 (grokfndecl): Likewise.
8283 (grokdeclarator): Likewise.
8284 (check_default_argument): Likewise.
8285 * decl2.c (handle_class_head): Likewise.
8286 * error.c (dump_template_decl): Likewise.
8287 * init.c (build_offset_ref): Likewise.
8288 * pt.c (check_specialization_scope): Likewise.
8289 (determine_specialization): Likewise.
8290 (check_explicit_specialization): Likewise.
8291 (maybe_check_template_type): Likewise.
8292 (process_partial_specialization): Likewise.
8293 (check_default_tmpl_args): Likewise.
8294 (push_template_decl_real): Likewise.
8295 (convert_template_argument): Likewise.
8296 (try_class_unification): Likewise.
8297 (get_bindings_real): Likewise.
8298 (do_decl_instantiation): Likewise.
8299 * semantics.c (begin_function_definition): Likewise.
8300 (finish_member_declaration): Likewise.
8301 (check_multiple_declarators): Likewise.
8302 * typeck.c (comp_array_types): Likewise.
8303 (comptypes): Likewise.
8304 (expr_sizeof): Likewise.
8305 (build_binary_op): Likewise.
8306 (dubious_conversion_warnings): Likewise.
8307 (check_return_expr): Likewise.
8308
8309 2002-08-08 Mark Mitchell <mark@codesourcery.com>
8310
8311 * typeck.c (build_class_member_access_expr): Do not return
8312 error_mark_node when no error has occurred.
8313
8314 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8315
8316 * typeck.c (build_component_addr): Remove.
8317 (build_unary_op): Just check it's not a bitfield, and then build
8318 an ADDR_EXPR.
8319
8320 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8321
8322 * class.c (convert_to_base): Correct check for error_mark_node.
8323 (create_vtable_ptr): Remove unused VFUNS_P parm.
8324
8325 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8326
8327 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8328
8329 2002-08-07 Mark Mitchell <mark@codesourcery.com>
8330
8331 Rework build_component_ref.
8332 * call.c (build_vfield_ref): Do not go through build_component_ref.
8333 (build_field_call): Use build_class_member_access_expr.
8334 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8335 (build_object_call): Likewise.
8336 * class.c (convert_to_base): New function.
8337 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8338 (instantiate_type): Handle BASELINKs.
8339 * cp-tree.def (BASELINK): New tree code.
8340 * cp-tree.h (BASELINK_P): Reimplement.
8341 (SET_BASELINK_P): Remove.
8342 (BASELINK_BINFO): Reimplement.
8343 (BASELINK_FUNCTIONS): Likewise.
8344 (BASELINK_ACCESS_BINFO): Likewise.
8345 (BASELINK_OPTYPE): Likewise.
8346 (convert_to_base): New function.
8347 (name_p): Likewise.
8348 (build_object_ref): Remove.
8349 (build_component_ref_1): Likewise.
8350 (build_component_ref): Likewise.
8351 (build_x_component_ref): Likewise.
8352 (build_class_member_access_expr): New function.
8353 (finish_class_member_access_expr): Likewise.
8354 (build_ptrmemfunc_access_expr): Likewise.
8355 * decl.c (grokdeclarator): Handle BASELINKs.
8356 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8357 finish_class_member_access_expr.
8358 (arg_assoc): Handle BASELINKs.
8359 (do_class_using_decl): Likewise.
8360 * error.c (dump_decl): Likewise.
8361 (dump_expr): Use build_ptrmemfunc_access_expr.
8362 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8363 destructors.
8364 (build_throw): Use BASELINK_FUNCTIONS.
8365 * init.c (perform_member_init): Use
8366 build_class_member_access_expr.
8367 (build_offset_ref): Handle BASELINKs. Use
8368 build_class_member_access_expr.
8369 * method.c (hack_identifier): Likewise.
8370 * parse.y (do_id): Use BASELINK, not TREE_LIST.
8371 (primary): Remove uses of build_object_ref.
8372 * pt.c (lookup_template_function): Handle BASELINKs.
8373 (resolve_overloaded_unification): Likewise.
8374 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8375 (lookup_field): Use BASELINK, not TREE_LIST.
8376 (lookup_fnfiels): Likewise.
8377 (setup_class_bindings): Likewise.
8378 * semantics.c (finish_object_call_expr): Do not use
8379 build_method_call when we already know what function is being
8380 called.
8381 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8382 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8383 TREE_CHAIN.
8384 (name_p): New function.
8385 * typeck.c (build_object_ref): Remove.
8386 (build_component_ref_1): Likewise.
8387 (build_x_component_ref): Likewise.
8388 (build_class_member_access_expr): New function.
8389 (finish_class_member_access_expr): Likewise.
8390 (build_ptrmemfunc_access_expr): Likewise.
8391 (get_member_function_from_ptrfunc): Use
8392 build_ptrmemfunc_access_expr.
8393 (build_binary_op): Likewise.
8394 (build_unary_op): Likewise.
8395 (build_ptrmemfunc): Likewise.
8396 (pfn_from_ptrmemfunc): Likewise.
8397 * typeck2.c (build_m_component_ref): Adjust comment.
8398
8399 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
8400
8401 * Make-lang.in (CXX_C_OBJS): Update.
8402 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8403 * cp-tree.h (cxx_decode_option): Remove.
8404 * decl2.c (compare_options, lang_f_options, unsupported_options,
8405 cxx_decode_option): Remove.
8406
8407 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
8408
8409 * typeck.c (build_x_unary_op): Handle pointer-to-member.
8410
8411 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8412
8413 * class.c: Don't include obstack.h.
8414 (popclass):
8415 * decl2.c: Delete bogus comment.
8416 * error.c: Don't include obstack.h.
8417 * except.c: Likewise.
8418 (dump_type): Correct comment.
8419 * method.c: Don't include obstack.h.
8420 * tree.c: Likewise.
8421
8422 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
8423
8424 Fix PR/2213
8425 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8426 expressions to pointer-to-data-member of pointer-to-member-functions.
8427
8428 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8429
8430 * cvt.c (ocp_convert): Delete obsolete code.
8431 * parse.y (permanent_obstack): Delete declaration.
8432 * pt.c (permanent_obstack): Delete declaration.
8433 * repo.c (permanent_obstack): Delete declaration.
8434 (open_repo_file): Use xmalloc instead of permanent_obstack.
8435 (init_repo): Use xstrdup instead of permanent_obstack.
8436
8437 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
8438
8439 * cp-tree.h (VF_DERIVED_VALUE): Remove.
8440 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8441
8442 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
8443
8444 PR 7470.
8445 C++ ABI change - vfunc ordering.
8446 * class.c (add_virtual_function): Remove.
8447 (dfs_modify_all_vtables): Take list of all declared
8448 virtuals. Assign all that are not in primary base.
8449 (check_for_override): Adjust comments.
8450 (create_vtable_ptr): Take single list of virtuals. Build chain
8451 of declared virtuals here.
8452 (layout_class_type): Take single list of virtuals. Adjust.
8453 (finish_struct_1): Keep virtuals on single list. Adjust.
8454
8455 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8456
8457 * init.c (build_member_call): Use build_new_method_call, not
8458 build_method_call.
8459
8460 2002-08-02 Krister Walfridsson <cato@df.lth.se>
8461
8462 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8463
8464 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8465
8466 * call.c (build_method_call): Issue a more helpful error message
8467 about ambiguous method names.
8468
8469 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
8470
8471 * tree.c (build_shared_int_cst): Make cache file scope, and
8472 GTY it.
8473
8474 2002-08-02 Jason Merrill <jason@redhat.com>
8475
8476 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8477 (cp_expr_size): New fn.
8478 * call.c (build_over_call): Lose empty class hackery.
8479 (convert_arg_to_ellipsis): Promote non-POD warning to error.
8480 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8481
8482 * semantics.c (expand_body): Do tree optimization in the function
8483 context, too.
8484
8485 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
8486
8487 * cp-tree.h: Move all warning and flag declarations to c-common.h.
8488 * decl.c: Move all warning and flag variables to c-common.c.
8489 * decl2.c: Move all warning and flag variables to c-common.c.
8490 * lex.c (flag_digraphs): Remove.
8491 (warn_traditional): Now in c-common.c.
8492
8493 2002-07-31 Mark Mitchell <mark@codesourcery.com>
8494
8495 * call.c (build_field_call): Do not look up the field by name.
8496 (build_method_call): Simplify.
8497 (struct z_candidate): Add access_path and conversion_path. Remove
8498 basetype_path.
8499 (convert_class_to_reference): Adjust use of
8500 add_function_candidate.
8501 (add_candidate): Add conversion_path argument.
8502 (add_function_candidate): Use it.
8503 (add_conv_dndidate): Likewise.
8504 (build_builtin_candidate): Likewise.
8505 (add_template_candidate_real): Add conversion_path argument.
8506 (add_template_conv_candidate): Likewise.
8507 (add_template_candidate): Likewise.
8508 (build_user_type_conversion_1): Use it.
8509 (build_new_function_call): Remove name lookup code. Adjust use of
8510 add_template_candidate and add_function_candidate.
8511 (build_new_op): Likewise.
8512 (convert_like_real): Use build_special_member_call.
8513 (build_over_call): Use cand->conversion_path.
8514 (build_special_member_call): New method.
8515 (build_new_method_call): Remove name lookup code.
8516 * cp-tree.def (OFFSET_REF): Update documentation.
8517 (TEMPLATE_ID_EXPR): Likewise.
8518 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8519 (BASELINK_OPTYPE): Likewise.
8520 (build_new_method_call): Adjust prototype.
8521 (build_special_member_call): New method.
8522 (build_baselink): New method.
8523 (build_offset_ref_call_from_tree): Likewise.
8524 (build_call_from_tree): Likewise.
8525 (finish_qualified_call_expr): Remove.
8526 (finish_call_expr): Adjust prototype.
8527 (build_x_function_call): Remove.
8528 * cvt.c (ocp_convert): Use build_special_member_call.
8529 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8530 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8531 CALL_EXPR.
8532 (build_offset_ref_call_from_tree): New function.
8533 (build_call_from_tree): Likewise.
8534 * init.c (expand_cleanup): Use build_special_member_call.
8535 (expand_default_init): Likewise.
8536 (build_member_call): Use finish_call_expr.
8537 (build_new_1): Use build_special_member_call.
8538 (push_base_cleanups): Likewise.
8539 * method.c (do_build_assign_ref): Likewise.
8540 * parse.y (template_id): Do not pass a COMPONENT_REF to
8541 lookup_template_function.
8542 (primary): Use parse_finish_call_epxr, not finish_call_expr.
8543 (parse_finish_call_expr): New function.
8544 * pt.c (lookup_template_function): Add assertions.
8545 * search.c (lookup_base): Allow T to be a binfo.
8546 (build_baselink): New function.
8547 (lookup_member): Use it.
8548 * semantics.c (finish_call_expr): Do not do name lookup.
8549 (finish_object_call_expr): Remove #if 0'd code.
8550 (finish_qualified_call_expr): Remove.
8551 * typeck.c (build_x_function_call): Remove.
8552 (build_static_case): Use build_special_member_call.
8553 * typeck2.c (build_functional_cast): Likewise.
8554
8555 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8556
8557 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8558
8559 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
8560
8561 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8562
8563 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
8564
8565 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8566 documentation.
8567
8568 2002-07-29 Alan Modra <amodra@bigpond.net.au>
8569
8570 * cp-tree.h: Comment typo fix.
8571
8572 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
8573
8574 * spew.c (space_for_token): Allocate zeroed memory for a new token
8575 chunk.
8576
8577 2002-07-27 Roger Sayle <roger@eyesopen.com>
8578
8579 * decl.c (builtin_function_1): No need to explicitly mark
8580 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8581
8582 2002-07-27 Roger Sayle <roger@eyesopen.com>
8583
8584 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8585
8586 2002-07-26 Jason Merrill <jason@redhat.com>
8587
8588 * call.c (build_over_call): Likewise.
8589 (cp_convert_parm_for_inlining): New fn.
8590 (convert_for_arg_passing): New fn.
8591 (convert_default_arg, build_over_call): Use it.
8592 (type_passed_as): New fn.
8593 * pt.c (tsubst_decl): Use it.
8594 * decl2.c (cp_build_parm_decl): New fn.
8595 (build_artificial_parm): Use it.
8596 (start_static_storage_duration_function): Likewise.
8597 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8598 (grokparms): Don't mess with DECL_ARG_TYPE.
8599 * typeck.c (convert_arguments): Use convert_for_arg_passing.
8600 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8601 Define.
8602 * cp-tree.h: Declare new fns.
8603
8604 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
8605
8606 * cp-tree.h (flag_operator_names): Remove.
8607 * decl2.c (flag_operator_names): Remove.
8608 (lang_f_options): Remove operator-names.
8609 * lex.c (D_OPNAME): Remove.
8610 (reswords): Remove operator names.
8611 (rid_to_yy): Remove operator names.
8612 (init_reswords): No need to handle D_OPNAME.
8613 * spew.c (read_process_identifier): There are no operator
8614 names.
8615
8616 2002-07-26 Jason Merrill <jason@redhat.com>
8617
8618 * dump.c (cp_dump_tree): Call c_dump_tree.
8619 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8620
8621 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8622
8623 * error.c (print_whitespace): Remove.
8624 * g++spec.c (LIBUNWIND): Move.
8625 * mangle.c (mangled_position, write_signed_number): Remove.
8626
8627 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8628
8629 * decl2.c (cxx_decode_option): Similarly.
8630
8631 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
8632
8633 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8634 (cxx_sizeof_or_alignof_type): Take a third argument.
8635 (cxx_sizeof): Adjust definition.
8636 (cxx_alignof): Likewise.
8637 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8638 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8639 complaining.
8640 (c_sizeof_nowarn): Remove definition.
8641 (build_unary_op): Use cxx_sizeof_nowarn.
8642
8643 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
8644
8645 * tree.c (cp_build_qualified_type_real): When copying
8646 pointer-to-method types, unshare the record that holds
8647 the cached pointer-to-member-function type.
8648
8649 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8650
8651 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8652
8653 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
8654
8655 Fix PR/7363:
8656 * typeck.c (cxx_sizeof_or_alignof_type): New function.
8657 (c_sizeof): Remove definition.
8658 (expr_sizeof): Use cxx_sizeof.
8659 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8660 * decl.c (finish_destructor_body): Use cxx_sizeof.
8661 * semantics.c (finish_alignof): Likewise.
8662 (finish_alignof): Use cxx_alignof.
8663 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8664 (cxx_sizeof_or_alignof_type): Declare.
8665 (my_friendly_assert): Move to ../c-common.h.
8666
8667 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8668
8669 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8670
8671 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8672
8673 PR c++/7347, c++/7348
8674 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8675 * decl.c (make_typename_type): Use it.
8676 (make_unbound_class_template): Likewise.
8677 (lookup_name_real): Don't call type_access_control if scope is
8678 template parameter dependent.
8679 * parse.y (template_arg): Call make_unbound_class_template with
8680 tf_parsing set.
8681 (nest_name_specifier): Call make_typename_type with tf_parsing set.
8682 (typename_sub0): Likewise.
8683 (typename_sub1): Likewise.
8684 (instantiate_decl): Push class scope.
8685 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8686 for both static variable and member function template.
8687 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8688 and arguments.
8689 * search.c (type_access_control): Do type access for TEMPLATE_DECL
8690 too.
8691
8692 2002-07-20 Roger Sayle <roger@eyesopen.com>
8693
8694 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8695 test by using positive_option. Make whitespace consistent.
8696
8697 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
8698
8699 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8700 members with 'locus'. Adjust use throughout.
8701 (struct feed): Likewise.
8702 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8703 Adjust use.
8704 (snarf_defarg): Use error(), not error_with_file_and_line().
8705
8706 2002-07-19 Chris Demetriou <cgd@broadcom.com>
8707
8708 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8709 cpp_options is included.
8710
8711 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8712
8713 PR c++/2862, c++/2863
8714 * pt.c (determine_specialization): Compare the length of
8715 TYPE_ARG_TYPES. Tidy.
8716
8717 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8718
8719 PR c++/3797
8720 * decl.c (duplicate_decls): Don't propagate inlining parameters from
8721 olddecl to newdecl when newdecl is a specialization of the
8722 instantiation olddecl.
8723
8724 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8725
8726 PR c++/4802, c++/5387
8727 * decl.c (make_typename_type): Use enforce_access.
8728
8729 2002-07-17 Scott Snyder <snyder@fnal.gov>
8730
8731 PR c++/7320
8732 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8733
8734 2002-07-12 Mark Mitchell <mark@codesourcery.com>
8735
8736 * class.c (add_method): Correct handling of conversion operators.
8737
8738 2002-07-11 Mark Mitchell <mark@codesourcery.com>
8739
8740 PR c++/7224
8741 * class.c (add_method): Simplify.
8742
8743 2002-07-11 Jason Merrill <jason@redhat.com>
8744
8745 PR c++/7279
8746 * tree.c (cp_copy_res_decl_for_inlining): Also copy
8747 TREE_ADDRESSABLE.
8748
8749 2002-07-10 Graham Stott <graham.stott@btinternet.com>
8750
8751 * pt.c (template_parm_this_level_p, push_template_decl_real):
8752 Pass depth as int pointer.
8753
8754 2002-07-11 Tim Josling <tej@melbpc.org.au>
8755
8756 Remove front end hard coding from gengtype.c.
8757
8758 * config-lang.in (gtfiles): Add files needed for this front end.
8759
8760 2002-07-10 Mark Mitchell <mark@codesourcery.com>
8761
8762 * cp-tree.h (unqualified_name_lookup_error): Declare it.
8763 (begin_function_definition): Adjust prototype.
8764 * lex.c (unqualified_name_lookup_error): New function, split out
8765 from ...
8766 (do_identifier): ... here.
8767 * parse.y (parse_begin_function_definition): New function.
8768 (fn.def1): Use it.
8769 * semantics.c (begin_function_definition): Accept decl-specifiers
8770 and attributes as separate parameters.
8771
8772 2002-07-10 Jason Merrill <jason@redhat.com>
8773
8774 PR c++/6255
8775 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8776 modifying the old one.
8777
8778 2002-07-09 Mark Mitchell <mark@codesourcery.com>
8779
8780 * cp-tree.h (constructor_name_p): Declare it.
8781 (check_template_template_default_arg): Likewise.
8782 * class.c (handle_using_decl): Use constructor_name_p.
8783 * decl.c (grokdeclarator): Likewise.
8784 * decl2.c (constructor_name_p): Define it.
8785 * init.c (build_member_call): Use constructor_name_p.
8786 * parse.y (template_parm): Use check_template_template_default_arg.
8787 * pt.c (check_explicit_specialization): Use constructor_name_p.
8788 * semantics.c (check_template_template_default_arg): New function.
8789
8790 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8791
8792 * pt.c (can_complete_type_without_circularity): Add static to
8793 function definition.
8794
8795 2002-07-08 Mark Mitchell <mark@codesourcery.com>
8796
8797 * cp-tree.h (have_extern_spec): Declare it
8798 * decl.c (have_extern_spec): Define it.
8799 (start_decl): Eliminate use of used_extern_spec.
8800 (start_function): Likewise.
8801 * parse.y (have_extern_spec): Remove declaration.
8802 (used_extern_spec): Likewise.
8803 (frob_specs): Eliminate use of used_extern_spec.
8804 (.hush_warning): Likewise.
8805
8806 2002-07-07 Mark Mitchell <mark@codesourcery.com>
8807
8808 * Make-lang.in (cp/parse.o): Depend on decl.h.
8809 * cp-tree.h (do_decl_instantiation): Change prototype.
8810 * parse.y: Include decl.h.
8811 (parse_decl_instantiation): New function.
8812 (explicit_instantiation): Use it.
8813 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8814 and DECLSPECS.
8815
8816 2002-07-07 Roger Sayle <roger@eyesopen.com>
8817
8818 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8819 constructor and destructor tests when passed a TEMPLATE_DECL.
8820
8821 2002-07-05 Jason Merrill <jason@redhat.com>
8822
8823 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8824 pointers.
8825
8826 PR optimization/7145
8827 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8828
8829 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
8830
8831 Repair damage on weak-impared targets caused by my previous patch.
8832 * cp-tree.h (import_export_tinfo): Add parameter.
8833 * decl2.c (import_export_tinfo): Add parameter, post adjust
8834 DECL_COMDAT.
8835 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8836 import_export_tinfo.
8837
8838 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8839
8840 PR c++/6944
8841 * init.c (build_aggr_init): Remove qualifiers of init before calling
8842 build_vec_init.
8843 (build_vec_init): Flatten multi-dimensional array during cleanup.
8844 (build_vec_delete_1): Abort if the type of each element is array.
8845
8846 2002-07-03 Graham Stott <graham.stott@btinternet.com>
8847
8848 * pt.c (instantiate_class_template): Fix typo.
8849
8850 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8851
8852 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8853 by CVS conflict in my last patch.
8854
8855 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8856
8857 PR c++/6716
8858 * pt.c (can_complete_type_without_circularity): New function.
8859 (instantiate_class_template): Use it.
8860 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8861 message due to incomplete fields.
8862
8863 2002-07-01 Mark Mitchell <mark@codesourcery.com>
8864
8865 PR c++/7112
8866 * mangle.c (write_expression): Add mangling for sizeof when
8867 applied to a type.
8868 * operators.def: Remove stale comment.
8869
8870 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
8871
8872 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8873 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8874 (tinfo_decl_type): Replace with ...
8875 (type_info_ptr_type): ... this.
8876 (import_export_tinfo): Declare.
8877 (tinfo_decl_p): Rename to ...
8878 (unemitted_tinfo_decl_p): ... this.
8879 * decl2.c (import_export_decl): Break out tinfo handling into ...
8880 (import_export_tinfo): ... here. New function.
8881 (finish_file): Adjust.
8882 * rtti.c (TINFO_REAL_NAME): New macro.
8883 (init_rtti_processing): Create the tinfo types.
8884 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8885 (get_tinfo_decl): Adjust.
8886 (get_tinfo_ptr): New function.
8887 (get_type_id): Use it.
8888 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8889 (ptr_initializer): Use get_tinfo_ptr.
8890 (ptm_initializer): Likewise.
8891 (synthesize_tinfo_var): Break into ...
8892 (get_pseudo_ti_init): ... this. Just create the initializer.
8893 (get_pseudo_ti_desc): .. and this.
8894 (create_real_tinfo_var): Remove.
8895 (create_pseudo_type_info): Don't create the vtable decl here.
8896 (get_vmi_pseudo_type_info): Remove.
8897 (create_tinfo_types): Adjust.
8898 (tinfo_decl_p): Rename to ...
8899 (unemitted_tinfo_decl_p): ... here. Adjust.
8900 (emit_tinfo_decl): Adjust. Create the initializer.
8901
8902 2002-06-27 Mark Mitchell <mark@codesourcery.com>
8903
8904 PR c++/6695
8905 * pt.c (tsubst_friend_class): Substitute into the context of the
8906 friend before using it.
8907
8908 2002-06-26 Mark Mitchell <mark@codesourcery.com>
8909
8910 * cp-tree.h (xref_tag): Change prototype.
8911 (handle_class_head): Likewise.
8912 (build_x_component_ref): Likewise.
8913 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8914 (xref_tag): Take attributes as a separate parameter.
8915 (xref_tag_from_type): Adjust call to xref_tag.
8916 * decl2.c (build_expr_from_tree): Adjust call to
8917 build_x_component_ref.
8918 (handle_class_head): Take attributes as a separate parameter.
8919 * parse.y (parse_xref_tag): New function.
8920 (parse_handle_class_head): Likewise.
8921 (primary): Use parse_xref_tag.
8922 (class_head_decl): Use parse_handle_class_head.
8923 (class_head_defn): Likewise.
8924 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8925 (build_dynamic_cast_1): Likewise.
8926 (create_pseudo_type_info): Likewise.
8927 (emit_support_tinfos): Likewise.
8928 * typeck.c (build_object_ref): Adjust call to
8929 build_x_component_ref.
8930 (build_x_component_ref): Remove protect parameter.
8931
8932 2002-06-25 Mark Mitchell <mark@codesourcery.com>
8933
8934 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8935 * class.c (handle_using_decl): Likewise.
8936 (instantiate_type): Likewise.
8937 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8938 (xref_basetypes): Change prototype.
8939 (begin_mem_initializers): New function.
8940 (get_overloaded_fn): Likewise.
8941 * decl.c (xref_basetypes): Simplify.
8942 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8943 * init.c (build_offset_ref): Likewise.
8944 * parse.y (base_init): Use begin_mem_initializers().
8945 (structsp): Adjust call to xref_basetypes.
8946 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8947 (instantiate_class_template): Adjust call to xref_basetypes.
8948 * semantics.c (begin_mem_initializers): New function.
8949 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8950 (really_overloaded_fn): Likewise.
8951 (get_overloaded_fn): New function.'
8952 (get_first_fn): USe BASELINK_FUNCTIONS.
8953
8954 2002-06-24 Mark Mitchell <mark@codesourcery.com>
8955
8956 * cp-tree.h (SCALAR_TYPE_P): New macro.
8957 (check_for_out_of_scope_variable): New function.
8958 (at_class_scope_p): Likewise.
8959 (finish_fname): Likewise.
8960 * class.c (finish_struct): Use at_function_scope_p.
8961 * decl.c (check_for_out_of_scope_variable): New function, split
8962 out from do_identifier.
8963 (finish_enum): Use at_function_scope_p.
8964 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8965 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
8966 (primary): Use at_function_scope_p.
8967 * search.c (at_class_scope_p): New function.
8968 * semantics.c (finish_fname): Likewise.
8969 (check_multiple_declarators): Use at_function_scope_p.
8970
8971 2002-06-23 Mark Mitchell <mark@codesourcery.com>
8972
8973 * parse.y (parse_scoped_id): New function.
8974 (primary): Use it.
8975 * cp-tree.h (do_scoped_id): Adjust declaration.
8976 * lex.c (do_scoped_id): Remove call to yylex.
8977 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8978 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8979 expanding it inline.
8980
8981 2002-06-23 Matt Thomas <matt@3am-software.com>
8982
8983 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8984 "#if VMS_TARGET".
8985
8986 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8987
8988 * mangle.c (integer_type_codes): Const-ify.
8989
8990 2002-06-20 Richard Henderson <rth@redhat.com>
8991
8992 PR c++/6747
8993 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8994 Call put_var_into_stack.
8995
8996 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8997
8998 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8999 array size calculation.
9000
9001 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9002
9003 PR c++/6892
9004 * pt.c (tsubst_expr): Handle FILE_STMT.
9005
9006 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9007
9008 PR c++/6723
9009 * pt.c (lookup_template_class): Don't build complete argument of
9010 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
9011 argument.
9012
9013 2002-06-19 Akim Demaille <akim@epita.fr>
9014
9015 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
9016 decl.h's TYPENAME.
9017 * spew.c, lex.c: Adjust.
9018 * parse.y (explicit_instantiation): Add empty action to override
9019 the default $$ = $1 where it introduces a type clash.
9020
9021 2002-06-14 Jason Merrill <jason@redhat.com>
9022
9023 * semantics.c (begin_for_stmt): Push the 'for' scope before
9024 adding the FOR_STMT.
9025
9026 C++ ABI changes.
9027 * class.c (build_base_field): Set DECL_PACKED.
9028 (layout_class_type): Don't use tail padding of PODs.
9029 * mangle.c (write_unqualified_name): Fix template conversion op
9030 mangling.
9031
9032 2002-06-16 Richard Henderson <rth@redhat.com>
9033
9034 PR opt/6793
9035 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
9036 after template instantiation.
9037
9038 2002-06-16 Richard Henderson <rth@redhat.com>
9039
9040 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
9041
9042 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
9043
9044 * cp-tree.h (compiler_error): Remove declaration.
9045 * lex.c (compiler_error): Remove definition.
9046
9047 2002-06-14 Steve Ellcey <sje@cup.hp.com>
9048
9049 * g++spec.c (LIBUNWIND): New.
9050 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
9051
9052 2002-06-13 Jessica Han <jessica@cup.hp.com>
9053
9054 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
9055 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
9056 (build_vbase_offset_vtbl_entries): Likewise.
9057 * rtti.c (build_headof): Likewise.
9058 (get_tinfo_decl_dynamic): Likewise.
9059 (create_pseudo_type_info): Likewise.
9060
9061 2002-06-12 Stan Shebs <shebs@apple.com>
9062
9063 * mpw-config.in: Remove file, no longer used.
9064 * mpw-make.sed: Ditto.
9065
9066 2002-06-07 Zack Weinberg <zack@codesourcery.com>
9067
9068 * decl2.c: Update call to cpp_handle_option.
9069
9070 2002-06-07 H.J. Lu (hjl@gnu.org)
9071
9072 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
9073
9074 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
9075
9076 * error.c (cp_error_at): Fix typo.
9077
9078 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
9079
9080 * error.c (cp_diagnostic_starter): Adjust call.
9081 (maybe_print_instantiation_context): Change prototype to take a
9082 'diagnostic_info *'.
9083 (print_instantiation_full_context): Likewise.
9084 (print_instantiation_partial_context): Likewise.
9085 (cp_diagnostic_starter): Likewise.
9086 (cp_diagnostic_finalizer): Likewise.
9087 (cp_print_error_function): Likewise.
9088 (cp_printer): Take a secondary parameter as a 'text_info *'.
9089 Remove output_state savings. Adjust calls.
9090
9091 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9092
9093 * pt.c (inline_parm_levels): Mark for GC.
9094
9095 * mangle.c (start_mangling): Allocate G.substitutions here...
9096 (init_mangle): ... rather than here.
9097 (finish_mangling): Clear the varray pointer when done with it.
9098 * spew.c (yylexstring): Don't use VARRAY_FREE.
9099 * search.c (bfs_walk): Don't use VARRAY_FREE.
9100 * decl2.c (pending_statics): Use gengtype to mark.
9101 (deferred_fns): Likewise.
9102 (ssdf_decls): Likewise.
9103 (init_decl2): Delete.
9104 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
9105 (cxx_init_decl_processing): Don't call init_decl2.
9106 (cxx_pop_function_context): Don't use VARRAY_FREE.
9107 * cp-tree.h (struct saved_scope): No need for special marking
9108 of varrays.
9109 (struct language_function): Likewise.
9110 (local_classes): Use gengtype to mark.
9111 (init_decl2): Delete prototype.
9112 * class.c (init_class_processing): Don't use
9113 ggc_add_tree_varray_root.
9114 (build_vtbl_initializer): Don't use VARRAY_FREE.
9115
9116 * decl.c (typename_compare): Don't use same_type_p.
9117
9118 * decl.c: Include hashtab.h instead of hash.h.
9119 (typename_hash): Update to use htab_h.
9120 (typename_compare): Likewise.
9121 (typename_htab): Use gengtype to mark.
9122 (build_typename_type): Update to use htab_h.
9123 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9124
9125 * Make-lang.in (gt-cp-tree.h): New rule.
9126 (cp/tree.o): Depend on gt-cp-tree.h.
9127 * config-lang.in (gtfiles): Add cp/tree.c.
9128 * tree.c: Include gt-cp-tree.h.
9129 (list_hash_table): Use gengtype to mark.
9130 (init_tree): Use gengtype to mark trees.
9131
9132 * Make-lang.in (cp/decl.o): Add debug.h dependency.
9133 * call.c (struct z_candidate): Use gengtype.
9134 (USER_CONV_CAND): Use WRAPPER_ZC.
9135 (convert_class_to_reference): Use build_zc_wrapper.
9136 (build_type_conversion_1): Likewise.
9137 (build_over_call): Use WRAPPER_ZC.
9138 (add_warning): Use build_zc_wrapper.
9139 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9140 * cp-tree.h (struct lang_identifier): Use gengtype.
9141 (struct template_parm_index_s): Likewise.
9142 (struct ptrmem_cst): Likewise.
9143 (struct tree_binding): Likewise.
9144 (struct tree_overload): Likewise.
9145 (struct tree_srcloc): Likewise.
9146 (struct tree_wrapper): Likewise. Also modify to have a pointer
9147 to struct z_candidate rather than void.
9148 (enum cp_tree_node_structure_enum): New.
9149 (union lang_tree_node): New.
9150 (cxx_mark_tree): Delete prototype.
9151 (cp_tree_node_structure): New prototype.
9152 (build_ptr_wrapper): Delete prototype.
9153 (build_int_wrapper): Delete prototype.
9154 (build_zc_wrapper): New prototype.
9155 * decl.c: Include debug.h
9156 (cxx_mark_tree): Delete.
9157 (cp_tree_node_structure): New.
9158 * tree.c (build_ptr_wrapper): Delete.
9159 (build_int_wrapper): Delete.
9160 (build_zc_wrapper): New.
9161
9162 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9163 Correct typo. Patch from k_fukui@highway.ne.jp.
9164
9165 * semantics.c (current_stmt_tree): Update for change to
9166 struct language_function.
9167 (finish_mem_initializers): Likewise.
9168 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9169 * cp-tree.h (struct language_function): Rename from
9170 cp_language_function. Change all uses.
9171 (cp_function_chain): Don't need to cast.
9172
9173 * class.c (duplicate_tag_error): Reset discriminator.
9174 (check_bases_and_members): Update for data structure changes.
9175 * cp-tree.h (struct lang_id2): Use gengtype.
9176 (flagged_type_tree): Likewise.
9177 (SET_LANG_ID): Use GGC on struct lang_id2.
9178 (struct cp_language_function): Use gengtype. Remove field
9179 'x_vcalls_possible_p'.
9180 (current_vcalls_possible_p): Delete.
9181 (struct lang_type_header): New.
9182 (struct lang_type_class): Rename from struct lang_type. Include
9183 struct lang_type_header.
9184 (struct lang_type_ptrmem): New.
9185 (struct lang_type): New.
9186 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
9187 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
9188 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9189 (struct lang_decl_flags): Use gengtype. Add discriminators.
9190 (struct lang_decl): Use gengtype. Add and use discriminators.
9191 Update the macros that reference moved fields.
9192 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
9193 (SET_DECL_THUNK_P): Set discriminator too.
9194 (clear_inline_text_obstack): Delete prototype.
9195 (finish_inline_definitions): Delete prototype.
9196 (mark_pending_inlines): Delete prototype.
9197 (lang_check_failed): New prototype.
9198 * decl.c (struct named_label_use_list): Use gengtype.
9199 (struct named_label_list): Likewise.
9200 (mark_binding_level): Delete.
9201 (mark_named_label_lists): Delete.
9202 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9203 (cxx_init_decl_processing): Use generated marker routine.
9204 (begin_destructor_body): Delete dead set to
9205 current_vcalls_possible_p.
9206 (mark_lang_function): Delete.
9207 (mark_cp_function_context): Delete.
9208 (lang_mark_tree): Use generated marker routines.
9209 * decl2.c (start_objects): Set discriminator when setting
9210 GLOBAL_INIT_PRIORITY.
9211 * lex.c (retrofit_lang_decl): Set discriminators.
9212 (copy_lang_type): Update for changes to lang_type structure.
9213 (cp_make_lang_type): Set discriminator.
9214 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
9215 * search.c: Include ggc.h.
9216 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9217 (finish_inline_definitions): Delete.
9218 * spew.c (struct token): Use gengtype.
9219 (struct token_chunk): New.
9220 (struct unparsed_text): Use gengtype. Store tokens in chunks.
9221 (struct feed): Use gengtype.
9222 (feed_obstack): Delete.
9223 (feed): Mark as GC root.
9224 (pending_inlines): Mark as GC root.
9225 (pending_inlines_tail): Likewise.
9226 (processing_these_inlines): Likewise.
9227 (token_obstack): Make static.
9228 (first_token): Likewise.
9229 (init_spew): Don't initialize deleted things; use gengtype for roots.
9230 (clear_inline_text_obstack): Delete.
9231 (feed_input): Use GC for struct feed. Update for changes to
9232 struct unparsed_text.
9233 (mark_pending_inlines): Delete.
9234 (next_token): Rename from add_token. Change all callers. Update
9235 for changes to struct unparsed_text.
9236 (space_for_token): New.
9237 (remove_last_token): New.
9238 (alloc_unparsed_text): New.
9239 (snarf_block): Take an unparsed_text. Update for changes to struct
9240 unparsed_text.
9241 (snarf_method): Update for changes to struct unparsed_text.
9242 (snarf_defarg): Update for changes to struct unparsed_text.
9243 * tree.c (lang_check_failed): New.
9244
9245 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9246 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9247 (cp/spew.o): Add dependency on gt-<filename>.h.
9248 (cp/decl2.o): Add dependency on gt-<filename>.h.
9249 (cp/call.o): Add dependency on gt-<filename>.h.
9250 (cp/pt.o): Add dependency on gt-<filename>.h.
9251 (cp/repo.o): Add dependency on gt-<filename>.h.
9252 (cp/parse.o): Add dependency on gt-<filename>.h.
9253 * call.c: Use gengtype for roots.
9254 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9255 decl2.c parse.y pt.c repo.c spew.c.
9256 * cp-tree.h: Use gengtype for roots.
9257 (struct saved_scope): Use GGC, gengtype.
9258 (cp_parse_init): Delete prototype.
9259 (init_pt): Delete prototype.
9260 * decl.c: Use gengtype for roots.
9261 (mark_saved_scope): Delete.
9262 (cxx_init_decl_processing): Don't call deleted initilisation
9263 routines.
9264 (signed_size_zero_node): Delete, unused.
9265 * decl.h: Use gengtype for roots.
9266 * decl2.c: Use gengtype for roots.
9267 * lex.h: Use gengtype for roots.
9268 * parse.y: Use gengtype for roots.
9269 (cp_parse_init): Delete.
9270 * pt.c: Use gengtype for roots.
9271 (init_pt): Delete.
9272 * repo.c: Use gengtype for roots.
9273 * spew.c: Use gengtype for roots.
9274
9275 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
9276 (cp/decl.o): Add dependency on gtype-cp.h.
9277 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9278 Include gtype-cp.h. Allow for filename changes.
9279
9280 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9281 (cp/decl.o): Add cp/gt-decl.h dependency.
9282 * config-lang.in (gtfiles): New.
9283 * tree.h: Rename struct binding_level to struct cp_binding_level.
9284 * decl.c: Rename struct binding_level to struct cp_binding_level.
9285 Include cp/gt-decl.h.
9286 (struct cp_binding_level): Use gengtype.
9287 (make_binding_level): Use GGC on struct cp_binding_level.
9288 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9289 (cxx_init_decl_processing): Mark free_binding_level as
9290 deletable.
9291
9292 * decl.c (mark_cp_function_context): Update calling sequence.
9293
9294 * decl.c (start_function): Don't free 'struct
9295 cp_language_function'.
9296 (pop_cp_function_context): Likewise.
9297 (save_function_data): Allocate it using GC.
9298 * semantics.c (genrtl_start_function): Don't free 'struct
9299 cp_language_function'.
9300
9301 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
9302
9303 * lang-specs.h: Use cpp_debug_options.
9304
9305 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9306
9307 * mangle.c, tree.c: Include real.h.
9308 * Make-lang.in: Update dependency lists.
9309
9310 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
9311
9312 * lex.c: Don't include c-lex.h.
9313 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9314
9315 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
9316
9317 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9318
9319 2002-05-22 Richard Henderson <rth@redhat.com>
9320
9321 * decl.c (obscure_complex_init): Check for VAR_DECL
9322 before using DECL_THREAD_LOCAL.
9323
9324 2002-05-22 Richard Henderson <rth@redhat.com>
9325
9326 * decl.c (check_tag_decl): Handle RID_THREAD.
9327 (obscure_complex_init): Reject run-time init of tls.
9328 (grokvardecl, grokdeclarator): Handle RID_THREAD.
9329 * lex.c (reswords): Add __thread.
9330 (rid_to_yy): Map RID_THREAD to SCSPEC.
9331
9332 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
9333
9334 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9335 * cp-tree.h (cxx_post_options): Kill.
9336 * cp-lex.c (cxx_post_options): Kill.
9337
9338 2002-05-21 Richard Henderson <rth@redhat.com>
9339
9340 * lex.c (rid_to_yy): Add RID_THREAD.
9341
9342 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
9343
9344 * init.c (build_vec_init): Test for trivial copy-assignment when
9345 copy-assigning arrays.
9346
9347 2002-05-20 Andreas Jaeger <aj@suse.de>
9348
9349 * init.c (build_default_init): Remove unused variable.
9350
9351 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
9352
9353 * call.c (any_strictly_viable): New.
9354 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9355
9356 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9357
9358 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9359
9360 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9361
9362 PR c++/186, DR 259
9363 * pt.c (do_decl_instantiation): Don't complain explicit
9364 instantiation after explicit specialization.
9365 (do_type_instantiation): Likewise.
9366
9367 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
9368
9369 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9370 renamed from...
9371 (complete_type_or_else): ... this. Redefined as macro.
9372 (cxx_incomplete_type_diagnostic): Declare.
9373 (cxx_incomplete_type_error): Define as macro.
9374 * init.c (build_delete): Warn about incomplete types other than
9375 void, and use the built-in operator delete for them.
9376 * typeck.c (complete_type_or_diagnostic): Renamed from
9377 complete_type_or_else. Added warn_only argument, passed to...
9378 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
9379 warnings or errors depending on new warn_only argument. Renamed
9380 from...
9381 (cxx_incomplete_type_error): ... this. New implementation in
9382 terms of cxx_incomplete_type_diagnostic.
9383
9384 2002-05-18 Jason Merrill <jason@redhat.com>
9385
9386 PR c++/6611
9387 * decl2.c (import_export_decl): If we clear
9388 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9389
9390 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9391
9392 PR c++/6620
9393 * pt.c (verify_class_unification): Don't check if PARM is template
9394 parameter dependent. Simplify.
9395 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9396 parameter dependent expression.
9397
9398 2002-05-14 Jason Merrill <jason@redhat.com>
9399
9400 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9401 Do set DECL_COMDAT.
9402 (synthesize_tinfo_var): Take the public decl.
9403 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
9404 (emit_tinfo_decl): Adjust. Call import_export_decl.
9405 * decl2.c (import_export_decl): Simplify tinfo decl handling.
9406
9407 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
9408
9409 * cp-tree.h (struct lang_type): Added non_zero_init.
9410 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9411 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9412 * class.c (check_field_decls): Test non_zero_init.
9413 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9414 zero-to-NULL conversions.
9415 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9416 type that needs zero-initialization without zeros.
9417 (check_initializer_decl): Compute zero-initializer for types
9418 that require a non-trivial one.
9419 * init.c (build_forced_zero_init): New function.
9420 (build_default_init): Use it.
9421 * tree.c (zero_init_p): New function.
9422 * typeck2.c (force_store_init_value): New function.
9423 (process_init_constructor): Create non-trivial zero-initializers
9424 for array members and class fields.
9425
9426 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
9427
9428 * lang-specs.h: Remove redundant -lang-c++.
9429
9430 2002-05-13 Jason Merrill <jason@redhat.com>
9431
9432 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9433 (fixed_type_or_null): See through reference vars.
9434 (build_base_path): Vtable contents are constant.
9435 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9436
9437 2002-05-12 Jason Merrill <jason@redhat.com>
9438
9439 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9440 structs are safe.
9441
9442 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
9443
9444 * cp-tree.h (flag_ansi): Remove.
9445 * decl2.c (flag_ansi): Remove.
9446 (cxx_decode_option): Set flag_iso and flag_undef.
9447
9448 2002-05-09 Jason Merrill <jason@redhat.com>
9449
9450 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9451 Use subtraction rather than a bitmask to get the index.
9452 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9453
9454 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9455
9456 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
9457
9458 * Make-lang.in (decl2.o): Update.
9459 * cp-tree.h (warn_multichar): Remove.
9460 * decl2.c: Include c-common.h.
9461 (warn_multichar): Remove.
9462
9463 2002-05-03 Jason Merrill <jason@redhat.com>
9464
9465 * tree.c (build_cplus_array_type): Only const and volatile get
9466 special handling.
9467
9468 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9469
9470 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9471
9472 ABI change, returning simple classes from functions.
9473 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9474 TYPE_HAS_TRIVIAL_INIT_REF is false or
9475 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9476
9477 2002-04-30 Jason Merrill <jason@redhat.com>
9478
9479 PR debug/6436
9480 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9481 anonymous class with a typedef if there are attributes.
9482
9483 2002-04-29 Paul Eggert <eggert@twinsun.com>
9484
9485 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9486
9487 2002-04-29 Jakub Jelinek <jakub@redhat.com>
9488
9489 PR c++/6477
9490 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9491 non-NULL first.
9492
9493 2002-04-29 Mark Mitchell <mark@codesourcery.com>
9494
9495 PR c++/6492
9496 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9497 enter that scope before name lookup.
9498
9499 PR c++/6486
9500 * method.c (do_build_copy_constructor): Avoid building
9501 cv-qualified reference types.
9502
9503 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
9504
9505 PR c++/5719
9506 * decl.c (grok_op_properties): Assignment ops don't have to return
9507 by value. operator% should.
9508
9509 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
9510
9511 PR c/6343
9512 * decl.c (duplicate_decls): Call merge_weak.
9513
9514 2002-04-26 Richard Henderson <rth@redhat.com>
9515
9516 * parse.y (malloced_yyss, malloced_yyvs): New.
9517 (yyoverflow): Re-add. Set them.
9518 (free_parser_stacks): New.
9519
9520 2002-04-26 Mark Mitchell <mark@codesourcery.com>
9521
9522 PR c++/6497
9523 * method.c (do_build_assign_ref): Pass a derivation to
9524 build_method_call when calling base class assignment operators.
9525
9526 2002-04-26 Richard Henderson <rth@redhat.com>
9527
9528 * parse.y (yyoverflow): Revert.
9529
9530 2002-04-26 Richard Henderson <rth@redhat.com>
9531
9532 PR c/3581
9533 * parse.y (string): Remove. Update all uses to use STRING
9534 instead, and not call combine_strings.
9535 * rtti.c (tinfo_name): Use fix_string_type.
9536 * semantics.c (finish_asm_stmt): Don't call combine_strings.
9537 * spew.c (yylexstring): New.
9538 (read_token): Use it.
9539
9540 2002-04-25 Richard Henderson <rth@redhat.com>
9541
9542 PR c/2161
9543 * parse.y (yyoverflow): New.
9544
9545 2002-04-25 Jason Merrill <jason@redhat.com>
9546
9547 PR c++/5607
9548 * search.c (check_final_overrider): No longer static.
9549 * class.c (update_vtable_entry_for_fn): Call it.
9550 * cp-tree.h: Adjust.
9551
9552 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9553
9554 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9555 * cp-tree.h (cxx_set_yydebug): Die.
9556 * lex.c (YYDEBUG): Get from c-lex.h.
9557 (cxx_set_yydebug): Remove.
9558 * parse.y: Include c-lex.h.
9559 (YYDEBUG): Get from c-lex.h.
9560
9561 2002-04-24 Mark Mitchell <mark@codesourcery.com>
9562
9563 PR c++/6438.
9564 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9565 void.
9566
9567 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
9568
9569 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9570 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9571 Redefine.
9572 * cp-tree.h (cp_attribute_table): Rename.
9573 * decl.c (lang_attribute_table): Remove declaration.
9574 (cxx_init_decl_processing): Don't set it.
9575 * tree.c (cp_attribute_table): Rename.
9576
9577 2002-04-24 Jason Merrill <jason@redhat.com>
9578
9579 PR c++/6331
9580 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9581 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9582 The pedwarn for array assignment is now unconditional.
9583 * tree.c (build_cplus_array_type_1): Still process simple array types
9584 normally in templates.
9585
9586 PR c++/6395
9587 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9588 stuff for comdats.
9589
9590 2002-04-23 Jakub Jelinek <jakub@redhat.com>
9591
9592 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9593 node with attributes.
9594
9595 2002-2-23 David O'Brien <obrien@FreeBSD.org>
9596
9597 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9598 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9599
9600 2002-04-23 Mark Mitchell <mark@codesourcery.com>
9601
9602 PR c++/6256:
9603 * pt.c (tsubst_friend_class): Handle templates with explicit
9604 nested names.
9605
9606 PR c++/6331:
9607 * typeck.c (merge_types): Remember the cv-qualification of pointer
9608 types when merging them.
9609
9610 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
9611
9612 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9613 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9614 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9615 cxx_mark_function_context): New.
9616 * decl.c (push_cp_function_context, pop_cp_function_context,
9617 mark_cp_function_context): Rename for consistency.
9618 (cxx_init_decl_processing): Don't set old hooks.
9619
9620 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
9621
9622 * call.c (convert_type_from_ellipsis): Rename, update.
9623 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9624 * cp-tree.h (convert_type_from_ellipsis): Rename.
9625 * decl.c (cxx_init_decl_processing): Don't set hook.
9626
9627 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9628
9629 * call.c (build_new_method_call): Update.
9630 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9631 * cp-tree.h (cxx_incomplete_type_error): New.
9632 * decl.c (grokdeclarator, grokparms): Update.
9633 * decl2.c (check_classfn): Update.
9634 * pt.c (tsubst): Update.
9635 * typeck.c (complete_type_or_else, expr_sizeof,
9636 decay_conversion): Update.
9637 * typeck2.c (incomplete_type_error): Rename.
9638 (add_exception_specifier): Update.
9639
9640 2002-04-18 Jason Merrill <jason@redhat.com>
9641
9642 PR c++/5658
9643 * search.c (setup_class_bindings): A class template qualifies as a
9644 type binding.
9645
9646 2002-04-17 Jakub Jelinek <jakub@redhat.com>
9647
9648 PR c++/6316
9649 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9650 before expanding.
9651
9652 2002-04-16 Mark Mitchell <mark@codesourcery.com>
9653
9654 * init.c (begin_init_stmts): Remove commented out code.
9655 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9656 * semantics.c (begin_gobal_stmt_expr): Adjust call to
9657 expand_start_stmt_expr.
9658
9659 2002-04-15 Mark Mitchell <mark@codesourcery.com>
9660
9661 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9662 dso_handle itself, to __cxa_atexit.
9663
9664 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9665
9666 * error.c (cxx_print_error_function): Adjust call to macros.
9667
9668 2002-04-14 Jakub Jelinek <jakub@redhat.com>
9669
9670 * class.c (layout_virtual_bases): Do all dsize computation on trees.
9671
9672 2002-04-14 Jason Merrill <jason@redhat.com>
9673
9674 * typeck.c (get_member_function_from_ptrfunc): Don't do
9675 gratuitious division and multiplication on
9676 ptrmemfunc_vbit_in_delta targets.
9677
9678 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9679
9680 PR c++/5373.
9681 * semantics.c (finish_expr_stmt): Remember the type of the
9682 expression before any conversions are performed.
9683
9684 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9685
9686 PR c++/5189.
9687 * call.c (add_template_candidate_real): Do not treat member
9688 templates as copy constructors.
9689
9690 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9691
9692 * decl.c (duplicate_decls): Do not copy the RTL for a variable
9693 declaration if the old variable had an incomplete type and the new
9694 variable does not.
9695 (complete_vars): Do not call layout_decl for completed variables.
9696
9697 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
9698
9699 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9700 with an explicit one.
9701 (follow_tag_typedef): New.
9702 (lookup_tag): Use it to extract the tag of an explicit typedef.
9703 (xref_tag): Likewise.
9704
9705 2002-04-11 Andrew Haley <aph@redhat.com>
9706
9707 * typeck.c (type_after_usual_arithmetic_conversions):
9708 If two types have the same variant, return immediately.
9709 When two floating-point operands are the same precision:
9710 convert to float if one of the operands is float;
9711 if neither operand is one of the standard types, return the type
9712 of the first operand.
9713
9714 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
9715
9716 PR c++/5507
9717 * decl.c (make_typename_type): Remove implicit typenameness.
9718
9719 2002-04-09 Jason Merrill <jason@redhat.com>
9720
9721 PR optimization/6189
9722 * semantics.c (genrtl_start_function): Don't free
9723 DECL_SAVED_FUNCTION_DATA for inline functions.
9724
9725 * init.c (build_member_call): For now, don't convert to
9726 intermediate base if it would cause an error.
9727
9728 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
9729
9730 * parse.y (namespace_qualifier, maybe_identifier,
9731 begin_explicit_instantiation, end_explicit_instantiation,
9732 apparent_template_type, .finish_template_type,
9733 do_id, maybe_init, defarg_again, component_decl_1):
9734 Add ending ';', in accordance with POSIX.
9735
9736 2002-04-06 Mark Mitchell <mark@codesourcery.com>
9737
9738 PR c++/5571
9739 * class.c (layout_class_type): Remember incomplete static
9740 variables.
9741 (finish_struct_1): Call complete_vars, not
9742 hack_incomplete_structures.
9743 * cp-tree.h (hack_incomplete_structures): Rename to ...
9744 (complete_vars): ... this.
9745 (struct saved_scope): Remove incomplete.
9746 (namespace_scope_incomplete): Remove.
9747 * decl.c (struct binding_level): Remove incomplete.
9748 (incomplete_vars): New variable.
9749 (mark_binding_level): Don't mark incomplete.
9750 (print_binding_level): Don't print it.
9751 (mark_saved_scope): Don't mark incomplete.
9752 (pushdecl): Use maybe_register_incopmlete_var.
9753 (cxx_init_decl_processing): Register incomplete_vars for GC.
9754 (start_decl_1): Clarify error message.
9755 (hack_incomplete_vars): Remove.
9756 (maybe_register_incomplete_var): New function.
9757 (complete_vars): Likewise.
9758
9759 2002-04-06 Jason Merrill <jason@redhat.com>
9760
9761 PR c++/4934
9762 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9763 set before checking it.
9764
9765 PR c++/525
9766 * init.c (build_member_call): Use build_scoped_ref.
9767 (resolve_offset_ref): Likewise.
9768 * call.c (build_scoped_method_call): Likewise.
9769 * tree.c (maybe_dummy_object): Kludge around current_class_type being
9770 wrong.
9771 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9772 * cp-tree.h: Adjust.
9773
9774 * init.c (push_base_cleanups): Just use build_scoped_method_call.
9775
9776 PR c++/6179
9777 * method.c (implicitly_declare_fn): Pass unqualified type to
9778 synthesize_exception_spec.
9779
9780 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9781
9782 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9783 * cvt.c: Update comment.
9784 * init.c (expand_cleanup_for_base): Update.
9785 * semantics.c (finish_parenthesized_expr): Update.
9786 * typeck.c (cp_truthvalue_conversion): Update.
9787
9788 2002-04-04 Jason Merrill <jason@redhat.com>
9789
9790 * semantics.c (finish_eh_cleanup): New fn.
9791 * cp-tree.h: Add prototype.
9792 * init.c (perform_member_init, expand_cleanup_for_base): Use
9793 finish_eh_cleanup.
9794 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9795 * cp-tree.h: Remove references.
9796 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9797 * dump.c (cp_dump_tree): Likewise.
9798 * pt.c (tsubst_expr): Likewise.
9799 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9800 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9801 * tree.c (cp_statement_code_p): Likewise.
9802
9803 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9804
9805 PR c++/5636
9806 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9807 cleanup for nrv.
9808
9809 PR c++/5104
9810 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9811 specifiers.
9812 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9813
9814 2002-04-03 Richard Henderson <rth@redhat.com>
9815
9816 * cp-lang.c (cxx_warn_unused_global_decl): New.
9817 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9818
9819 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
9820
9821 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9822 * tree.c (init_tree): Don't set hook.
9823
9824 2002-04-03 Roger Sayle <roger@eyesopen.com>
9825
9826 PR c++/5998:
9827 * decl.c (duplicate_decls): Don't mess with assembler names when
9828 redeclaring builtin functions as static.
9829
9830 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9831
9832 * call.c (build_addr_func): Update.
9833 * class.c (resolve_address_of_overloaded_function): Update.
9834 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9835 * cp-tree.h (cxx_mark_addressable): New.
9836 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9837 * decl2.c (build_cleanup): Update.
9838 * except.c (build_throw): Update.
9839 * init.c (resolve_offset_ref): Update.
9840 * pt.c (convert_nontype_argument): Update.
9841 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9842 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9843 unary_complex_lvalue): Update.
9844 (mark_addressable): Rename.
9845
9846 2002-04-01 Roger Sayle <roger@eyesopen.com>
9847
9848 PR c++/5998:
9849 * decl.c (duplicate_decls): Overwrite the RTL when (and only
9850 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
9851 but follow the SET_DECL_RTL idiom used elsewhere in the function.
9852
9853 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9854
9855 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9856 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9857 * decl.c (grokdeclarator): Update.
9858 * mangle.c (write_integer_cst): Update.
9859 * typeck.c (build_binary_op): Update.
9860
9861 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9862
9863 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9864 * lex.c (cxx_init): Don't set hook.
9865
9866 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9867
9868 * Make-lang.in (error.o): Update.
9869 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9870 * cp-tree.h (struct diagnostic_context): Predeclare.
9871 (cxx_print_error_function): New.
9872 * error.c: Include langhooks-def.h.
9873 (lang_print_error_function): Rename. Update.
9874 (init_error): Don't set hook.
9875
9876 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9877
9878 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9879 Redefine.
9880 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9881 * decl.c (finish_enum): Similarly.
9882 * error.c (dump_type): Similarly.
9883 * lex.c (cxx_init): Similarly.
9884 * mangle.c (write_builtin_type): Similarly.
9885 * typeck.c (comptypes): Similarly.
9886
9887 2002-03-28 Roger Sayle <roger@eyesopen.com>
9888
9889 PR c++/5998:
9890 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9891 in the g++ front-end.
9892 (duplicate_decl): Allow redefinition of anticipated built-ins.
9893 Fix inlining problem by over-writing the old DECL_RTL.
9894 (lookup_namespace_name): Fail to find an identifier in the
9895 specified namespace if its still anticipated.
9896 (builtin_function_1): New function split out from builtin_function
9897 to create a builtin in the current namespace with given context.
9898 (builtin_function): Call builtin_function_1 to define the
9899 appropriate builtins in both the std and global namespaces.
9900 (select_decl): Don't test for anticipated decls here.
9901 (unqualified_namespace_lookup): Instead ignore them whilst
9902 searching through scopes and namespaces.
9903 * decl2.c (do_nonmember_using_decl): If a using declaration
9904 specifies an anticipated built-in function, mark it as no longer
9905 anticipated in that scope.
9906 (ambiguous_decl): Avoid resolving to an anticipated decl.
9907 * lex.c (do_scoped_id): Fail to find an identifier in the global
9908 namespace if its still anticipated.
9909
9910 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9911
9912 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9913 * cp-tree.h (cp_make_lang_type): Rename.
9914 * lex.c (cp_make_lang_type): Rename.
9915 (make_aggr_type): Update.
9916 * tree.c (init_tree): Don't set make_lang_type_fn.
9917
9918 2002-03-29 Jakub Jelinek <jakub@redhat.com>
9919
9920 PR c++/6073
9921 * class.c (finish_struct_1): Update static field's DECL_MODE even
9922 if its type is a variant of t.
9923
9924 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9925
9926 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9927 * cp-tree.h (cxx_insert_default_attributes): New.
9928 * decl.c (insert_default_attributes): Rename.
9929
9930 2002-03-27 Mark Mitchell <mark@codesourcery.com>
9931
9932 PR c++/4884
9933 * call.c (build_op_delete_call): Allow for the fact the placement
9934 may be a COMPOUND_EXPR.
9935
9936 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9937
9938 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9939 * cp-tree.h (init_cplus_expand): Remove.
9940 (cxx_expand_expr): New.
9941 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9942 fix prototype.
9943 (init_cplus_expand): Remove.
9944 * lex.c (cxx_init): Don't call init_cplus_expand.
9945
9946 2002-03-26 Mark Mitchell <mark@codesourcery.com>
9947
9948 PR c++/4884.
9949 * init.c (build_new_1): Allow for the fact the result of
9950 build_function_call may be a COMPOUND_EXPR.
9951
9952 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
9953
9954 PR c++/5682
9955 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9956 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9957 (dfs_skip_nonprimary_vbases_markedp): Remove.
9958 * search.c (get_shared_vbase_if_not_primary): Remove.
9959 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9960 (dfs_skip_nonprimary_vbases_markedp): Remove.
9961 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9962 (dfs_marked_real_bases_queue_p): Likewise.
9963
9964 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9965
9966 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9967 * cp-tree.h (cxx_mark_tree): New.
9968 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9969
9970 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9971
9972 * cp-tree.h (cxx_maybe_build_cleanup): New.
9973 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9974 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9975 * tree.c (build_target_expr): Update.
9976 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9977
9978 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
9979
9980 * decl2.c (cxx_decode_option): Handle -E.
9981 * lang-specs.h (default_compilers): Preprocess with cc1plus.
9982 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9983
9984 2002-03-23 Jakub Jelinek <jakub@redhat.com>
9985
9986 PR c++/6037
9987 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9988
9989 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9990
9991 * error.c (dump_type): Be careful about implicit typenames.
9992
9993 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9994
9995 PR C++/3656
9996 * semantics.c (finish_base_specifier): Handle erronous base
9997 classes.
9998
9999 2002-03-22 Zack Weinberg <zack@codesourcery.com>
10000
10001 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
10002 REAL_IS_NOT_DOUBLE.
10003
10004 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
10005
10006 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
10007 an index into the vtable_entry array regardless of
10008 TARGET_PTRMEMFUNC_VBIT_LOCATION.
10009
10010 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
10011
10012 * tree.c (cp_cannot_inline_tree_fn): Same.
10013
10014 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
10015
10016 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
10017 insert_block, getdecls, global_bindings_p): New.
10018
10019 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
10020
10021 PR c++/4361
10022 * mangle.c (struct globals) Add internal_mangling_p member.
10023 (write_template_param): Do internal mangling, if needed.
10024 (mangle_conv_op_name_for_type): Request internal mangling.
10025
10026 2002-03-20 Jason Merrill <jason@redhat.com>
10027
10028 PR c++/2136
10029 * init.c (build_delete): Check access for a member op delete here.
10030 * decl2.c (delete_sanity): Not here.
10031
10032 2002-03-19 Jason Merrill <jason@redhat.com>
10033
10034 PR c++/5118
10035 * class.c (get_vfield_name): Use the constructor_name.
10036
10037 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
10038
10039 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
10040 * cp-tree.h (lang_printable_name): Rename.
10041 * error.c (lang_decl_name): Use new hook.
10042 * lex.c (cxx_init): Remove old hook.
10043 * pt.c (tsubst_decl): Use new hook.
10044 * tree.c (lang_printable_name): Rename.
10045
10046 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
10047
10048 PR c++/3882
10049 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
10050 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
10051 only after recording the declaration.
10052
10053 2002-03-18 Jason Merrill <jason@redhat.com>
10054
10055 PR c++/2039
10056 * init.c (resolve_offset_ref): Hand off to build_component_ref.
10057
10058 PR c++/4222, c++/5995
10059 * call.c (build_over_call): Fix empty class logic.
10060
10061 PR c++/3870
10062 * cp-tree.h (struct saved_scope): Add last_parms field.
10063 * decl.c (maybe_push_to_top_level): Save last_function_parms.
10064 (pop_from_top_level): Restore it.
10065
10066 PR c++/4377
10067 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
10068 NON_LVALUE_EXPRs.
10069
10070 PR c++/4003
10071 * pt.c (tsubst_friend_function): Use decl_namespace_context.
10072
10073 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
10074 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
10075 type with a nontrivial destructor.
10076
10077 2002-03-17 Jason Merrill <jason@redhat.com>
10078
10079 PR c++/4460
10080 * class.c (build_base_path): Virtual base layout is fixed in
10081 in-charge [cd]tors.
10082
10083 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
10084
10085 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
10086 * parse.y (yyparse): Remove macro.
10087
10088 2002-03-17 Jason Merrill <jason@redhat.com>
10089
10090 PR c++/5757
10091 * init.c (build_new_1): Pass the right pointer to op delete.
10092
10093 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
10094
10095 PR c++/4361
10096 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
10097 conversion operators go.
10098 (struct lang_decl_flags): Add template_conv_p and unused
10099 bitfields.
10100 (DECL_TEMPLATE_CONV_FN_P): New macro.
10101 * call.c (build_user_type_conversion_1): Don't check second type
10102 conversion of overload set first.
10103 * class.c (add_method): Make sure templated conversion operators
10104 all end up on slot 2.
10105 * lex.c (do_identifier): A conversion operator token might be
10106 satisfied by a templated conversion operator.
10107 * pt.c (check_explicit_specialization): Use
10108 CLASSTYPE_FIRST_CONVERSION_SLOT.
10109 (template_parm_this_level_p): New function.
10110 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
10111 * search.c (lookup_fnfields_1): Template conversions will be on
10112 the first slot.
10113 * typeck.c (build_component_ref): Preserve the type of an
10114 conversion operator name on the overload type.
10115 (build_x_function_call): Retrieve the conversion operator name.
10116
10117 2002-03-15 Richard Henderson <rth@redhat.com>
10118
10119 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10120
10121 2002-03-15 Mark Mitchell <mark@codesourcery.com>
10122
10123 * cp-tree.h (CLEANUP_DECL): Remove.
10124 (CLEANUP_EXPR): Likewise.
10125 * decl.c (destroy_local_var): Simplify.
10126 (maybe_build_cleanup): Tidy.
10127 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10128 * semantics.c (cp_expand_stmt): Likewise.
10129 * cp/tree.c (cp_statement_code_p): Likewise.
10130
10131 2002-03-15 Jason Merrill <jason@redhat.com>
10132
10133 PR c++/5857
10134 * decl.c (duplicate_decls): Use merge_types instead of common_type.
10135 * typeck.c (common_type): Just hand off to
10136 type_after_usual_arithmetic_conversions and
10137 composite_pointer_type.
10138 (merge_types): New fn.
10139 (commonparms): Use it instead of common_type.
10140 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10141 (composite_pointer_type): Also handle attributes.
10142 * cp-tree.h: Declare merge_types.
10143
10144 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10145 variables.
10146 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10147
10148 2002-03-14 Richard Henderson <rth@redhat.com>
10149
10150 * decl.c: Include c-pragma.h.
10151 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10152 * Make-lang.in: Update dependencies.
10153
10154 2002-03-14 Jakub Jelinek <jakub@redhat.com>
10155
10156 PR c++/5908
10157 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10158 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10159
10160 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10161
10162 * mangle.c (write_builtin_type): Handle 128-bit integers even if
10163 they are not a standard integer type.
10164
10165 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10166
10167 * cp-tree.h (init_init_processing): Remove declaration.
10168 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10169 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10170
10171 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10172
10173 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10174 Define.
10175 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10176 tree_code_length.
10177 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10178 cplus_tree_code_name): Delete.
10179 (cxx_init): Don't call add_c_tree_codes, instead set
10180 lang_unsafe_for_reeval. Don't try to copy into the various
10181 tree_code arrays.
10182
10183 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
10184
10185 PR c++/5659
10186 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10187 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10188 definitions.
10189
10190 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10191
10192 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
10193 DR209 is now not a defect.
10194 * cp-tree.h (skip_type_access_control): Remove.
10195 * decl.c (grokdeclarator): Do type access control for friend
10196 declarations.
10197 * semantics.c (decl_type_access_control): Don't reset
10198 current_type_lookups.
10199 (save_type_access_control): Always save the lookups.
10200 (skip_type_access_control): Remove.
10201 (finish_class_definition): Don't change type_lookups.
10202
10203 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10204
10205 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
10206 It is incorrect.
10207 * typeck.c (build_static_cast): Compare non-qualified types
10208 with pointer to member conversions.
10209
10210 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
10211 Daniel Berlin <dan@dberlin.org>
10212
10213 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10214 (cxx_get_alias_set): Use it.
10215
10216 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10217
10218 * cp-tree.h (stabilize_expr): Prototype.
10219
10220 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
10221
10222 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10223 conditional return void.
10224
10225 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
10226
10227 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10228 * cp-tree.h (cxx_unsave): New.
10229 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10230 (init_tree): Update.
10231
10232 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10233
10234 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10235 explicit sizeof/sizeof.
10236 * decl2.c (cxx_decode_option): Likewise.
10237 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10238
10239 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
10240
10241 PR c++/775
10242 * decl.c (lookup_tag): Only reject enum/class mismatch, not
10243 class/union mismatch.
10244 * parse.y (check_class_key): New function.
10245 (structsp): Call it.
10246
10247 2002-03-01 Michael Matz <matz@suse.de>
10248
10249 * typeck.c (cp_pointer_int_sum): Complete inner type which is
10250 used later by size_in_bytes().
10251
10252 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
10253
10254 * cp-tree.h: Require __GNUC__ to be #defined.
10255 (build_init): Add missing prototype.
10256
10257 2002-03-01 Jason Merrill <jason@redhat.com>
10258
10259 * except.c: Don't include decl.h or obstack.h. Do include
10260 tree-inline.h.
10261 (build_throw): Destroy temporaries from the thrown
10262 expression before calling __cxa_throw. Construct a thrown
10263 temporary directly into the exception object.
10264 (stabilize_throw_expr): New function.
10265 (wrap_cleanups_r): New function.
10266 * tree.c (stabilize_expr): New function.
10267 * init.c (build_init): New function.
10268 * Make-lang.in (cp/except.o): Adjust .h deps.
10269
10270 2002-02-28 Jason Merrill <jason@redhat.com>
10271
10272 * search.c (lookup_base_r): Don't clear is_non_public just because
10273 we found a friendly scope.
10274
10275 * decl.c (finish_function): Only warn about missing return
10276 statement with -Wreturn-type.
10277
10278 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
10279
10280 * class.c (build_clone): Update.
10281 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10282 * cp-tree.h (cxx_dup_lang_specific_decl): New.
10283 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10284 (copy_decl): Update.
10285 * method.c (make_thunk): Update.
10286
10287 2002-02-27 Zack Weinberg <zack@codesourcery.com>
10288
10289 * decl2.c: Delete traditional-mode-related code copied from
10290 the C front end but not used, or used only to permit the
10291 compiler to link.
10292
10293 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
10294
10295 PR c++/4093
10296 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10297 to void.
10298
10299 2002-02-22 Jakub Jelinek <jakub@redhat.com>
10300
10301 PR other/5746
10302 * semantics.c (finish_switch_cond): Don't call get_unwidened
10303 if error_mark_node.
10304
10305 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
10306
10307 PR c++/2645, DR 295
10308 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10309 tf_keep_type_decl.
10310 (make_typename_type): Use tsubst_flags_t.
10311 * decl.c (make_typename_type): Adjust. Return non-artificial
10312 TYPE_DECLs, if required.
10313 (grokdeclarator): Simplify CVR qualification handling. Allow bad
10314 qualifiers on typedef types.
10315 * decl2.c (handle_class_head): Adjust make_typename_type call.
10316 * parse.y (nested_name_specifier): Likewise.
10317 (typename_sub0): Likewise.
10318 (typename_sub1): Likewise.
10319 * pt.c (convert_template_argument): Adjust make_typename_type
10320 return value.
10321 (tsubst): Adjust cp_build_qualified_type_real calls.
10322 (check_cv_quals_for_unify): Cope with allowing bad qualifications
10323 on template type parms.
10324 (instantiate_decl): Recheck substitutions to give warnings on bad
10325 qualifications.
10326 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10327
10328 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
10329
10330 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10331
10332 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10333 unless DECL_ALWAYS_INLINE.
10334
10335 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10336
10337 * typeck.c (cp_pointer_int_sum): Renamed from
10338 pointer_int_sum, call pointer_int_sum.
10339
10340 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10341
10342 * decl.c (duplicate_decls): Return 0 if issued error about
10343 redeclaration.
10344
10345 2002-02-19 Jason Merrill <jason@redhat.com>
10346
10347 ABI change: Mangle `void (A::*)() const' as
10348 M1AKFvvE, not MK1AFvvE.
10349 * mangle.c (write_function_type): Write cv-quals for member
10350 function type here.
10351 (write_pointer_to_member_type): Not here.
10352
10353 2002-02-18 Jason Merrill <jason@redhat.com>
10354
10355 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10356 (do_decl_instantiation): Likewise.
10357
10358 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
10359
10360 PR c++/5685
10361 * decl.c (duplicate_decls): Make warning unconditional
10362 if duplicate default argument declarations are present.
10363
10364 2002-02-17 Jakub Jelinek <jakub@redhat.com>
10365
10366 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10367 shortening.
10368
10369 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
10370
10371 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10372 remove incorrect comment. Move #if 0'd code to common path. Use
10373 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10374
10375 2002-02-13 Jason Merrill <jason@redhat.com>
10376
10377 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10378 (finish_function): Don't warn if current_function_returns_null.
10379
10380 * typeck2.c (digest_init): Do handle values of vector type.
10381
10382 * typeck2.c (digest_init, process_init_constructor): Treat vectors
10383 like arrays.
10384
10385 2002-02-11 Jason Merrill <jason@redhat.com>
10386
10387 * parse.y (reserved_declspecs): Don't handle attributes.
10388 (reserved_typespecquals): Handle them here.
10389 * Make-lang.in (parse.c): Adjust expected conflicts.
10390
10391 2002-02-08 Jakub Jelinek <jakub@redhat.com>
10392
10393 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10394 instead of compstmt.
10395 (compstmt_or_stmtexpr): Renamed from compstmt.
10396 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10397
10398 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10399
10400 Rename instantiate_type_flags to tsubst_flags_t & expand use.
10401 * cp-tree.h (instantiate_type_flags): Rename to ...
10402 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10403 add tf_warning flag.
10404 (instantiate_type): Adjust prototype.
10405 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10406 do_type_instantiation, cp_build_qualified_type_real): Likewise.
10407 cp_build_qualified_type: Adjust.
10408 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10409 tf_*.
10410 * call.c (standard_conversion): Rename itf_* to tf_*.
10411 (reference_binding): Likewise.
10412 (convert_like_real): Likewise.
10413 * cvt.c (cp_convert_to_pointer): Likewise.
10414 (convert_to_reference): Likewise.
10415 * decl.c (lookup_namespace_name): Use tf_* flags.
10416 (make_typename_type): Likewise.
10417 (grokdeclarator): Likewise.
10418 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10419 (coerce_template_template_parms, convert_template_argument,
10420 coerce_template_parms, maybe_get_template_decl_from_type_decl,
10421 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10422 instantiate_class_template, tsubst_template_arg_vector,
10423 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10424 tsubst_decl, tsubst_arg_types, tsubst_function_type,
10425 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10426 instantiate_template, fn_type_unification,
10427 resolve_overloaded_unification, verify_class_unification,
10428 unify, get_bindings_real, do_type_instantiation,
10429 regenerate_decl_from_template, instantiate_decl,
10430 tsubst_initializer_list, tsubst_enum,
10431 get_mostly_instantiated_function_type,
10432 invalid_nontype_parm_type_p): Likewise.
10433 * tree.c (cp_build_qualified_type_real): Likewise.
10434 * typeck.c (build_binary_op): Rename itf_* to tf_*.
10435 (build_ptrmemfunc): Likewise.
10436 (convert_for_assignment): Likewise.
10437
10438 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10439
10440 PR c++/109
10441 * decl.c (grokdeclarator): Allow friend declarations from
10442 dependent types.
10443 * decl2.c (handle_class_head): Don't push into template parm contexts.
10444 * pt.c (push_template_decl_real): Template parm contexts are never
10445 being defined.
10446
10447 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
10448
10449 * class.c: Include target.h.
10450 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10451 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10452 bit-field layout.
10453 * Make-lang.in: Adjust deps.
10454
10455 2002-02-05 Jason Merrill <jason@redhat.com>
10456
10457 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10458
10459 2002-02-04 Jakub Jelinek <jakub@redhat.com>
10460
10461 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10462 (finish_switch_cond): Set SWITCH_TYPE.
10463
10464 2002-02-04 Richard Henderson <rth@redhat.com>
10465
10466 * method.c (use_thunk): Always initialize the block tree. Reindent.
10467 * semantics.c (expand_body): Emit thunks after function, not before.
10468
10469 2002-02-04 Jason Merrill <jason@redhat.com>
10470
10471 * decl.c (start_function): Call cplus_decl_attributes immediately
10472 after grokdeclarator.
10473
10474 * decl.c (start_function): Combine DECL_RESULT handling code.
10475
10476 2002-02-03 Jason Merrill <jason@redhat.com>
10477
10478 * xref.c: Remove.
10479 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10480 (cp/xref.o): Remove dependencies.
10481 * class.c (finish_struct_1, check_methods): Don't call xref fns.
10482 (finish_struct_1): Likewise.
10483 * friend.c (make_friend_class): Likewise.
10484 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10485 * spew.c (read_process_identifier): Likewise.
10486
10487 2002-02-01 Jason Merrill <jason@redhat.com>
10488
10489 PR c++/4872
10490 * decl.c (finish_function): Warn about a non-void function with
10491 no return statement and no abnormal exit.
10492 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10493 (current_function_returns_abnormally): New macro.
10494 * call.c (build_call): Set it.
10495
10496 * typeck.c (build_component_ref): Always complain about offsetof
10497 constructs on non-PODs. Only make it an error for members of
10498 virtual bases.
10499
10500 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10501 (dump_function_decl): Always dump parms.
10502
10503 * decl2.c (finish_static_data_member_decl): Complain about a local
10504 class with a static data member.
10505
10506 PR c++/4286
10507 * search.c (lookup_field_1): Don't xref a static data member
10508 just because we looked it up.
10509
10510 2002-01-31 Jason Merrill <jason@redhat.com>
10511
10512 * Make-lang.in (parse.c): Handle .output file.
10513
10514 PR c++/3395
10515 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10516 not TREE_TYPE.
10517 * semantics.c (finish_class_definition): Adjust.
10518
10519 Allow attributes in parms and casts.
10520 * parse.y (named_parm): Don't strip attrs.
10521 (declmods): Remove 'attributes' production.
10522 (nonempty_cv_qualifiers): Accept attributes.
10523 (ATTRIBUTE): Give precedence.
10524 * decl.c (groktypename): Handle attributes.
10525 (grokparms): Likewise.
10526
10527 2002-01-29 Jakub Jelinek <jakub@redhat.com>
10528
10529 * decl2.c (cxx_decode_option): Pass 0 as last argument to
10530 cpp_handle_option.
10531 * lang-specs.h: Use cpp_unique_options instead of cpp_options
10532 when used together with cc1_options.
10533
10534 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
10535
10536 PR c++/5132
10537 * typeck2.c (digest_init): Make sure non-array core type is
10538 instantiated.
10539 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10540 constructor, rather than build a new one.
10541 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10542 PURPOSE of constructor elts.
10543
10544 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10545
10546 * Make-lang.in (parse.c): Adjust expected number of
10547 shift-reduce conflicts.
10548 (decl.o): Depend on diagnostic.h.
10549 * decl.c: Include diagnostic.h.
10550 (grokdeclarator): Check for null pointer.
10551 (finish_function): Don't abort when
10552 current_binding_level->parm_flag != 1, if errors have
10553 occurred; throw away the statement tree and extra binding
10554 levels, and continue.
10555 * lex.c (note_list_got_semicolon): Check for null pointer.
10556 * method.c (hack_identifier): Just return error_mark_node if
10557 value is error_mark_node.
10558 * parse.y (primary: TYPEID(type_id)): No need to use
10559 TYPE_MAIN_VARIANT here.
10560 (handler_seq): Accept an empty list of catch clauses and
10561 generate a fake handler block to avoid later crashes.
10562 (ansi_raise_identifier): Accept the error token too.
10563 * semantics.c (begin_class_definition,
10564 finish_class_definition): Check for error_mark_node.
10565
10566 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10567
10568 * typeck2.c (friendly_abort): Delete definition.
10569 * cp-tree.h (friendly_abort): Don't prototype.
10570 (my_friendly_assert): Use fancy_abort.
10571
10572 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10573
10574 * cp-tree.h (my_friendly_abort): Remove.
10575
10576 2002-01-23 Jakub Jelinek <jakub@redhat.com>
10577
10578 * spew.c (pending_inlines, pending_inlines_tail,
10579 processing_these_inlines): Make static.
10580 (mark_pending_inlines): Remove static.
10581 (begin_parsing_inclass_inline): If in function, save pi
10582 for GC to cp_function_chain->unparsed_inlines instead.
10583 (process_next_inline): Likewise.
10584 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10585 (mark_pending_inlines): Add prototype.
10586 * decl.c (spew_debug): Remove unused extern.
10587 (mark_lang_function): Call mark_pending_inlines.
10588
10589 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10590
10591 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10592 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10593 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10594 Change my_fancy_abort() to abort().
10595
10596 2002-01-23 Jason Merrill <jason@redhat.com>
10597
10598 PR c++/5453
10599 * class.c (fixed_type_or_null): Fix thinko.
10600
10601 PR c++/3331
10602 * init.c (resolve_offset_ref): Use build_indirect_ref.
10603
10604 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10605
10606 2002-01-22 Jason Merrill <jason@redhat.com>
10607
10608 * parse.y (function_body): Suppress the block for the outermost
10609 curly braces.
10610 * decl.c (pushdecl): Don't try to skip it.
10611 (begin_function_body): Keep the block we create, not the next one.
10612 * init.c (emit_base_init): Don't mess with keep_next_level.
10613
10614 * class.c (build_base_path): Tweak formatting.
10615
10616 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
10617
10618 Fix regression introduced with patch for c++/775
10619 * parse.y (class_head_defn): Check for template specializations
10620 with a different class-key.
10621
10622 2002-01-17 Jason Merrill <jason@redhat.com>
10623
10624 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10625 (begin_function_body): Call them and keep_next_level.
10626 * init.c (emit_base_init): Call keep_next_level.
10627 * semantics.c (setup_vtbl_ptr): Lose.
10628 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10629 (vtbls_set_up_p): Lose.
10630 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10631 * method.c (do_build_copy_constructor): Likewise.
10632 (synthesize_method): Call finish_mem_initializers.
10633 * parse.y (nodecls): Likewise.
10634
10635 * error.c (dump_type_suffix): Print the exception specs before
10636 recursing.
10637 (dump_function_decl): Here, too.
10638
10639 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10640
10641 2002-01-10 Ira Ruben <ira@apple.com>
10642
10643 PR c++/907
10644 * decl.c (start_method): Handle attrlist.
10645
10646 2002-01-10 Jakub Jelinek <jakub@redhat.com>
10647
10648 * decl2.c (max_tinst_depth): Increase default limit to 500.
10649
10650 2002-01-10 Graham Stott <grahams@redhat.com>
10651
10652 * spew.c (YYCHAR): Uppercase macro parameter and add
10653 parenthesis.
10654 (YYCODE): Likewise.
10655 (NAME): Uppercase macro parameter.
10656
10657 2002-01-09 Graham Stott <grahams@redhat.com>
10658
10659 * decl.h (grokdeclarator): Wrap long line.
10660
10661 * semantics.c (FINISH_COND): Uppercase macro paramaters and
10662 add parenthesis.
10663
10664 2002-01-08 Graham Stott <grahams@redhat.com>
10665
10666 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10667 (PALLOC): Uppercase macro parameter and whitespace.
10668 (SALLOC): Uppercase macro parameter.
10669 (SFREE): Uppercase macros parameter, add parenthese and
10670 whitespace.
10671 (STREQL): Uppercase macro parameter and whitespace.
10672 (STRNEQ): Likewise.
10673 (STRLSS): Likewise.
10674 (STRLEQ): Likewise.
10675 (STRGTR): Likewise.
10676 (STRGEQ): Likewise.
10677
10678 * call.c (convert_like): Add parenthesis and wrap.
10679 (convert_like_with_context): Likewise.
10680 (ICS_RANK): Whitespace.
10681 (NEED_TEMPORARY_P): Remove parenthesis.
10682
10683 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10684 whitespace.
10685 (VTT_MARKED_BINFO_P): Likewise.
10686
10687 * decl.c (BINDING_LEVEL): Add parenthesis.
10688 (DEF_OPERATOR): Likewise.
10689
10690 * mangle.c (MANGLE_TRACE): Add parenthesis.
10691 (MANGLE_TRACE_TREE): Likewise.
10692 (write_signed_number): Likewise.
10693 (write_unsigned_number): Likewise.
10694
10695 * pt.c (ccat): Uppercase macro parameter.
10696 (cat): Likewise
10697
10698 * search.c (SET_BINFO_ACCESS): Add parenthesis.
10699
10700 2002-01-07 Jason Merrill <jason@redhat.com>
10701
10702 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10703 to pedwarn.
10704
10705 PR c++/3536
10706 * method.c (make_thunk): If !flag_weak, give the thunk the
10707 function's linkage.
10708 (use_thunk): Here, too.
10709
10710 2002-01-07 Graham Stott <grahams@redhat.com>
10711
10712 * error.c: Update copyright date.
10713 (print_scope_operator): Add parenthesis.
10714 (print_left_paren): Likewise.
10715 (print_right_paren): Likewise.
10716 (print_left_bracket): Likewise.
10717 (print_right_bracket): Likewise.
10718 (print_template_argument_list_start): Likewise.
10719 (print_template_argument_list_end): Likewise.
10720 (print_non_consecutive_character): Likewise.
10721 (print_tree_identifier): Likewise.
10722 (print_identifier): Likewise.
10723 (NEXT_CODE): Uppercase macro parameter.
10724 (ident_fndecl): Delete unused.
10725 (GLOBAL_THING): Likewise.
10726
10727 2002-01-06 Graham Stott <grahams@redhat.com>
10728
10729 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10730 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10731 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10732 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10733 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10734 (C_IS_RESERVED_WORD): Uppercase macro parameter.
10735 (C_RID_YYCODE) Likewise.
10736 (ptrmem_cst): Use rtx.
10737 (LOCAL_BINDING_P): Add whitespace.
10738 (INHERITED_VALUE_BINDING_P): Likewise.
10739 (BINDING_SCOPE): Wrap long line.
10740 (BINDING_HAS_LEVEL_P): Remove parenthesis.
10741 (BINDING_VALUE): Wrap long line.
10742 (BINDING_TYPE): Whitespace.
10743 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10744 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10745 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10746 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10747 (same_type_p): Uppercase macro parameters.
10748 (same_type_ignoring_top_level_qualifiers_p): Likewise.
10749 (OVL_FUNCTION): Wrap long line.
10750 (OVL_CHAIN): Whitespace.
10751 (OVL_CURRENT): Add parenthesis and whitespace.
10752 (OVL_NEXT): Whitespace.
10753 (OVL_USED): Likewise.
10754 (IDENTIFIER_TYPE_VALUE): Likewise.
10755 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10756 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10757 (LANG_ID_FIELD): Whitespace.
10758 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10759 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10760 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10761 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10762 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10763 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10764 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10765 (IDENTIFIER_VIRTUAL_P): Likewise.
10766 (IDENTIFIER_OPNAME_P): Likewise.
10767 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10768 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10769 (C_SET_EXP_ORIGINAL_CODE): Likewise.
10770 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10771 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10772 (IS_AGGR_TYPE): Uppercase macro parameter.
10773 (CLASS_TYPE_P): Likewise.
10774 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10775 (IS_AGGR_TYPE_2): Whitespace.
10776 (TAGGED_TYPE_P): Uppercase macro parameter.
10777 (TYPE_BUILT_IN): Whitespace.
10778 (TYPE_FOR_JAVA): Likewise.
10779 (FUNCTION_ARG_CHAIN): Remove parenthesis.
10780 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10781 (FUNCTION_FIRST_USER_PARAM): Likewise.
10782 (PROMOTES_TO_AGGR_TYPE): Whitespace.
10783 (DERIVED_FROM_P): Add parenthesis and wrap.
10784 (UNIQUELY_DERIVED_FROM_P): Likewise.
10785 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10786 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10787 (CLASSTYPE_USE_TEMPLATE): Whitespace.
10788 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10789 (TYPE_GETS_DELETE): Add parenthesis.
10790 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10791 (TYPE_HAS_ASSIGN_REF): Likewise,
10792 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10793 (TYPE_HAS_INIT_REF): Likewise.
10794 (TYPE_HAS_CONST_INIT_REF): Likewise.
10795 (TYPE_BEING_DEFINED): Likewise.
10796 (TYPE_LANG_SPECIFIC): Likewise.
10797 (CLASSTYPE_RTTI): Likewise.
10798 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10799 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10800 (TYPE_OVERLOADS_ARROW): Likewise.
10801 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10802 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10803 (CLASSTYPE_METHOD_VEC): Likewise.
10804 (CLASSTYPE_MARKED_N): Likewise.
10805 (CLASSTYPE_MARKED): Likewise.
10806 (CLASSTYPE_MARKED2): Likewise.
10807 (CLASSTYPE_MARKED3): Likewise.
10808 (CLASSTYPE_MARKED4): Likewise.
10809 (CLASSTYPE_MARKED5): Likewise.
10810 (CLASSTYPE_MARKED6): Likewise.
10811 (SET_CLASSTYPE_MARKED): Whitespace.
10812 (CLEAR_CLASSTYPE_MARKED): Likewise.
10813 (SET_CLASSTYPE_MARKED2): Likewise.
10814 (CLEAR_CLASSTYPE_MARKED2): Likewise.
10815 (SET_CLASSTYPE_MARKED3): Likewise.
10816 (CLEAR_CLASSTYPE_MARKED3): Likewise.
10817 (SET_CLASSTYPE_MARKED4): Likewise.
10818 (CLEAR_CLASSTYPE_MARKED4): Likewise.
10819 (SET_CLASSTYPE_MARKED5): Likewise.
10820 (CLEAR_CLASSTYPE_MARKED5): Likewise.
10821 (SET_CLASSTYPE_MARKED6): Likewise.
10822 (CLEAR_CLASSTYPE_MARKED6): Likewise.
10823 (CLASSTYPE_TAGS): Likewise.
10824 (CLASSTYPE_VSIZE): Likewise.
10825 (CLASSTYPE_VBASECLASSES): Likewise.
10826 (CANONICAL_BINFO): Add parenthesis.
10827 (CLASSTYPE_SIZE(NODE): Likewise.
10828 (CLASSTYPE_SIZE_UNIT): Likewise.
10829 (CLASSTYPE_ALIGN(NODE): Likewise.
10830 (CLASSTYPE_USER_ALIGN): Likewise.
10831 (TYPE_JAVA_INTERFACE): Likewise.
10832 (CLASSTYPE_PURE_VIRTUALS): Likewise.
10833 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10834 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10835 (CLASSTYPE_HAS_MUTABLE): Likewise.
10836 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10837 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10838 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10839 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10840 (CLASSTYPE_INTERFACE_ONLY): Likewise.
10841 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10842 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10843 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10844 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10845 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10846 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10847 (BINFO_UNSHARED_MARKED): Whitespace.
10848 (BINFO_MARKED): Whitespace and wrap.
10849 (SET_BINFO_MARKED): Likewise.
10850 (CLEAR_BINFO_MARKED): Likewise.
10851 (BINFO_VTABLE_PATH_MARKED): Likewise.
10852 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10853 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10854 (BINFO_SUBVTT_INDEX): Remove parenthesis.
10855 (BINFO_VPTR_INDEX): Likewise.
10856 (BINFO_PRIMARY_BASE_OF): Likewise,
10857 (CLASSTYPE_VFIELDS): Whitespace.
10858 (VF_DERIVED_VALUE): Wrap long line.
10859 (NAMESPACE_LEVEL): Whitespace.
10860 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10861 (DEFARG_POINTER): Whitespace.
10862 (DECL_NEEDED_P): Remove parenthesis.
10863 (DECL_LANGUAGE): Whitespace.
10864 (SET_DECL_LANGUAGE): Add parenthesis.
10865 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10866 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10867 (DECL_IN_AGGR_P): Whitespace.
10868 (DECL_FRIEND_P): Likewise.
10869 (DECL_BEFRIENDING_CLASSES): Likewise.
10870 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10871 (DECL_NONCONVERTING_P): Whitespace.
10872 (DECL_PURE_VIRTUAL_P): Likewise.
10873 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10874 (DECL_PENDING_INLINE_INFO): Whitespace.
10875 (DECL_SORTED_FIELDS): Likewise.
10876 (DECL_DEFERRED_FN): Likewise.
10877 (DECL_TEMPLATE_INFO): Likewise.
10878 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10879 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10880 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10881 (TMPL_ARGS_LEVEL): Likewise.
10882 (SET_TMPL_ARGS_LEVEL): Likewise.
10883 (INNERMOST_TEMPLATE_PARMS): Whitespace.
10884 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10885 (INTEGRAL_CODE_P(CODE): Add parenthesis.
10886 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10887 (TYPE_HAS_CONSTRUCTOR): Whitespace.
10888 (TREE_HAS_CONSTRUCTOR): Likewise.
10889 (TYPE_HAS_DESTRUCTOR): Likewise.
10890 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10891 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10892 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10893 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10894 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10895 (TYPE_PTRMEMFUNC_P): Likewise.
10896 (TYPE_PTRMEMFUNC_FLAG): Likewise.
10897 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10898 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10899 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10900 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10901 (DECL_ACCESS): Whitespace.
10902 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10903 (DECL_GLOBAL_DTOR_P): Likewise.
10904 (GLOBAL_INIT_PRIORITY): Likewise.
10905 (DECL_TEMPLATE_PARMS): Likewise.
10906 (DECL_TEMPLATE_RESULT): Likewise.
10907 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10908 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10909 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10910 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10911 (PRIMARY_TEMPLATE_P): Add parenthesis.
10912 (DECL_USE_TEMPLATE): Whitespace.
10913 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10914 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10915 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10916 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10917 (CALL_DECLARATOR_PARMS): Remove parenthesis.
10918 (CALL_DECLARATOR_QUALS): Likewise.
10919 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10920 (TEMP_NAME_P): Wrap.
10921 (VFIELD_NAME_P): Likewise.
10922 (B_SET): Uppercase macro parameters and add parenthesis.
10923 (B_CLR): Likewise.
10924 (B_TST): Likewise.
10925 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10926 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10927 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10928 (same_or_base_type_p): Likewise.
10929 (cp_deprecated): Likewise.
10930
10931 2002-01-05 Richard Henderson <rth@redhat.com>
10932
10933 * semantics.c (expand_body): Revert last change.
10934
10935 2002-01-04 Jason Merrill <jason@redhat.com>
10936
10937 PR c++/4122
10938 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10939 lost primary.
10940
10941 * class.c (build_vtbl_initializer): Check for a lost primary
10942 before calculating the vtable entry to throw away.
10943
10944 2002-01-02 Jason Merrill <jason@redhat.com>
10945
10946 * semantics.c (expand_body): Call outlining_inline_function when
10947 emitting an inline function out of line.
10948
10949 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10950
10951 PR c++/5116, c++/764 reversion
10952 * call.c (build_new_op): Revert the instantiations. They are
10953 incorrect.
10954
10955 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10956
10957 PR c++/5089
10958 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10959
10960 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10961
10962 PR c++/3716
10963 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10964 (tsubst, case POINTER_TYPE): Handle pmfs here.
10965 (tsubst, case OFFSET_TYPE): Check it is not an offset to
10966 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10967
10968 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10969
10970 PR c++/35
10971 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10972 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10973 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10974 PARM_DECL.
10975 (tsubst_template_parms): Break up loop statements.
10976 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10977 parm PARM_DECLs don't get promoted.
10978
10979 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10980
10981 PR c++/5123
10982 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10983 (build_x_function_call): Cope with a COMPONENT_REF containing a
10984 TEMPLATE_ID_EXPR.
10985
10986 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10987
10988 PR c++/5213
10989 * pt.c (convert_template_argument): Be more careful determining
10990 when RECORD_TYPE templates are or are not templates.
10991
10992 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10993
10994 PR c++/775
10995 * cp-tree.h (handle_class_head): Adjust prototype.
10996 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10997 parameters. Use for all class heads.
10998 * parse.y (named_class_head_sans_basetype, named_class_head,
10999 named_complex_class_head_sans_basetype,
11000 named_class_head_sans_basetype_defn,
11001 unnamed_class_head): Remove.
11002 (class_head, class_head_apparent_template): Recognize class heads
11003 (class_head_decl, class_head_defn): New reductions. Process class
11004 heads.
11005 (structsp): Adjust class definition and class declaration
11006 reductions.
11007 (maybe_base_class_list): Give diagnostic on empty list.
11008
11009 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11010
11011 PR c++/4379
11012 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
11013 single non-static member.
11014 (unary_complex_lvalue): If it cannot be a pointer to member, don't
11015 make it so. Check it is not pointer to reference.
11016
11017 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11018
11019 PR c++/5132
11020 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
11021 are processing a template decl.
11022
11023 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11024
11025 PR c++/5116, c++/764
11026 * call.c (build_new_op): Make sure template class operands are
11027 instantiated. Simplify arglist construction.
11028
11029 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11030
11031 * call.c (build_user_type_conversion_1): Use my_friendly_assert
11032 rather than if ... abort.
11033 * cvt.c (convert_to_reference): Likewise.
11034 * semantics.c (setup_vtbl_ptr): Likewise.
11035 * pt.c (lookup_template_class): Comment typo.
11036
11037 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11038
11039 PR c++/5125
11040 * pt.c (push_template_decl_real): Make sure DECL has
11041 DECL_LANG_SPECIFIC.
11042
11043 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11044
11045 PR c++/335
11046 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
11047 for non-reference fields.
11048 * typeck.c (require_complete_type): Use resolve_offset_ref).
11049
11050 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
11051
11052 PR c++/196
11053 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
11054
11055 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
11056
11057 PR c++/160
11058 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
11059 up. Don't stabilize_references when initializing a reference.
11060
11061 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11062
11063 * decl2.c (lang_f_options): Const-ify.
11064
11065 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
11066
11067 * config-lang.in (diff_excludes): Remove.
11068
11069 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
11070
11071 PR c++/90
11072 * typeck.c (build_function_call_real): Use original function
11073 expression for errors.
11074
11075 2001-12-18 Jason Merrill <jason@redhat.com>
11076
11077 PR c++/3242
11078 * class.c (add_method): Do compare 'this' quals when trying to match a
11079 used function. Don't defer to another used function.
11080
11081 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11082
11083 * pt.c (instantiate_clone): Remove, fold into ...
11084 (instantiate_template): ... here. Simplify by removing mutual
11085 recursion.
11086 * typeck2.c (build_m_component_ref): Don't cv qualify the function
11087 pointed to by a pointer to function.
11088 * class.c (delete_duplicate_fields_1): Typo.
11089
11090 2001-12-18 Jason Merrill <jason@redhat.com>
11091
11092 C++ ABI change: destroy value arguments in caller.
11093 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
11094 create an extra binding level for the parameters.
11095 * decl.c (store_parm_decls): Don't do parameter cleanups.
11096
11097 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11098
11099 * call.c (build_new_method_call): Use '%#V'.
11100 * error.c (cv_to_string): Use V parameter to determine padding.
11101
11102 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
11103
11104 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
11105 spellings in messages.
11106
11107 2001-12-17 Zack Weinberg <zack@codesourcery.com>
11108
11109 * cp-tree.h: Delete #defines for cp_error, cp_warning,
11110 cp_pedwarn, and cp_compiler_error.
11111 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
11112 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
11113 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
11114 typeck2.c: Change calls to the above macros to use their
11115 language-independent equivalents: error, warning, pedwarn, and
11116 internal_error respectively.
11117
11118 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
11119
11120 * decl2.c (finish_file): Remove back_end_hook.
11121
11122 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
11123
11124 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11125 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11126 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11127
11128 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
11129
11130 * lang-options.h: Use American spelling in messages.
11131
11132 2001-12-13 Jason Merrill <jason@redhat.com>
11133
11134 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11135
11136 Use cleanups to run base and member destructors.
11137 * init.c (push_base_cleanups): New function, split out from...
11138 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
11139 * decl.c (finish_destructor_body): Move vbase destruction code to
11140 push_base_cleanups.
11141 (begin_function_body, finish_function_body): New fns.
11142 (finish_function): Move [cd]tor handling and call_poplevel to
11143 finish_function_body.
11144 (pushdecl): Skip the new level.
11145 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11146 (setup_vtbl_ptr): Call push_base_cleanups.
11147 * method.c (synthesize_method): Call {begin,end}_function_body.
11148 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11149 * cp-tree.h: Declare new fns.
11150 * parse.y (function_body, .begin_function_body): New nonterminals.
11151 (fndef, pending_inline, function_try_block): Use function_body.
11152 (ctor_initializer_opt, function_try_block): No longer has a value.
11153 (base_init): Remove .set_base_init token.
11154 (.set_base_init, compstmt_or_error): Remove.
11155 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11156
11157 * optimize.c (maybe_clone_body): Fix parameter updating.
11158
11159 2001-12-12 Jason Merrill <jason@redhat.com>
11160
11161 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11162 * semantics.c (genrtl_start_function): Don't pass
11163 parms_have_cleanups or push an extra binding level.
11164 (genrtl_finish_function): Lose cleanup_label cruft.
11165
11166 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11167 (ctor_label): Remove.
11168 * semantics.c (finish_return_stmt): Lose ctor_label support.
11169 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11170 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11171 dtor_label.
11172
11173 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11174 check for [cd]tors.
11175 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11176
11177 * decl.c (finish_function): Check VMS_TARGET, not VMS.
11178
11179 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11180 (end_cleanup_fn): And poplevel.
11181
11182 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11183 if we're in a template.
11184
11185 2001-12-12 Jakub Jelinek <jakub@redhat.com>
11186
11187 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11188 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11189 THIS_NAME_P): Delete.
11190 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11191 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11192 with internal naming scheme.
11193 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11194
11195 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
11196
11197 * decl.c (grokdeclarator): Deprecated implicit typename use.
11198
11199 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
11200
11201 PR g++/51
11202 * parse.y (frob_specs): Indicate it is a language linkage which
11203 contained the extern.
11204 * decl.c (grokdeclarator): Allow extern language linkage with
11205 other specifiers.
11206
11207 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
11208
11209 PR g++/72
11210 * decl.c (add_binding): Don't reject duplicate typedefs involving
11211 template parameters.
11212
11213 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
11214
11215 * parse.y, semantics.c: Similarly.
11216
11217 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
11218
11219 PR g++/87
11220 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11221 (copy_args_p): Rename to ...
11222 (copy_fn_p): ... here.
11223 (grok_special_member_properties): New function.
11224 (grok_op_properties): Lose VIRTUALP parameter.
11225 (copy_assignment_arg_p): Remove.
11226 * call.c (build_over_call): Use copy_fn_p.
11227 * decl.c (grokfndecl): Reformat. Adjust call to
11228 grok_op_properties.
11229 (copy_args_p): Rename to ...
11230 (copy_fn_p): ... here. Reject template functions. Check for pass
11231 by value.
11232 (grok_special_member_properties): Remember special functions.
11233 (grok_ctor_properties): Don't remember them here, just check.
11234 (grok_op_properties): Likewise.
11235 (start_method): Call grok_special_member_properties.
11236 * decl2.c (grokfield): Likewise.
11237 (copy_assignment_arg_p): Remove.
11238 (grok_function_init): Don't remember abstract assignment here.
11239 * pt.c (instantiate_class_template): Call
11240 grok_special_member_properties.
11241 (tsubst_decl): Adjust grok_op_properties call.
11242
11243 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
11244
11245 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11246 RID_TYPES_COMPATIBLE_P.
11247
11248 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11249
11250 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11251 call to build_aggr_init.
11252 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11253
11254 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
11255
11256 * parse.y: Replace uses of the string non-terminal with STRING.
11257 Don't perform string concatentaion here.
11258 (string): Remove non-terminal.
11259 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11260
11261 2001-12-05 Jason Merrill <jason@redhat.com>
11262
11263 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11264 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11265 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11266 * pt.c (push_tinst_level): No longer static.
11267 * cp-tree.h: Declare them.
11268
11269 * init.c (resolve_offset_ref): Don't check access for the base
11270 conversion to access a FIELD_DECL.
11271
11272 * cp-tree.h (TYPE_REFFN_P): New macro.
11273 * decl.c (bad_specifiers): Check it, too.
11274
11275 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11276 on the __*_type_info type if we haven't seen a definition.
11277
11278 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
11279
11280 * decl.c: Include c-common.h.
11281 (shadow_warning): Move to c-common.c.
11282
11283 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11284
11285 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11286
11287 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11288
11289 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11290
11291 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11292
11293 PR g++/164
11294 * init.c (sort_base_init): Allow binfos to be directly specified.
11295 * method.c (do_build_copy_constructor): Explicitly convert to the
11296 base instance.
11297 (do_build_assign_ref): Likewise.
11298
11299 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
11300
11301 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11302 declaration and initialization.
11303
11304 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
11305
11306 * typeck2.c: Remove leading capital from diagnostic messages, as
11307 per GNU coding standards.
11308
11309 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
11310
11311 PR c++/3394
11312 * decl.c (xref_basetypes): Handle attributes between
11313 'class' and name.
11314
11315 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
11316
11317 PR g++/3381
11318 * parse.y (named_complex_class_head_sans_basetype): Add new
11319 reduction.
11320 * Make-lang.in (parse.c): Adjust expected conflict count.
11321
11322 2001-12-03 Jason Merrill <jason@redhat.com>
11323
11324 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11325 immediate binfos for our virtual bases.
11326
11327 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
11328
11329 * call.c (build_java_interface_fn_ref): Similarly.
11330 * except.c (is_admissible_throw_operand): Similarly.
11331 * init.c (build_java_class_ref): Similarly.
11332 * xref.c (open_xref_file): Similarly.
11333
11334 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
11335
11336 * class.c (finish_struct): Remove trailing periods from messages.
11337 * decl.c (check_tag_decl): Similarly.
11338 * lex.c (cxx_set_yydebug): Similarly.
11339 * typeck2.c (friendly_abort): Similarly.
11340
11341 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11342
11343 PR c++/3048
11344 * cp-tree.h (ovl_member): Remove.
11345 * decl2.c (merge_functions): Handle extern "C" functions
11346 specially.
11347 * tree.c (ovl_member): Remove.
11348
11349 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11350
11351 PR c++/4842
11352 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11353 FUNCTION_DECL, as input.
11354 (mark_overriders): Remove.
11355 (warn_hidden): Rework for the new ABI.
11356
11357 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11358
11359 PR c++/3471
11360 * call.c (convert_like_real): Do not build additional temporaries
11361 for rvalues of class type.
11362
11363 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
11364
11365 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11366 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11367 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11368 (DERIVED_FROM_P): Likewise.
11369 (enum base_access): Renumber, add ba_quiet bit mask.
11370 (get_binfo): Remove.
11371 (get_base_distance): Remove.
11372 (binfo_value): Remove.
11373 (ACCESSIBLY_DERIVED_FROM_P): Remove.
11374 * call.c (standard_conversion): Use lookup_base.
11375 * class.c (strictly_overrides): Likewise.
11376 (layout_virtual_bases): Likewise.
11377 (warn_about_ambiguous_direct_bases): Likewise.
11378 (is_base_of_enclosing_class): Likewise.
11379 (add_vcall_offset_vtbl_entries_1): Likewise.
11380 * cvt.c (build_up_reference): Adjust comment.
11381 * init.c (build_member_call): Reformat.
11382 * search.c (get_binfo): Remove.
11383 (get_base_distance_recursive): Remove.
11384 (get_base_distance): Remove.
11385 (lookup_base_r): Tweak.
11386 (lookup_base): Add ba_quiet control. Complete the types here.
11387 (covariant_return_p): Use lookup_base.
11388 * tree.c (binfo_value): Remove.
11389 (maybe_dummy_object): Use lookup_base.
11390 * typeck.c (build_static_cast): Use lookup_base.
11391 (get_delta_difference): Likewise.
11392 * typeck2.c (binfo_or_else): Use lookup_base.
11393 (build_scoped_ref): Add back error_mark_check.
11394 (build_m_component_ref): Use lookup_base.
11395
11396 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
11397
11398 * Make-lang.in (c++.generated-manpages): New dummy target.
11399
11400 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11401
11402 * Make-lang.in (cp-lang.o): Depends on c-common.h.
11403 * cp-lang.c (c-common.h): Include.
11404 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11405 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11406 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11407
11408 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
11409
11410 * decl2.c (c_language): Move to c-common.c.
11411 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11412 functions.
11413 (cxx_init): Update.
11414
11415 2001-11-26 Jason Merrill <jason@redhat.com>
11416
11417 * call.c (joust): Remove COND_EXPR hack.
11418
11419 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
11420
11421 * search.c (lookup_base_r): Declare bk in variable declaration
11422 space.
11423
11424 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
11425
11426 PR g++/3145
11427 * class.c (build_vbase_pointer): Remove.
11428 (build_vbase_path): Remove.
11429 (build_base_path): New function.
11430 * cp-tree.h (base_access, base_kind): New enumerations.
11431 (build_base_path): Declare.
11432 (convert_pointer_to_real): Remove.
11433 (convert_pointer_to): Remove.
11434 (lookup_base): Declare.
11435 (convert_pointer_to_vbase): Remove.
11436 * call.c (build_scoped_method_call): Use lookup_base &
11437 build_base_path instead of convert_pointer_to_real,
11438 get_base_distance & get_binfo.
11439 (build_over_call): Likewise.
11440 * cvt.c (cp_convert_to_pointer): Likewise.
11441 (convert_to_pointer_force): Likewise.
11442 (build_up_reference): Likewise.
11443 (convert_pointer_to_real): Remove.
11444 (convert_pointer_to): Remove.
11445 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11446 instead of convert_pointer_to_vbase & build_vbase_path.
11447 (emit_base_init): Use build_base_path instead of
11448 convert_pointer_to_real.
11449 (expand_virtual_init): Lose unrequired conversions.
11450 (resolve_offset_ref): Use lookup_base and build_base_path
11451 instead of convert_pointer_to.
11452 * rtti.c (build_dynamic_cast_1): Use lookup_base &
11453 build_base_path instead of get_base_distance & build_vbase_path.
11454 * search.c (get_vbase_1): Remove.
11455 (get_vbase): Remove.
11456 (convert_pointer_to_vbase): Remove.
11457 (lookup_base_r): New function.
11458 (lookup_base): New function.
11459 * typeck.c (require_complete_type): Use lookup_base &
11460 build_base_path instead of convert_pointer_to.
11461 (build_component_ref): Likewise.
11462 (build_x_function_call): Likewise.
11463 (get_member_function_from_ptrfunc): Likewise.
11464 (build_component_addr): Likewise.
11465 * typeck2.c (build_scoped_ref): Likewise.
11466
11467 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11468
11469 * cp-tree.h (CP_TYPE_QUALS): Removed.
11470 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11471 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11472 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11473 * dump.c (cp_dump_tree): Use void* dump_info argument to match
11474 lang-hooks prototype.
11475 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11476 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11477 CP_TYPE_QUALS changed to cp_type_quals.
11478 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11479 (CXX_C_OBJS): Remove c-dump.o.
11480
11481 2001-11-21 Mark Mitchell <mark@codesourcery.com>
11482
11483 PR c++/3637
11484 * pt.c (lookup_template_class): Ensure that all specializations
11485 are registered on the list corresponding to the most general
11486 template.
11487
11488 2001-11-20 Mark Mitchell <mark@codesourcery.com>
11489
11490 * call.c (non_reference): Add documentation.
11491 (convert_class_to_reference): Do not strip reference types
11492 from conversion operators.
11493 (maybe_handle_ref_bind): Simplify.
11494 (compare_ics): Correct handling of references.
11495
11496 2001-11-19 John Wilkinson <johnw@research.att.com>
11497
11498 * dump.c (dump_op): New function.
11499 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
11500 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11501 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11502
11503 2001-11-19 Mark Mitchell <mark@codesourcery.com>
11504
11505 PR4629
11506 * semantics.c (finish_sizeof): Make sure that expression created
11507 while processing a template do not have a type.
11508 (finish_alignof): Likewise.
11509 * typeck.c (c_sizeof): Likewise.
11510 (expr_sizeof): Likewise.
11511
11512 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
11513
11514 * lex.c (cxx_finish): Call c_common_finish.
11515 (finish_parse): Remove.
11516
11517 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11518
11519 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11520 when displaying error message about missing array bounds.
11521
11522 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11523
11524 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11525 CONST_CAST_EXPR.
11526 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11527
11528 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
11529
11530 * cp-tree.h (print_class_statistics): Restore.
11531
11532 2001-11-15 Jason Merrill <jason@redhat.com>
11533
11534 * method.c (use_thunk): Don't emit debugging information for thunks.
11535
11536 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11537 * decl.c (make_typename_type): Handle getting a class template.
11538 * search.c (lookup_field_r): A class template is good enough for
11539 want_type.
11540
11541 * call.c (convert_like_real): Only use cp_convert for the bad part.
11542 (standard_conversion): Also allow bad int->enum.
11543 * typeck.c (ptr_reasonably_similar): Also allow functions to
11544 interconvert. Pointers to same-size integers are reasonably
11545 similar.
11546
11547 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11548 give it void type.
11549
11550 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
11551
11552 PR g++/3154
11553 * init.c (sort_base_init): Remove unreachable code.
11554 (expand_member_init): Adjust comment to reflect reality. Simplify
11555 and remove unreachable code.
11556
11557 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
11558
11559 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11560 (cxx_init): Update prototype.
11561 * decl.c (init_decl_processing): Rename. Move null node init
11562 to its creation time.
11563 * lex.c (cxx_init_options): Update.
11564 (cxx_init): Combine with old init_parse; also call
11565 cxx_init_decl_processing.
11566
11567 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
11568
11569 * decl.c (check_initializer): Try to complete the type of an
11570 array element before checking whether it's complete. Don't
11571 complain about arrays with complete element types but an
11572 unknown size.
11573 (cp_finish_decl): Build the hierarchical constructor before
11574 calling maybe_deduce_size_from_array_init.
11575
11576 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
11577
11578 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11579
11580 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
11581
11582 PR g++/4206
11583 * parse.y (already_scoped_stmt): Remove.
11584 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11585
11586 2001-11-12 H.J. Lu <hjl@gnu.org>
11587
11588 * cvt.c (ocp_convert): Don't warn the address of a weak
11589 function is always `true'.
11590
11591 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11592
11593 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11594 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11595 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11596 * cp-tree.h (print_class_statistics): Remove.
11597 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11598 cxx_print_identifier, cxx_set_yydebug): New.
11599 * lex.c (set_yydebug): Rename c_set_yydebug.
11600 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11601 lang_print_xnode): Rename.
11602 * tree.c (print_lang_statistics): Rename.
11603
11604 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11605
11606 * class.c (dump_array): Fix format specifier warning.
11607
11608 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11609
11610 * cp-lang.c (LANG_HOOKS_NAME): Override.
11611 (struct lang_hooks): Constify.
11612 * lex.c (cxx_init_options): Update.
11613 (lang_identify): Remove.
11614 * parse.y (language_string): Remove.
11615
11616 2001-11-08 Andreas Franck <afranck@gmx.de>
11617
11618 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11619 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11620 suggested by autoconf.
11621 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11622 (c++.install-common): Use the transformed target alias names.
11623
11624 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11625
11626 * Make-lang.in: Update.
11627 * cp-lang.c: Include langhooks-def.h.
11628
11629 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11630
11631 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11632
11633 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11634
11635 * lex.c (copy_lang_type): Add static prototype.
11636
11637 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11638
11639 * pt.c (unify): Handle SCOPE_REF.
11640
11641 2001-11-01 Jakub Jelinek <jakub@redhat.com>
11642
11643 * tree.c (cp_copy_res_decl_for_inlining): Adjust
11644 DECL_ABSTRACT_ORIGIN for the return variable.
11645
11646 2001-10-31 Zack Weinberg <zack@codesourcery.com>
11647
11648 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11649
11650 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
11651
11652 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11653 semantics.c, spew.c: Fix spelling errors.
11654
11655 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11656
11657 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11658
11659 2001-10-25 Zack Weinberg <zack@codesourcery.com>
11660
11661 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11662 pop_everything.
11663
11664 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11665
11666 * cp-lang.c (cxx_get_alias_set): New function.
11667 Point LANG_HOOKS_GET_ALIAS_SET to it.
11668
11669 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11670
11671 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11672 * cp-tree.h (make_unbound_class_template): Prototype new function.
11673 * decl.c (make_unbound_class_template): New function.
11674 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11675 * error.c (dump_type): Likewise.
11676 * mangle.c (write_type): Likewise.
11677 * parse.y (template_parm): Likewise.
11678 (template_argument): Use make_unbound_class_template.
11679 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11680 (tsubst): Likewise.
11681 (tsubst_copy): Likewise.
11682 (unify): Likewise.
11683 * tree.c (walk_tree): Likewise.
11684 * typeck.c (comptypes): Likewise.
11685
11686 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11687
11688 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11689 extra calls into fewer ones.
11690
11691 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
11692
11693 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11694 Warn when merging inline with attribute noinline.
11695 (start_decl, start_function): Warn if inline and attribute
11696 noinline appear in the same declaration.
11697
11698 2001-10-16 H.J. Lu <hjl@gnu.org>
11699
11700 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11701 for tree checking disabled.
11702
11703 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
11704
11705 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11706 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11707
11708 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11709
11710 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11711 (unify): Only handle MINUS_EXPR specially if the above flag is set
11712 and the subtracted constant is 1. Clear the flag on recursive calls.
11713 Set it when unifying the maximum value in an INTEGER_TYPE's range.
11714
11715 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11716
11717 * decl.c (bad_specifiers): Don't allow exception specifications
11718 on any typedefs.
11719
11720 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
11721
11722 * cp/lex.c (init_cp_pragma): Similarly.
11723
11724 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11725
11726 * pt.c (lookup_template_class): Build complete template arguments
11727 for BOUND_TEMPLATE_TEMPLATE_PARM.
11728
11729 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11730
11731 * cp-tree.h (TYPE_BINFO): Update comment.
11732 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11733 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11734 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11735 (copy_type): Prototype new function.
11736 * lex.c (copy_lang_decl): Gather tree node statistics.
11737 (copy_lang_type): New function.
11738 (copy_type): Likewise.
11739 (cp_make_lang_type): Create lang_type for
11740 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
11741 and BOUND_TEMPLATE_TEMPLATE_PARM.
11742 * pt.c (tsubst): Use copy_type instead of copy_node.
11743 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11744
11745 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11746
11747 * pt.c (determine_specialization): Ignore functions without
11748 DECL_TEMPLATE_INFO.
11749
11750 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
11751
11752 PR g++/4476
11753 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11754
11755 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
11756
11757 * typeck2.c (store_init_value): Don't re-digest a bracketed
11758 initializer.
11759
11760 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11761 ANON_AGGR_TYPE_P.
11762
11763 2001-10-11 Richard Henderson <rth@redhat.com>
11764
11765 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11766 of an asm statement.
11767 (build_vtbl_ref_1): Split out from build_vtbl_ref.
11768 (build_vfn_ref): Use it to handle vtable descriptors before
11769 calling build_vtable_entry_ref.
11770 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11771
11772 2001-10-10 Richard Henderson <rth@redhat.com>
11773
11774 * parse.y (asm_operand): Allow named operands.
11775 * semantics.c (finish_asm_stmt): Tweek for changed location
11776 of the operand constraint.
11777
11778 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
11779
11780 * call.c (standard_conversion): Add bad conversion between
11781 integers and pointers.
11782 (convert_like_real): Don't use convert_for_initialization for bad
11783 conversions; complain here and use cp_convert.
11784 (build_over_call): Don't handle bad conversions specially.
11785 (perform_implicit_conversion): Allow bad conversions.
11786 (can_convert_arg_bad): New fn.
11787 * cp-tree.h: Declare it.
11788 * typeck.c (convert_for_assignment): Use it.
11789 (ptr_reasonably_similar): Any target type is similar to void.
11790
11791 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
11792
11793 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11794 (cp/cp-lang.o): New rule.
11795 * cp-tree.h: Declare hooks.
11796 * tree.c: Make hooks non-static.
11797 (init_tree): Don't initialize hooks here.
11798 * lex.c: Likewise. Move definition of lang_hooks to...
11799 * cp-lang.c: ... new file.
11800
11801 2001-10-08 Richard Henderson <rth@redhat.com>
11802
11803 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11804 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11805
11806 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11807
11808 * class.c (build_vtable_entry_ref): Const-ify.
11809 * decl.c (predefined_identifier,
11810 initialize_predefined_identifiers): Likewise.
11811 * init.c (build_new_1): Likewise.
11812 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11813 Likewise.
11814
11815 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
11816
11817 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11818 (INSNS_PER_STMT): Likewise.
11819 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11820 (copy_body, initialize_inlined_parameters): Likewise.
11821 (declare_return_variable, inlinable_function_p): Likewise.
11822 (expand_call_inline, expand_calls_inline): Likewise.
11823 (optimize_inline_calls, clone_body): Likewise.
11824 * tree.c (walk_tree): Moved to ../tree-inline.c.
11825 (walk_tree_without_duplicates): Likewise.
11826 (copy_tree_r, remap_save_expr): Likewise.
11827
11828 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
11829
11830 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11831 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11832 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11833 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11834 (flag_inline_trees): Moved declaration to ../tree-inline.h.
11835 (walk_tree): Moved declaration to ../tree-inline.h.
11836 (walk_tree_without_duplicates, copy_tree_r): Likewise.
11837 (remap_save_expr): Likewise.
11838 * decl.c: Include tree-inline.h.
11839 (lang_mark_tree): Don't mark inlined_fns.
11840 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11841 * optimize.c: Include tree-inline.h.
11842 (optimize_inline_calls): Move declaration to ../tree.h, as
11843 non-static.
11844 (remap_decl): Use language-independent constructs and hooks.
11845 (remap_block, copy_body_r, declare_return_variable): Likewise.
11846 (inlinable_function_p): Likewise. Don't test for
11847 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11848 no longer language-specific.
11849 (optimize_inline_calls): Likewise. Make it non-static. Moved
11850 call of dump_function to...
11851 (optimize_function): Here...
11852 (clone_body): New function, extracted from...
11853 (maybe_clone_body): ... here. Build decl_map locally and pass
11854 it on to clone_body.
11855 * pt.c, semantics.c: Include tree-inline.h.
11856 * tree.c: Likewise.
11857 (cp_walk_subtrees): New language-specific hook for tree inlining.
11858 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11859 cp_is_overload_p, cp_auto_var_in_fn_p,
11860 cp_copy_res_decl_for_inlining): Likewise.
11861 (walk_tree): Move language-specific constructs into...
11862 (cp_walk_subtrees): this new function.
11863 (copy_tree_r): Use language-independent constructs and hooks.
11864 (init_tree): Initialize tree inlining hooks.
11865 (remap_save_expr): Adjust prototype so that the declaration
11866 does not require the definition of splay_tree.
11867
11868 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
11869
11870 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11871 to build the declaration instead of the declaration itself.
11872
11873 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
11874
11875 * decl2.c (cxx_decode_option): Add 'else'.
11876
11877 * spew.c (end_input): No longer static.
11878 * cp-tree.h: Declare it.
11879 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11880
11881 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11882
11883 * call.c (build_over_call), typeck.c (build_function_call_real):
11884 Pass type attributes to check_function_format rather than name or
11885 assembler name. Don't require there to be a name or assembler
11886 name to check formats.
11887
11888 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11889
11890 * decl.c (init_decl_processing): Don't call
11891 init_function_format_info. Initialize lang_attribute_table
11892 earlier.
11893 (builtin_function): Call decl_attributes.
11894 (insert_default_attributes): New.
11895
11896 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
11897
11898 * decl.c (grokdeclarator): Copy array typedef handling from C
11899 frontend.
11900
11901 * decl.c (grokdeclarator): Copy too-large array handling from C
11902 frontend.
11903
11904 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
11905
11906 * config-lang.in (target_libs): Added target-gperf, so that we
11907 don't try to build it if C++ is disabled.
11908
11909 2001-09-23 Zack Weinberg <zack@codesourcery.com>
11910
11911 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11912 (cp/errfn.o): Delete rule.
11913 (cp/error.o): Depend on flags.h.
11914 * errfn.c: Delete file.
11915 * cp-tree.h: Declare warn_deprecated. Remove definitions of
11916 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11917 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11918 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11919 internal_error respectively. Make cp_deprecated into a macro.
11920 Don't define cp_printer typedef or declare cp_printers.
11921 * error.c: Include flags.h.
11922 Delete: struct tree_formatting_info, print_function_argument_list,
11923 print_declaration, print_expression, print_function_declaration,
11924 print_function_parameter, print_type_id, print_cv_qualifier_seq,
11925 print_type_specifier_seq, print_simple_type_specifier,
11926 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11927 print_parameter_declaration_clause, print_exception_specification,
11928 print_nested_name_specifier, and definition of cp_printers.
11929 (locate_error): New function.
11930 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11931 rewritten in terms of locate_error and diagnostic.c.
11932 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11933 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
11934 (init_error): Adjust to match.
11935
11936 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11937
11938 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11939
11940 2001-09-21 Richard Henderson <rth@redhat.com>
11941
11942 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11943 (build_vtbl_initializer): Likewise.
11944 (build_vfn_ref): New.
11945 * cp-tree.h: Declare it.
11946 * call.c (build_over_call): Use it.
11947 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11948 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11949
11950 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
11951
11952 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11953
11954 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
11955
11956 Table-driven attributes.
11957 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11958 * decl2.c (cplus_decl_attributes): Only take one attributes
11959 parameter.
11960 * cp-tree.c (cplus_decl_attributes): Update prototype.
11961 * class.c (finish_struct), decl.c (start_decl, start_function),
11962 decl2.c (grokfield), friend.c (do_friend), parse.y
11963 (parse_bitfield): Update calls to cplus_decl_attributes.
11964 * decl.c (grokdeclarator): Take a pointer to a single ordinary
11965 attribute list.
11966 * decl.h (grokdeclarator): Update prototype.
11967 * decl2.c (grokfield): Take a single ordinary attribute list.
11968 * friend.c (do_friend): Likewise.
11969 * decl.c (shadow_tag, groktypename, start_decl,
11970 start_handler_parms, grokdeclarator, grokparms, start_function,
11971 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11972 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11973 (process_template_parm, do_decl_instantiation): Pass single
11974 ordinary attribute lists around.
11975 * decl.c (grokdeclarator): Correct handling of nested attributes.
11976 Revert the patch
11977 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
11978 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11979 not the left.
11980 .
11981 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11982 (cp_attribute_table): Declare.
11983 * decl.c (valid_lang_attribute): Don't define.
11984 (lang_attribute_table): Define.
11985 (init_decl_processing): Initialize lang_attribute_table instead of
11986 valid_lang_attribute.
11987 * tree.c (cp_valid_lang_attribute): Remove.
11988 (handle_java_interface_attribute, handle_com_interface_attribute,
11989 handle_init_priority_attribute): New functions.
11990 (cp_attribute_table): New array.
11991 * decl2.c (import_export_class): Don't use
11992 targetm.valid_type_attribute.
11993
11994 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11995
11996 * Make-lang.in (cp/error.o): Depend on real.h
11997 * error.c: #include "real.h"
11998
11999 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12000
12001 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
12002 xmalloc/strcpy/strcat.
12003
12004 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12005
12006 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
12007 Const-ification.
12008 * pt.c (tsubst_decl): Likewise.
12009
12010 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12011
12012 * decl2.c (lang_f_options): Const-ification.
12013 * lex.c (cplus_tree_code_name): Likewise.
12014 * spew.c (yyerror): Likewise.
12015
12016 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12017
12018 PR c++/3986
12019 * class.c (force_canonical_binfo_r): Check & move an indirect
12020 primary base first.
12021 (force_canonical_binfo): Check that it's not already
12022 canonical.
12023 (mark_primary_virtual_base): Remove BINFO parameter.
12024 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
12025
12026 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12027
12028 Remove TYPE_NONCOPIED_PARTS.
12029 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
12030 CLASSTYPE_PURE_VIRTUALS.
12031 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
12032 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
12033 (layout_class_type): Don't call fixup_inline_methods here ...
12034 (finish_struct_1): ... call it here.
12035
12036 2001-09-04 Mark Mitchell <mark@codesourcery.com>
12037
12038 * decl.c (duplicate_decls): Remove code deadling with
12039 DECL_SAVED_INSNS.
12040 * decl2.c (finish_file): Likewise.
12041 * pt.c (instantiate_decl): Likewise.
12042 * semantics.c (expand_body): Don't defer local functions if
12043 they wouldn't be deferred for some other reason. Don't
12044 generate RTL for functions that will not be emitted.
12045 (genrtl_start_function): Remove code deadling with
12046 DECL_SAVED_INSNS.
12047 (genrtl_finish_function): Likewise.
12048
12049 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
12050
12051 PR c++/4203
12052 * call.c (build_over_call): Do not optimize any empty base
12053 construction.
12054
12055 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12056
12057 * error.c (dump_template_decl): Output template parameters
12058 together with their specifiers.
12059 Output `class' prefix for template template parameter.
12060 (dump_decl): Fix formatting.
12061
12062 2001-08-30 Kurt Garloff <garloff@suse.de>
12063
12064 * optimize.c (inlinable_function_p): Allow only smaller single
12065 functions. Halve inline limit after reaching recursive limit.
12066
12067 2001-08-30 Joern Rennecke <amylaar@redhat.com>
12068 Jason Merrill <jason_merrill@redhat.com>
12069
12070 * class.c (build_vtable_entry_ref): Subtract in char*, not
12071 ptrdiff_t.
12072
12073 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
12074
12075 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
12076 (build_cplus_array_type): Use cp_build_qualified_type, not
12077 TYPE_MAIN_VARIANT, to get an unqualified version.
12078
12079 * decl2.c (grok_alignof): Lose.
12080 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
12081 * typeck.c (c_alignof): Lose.
12082 * semantics.c (finish_sizeof, finish_alignof): New.
12083 * parse.y: Use them.
12084 * cp-tree.h: Declare them.
12085
12086 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
12087
12088 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
12089 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
12090 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
12091
12092 2001-08-19 Jakub Jelinek <jakub@redhat.com>
12093
12094 * typeck2.c (add_exception_specifier): Only require complete type if
12095 not in processing template declaration.
12096
12097 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12098
12099 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
12100 GNU_xref_start_scope and GNU_xref_end_scope.
12101
12102 * tree.c (TYPE_HASH): Moved to ../tree.h.
12103
12104 2001-08-16 Mark Mitchell <mark@codesourcery.com>
12105
12106 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
12107 on COMPOUND_EXPRs.
12108
12109 2001-08-14 Richard Henderson <rth@redhat.com>
12110
12111 * class.c, cp-tree.h (build_vfn_ref): Remove.
12112 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
12113
12114 2001-08-13 Mark Mitchell <mark@codesourcery.com>
12115
12116 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12117 empty class assignment as having side-effects to avoid
12118 spurious warnings.
12119
12120 2001-08-13 Zack Weinberg <zackw@panix.com>
12121
12122 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12123 * except.c: Include libfuncs.h.
12124
12125 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12126
12127 * decl.c (grokdeclarator): Clarify diagnostic message.
12128
12129 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12130
12131 * decl2.c (do_nonmember_using_decl): Replace using directive
12132 with using declaration in the error message.
12133
12134 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12135
12136 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12137 criterion to avoid rebuilding expression tree instead of
12138 processing_template_decl.
12139
12140 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12141
12142 Support named return value optimization for inlines, too.
12143 * decl.c (finish_function): Nullify returns here.
12144 * semantics.c (genrtl_start_function): Not here.
12145 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12146 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
12147 Also nullify the CLEANUP_STMT for the nrv.
12148 * cp-tree.h: Declare it.
12149 * optimize.c (declare_return_variable): Replace the nrv with the
12150 return variable.
12151 * typeck.c (check_return_expr): Be more flexible on alignment check.
12152 Ignore cv-quals when checking for a matching type.
12153
12154 2001-08-09 Richard Henderson <rth@redhat.com>
12155
12156 * decl2.c (finish_objects): Use target hooks instead of
12157 assemble_constructor and assemble_destructor.
12158
12159 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
12160
12161 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12162
12163 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
12164
12165 PR c++/3820
12166 Stop using TYPE_NONCOPIED_PARTS.
12167 * call.c (build_over_call): Be careful when copy constructing
12168 or assigning to an empty class.
12169 * class.c (check_bases_and_members): It has a
12170 COMPLEX_ASSIGN_REF if it has a vptr.
12171 (layout_class_type): Don't add empty class padding to
12172 TYPE_NONCOPIED_PARTS.
12173 (finish_struct_1): Don't add the VFIELD either.
12174 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12175 initialization.
12176
12177 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12178
12179 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12180
12181 2001-08-06 Richard Henderson <rth@redhat.com>
12182
12183 * decl2.c (finish_objects): Pass a symbol_ref and priority to
12184 assemble_{constructor,destructor}. Remove priority handling.
12185
12186 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12187
12188 Don't allow template-id in using-declaration.
12189 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12190 (do_class_using_decl): Likewise.
12191
12192 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12193
12194 * cp/spew.c (read_token): No need to pop buffers.
12195
12196 2001-08-02 Stan Shebs <shebs@apple.com>
12197
12198 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12199 (fnaddr_from_vtable_entry): Remove decl.
12200 * method.c (use_thunk): Update comment.
12201
12202 2001-08-01 Andrew Cagney <ac131313@redhat.com>
12203
12204 * repo.c (get_base_filename): Change return value to const char
12205 pointer.
12206
12207 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
12208
12209 Kill -fhonor-std.
12210 * NEWS: Document.
12211 * cp-tree.h (flag_honor_std): Remove.
12212 (CPTI_FAKE_STD): Remove.
12213 (std_node): Remove comment about it being NULL.
12214 (fake_std_node): Remove.
12215 * decl.c (in_fake_std): Remove.
12216 (walk_namespaces_r): Remove fake_std_node check.
12217 (push_namespace): Remove in_fake_std code.
12218 (pop_namespace): Likewise.
12219 (lookup_name_real): Remove fake_std_node check.
12220 (init_decl_processing): Always create std_node. Always add
12221 std:: things there.
12222 (builtin_function): Always put non '_' fns in std.
12223 * decl2.c (flag_honor_std): Remove.
12224 (lang_f_options): Remove honor-std.
12225 (unsupported_options): Add honor-std.
12226 (set_decl_namespace): Remove fake_std_node check.
12227 (validate_nonmember_using_decl): Likewise.
12228 (do_using_directive): Likewise.
12229 (handle_class_head): Likewise.
12230 * dump.c (cp_dump_tree): Likewise.
12231 * except.c (init_exception_processing): Adjust.
12232 * init.c (build_member_call): Remove fake_std_node check.
12233 (build_offset_ref): Likewise.
12234 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12235 * rtti.c (init_rtti_processing): Adjust.
12236
12237 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
12238
12239 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12240 operand while calling cp_tree_equal.
12241
12242 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12243
12244 The 3.0 ABI no longer has vbase pointer fields.
12245 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12246 FORMAT_VBASE_NAME): Remove.
12247 * method.c (do_build_copy_constructor): Adjust.
12248 (do_build_assign_ref): Adjust.
12249 * search.c (lookup_field_r): Adjust.
12250 * typeck.c (build_component_ref): Adjust.
12251
12252 The 3.0 ABI always has a vtable pointer at the start of every
12253 polymorphic class.
12254 * rtti.c (build_headof_sub): Remove.
12255 (build_headof): Adjust.
12256 (get_tinfo_decl_dynamic): No need to check flag_rtti
12257 here. Adjust.
12258 (create_real_tinfo_var): Explain why we need a hidden name.
12259
12260 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12261
12262 PR c++/3631
12263 * class.c (update_vtable_entry_for_fn): The fixed adjustment
12264 of a virtual thunk should be from declaring base.
12265
12266 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12267
12268 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12269 the shared virtual base, so preserving inheritance graph order.
12270
12271 2001-07-30 Andreas Jaeger <aj@suse.de>
12272
12273 * decl2.c: Remove unused var global_temp_name_counter.
12274
12275 2001-07-28 Richard Henderson <rth@redhat.com>
12276
12277 * method.c (pending_inlines): Remove.
12278
12279 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12280
12281 * class.c (mark_primary_virtual_base): Don't adjust base
12282 offsets here.
12283 (dfs_unshared_virtual_bases): Adjust them here.
12284 (mark_primary_bases): Explain why we adjust at the end.
12285
12286 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12287
12288 * class.c (finish_struct_1): When copying the primary base's
12289 VFIELD, make sure we find it is at offset zero.
12290
12291 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12292
12293 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12294 tsubst_expr for default template arguments.
12295
12296 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12297
12298 PR c++/3621
12299 * spew.c (yylex): Only copy the token's lineno, if it is
12300 nonzero.
12301
12302 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12303
12304 PR c++/3624
12305 * call.c (resolve_args): Simplify, call
12306 convert_from_reference.
12307 (build_new_op): Resolve and convert from reference ARG1
12308 earlier. Adjust ARG2 & ARG3 resolve and conversion.
12309
12310 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12311
12312 * decl.c (last_function_parm_tags): Remove.
12313 (current_function_parm_tags): Remove.
12314 (init_decl_processing): Adjust.
12315 (start_function): Adjust.
12316 (store_parm_decls): Adjust.
12317
12318 PR c++/3152
12319 * decl.c (grokdeclarator): Detect when a function typedef is
12320 declaring a function, and create last_function_parms correctly.
12321
12322 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
12323
12324 * call.c (joust): Only prefer a non-builtin candidate to a builtin
12325 one if they have the same signature.
12326
12327 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
12328 it rather than toplevel_bindings_p. Give it a mangled name if static.
12329 (convert_to_reference): Adjust.
12330 * decl2.c (get_temp_name): Lose.
12331 * mangle.c (mangle_ref_init_variable): New fn.
12332 (mangle_guard_variable): Strip the ref-init header.
12333 * cp-tree.h: Adjust.
12334 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12335 initializer.
12336 (grok_reference_init): Always use DECL_INITIAL.
12337
12338 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12339
12340 PR c++/3416
12341 * call.c (build_conditional_expr): Recheck args after
12342 conversions.
12343 * cp-tree.h (build_conditional_expr): Move to correct file.
12344 * typeck.c (decay_conversion): Diagnose any unknown types
12345 reaching here.
12346 (build_binary_op): Don't do initial decay or default
12347 conversions on overloaded functions.
12348 (build_static_cast): Don't do a decay conversion here.
12349
12350 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12351
12352 PR c++/3543
12353 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12354 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12355
12356 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12357
12358 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12359 (create_vtbl_ptr): ... here.
12360
12361 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12362
12363 * class.c (build_vbase_offset_vbtl_entries): Look for
12364 non-primary base of which we are a sub vtable.
12365
12366 2001-07-24 Phil Edwards <pme@sources.redhat.com>
12367
12368 * semantics.c (finish_this_expr): Remove unused code.
12369
12370 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
12371
12372 Simplify rtti, now we've only one ABI.
12373 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12374 CPTI_TINFO_VAR_ID.
12375 (tinfo_decl_id, tinfo_var_id): Remove.
12376 (get_typeid_1): Remove.
12377 * rtti.c
12378 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12379 (typeid_ok_p): New function.
12380 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12381 (get_tinfo_decl): Remove old abi documentation.
12382 (tinfo_from_decl): Remove.
12383 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12384 (get_typeid_1): Remove.
12385 (get_base_offset): Remove.
12386 (synthesize_tinfo_var): Absorb get_base_offset.
12387 (create_real_tinfo_var): Don't use tinfo_decl_id.
12388
12389 2001-07-23 Graham Stott <grahams@redhat.com>
12390
12391 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12392 variable has_two_argument_delete_p.
12393
12394 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
12395
12396 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12397 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12398 (CPTI_INDEX_IDENTIFIER): Remove.
12399 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12400 (delta2_identifier): Remove.
12401 (index_identifier): Remove.
12402 (pfn_or_delta2_identifier): Remove.
12403 (flag_vtable_thunks): Remove.
12404 (VTABLE_DELTA2_NAME): Remove.
12405 (VTABLE_INDEX_NAME): Remove.
12406 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12407 (vfunc_ptr_type_node): Adjust.
12408 (VTABLE_NAME_PREFIX): Adjust.
12409 (build_vfn_ref): Lose first parameter.
12410 (fixup_all_virtual_upcast_offsets): Remove.
12411 * decl.c (initialize_predefined_identifiers): Remove
12412 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12413 (init_decl_processing): Remove no-vtable-thunk code.
12414 * decl2.c (flag_vtable_thunks): Remove.
12415 (mark_vtable_entries): Remove no-vtable-thunk code.
12416 * error.c (dump_decl): Remove no-vtable-thunk code.
12417 (dump_expr): Adjust ptr to member function code.
12418 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12419 code.
12420 * rtti.c (build_headof): Remove no-vtable-thunk code.
12421 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12422 * search.c (get_base_distance): Remove expand_upcast_fixups case.
12423 (virtual_context) Remove.
12424 (expand_upcast_fixups): Remove.
12425 (fixup_virtual_upcast_offsets): Remove.
12426 (fixup_all_virtual_upcast_offsets): Remove.
12427 * typeck.c (get_member_function_from_ptrfunc): Remove
12428 no-vtable-thunk code.
12429 * call.c (build_over_call): Adjust call to build_vfn_ref.
12430 * class.c (build_vfn_ref): Lose first parameter. Remove
12431 no-vtable-thunk code.
12432 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12433 (build_vtable_entry): Remove no-vtable-thunk code.
12434
12435 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
12436
12437 Remove old-abi remnants. Remove comments about old abi
12438 behavior. Remove references to 'new-abi' in comments.
12439 * cp-tree.h: Adjust comments.
12440 (vbase_offsets_in_vtable_p): Delete.
12441 (vcall_offsets_in_vtable_p): Delete.
12442 (vptrs_present_everywhere_p): Delete.
12443 (all_overridden_vfuns_in_vtables_p): Delete.
12444 (merge_primary_and_secondary_vtables_p): Delete.
12445 (TYPE_CONTAINS_VPTR_P): Adjust.
12446 (VTT_NAME_PREFIX): Remove.
12447 (CTOR_VTBL_NAME_PREFIX): Remove.
12448 (init_vbase_pointers): Remove.
12449 * class.c: Adjust coments.
12450 (build_vbase_pointer_fields): Delete.
12451 (build_vbase_pointer): Remove old-abi code.
12452 (build_secondary_vtable): Likewise.
12453 (modify_all_vtables): Likewise.
12454 (create_vtable_ptr): Likewise.
12455 (layout_class_type): Likewise.
12456 (finish_struct_1): Likewise.
12457 (finish_vtbls): Likewise.
12458 (dfs_finish_vtbls): Delete.
12459 (build_vbase_offset_vtbl_entries): Remove old-abi code.
12460 * cvt.c: Adjust comments.
12461 * decl.c: Adjust comments.
12462 * decl2.c: Adjust comments.
12463 * init.c: Adjust comments.
12464 (construct_virtual_bases): Remove old-abi code.
12465 * lang-specs.h: Remove -fno-new-abi.
12466 * mangle.c: Adjust comments.
12467 * rtti.c: Adjust comments.
12468 (get_base_offset): Remove old-abi-code.
12469 * search.c: Adjust comments.
12470 (dfs_init_vbase_pointers): Remove.
12471 (dfs_vtable_path_unmark): Remove.
12472 (init_vbase_pointers): Remove.
12473 * semantics.c: Adjust comments.
12474 (emit_associated_thunks): Remove old-abi code.
12475 * typeck.c: Adjust comments.
12476
12477 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
12478
12479 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12480 params.h.
12481
12482 2001-07-19 Mark Mitchell <mark@codesourcery.com>
12483
12484 * class.c (finish_struct_anon): Forbid nested classes.
12485
12486 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12487
12488 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12489 * optimize.c: Include debug.h.
12490 (maybe_clone_body): Use debug hook.
12491 * semantics.c: Include debug.h.
12492 (expand_body): Use debug hook.
12493
12494 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12495
12496 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12497
12498 2001-07-18 Mark Mitchell <mark@codesourcery.com>
12499
12500 * class.c (type_requires_array_cookie): New function.
12501 (check_methods): Don't try to figure out whether the type needs a
12502 cookie here.
12503 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12504 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12505 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12506 * pt.c (instantiate_class_template): Don't set
12507 TYPE_VEC_DELETE_TAKES_SIZE.
12508 * NEWS: Document ABI changes from GCC 3.0.
12509
12510 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
12511 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12512
12513 * NEWS (Changes in GCC 3.0): Fix typo.
12514
12515 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
12516
12517 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12518 which attributes are to be attached, and a flags argument. Update
12519 call to decl_attributes.
12520 (grokfield): Update call to decl_attributes.
12521 * class.c (finish_struct): Update call to cplus_decl_attributes.
12522 * cp-tree.h (cplus_decl_attributes): Update prototype.
12523 * decl.c (start_decl, grokdeclarator, start_function): Update
12524 calls to decl_attributes and cplus_decl_attributes.
12525 * friend.c (do_friend): Update call to cplus_decl_attributes.
12526 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12527
12528 2001-07-12 Mark Mitchell <mark@codesourcery.com>
12529
12530 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12531 for `register' variables with an asm-specification.
12532
12533 2001-07-11 Mark Mitchell <mark@codesourcery.com>
12534
12535 * semantics.c (finish_asm_stmt): Mark the output operands
12536 to an asm addressable, if necessary.
12537
12538 2001-07-11 Ben Elliston <bje@redhat.com>
12539
12540 * Revert this change -- there is a subtle bug.
12541
12542 PR c++/80
12543 * decl.c (finish_enum): New "attributes" argument; pass it to
12544 cplus_decl_attributes. Use a narrower type if the enum is packed.
12545 * cp-tree.h (finish_enum): Adjust prototype.
12546 * parse.y (enum_head): New non-terminal.
12547 (structsp): Use it. Enums now may be preceded or followed by
12548 optional attributes -- pass their chained tree to finish_enum().
12549 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12550
12551 2001-07-10 Mark Mitchell <mark@codesourcery.com>
12552
12553 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12554 variables.
12555
12556 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
12557
12558 * semantics.c (cp_expand_stmt): Fix for null
12559 current_function_return_value.
12560
12561 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
12562
12563 * call.c (build_op_delete_call): Initialize fn.
12564 (convert_like_real): Delete conditional.
12565 (joust): Initialize *w and *l.
12566 * class.c: Add prototype for binfo_ctor_vtable.
12567 (get_primary_binfo): Initialize result.
12568 * init.c (build_java_class_ref): Initialize name.
12569
12570 2001-07-09 Erik Rozendaal <dlr@acm.org>
12571
12572 * typeck.c (unary_complex_lvalue): Do not duplicate the
12573 argument to modify, pre-, or post-increment when used as an
12574 lvalue and when the argument has side-effects.
12575
12576 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12577
12578 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12579 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
12580 cplus_decl_attributes even if attrs is NULL.
12581 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12582
12583 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12584
12585 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12586 calls to decl_attributes.
12587
12588 2001-07-06 Ira Ruben <ira@apple.com>
12589
12590 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12591 be DECL_TEMPLATE_RESULT.
12592
12593 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12594
12595 * cp-tree.h (copy_template_template_parm): Rename to ...
12596 (bind_template_template_parm): ... here.
12597 * tree.c (copy_template_template_parm): Rename to ...
12598 (bind_template_template_parm): ... here. Remove the case when
12599 NEWARGS is NULL_TREE.
12600 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12601 BOUND_TEMPLATE_TEMPLATE_PARM.
12602 * pt.c (lookup_template_class): Adjust.
12603
12604 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
12605
12606 * cvt.c (convert_lvalue): New fn.
12607 * cp-tree.h: Declare it.
12608 * method.c (do_build_assign_ref): Use it.
12609 (do_build_copy_constructor): Convert parm to base types
12610 before calling base constructors.
12611
12612 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12613 DECL_USER_ALIGN. Check flag_elide_constructors instead of
12614 optimize.
12615 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12616
12617 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
12618
12619 * optimize.c (optimize_inline_calls): New function, broken out
12620 of ...
12621 (optimize_function): ... here. Call it. Don't inline if it is
12622 a thunk.
12623 (dump_function): Print name of dump flag causing this dump.
12624 * semantics.c (expand_body): Move thunk inline check to
12625 optimize_function.
12626
12627 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
12628
12629 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12630 (comptypes): Use target.comp_type_attributes.
12631
12632 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
12633
12634 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12635
12636 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12637
12638 * error.c (lang_print_error_function): Add a `diagnostic_context *'
12639 parameter. Tweak.
12640
12641 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12642
12643 * decl2.c (import_export_class): Update.
12644
12645 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12646
12647 * error.c (init_error): Adjust settings.
12648
12649 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12650
12651 * error.c (init_error): Adjust settings.
12652
12653 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
12654
12655 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12656 return pointers to data members by reference rather than by value.
12657
12658 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
12659
12660 Implement the Named Return Value optimization.
12661 * cp-tree.h (struct cp_language_function): Add x_return_value.
12662 (current_function_return_value): Now a macro.
12663 * decl.c: Don't define it.
12664 (define_label, finish_case_label): Don't clear it.
12665 (init_decl_processing): Don't register it with GC.
12666 * semantics.c (genrtl_finish_function): Don't check it for
12667 no_return_label. Copy the RTL from the return value to
12668 current_function_return_value and walk, calling...
12669 (nullify_returns_r): ...this new fn.
12670 * typeck.c (check_return_expr): Set current_function_return_value.
12671
12672 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
12673
12674 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12675 sharing a ctor vtable with. Merge code for cases 1 and 2.
12676 (binfo_ctor_vtable): New fn.
12677 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12678
12679 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
12680
12681 * class.c (dfs_find_final_overrider): Fix logic.
12682
12683 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12684 virtual thunk instead of non-virtual.
12685 (get_matching_virtual): Uncomment.
12686
12687 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12688 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
12689 PARM, not ARG.
12690
12691 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
12692
12693 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12694 we've not emerged from the hierarchy of RTTI_BINFO on reaching
12695 a non-virtual base.
12696
12697 2001-06-13 Mark Mitchell <mark@codesourcery.com>
12698
12699 * NEWS: Update release number.
12700
12701 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12702
12703 PR c++/3130, c++/3131, c++/3132
12704 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12705 * class.c (force_canonical_binfo_r): Move
12706 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12707 virtual bases unless they're primary and what they're primary
12708 too has been moved.
12709 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12710 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12711 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12712 derived binfo.
12713 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12714 (layout_nonempty_base_or_field): Add most derived type
12715 parameter. Adjust.
12716 (layout_empty_base): Likewise.
12717 (build_base_field): Likewise.
12718 (build_base_fields): Likewise.
12719 (propagate_binfo_offsets): Add most derived type
12720 parameter. Skip non canonical virtual bases too.
12721 (dfs_set_offset_for_unshared_vbases): Don't skip primary
12722 bases. Do skip canonical bases.
12723 (layout_virtual_bases): Adjust.
12724 (layout_class_type): Adjust.
12725 (dfs_get_primary_binfo): Build list of virtual primary base
12726 candidates.
12727 (get_primary_binfo): Check that the shared virtual primary
12728 base candidate was found first.
12729 (accumulate_vtbl_inits): Don't do anything for non-vptr
12730 containing binfos. For case 1 primary virtual bases, keep
12731 checking that we've not emerged from the hierarchy of RTTI_BINFO.
12732
12733 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12734
12735 PR c++/3089
12736 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12737 hierarchy looking for primary bases for a ctor
12738 vtable. Recursively call oneself, if we meet our primary via
12739 this route and haven't met it yet via inheritance graph order.
12740
12741 2001-06-11 Mark Mitchell <mark@codesourcery.com>
12742
12743 * lang-options.h: Emit documentation for -fno-honor-std, not
12744 -fhonor-std.
12745
12746 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
12747
12748 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12749 Don't clobber delta.
12750 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12751
12752 2001-06-10 Mark Mitchell <mark@codesourcery.com>
12753 Gabriel Dos Reis <gdr@codesourcery.com>
12754
12755 * Make-lang.in (cp/call.o): Depend on diagnostic.h
12756 (cp/typeck.o): Depend on diagnostic.h
12757 (cp/typeck2.o): Depend on diagnostic.h
12758 (cp/repo.o): Depend on dignostic.h
12759 * typeck.c: #include diagnostic.h
12760 (convert_for_initialization): Remove extern declaration for
12761 warningcount and errorcount.
12762
12763 * call.c: #include diagnostic.h
12764 (convert_like_real): Remove extern declaration for warnincount and
12765 errorcount.
12766
12767 * repo.c: #include diagnostic.h
12768 * typeck2.c: #include diagnostic.h
12769
12770 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12771
12772 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12773 in previous change.
12774
12775 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12776
12777 PR c++/2929
12778 * friend.c (do_friend): Use push_decl_namespace for classes at
12779 namespace scope.
12780
12781 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12782 Jason Merrill <jason_merrill@redhat.com>
12783
12784 PR c++/3061
12785 * class.c (build_secondary_vtable): Use assert, rather than an error
12786 message.
12787 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12788 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12789 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12790 Don't set BINFO_VTABLE for a primary virtual base.
12791
12792 2001-06-07 Mark Mitchell <mark@codesourcery.com>
12793
12794 * decl.c (duplicate_decls): Update source position information
12795 when a template function is defined.
12796
12797 2001-06-07 Phil Edwards <pme@sources.redhat.com>
12798
12799 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
12800
12801 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
12802
12803 PR c++/2914
12804 * decl.c (pushtag): Don't push into a complete type's scope.
12805
12806 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
12807
12808 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12809 (struct lang_decl_flags): Lose generate_with_vtable_p.
12810 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12811 * class.c (copy_virtuals): Adjust.
12812 * decl2.c (mark_vtable_entries): Adjust.
12813 * method.c (make_thunk, build_vtable_entry): Adjust.
12814 * class.c (update_vtable_entry_for_fn): Only look as far as the
12815 first defining class.
12816 (build_vtbl_initializer): Put nothing in the slot for a function only
12817 defined in a lost primary virtual base.
12818 (add_vcall_offset_vtbl_entries_1): Use the same code for
12819 the lost primary case and the normal case.
12820 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12821 (get_vfield_offset, get_derived_offset): Lose.
12822 (dfs_find_final_overrider): Use look_for_overrides_here.
12823 (get_matching_virtual): New fn.
12824 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12825 not BV_VCALL_INDEX.
12826 * search.c (look_for_overrides_here): Split out from...
12827 (look_for_overrides_r): Here.
12828
12829 * class.c (find_final_overrider): Return error_mark_node on error.
12830
12831 * decl2.c (key_method): #if 0 accidental change.
12832
12833 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
12834
12835 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12836 (build_over_call): Likewise.
12837 * decl.c (grokparms): Likewise.
12838 * pt.c (tsubst_decl): Likewise.
12839 * typeck.c (convert_arguments): Likewise.
12840
12841 2001-06-05 Mark Mitchell <mark@codesourcery.com>
12842
12843 * semantics.c (begin_class_definition): Robustify.
12844
12845 * pt.c (instantiate_decl): Tell the repository code about the
12846 clones, not the cloned functions.
12847 * repo.c (repo_template_used): Explicitly instantiate the cloned
12848 function, not the clones.
12849
12850 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12851
12852 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12853 ICS_BAD_FLAG on created conversion.
12854 (compare_ics): Break out rank.
12855
12856 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12857
12858 * decl.c (xref_tag): Remove extraneous %s on dependent name
12859 lookup warning.
12860
12861 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12862
12863 * class.c (layout_vtable_decl): Fix off by one error on
12864 build_index_type.
12865 (build_vtt): Likewise.
12866 (build_ctor_vtbl_group): Likewise.
12867
12868 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12869
12870 * class.c (maybe_indent_hierarchy): New function.
12871 (dump_class_hierarchy_r): Add flags. Dump extra binfo
12872 information, if enabled. Use maybe_indent_hierarchy. Adjust
12873 output format.
12874 (dump_class_hierarchy): Adjust prototype. Adjust output format.
12875 (dump_array, dump_vtable, dump_vtt): New functions.
12876 (finish_struct_1): Adjust hierarchy dumping.
12877 (initialize_vtable): Call dump_vtable.
12878 (build_vtt): Call dump_vtt.
12879 (build_ctor_vtbl_group): Call dump_vtable.
12880 * decl2.c (flag_dump_class_layout): Remove.
12881 (cxx_decode_option): Remove dump translation unit
12882 and dump class hierarchy check. Call dump_switch_p.
12883 (finish_file): Adjust dumping.
12884 (dump.c): Only dump base classes if not TDF_SLIM.
12885 Only dump namespace members if not TDF_SLIM.
12886 * optimize.c (dump_function): New function.
12887 (optimize_function): Call dump_function.
12888 * semantics.c (expand_body): Use dump_enabled_p.
12889
12890 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
12891
12892 PR g++/2936
12893 Part missed from first commit
12894 * decl2.c (finish_anon_union): Copy context.
12895
12896 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
12897
12898 PR g++/2936
12899 * optimize.c (remap_decl): Remap anonymous aggregate members too.
12900
12901 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
12902
12903 PR g++/2823
12904 * semantics.c (expand_body): Don't optimize thunks.
12905
12906 2001-05-25 Sam TH <sam@uchicago.edu>
12907
12908 * cp-tree.h lex.h: Fix header include guards.
12909
12910 2001-05-25 Mark Mitchell <mark@codesourcery.com>
12911
12912 * decl.c (init_decl_processing): Tweak.
12913
12914 2001-05-24 Mark Mitchell <mark@codesourcery.com>
12915
12916 * decl.c (duplicate_decls): Tidy.
12917 (init_decl_processing): Always set flag_no_builtin.
12918
12919 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
12920
12921 PR c++/2184
12922 * decl2.c (do_local_using_decl): Push the decls, even in a
12923 template.
12924
12925 2001-05-22 Mark Mitchell <mark@codesourcery.com>
12926
12927 * optimize.c (initialize_inlined_parameters): Don't set
12928 TREE_READONLY for a VAR_DECL taking the place of an inlined
12929 PARM_DECL.
12930
12931 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
12932
12933 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12934 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12935 attribute.
12936
12937 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
12938
12939 * parse.y: Refer to compound literals as such, not as
12940 constructor-expressions.
12941
12942 2001-05-21 Mark Mitchell <mark@codesourcery.com>
12943
12944 * call.c (build_op_delete_call): Ignore exception-specifications
12945 when looking for matching delete operators.
12946 * init.c (build_new_1): Compute whether or not the allocation
12947 function used is a placement allocation function or not, and
12948 communicate this information to build_op_delete_call.
12949
12950 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
12951
12952 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
12953 (build_vtbl_ref): Adjust.
12954 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12955 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12956 Re-add vtable-gc.
12957 (unsupported_options): Correspondingly.
12958
12959 * decl2.c (maybe_make_one_only): Check flag_weak, not
12960 supports_one_only().
12961
12962 * cp-tree.def (START_CATCH_STMT): Lose.
12963 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
12964 * tree.c (cp_statement_code_p): Don't case it.
12965 * semantics.c (cp_expand_stmt): Likewise.
12966 * cp-tree.h (START_CATCH_TYPE): Lose.
12967 (HANDLER_TYPE): New.
12968 * except.c (expand_start_catch_block): Don't start any blocks.
12969 Return the type.
12970 (expand_end_catch_block): Don't end any blocks.
12971 * parse.y (handler): Don't pass anything from finish_handler_parms
12972 to finish_handler.
12973 * pt.c (tsubst_expr): Likewise.
12974 * semantics.c (begin_handler): Call note_level_for_catch here.
12975 (finish_handler_parms): Don't return anything.
12976 (genrtl_catch_block, begin_catch_block): Lose.
12977 (genrtl_handler): Call expand_start_catch here.
12978
12979 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
12980
12981 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12982 (get_vtable_decl, build_vtt): Not here.
12983
12984 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
12985
12986 PR c++/2781
12987 * optimize.c (update_cloned_parm): Copy addressability and other
12988 flags.
12989
12990 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12991
12992 * pt.c (determine_specialization): Ignore artificial functions.
12993
12994 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
12995
12996 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12997 (C_RID_CODE): Remove.
12998 * lex.c (cxx_init_options): Call set_identifier_size. Update.
12999 (init_parse): Don't do it here.
13000
13001 2001-05-18 Diego Novillo <dnovillo@redhat.com>
13002
13003 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
13004 function declaration to avoid stripping the symbol's attributes.
13005
13006 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
13007
13008 * decl.c (pushdecl): Adjust error string.
13009 (xref_tag): Adjust friend class injection warning. Remove the
13010 inherited name from the class shadowed scope.
13011
13012 2001-05-17 Mark Mitchell <mark@codesourcery.com>
13013
13014 * except.c (cp_protect_cleanup_actions): New function.
13015 (init_exception_processing): Don't set protect_cleanup_actions
13016 here. Do set lang_protect_cleanup_actions.
13017
13018 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13019
13020 * spew.c (read_token): Call yyerror on all unexpected tokens.
13021
13022 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13023
13024 * init.c (member_init_ok_or_else): Take a tree rather than
13025 string for name.
13026 (expand_member_init): Adjust.
13027
13028 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
13029
13030 * decl.c (duplicate_decls): Suppress warning about duplicate
13031 decls if the first decl is a friend.
13032
13033 2001-05-12 Zack Weinberg <zackw@stanford.edu>
13034
13035 * except.c (choose_personality_routine): Export. Add
13036 explanatory comment. Take an enum languages, not a boolean.
13037 (initialize_handler_parm): Adjust to match.
13038 * cp-tree.h: Prototype choose_personality_routine.
13039 * lex.c (handle_pragma_java_exceptions): New function.
13040 (init_cp_pragma): Register #pragma GCC java_exceptions.
13041
13042 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
13043
13044 * method.c (build_mangled_C99_name): Remove unused prototype.
13045
13046 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
13047
13048 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
13049 * typeck.c (get_member_function_from_ptrfunc,
13050 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
13051 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
13052
13053 Reverted Geoff Keating's 2001-05-03's patch.
13054
13055 2001-05-11 Ira Ruben <ira@apple.com>
13056
13057 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
13058
13059 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
13060
13061 * cp-tree.h (finish_label_expr, lookup_label): Delete.
13062 * parse.y: Update for '&&'; don't issue warning here.
13063 * semantics.c (finish_label_expr): Delete.
13064
13065 2001-05-07 Mark Mitchell <mark@codesourcery.com>
13066
13067 * splay-tree.h (splay_tree_max): New function.
13068 (splay_tree_min): Likewise.
13069
13070 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
13071
13072 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
13073 (pfn_vflag_identifier): Define.
13074 Update comment about layout of pointer functions.
13075 (build_ptrmemfunc1): Update prototype.
13076 (expand_ptrmemfunc_cst): Update prototype.
13077 * decl.c (initialize_predefined_identifiers): Initialize
13078 pfn_vflag_identifier.
13079 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
13080 an extra field to the type.
13081 * expr.c (cplus_expand_constant): Pass 'flag' between
13082 expand_ptrmemfunc_cst and build_ptrmemfunc1.
13083 * typeck.c (get_member_function_from_ptrfunc): When
13084 FUNCTION_BOUNDARY < 16, look at additional field to determine
13085 if a pointer-to-member is a real pointer or a vtable offset.
13086 (build_ptrmemfunc1): Add new parameter to contain extra field.
13087 (build_ptrmemfunc): Pass the extra field around.
13088 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
13089 (pfn_from_ptrmemfunc): Ignore the extra field.
13090
13091 2001-05-03 Mark Mitchell <mark@codesourcery.com>
13092
13093 * cp-tree.h (flag_inline_trees): Update documentation.
13094 * decl.c (init_decl_processing): Adjust handling of
13095 flag_inline_functions and flag_inline_trees to support -O3.
13096 (grokfndecl): Set DECL_INLINE on all functions if that's what
13097 the user requested.
13098 (save_function_data): Clear DECL_INLINE in
13099 current_function_cannot_inline is non-NULL.
13100 * decl2.c (flag_inline_trees): Update documentation.
13101
13102 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
13103
13104 * dump.c (cp_dump_tree, USING_STMT case): New case.
13105 * tree.c (cp_statement_code_p): Add USING_STMT.
13106 * decl2.c (do_using_directive): Add the using directive statement.
13107
13108 * tree.c (walk_tree): Reformat an if block.
13109
13110 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13111
13112 * decl.c (compute_array_index_type): Don't try to do anything with
13113 the indices when processing a template.
13114
13115 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13116
13117 * call.c: NULL_PTR -> NULL.
13118 * class.c: Likewise.
13119 * cvt.c: Likewise.
13120 * decl.c: Likewise.
13121 * decl2.c: Likewise.
13122 * except.c: Likewise.
13123 * init.c: Likewise.
13124 * rtti.c: Likewise.
13125 * search.c: Likewise.
13126 * tree.c: Likewise.
13127 * typeck.c: Likewise.
13128 * typeck2.c: Likewise.
13129
13130 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13131
13132 * decl2.c (do_using_directive): Revert previous patch.
13133
13134 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13135
13136 * cp-tree.def (USING_STMT): New statement node.
13137 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13138 * decl2.c (do_using_directive): Add USING_STMT to statement
13139 tree. Don't emit errors when processing template decl.
13140 * pt.c (tsubst_expr, USING_STMT case): New case.
13141 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13142
13143 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13144
13145 * call.c (build_new_op): Convert args from reference here.
13146 (build_conditional_expr): Don't convert here.
13147
13148 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13149
13150 * spew.c (last_token_id): New static variable.
13151 (read_token): Set it here.
13152 (yyerror): Use it here.
13153
13154 2001-04-30 Richard Henderson <rth@redhat.com>
13155
13156 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13157 * decl.c: Likewise.
13158
13159 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13160
13161 * gxxint.texi: Remove.
13162 * Make-lang.in: Remove all traces of gxxint.texi.
13163
13164 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
13165
13166 * decl2.c (start_static_initialization_or_destruction): Correct
13167 logic to handle the -fno-use-cxa-atexit case.
13168
13169 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13170
13171 * optimize.c (update_cloned_parm): New function.
13172 (maybe_clone_body): Use it. Update the `this' parameter too.
13173
13174 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
13175
13176 * decl2.c (unsupported_options): Add new-abi.
13177 * lang-options.h: Remove no longer supported options.
13178
13179 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13180
13181 * except.c (can_convert_eh): Don't check template parms,
13182 typename types etc.
13183
13184 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13185
13186 * optimize.c (maybe_clone_body): Copy parameter names and locations.
13187
13188 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13189
13190 * cp-tree.h (adjust_clone_args): Prototype new function.
13191 * class.c (adjust_clone_args): New function.
13192 * decl.c (start_function): Call it for in charge ctors.
13193
13194 2001-04-26 Mark Mitchell <mark@codesourcery.com>
13195
13196 * method.c (use_thunk): Make sure that thunks really are emitted
13197 when requested.
13198
13199 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
13200
13201 * mangle.c (write_chars): New macro.
13202 (hwint_to_ascii): New function
13203 (write_number): Use it.
13204 (write_integer_cst): Deal with really big numbers.
13205
13206 2001-04-25 Mark Mitchell <mark@codesourcery.com>
13207
13208 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13209 the clone.
13210
13211 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
13212
13213 * decl.c (grokdeclarator): Set context of namespace scope
13214 TYPE_DECLS.
13215
13216 2001-04-24 Zack Weinberg <zackw@stanford.edu>
13217
13218 * cp/optimize.c: Include hashtab.h.
13219 (struct inline_data): Add tree_pruner.
13220 (expand_call_inline, expand_calls_inline): Use it when calling
13221 walk_tree.
13222 (optimize_function): Initialize and free tree_pruner.
13223
13224 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13225
13226 Lazy __FUNCTION__ generation.
13227 * cp-tree.def (FUNCTION_NAME): Remove.
13228 * cp-tree.h (function_name_declared_p): Remove.
13229 (cp_fname_init): Prototype.
13230 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13231 don't call declare_function_name. Call start_fname_decls.
13232 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13233 clobber the line number.
13234 (cp_fname_init): New function.
13235 (start_function): Call start_fname_decls.
13236 (finish_function): Call finish_fname_decls.
13237 * lex.c (reswords): Add slots for __FUNCTION__ et al.
13238 (rid_to_yy): Add mappings for __FUNCTION__ et al.
13239 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13240 * parse.y (VAR_FUNC_NAME): New token.
13241 (primary): Add VAR_FUNC_NAME.
13242 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13243 generation.
13244 (tsubst, FUNCTION_NAME case): Remove.
13245 (tsubst_copy, FUNCTION_NAME case): Remove.
13246 (tsubst_expr, DECL_STMT case): Be careful with a
13247 DECL_PRETTY_FUNCTION_P.
13248 (instantiate_decl): Remove function_name_declared_p.
13249 * semantics.c (begin_compound_statement): Don't call
13250 declare_function_name here.
13251 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13252 (finish_translation_unit): Call finish_fname_decls.
13253 (expand_body): Remove function_name_declared_p.
13254 * typeck2.c (digest_init): Allow any ERROR_MARK.
13255
13256 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13257
13258 * pt.c (tsubst_decl): Use VOID_TYPE_P.
13259 * semantics.c: Fix some typos.
13260
13261 2001-04-23 Phil Edwards <pme@sources.redhat.com>
13262
13263 * cp/decl2.c (flag_honor_std): Always initialize to 1.
13264
13265 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13266
13267 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13268
13269 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
13270
13271 * except.c (build_throw): Wrap the initialization of the exception
13272 object in a MUST_NOT_THROW_EXPR.
13273 (do_free_exception): #if 0.
13274
13275 2001-04-20 Mark Mitchell <mark@codesourcery.com>
13276
13277 * cp-tree.h (finish_enum): Change prototype.
13278 * decl.c (finish_enum): Reorganize.
13279 * parse.y (structsp): Adjust calls to finish_enum.
13280
13281 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13282
13283 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13284 't' case.
13285
13286 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13287
13288 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13289 (layout_empty_base): Return at end flag.
13290 (build_base_field): Likewise.
13291 (build_base_fields): Likewise.
13292 (layout_virtual_bases): Don't add 1 to eoc value.
13293 (end_of_class): Use full size for empty bases.
13294 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13295 empty bases. Don't add 1 to eoc value. Only add trailing padding
13296 if we're an empty class with no empty bases.
13297 (dump_class_hierarchy): Dump size and alignment.
13298
13299 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13300
13301 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13302 ICS_BAD_FLAG.
13303
13304 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13305
13306 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13307 is found, look first if name does not match the structure name.
13308
13309 2001-04-19 Mark Mitchell <mark@codesourcery.com>
13310
13311 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13312 set.
13313 (SET_DECL_LANGUAGE): New macro.
13314 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13315 (pushdecl): Likewise.
13316 (build_library_fn_1): Likewise.
13317 (build_cp_library_fn): Likewise.
13318 (grokfndecl): Likewise.
13319 (grokvardecl): Mark `extern "C"' variables as having C linkage.
13320 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13321 * lex.c (retrofit_lang_decl): Likewise.
13322 * mangle.c (mangle_decl_string): Don't mangle the names of
13323 variables declared with C language linkage.
13324 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13325
13326 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
13327
13328 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13329 flag_access_control from uninitialized storage.
13330
13331 2001-04-15 Mark Mitchell <mark@codesourcery.com>
13332
13333 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13334 * mangle.c (write_pointer_to_member_type): Fix mangling of
13335 pointers to cv-qualified member function types.
13336
13337 * init.c (build_delete): Create a SAVE_EXPR for the address if
13338 we're going to use it more than once.
13339
13340 2001-04-13 Mark Mitchell <mark@codesourcery.com>
13341
13342 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13343 (expand_ptremfunc_cst): Change prototype.
13344 (delta2_from_ptrmemfunc): Remove.
13345 * expr.c (cplus_expand_constant): Adjust call to
13346 expand_ptrmemfunc_cst.
13347 * typeck.c (build_ptrmemfunc1): Simplify.
13348 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13349 results in a constant.
13350 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13351 (delta2_from_ptrmemfunc): Remove.
13352 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13353
13354 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
13355
13356 * cp-tree.h (decl_namespace_list): New macro.
13357 (struct saved_scope): Add decl_ns_list.
13358 * decl.c (mark_saved_scope): Mark it.
13359 * decl2.c: Lose static decl_namespace_list.
13360 (init_decl2): Don't save it.
13361
13362 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13363
13364 * cp-tree.h (warn_return_type, yylex): Delete redundant
13365 declarations.
13366
13367 * decl.c (current_class_depth, global_namespace): Likewise.
13368
13369 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13370
13371 * repo.c (flag_use_repository): Likewise.
13372
13373 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13374
13375 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13376 set_block, pushdecl, getdecls, gettags, init_decl_processing,
13377 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13378 lvalue_or_else, print_lang_statistics, comp_target_types,
13379 unsigned_type, signed_type, signed_or_unsigned_type,
13380 build_function_call, mark_addressable, incomplete_type_error):
13381 Delete redundant declarations.
13382
13383 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
13384
13385 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13386 (TYPE_ANONYMOUS_P): New macro.
13387 (TAGGED_TYPE_P): New macro.
13388 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13389 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13390 * tree.c (no_linkage_helper): Likewise.
13391 * semantics.c (begin_class_definition): Likewise.
13392 * pt.c (convert_template_argument): Likewise.
13393 * lex.c (check_for_missing_semicolon): Likewise.
13394
13395 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13396
13397 * class.c (dfs_unshared_virtual_bases): New function.
13398 (mark_primary_bases): Call it.
13399 (check_bases): Ignore virtual bases when determining
13400 nearly-emptiness.
13401
13402 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13403
13404 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13405
13406 2001-04-11 Mark Mitchell <mark@codesourcery.com>
13407
13408 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13409 cloned function to the clone.
13410
13411 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13412
13413 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13414
13415 * semantics.c: Include expr.h.
13416
13417 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
13418
13419 * method.c (implicitly_declare_fn): Commonize code for copy ctor
13420 and assignment op. Set TREE_USED for parameter.
13421
13422 2001-04-10 Mark Mitchell <mark@codesourcery.com>
13423
13424 * class.c (find_final_overrider_data): Add `candidates'.
13425 (dfs_find_final_overrider): Don't issue error messages
13426 prematurely.
13427 (find_final_overrider): Issue error messages here.
13428 (build_base_field): Don't warn about amgibuous direct bases here.
13429 (warn_about_ambiguous_direct_bases): New function.
13430 (layout_class_type): Use it.
13431
13432 2001-04-10 Richard Henderson <rth@redhat.com>
13433
13434 * typeck.c (build_array_ref): Push the array reference inside
13435 COMPOUND_EXPR and COND_EXPR.
13436
13437 2001-04-05 Mark Mitchell <mark@codesourcery.com>
13438
13439 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13440 * decl.c (duplicate_decls): Adjust accordingly.
13441 (maybe_commonize_var): Likewise.
13442 (grokfndecl): Likewise.
13443 (start_function): Likewise.
13444 (start_method): Likewise.
13445 * decl2.c (key_method): Likewise.
13446 (import_export_decl): Likewise.
13447 * method.c (implicitly_declare_fn): Likewise.
13448 * optimize.c (maybe_clone_body): Likewise.
13449
13450 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
13451
13452 * lang-specs.h: Add __DEPRECATED.
13453
13454 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
13455
13456 * search.c (get_dynamic_cast_base_type): When building a new
13457 constant, set its type to ssizetype.
13458
13459 2001-04-04 Jakub Jelinek <jakub@redhat.com>
13460
13461 * optimize.c (expand_call_inline): Only add newly inlined statements
13462 into inlined_stmts.
13463
13464 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13465
13466 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13467 (OPERATOR_FORMAT): Likewise.
13468 (OPERATOR_TYPENAME_FORMAT): Likewise.
13469 * operators.def: Remove old name-mangling information.
13470 * decl.c (grok_op_properties): Adjust accordingly.
13471 * lex.c (init_operators): Likewise.
13472 * rtti.c (get_tinfo_decl): Issue error messages about types that
13473 have variable size.
13474
13475 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13476
13477 * decl2.c (import_export_decl): Don't call import_export_class
13478 when processing an inline member function.
13479 * semantics.c (expand_body): Call import_export_decl before
13480 emitting inline functions.
13481
13482 2001-03-28 Richard Henderson <rth@redhat.com>
13483
13484 IA-64 ABI Exception Handling:
13485 * cp-tree.def (EH_SPEC_BLOCK): New.
13486 (MUST_NOT_THROW_EXPR): New.
13487 * cp-tree.h: Update changed function declarations.
13488 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13489 (CPTI_CALL_UNEXPECTED): New.
13490 (struct cp_language_function): Rename x_eh_spec_try_block
13491 to x_eh_spec_block.
13492 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13493 * decl.c (current_binding_level): If no current function
13494 bindings, revert to scope_chain.
13495 (initialize_predefined_identifiers): Remove __cp_push_exception.
13496 (store_parm_decls): Use begin_eh_spec_block.
13497 (finish_function): Use finish_eh_spec_block.
13498 (mark_lang_function): Update for name changes.
13499 * decl2.c (finish_file): No mark_all_runtime_matches.
13500 * dump.c (cp_dump_tree): Handle new tree codes.
13501 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13502 * except.c (catch_language_init, catch_language): Remove.
13503 (init_exception_processing): Don't set language code.
13504 Initialize call_unexpected_node, protect_cleanup_actions,
13505 eh_personality_libfunc, lang_eh_runtime_type.
13506 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13507 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13508 (prepare_eh_type): Split out type canonicalizations ...
13509 (build_eh_type_type): ... from here.
13510 (build_eh_type_type_ref): Remove.
13511 (mark_all_runtime_matches): Remove.
13512 (build_exc_ptr): New.
13513 (do_begin_catch, do_end_catch): New.
13514 (do_pop_exception): Remove.
13515 (build_terminate_handler): Remove.
13516 (choose_personality_routine): Split out language choice from ...
13517 (initialize_handler_parm): ... here.
13518 Use MUST_NOT_THROW_EXPR.
13519 (expand_start_catch_block): Use do_begin_catch. Simplify Java
13520 exception object handling.
13521 (expand_start_eh_spec, expand_end_eh_spec): Remove.
13522 (expand_exception_blocks, alloc_eh_object): Remove.
13523 (begin_eh_spec_block, finish_eh_spec_block): New.
13524 (do_allocate_exception, do_free_exception): New.
13525 (expand_throw): Merge into ...
13526 (build_throw): ... here. Update for abi.
13527 * expr.c (cplus_expand_expr): No expand_internal_throw.
13528 Handle MUST_NOT_THROW_EXPR.
13529 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13530 * semantics.c (*) Update for except.h name changes.
13531 (genrtl_try_block): No protect_with_terminate.
13532 (genrtl_eh_spec_block): New.
13533 (genrtl_handler): Don't emit the goto here.
13534 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13535 (genrtl_finish_function): Don't expand_exception_blocks.
13536 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13537
13538 2001-03-28 Richard Henderson <rth@redhat.com>
13539
13540 * decl.c (struct named_label_list): Rename eh_region to
13541 in_try_scope, add in_catch_scope.
13542 (struct binding_level): Rename eh_region to is_try_scope,
13543 add is_catch_scope.
13544 (note_level_for_try): Rename from note_level_for_eh.
13545 (note_level_for_catch): New.
13546 (poplevel): Copy both is_try_scope and is_catch_scope to
13547 the named_label_list struct.
13548 (check_previous_goto_1): Don't check for catch block via
13549 DECL_ARTIFICIAL; use in_try_scope instead.
13550 (check_goto): Likewise.
13551 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13552 * except.c (expand_start_catch_block): Call note_level_for_catch.
13553 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13554
13555 2001-03-27 Richard Henderson <rth@redhat.com>
13556
13557 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13558 exceptions_via_longjmp.
13559
13560 2001-03-27 Phil Edwards <pme@sources.redhat.com>
13561
13562 * pt.c (check_default_tmpl_args): Make error messages clearer.
13563
13564 2001-03-26 Phil Edwards <pme@sources.redhat.com>
13565
13566 * error.c: Also undefine 'A' macro used for cp_printers definition.
13567
13568 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13569
13570 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13571
13572 2001-03-26 Mike Yang <yang@research.att.com>
13573 Mark Mitchell <mark@codesourcery.com>
13574
13575 * dump.c (dump_access): New function.
13576 (cp_dump_tree): Use it. Dump basetype information for class
13577 types.
13578
13579 2001-03-26 Mark Mitchell <mark@codesourcery.com>
13580
13581 * Makefile.in (optimize.o): Depend on params.h.
13582 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13583 (init_decl_processing): Set flag_no_inline when doing
13584 inlining-on-trees.
13585 * optimize.c: Include params.h.
13586 (struct inline_data): Improve documentation of FNS. Add
13587 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13588 (INSNS_PER_STMT): New macro.
13589 (remap_block): Use CLONING_P.
13590 (inlinable_function_p): Don't inline big functions.
13591 (expand_call_inline): Keep track of how much inlining we've done.
13592 (optimize_function): Set FIRST_INLINED_FN.
13593 (maybe_clone_body): Set CLONING_P.
13594 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13595 tree nodes.
13596 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13597 rest_of_compilation. Clear DECL_RTL for local variables
13598 afterwards.
13599 (clear_decl_rtl): New function.
13600
13601 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
13602
13603 Implement DR 209
13604 * cp-tree.h (skip_type_access_control,
13605 reset_type_access_control): Prototype.
13606 * decl.c (grokdeclarator): Access of friends is not checked.
13607 * parse.y (component_decl_list): Reset type access control.
13608 * semantics.c (decl_type_access_control): Clear
13609 current_type_lookups.
13610 (save_type_access_control): Don't save if not deferring.
13611 (skip_type_access_control, reset_type_access_control): New
13612 functions.
13613 (begin_class_definition): Do type access control for basetypes.
13614 Start deferred access control.
13615 (finish_class_definition): Resume immediate access control if
13616 this is a local class.
13617
13618 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13619
13620 * class.c (add_method): Use memcpy/memmove, not bcopy.
13621
13622 * decl.c (duplicate_decls): Likewise.
13623
13624 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13625
13626 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13627 not `_'.
13628
13629 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13630
13631 * decl.c (local_names): Define.
13632 (push_local_name): New.
13633 (grok_reference_init): Return init if initializing static reference
13634 variable with non-constant instead of emitting it.
13635 Move expand_static_init call to cp_finish_decl.
13636 (layout_var_decl): Call push_local_name.
13637 (maybe_commonize_var): Allow inlining functions even if they have
13638 static local variables, use comdat_linkage for them if flag_weak.
13639 (check_initializer): Call obscure_complex_init if
13640 grok_reference_init returned nonzero.
13641 (save_function_data): Clear x_local_names.
13642 (pop_cp_function_context): Free x_local_names.
13643 (mark_inlined_fns): Remove.
13644 (mark_lang_function): Mark x_local_names.
13645 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13646 Mark inlined_fns as tree, remove call to mark_inlined_fns.
13647 * class.c (alter_access): Ensure DECL_ACCESS is never set if
13648 DECL_DISCRIMINATOR_P.
13649 * cp-tree.h (cp_language_function): Add x_local_names.
13650 (lang_decl_flags): Add discriminator into u2.
13651 (lang_decl_inlined_fns): Remove.
13652 (lang_decl): inlined_fns is now a TREE_VEC.
13653 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13654 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13655 TREE_VEC, not a custom structure.
13656 (optimize_function): Likewise.
13657 * mangle.c (discriminator_for_local_entity): Discriminate among
13658 VAR_DECL local entities.
13659 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13660 is not valid.
13661
13662 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
13663
13664 Add support for Java interface method calls.
13665 * cp-tree.h (struct lang_type): Add java_interface flag.
13666 (TYPE_JAVA_INTERFACE): New macro.
13667 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13668 by setting TYPE_JAVA_INTERFACE.
13669 * call.c (java_iface_lookup_fn): New static.
13670 (build_over_call): If calling a method declared in a
13671 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13672 expression which resolves the function address.
13673 (build_java_interface_fn_ref): New function.
13674
13675 2001-03-22 Richard Henderson <rth@redhat.com>
13676
13677 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13678 * except.c: Don't include it.
13679
13680 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13681 based on an idea from Joe Buck <jbuck@synopsys.com>
13682
13683 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13684 New nonterminals.
13685 (data_def, component_decl): Add reductions to bad_decl.
13686
13687 2001-03-22 Jakub Jelinek <jakub@redhat.com>
13688
13689 * method.c (do_build_assign_ref): Don't use build_modify_expr for
13690 anonymous aggregates, since they don't have assignment operator
13691 method.
13692 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13693 assignment operators for anonymous structure fields.
13694
13695 2001-03-21 Jason Merrill <jason@redhat.com>
13696
13697 * pt.c (instantiate_decl): Abort if we see a member constant
13698 instantiation that doesn't already have its initializer.
13699 Downgrade explicit instantiation without definition to pedwarn.
13700
13701 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13702 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13703 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13704
13705 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13706 (pending_vtables): Remove.
13707 * decl2.c (pending_vtables): Remove.
13708 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13709 CLASSTYPE_VTABLE_NEEDS_WRITING.
13710 (import_export_class): Likewise.
13711 (init_decl2): Don't mark pending_vtables.
13712 * lex.c (handle_pragma_vtable): Just sorry.
13713 * pt.c (instantiate_class_template): Don't mess with
13714 CLASSTYPE_VTABLE_NEEDS_WRITING.
13715 (mark_class_instantiated): Likewise.
13716 * ptree.c (print_lang_type): Don't print it.
13717 * semantics.c (begin_class_definition): Don't set it.
13718
13719 * pt.c (template_tail): Replace with last_pending_template.
13720 (maybe_templates, maybe_template_tail): Remove.
13721 (add_pending_template): Adjust.
13722 (instantiate_pending_templates): Adjust.
13723
13724 * cp-tree.h (struct saved_scope): Remove lang_stack field.
13725 (current_lang_stack): Remove.
13726 * decl.c (maybe_push_to_top_level): Don't initialize it.
13727 (duplicate_decls): Use current_lang_depth.
13728 (xref_basetypes): Likewise.
13729 * class.c (current_lang_depth): New fn.
13730 (push_lang_context): Use more varray functionality.
13731 (pop_lang_context): Likewise.
13732
13733 * error.c (GLOBAL_THING): Always use '__'.
13734
13735 2001-03-21 Mark Mitchell <mark@codesourcery.com>
13736
13737 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13738
13739 * mangle.c (mangle_decl_string): Mangle the names of overloaded
13740 operators, even when they have `extern "C"' linkage.
13741
13742 2001-03-19 Mark Mitchell <mark@codesourcery.com>
13743
13744 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13745 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13746 where it's not necessary.
13747 (add_method): Remove optimization involving comparison of
13748 DECL_ASSEMBLER_NAME.
13749 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13750 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13751 where it's not necessary.
13752 (check_methods): Likewise.
13753 (build_clone): Likewise.
13754 (built_vtt): Likewise.
13755 * cp-tree.h (DECL_NEEDED_P): Likewise.
13756 * decl.c (pushtag): Likewise.
13757 (duplicate_decls): Likewise.
13758 (pushdecl): Likewise.
13759 (builtin_function): Likewise.
13760 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13761 (build_cp_library_fn): Likewise.
13762 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13763 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13764 where it's not necessary.
13765 (make_rtl_for_nonlocal_decl): Likewise.
13766 (cp_finish_decl): Likewise.
13767 (grokfndecl): Likewise.
13768 (grokvardecl): Likewise.
13769 (grokdeclarator): Likewise.
13770 (start_function): Likewise.
13771 (cp_missing_return_ok_p): Likewise.
13772 * decl2.c (grokclassfn): Likewise.
13773 (check_classfn): Likewise.
13774 (finish_static_data_member_decl): Likewise.
13775 (grokfield): Likewise.
13776 * error.c (GLOBAL_IORD_P): Remove.
13777 (dump_global_iord): Improve output.
13778 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13779 * except.c (nothrow_libfn_p): Summarily reject any function not in
13780 namespace-scope.
13781 * init.c (build_java_class_ref): Don't explicitly set
13782 DECL_ASSEMBLER_NAME after calling mangle_decl.
13783 * mangle.c (mangle_decl_string): Handle extern "C" functions.
13784 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13785 * method.c (set_mangled_name_for_decl): Don't explicitly set
13786 DECL_ASSEMBLER_NAME after calling mangle_decl.
13787 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13788 IDENTIFIER_GLOBAL_VALUE for the thunk.
13789 * pt.c (set_mangled_name_for_template_decl): Remove.
13790 (check_explicit_specialization): Don't use it.
13791 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13792 (tsubst_friend_function): Likewise.
13793 (tsubst_decl): Likewise.
13794 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13795 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13796 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13797 where it's not necessary.
13798 (tinfo_base_init): Likewise.
13799 (create_real_tinfo_var): Likewise.
13800 * search.c (looup_field_1): Likewise.
13801 * semantics.c (finish_named_return_value): Likewise.
13802 * tree.c (init_tree): Set lang_set_decl_assembler_name.
13803
13804 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
13805
13806 Correct semantics restrictions checking in throw-expression.
13807 * except.c (is_admissible_throw_operand): New function.
13808 (build_throw): Use it.
13809
13810 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13811
13812 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13813 and its ilk.
13814
13815 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13816
13817 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13818 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13819 * decl.c (duplicate_decls): Likewise.
13820 (builtin_function): Likewise.
13821 (build_library_fn): Likewise.
13822 (build_cp_library_fn): Likewise.
13823 (check_initializer): Likewise.
13824 (cp_finish_decl): Likewise.
13825 * decl2.c (grokfield): Likewise.
13826 (grok_function_init): Remove #if 0'd code.
13827 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13828 * friend.c (do_friend): Likewise.
13829 * init.c (get_temp_regvar): Likewise.
13830 * method.c (make_thunk): Likewise.
13831 * pt.c (tsubst_friend_function): Likewise.
13832 (tsubst_decl): Likewise.
13833 (regenerate_decl_from_template): Likewise.
13834 * semantics.c (genrtl_named_return_value): Likewise.
13835 (expand_body): Likewise.
13836 (genrtl_finish_function): Likewise.
13837 * tree.c (cp_tree_equal): Likewise.
13838
13839 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
13840
13841 * call.c (convert_like_real): Add extra semantics to INNER
13842 parameter. Don't convert to temporary if a user conversion
13843 gives us an lvalue that we're about to bind to a reference.
13844 Set INNER to indicate pending reference binding on recursive
13845 calls.
13846
13847 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13848
13849 * cp/lex.c: Delete duplicate pending_lang_change.
13850
13851 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13852
13853 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13854 Similarly.
13855 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13856 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13857
13858 2001-03-09 Zack Weinberg <zackw@stanford.edu>
13859
13860 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13861
13862 2001-03-08 Stan Shebs <shebs@apple.com>
13863
13864 * cp-tree.h (set_identifier_local_value): Remove unused decl.
13865
13866 2001-03-06 Zack Weinberg <zackw@stanford.edu>
13867
13868 * spew.c: Remove references to CPP_OSTRING.
13869
13870 2001-03-06 Andrew Haley <aph@redhat.com>
13871
13872 * typeck.c (convert_arguments): Check that we have an fndecl.
13873
13874 2001-03-05 Andrew Haley <aph@redhat.com>
13875
13876 * typeck.c (convert_arguments): Don't do ellipsis conversion for
13877 __built_in_constant_p.
13878
13879 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13880
13881 * typeck.c (build_static_cast): Allow enum to enum conversions
13882 as per DR 128.
13883
13884 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13885
13886 * class.c (check_field_decls): Pointers to member do not a
13887 non-pod struct make, as per DR 148.
13888
13889 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13890
13891 * call.c (joust): cp_pedwarn when using gnu extension concerning
13892 worst conversion sequences.
13893
13894 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13895
13896 * decl.c: Replace all uses of 'boolean' with 'bool'.
13897
13898 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13899
13900 * lang-specs.h: Add zero initializer for cpp_spec field to
13901 all array elements that need one. Don't put an #ifdef inside
13902 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13903 use it.
13904
13905 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13906
13907 Implement using decls inside template functions.
13908 * decl2.c (validate_nonmember_using_decl): Don't special case
13909 fake_std_node in the global namespace. Don't reject early when
13910 processing a template.
13911 (do_local_using_decl): Add to statement tree. Don't do further
13912 processing when building a template.
13913 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13914
13915 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13916
13917 * decl2.c (do_nonmember_using_decl): Don't complain if we find
13918 same function. Do complain about ambiguating extern "C"
13919 declarations.
13920
13921 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
13922
13923 Remove floating point and complex type template constant parms.
13924 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13925 COMPLEX_TYPE extensions.
13926 (invalid_nontype_parm_type_p): Likewise.
13927
13928 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
13929
13930 * except.c (call_eh_info): Revert "match_function"'s type.
13931
13932 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
13933
13934 Fix ctor vtable vcall offsets.
13935 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13936 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13937 (get_matching_base): Remove.
13938 (get_original_base): New function.
13939 (build_vtbl_initializer): Initialize vid.rtti_binfo.
13940 Use a virtual thunk for a ctor vtable with an index
13941 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13942 primary base within a constructor vtable. Only set
13943 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13944 when primary base has been lost.
13945 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13946
13947 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
13948
13949 * call.c (joust): Ensure more_specialized()'s argument length
13950 parameter has correct value for constructors.
13951
13952 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
13953
13954 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13955
13956 * decl.c (mark_inlined_fns): Prototype.
13957
13958 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13959
13960 * spew.c (yylex): Correct handling of friends.
13961
13962 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13963
13964 * mangle.c (write_encoding): Pass write_function_type the
13965 FUNCTION_DECL for the function being encoded.
13966 (write_function_type): Pass it along to write_bare_function_type.
13967 (write_bare_function_type): Pass it along to write_method_parms.
13968 (write_method_parms): Don't mangle the compiler-generated
13969 parameters to a constructor or destructor.
13970
13971 2001-02-22 Andreas Jaeger <aj@suse.de>
13972
13973 * optimize.c: Include toplev.h for
13974 note_deferral_of_defined_inline_function prototype.
13975
13976 2001-02-22 Jakub Jelinek <jakub@redhat.com>
13977
13978 * cp-tree.h (struct lang_decl_inlined_fns): New.
13979 (struct lang_decls): Add inlined_fns.
13980 (DECL_INLINED_FNS): New macro.
13981 * optimize.c (struct inline_data): Add inlined_fns.
13982 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13983 (inlinable_function_p): Likewise, fix typo in comment,
13984 function is not inlinable if it already inlined function currently
13985 being optimized.
13986 (expand_call_inline): Add fn to inlined_fns if necessary.
13987 (optimize_function): Initialize inlined_fns.
13988 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13989 * decl.c (mark_inlined_fns): New function.
13990 (lang_mark_tree): Call it.
13991
13992 2001-02-21 Jason Merrill <jason@redhat.com>
13993
13994 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13995 (DECL_UNINLINABLE): Move to middle-end.
13996
13997 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13998 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13999 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
14000 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
14001 parms and outer BLOCK. note_deferral_of_defined_inline_function.
14002
14003 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
14004 second parm of op=.
14005
14006 2001-02-19 Mark Mitchell <mark@codesourcery.com>
14007
14008 * decl2.c (set_decl_namespace): Allow explicit instantiations in
14009 any namespace.
14010
14011 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14012
14013 * optimize.c (expand_call_inline): Don't walk subtrees of type
14014 nodes.
14015
14016 2001-02-18 Mark Mitchell <mark@codesourcery.com>
14017
14018 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
14019 for a destructor.
14020
14021 2001-02-18 Jason Merrill <jason@redhat.com>
14022
14023 Do put the VTT parameter in DECL_ARGUMENTS.
14024 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
14025 (current_vtt_parm): New macro.
14026 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
14027 (DECL_HAS_VTT_PARM_P): New macro.
14028 (DECL_VTT_PARM): Remove.
14029 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
14030 * decl.c (duplicate_decls): Only copy the operator code if
14031 appropriate.
14032 (start_function): Set current_vtt_parm.
14033 (lang_mark_tree): Don't mark vtt_parm.
14034 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
14035 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
14036 * class.c (build_clone): Maybe remove the VTT parm.
14037 * optimize.c (maybe_clone_body): Set up the VTT parm.
14038 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
14039 * call.c (build_over_call): Just allow the VTT arg.
14040 * method.c (make_thunk): Don't set DECL_VTT_PARM.
14041 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
14042 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
14043 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
14044 * error.c (dump_function_decl): Likewise.
14045 * call.c (build_user_type_conversion_1, convert_like_real): Abort
14046 if we try to call a constructor with in-charge or VTT parms.
14047 * method.c (skip_artificial_parms_for): New fn.
14048 * call.c (add_function_candidate, build_over_call): Call it.
14049 * call.c (build_new_method_call): Use current_vtt_parm.
14050 * init.c (expand_virtual_init): Likewise.
14051 * class.c (same_signature_p): No longer static.
14052 * cp-tree.h: Declare it.
14053 * search.c (look_for_overrides_r): Use it.
14054
14055 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14056
14057 * cp-tree.h (new_abi_rtti_p): Remove.
14058 (name_mangling_version): Likewise.
14059 (flag_do_squangling): Likewise.
14060 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
14061 * decl.c (grokfndecl): Likewise.
14062 * decl2.c (name_mangling_version): Remove.
14063 (flag_do_squangling): Likewise.
14064 (lang_f_options): Remove `squangle'.
14065 (unsupported_options): Add `squangle'.
14066 (cxx_decode_option): Issue a warning about uses of
14067 -fname-mangling-version.
14068 (finish_file): Remove old ABI support.
14069 * pt.c (check_explicit_specialization): Likewise.
14070 (tsubst_decl): Likewise.
14071 * rtti.c (init_rtti_processing): Likewise.
14072 (build_headof): Likewise.
14073 (get_tinfo_decl_dynamic): Likewise.
14074 (tinfo_from_decl): Likewise.
14075 (build_dynamic_cast_1): Likewise.
14076 (synthesize_tinfo_var): Likewise.
14077 * init.c (build_new): Allow enumeration types for the array-bounds
14078 in a direct-new-declarator.
14079
14080 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
14081
14082 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
14083 TREE_PROTECTED from the template being specialized.
14084
14085 2001-02-17 Jason Merrill <jason@redhat.com>
14086
14087 * decl2.c (build_artificial_parm): Set TREE_READONLY.
14088
14089 * decl.c (bad_specifiers): Allow throw specs on things with
14090 pointer-to-function or -member-function type.
14091 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
14092 a pmf.
14093
14094 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14095
14096 * call.c (check_dtor_name): Handle template names correctly.
14097
14098 2001-02-16 Jason Merrill <jason@redhat.com>
14099
14100 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
14101 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
14102 * optimize.c (maybe_clone_body): Don't substitute it.
14103 * call.c (build_new_method_call): Check in_chrg instead.
14104 * init.c (expand_virtual_init): Likewise.
14105
14106 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
14107
14108 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
14109 class-type introduces at least a type-name.
14110
14111 2001-02-16 Jakub Jelinek <jakub@redhat.com>
14112
14113 * call.c (convert_like_real): Create a temporary for non-lvalue.
14114
14115 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
14116
14117 * cp-tree.h: Fix typos in comments.
14118
14119 2001-02-16 Jason Merrill <jason@redhat.com>
14120
14121 * optimize.c (remap_block): If we're compiling a clone, pass the
14122 new block to insert_block.
14123
14124 2001-02-16 Mark Mitchell <mark@codesourcery.com>
14125
14126 * semantics.c (finish_asm_stmt): Robustify.
14127
14128 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14129
14130 * pt.c (push_template_decl_real): Don't remangle the name of a
14131 class template.
14132
14133 2001-02-15 Jim Meyering <meyering@lucent.com>
14134
14135 * Make-lang.in (c++.install-common): Depend on installdirs.
14136 (c++.install-info): Likewise.
14137 (c++.install-man): Likewise.
14138
14139 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14140
14141 * typeck2.c (build_m_component_ref): Robustify.
14142
14143 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
14144
14145 * friend.c (do_friend): Don't take the nested [template] class
14146 into account when deciding whether to warn about the friend
14147 function not referring to a template function.
14148
14149 2001-02-14 Jakub Jelinek <jakub@redhat.com>
14150
14151 * typeck.c (build_unary_op): Clarify error message.
14152
14153 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
14154
14155 * parse.y (component_constructor_declarator): allow optional
14156 parentheses around constructor class name.
14157
14158 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14159
14160 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14161 section.
14162 * init.c (emit_base_init): Remove incorrect comment about
14163 virtual bases.
14164 * method.c (make_thunk): Fix comment alignment.
14165
14166 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14167
14168 Kill remnants of this is variable.
14169 * cp-tree.h (flag_this_is_variable): Remove.
14170 * decl2.c (flag_this_is_variable): Remove.
14171 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14172 (build_vbase_path): The path is non-static, even in a cdtor.
14173 (resolves_to_fixed_type_p): Add additional return value.
14174 * search.c (init_vbase_pointers): Adjust.
14175 * tree.c (lvalue_p_1): Adjust.
14176 * typeck.c (mark_addressable): Adjust.
14177
14178 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14179
14180 * pt.c (unify): Don't check cv quals of array types.
14181
14182 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14183
14184 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14185 check whether we already have the type.
14186
14187 2001-02-13 Mark Mitchell <mark@codesourcery.com>
14188
14189 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14190 * call.c (build_op_delete_call): Simplify to remove duplicate
14191 code.
14192 * class.c (clone_function_decl): Don't build the deleting variant
14193 of a non-virtual destructor.
14194 * decl.c (finish_destructor_body): Don't call delete if this is a
14195 non-virtual destructor.
14196 * init.c (build_delete): Explicitly call `operator delete' when
14197 deleting an object with a non-virtual destructor.
14198
14199 2001-02-13 Jason Merrill <jason@redhat.com>
14200
14201 * lang-specs.h: Add more __EXCEPTIONS.
14202
14203 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14204
14205 * typeck2.c (process_init_constructor): Check
14206 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14207
14208 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14209
14210 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14211 Remove spurious information in comment. Allow further
14212 adjustments of REFERENCE_TYPE args.
14213
14214 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14215
14216 * errfn.c (cp_deprecated): Tweak diagnostic text.
14217 * parse.y (new_initializer): Deprecate initializer lists
14218 extension.
14219
14220 2001-02-12 Mark Mitchell <mark@codesourcery.com>
14221
14222 Remove old ABI support.
14223
14224 2001-02-11 Mark Mitchell <mark@codesourcery.com>
14225
14226 * decl2.c (flag_vtable_thunks): Always set it to 1.
14227 (flag_new_abi): Likewise.
14228 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14229
14230 * Makefile.in (g++spec.o): Fix typo.
14231
14232 2001-02-09 Jason Merrill <jason@redhat.com>
14233
14234 * lang-specs.h: Restore definition of __EXCEPTIONS.
14235
14236 2001-02-08 Jason Merrill <jason@redhat.com>
14237
14238 * search.c (shared_member_p): New function.
14239 (lookup_field_r): Use it.
14240 * cp-tree.h (SHARED_MEMBER_P): Remove.
14241
14242 * method.c (process_overload_item): Handle template-dependent array
14243 bounds.
14244 * pt.c (type_unification_real): If we end up with undeduced nontype
14245 parms, try again.
14246
14247 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14248 types.
14249
14250 * typeck2.c (friendly_abort): Don't say anything if we have
14251 earlier errors or sorries.
14252
14253 * decl.c (check_tag_decl): Notice attempts to redefine bool and
14254 wchar_t. Ignore if in_system_header.
14255
14256 * decl.c (maybe_push_cleanup_level): New fn...
14257 (start_decl_1): ...split out from here.
14258 * cvt.c (build_up_reference): Use it.
14259 * cp-tree.h: Declare it.
14260
14261 2001-02-07 Mark Mitchell <mark@codesourcery.com>
14262
14263 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14264 spec.
14265
14266 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
14267
14268 * pt.c (lookup_template_class): Make sure it's a primary
14269 template or template_template_parm when called from the parser.
14270 (instantiate_template_class): Add assertion.
14271
14272 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
14273
14274 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14275 from error_mark_node.
14276
14277 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
14278
14279 Fix specification and implementation bugs in V3 ABI
14280 construction vtables.
14281 * cp-tree.h (flag_dump_class_layout): New flag.
14282 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14283 (BINFO_LOST_PRIMARY_P): New flag.
14284 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14285 (BINFO_PRIMARY_MARKED_P): Rename to ...
14286 (BINFO_PRIMARY_P): ... here.
14287 (binfo_via_virtual): New prototype.
14288 * decl2.c (flag_dump_class_layout): New flag.
14289 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14290 use `=' as a file name separator.
14291 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14292 bases.
14293 (build_vtbl_address): If this is a virtual primary base, then
14294 get the vtbl of what it is ultimately primary for.
14295 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14296 for BINFO_PRIMARY_P.
14297 (dfs_skip_nonprimary_vbases_markedp): Likewise.
14298 (get_shared_vbase_if_not_primary): Likewise.
14299 (dfs_get_pure_virtuals): Likewise.
14300 (expand_upcast_fixups): Likewise.
14301 (fixup_virtual_upcast_offsets): Likewise.
14302 (dfs_find_vbase_instance): Likewise.
14303 (find_vbase_instance): Likewise.
14304 (binfo_from_vbase): Adjust comment to reflect reality.
14305 (binfo_via_virtual): New function.
14306 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14307 for binfo walking during VTT construction.
14308 (dfs_mark_primary_bases): Remove.
14309 (force_canonical_binfo_r): New function.
14310 (force_canonical_binfo): New function.
14311 (mark_primary_virtual_base): New function.
14312 (mark_primary_bases): Walk in inheritance graph order, use
14313 mark_primary_virtual_base.
14314 (determine_primary_base): Use some more intermediate variables.
14315 (dfs_find_final_overrider): Don't check for overriding along a
14316 virtual path.
14317 (dfs_modify_vtables): Walk into primary virtual bases too.
14318 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14319 (build_base_fields): Likewise.
14320 (dfs_set_offset_for_unshared_vbases): Likewise.
14321 (layout_virtual_bases): Likewise.
14322 (end_of_class): Likewise.
14323 (finish_struct_1): Call dump_class_hierarchy, if requested.
14324 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14325 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14326 (dump_class_hierarchy): Add file parameter. Append to file, if
14327 required.
14328 (finish_vtbls): Adjust accumulate_vtbl_inits call.
14329 Use canonical base for virtual bases.
14330 (build_vtt): Add more comments. Adjust build_vtt_inits call.
14331 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14332 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14333 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14334 virtual VTTs.
14335 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14336 from DATA. We want virtual primary bases and all bases via virtual.
14337 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14338 virtual base when not a construction vtable.
14339 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14340 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14341 Use canonical bases when processing virtual bases.
14342 (accumulate_vtbl_inits): We're interested in any base via a
14343 virtual path.
14344 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14345 within a construction vtable, determine what is being overridden.
14346 (build_vtbl_initializer): Add more comments
14347 (add_vcall_offset_vtbl_entries_1): Adjust comment.
14348 (build_rtti_vtbl_entries): Check if the base has lost its
14349 primary.
14350
14351 2001-02-05 Mark Mitchell <mark@codesourcery.com>
14352
14353 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14354
14355 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14356
14357 * decl.c (pushdecl): Call abort instead of fatal.
14358 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14359 * init.c (build_new_1): Likewise.
14360 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14361 * decl.c (build_typename_type): hash_table_init now returns void.
14362 decl.c (init_decl_processing): Make an error non-fatal.
14363
14364 2001-02-04 Mark Mitchell <mark@codesourcery.com>
14365
14366 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14367 Document.
14368 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14369 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14370 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14371 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14372 * decl.c (maybe_commonize_var): Use the new name-mangling where
14373 appropriate.
14374 * decl2.c (comdat_linkage): Enhance comments. Make all
14375 compiler-generated things static, if COMDAT is not available.
14376 (get_tinfo_decl): Do not make typeinfo objects that belong in the
14377 library COMDAT.
14378 (tinfo_base_init): Use the correct mangled name for typeinfo
14379 strings, and push them into the global scope.
14380 (typeinfo_in_lib_p): New function.
14381 (synthesize_tinfo_var): Use it.
14382 (create_real_tinfo_var): Likewise.
14383
14384 2001-02-03 Jakub Jelinek <jakub@redhat.com>
14385
14386 * decl.c (push_class_binding): Use context_for_name_lookup instead
14387 of CP_DECL_CONTEXT.
14388 * search.c (context_for_name_lookup): Remove static. Check for NULL
14389 context in the loop.
14390 * cp-tree.h (context_for_name_lookup): Add prototype.
14391
14392 2001-02-02 Jakub Jelinek <jakub@redhat.com>
14393
14394 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14395 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14396 Remove.
14397 * call.c (convert_class_to_reference, build_user_type_conversion_1,
14398 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14399
14400 2001-02-02 Mark Mitchell <mark@codesourcery.com>
14401
14402 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14403 of macros used when compiling g++spec.c.
14404 * g++spec.c (lang_specific_driver): Link with the shared
14405 libgcc by default.
14406
14407 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
14408
14409 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14410 make_reference_declarator, make_call_declarator), method.c
14411 (implicitly_declare_fn), parse.y (namespace_using_decl,
14412 notype_unqualified_id, expr_or_declarator, new_type_id,
14413 after_type_declarator, direct_after_type_declarator,
14414 notype_declarator, complex_notype_declarator,
14415 complex_direct_notype_declarator, qualified_id,
14416 notype_qualified_id, overqualified_id, direct_new_declarator,
14417 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14418 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14419 instead of build_parse_node.
14420
14421 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14422
14423 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14424 (minus_one_node): Moved to top level gcc directory. Renamed
14425 to integer_minus_one_node.
14426
14427 * init.c (init_init_processing): Don't set minus_one_node.
14428 (build_vec_init): Use integer_minus_one_node.
14429
14430 * rtti.c (get_tinfo_decl_dynamic): Likewise.
14431
14432 2001-01-28 Jakub Jelinek <jakub@redhat.com>
14433
14434 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14435 identical and they would be replaced with constant, remove
14436 MODIFY_EXPR from the tree.
14437
14438 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14439
14440 * Make-lang.in: Remove all dependencies on defaults.h.
14441 * call.c: Don't include defaults.h.
14442 * decl.c: Likewise.
14443 * decl2.c: Likewise.
14444 * except.c: Likewise.
14445 * pt.c: Likewise.
14446 * rtti.c: Likewise.
14447 * tree.c: Likewise.
14448 * typeck.c: Likewise.
14449
14450 2001-01-25 Jakub Jelinek <jakub@redhat.com>
14451
14452 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14453 operators even in "C" linkage.
14454 * method.c (set_mangled_name_for_decl): Likewise.
14455 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14456 overloaded operators in "C" linkage.
14457
14458 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14459
14460 * pt.c (tsubst_decl): Remove IN_DECL parameter.
14461 (tsubst_arg_types): Check parameter is not void.
14462 (tsubst): Adjust tsubst_decl call.
14463
14464 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14465
14466 * call.c (add_builtin_candidate): Quote std properly, from
14467 previous change.
14468
14469 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14470
14471 * pt.c (check_explicit_specialization): Clone constructors and
14472 destructors.
14473
14474 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14475
14476 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14477 indicates anything special about template depth. Make sure we
14478 only count the user visible template classes.
14479
14480 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14481
14482 * call.c (build_conv): Typo in comment.
14483 (add_builtin_candidate): Add more explanation.
14484 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14485 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14486 when we have enumeral types.
14487 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14488 candidates for relops and eqops.
14489 (joust): Simplify control flow. Allow a non-template user
14490 function to hide a builtin.
14491
14492 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
14493
14494 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14495 (more_specialized): Add deduction parameter.
14496 * call.c (joust): Adjust more_specialized call.
14497 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14498 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14499 (get_bindings_order): Remove.
14500 (get_bindings_real): Add DEDUCE parameter.
14501 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14502 REFERENCE_TYPE jig for DEDUCE_ORDER.
14503 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14504 maybe_adjust_types_for_deduction.
14505 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14506 directly.
14507 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14508 (check_cv_quals_for_unify): Use new unify qualifier flags.
14509 (unify): Clear new unify qualifier flags.
14510 (get_bindings_real): Add DEDUCE parameter.
14511 (get_bindings): Adjust call to get_bindings_real.
14512 (get_bindings_overload): Likewise.
14513 (most_specialized_instantiation): Adjust call to
14514 more_specialized.
14515
14516 2001-01-19 Jason Merrill <jason@redhat.com>
14517
14518 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14519
14520 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14521 -fnew-abi.
14522
14523 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
14524
14525 * decl2.c (arg_assoc_class): Fix double iteration logic.
14526
14527 2001-01-19 Jason Merrill <jason@redhat.com>
14528
14529 * init.c (build_delete): Always call convert_force to strip cv-quals.
14530
14531 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14532 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14533 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14534
14535 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14536
14537 * search.c (get_vbase_1): Count only virtual bases.
14538
14539 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14540
14541 * class.c (duplicate_tag_error): Robustify flag clearing.
14542
14543 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14544
14545 * cp-tree.h (lookup_template_class): Add complain parm.
14546 * decl.c (lookup_namespace_name): Adjust call to
14547 lookup_template_class.
14548 (make_typename_type): Likewise.
14549 * semantics.c (finish_template_type): Likewise.
14550 * pt.c (lookup_template_class): Add complain parm. Adjust.
14551 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14552 (tsubst): Likewise.
14553
14554 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14555
14556 * pt.c (copy_default_args_to_explicit_spec): Preserve
14557 object's CV quals. Reorganize.
14558
14559 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14560
14561 * typeck.c (build_modify_expr): Say `initialization' for
14562 INIT_EXPRs.
14563 * init.c (build_default_init): Convert to enumeral type, if
14564 needed.
14565
14566 2001-01-18 Jakub Jelinek <jakub@redhat.com>
14567
14568 * parse.y (nomods_initdcl0): Properly set things up for
14569 initdcl0_innards.
14570
14571 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14572
14573 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14574 (type_unification_real): Set it.
14575 (unify): Use it.
14576
14577 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14578
14579 * decl.c (finish_destructor_body): Convert to vbase pointer here.
14580
14581 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14582
14583 * semantics.c (begin_class_definition): Check we're not inside a
14584 template parm list.
14585
14586 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14587
14588 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14589 BASELINK_P.
14590
14591 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14592
14593 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14594 * call.c (build_over_call): Add comment.
14595
14596 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14597
14598 * cvt.c (ocp_convert): Handle vector type conversion
14599 * typeck2.c (digest_init): Handle vector type initializations
14600
14601 2001-01-16 Phil Edwards <pme@sources.redhat.com>
14602
14603 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
14604 was given.
14605
14606 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14607
14608 * pt.c (check_nontype_parm): Rename to ...
14609 (invalid_nontype_parm_type_p): ... here.
14610 (process_template_parm): Adjust.
14611 (convert_template_argument): Adjust.
14612
14613 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14614
14615 * pt.c (check_nontype_parm): New function.
14616 (process_template_parm): Use it.
14617 (convert_template_argument): Use it.
14618 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14619 member.
14620
14621 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
14622
14623 * tree.c: Add defaults.h
14624 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14625 * Make-lang.in (cp/tree.o): Add defaults.h.
14626
14627 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14628
14629 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14630
14631 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14632
14633 * g++.1: Change to be ".so man1/gcc.1".
14634
14635 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14636
14637 * Make-lang.in (c++.info, c++.install-info): Build and install g++
14638 internals info.
14639 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14640 ($(srcdir)/cp/g++int.info): New target.
14641 * gxxint.texi: Add info directory entry. Use @@ in email address.
14642 * .cvsignore: Update.
14643
14644 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14645
14646 * typeck.c (build_c_cast): Do template processing earlier.
14647 Always pedwarn on array casts.
14648
14649 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14650
14651 * friend.c (make_friend_class): Make sure a templated class is
14652 actually a template.
14653
14654 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14655
14656 * decl2.c (get_guard): Set linkage from guarded decl.
14657
14658 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14659
14660 * call.c (convert_default_arg): Check for unprocessed
14661 DEFAULT_ARG.
14662 * cp-tree.h (replace_defarg): Move to spew.c.
14663 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14664 spew.c, which is where they really are.
14665 (done_pending_defargs): Declare.
14666 (unprocessed_defarg_fn): Declare.
14667 * decl.c (replace_defarg): Move to spew.c
14668 * parse.y (structsp): Call done_pending_defargs.
14669 * spew.c (defarg_fns): Rearrange list structure.
14670 (defarg_fnsdone): New static variable.
14671 (defarg_depfns): New static variable.
14672 (init_spew): Adjust.
14673 (add_defarg_fn): Store the type in TREE_TYPE.
14674 (do_pending_defargs): Detect and deal with ordering constraints
14675 and circularity.
14676 (done_pending_defargs): New function.
14677 (unprocessed_defarg_fn): New function.
14678 (replace_defarg): Moved from decl.c. Robustify. Don't save
14679 if circularity detected.
14680
14681 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14682
14683 * pt.c (unify): Check array has a domain, before checking
14684 whether it is variable sized.
14685
14686 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14687
14688 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14689 parameters with pointers to arrays of unknown bound.
14690
14691 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14692
14693 * parse.y (template_parm_header, template_spec_header): New
14694 reductions. Split out from ...
14695 (template_header): ... here. Use them.
14696 (template_template_parm): Use template_parm_header.
14697 * semantics.c (finish_template_template_parm): Add assert.
14698
14699 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14700
14701 * mangle.c (write_builtin_type): Fix thinko.
14702
14703 * pt.c (copy_default_args_to_explicit_spec_1): New function.
14704 (copy_default_args_to_explicit_spec): Likewise.
14705 (check_explicit_specialization): Use it.
14706
14707 * class.c (finish_struct_1): Remove last argument in call to
14708 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14709 * decl.c (builtin_function): Likewise.
14710 (build_cp_library_fn): Likewise.
14711 (check_initializer): Likewise.
14712 (make_rtl_for_nonlocal_decl): Likewise.
14713 (cp_finish_decl): Likewise.
14714 (start_function): Likewise.
14715 * decl2.c (finish_anon_union): Likewise.
14716 * friend.c (do_friend): Likewise.
14717 * init.c (build_java_class_ref): Likewise.
14718 * method.c (make_thunk): Likewise.
14719 * pt.c (tsubst_friend_function): Likewise.
14720 * semantics.c (expand_body): Likewise.
14721
14722 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14723
14724 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14725 looking at DECL_CLONED_FUNCTION for non-functions.
14726
14727 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14728
14729 * error.c (dump_template_parameter): Use parm to determine how
14730 to print default value.
14731
14732 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14733
14734 * class.c (duplicate_tag_error): Clear more flags.
14735
14736 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14737
14738 * call.c (build_new_method_call): Use binfo_for_vbase.
14739
14740 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
14741
14742 * cp-tree.h (flag_cond_mismatch): Don't declare.
14743 * decl2.c (flag_cond_mismatch): Don't define.
14744 (lang_f_options): Remove cond-mismatch.
14745 (unsupported_options): Add cond-mismatch.
14746
14747 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
14748
14749 * class.c (handle_using_decl): Reject using of constructor name
14750 of sourcing class. Allow injecting of a method with same name as
14751 nested class. Fixup error messages.
14752
14753 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
14754
14755 * decl2.c (lang_decode_option): Handle -Wformat=2.
14756
14757 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14758
14759 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14760 initialized_in_class.
14761 (DECL_DEFINED_IN_CLASS_P): Rename to ...
14762 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14763 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14764 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14765 * pt.c (check_default_tmpl_args): Adjust for
14766 DECL_INITIALIZED_IN_CLASS_P.
14767 (instantiate_class_template): Likewise.
14768 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14769
14770 * class.c (finish_struct): Constify saved_filename.
14771
14772 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14773
14774 * class.c (duplicate_tag_error): Adjust diagnostic.
14775 (finish_struct): Locally set location to start of struct.
14776 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14777
14778 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14779
14780 * decl.c (struct binding_level): Adjust class_shadowed comments
14781 to reflect reality.
14782 (push_class_level_binding): Adjust comments to reflect reality.
14783 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14784 Don't set TREE_VALUE on the class_shadowed list.
14785
14786 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14787
14788 * decl2.c (acceptable_java_type): Allow references too.
14789 * init.c (build_java_class_ref): When using the new ABI, search
14790 `class$' and have it mangled with `mangle_decl.'
14791 * mangle.c (write_java_integer_type_codes): New function.
14792 (write_builtin_type): Detect and mangle Java integer and real
14793 types.
14794
14795 2001-01-07 Mark Mitchell <mark@codesourcery.com>
14796
14797 * decl2.c (grokfield): Don't accept `asm' specifiers for
14798 non-static data members.
14799
14800 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14801
14802 * expr.c (cplus_expand_expr): Don't reset `target'.
14803
14804 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
14805
14806 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14807
14808 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14809
14810 * parse.y (template_datadef): Check for error_mark_node.
14811
14812 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14813
14814 * cp-tree.def (DEFAULT_ARG): Make `x' class.
14815
14816 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
14817
14818 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14819 (record_builtin_type): Make non-static.
14820 (flag_short_double): Don't declare.
14821 (init_decl_processing): Remove the creation of many tree nodes now
14822 in c_common_nodes_and_builtins.
14823 (build_void_list_node): New function.
14824 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14825 * cp-tree.h (flag_short_wchar): Don't declare.
14826
14827 2001-01-04 Mark Mitchell <mark@codesourcery.com>
14828
14829 * call.c (build_conv): Don't use build1 for USER_CONV.
14830 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14831
14832 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
14833
14834 * lex.c (lang_init): Call c_common_lang_init.
14835
14836 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14837
14838 * search.c (lookup_fnfields_here): Remove.
14839 (look_for_overrides_r): Use lookup_fnfields_1.
14840 Ignore functions from using declarations.
14841
14842 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14843
14844 Implement exceptions specifiers for implicit member functions.
14845 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14846 * method.c (synthesize_exception_spec): New function.
14847 (locate_dtor, locate_ctor, locate_copy): New functions.
14848 (implicitly_declare_fn): Generate the exception spec too.
14849 * search.c (check_final_overrider): Check artificial functions
14850 too.
14851 * typeck2.c (merge_exception_specifiers): New function.
14852
14853 2001-01-03 Jason Merrill <jason@redhat.com>
14854
14855 * init.c (build_default_init): New fn.
14856 (perform_member_init): Split out from here.
14857 (build_new_1): Use it. Simplify initialization logic.
14858 (build_vec_init): Take an array, rather than a pointer and maxindex.
14859 Speed up simple initializations. Don't clean up if we're assigning.
14860 * cp-tree.h: Adjust.
14861 * decl2.c (do_static_initialization): Remove TREE_VEC case.
14862 * parse.y (new_initializer): Return void_zero_node for ().
14863 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14864 * typeck2.c (digest_init): Only complain about user-written
14865 CONSTRUCTORs.
14866
14867 2000-12-22 Mike Stump <mrs@wrs.com>
14868
14869 * decl2.c: (max_tinst_depth): Increase to 50.
14870
14871 2001-01-02 Mark Mitchell <mark@codesourcery.com>
14872
14873 * class.c (invalidate_class_lookup_cache): Zero the
14874 previous_class_values.
14875 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14876 TREE_INT_CST_HIGH.
14877 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14878 * decl.c (free_bindings): New variable.
14879 (push_binding): Don't create a new binding if we have one on the
14880 free list.
14881 (pop_binding): Put old bindings on the free list.
14882 (init_decl_processing): Use size_int, not build_int_2.
14883 Register free_bindings as a GC root.
14884 (cp_make_fname_decl): Use size_int, not build_int_2.
14885 (push_inline_template_parms_recursive): Likewise.
14886 (end_template_parm_list): Likewise.
14887 (for_each_template_parm): Do not use walk_tree_without_duplicates.
14888 (tsubst_template_parms): Use size_int, not build_int_2.
14889 (tsubst): Likewise.
14890 * rtti.c (get_vmi_pseudo_type_info): Likewise.
14891
14892 2001-01-02 Richard Henderson <rth@redhat.com>
14893
14894 * parse.y (asm): Set ASM_INPUT_P.
14895
14896 2001-01-02 Jason Merrill <jason@redhat.com>
14897
14898 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14899 for v3 ABI.
14900
14901 * typeck.c (cp_truthvalue_conversion): New fn.
14902 * cvt.c (ocp_convert): Use it.
14903
14904 * cp-tree.h: Lose c-common.c decls.
14905
14906 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14907 * cvt.c (convert_to_void): Use type_unknown_p.
14908
14909 * typeck.c (strip_all_pointer_quals): Also strip quals from
14910 pointer-to-member types.
14911
14912 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
14913 parse.y as C.
14914
14915 * call.c (build_new_method_call): Do evaluate the object parameter
14916 when accessing a static member.
14917 * typeck.c (build_component_ref): Likewise.
14918
14919 2001-01-02 Andreas Jaeger <aj@suse.de>
14920
14921 * decl.c (cp_missing_noreturn_ok_p): New.
14922 (init_decl_processing): Set lang_missing_noreturn_ok_p.
14923
14924 2000-12-29 Jakub Jelinek <jakub@redhat.com>
14925
14926 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14927
14928 2000-12-29 Mark Mitchell <mark@codesourcery.com>
14929
14930 * class.c (pushclass): Remove #if 0'd code.
14931 * cp-tree.h (overload_template_name): Remove.
14932 * decl.c (store_bindings): Simplify.
14933 (pop_from_top_level): Likewise.
14934 * pt.c (overload_template_name): Remove.
14935 (instantiate_decl): Don't call push_to_top_level if it's not
14936 needed.
14937
14938 2000-12-28 Mark Mitchell <mark@codesourcery.com>
14939
14940 * pt.c (register_local_specialization): Don't return a value.
14941 (lookup_template_class): Use move-to-front heuristic when looking
14942 up template instantiations.
14943 (instantiate_decl): Only push_to_top_level when we're actually
14944 going to instantiate the template.
14945
14946 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
14947
14948 * search.c (binfo_for_vtable): Return least derived class, not
14949 most. Handle secondary vtables.
14950
14951 2000-12-22 Jason Merrill <jason@redhat.com>
14952
14953 * pt.c (more_specialized): Don't optimize len==0.
14954 (fn_type_unification): If we're adding the return type, increase len.
14955
14956 * typeck.c (build_binary_op): Fix pmf comparison logic.
14957
14958 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14959 DECL_STATIC_FUNCTION_P.
14960
14961 * semantics.c (genrtl_finish_function): Don't try to jump to
14962 return_label unless it exists.
14963
14964 In partial ordering for a call, ignore parms for which we don't have
14965 a real argument.
14966 * call.c (joust): Pass len to more_specialized.
14967 (add_template_candidate_real): Strip 'this', pass len.
14968 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
14969 (get_bindings_order): New fn. Pass len down.
14970 (get_bindings_real): Strip 'this', pass len.
14971 (fn_type_unification): Likewise.
14972 (type_unification_real): Succeed after checking 'len' args.
14973 (most_specialized_instantiation): Lose explicit_args parm.
14974 * class.c (resolve_address_of_overloaded_function): Strip 'this',
14975 pass len.
14976
14977 2000-12-21 Jason Merrill <jason@redhat.com>
14978
14979 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14980 DECL_TEMPLATE_RESULT.
14981
14982 * search.c (lookup_field_r): Call lookup_fnfields_1, not
14983 lookup_fnfields_here.
14984
14985 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14986
14987 * call.c (build_object_call): Also allow conversions that return
14988 reference to pointer to function.
14989 (add_conv_candidate): Handle totype being ref to ptr to fn.
14990 (build_field_call): Also allow members of type reference to function.
14991 Lose support for calling pointer to METHOD_TYPE fields.
14992
14993 * error.c (dump_expr): Handle *_CAST_EXPR.
14994
14995 * typeck2.c (build_scoped_ref): Always convert to the naming class.
14996
14997 * tree.c (break_out_cleanups): Lose.
14998 * cp-tree.h: Remove prototype.
14999 * typeck.c (build_component_ref): Don't break_out_cleanups.
15000 (build_compound_expr): Likewise.
15001 * semantics.c (finish_expr_stmt): Likewise.
15002
15003 2000-12-20 Richard Henderson <rth@redhat.com>
15004
15005 * cp-tree.h: Update declarations.
15006 * decl.c (finish_case_label): Return the new stmt node.
15007 * semantics.c (finish_goto_stmt): Likewise.
15008 (finish_expr_stmt, finish_return_stmt): Likewise.
15009 (finish_break_stmt, finish_continue_stmt): Likewise.
15010 (finish_asm_stmt): Likewise.
15011 * parse.y (already_scoped_stmt): Set STMT_LINENO.
15012 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
15013 (simple_if, simple_stmt): Return the new stmt node.
15014 (save_lineno): New.
15015
15016 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
15017
15018 * cp-tree.h: Don't declare warn_long_long.
15019
15020 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15021
15022 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
15023 IS_AGGR_TYPE.
15024
15025 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15026
15027 * pt.c (unify): Handle when both ARG and PARM are
15028 BOUND_TEMPLATE_TEMPLATE_PARM.
15029
15030 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15031
15032 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
15033 DECL_TEMPLATE_PARM_P.
15034
15035 2000-12-15 Jason Merrill <jason@redhat.com>
15036
15037 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
15038
15039 * init.c (build_new_1): Don't strip quals from type.
15040
15041 * decl.c (pushdecl): Don't check for linkage on a non-decl.
15042
15043 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
15044
15045 * call.c (build_new_function_call): Lose space before paren in
15046 error message.
15047 (build_new_method_call): Likewise.
15048
15049 * typeck2.c (build_m_component_ref): Propagate quals from datum.
15050
15051 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15052
15053 * pt.c (check_explicit_specialization): Propagate default
15054 function arguments to explicit specializations.
15055
15056 2000-12-13 DJ Delorie <dj@redhat.com>
15057
15058 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
15059 and <? operators.
15060
15061 2000-12-08 Jason Merrill <jason@redhat.com>
15062
15063 * error.c (dump_function_name): Don't let the user see __comp_ctor.
15064
15065 Clean up copy-initialization in overloading code.
15066 * call.c (build_user_type_conversion_1): Die if we are asked to
15067 convert to the same or a base type.
15068 (implicit_conversion): Avoid doing so. Lose reference binding code.
15069 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
15070 direct-initialization. Also do direct-init part of copy-init.
15071 (build_user_type_conversion): Don't provide context to convert_like.
15072 * cvt.c (ocp_convert): build_user_type_conversion will now provide
15073 the constructor call for copy-init.
15074
15075 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
15076 instantiation of a member template.
15077 (do_decl_instantiation): Not here.
15078
15079 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15080
15081 * class.c (check_field_decls): Don't special case anonymous
15082 fields in error messages.
15083 (note_name_declared_in_class): Use %D on diagnostic.
15084
15085 * tree.c (pod_type_p): Use strip_array_types.
15086 (cp_valid_lang_attribute): Likewise.
15087 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
15088 multiple evaluations.
15089 (cp_has_mutable_p): Use strip_array_types.
15090
15091 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15092
15093 * cp-tree.h (sufficient_parms_p): Declare new function.
15094 * call.c (sufficient_parms_p): New function, broken out of ...
15095 (add_function_candidate): ... here. Use it.
15096 (add_conv_candidate): Use it.
15097 * decl.c (grok_ctor_properties): Use it.
15098
15099 2000-12-07 Jakub Jelinek <jakub@redhat.com>
15100
15101 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
15102
15103 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
15104
15105 * decl2.c (lang_decode_option): Handle -Wformat-security.
15106
15107 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15108
15109 * pt.c (verify_class_unification): New function.
15110 (get_class_bindings): Use it.
15111 (try_class_unification): Tidy.
15112 (unify): Handle when argument of a template-id is not
15113 template parameter dependent.
15114 (template_args_equal): Handle when TREE_CODE's do not match.
15115
15116 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
15117
15118 * lang-specs.h (c++): When invoking the stand-alone preprocessor
15119 for -save-temps, pass all relevant -Defines to it, and then don't
15120 pass them to cc1plus.
15121
15122 2000-12-05 Will Cohen <wcohen@redhat.com>
15123
15124 * decl.c (finish_case_label): Cleared
15125 more_cleanups_ok in surrounding function scopes.
15126 (define_label): Likewise.
15127
15128 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15129
15130 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15131 (get_matching_virtual): Remove.
15132 (look_for_overrides): Declare new function.
15133 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15134 DECL_VINDEX here.
15135 * class.c (check_for_override): Move base class iteration code
15136 to look_for_overrides.
15137 * search.c (next_baselink): Remove.
15138 (get_virtuals_named_this): Remove.
15139 (get_virtual_destructor): Remove.
15140 (tree_has_any_destructors_p): Remove.
15141 (struct gvnt_info): Remove.
15142 (check_final_overrider): Remove `virtual' from error messages.
15143 (get_matching_virtuals): Remove. Move functionality to ...
15144 (look_for_overrides): ... here, and ...
15145 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15146 to be overriding.
15147
15148 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15149
15150 * typeck.c (get_delta_difference): If via a virtual base,
15151 return zero.
15152 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15153 adjustment.
15154
15155 2000-12-04 Richard Henderson <rth@redhat.com>
15156
15157 * error.c (dump_tree): Use output_add_string not OB_PUTS.
15158
15159 2000-12-04 Jason Merrill <jason@redhat.com>
15160
15161 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15162 (write_builtin_type): Pass intSI_type_node and the like through
15163 type_for_mode.
15164 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15165 Pass intSI_type_node and the like through type_for_mode.
15166 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15167 * pt.c (tsubst, unify): Likewise.
15168 * tree.c (walk_tree): Likewise.
15169 * error.c (dump_type): Likewise.
15170 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15171
15172 * Make-lang.in: Tweak top comment for emacs.
15173 (cp/TAGS): Restore.
15174
15175 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15176
15177 * class.c (clone_function_decl): Robustify.
15178
15179 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
15180
15181 * decl.c (store_bindings): Only search in the non modified
15182 old_bindings for duplicates.
15183
15184 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
15185
15186 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15187 TYPE_POLYMORPHIC_P.
15188
15189 * typeck.c (build_static_cast): Remove unused variable.
15190
15191 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15192
15193 * pt.c: Fix typo in comment.
15194
15195 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15196
15197 * decl2.c (warn_format): Remove definition.
15198 (lang_decode_option): Handle -Wformat-nonliteral,
15199 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
15200
15201 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15202
15203 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15204 (init_decl_processing): Don't create string_type_node,
15205 const_string_type_node, wint_type_node, intmax_type_node,
15206 uintmax_type_node, default_function_type, ptrdiff_type_node and
15207 unsigned_ptrdiff_type_node. Adjust position of call to
15208 c_common_nodes_and_builtins.
15209 (identifier_global_value): New function.
15210
15211 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
15212
15213 * call.c (standard_conversion): Reject pointer to member
15214 conversions from ambiguous, inaccessible or virtual bases.
15215 * typeck.c (build_static_cast): Don't check pointers to members
15216 specially.
15217
15218 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15219
15220 * method.c (do_build_copy_constructor): Preserve cv
15221 qualifications when accessing source object members.
15222 (do_build_assign_ref): Likewise. Remove separate diagnostics for
15223 unnamed fields.
15224
15225 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15226
15227 * method.c (do_build_assign_ref): Construct appropriately
15228 CV-qualified base reference. Don't allow const casts in base
15229 conversion.
15230
15231 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15232
15233 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15234 incomplete return type.
15235
15236 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15237
15238 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15239 * semantics.c (finish_base_specifier): Accept a _TYPE not a
15240 _DECL.
15241
15242 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15243
15244 * spew.c (yyerror): Cope if yylval.ttype is NULL.
15245
15246 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15247
15248 * decl.c (grokdeclarator): Diagnose undefined template contexts.
15249
15250 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15251
15252 * decl.c (grokdeclarator): Do type access control on friend
15253 class.
15254
15255 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15256
15257 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15258 bison parser ickiness.
15259 * pt.c (tsubst_friend_function): Enter namespace scope when
15260 tsubsting the function name.
15261 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15262
15263 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15264
15265 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15266 * cvt.c (cp_convert_to_pointer): Add force parameter.
15267 Allow conversions via virtual base if forced.
15268 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15269 (ocp_convert): Likewise.
15270 * search.c (binfo_from_vbase): Return the virtual base's binfo.
15271 * typeck.c (get_delta_difference): Adjust handling of virtual
15272 bases.
15273
15274 2000-11-26 Mark Mitchell <mark@codesourcery.com>
15275
15276 * tree.c (struct list_hash): Remove.
15277 (list_hash_table): Make it be an htab.
15278 (struct list_proxy): New type.
15279 (list_hash_eq): New function.
15280 (list_hash_pieces): Renamed from ...
15281 (list_hash): ... this.
15282 (list_hash_lookup): Remove.
15283 (list_hash_add): Remove.
15284 (hash_tree_cons): Use the generic hashtable.
15285 (mark_list_hash): Remove.
15286 (init_tree): Create the hashtable.
15287
15288 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
15289
15290 * method.c (build_mangled_C9x_name): Rename to
15291 build_mangled_C99_name. Change C9X references in comments to
15292 refer to C99.
15293
15294 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15295
15296 * parse.y (unary_expr): Move VA_ARG from here ...
15297 (primary): ... to here.
15298
15299 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15300
15301 * semantics.c (finish_id_expr): If type is error_mark, return
15302 error_mark.
15303
15304 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
15305
15306 * pt.c (lookup_template_class): Simplify loop exit constructs.
15307 Cope when there is no partial instantiation of a template
15308 template member.
15309
15310 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
15311
15312 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15313
15314 2000-11-22 Mark Mitchell <mark@codesourcery.com>
15315
15316 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15317 prefix.
15318
15319 * pt.c (do_decl_instantiate): Explicitly clone constructors and
15320 destructors that haven't already been cloned.
15321
15322 2000-11-20 Richard Henderson <rth@redhat.com>
15323
15324 * parse.y (yyparse_1): Rename the parser entry point.
15325
15326 2000-11-20 Alex Samuel <samuel@codesourcery.com>
15327
15328 * mangle.c (write_name): Use <unscoped-name> for names directly in
15329 function scope.
15330 (write_unscoped_name): Accept names directly in function scope.
15331
15332 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
15333
15334 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15335 * parse.y (extdef): Add EXPORT reduction.
15336 * spew.c (yylex): Don't skip export here.
15337
15338 2000-11-19 Mark Mitchell <mark@codesourcery.com>
15339
15340 * decl.c (init_decl_processing): Correct name of pure virtual
15341 function under the new ABI.
15342 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15343 (throw_bad_typeid): Likewise for bad typeid function.
15344
15345 2000-11-18 Mark Mitchell <mark@codesourcery.com>
15346
15347 * decl.c (grokparms): Don't even function types of `void' type,
15348 either.
15349 * mangle.c (write_type): Don't crash when confronted with the
15350 error_mark_node.
15351
15352 * decl.c (grokparms): Don't create parameters of `void' type.
15353
15354 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
15355
15356 * lex.c (mark_impl_file_chain): Delete.
15357 (init_parse): Remove call to ggc_add_string_root. No need to
15358 ggc_strdup a string constant. Do not add impl_file_chain to GC
15359 roots.
15360 (handle_pragma_implementation): No need to ggc_strdup main_filename.
15361
15362 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15363
15364 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15365
15366 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15367
15368 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15369 * decl.c (grokdeclarator): Don't reject void parms here.
15370 (require_complete_types_for_parms): Simplify, use
15371 complete_type_or_else.
15372 (grokparms): Remove bitrot. Remove funcdef parm.
15373 Deal with ellipsis parm lists here.
15374 * semantics.c (finish_parmlist): Don't append void_list_node
15375 here. Set PARMLIST_ELLIPSIS_P.
15376
15377 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15378
15379 * typeck2.c (incomplete_type_error): Reorganize to avoid
15380 excessive diagnostics.
15381
15382 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
15383
15384 * lex.c (struct impl_files, internal_filename): Constify a char *.
15385
15386 2000-11-16 Mark Mitchell <mark@codesourcery.com>
15387
15388 * mangle.c (write_special_name_constructor): Don't generate
15389 assembler junk when confronted with an old-style constructor.
15390 (write_special_name_destructor): Likewise.
15391 (mangle_decl_string): Do it here instead.
15392
15393 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
15394
15395 * call.c (op_error): Make error messages clearer.
15396
15397 2000-11-15 Mark Mitchell <mark@codesourcery.com>
15398
15399 * decl.c (wrapup_globals_for_namespace): Don't mark things
15400 TREE_ASM_WRITTEN when they're not.
15401
15402 2000-11-15 Jason Merrill <jason@redhat.com>
15403
15404 * typeck2.c (friendly_abort): Uncount the error before handing
15405 off to fancy_abort.
15406
15407 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
15408
15409 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15410
15411 2000-11-14 Mark Mitchell <mark@codesourcery.com>
15412
15413 * class.c (build_vtbl_initializer): Fix typo in comment.
15414 * typeck.c (expr_sizeof): Don't crash on errors.
15415
15416 2000-11-14 Jim Wilson <wilson@redhat.com>
15417
15418 * lang-specs.h: Add %2 after %(cc1_options).
15419
15420 2000-11-14 Richard Henderson <rth@redhat.com>
15421
15422 * typeck.c (c_sizeof): Be strict about casting result value
15423 back to c_size_type_node.
15424 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15425
15426 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
15427
15428 * typeck.c (build_unary_op): Use boolean_increment from
15429 c-common.c, moving the relevant code there.
15430
15431 2000-11-11 Jason Merrill <jason@redhat.com>
15432
15433 * typeck.c (mark_addressable): Don't call put_var_into_stack.
15434
15435 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15436 in inlines.
15437
15438 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15439
15440 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15441 * lex.c (copy_lang_decl): Likewise.
15442
15443 2000-11-09 Mark Mitchell <mark@codesourcery.com>
15444
15445 * dump.c (cp_dump_tree): Don't dump function bodies here.
15446
15447 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15448 (dump.o): Update dependency list.
15449 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15450 (flag_dump_translation_unit): Likewise.
15451 (CP_TYPE_QUALS): Adjust definition.
15452 (DECL_C_BIT_FIELD): Remove.
15453 (SET_DECL_C_BIT_FIELD): Likewise.
15454 (CLEAR_DECL_C_BIT_FIELD): Likewise.
15455 (add_maybe_template): Likewise.
15456 (strip_array_types): Likewise.
15457 (dump_node_to_file): Likewise.
15458 (cp_dump_tree): New function.
15459 * decl.c (init_decl_processing): Set lang_dump_tree.
15460 * decl2.c (flag_dump_translation_unit): Remove.
15461 * dump.c: Move most of it to ../c-dump.c.
15462 (cp_dump_tree): New function.
15463 * pt.c (add_maybe_template): Remove.
15464 * typeck.c (strip_array_types): Likewise.
15465
15466 2000-11-07 Eric Christopher <echristo@redhat.com>
15467
15468 * decl.c (init_decl_processing): Change definition of
15469 __wchar_t to wchar_t. Remove artificial declaration of
15470 wchar_t.
15471 * lex.c: Change instances of __wchar_t to wchar_t.
15472
15473 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
15474
15475 * lex.c (do_identifier): Don't lookup_name for operators.
15476 * parse.y (operator): Save looking_for_typename.
15477 (unoperator): Restore it.
15478 * spew.c (frob_opname): Use nth_token for lookahead.
15479
15480 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
15481
15482 * decl.c (grok_op_properties): Always use coerce_new_type and
15483 coerce_delete_type.
15484 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15485 exception specification. Tidy up.
15486 (coerce_delete_type): Preserve exception specification. Tidy up.
15487
15488 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
15489
15490 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15491 (push_binding_level), error.c (cp_tree_printer), pt.c
15492 (process_partial_specialization, tsubst_template_arg_vector),
15493 search.c (lookup_member): Use memset () instead of bzero ().
15494
15495 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
15496
15497 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15498
15499 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
15500
15501 * Make-lang.in (c++.distdir): Remove.
15502
15503 2000-11-04 Mark Mitchell <mark@codesourcery.com>
15504
15505 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15506 declarations from different namespaces to be combined.
15507
15508 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
15509
15510 * decl.c: Include tm_p.h.
15511
15512 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
15513
15514 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15515
15516 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
15517
15518 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15519 (build_overload_value), repo.c (open_repo_file), xref.c
15520 (open_xref_file): Use strchr () and strrchr () instead of index ()
15521 and rindex ().
15522
15523 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
15524
15525 * call.c (build_over_call): Call fold on the CALL_EXPR.
15526
15527 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
15528
15529 * error.c (dump_template_decl): Separate template hearders with
15530 space not comma.
15531
15532 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
15533
15534 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
15535 TS_* flags with corresponding TFF_*. Adjust prototypes of
15536 functions (which used to take a tree_string_flags) to take an int.
15537
15538 * cp-tree.h (enum tree_string_flags): Remove
15539 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15540 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15541 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15542 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15543 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15544 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15545 (type_as_string, decl_as_string, expr_as_string,
15546 context_as_string): Adjust prototype.
15547
15548 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15549 instead of TS_PLAIN.
15550
15551 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15552 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15553 plain `0'.
15554
15555 2000-10-30 Mark Mitchell <mark@codesourcery.com>
15556
15557 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15558 (linkage_kind): New enumeration.
15559 (decl_linkage): New function.
15560 * decl2.c (comdat_linkage): Extend comment.
15561 * error.c (dump_function_decl): Print the arguments used to
15562 instantiate a template, even when not printing the type of the
15563 function.
15564 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15565 not TREE_PUBLIC, to test for external linkage.
15566 * tree.c (decl_linkage): New function.
15567
15568 2000-10-28 Mark Mitchell <mark@codesourcery.com>
15569
15570 * pt.c (instantiate_decl): Always instantiate static data members
15571 initialized in-class.
15572
15573 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
15574
15575 * Make-lang.in: Move all build rules here from Makefile.in,
15576 adapt to new context. Wrap all rules that change the current
15577 directory in parentheses. Expunge all references to $(P).
15578 When one command depends on another and they're run all at
15579 once, use && to separate them, not ;. Add OUTPUT_OPTION to
15580 all object-file generation rules. Delete obsolete variables.
15581
15582 * Makefile.in: Delete.
15583 * config-lang.in: Delete outputs= line.
15584
15585 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
15586
15587 * error.c (dump_function_decl): Print no space between
15588 `ptr-operator' the `type-specifier' of the return type.
15589 (dump_type_prefix): Make sure we put space at the appropriate
15590 place.
15591
15592 2000-10-23 Jason Merrill <jason@redhat.com>
15593
15594 * call.c (equal_functions): Also call decls_match for extern "C" fns.
15595
15596 2000-10-22 Jason Merrill <jason@redhat.com>
15597
15598 * call.c (build_conditional_expr): Use ocp_convert to force
15599 rvalue conversion.
15600
15601 2000-10-22 Mark Mitchell <mark@codesourcery.com>
15602
15603 * call.c (standard_conversion): Use RVALUE_CONVs for all
15604 expressions that satisfy lvalue_p, not just those that satisfy
15605 real_lvalue_p.
15606
15607 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15608
15609 * typeck.c (c_sizeof): Return an expression of `size_t' type,
15610 not one with TYPE_IS_SIZETYPE set.
15611 (dubious_conversion_warnings): Remove special-case code.
15612
15613 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
15614
15615 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15616 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15617 (dump_type_prefix): Print vector-of-int as 'int vector'.
15618 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15619 * tree.c (walk_tree): Handle VECTOR_TYPE.
15620
15621 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15622
15623 2000-10-21 Jason Merrill <jason@redhat.com>
15624
15625 * parse.y (operator): Set got_object from got_scope.
15626 Set looking_for_typename.
15627 * decl.c (lookup_name_real): Clear val after setting from_obj.
15628 Reorganize diagnostic.
15629
15630 2000-10-20 Jason Merrill <jason@redhat.com>
15631
15632 * tree.c (walk_tree): Don't walk into default args.
15633
15634 * error.c (dump_expr): Use host_integerp.
15635
15636 2000-10-20 David Edelsohn <edelsohn@gnu.org>
15637
15638 * typeck2.c (abstract_virtuals_error): Use "because" instead of
15639 "since" in error message.
15640
15641 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15642
15643 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15644
15645 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
15646
15647 * decl.c (revert_static_member_fn): Fixed typo.
15648
15649 2000-10-19 Mark Mitchell <mark@codesourcery.com>
15650
15651 * class.c (subobject_offset_fn): New type.
15652 (dfs_record_base_offsets): Remove.
15653 (record_base_offsets): Likewise.
15654 (dfs_search_base_offsets): Likewise.
15655 (record_subobject_offset): New function.
15656 (check_subobject_offset): Likewise.
15657 (walk_subobject_offsets): Likewise.
15658 (record_subobject_offsets): Likewise.
15659 (layout_conflict_p): Reimplement.
15660 (layout_nonempty_base_or_field): Correct handling of type
15661 conflicts during layout.
15662 (layout_empty_base): Likewise.
15663 (build_base_field): Adjust to handle new representation of empty
15664 base offset table.
15665 (build_base_fields): Likewise.
15666 (layout_virtual_bases): Likewise.
15667 (splay_tree_compare_integer_csts): New function.
15668 (layout_class_type): Use a splay_tree, rather than a varray, to
15669 represent the offsets of empty bases.
15670
15671 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15672 * decl.c (select_decl): Don't return declarations that are
15673 DECL_ANTICIPATED.
15674
15675 2000-10-18 Mark Mitchell <mark@codesourcery.com>
15676
15677 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15678 (fake_std_node): New macro.
15679 * decl.c (in_std): Rename to ...
15680 (in_fake_std): ... this.
15681 (flag_no_builtin): Remove.
15682 (flag_no_nonansi_builtin): Likewise.
15683 (walk_namespaces_r): Use fake_std_node.
15684 (push_namespace): Use std_identifier.
15685 (pop_namespace): Use in_fake_std.
15686 (lookup_name_real): Use fake_std_node.
15687 (init_decl_processing): When -fhonor-std, create the `std'
15688 namespace. Don't create a dummy fake_std_node in that case.
15689 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
15690 (builtin_function): Put builtins whose names don't begin
15691 with `_' in the std namespace.
15692 * decl2.c (flag_no_builtin): Remove.
15693 (flag_no_nonansi_builtin): Likewise.
15694 (set_decl_namespace): Use fake_std_node.
15695 (validate_nonmember_using_decl): Likewise.
15696 (do_using_directive): Likewise.
15697 (handle_class_head): Likewise.
15698 * dump.c (dequeue_and_dump): Likewise.
15699 * except.c (init_exception_processing): Use std_identifier.
15700 * init.c (build_member_call): Use fake_std_node.
15701 * rtti.c (init_rtti_processing): Use std_identifier.
15702
15703 2000-10-17 Mark Mitchell <mark@codesourcery.com>
15704
15705 * cp-tree.h (back_end_hook): Remove declaration.
15706 * decl2.c (back_end_hook): Remove definition.
15707
15708 * dump.c (dequeue_and_dump): Dump TREE_USED.
15709
15710 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
15711
15712 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15713
15714 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15715
15716 * decl.c (WINT_TYPE): Define.
15717 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15718 c_size_type_node, signed_size_type_node and wint_type_node.
15719
15720 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15721
15722 * decl2.c (warn_missing_format_attribute): New variable.
15723 (lang_decode_option): Decode -Wmissing-format-attribute.
15724
15725 2000-10-16 Mark Mitchell <mark@codesourcery.com>
15726
15727 * typeck.c (qualify_type): Remove.
15728 (composite_pointer_type): Fix handling of conversions to `cv void*'.
15729
15730 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15731
15732 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15733
15734 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15735
15736 * Makefile.in (parse.c, parse.h): Create atomically.
15737
15738 2000-10-12 Mark Mitchell <mark@codesourcery.com>
15739
15740 * class.c (current_obstack): Remove.
15741 * decl.c (ggc_p): Remove.
15742 (start_decl): Don't use decl_tree_cons.
15743 (grokdeclarator): Don't use build_decl_list.
15744 (start_function): Don't use decl_tree_cons.
15745 (finish_function): Don't mess with obstacks.
15746 * decl2.c (grok_x_components): Don't use build_decl_list.
15747 * lex.c (make_call_declarator): Don't call decl_tree_cons.
15748 (implicitly_declare_fn): Don't call build_decl_list.
15749 * parse.y (frob_specs): Don't call build_decl_list or
15750 decl_tree_cons.
15751 (expr_or_declarator_intern): Don't call decl_tree_cons.
15752 (primary): Don't call build_decl_list.
15753 (fcast_or_absdcl): Likewise.
15754 (typed_declspecs): Don't call decl_tree_cons.
15755 (reserved_declspecs): Don't call build_decl_list.
15756 (declmods): Likewise.
15757 (reserved_typespecquals): Likewise.
15758 (aggr): Likewise.
15759 (new_type_id): Likewise.
15760 (cv_qualifiers): Likewise.
15761 (after_type_declarator_intern): Likewise.
15762 (notype_declarator_intern): Likewise.
15763 (absdcl_intern): Likewise.
15764 (named_parm): Likewise.
15765 * pt.c (most_specialized_class): Likewise.
15766 * repo.c (temporary_obstack): Make it a structure, not a pointer.
15767 (init_repo): Initialize it.
15768 * search.c (current_obstack): Remove.
15769 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15770
15771 2000-10-09 Richard Henderson <rth@cygnus.com>
15772
15773 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15774 (c++ language support bits for libgcc): Remove.
15775 (c++.clean): Remove cplib2.txt cleanup.
15776 * config-lang.in (headers, lib2funcs): Remove.
15777
15778 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15779 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15780 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15781 * inc/new.h, inc/typeinfo: Remove files.
15782
15783 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
15784
15785 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15786 defined.
15787 (init_decl_processing): Initialize intmax_type_node and
15788 uintmax_type_node.
15789
15790 2000-10-06 Richard Henderson <rth@cygnus.com>
15791
15792 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15793 (original_result_rtx): Remove.
15794 * decl.c (save_function_data): Don't clear x_result_rtx.
15795 (mark_lang_function): Don't mark it either.
15796 * expr.c (fixup_result_decl): Remove.
15797 * semantics.c (genrtl_named_return_value): Frob the return decl
15798 before calling emit_local_var.
15799 (genrtl_finish_function): Don't call fixup_result_decl.
15800 Always emit the jump to return_label.
15801
15802 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
15803
15804 * pt.c (lookup_template_class): Set current access for enum.
15805 (tsubst_enum): Set file & line for enum decl.
15806
15807 * spew.c (yylex): Remove unused variable.
15808
15809 2000-10-05 Richard Henderson <rth@cygnus.com>
15810
15811 * semantics.c (genrtl_finish_function): Don't init or check
15812 can_reach_end; remove noreturn and return value checks.
15813
15814 2000-10-05 Tom Tromey <tromey@cygnus.com>
15815
15816 * init.c (build_java_class_ref): Use `build_static_name' with a
15817 suffix, not a prefix, to build the class object's name.
15818
15819 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15820
15821 * cp-tree.h (access_kind): Fix comment typo.
15822 * decl2.c (grokfield): Fix diagnostic typo.
15823 * semantics.c (finish_template_type): Fix comment typo.
15824 (finish_qualified_object_call_expr): Likewise.
15825
15826 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15827
15828 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15829 tsubsting fails.
15830
15831 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15832
15833 * spew.c (frob_id): New static function.
15834 (frob_opname): Use it.
15835 (yylex): Use it.
15836
15837 2000-10-01 Mark Mitchell <mark@codesourcery.com>
15838
15839 * decl.c (lang_mark_false_label_stack): Remove.
15840 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15841
15842 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
15843
15844 * gxxint.texi: Use @email for formatting email addresses.
15845
15846 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
15847
15848 * error.c: Remove direct obstack manipulation. Replace with
15849 output_buffer-based formatting. Adjust calls to removed macros.
15850 (obstack_chunk_alloc, obstack_chunk_free): Remove.
15851 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15852 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15853
15854 2000-09-24 Mark Mitchell <mark@codesourcery.com>
15855
15856 * ir.texi: Move to ../c-tree.texi.
15857
15858 2000-09-20 Jason Merrill <jason@redhat.com>
15859
15860 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15861
15862 2000-09-21 Andreas Jaeger <aj@suse.de>
15863
15864 * errfn.c: Move declaration of cp_printer and cp_printers to ...
15865 * cp-tree.h: ... here.
15866
15867 * error.c: Remove declaration of cp_printer.
15868
15869 2000-09-20 Mark Mitchell <mark@codesourcery.com>
15870
15871 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15872
15873 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
15874
15875 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15876 users.
15877
15878 2000-09-18 Mark Mitchell <mark@codesourcery.com>
15879
15880 * decl.c (start_function): Robustify.
15881
15882 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15883
15884 * cp-tree.h (check_function_format): Accept a `status' parameter.
15885
15886 * call.c, typeck.c: Updates calls to `check_function_format'.
15887
15888 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
15889
15890 * decl2.c (handle_class_head): Always push some scope even
15891 in the error case.
15892
15893 2000-09-16 Mark Mitchell <mark@codesourcery.com>
15894
15895 * cp-tree.h (struct cp_language_function): Remove
15896 x_scope_stmt_stack and name_declared.
15897 (current_scope_stmt_stack): Remove.
15898 (function_name_declared_p): New macro.
15899 (struct lang_decl_flags): Use c_lang_decl as a base class.
15900 (context): Remove.
15901 (struct lang_decl): Replace saved_tree with context.
15902 (DECL_FRIEND_CONTEXT): Adjust accordingly.
15903 (SET_DECL_FRIEND_CONTEXT): Likewise.
15904 (DECL_VIRTUAL_CONTEXT): Likewise.
15905 (DECL_SAVED_TREE): Remove.
15906 (C_DECLARED_LABEL_FLAG): Likewise.
15907 (cplus_expand_expr_stmt): Don't declare.
15908 (add_decl_stmt): Likewise.
15909 (add_scope_stmt): Likewise.
15910 * decl.c (mark_stmt_tree): Remove.
15911 (case_compare): Likewise.
15912 (finish_case_label): Use c_add_case_label.
15913 (init_decl_processing): Set more language-specific hooks.
15914 (build_enumerator): Fix typo in comment.
15915 (cplus_expand_expr_stmt): Remove.
15916 (mark_lang_function): Use mark_c_language_function.
15917 (lang_mark_tree): Use c_mark_lang_decl.
15918 * decl2.c: Change order of inclusion.
15919 * except.c: Likewise.
15920 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
15921 back on c_expand_expr.
15922 * friend.c: Include expr.h.
15923 * init.c: Change order of inclusion.
15924 * Makefile.in: Update dependencies.
15925 * lex.h (free_lang_decl_chain): Remove.
15926 * optimize.c (maybe_clone_body): Use function_name_declared_p.
15927 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15928 it doesn't exist.
15929 (instantiate_decl): Use function_name_declared_p.
15930 * semantics.c (lang_expand_expr_stmt): Remove.
15931 (set_current_function_name_declared): Likewise.
15932 (current_function_name_declared): Likewise.
15933 (begin_compound_stmt): Use function_name_declared_p.
15934 (add_decl_stmt): Remove.
15935 (setup_vtbl_ptr): Use function_name_declared_p.
15936 (add_scope_stmt): Remove.
15937 (current_scope_stmt_stack): New function.
15938 (cp_expand_stmt): Don't handle SCOPE_STMTs.
15939 (expand_body): Use function_name_declared_p.
15940 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15941 * typeck.c: Change order of includes.
15942 (convert_sequence): Remove.
15943
15944 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
15945
15946 * lex.c (reswords): Add _Complex.
15947
15948 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15949
15950 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15951
15952 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
15953
15954 * init.c (begin_init_stmts): Don't use // comments.
15955
15956 2000-09-12 Jason Merrill <jason@redhat.com>
15957
15958 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15959 all non-extern arrays.
15960
15961 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15962 typenames, too. Downgrade complaint to pedwarn.
15963 (xref_tag): Warn about surprising behavior of 'friend struct T'.
15964 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15965 'class This::Inherited'.
15966
15967 2000-09-12 Mark Mitchell <mark@codesourcery.com>
15968
15969 * decl.c (finish_case_label): Given the LABEL_DECL a
15970 DECL_CONTEXT.
15971
15972 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
15973
15974 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15975 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15976 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15977 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15978 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15979 New macros.
15980 (sorry_for_unsupported_tree, print_scope_operator,
15981 print_left_paren, print_right_paren, print_left_bracket,
15982 print_right_bracket, print_whitespace): Likewise.
15983 (aggr_variety): Rename to class_key_or_enum.
15984 (print_type): Rename to print_type_id.
15985 (print_type_specifier_seq, print_simple_type_specifier,
15986 print_elaborated_type_specifier,
15987 print_rest_of_abstract_declarator,
15988 print_parameter_declaration_clause, print_exception_specification,
15989 print_nested_name_specifier, print_template_id,
15990 typedef_original_name, print_template_argument_list_start,
15991 print_template_argument_list_end): New functions.
15992
15993 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
15994
15995 * ir.texi: Add more documentation.
15996
15997 2000-09-11 Mark Mitchell <mark@codesourcery.com>
15998
15999 * cp-tree.h (struct saved_scope): Remove x_function_parms.
16000 (current_function_parms): Don't define.
16001 (struct cp_language_function): Remove parms_stored.
16002 (current_function_just_assigned_this): Don't define.
16003 (current_function_parms_stored): Likewise.
16004 (static_ctors): Declare.
16005 (static_dtors): Likewise.
16006 (SF_EXPAND): Don't define.
16007 (expand_start_early_try_stmts): Remove declaration.
16008 (store_parm_decls): Likewise.
16009 * decl.c (static_ctors): Don't declare.
16010 (static_dtors): Likewise.
16011 (struct binding_level): Remove this_block.
16012 (poplevel): Remove dead code.
16013 (set_block): Likewise.
16014 (mark_binding_level): Don't mark this_block.
16015 (mark_saved_scope): Don't mark x_function_parms.
16016 (init_decl_processing): Don't add current_function_parms as a GC
16017 root.
16018 (check_function_type): Change prototype.
16019 (start_function): Remove RTL-generation code.
16020 (expand_start_early_try_stmts): Remove.
16021 (store_parm_decls): Give it internal linkage. Remove
16022 RTL-generation code.
16023 (finish_function): Remove RTL-generation code.
16024 * decl2.c (static_ctors): Fix formatting.
16025 (static_dtors): Likewise.
16026 * method.c (use_thunk): Don't call store_parm_decls.
16027 (synthesize_method): Likewise.
16028 * optimize.c (maybe_clone_body): Likewise.
16029 * parse.y (fn.def2): Likewise.
16030 (.set_base_init): Likewise.
16031 (nodecls): Likewise.
16032 * pt.c (instantiate_decl): Likewise.
16033 * rtti.c (synthesize_tinfo_fn): Likewise.
16034 * semantics.c (genrtl_try_block): Simplify.
16035 (expand_body): Use genrtl_start_function and
16036 genrtl_finish_function.
16037 (genrtl_start_function): New function.
16038 (genrtl_finish_function): Likewise.
16039
16040 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16041
16042 * error.c (cp_tree_printer, case 'P'): Append break.
16043
16044 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16045
16046 * cp-tree.h (frob_opname): Declare.
16047 * parse.y (saved_scopes): New static variable.
16048 (cp_parse_init): Adjust.
16049 (do_id): If lastiddecl is NULL, do do_identifier.
16050 (operator): Save scope information.
16051 (unoperator): New reduction. Restore scope information.
16052 (operator_name): Append unoperator. Call frob_opname.
16053 * spew.c (frob_opname): Define.
16054
16055 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
16056
16057 * decl.c, rtti.c: Include defaults.h if not already included.
16058 Don't define the *_TYPE_SIZE macros.
16059
16060 2000-09-09 Mark Mitchell <mark@codesourcery.com>
16061
16062 * cp-tree.h (push_switch): Change prototype.
16063 (check_cp_case_value): Remove declaration.
16064 (decl_constant_value): Likewise.
16065 * decl.c (struct cp_switch): Add switch_stmt and cases.
16066 (case_compare): New function.
16067 (push_switch): Set switch_stmt. Initialize cases.
16068 (pop_switch): Clean up cases.
16069 (define_case_label): Rename to ...
16070 (finish_case_label): ... this. Do semantic analysis for case
16071 labels here.
16072 (start_function): Correct comment.
16073 * decl2.c (check_cp_case_value): Remove.
16074 * expr.c (do_case): Remove.
16075 * pt.c (tsubst_expr): Adjust call to finish_case_label.
16076 * semantics.c (genrtl_do_poplevel): Remove declaration.
16077 (RECHAIN_STMTS): Remove.
16078 (finish_break_stmt): Use build_break_stmt.
16079 (finish_continue_stmt): Use build_continue_stmt.
16080 (finish_switch_cond): Adjust condition here, rater than in
16081 c_expand_start_case.
16082 (finish_case_label): Remove.
16083 * typeck.c (c_expand_return): Remove.
16084 (c_expand_start_case): Likewise.
16085
16086 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
16087
16088 * ir.texi: Document type nodes.
16089
16090 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16091
16092 * cp-tree.h (init_cp_semantics): Declare.
16093 (genrtl_try_block): Don't declare.
16094 (genrtl_handler): Likewise.
16095 (genrtl_catch_block): Likewise.
16096 (genrtl_ctor_stmt): Likewise.
16097 (genrtl_subobject): Likewise.
16098 (genrtl_do_poplevel): Likewise.
16099 (genrtl_named_return_value): Likewise.
16100 * lex.c (init_parse): Call init_cp_semantics.
16101 * semantics.c (genrtl_try_block): Give it internal linkage.
16102 (genrtl_handler): Likewise.
16103 (genrtl_catch_block): Likewise.
16104 (genrtl_ctor_stmt): Likewise.
16105 (genrtl_subobject): Likewise.
16106 (genrtl_do_poplevel): Likewise.
16107 (genrtl_named_return_value): Likewise.
16108 (lang_expand_stmt): Rename to ...
16109 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
16110 (init_cp_semantics): Define.
16111
16112 * decl.c (initialize_local_var): Remove RTL-generating code.
16113 * semantics.c (genrtl_try_block): Fix formatting.
16114
16115 Move statement-tree facilities from C++ to C front-end.
16116 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16117 (void_zero_node): Remove.
16118 (stmt_tree): Likewise.
16119 (scope_chain): Adjust.
16120 (language_function): Rename to cp_language_function.
16121 (cp_function_chain): Adjust.
16122 (current_stmt_tree): Remove.
16123 (last_tree): Likewise.
16124 (last_expr_type): Likewise.
16125 (struct lang_decl): Adjust.
16126 (STMT_IS_FULL_EXPR_P): Remove.
16127 (add_tree): Remove.
16128 (begin_stmt_tree): Likewise.
16129 (finish_stmt_tree): Likewise.
16130 (walk_tree_fn): Likewise.
16131 (walk_stmt_tree): Likewise.
16132 * class.c (finish_struct): Replace use of add_tree with add_stmt.
16133 * decl.c (mark_stmt_tree): Adjust type.
16134 (init_decl_processing): Don't build void_zero_node.
16135 (initialize_local_var): Adjust usage of current_stmt_tree.
16136 (finish_enum): Use add_stmt, not add_tree.
16137 (save_function_data): Adjust use of language_function.
16138 (finish_constructor_body): Use add_stmt, not add_tree.
16139 (finish_destructor_body): Likewise.
16140 (push_cp_function_context): Adjust use of language_function.
16141 (pop_cp_function_context): Likewise.
16142 (mark_lang_function): Likewise.
16143 (mark_cp_function_context): Likewise.
16144 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16145 (build_vec_init): Likewise.
16146 * semantics.c (SET_LAST_STMT): Remove.
16147 (RECHAIN_STMTS): Don't use it.
16148 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16149 (current_stmt_tree): Define.
16150 (add_tree): Remove.
16151 (finish_goto_stmt): Use add_stmt, not add_tree.
16152 (finish_expr_stmt): Likewise.
16153 (begin_if_stmt): Likewise.
16154 (finish_then_clause): Likewise.
16155 (begin_while_stmt): Likewise.
16156 (begin_do_stmt): Likewise.
16157 (finish_return_stmt): Likewise.
16158 (begin_for_stmt): Likewise.
16159 (finish_break_stmt): Likewise.
16160 (finish_continue_stmt): Likewise.
16161 (begin_switch_stmt): Likewise.
16162 (finish_case_label): Likewise.
16163 (begin_try_block): Likewise.
16164 (begin_function_try_block): Likewise.
16165 (begin_handler): Likewise.
16166 (begin_catch_block): Likewise.
16167 (begin_compound_stmt): Likewise.
16168 (begin_asm_stmt): Likewise.
16169 (finish_asm_stmt): Likewise.
16170 (finish_label_stmt): Likewise.
16171 (add_decl_stmt): Likewise.
16172 (finish_subobject): Likewise.
16173 (finish_decl_cleanup): Likewise.
16174 (finish_named_return_value): Likewise.
16175 (setup_vtbl_ptr): Likewise.
16176 (add_scope_stmt): Likewise.
16177 (finish_stmt_expr): Likewise.
16178 (prune_unused_decls): Remove.
16179 (begin_stmt_tree): Likewise.
16180 (finish_stmt_tree): Likewise.
16181 (prep_stmt): Adjust use of current_stmt_tree.
16182 (lang_expand_stmt): Likewise.
16183 * tree.c (statement_code_p): Remove.
16184 (cp_statement_code_p): New function.
16185 (walk_stmt_tree): Remove.
16186 (init_tree): Set lang_statement_code_p.
16187
16188 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
16189
16190 Integrated preprocessor.
16191
16192 * Make-lang.in, Makefile.in: Remove all references to input.c,
16193 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
16194 * gxx.gperf, hash.h, input.c: Delete.
16195 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16196 initialized properly.
16197
16198 * class.c (fixup_pending_inline): Take a tree, not a
16199 struct pending_inline *. All callers changed.
16200 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16201 RID_PROTECTED entries in ridpointers[] array here.
16202 * decl.c (duplicate_decls): Do not refer to struct
16203 pending_inline.
16204 (record_builtin_type, init_decl_processing): Use RID_MAX not
16205 CP_RID_MAX.
16206 (grokdeclarator): Use C_IS_RESERVED_WORD.
16207 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16208 cpplib.
16209 (grok_x_components): Do not inspect pending_inlines chain.
16210
16211 * cp-tree.h (struct lang_identifier): Add rid_code entry.
16212 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16213 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16214 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16215 TIME_IDENTIFIER_FILEINFO): Kill.
16216 Update prototypes.
16217 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
16218 single 32-bit word.
16219 * parse.y: Call do_pending_inlines unconditionally.
16220 reinit_parse_for_method is now snarf_method. fn.defpen is no
16221 longer necessary. Remove unnecessary <itype> annotation on
16222 SCOPE. Do not refer to end_of_file or struct pending_inline.
16223 * semantics.c (begin_inline_definitions): Call
16224 do_pending_inlines unconditionally.
16225
16226 * lex.c: Remove all code now shared with C front end.
16227 Initialize cpplib properly if USE_CPPLIB. Put reserved words
16228 into the get_identifier table. Rewrite pragma handling to
16229 work with the registry. Move code to save tokens for later
16230 processing to spew.c.
16231
16232 * spew.c: Rewrite everything in terms of token streams instead
16233 of text. Move routines here from lex.c / input.c as
16234 appropriate. GC-mark trees hanging off the pending inlines
16235 chain.
16236
16237 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16238
16239 * NEWS: Mention that the named return value extension has been
16240 deprecated.
16241 * cp-tree.h (original_result_rtx): Define.
16242 (TREE_REFERENCE_EXPR): Remove.
16243 (DECL_VPARENT): Likewise.
16244 (pushdecl_nonclass_level): Likewise.
16245 (store_return_init): Likewise.
16246 (reinit_lang_specific): Likewise.
16247 (genrtl_named_return_value): Change prototype.
16248 * decl.c (original_result_rtx): Remove.
16249 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16250 Do not generate RTL for local variables here.
16251 (store_return_init): Remove.
16252 * semantics.c (genrtl_named_return_value): Simplify. Fold in
16253 store_return_init.
16254 (finish_named_return_value): Adjust accordingly. Warn that this
16255 extension is deprecated.
16256 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16257
16258 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16259
16260 * pt.c (type_unification_real): Replace switch with if.
16261 (unify): Tsubst non-type parms before comparing.
16262
16263 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16264
16265 * error.c (dump_typename): New function, broken out of ...
16266 (dump_type): ... here. Use it.
16267 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16268
16269 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16270
16271 * init.c (build_offset_ref): Deal with namespace scoped
16272 TEMPLATE_ID_EXPRs.
16273
16274 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16275
16276 * class.c (resolve_address_of_overloaded_function): Add
16277 explanation message.
16278 * decl.c (define_case_label): Reformat explanation.
16279 * decl2.c (finish_static_data_member_decl): Likewise.
16280 (grokfield): Likewise.
16281 * friend.c (do_friend): Likewise.
16282
16283 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
16284
16285 * tree.c (walk_tree): Expose tail recursion.
16286 (walk_stmt_tree): New function.
16287 * cp-tree.h: Prototype walk_stmt_tree.
16288 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16289 the BLOCKs directly. If a BLOCK has no variables after
16290 pruning, discard it.
16291 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
16292 restore the line number.
16293
16294 2000-09-05 Mark Mitchell <mark@codesourcery.com>
16295
16296 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16297 (pt.o): Remove dependency on HTAB_H.
16298 * cp-tree.h: Include hashtab.h.
16299 (walk_tree): Change prototype.
16300 (walk_tree_without_duplicates): New function.
16301 * decl.c (check_default_argument): Use it.
16302 * optimize.c (remap_decl): Adjust calls to walk_tree.
16303 (copy_body): Likewise.
16304 (expand_calls_inline): Likewise.
16305 (calls_setjmp_p): Use walk_tree_without_duplicates.
16306 * pt.c: Don't include hashtab.h.
16307 (for_each_template_parm): Use walk_tree_without_duplicates.
16308 * semantics.c (finish-stmt_tree): Likewise.
16309 (expand_body): Likewise.
16310 * tree.c (walk_tree): Add additional parameter.
16311 (walk_tree_without_duplicates): New function.
16312 (count_trees): Use it.
16313 (verify_stmt_tree): Adjust call to walk_tree.
16314 (find_tree): Use walk_tree_without_duplicates.
16315 (no_linkage_check): Likewise.
16316 (break_out_target_exprs): Adjust call to walk_tree.
16317 (cp_unsave): Likewise.
16318
16319 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16320
16321 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16322 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16323 * cp-tree.h (TYPE_BINFO): Adjust comment.
16324 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16325 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16326 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16327 (TYPE_TEMPLATE_INFO): Likewise.
16328 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16329 * class.c (push_nested_class): Likewise.
16330 * decl.c (lookup_name_real): Likewise.
16331 (grokdeclarator): Likewise.
16332 (grok_op_properties): Likewise.
16333 (xref_tag): Likewise.
16334 (xref_basetypes): Likewise.
16335 * decl2.c (constructor_name_full): Likewise.
16336 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16337 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16338 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16339 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16340 (dump_type_suffix): Likewise.
16341 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16342 instead.
16343 (get_aggr_from_typedef): Likewise.
16344 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16345 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16346 (write_template_parm): Likewise.
16347 (write_template_template_parm): Check tree code instead of
16348 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16349 * method.c (build_overload_nested_name): Add
16350 BOUND_TEMPLATE_TEMPLATE_PARM.
16351 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16352 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16353 * pt.c (convert_template_argument): Check tree code instead of
16354 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16355 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16356 (for_each_template_parm): Adjust comment.
16357 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
16358 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16359 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
16360 template_args_equal to compare template template parameter cases.
16361 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16362 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16363 instead.
16364 * tree.c (copy_template_template_parm): Decide whether to create
16365 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16366 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16367 (copy_tree_r): Likewise.
16368 * typeck.c (comptypes): Likewise. Check tree code instead of
16369 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16370
16371 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
16372
16373 * decl.c (finish_function): Move the code for handling functions
16374 marked with the constructor and destructor attributes inside the
16375 expand_p block.
16376
16377 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16378
16379 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16380
16381 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16382
16383 * pt.c (lookup_template_class): Remove abort.
16384 * tree.c (get_type_decl): Allow error_mark_node.
16385
16386 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16387
16388 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16389 TEMPLATE_ID_EXPRs.
16390
16391 2000-09-03 Mark Mitchell <mark@codesourcery.com>
16392
16393 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16394 new ABI mangling.
16395
16396 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16397
16398 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16399 union tag mismatch error reporting.
16400
16401 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16402
16403 * call.c (build_scoped_method_call): Check it is not a namespace.
16404
16405 2000-08-30 Jason Merrill <jason@redhat.com>
16406
16407 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16408
16409 * tree.c (bot_manip): Check TREE_CONSTANT rather than
16410 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
16411 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16412
16413 * decl.c (start_function): Always call make_function_rtl.
16414
16415 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16416
16417 * semantics.c (prune_unused_decls): New function.
16418 (finish_stmt_tree): Call it via walk_tree.
16419
16420 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16421
16422 * class.c (build_secondary_vtable): Constify a char *.
16423 * decl.c (init_decl_processing): Initialize function_id_node,
16424 pretty_function_id_node, and func_id_node.
16425 * input.c (struct input_source): Constify 'str'.
16426 (feed_input): Constify first argument.
16427 * mangle.c (write_identifier): Constify argument.
16428 * pt.c (mangle_class_name_for_template): Constify argument.
16429
16430 2000-08-29 Mark Mitchell <mark@codesourcery.com>
16431
16432 * typeck.c (mark_addressable): Remove code that pokes around in
16433 RTL.
16434
16435 2000-08-28 Jason Merrill <jason@redhat.com>
16436
16437 * lex.c (file_name_nondirectory): Move to toplev.c.
16438
16439 * cp-tree.h (LOCAL_CLASS_P): New macro.
16440 * class.c (finish_struct_1): Use it.
16441
16442 2000-08-27 Alex Samuel <samuel@codesourcery.com>
16443
16444 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16445 (write_encoding): Pass another argument to write_name.
16446 (write_name): Add ignore_local_scope parameter. Fix handling of
16447 local names.
16448 (write_nested_name): Use write_unqualified_name.
16449 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
16450 (write_template_prefix): Use write_unqualified_name.
16451 (write_component): Remove.
16452 (write_local_name): Add parameter. Use direct local entity to
16453 discriminator calculation.
16454 (write_class_enum_type): Pass another argument to write_name.
16455 (write_template_template_arg): Likewise.
16456 (make_guard_variable): Likewise.
16457
16458 2000-08-27 Jason Merrill <jason@redhat.com>
16459
16460 * decl.c (pushdecl): Matching decls for local externs are found in
16461 the current level. Propagate linkage information from previous
16462 declarations.
16463
16464 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
16465
16466 * ir.texi (Expressions): Fix typo.
16467
16468 2000-08-25 Greg McGary <greg@mcgary.org>
16469
16470 * tree.c (init_tree): Use ARRAY_SIZE.
16471
16472 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16473
16474 * error.c (cp_tree_printer): Rework.
16475
16476 2000-08-25 Mark Mitchell <mark@codesourcery.com>
16477
16478 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16479 dyn-string.o.
16480 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16481 (cp-demangle.o): Remove target.
16482 (dyn-string.o): Likewise.
16483
16484 * decl.c (grokfndecl): Require that `main' return an `int'.
16485 * mangle.c (write_encoding): Don't mangle return types for
16486 conversion functions.
16487
16488 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16489
16490 * error.c (tree_formatting_info): New data type.
16491 (tree_being_formatted): New macro.
16492 (tree_formatting_flags): Likewise.
16493 (put_whitespace): Likewise.
16494 (print_tree_identifier): Likewise.
16495 (print_identifier): Likewise.
16496 (cp_tree_printer, print_function_argument_list, print_declaration,
16497 print_expression, print_function_declaration,
16498 print_function_parameter, print_type, print_cv_qualifier): New
16499 functions.
16500 (init_error): Initialize lang_printer.
16501
16502 2000-08-24 Jason Merrill <jason@redhat.com>
16503
16504 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16505 adjustment necessary.
16506
16507 2000-08-24 Greg McGary <greg@mcgary.org>
16508
16509 * cp-tree.h (MAIN_NAME_P): Remove macro.
16510
16511 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
16512
16513 * error.c (print_instantiation_context): Don't forget to flush the
16514 buffer.
16515
16516 2000-08-23 Jason Merrill <jason@redhat.com>
16517
16518 * typeck.c (build_ptrmemfunc): Save the input pmf.
16519
16520 * method.c (process_modifiers): Use same_type_p.
16521
16522 2000-08-23 Mark Mitchell <mark@codesourcery.com>
16523
16524 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16525 * mangle.c (write_function_type): Change prototype.
16526 (write_encoding): Don't mangle return types for
16527 constructors or destructors.
16528 (write_type): Adjust call to write_function_type.
16529 * pt.c (instantiate_template): Instantiate alternate entry points
16530 when instantiating the main function.
16531
16532 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16533
16534 * error.c (cp_print_error_function): Don't use embedded '\n' in
16535 output_printf.
16536
16537 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16538
16539 * decl.c (init_decl_processing): Remove bogus initialization.
16540 * error.c (lang_print_error_function): Restore here.
16541 (init_error): Initialize print_error_function.
16542
16543 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16544
16545 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16546
16547 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
16548
16549 * Makefile.in (error.o): Depends on diagnostic.h
16550
16551 * cp-tree.h (problematic_instantiation_changed,
16552 record_last_problematic_instantiation, current_instantiation,
16553 print_instantiation_context): Declare.
16554 (maybe_print_template_context): Remove.
16555
16556 * decl.c (init_decl_processing): Set print_error_function to NULL.
16557 (lang_print_error_function): Remove, since we're using a new
16558 machinery.
16559
16560 * error.c: #include diagnostic.h
16561 (function_category): New function.
16562 (cp_diagnostic_starter): Likewise.
16563 (cp_diagnostic_finalizer): Likewise.
16564 (cp_print_error_function): Likewise.
16565 (maybe_print_instantiation_context): Likewise.
16566 (print_instantiation_full_context): Likewise.
16567 (print_instantiation_partial_context): Likewise.
16568 (print_instantiation_context): Define.
16569 (init_error): Initialize diagnostic pager and finalizer.
16570
16571 * pt.c (problematic_instantiation_changed): Define.
16572 (record_last_problematic_instantiation): Likewise.
16573 (current_instantiation): Likewise.
16574 (maybe_print_template_context): Remove.
16575 (print_template_context): Likewise.
16576 (current_tinst_level): Make static to reflect Brendan Kehoe's
16577 change of 1995-04-13.
16578 (push_tinst_level): Call print_instantiation_context.
16579
16580 2000-08-21 Nix <nix@esperi.demon.co.uk>
16581
16582 * lang-specs.h: Do not process -o or run the assembler if
16583 -fsyntax-only.
16584
16585 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
16586
16587 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16588 variables.
16589 * decl2.c (lang_decode_option): Disable gettext attributes for
16590 -ansi.
16591
16592 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
16593
16594 * lex.c (lang_init_options): Default diagnostic message maximum
16595 length to 80, when line-wrapping.
16596
16597 2000-08-20 Mark Mitchell <mark@codesourcery.com>
16598
16599 * class.c (build_vtbl_initializer): Clear the entire
16600 vtbl_init_data. Start keeping track of the functions for which we
16601 have created vcall offsets here.
16602 (dfs_build_vcall_offset_vtbl_entries): Remove.
16603 (build_vcall_offset_vtbl_entries): Reimplement.
16604 (add_vcall_offset_vtbl_entries_r): New function.
16605 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
16606 computing when vcall offsets are necessary.
16607
16608 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16609
16610 * decl.c (member_function_or_else): Use cp_error ... %T.
16611 (grokdeclarator): Likewise.
16612 (start_method): Likewise.
16613 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16614
16615 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16616
16617 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16618 TYPE_DECLs.
16619
16620 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16621
16622 * cp-tree.h (PTRMEM_OK_P): New macro.
16623 (itf_ptrmem_ok): New enumeration value.
16624 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16625 argument. Diagnose implicit pointer to member.
16626 (instantiate_type): Don't diagnose implicit pointer to member
16627 here. Pass itf_ptrmem_ok if ok. Adjust calls to
16628 resolve_address_of_overloaded_function.
16629 * init.c (build_offset_ref): Set PTRMEM_OK_P.
16630 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16631 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16632 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16633 (build_unary_op): Deal with single non-static member in
16634 microsoft-land.
16635
16636 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16637
16638 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16639
16640 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16641
16642 * cp-tree.h (enum_name_string): Remove prototype.
16643 (report_case_error): Remove prototype.
16644 * cp/typeck2.c (enum_name_string): Remove.
16645 (report_case_error): Remove.
16646 * error.c (dump_expr): Deal with enum values directly.
16647 Correctly negate integer constant.
16648
16649 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16650
16651 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16652 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16653 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16654 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16655 (__cxa_vec_new): Use __cxa_vec_new2.
16656 (__cxa_vec_delete): Use __cxa_vec_delete2.
16657
16658 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16659
16660 * vec.cc (__cxa_vec_new): Set "C" linkage.
16661 (__cxa_vec_ctor): Likewise.
16662 (__cxa_vec_cctor): Likewise.
16663 (__cxa_vec_dtor): Likewise.
16664 (__cxa_vec_delete): Likewise.
16665 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16666 (__cxa_vec_ctor): Likewise.
16667 (__cxa_vec_cctor): Likewise.
16668 (__cxa_vec_dtor): Likewise.
16669 (__cxa_vec_delete): Likewise.
16670
16671 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16672
16673 * class.c (instantiate_type): Reinstate local variable
16674 deleted in previous change.
16675
16676 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16677 itf_no_attributes.
16678
16679 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16680
16681 * cp-tree.h (instantiate_type_flags): New enumeration.
16682 (instantiate_type): Change parameter.
16683 * class.c (instantiate_type): Adjust prototype. Adjust.
16684 * call.c (standard_conversion): Adjust instantiate_type call.
16685 (reference_binding): Likewise.
16686 (build_op_delete_call): Likewise.
16687 (convert_like_real): Likewise.
16688 * cvt.c (cp_convert_to_pointer): Likewise.
16689 (convert_to_reference): Likewise.
16690 * pt.c (convert_nontype_argument): Likewise.
16691 * typeck.c (build_binary_op): Likewise.
16692 (build_ptrmemfunc): Likewise.
16693 (convert_for_assignment): Likewise.
16694
16695 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16696
16697 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16698 (current_aggr): Define.
16699 * decl.c (grokdeclarator): Make sure a friend class is an
16700 elaborated type specifier.
16701 * parse.y (current_aggr): Remove static definition.
16702 (cp_parse_init): Adjust.
16703 (structsp): Clear and restore current_aggr.
16704 (component_decl_list): Clear current_aggr.
16705
16706 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16707 aggregate tag on the typename's context.
16708
16709 * pt.c (tsubst_friend_class): Return error_mark_node, if
16710 parms becomes NULL.
16711 (instantiate_class_template): Ignore error_mark_node friend types.
16712
16713 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
16714
16715 * cvt.c (warn_ref_binding): New static function, broken out of ...
16716 (convert_to_reference): ... here. Use it.
16717
16718 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16719
16720 * parse.y (template_arg): Add rule for template qualified with
16721 global scope.
16722
16723 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16724
16725 * decl2.c (add_function): Reorganize.
16726 (arg_assoc): Do not consider function template decls.
16727
16728 2000-08-11 Jason Merrill <jason@redhat.com>
16729
16730 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16731 looking inside.
16732
16733 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16734
16735 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16736 (lookup_nested_tag): Likewise.
16737
16738 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16739 can be produced.
16740
16741 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16742
16743 * parse.y (named_complex_class_head_sans_basetype): Remove
16744 always true if.
16745
16746 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16747
16748 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16749 explicit TEMPLATE_ID_EXPR args.
16750 (build_expr_from_tree, case CALL_EXPR): Likewise.
16751
16752 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16753
16754 * decl.c (check_tag_decl): Diagnose typename's which don't
16755 declare anything.
16756
16757 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
16758
16759 * init.c (build_aggr_init): Reject bogus array initializers
16760 early.
16761
16762 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16763
16764 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16765 runtime.
16766 * cp/tinfo.cc (__dynamic_cast): Likewise.
16767 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16768
16769 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16770
16771 * cvt.c (convert_to_pointer_force): Fix error message when
16772 attempting to cast from ambiguous base.
16773
16774 2000-08-08 Jason Merrill <jason@redhat.com>
16775
16776 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16777 (tsubst_template_arg_vector): Likewise.
16778
16779 * decl2.c (build_anon_union_vars): Choose the largest field; don't
16780 assume that one will be as large as the union.
16781
16782 2000-08-07 Kazu Hirata <kazu@hxi.com>
16783
16784 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16785 * decl.c (pop_labels): Likewise.
16786
16787 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
16788
16789 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16790 specifications.
16791 (__pointer_to_member_type_info): Likewise.
16792 (__base_class_info): Likewise.
16793 (__class_type_info): Likewise.
16794 (__si_class_type_info): Likewise.
16795 (__vmi_class_type_info): Likewise.
16796 * tinfo.cc (__si_class_type_info::__do_find_public_src):
16797 Changed member names to match specifications.
16798 (__vmi_class_type_info::__do_find_public_src): Likewise.
16799 (__si_class_type_info::__do_dyncast): Likewise.
16800 (__vmi_class_type_info::__do_dyncast): Likewise.
16801 (__si_class_type_info::__do_upcast): Likewise.
16802 (__vmi_class_type_info::__do_upcast): Likewise.
16803 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16804 (__pbase_type_info::__pointer_catch): Likewise.
16805 (__pointer_type_info::__pointer_catch): Likewise.
16806 (__pointer_to_member_type_info::__pointer_catch): Likewise.
16807
16808 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
16809
16810 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16811 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16812 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16813
16814 2000-08-04 Mark Mitchell <mark@codesourcery.com>
16815
16816 * cp-tree.h (add_method): Change prototype.
16817 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
16818 Don't double the size of the method vector in the error case.
16819 (handle_using_decl): Adjust call to add_method.
16820 (add_implicitly_declared_members): Likewise.
16821 (clone_function_decl): Likewise.
16822 * decl2.c (check_classfn): Likewise.
16823 * semantics.c (finish_member_declaration): Likewise.
16824
16825 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
16826
16827 * decl.c (flag_isoc94): New variable.
16828
16829 2000-08-02 Jason Merrill <jason@redhat.com>
16830
16831 * pt.c (do_type_instantiation): Add complain parm; don't complain
16832 if called recursively.
16833 * cp-tree.h, parse.y: Adjust.
16834
16835 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
16836
16837 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16838 -Wno-strict-prototypes.
16839
16840 * g++spec.c: Adjust type of second argument to
16841 lang_specific_driver, and update code as necessary.
16842
16843 * cp-tree.h: Don't prototype min_precision here.
16844 (my_friendly_assert): Cast expression to void.
16845 * semantics.c (do_poplevel): Initialize scope_stmts.
16846
16847 2000-08-02 Mark Mitchell <mark@codesourcery.com>
16848
16849 * cp-tree.h (DECL_NEEDED_P): Tweak.
16850
16851 2000-07-28 Jason Merrill <jason@redhat.com>
16852
16853 * lang-specs.h: Use %i in rule for .ii files.
16854
16855 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
16856
16857 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16858
16859 2000-07-30 Mark Mitchell <mark@codesourcery.com>
16860
16861 Allow indirect primary bases.
16862 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
16863 primary_base.
16864 (CLASSTYPE_VFIELD_PARENT): Remove.
16865 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16866 (BINFO_PRIMARY_BINFO): Remove.
16867 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16868 (BINFO_VBASE_PRIMARY_P): Likewise.
16869 (BINFO_PRIMARY_BASE_OF): New macro.
16870 (BINFO_INDIRECT_PRIMARY_P): Likewise.
16871 (get_primary_binfo): New function.
16872 * decl.c (lang_mark_tree): Make lang_type::primary_base.
16873 * class.c (vcall_offset_data_s): Rename to ...
16874 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
16875 and add ctor_vtbl_p.
16876 (get_derived_offset): Use get_primary_binfo.
16877 (dfs_mark_primary_bases): Adjust handling of virtual primary
16878 bases.
16879 (mark_primary_bases): Likewise.
16880 (set_primary_base): Take a binfo, not an integer, as a
16881 representation of the primary base.
16882 (indirect_primary_base_p): Remove.
16883 (determine_primary_base): Adjust for indirect primary bases.
16884 (dfs_find_final_overrider): Fix typo in coment.
16885 (update_vtable_entry_for_fn): Use get_primary_binfo.
16886 (layout_nonempty_base_or_field): Tweak.
16887 (build_base_fields): Adjust for new primary base semantics.
16888 (dfs_propagate_binfo_offsets): Remove.
16889 (propagate_binfo_offsets): Rewrite.
16890 (dfs_set_offset_for_shared_vbases): Remove.
16891 (layout_virtual_bases): Don't use it.
16892 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16893 ABI.
16894 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16895 CLASSTYPE_VFIELD_PARENT.
16896 (dfs_get_primary_binfo): New function.
16897 (get_primary_binfo): Likewise.
16898 (dump_class_hierarchy_r): Tweak printing of primary bases.
16899 (build_vtbl_initializer): Fix typo in comments. Use
16900 vtbl_init_data.
16901 (build_vcall_and_vbase_vtbl_entries): Likewise.
16902 (build_vbaes_offset_vtbl_entries): Likewise.
16903 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16904 BV_VCALL_INDEX to handle indirect primary bases.
16905 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16906 (build_rtti_vtbl_entries): Likewise.
16907 * search.c (get_shared_vbase_if_not_primary): Tweak.
16908 (find_vbase_instance): Likewise.
16909 (binfo_for_vtable): Simplify.
16910 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16911 (make_binfo): Make it have 11 entries.
16912
16913 2000-07-30 Alex Samuel <samuel@codesourcery.com>
16914
16915 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16916 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16917 ascertaining primaryness.
16918 (G): Remove template_args.
16919 (decl_is_template_id): New function.
16920 (write_encoding): Use decl_is_template_id.
16921 (write_name): Likewise. Handle type_decls. Get main variant of
16922 type decls.
16923 (write_nested_name): Likewise.
16924 (write_prefix): Likewise.
16925 (write_template_prefix): Likewise.
16926 (write_special_name_constructor): Remove defunct production from
16927 comment.
16928 (write_bare_function_type): Remove comment about absent parameter.
16929 (write_template_template_arg): Add missing grammar production to
16930 comment.
16931
16932 2000-07-27 Jason Merrill <jason@redhat.com>
16933
16934 * decl.c (duplicate_decls): If common_type produces a non-typedef
16935 type for a typedef, just use the old type.
16936
16937 2000-07-27 Mark Mitchell <mark@codesourcery.com>
16938
16939 * cp-tree.h (function_depth): Declare.
16940 (verify_stmt_tree): Likewise.
16941 (find_tree): Likewise.
16942 * decl.c (function_depth): Give it external linkage.
16943 * optimize.c (optimize_function): Increment and decrement it.
16944 * tree.c (verify_stmt_tree_r): New function.
16945 (verify_stmt_tree): Likewise.
16946 (find_tree_r): Likewise.
16947 (find_tree): Likewise.
16948
16949 2000-07-27 Jason Merrill <jason@redhat.com>
16950
16951 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16952 TYPE_PTRMEMFUNC_P.
16953 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16954
16955 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16956
16957 * decl.c (start_cleanup_fn): Mark the function as `inline'.
16958 * decl2.c (get_guard): Call cp_finish_decl, not
16959 rest_of_decl_compilation, for local guards.
16960 * lex.c (do_identifier): Remove unused variable.
16961
16962 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
16963
16964 * parse.y: Add missing ';'.
16965
16966 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16967
16968 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16969 of `extern "C++"'.
16970
16971 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16972
16973 Kill strict_prototype. Backwards compatibility only for
16974 non NO_IMPLICIT_EXTERN_C systems.
16975 * cp-tree.h (flag_strict_prototype): Remove.
16976 (strict_prototype): Remove.
16977 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16978 * decl.c (maybe_push_to_top_level): Adjust.
16979 (pop_from_top_level): Adjust.
16980 (decls_match): Only allow sloppy parm matching for ancient
16981 system headers.
16982 (init_decl_processing): Adjust.
16983 (grokdeclarator): Adjust.
16984 * decl2.c (flag_strict_prototype): Remove.
16985 (strict_prototype): Remove.
16986 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16987 (lang_f_options): Remove "strict-prototype".
16988 (unsupported-options): Add "strict-prototype".
16989 * lex.c (do_identifier): Adjust.
16990 (do_scoped_id): Adjust.
16991 * parse.y (empty_parms): Adjust.
16992 * class.c (push_lang_context): Adjust.
16993 (pop_lang_context): Adjust.
16994 * typeck.c (comp_target_parms): Adjust.
16995
16996 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16997
16998 * decl.c (poplevel): Deal with anonymous variables at for scope.
16999 (maybe_inject_for_scope_var): Likewise.
17000
17001 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
17002
17003 * decl.c: Remove all signal handling code, now done in toplev.c.
17004
17005 2000-07-23 Mark Mitchell <mark@codesourcery.com>
17006
17007 * decl.c (make_rtl_for_nonlocal_decl): Rework.
17008
17009 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
17010 correctly.
17011
17012 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
17013
17014 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
17015 Define my_friendly_assert and my_friendly_abort as macros
17016 which may call friendly_abort. Prototype friendly abort, not
17017 my_friendly_abort or my_friendly_assert.
17018 * decl.c (signal_catch): Report the signal caught in the error
17019 message. Call fatal directly.
17020 * typeck2.c (ack, my_friendly_assert): Delete.
17021 (my_friendly_abort): Rename to friendly_abort. Expect file,
17022 line, and function parameters. Report the abort code, then
17023 call fancy_abort. Do not mask an abort if errors have
17024 already occurred.
17025
17026 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
17027
17028 * typeck.c (comp_target_parms): Remove obsolete parameter.
17029 (comp_target_types): Adjust.
17030
17031 2000-07-17 Jason Merrill <jason@redhat.com>
17032
17033 * typeck.c (mark_addressable): Never set TREE_USED.
17034 * call.c (build_call): Don't abort on calls to library functions
17035 that have been declared normally.
17036
17037 * typeck.c (build_binary_op): Fix grammar in warning.
17038
17039 * exception.cc (__eh_free): Fix prototype.
17040
17041 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
17042
17043 * decl.c (pushdecl): Handle seeing an OVERLOAD in
17044 IDENTIFIER_NAMESPACE_VALUE.
17045
17046 2000-07-16 Mark Mitchell <mark@codesourcery.com>
17047
17048 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
17049 * method.c (use_thunk): Correct handling of vcall offsets.
17050
17051 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
17052
17053 * .cvsignore: parse.h and parse.c have no cp- prefix.
17054
17055 2000-07-13 Mark Mitchell <mark@codesourcery.com>
17056
17057 * .cvsignore: New file.
17058
17059 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
17060
17061 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
17062
17063 2000-07-12 Mark Mitchell <mark@codesourcery.com>
17064
17065 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
17066 * parse.c: Remove.
17067 * parse.h: Likewise.
17068
17069 2000-07-11 Mark Mitchell <mark@codesourcery.com>
17070
17071 * class.c (layout_class_type): Add pointers to virtual bases after
17072 base classes under the old ABI.
17073
17074 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
17075
17076 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
17077 (finish_continue_stmt): Likewise.
17078 (begin_for_stmt): Remove call to note_level_for_for.
17079 (finish_goto_stmt): Change call from build_min_nt
17080 to build_stmt.
17081 (finish_expr_stmt): Likewise.
17082 (begin_if_stmt): Likewise.
17083 (begin_while_stmt): Likewise.
17084 (finish_while_stmt): Likewise.
17085 (finish_return_stmt): Likewise.
17086 (begin_for_stmt): Likewise.
17087 (finish_for_stmt): Likewise.
17088 (finish_break_stmt): Likewise.
17089 (begin_switch_stmt): Likewise.
17090 (finish_case_label): Likewise.
17091 (genrtl_try_block): Likewise.
17092 (begin_try_block): Likewise.
17093 (begin_handler): Likewise.
17094 (begin_compound_stmt): Likewise.
17095 (finish_asm_stmt): Likewise.
17096 (finish_label_stmt): Likewise.
17097 (add_decl_stmt): Likewise.
17098 (finish_subobject): Likewise.
17099 (finish_decl_cleanup): Likewise.
17100 (finish_named_return_value): Likewise.
17101 (setup_vtbl_ptr): Likewise.
17102 (add_scope_stmt): Likewise.
17103 * decl.c (finish_constructor_body): Likewise.
17104 (finish_destructor_body): Likewise.
17105 * optimize.c (copy_body_r): Likewise.
17106 (initialize_inlined_parameters): Likewise.
17107 (declare_return_variable): Likewise.
17108 (expand_call_inline): Likewise.
17109
17110 2000-07-10 Jakub Jelinek <jakub@redhat.com>
17111
17112 * semantics.c (expand_body): Sync interface information
17113 at the end of function body expansion.
17114
17115 2000-07-09 Jason Merrill <jason@redhat.com>
17116
17117 * init.c (build_new_1): Bail early if the call to new fails.
17118
17119 * decl.c (compute_array_index_type): Check specifically for
17120 an INTEGER_CST, not just TREE_CONSTANT.
17121
17122 * decl.c (duplicate_decls): Don't call duplicate_decls on
17123 the DECL_TEMPLATE_RESULT.
17124 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17125 codes.
17126
17127 * error.c (dump_template_bindings): Don't crash if we had an
17128 invalid argument list.
17129
17130 * typeck.c (c_expand_start_case): Do narrowing here.
17131 * semantics.c (finish_switch_cond): Not here.
17132
17133 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
17134
17135 * parse.y (asm_clobbers): Do string concatenation.
17136
17137 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17138
17139 * decl.c (pushtag): Don't put local classes in template functions
17140 on the local_classes list.
17141
17142 2000-07-04 Scott Snyder <snyder@fnal.gov>
17143
17144 * decl2.c (get_guard): Add missing return for old ABI local
17145 variable case.
17146
17147 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17148
17149 * cp-tree.h (char_type_p): New function.
17150 * decl.c (init_decl_processing): Don't initialize
17151 signed_wchar_type_node or unsigned_wchar_type_node.
17152 (complete_array_type): Handle brace-enclosed string-constants.
17153 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17154 * tree.c (char_type_p): New function.
17155 * typeck2.c (digest_init): Use char_type_p.
17156
17157 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17158
17159 * pt.c (tsubst): Don't layout type, if it's error_mark.
17160
17161 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17162
17163 * pt.c (instantiate_pending_templates): Reset template level.
17164
17165 2000-07-05 Jason Merrill <jason@redhat.com>
17166
17167 * call.c (joust): Don't complain about `operator char *()' beating
17168 `operator const char *() const'.
17169
17170 2000-07-04 scott snyder <snyder@fnal.gov>
17171 Jason Merrill <jason@redhat.com>
17172
17173 * repo.c (repo_get_id): Handle the case where a class with virtual
17174 bases has a null TYPE_BINFO_VTABLE.
17175
17176 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
17177 Jason Merrill <jason@redhat.com>
17178
17179 * parse.y (member_init): Just pass in the type.
17180 * init.c (expand_member_init): Handle getting a type.
17181
17182 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17183 Jason Merrill <jason@redhat.com>
17184
17185 * decl.c (finish_function): Warn if a function has no return
17186 statement.
17187 Suggested by Andrew Koenig.
17188 * typeck.c (check_return_expr): Do set current_function_returns_value
17189 if we got an error_mark_node.
17190
17191 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17192
17193 * decl2.c (push_decl_namespace): Push the original namespace.
17194
17195 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17196
17197 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17198 * semantics.c (begin_class_definition): Clear it.
17199
17200 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
17201
17202 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17203 (genrtl_expr_stmt): Likewise.
17204 (genrtl_decl_stmt): Likewise.
17205 (genrtl_if_stmt): Likewise.
17206 (genrtl_while_stmt): Likewise.
17207 (genrtl_do_stmt): Likewise.
17208 (genrtl_return_stmt): Likewise.
17209 (genrtl_for_stmt): Likewise.
17210 (genrtl_break_stmt): Likewise.
17211 (genrtl_continue_stmt): Likewise.
17212 (genrtl_scope_stmt): Likewise.
17213 (genrtl_switch_stmt): Likewise.
17214 (genrtl_case_label): Likewise.
17215 (genrtl_begin_compound_stmt): Likewise.
17216 (genrtl_finish_compound_stmt): Likewise.
17217 (genrtl_compound_stmt): Likewise.
17218 (genrtl_asm_stmt): Likewise.
17219
17220 * init.c (begin_init_stmts): Remove call to
17221 genrtl_begin_compound_stmt.
17222 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17223
17224 * semantics.c (lang_expand_stmt): Changed call to
17225 genrtl_compound_stmt to ignore return value.
17226
17227 2000-07-02 Mark Mitchell <mark@codesourcery.com>
17228
17229 * mangle.c (canonicalize_for_substitution): Return the canonical
17230 variant of a type.
17231
17232 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17233 TYPE_DECL.
17234 * typeck.c (commonparms): Remove obstack manipulations.
17235
17236 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
17237
17238 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17239
17240 * Makefile.in (OBJS): Added ../c-semantics.o.
17241 (OBJDEPS): Likewise.
17242
17243 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17244 ../c-common.h.
17245 (struct stmt_tree): Added comment.
17246 (current_function_name_declared): Removed.
17247 (stmts_are_full_exprs_p): Likewise.
17248 (genrtl_do_pushlevel): Likewise.
17249 (genrtl_clear_out_block): Likewise.
17250 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17251 (DECL_ANON_UNION_ELEMS): Likewise.
17252 (emit_local_var): Likewise.
17253 (make_rtl_for_local_static): Likewise.
17254 (do_case): Likewise.
17255 (expand_stmt): Likewise.
17256 (genrtl_decl_cleanup): Likewise.
17257 (c_expand_asm_operands): Likewise.
17258 (c_expand_return): Likewise.
17259 (c_expand_start_case): Likewise.
17260
17261 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17262 (emit_local_var): Likewise.
17263 (initialize_local_var): Change reference to
17264 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17265 Change reference to stmts_are_full_exprs_p to
17266 current_stmt_tree->stmts_are_full_exprs_p.
17267 (push_cp_function_context): Likewise.
17268
17269 * expect.c (expand_throw): Change reference to
17270 stmts_are_full_exprs_p.
17271
17272 * init.c (build_aggr_init): Change reference to
17273 stmts_are_full_exprs_p.
17274 (build_vec_init): Likewise.
17275
17276 * optimize.c (maybe_clone_body): Change reference to
17277 current_function_name_declared to
17278 cp_function_chain->name_declared.
17279
17280 * pt.c (instantiate_decl): Change reference to
17281 current_function_name_declared to
17282 cp_function_chain->name_declared.
17283
17284 * semantics.c (expand_cond): Moved declaration to c-common.h.
17285 (genrtl_do_pushlevel): Moved to c-semantics.c.
17286 (genrtl_clear_out_block): Likewise.
17287 (genrtl_goto_stmt): Likewise.
17288 (genrtl_expr_stmt): Likewise.
17289 (genrtl_decl_stmt): Likewise.
17290 (gerntl_if_stmt): Likewise.
17291 (genrtl_while_stmt): Likewise.
17292 (genrtl_do_stmt): Likewise.
17293 (genrtl_return_stmt): Likewise.
17294 (genrtl_for_stmt): Likewise.
17295 (genrtl_break_stmt): Likewise.
17296 (genrtl_continue_stmt): Likewise.
17297 (genrtl_scope_stmt): Likewise.
17298 (genrtl_switch_stmt): Likewise.
17299 (genrtl_case_label): Likewise.
17300 (genrtl_begin_compound_stmt): Likewise.
17301 (genrtl_finish_compound_stmt): Likewise.
17302 (genrtl_compound_stmt): Likewise.
17303 (genrtl_asm_stmt): Likewise.
17304 (genrtl_decl_cleanup): Likewise.
17305 (expand_cond): Likewise.
17306 (expand_stmt): Renamed to ...
17307 (lang_expand_stmt): ... this.
17308 (lang_expand_expr_stmt): Initialize.
17309 (set_current_function_name_declared): Likewise.
17310 (stmts_are_full_exprs_p): Likewise.
17311 (current_function_name_declared): Likewise.
17312 (anon_aggr_type_p): Likewise.
17313 (do_poplevel): Change reference to
17314 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17315 Change reference to stmts_are_full_exprs_p to
17316 current_stmt_tree->stmts_are_full_exprs_p.
17317 (add_tree): Likewise.
17318 (finish_expr_stmt): Likewise.
17319 (prep_stmt): Likewise.
17320 (lang_expand_stmt): Likewise.
17321 (begin_compound_stmt): Change reference to
17322 current_function_name_declared to
17323 cp_function_chain->name_declared and call to
17324 current_function_name_declared().
17325 (setup_vtbl_ptr): Likewise.
17326 (genrtl_do_poplevel): Removed.
17327
17328 2000-06-30 Jason Merrill <jason@redhat.com>
17329
17330 * init.c (init_init_processing): Go back to aligning like
17331 double_type_node for old ABI.
17332 (get_cookie_size): Make cookie larger if we get a type that needs
17333 more alignment.
17334 (build_vec_delete): Call it.
17335
17336 * typeck.c (qualify_type_recursive): New fn.
17337 (composite_pointer_type): Use it.
17338 (build_binary_op): Use composite_pointer_type.
17339
17340 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
17341 Jason Merrill <jason@redhat.com>
17342
17343 * typeck.c (check_return_expr): Don't complain about returning
17344 NULL from operator new if -fcheck-new.
17345 * cp-tree.h: Declare flag_check_new here.
17346 * init.c: Not here.
17347
17348 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17349
17350 * mangle.c (find_substitution): Use same_type_p.
17351 (write_encoding): Don't check for substitutions.
17352
17353 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17354
17355 * parse.y (expr_no_comma_rangle): New non-terminal.
17356 (template_parm): Use it for default parameter case.
17357 (template_arg): Use it.
17358 (expr_no_commas): Remove commented out undefined extensions.
17359 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17360 * parse.h, parse.c: Rebuilt.
17361
17362 2000-06-30 Mark Mitchell <mark@codesourcery.com>
17363
17364 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17365 (finish_asm_stmt): Do it here, instead.
17366
17367 * cp-tree.h (ridpointers): Don't declare.
17368 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17369 (record_builtin_java_type): Likewise.
17370 (init_decl_processing): Likewise.
17371 * lex.c: Move inclusion of lex.h.
17372 (ridpointers): Don't define.
17373 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
17374 RID_MAX.
17375 * lex.h (enum rid): Rename to ...
17376 (enum cp_rid): ... this.
17377 (ridpointers): Don't declare.
17378 * parse.y: Move inclusion of lex.h.
17379 * parse.c: Regenerated.
17380 * spew.c: Move inclusion of lex.h.
17381
17382 * cp-tree.h (struct language_function): Remove temp_name_counter.
17383 (temp_name_counter): Remove.
17384 (get_temp_name): Change prototype.
17385 (get_guard): New function.
17386 (get_guard_cond): Likewise.
17387 (set_guard): Likewise.
17388 * cvt.c (build_up_reference): Adjust call to get_temp_name.
17389 * decl.c (expand_static_init): Use get_guard and friends to
17390 implement guard variables.
17391 * decl2.c (get_temp_name): Assume that the variables created are
17392 always static.
17393 (get_sentry): Rename to ...
17394 (get_guard): ... this. Implement new ABI guard variables.
17395 (get_guard_bits): New function.
17396 (get_guard_cond): Likewise.
17397 (set_guard): Likewise.
17398 (start_static_initialization_or_destruction): Use them.
17399 (do_static_initialization): Replace sentry with guard throughout.
17400 (do_static_destruction): Likewise.
17401 * init.c (create_temporary_var): Add comment.
17402
17403 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17404
17405 * mangle.c (find_substitution): Use same_type_p.
17406 (write_encoding): Don't check for substitutions.
17407
17408 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17409
17410 * parse.y (expr_no_comma_rangle): New non-terminal.
17411 (template_parm): Use it for default parameter case.
17412 (template_arg): Use it.
17413 (expr_no_commas): Remove commented out undefined extensions.
17414 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17415 * parse.h, parse.c: Rebuilt.
17416
17417 2000-06-29 Mark Mitchell <mark@codesourcery.com>
17418
17419 * cp-tree.h (flag_const_strings): Remove.
17420 (warn_parentheses): Likewise.
17421 (warn_format): Likewise.
17422 (common_type): Likewise.
17423 (default_conversion): Likewise.
17424 (build_binary_op): Likewise.
17425 (cp_build_binary_op): New macro.
17426 * call.c (build_new_op): Use cp_build_binary_op instead of
17427 build_binary_op.
17428 * class.c (build_vtable_entry_ref): Likewise.
17429 * decl.c (expand_static_init): Likewise.
17430 (compute_array_index_type): Likewise.
17431 (build_enumerator): Likewise.
17432 * decl2.c (delete_sanity): Likewise.
17433 (start_static_initialization_or_destruction): Likewise.
17434 * error.c (dump_type_suffix): Likewise.
17435 * init.c (resolve_offset_ref): Likewise.
17436 (build_new): Likewise.
17437 (build_new_1): Likewise.
17438 (build_vec_delete_1): Likewise.
17439 (build_vec_init): Likewise.
17440 (build_delete): Likewise.
17441 * rtti.c (synthesize_tinfo_fn): Likewise.
17442 (synthesize_tinfo_var): Likewise.
17443 * search.c (expand_upcast_fixups): Likewise.
17444 (fixup_all_virtual_upcast_offsets): Likewise.
17445 * typeck.c (build_array_ref): Likewise.
17446 (get_member_function_from_ptrfunc): Likewise.
17447 (build_binary_op): Add parameter.
17448 (pointer_int_sum): Use cp_build_binary_op.
17449 (pointer_diff): Likewise.
17450 (build_modify_expr): Likewise.
17451 (get_delta_difference): Likewise.
17452 (build_ptrmemfunc): Likewise.
17453
17454 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
17455
17456 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17457 * decl.c (create_implicit_typedef): Adjust.
17458 * decl2.c (build_artificial_parm): Adjust.
17459 * method.c (implicitly_declare_fn): Adjust.
17460 * pt.c (push_inline_template_parms_recursive): Adjust.
17461 (process_template_parm): Adjust.
17462 (overloaded_template_name): Adjust.
17463 * semantics.c (finish_template_template_parm): Adjust.
17464
17465 2000-06-28 Mark Mitchell <mark@codesourcery.com>
17466
17467 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17468 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17469 where to emit thunks.
17470 (build_vtt): Adjust call to build_vtt_inits.
17471 (build_vtt_inits): Add parameter to indicate whether or not
17472 sub-VTTs for virtual bases should be included. Adjust handling of
17473 construction vtables.
17474 (get_matching_base): New function.
17475 (dfs_build_vtt_inits): Rename to ...
17476 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17477 construction vtables.
17478 (dfs_fixup_binfo_vtbls): Likewise.
17479 (build_ctor_vtbl_groups): Build construction vtables for virtual
17480 bases, too.
17481 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17482 to build construction vtbls.
17483 (dfs_accumulate_vtbl_inits): Adjust handling of
17484 construction vtables.
17485
17486 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17487 types correctly.
17488
17489 2000-06-27 Mark Mitchell <mark@codesourcery.com>
17490
17491 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17492
17493 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17494
17495 * search.c (hides): Remove.
17496 (is_subobject_of_p): Add most_derived parameter. Use
17497 CANONICAL_BINFO.
17498 (lookup_field_queue_p): Adjust.
17499 (lookup_field_r): Adjust.
17500
17501 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17502
17503 * decl2.c (handle_class_head): Bash typedefs to the type's main
17504 decl.
17505
17506 2000-06-25 Mark Mitchell <mark@codesourcery.com>
17507
17508 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17509 (begin_global_stmt_expr): ... this.
17510 (genrtl_finish_stmt_expr): Rename to ...
17511 (finish_global_stmt_expr): ... this.
17512 * init.c (begin_init_stmts): Adjust calls.
17513 (finish_init_stmts): Likewise.
17514 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17515 (begin_global_stmt_expr): ... this.
17516 (genrtl_finish_stmt_expr): Rename to ...
17517 (finish_global_stmt_expr): ... this.
17518
17519 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17520
17521 * search.c (lookup_member): Fix typo in comment.
17522
17523 2000-06-24 Jason Merrill <jason@redhat.com>
17524
17525 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17526 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17527
17528 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17529
17530 * parse.y (complex_direct_notype_declarator): Support global_scope.
17531 * Makefile.in: Adjust conflict count.
17532
17533 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17534
17535 * parse.y (template_arg): Convert TEMPLATE_DECL
17536 that is a template template parameter to
17537 TEMPLATE_TEMPLATE_PARM here.
17538
17539 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17540 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17541 (copy_template_template_parm): Adjust prototype.
17542 * decl.c (grokdeclarator): Remove dead code.
17543 * pt.c (process_template_parm): Tidy.
17544 (lookup_template_class): Construct nodes in
17545 copy_template_template_parm.
17546 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17547 lookup_template_class. Use TYPE_TI_TEMPLATE.
17548 * tree.c (copy_template_template_parm): Add NEWARGS
17549 parameter.
17550 (mapcar): Adjust call to copy_template_template_parm.
17551 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17552 * method.c (build_template_template_parm_names): Change error
17553 code to avoid compilation warning.
17554
17555 * gxxint.texi: Document template template parameter
17556 name mangling.
17557
17558 2000-06-21 Alex Samuel <samuel@codesourcery.com>
17559
17560 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17561 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17562 (cp-demangle.o): New rule.
17563 (dyn-string.o): Likewise.
17564 * inc/cxxabi.h (__cxa_demangle): New declaration.
17565
17566 2000-06-22 Mark Mitchell <mark@codesourcery.com>
17567
17568 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17569 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17570 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
17571 a tree, not an int.
17572 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17573 (make_thunk): Change prototype.
17574 (emit_thunk): Rename to use_thunk.
17575 (mangle_thunk): Change prototype.
17576 * class.c (get_derived_offset): Simplify.
17577 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17578 BV_GENERATE_THUNK_WITH_VTABLE_P.
17579 (build_primary_vtable): Simplify.
17580 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17581 (dfs_find_base): Remove.
17582 (update_vtable_entry_for_fn): Correct bug in finding the base
17583 where a virtual function was first declared. Figure out whether
17584 or not to emit a vcall-thunk with the vtables in which it appears.
17585 Correct logic for deciding whether to use an ordinary thunk, or a
17586 vcall thunk.
17587 (finish_struct_1): Remove unnecssary code.
17588 (build_vtbl_initializer): Use ssize_int for the running counter of
17589 negative indices.
17590 (build_vtbl_initializer): Only use vcall thunks where necessary.
17591 Mark thunks as needing to be emitted with their vtables, or not.
17592 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17593 indices. Use size_binop.
17594 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17595 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
17596 size_binop.
17597 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17598 (build_vtable_entry): Mark thunks as needing to be emitted with
17599 their vtables, or not.
17600 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17601 * decl2.c (mark_vtable_entries): Use use_thunk instead of
17602 emit_thunk.
17603 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
17604 information.
17605 * error.c (dump_expr): Use BV_FN.
17606 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17607 not an int.
17608 * method.c (make_thunk): Likewise.
17609 (emit_thunk): Rename to use_thunk. Allow callers to decide
17610 whether or not to actually emit the thunk. Adjust for changes in
17611 representation of vcall offsets.
17612 * search.c (dfs_get_pure_virtuals): Use BV_FN.
17613 * semantics.c (emit_associated_thunks): New function.
17614 (expand_body): Use it.
17615 * ir.texi: Adjust decriptions of thunks.
17616
17617 2000-06-22 Jason Merrill <jason@redhat.com>
17618
17619 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17620 (tsubst_friend_function): Copy it here.
17621
17622 * decl.c (grok_op_properties): Fix typo.
17623
17624 * decl2.c (delete_sanity): Clarify warning, avoid failure on
17625 deleting void*.
17626
17627 * pt.c (check_explicit_specialization): Clarify error.
17628
17629 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17630 an old OVERLOAD when we're declaring a non-function.
17631 (pushdecl, destroy_local_var): Check for error_mark_node.
17632 (warn_extern_redeclared_static): Also bail early if
17633 we're a CONST_DECL.
17634 (push_overloaded_decl): Ignore an old error_mark_node.
17635
17636 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
17637
17638 * call.c (build_x_va_arg): Check if in a template decl.
17639 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17640
17641 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17642
17643 * class.c (push_lang_context): TYPE_NAME gets you to the Java
17644 types DECLs.
17645 * decl.c (check_goto): Computed gotos assumed OK.
17646
17647 2000-06-20 Jason Merrill <jason@redhat.com>
17648
17649 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17650 for which we don't need to look for instantiations.
17651
17652 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
17653
17654 * parse.y (program): Always call finish_translation_unit.
17655 * parse.c, parse.h: Rebuilt.
17656
17657 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
17658
17659 * method.c: Don't include hard-reg-set.h.
17660
17661 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17662
17663 * rtti.c (get_base_offset): Cope when vbase field is in a base.
17664
17665 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17666
17667 * call.c (build_conditional_expr): Use VOID_TYPE_P.
17668 * cvt.c (cp_convert_to_pointer): Likewise.
17669 (convert_to_void): Likewise.
17670 * error.c (dump_expr): Likewise.
17671 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17672 * init.c (build_delete): Likewise.
17673 * method.c (emit_thunk): Likewise.
17674 * optmize.c (declare_return_variable): Likewise.
17675 * rtti.c (get_tinfo_decl_dynamic): Likewise.
17676 (get_typeid): Likewise.
17677 (build_dynamic_cast_1): Likewise.
17678 * typeck.c (composite_pointer_type): Likewise.
17679 (common_type): Likewise.
17680 (build_indirect_ref): Likewise.
17681 (build_binary_op): Likewise.
17682 (build_x_compound_expr): Likewise.
17683 (check_return_expr): Likewise.
17684 * typeck2.c (add_exception_specifier): Likewise.
17685
17686 * mangle.c (write_method_parms): Use direct comparison for end
17687 of parmlist.
17688
17689 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
17690
17691 * cp-tree.h (genrtl_try_block): Declare function.
17692 (genrtl_handler): Likewise.
17693 (genrtl_catch_block): Likewise.
17694 (genrtl_ctor_stmt): Likewise.
17695 (genrtl_subobject): Likewise.
17696 (genrtl_decl_cleanup): Likewise.
17697 (genrtl_do_poplevel): Likewise.
17698 (genrtl_do_pushlevel): Likewise.
17699 (genrtl_clear_out_block): Likewise.
17700 (genrtl_goto_stmt): Likewise.
17701 (genrtl_expr_stmt): Likewise.
17702 (genrtl_decl_stmt): Likewise.
17703 (genrtl_if_stmt): Likewise.
17704 (genrtl_while_stmt): Likewise.
17705 (genrtl_do_stmt): Likewise.
17706 (genrtl_return_stmt): Likewise.
17707 (genrtl_for_stmt): Likewise.
17708 (genrtl_break_stmt): Likewise.
17709 (genrtl_continue_stmt): Likewise.
17710 (genrtl_scope_stmt): Likewise.
17711 (genrtl_switch_stmt): Likewise.
17712 (genrtl_case_label): Likewise.
17713 (genrtl_begin_compound_stmt): Likewise.
17714 (genrtl_finish_compound_stmt): Likewise.
17715 (genrtl_compound_stmt): Likewise.
17716 (genrtl_asm_stmt): Likewise.
17717 (genrtl_named_return_value): Likewise.
17718 (genrtl_begin_stmt_expr): Likewise.
17719 (genrtl_finish_stmt_expr): Likewise.
17720 (finish_for_stmt): Removed first argument.
17721 (finish_switch_stmt): Likewise.
17722
17723 * semantics.c (genrtl_try_block): Define function.
17724 (genrtl_handler): Likewise.
17725 (genrtl_catch_block): Likewise.
17726 (genrtl_ctor_stmt): Likewise.
17727 (genrtl_subobject): Likewise.
17728 (genrtl_decl_cleanup): Likewise.
17729 (genrtl_do_poplevel): Likewise.
17730 (genrtl_do_pushlevel): Likewise.
17731 (genrtl_clear_out_block): Likewise.
17732 (genrtl_goto_stmt): Likewise.
17733 (genrtl_expr_stmt): Likewise.
17734 (genrtl_decl_stmt): Likewise.
17735 (genrtl_if_stmt): Likewise.
17736 (genrtl_while_stmt): Likewise.
17737 (genrtl_do_stmt): Likewise.
17738 (genrtl_return_stmt): Likewise.
17739 (genrtl_for_stmt): Likewise.
17740 (genrtl_break_stmt): Likewise.
17741 (genrtl_continue_stmt): Likewise.
17742 (genrtl_scope_stmt): Likewise.
17743 (genrtl_switch_stmt): Likewise.
17744 (genrtl_case_label): Likewise.
17745 (genrtl_begin_compound_stmt): Likewise.
17746 (genrtl_finish_compound_stmt): Likewise.
17747 (genrtl_compound_stmt): Likewise.
17748 (genrtl_asm_stmt): Likewise.
17749 (genrtl_named_return_value): Likewise.
17750 (genrtl_begin_stmt_expr): Likewise.
17751 (genrtl_finish_stmt_expr): Likewise.
17752 (finish_for_stmt): Removed first argument and generate rtl
17753 specific code.
17754 (finish_switch_stmt): Likewise.
17755 (do_poplevel): Removed generate rtl specific code.
17756 (do_pushlevel): Likewise.
17757 (add_tree): Likewise.
17758 (finish_goto_stmt): Likewise.
17759 (finish_expr_stmt): Likewise.
17760 (begin_if_stmt): Likewise.
17761 (finish_if_stmt_cond): Likewise.
17762 (finish_then_clause): Likewise.
17763 (begin_else_clause): Likewise.
17764 (finish_else_clause): Likewise.
17765 (finish_if_stmt): Likewise.
17766 (clear_out_block): Likewise.
17767 (begin_while_stmt): Likewise.
17768 (finish_while_stmt_cond): Likewise.
17769 (finish_while_stmt): Likewise.
17770 (begin_do_stmt): Likewise.
17771 (finish_do_body): Likewise.
17772 (finish_do_stmt): Likewise.
17773 (finish_return_stmt): Likewise.
17774 (begin_for_stmt): Likewise.
17775 (finish_for_init_stmt): Likewise.
17776 (finish_for_cond): Likewise.
17777 (finish_for_expr): Likewise.
17778 (finish_break_stmt): Likewise.
17779 (finish_continue_stmt): Likewise.
17780 (begin_switch_stmt): Likewise.
17781 (finish_switch_cond): Likewise.
17782 (finish_case_label): Likewise.
17783 (begin_try_block): Likewise.
17784 (begin_function_try_block): Likewise.
17785 (finish_try_block): Likewise.
17786 (finish_cleanup_try_block): Likewise.
17787 (finish_cleanup): Likewise.
17788 (finish_function_try_block): Likewise.
17789 (finish_handler_sequence): Likewise.
17790 (finish_function_handler_sequence): Likewise.
17791 (begin_handler): Likewise.
17792 (finish_handler_parms): Likewise.
17793 (begin_catch_block): Likewise.
17794 (finish_handler): Likewise.
17795 (begin_compound_stmt): Likewise.
17796 (finish_compound_stmt): Likewise.
17797 (finish_asm_stmt): Likewise.
17798 (finish_label_stmt): Likewise.
17799 (finish_label_decl): Likewise.
17800 (finish_subobject): Likewise.
17801 (finish_decl_cleanup): Likewise.
17802 (finish_named_return_value): Likewise.
17803 (begin_stmt_expr): Likewise.
17804 (finish_stmt_expr): Likewise.
17805
17806 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17807 to call genrtl_expr_stmt when appropriate.
17808
17809 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17810 begin_compound_expr to call genrtl_begin_stmt_expr and
17811 genrtl_begin_compound_expr when appropriate.
17812 (finish_init_stmts): Changed calls to finish_compound_expr and
17813 finish_stmt_expr to call genrtl_finish_compound_expr and
17814 genrtl_finish_stmt_expr when appropriate.
17815 (expand_default_init): Changed call to finish_expr_stmt to call
17816 genrtl_expr_stmt when appropriate.
17817 (build_vec_init): Likewise.
17818
17819 * parse.y (simple_stmt): Removed first argument from call to
17820 finish_for_stmt. Removed first argument from call to
17821 finish_switch_stmt.
17822
17823 * parse.c: Regenerated.
17824
17825 * pt.c (tsubst_expr): Removed first argument from call to
17826 finish_for_stmt. Removed first argument from call to
17827 finish_switch_stmt.
17828
17829 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
17830
17831 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17832 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17833
17834 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17835 (cplus_tree_code_length[]): Likewise.
17836 (cplus_tree_code_name[]): Likewise.
17837 (init_parse): Added call to add_c_tree_codes. Changed
17838 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17839
17840 2000-06-16 Mark Mitchell <mark@codesourcery.com>
17841
17842 * cp-tree.h (finish_mem_initializers): Declare.
17843 (count_trees): Likewise.
17844 * parse.y (base_init): Use finish_mem_initializers.
17845 * semantics.c (finish_mem_initializers): New function.
17846
17847 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
17848 the number of trees.
17849 (n_trees): Remove.
17850 (count_trees): Don't use it.
17851
17852 2000-06-15 Jason Merrill <jason@redhat.com>
17853
17854 * tree.c (count_trees): New debugging function.
17855
17856 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17857 * init.c (build_member_call): Pull out the name of a DECL.
17858
17859 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17860 * semantics.c (expand_body): Push to TV_INTEGRATION here.
17861 * optimize.c (optimize_function): Not here.
17862 * pt.c (instantiate_decl): Push to TV_PARSE.
17863
17864 2000-06-15 Mark Mitchell <mark@codesourcery.com>
17865
17866 * cp-tree.h (struct language_function): Remove x_base_init_list
17867 and x_member_init_list.
17868 (current_base_init_list): Remove.
17869 (current_member_init_list): Likewise.
17870 (setup_vtbl_ptr): Change prototype.
17871 (emit_base_init): Likewise.
17872 (expand_member_init): Likewise.
17873 (reinit_parse_for_function): Remove.
17874 * decl.c (save_function_data): Don't clear x_base_init_list and
17875 x_member_init_list.
17876 (mark_language_function): Don't mark them.
17877 * init.c (perform_member_init): Tweak comment.
17878 (sort_member_init): Take the list of initializers as an argument.
17879 (sort_base_init): Likewise.
17880 (emit_base_init): Likewise.
17881 (expand_member_init): Return the initializer. Don't use global
17882 variables.
17883 * lex.c (reinit_parse_for_function): Remove.
17884 * method.c (build_template_parm_names): Correct substitution.
17885 (do_build_copy_constructor): Don't use current_member_init_list
17886 and current_base_init_list.
17887 (synthesize_method): Likewise.
17888 * parse.y (base_init): Split mem-initializers into
17889 base-initializers and field-initializers.
17890 (member_init_list): Build up the list here.
17891 (member_init): Return the initializer.
17892 (fn.depfn): Don't use reinit_parse_for_function.
17893 * parse.c: Regenerated.
17894 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17895 ERROR_MARK.
17896 (tsubst_expr): Don't use current_member_init_list
17897 and current_base_init_list.
17898 (tsubst_expr_values): Rename to ...
17899 (tsubst_initializer_list): ... this. Use convert_from_reference.
17900 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17901 and current_base_init_list.
17902 (begin_function_definition): Don't call reinit_parse_for_function.
17903
17904 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17905
17906 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17907 correctly.
17908
17909 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17910
17911 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
17912
17913 * cp-tree.h (IF_COND): Move to c-common.h.
17914 (THEN_CLAUSE): Likewise.
17915 (ELSE_CLAUSE): Likewise.
17916 (WHILE_COND): Likewise.
17917 (WHILE_BODY): Likewise.
17918 (DO_COND): Likewise.
17919 (DO_BODY): Likewise.
17920 (RETURN_EXPR): Likewise.
17921 (EXPR_STMT_EXPR): Likewise.
17922 (FOR_INIT_STMT): Likewise.
17923 (FOR_COND): Likewise.
17924 (FOR_EXPR): Likewise.
17925 (FOR_BODY): Likewise.
17926 (SWITCH_COND): Likewise.
17927 (SWITCH_BODY): Likewise.
17928 (CASE_LOW): Likewise.
17929 (CASE_HIGH): Likewise.
17930 (GOTO_DESTINATION): Likewise.
17931 (COMPOUND_BODY): Likewise.
17932 (ASM_CV_QUAL): Likewise.
17933 (ASM_STRING): Likewise.
17934 (ASM_OUTPUTS): Likewise.
17935 (ASM_INPUTS): Likewise.
17936 (ASM_CLOBBERS): Likewise.
17937 (DECL_STMT_DECL): Likewise.
17938 (STMT_EXPR_STMT): Likewise.
17939 (LABEL_STMT_LABEL): Likewise.
17940 (SCOPE_BEGIN_P): Likewise.
17941 (SCOPE_END_P): Likewise.
17942 (SCOPE_STMT_BLOCK): Likewise.
17943 (SCOPE_NULLIFIED_P): Likewise.
17944 (SCOPE_NO_CLEANUPS_P): Likewise.
17945 (SCOPE_PARTIAL_P): Likewise.
17946 (ASM_VOLATILE_P): Likewise.
17947 (STMT_LINENO): Likewise.
17948 (STMT_LINENO_FOR_FN_P): Likewise.
17949
17950 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17951 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17952 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17953 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17954 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17955
17956 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17957
17958 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17959 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17960
17961 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17962 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17963 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17964
17965 2000-06-14 Mark Mitchell <mark@codesourcery.com>
17966
17967 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17968 * class.c (dfs_find_final_overrider): Set it appropriately.
17969 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17970 avoid unneeded secondary vptrs.
17971
17972 2000-06-13 Jakub Jelinek <jakub@redhat.com>
17973
17974 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17975 (check_bitfield_decl, check_field_decl): Likewise.
17976 (build_vtbl_or_vbase_field, build_base_field): Likewise.
17977 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17978 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17979 (xfer_tag, finish_enum): Likewise.
17980 * decl2.c (finish_builtin_type): Likewise.
17981 * init.c (init_init_processing): Likewise.
17982 * pt.c (instantiate_class_template): Likewise.
17983 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17984 * cp-tree.h (struct lang_type): Add user_align member.
17985 (CLASSTYPE_USER_ALIGN): Define.
17986
17987 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
17988
17989 * Make-lang.in (c++.install-common): Install g++-cross in
17990 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17991 $(target_alias)-g++ and $(target_alias)-c++.
17992
17993 2000-06-12 Mark Mitchell <mark@codesourcery.com>
17994
17995 * class.c (vcall_offset_data_s): Add last_init and fns.
17996 (overrides): Rename to same_signature_p.
17997 (dfs_find_final_overrider): Adjust accordingly.
17998 (mark_overriders): Likewise.
17999 (warn_hidden): Likewise.
18000 (build_vtbl_initializer): Reorganize machinery for building things
18001 at negative offsets.
18002 (build_vcall_and_vbase_vtbl_entries): Likewise.
18003 (build_vbase_offset_vtbl_entries): Likewise.
18004 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
18005 offset entries. Do not create two entries for functions with the
18006 same signature.
18007 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
18008 (build_rtti_vtbl_entries): Reorganize machinery for building things
18009 at negative offsets.
18010
18011 * optimize.c (expand_call_inline): Don't recurse into the code
18012 used to initialize the parameters more than once.
18013
18014 2000-06-11 Mark Mitchell <mark@codesourcery.com>
18015
18016 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
18017 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
18018 (find_substitution): Only use the `Sa' substitution for
18019 std::allocator, not instantiations of it.
18020 (write_template_prefix): Move comment. Only use a TREE_LIST to
18021 represent substitutions for a member template.
18022 (write_array_type): Mangle array dimensions correctly.
18023 * optimize.c (maybe_clone_body): Copy more information from the
18024 cloned function.
18025 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
18026 on the regenerated declaration.
18027
18028 2000-06-11 Chip Salzenberg <chip@valinux.com>
18029 Mark Mitchell <mark@codesourcery.com>
18030
18031 * class.c (build_vtable): Clarify comment.
18032 (build_ctor_vtbl_group): Pass the most derived type to
18033 build_vtable.
18034
18035 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18036
18037 * decl2.c (compare_options): Don't needlessly cast away const-ness.
18038
18039 2000-06-10 Mark Mitchell <mark@codesourcery.com>
18040
18041 * decl.c (add_binding): Handle duplicate declarations of external
18042 variables.
18043
18044 2000-06-09 Chip Salzenberg <chip@valinux.com>
18045 Mark Mitchell <mark@codesourcery.com>
18046
18047 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
18048 argument.
18049 (write_signed_number): New macro.
18050 (write_unsigned_number): Likewise.
18051 (write_source_name): Use them.
18052 (write_number): Handle signed and unsigned values.
18053 (write_integer_cst): Use tree_int_cst_sgn, and use
18054 write_unsigned_number or write_signed_number as appropriate.
18055 (write_discriminator): Use write_unsigned_number or
18056 write_signed_number as appropriate.
18057 (write_template_arg_literal): Likewise.
18058 (write_array_type): Use tree_low_cst.
18059 (write_template_parm): Use write_unsigned_number or
18060 write_signed_number as appropriate.
18061 (write_substitution): Adjust call to write_number.
18062 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
18063 (write_expression): Handle non-type template arguments of
18064 reference type correctly.
18065 (mangle_thunk): Use write_signed_number.
18066
18067 2000-06-09 Chip Salzenberg <chip@valinux.com>
18068
18069 * mangle.c (find_substition): Don't mangle objects with typename
18070 substitutions (e.g. "cin" as "Si").
18071
18072 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
18073
18074 * call.c (add_candidate): Use ggc_alloc_cleared.
18075 * decl.c (lookup_label): Likewise.
18076 * lex.c (retrofit_lang_decl): Likewise.
18077
18078 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
18079
18080 * semantics.c (expand_body): Push to TV_EXPAND.
18081 * optimize.c (optimize_function): Push to TV_INTEGRATION.
18082 * decl.c (start_function): Always call announce_function.
18083
18084 * tinfo2.cc: Just declare abort.
18085
18086 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
18087
18088 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
18089 whenever @ is a symbolic name.
18090
18091 2000-06-08 Jakub Jelinek <jakub@redhat.com>
18092
18093 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
18094
18095 2000-06-07 Mark Mitchell <mark@codesourcery.com>
18096
18097 * decl.c (pushdecl): Look up functions by DECL_NAME, not
18098 DECL_ASSEMBLER_NAME.
18099
18100 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18101
18102 * decl2.c (c_language): Define.
18103
18104 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
18105
18106 * lex.c (lang_init_options): Tweak.
18107
18108 * decl2.c: Remove #inclusion of diagnostic.h
18109 (lang_decode_option): Move diagnostic formatting options to
18110 toplevel.
18111
18112 * lang-options.h: Remove documentation for diagnostic options.
18113
18114 * Makefile.in (lex.o): Depends upon diagnostic.h
18115
18116 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18117
18118 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18119 the same DECL_RESULT, it's not a redefinition.
18120 * pt.c (tsubst_decl): Remove code to handle illegal
18121 specializations.
18122
18123 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
18124
18125 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18126
18127 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
18128
18129 * search.c (maybe_suppress_debug_info): Don't check
18130 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18131
18132 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18133 here if extern_p.
18134
18135 Remember instantiation context in deferred instantiations.
18136 * cp-tree.h (struct tinst_level): Remove.
18137 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18138 * pt.c (current_tinst_level): Now a tree.
18139 (print_template_context, push_tinst_level, pop_tinst_level,
18140 tinst_for_decl): Adjust.
18141 (reopen_tinst_level): New fn.
18142 (init_pt): Register current_tinst_level as a root.
18143 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18144 of the pending templates list.
18145 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
18146 * lex.c (extract_interface_info): Adjust.
18147 * decl2.c (warn_if_unknown_interface): Adjust.
18148
18149 2000-06-05 Mark Mitchell <mark@codesourcery.com>
18150
18151 * class.c (indirect_primary_base_p): New function.
18152 (determine_primary_base): Use it.
18153
18154 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
18155
18156 Update new-abi dynamic cast algorithm.
18157 * tinfo.cc (__class_type_info::__dyncast_result): Add
18158 whole_details. Adjust constructor.
18159 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18160 Avoid unnecessary searching.
18161 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18162
18163 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18164
18165 * decl.c (init_decl_processing): Don't call record_component_aliases.
18166 * tree.c (build_cplus_array_type_1): Likewise.
18167
18168 2000-06-04 Mark Mitchell <mark@codesourcery.com>
18169
18170 * ir.texi: Correct typo.
18171 * mangle.c (write_expression): Handle non-type template arguments
18172 with reference type.
18173 * method.c (build_overload_value): Likewise.
18174 * pt.c (convert_nontype_argument): Explicitly represent conversion
18175 to a reference with an ADDR_EXPR.
18176 (unify): Always unify arguments in left-to-right order.
18177
18178 2000-06-03 Alex Samuel <samuel@codesourcery.com>
18179 Mark Mitchell <mark@codesourcery.com>
18180
18181 * Make-lang.in (CXX_SRCS): Add mangle.c.
18182 * Makefile.in (CXX_OBJS): Add mangle.o.
18183 (mangle.o): New rule.
18184
18185 * class.c (local_classes): New variable.
18186 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18187 (get_vtt_name): Use mangle_vtt_name for new ABI.
18188 (init_class_processing): Initialize local_classes.
18189 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18190 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18191 (std_identifier): New macro.
18192 (DECL_VOLATILE_MEMFUNC_P): New macro.
18193 (DECL_NAMESPACE_STD_P): Likewise.
18194 (local_classes): Declare.
18195 (get_mostly_instantiated_function_type): Declare.
18196 (init_mangle): Declare.
18197 (mangle_decl): Likewise.
18198 (mangle_type_string): Likewise.
18199 (mangle_type): Likewise.
18200 (mangle_typeinfo_for_type): Likewise.
18201 (mangle_typeinfo_string_for_type): Likewise.
18202 (mangle_vtbl_for_type): Likewise.
18203 (mangle_vtt_for_type): Likewise.
18204 (mangle_ctor_vtbl_for_type): Likewise.
18205 (mangle_thunk): Likewise.
18206 (mangle_conv_op_name_for_type): Likewise.
18207 (mangle_guard_variable): Likewise.
18208 * decl.c (pushtag): Keep track of local classes.
18209 (initialize_predefined_identifiers): Initialize std_identifier.
18210 (init_decl_processing): Use std_identifier.
18211 (start_decl): Don't treat instantiations as specializations.
18212 (grokdeclarator): Likewise.
18213 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
18214 name for fully-instantiated templates.
18215 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18216 destructors with the new ABI.
18217 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18218 (grokfield): Use mangle_type for new ABI.
18219 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18220 (get_sentry): Use mangle_guard_variable for new ABI.
18221 (start_static_initialization_or_destruction): Likewise.
18222 * expr.c (extract_aggr_init): Remove.
18223 (extract_scalar_init): Likewise.
18224 (extract_init): Remove #if 0'd code.
18225 * mangle.c: New function.
18226 * method.c (build_mangled_name): Assert not flag_new_abi.
18227 (build_static_name): Likewise.
18228 (build_decl_overload_real): Likewise.
18229 (build_typename_overload): Likewise.
18230 (build_overload_with_type): Likewise.
18231 (build_overload_name): Likewise.
18232 (get_ctor_vtbl_name): Likewise.
18233 (start_squangling): Likewise.
18234 (get_id_2): Likewise.
18235 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18236 (init_method): Call init_mangle for new ABI.
18237 (make_thunk): Call mangle_thunk for new ABI.
18238 * operators.def: Correct new ABI manglings for the `%' operator.
18239 Add `::' operator.
18240 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18241 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18242 (lookup_template_class): Call mangle_decl for new ABI.
18243 (get_mostly_instantiated_function_type): New function.
18244 (set_mangled_name_for_template_decl): Use it.
18245 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18246 the new ABI. Use mangle_conv_op_name_for_type for instantiated
18247 conversion op names.
18248 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18249 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18250 (tinfo_base_init): Likewise. Mangle typeinfo string name with
18251 mangle_typeinfo_string_for_type.
18252
18253 2000-06-03 Mark Mitchell <mark@codesourcery.com>
18254
18255 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18256 (INNERMOST_TEMPLATE_ARGS): New macro.
18257 (innermost_args): Remove.
18258 (get_innermost_template_args): New function.
18259 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18260 * error.c (dump_function_decl): Be caution when using
18261 most_general_template.
18262 * method.c (build_template_parm_names): Use
18263 INNERMOST_TEMPLATE_ARGS.
18264 * pt.c (add_to_template_args): Tidy comment
18265 (get_innermost_template_args): New function.
18266 (check_explicit_specialization): Clear DECL_INITIAL for a new
18267 specialization.
18268 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18269 Tidy.
18270 (push_template_decl): Always register specializations of the most
18271 general template.
18272 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18273 (coerce_template_parms): Likewise.
18274 (lookup_template_class): Likewise.
18275 (innermost_args): Remove.
18276 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18277 (tsubst_decl): Handle tricky specializations. Use
18278 get_innermost_template_args.
18279 (instantiate_template): Simplify handling of partial
18280 instantiations.
18281 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18282 (most_general_template): Reimplement, in a more straightforward
18283 manner.
18284 (regenerate_decl_from_template): Tweak formatting. Use
18285 TMPL_ARGS_DEPTH for clarity.
18286 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18287
18288 * dump.c (dequeue_and_dump): Dump information about thunks.
18289
18290 2000-06-01 Richard Henderson <rth@cygnus.com>
18291
18292 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18293
18294 2000-06-01 Richard Henderson <rth@cygnus.com>
18295
18296 * decl2.c (unsupported_options): Fix typo, make const.
18297 (lang_decode_option): Fix bsearch argument order.
18298
18299 2000-06-01 Mark Mitchell <mark@codesourcery.com>
18300
18301 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18302 on FIELD_DECLs.
18303
18304 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18305
18306 * cp-tree.h (c_get_alias_set): Deleted.
18307 * Makefile.in (decl.o): Include ../expr.h.
18308 * decl.c (expr.h): Include.
18309 (init_decl_processing): Call record_component_aliases for arrays.
18310 (grokdeclarator): Likewise.
18311 Set TREE_ADDRESSABLE for fields that aren't bitfields.
18312 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18313
18314 2000-05-31 Mark Mitchell <mark@codesourcery.com>
18315
18316 Remove guiding declaration support.
18317 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18318 (flag_guiding_decls): Remove.
18319 * call.c (build_user_type_conversion_1): Remove support for
18320 guiding decls.
18321 (build_new_function_call): Likewise.
18322 (build_new_op): Likewise.
18323 (build_new_method_call): Likewise.
18324 * decl.c (start_function): Likewise.
18325 * friend.c (is_friend): Likewise.
18326 (do_friend): Likewise.
18327 * decl2.c ((flag_dump_translation_unit): Make it const.
18328 (flag_guiding_decls): Remove.
18329 (unsupported_options): New variable
18330 (compare_options): New function.
18331 (lang_decode_option): Use them.
18332
18333 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18334
18335 * method.c (mangle_expression): Adjust test for legal expression
18336 operators.
18337
18338 * pt.c (instantiate_decl): Save and restore the local
18339 specializations list.
18340
18341 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
18342
18343 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18344
18345 2000-05-30 Mark Mitchell <mark@codesourcery.com>
18346
18347 * call.c (add_template_candidate_real): Handle member template
18348 constructors for classes with virtual bases.
18349 (build_user_type_conversion_1): Use in_charge_arg_for_name.
18350 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18351
18352 * ir.texi: Update thunk documentation.
18353
18354 * call.c (joust): Fix handling of overloaded builtin operators.
18355
18356 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
18357
18358 * cp-tree.h (DECL_ANTICIPATED): New macro.
18359 Document new use of DECL_LANG_FLAG_7.
18360 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18361 in the user namespace.
18362 * lex.c (do_identifier): If the identifier's declaration has
18363 DECL_ANTICIPATED on, it has not yet been declared. But do not
18364 replace it with an ordinary implicit declaration.
18365
18366 * tinfo2.cc: Include stdlib.h.
18367
18368 2000-05-29 Mark Mitchell <mark@codesourcery.com>
18369
18370 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18371 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18372 CLASSTYPE_ALIGN.
18373
18374 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
18375
18376 * decl2.c (lang_decode_option): Use skip_leading_substring instead
18377 of plain strncmp.
18378
18379 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
18380
18381 * operators.def (<?): Duplicated, should have been...
18382 (>?): this. Fixed.
18383
18384 2000-05-27 Alex Samuel <samuel@codesourcery.com>
18385 Mark Mitchell <mark@codesourcery.com>
18386
18387 * cp-tree.h (ansi_opname): Make it a macro.
18388 (ansi_assopname): Likewise.
18389 (struct lang_decl_flags): Add assignment_operator_p.
18390 (struct lang_decl): Add operator_code.
18391 (DECL_VTT_PARM): Adjust.
18392 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18393 overloaded operator.
18394 (SET_OVERLOADED_OPERATOR_CODE): New macro.
18395 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18396 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18397 (opname_tab): Remove.
18398 (assignop_tab): Likewise.
18399 (operator_name_info_t): New type.
18400 (operator_name_info): New variable.
18401 (assignment_operator_name_info): Likewise.
18402 (build_cp_library_fn): Remove declaration.
18403 (push_cp_library_fn): Likewise.
18404 (operator_name_string): Likewise.
18405 (build_decl_overload): Likewise.
18406 * call.c (print_z_candidates): Simplify.
18407 (build_object_call): Adjust usage of ansi_opname. Use
18408 DECL_OVERLOADED_OPERATOR_P.
18409 (op_error): Adjust operator name lookup.
18410 (build_conditional_expr): Adjust usage of ansi_opname.
18411 (build_new_op): Likewise.
18412 (build_op_delete_call): Likewise.
18413 (build_over_call): Likewise.
18414 (joust): Use DECL_OVERLOADED_OPERATOR_P.
18415 * decl.c (duplicate_decls): Copy operator_code.
18416 (init_decl_processing): Adjust parameters to push_cp_library_fn.
18417 (builtin_function): Adjust parameters to build_library_fn_1.
18418 (build_library_fn_1): Accept an overloaded operator code.
18419 (build_library_fn): Pass ERROR_MARK.
18420 (build_cp_library_fn): Accept an overloaded operator code.
18421 (push_cp_library_fn): Likewise.
18422 (grokfndecl): Tweak.
18423 (grokdeclarator): Simplify code to compute names of overloaded
18424 operators. Adjust use of ansi_opname.
18425 (ambi_op_p): Work on tree_codes, not identifiers.
18426 (unary_op_p): Likewise.
18427 (grok_op_properties): Likewise.
18428 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18429 (lang_mark_tree): Don't try to mark the operator_code.
18430 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18431 * error.c (dump_decl): Remove special handling for operator
18432 names.
18433 (dump_function_name): Likewise.
18434 (dump_expr): Adjust name lookup of operators.
18435 (op_to_string): Simplify.
18436 (assop_to_string): Likewise.
18437 * init.c (build_new_1): Adjust use of ansi_opname.
18438 * lex.c (opname_tab): Remove.
18439 (assignop_tab): Likewise.
18440 (ansi_opname): Likewise.
18441 (ansi_assopname): Likewise.
18442 (operator_name_string): Likewise.
18443 (reinit_lang_specific): Likewise.
18444 (operator_name_info): New variable.
18445 (assignment_operator_name_info): Likewise.
18446 (init_operators): New function.
18447 (init_parse): Use it.
18448 (do_identifier): Adjust use of ansi_opname.
18449 * method.c (mangle_expression): Don't use ansi_opname for
18450 mangling.
18451 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18452 (build_decl_overload): Remove.
18453 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18454 (do_build_assign_ref): Adjust use of ansi_opname.
18455 (synthesize_method): Likewise.
18456 (implicitly_declare_fn): Likewise.
18457 * operators.def: New file.
18458 * parse.y (operator): Adjust use of ansi_opname.
18459 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18460 (set_mangled_name_for_template_decl): Don't play games with
18461 current_namespace.
18462 (special_function_p): Adjust use of ansi_opname.
18463 * typeck.c (check_return_expr): Likewise.
18464 * Make-lang.in (cc1plus): Depend on operators.def.
18465 * Makefile.in (lex.o): Likewise.
18466 (decl.o): Likewise.
18467
18468 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
18469
18470 * Make-lang.in (cplib2.ready): Eradicate.
18471
18472 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18473
18474 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18475 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18476 (built_min, cp_tree_equal): Likewise.
18477
18478 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18479
18480 * class.c (layout_nonempty_base_or_field): Replace
18481 `record_layout_info' with `record_layout_info_s'.
18482
18483 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
18484
18485 Fix goto checking.
18486 * cp-tree.h (struct language_function): x_named_labels is now
18487 a struct named_label_list*.
18488 * decl.c (struct named_label_use_list): Renamed from...
18489 (struct named_label_list): ...this. New struct.
18490 (push_binding_level): Don't set eh_region.
18491 (note_level_for_eh): New fn.
18492 (pop_label): Take label and old value directly.
18493 (pop_labels): Adjust for new named_labels format.
18494 (lookup_label): Likewise.
18495 (poplevel): Note characteristics of a binding level containing a
18496 named label. Mess with named label lists earlier.
18497 (mark_named_label_lists): New fn.
18498 (mark_lang_function): Call it.
18499 (use_label): New fn, split out from...
18500 (make_label_decl): ...here. Don't call it.
18501 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18502 check_previous_gotos): New fns, split out from...
18503 (define_label): ...here.
18504 (check_switch_goto): New fn.
18505 (define_case_label): Call it.
18506 (check_goto): New fn.
18507 * semantics.c (finish_goto_stmt): Call it and use_label.
18508 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18509 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18510
18511 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18512
18513 * class.c (build_vtable_entry_ref): Correct usage of
18514 get_vtbl_decl_for_binfo.
18515
18516 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18517 * method.c (implicitly_declare_fn): Not here.
18518
18519 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
18520
18521 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18522 (CPTI_PTMD_DESC_TYPE): ... here.
18523 (ptmd_desc_type_node): Rename to ...
18524 (ptm_desc_type_node): ... here.
18525 * decl.c: Likewise.
18526 * rtti.c (ptmd_initializer): Rename to ...
18527 (ptm_initializer): ... here.
18528 (sythesize_tinfo_var): Adjust. Deal with pointer to member
18529 function.
18530 (create_tinfo_types): Adjust.
18531
18532 2000-05-25 Mark Mitchell <mark@codesourcery.com>
18533
18534 Finish implementation of VTTs.
18535 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18536 CPTI_VTT_PARM_IDENTIFIER.
18537 (vtt_parm_identifier): New macro.
18538 (vtt_parm_type): Likewise.
18539 (BINFO_SUBVTT_INDEX): Likewise.
18540 (BINFO_VPTR_INDEX): Likewise.
18541 (struct lang_decl): Add vtt_parm.
18542 (DECL_VTT_PARM): New macro.
18543 (DECL_USE_VTT_PARM): Likewise.
18544 (DECL_NEEDS_VTT_PARM_P): Likewise.
18545 (get_vtt_name): Declare.
18546 (build_artificial_parm): Likewise.
18547 (fixup_all_virtual_upcast_offsets): Likewise.
18548 (expand_indirect_vtbls_init): Remove.
18549 * call.c (build_new_method_call): Pass the vtt to subobject
18550 constructors and destructors.
18551 * class.c (get_vtt_name): Give it external linkage.
18552 (build_clone): Handle the magic VTT parameters for clones.
18553 (clone_function_decl): Fix typo in comment.
18554 (build_vtt): Keep track of the indices in the VTTs where various
18555 entities are stored.
18556 (build_vtt_inits): Likewise.
18557 (dfs_build_vtt_inits): Likewise.
18558 (build_ctor_vtbl_group): Tweak type of construction vtables.
18559 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18560 primary bases, when building construction vtables.
18561 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18562 (initialize_predefined_identifiers): Add vtt_parm_identifier.
18563 (init_decl_processing): Initialize vtt_parm_type.
18564 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18565 (lang_mark_tree): Make vtt_parm.
18566 * decl2.c (build_artificial_parm): New function.
18567 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
18568 (grokclassfn): Use build_artificial_parm.
18569 * init.c (initialize_vtbl_ptrs): Call
18570 fixup_all_virtual_upcast_offsets directly.
18571 (perform_member_init): Use the complete subobject destructor for
18572 member cleanups.
18573 (build_vtbl_address): New function.
18574 (expand_virtual_init): Handle VTTs.
18575 * optimize (maybe_clone_body): Likewise.
18576 * search.c (fixup_all_virtual_upcast_offsets): Give it external
18577 linkage.
18578 (expand_indirect_vtbls_init): Remove.
18579 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18580 * tree.c (make_binfo): Make them bigger.
18581
18582 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18583
18584 * inc/cxxabi.h (__pbase_type_info): Define, based on
18585 __pointer_type_info.
18586 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18587 (__pointer_to_member_type_info): Likewise.
18588 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18589 (__pointer_to_member_type_info::__is_pointer_p): Remove.
18590 (__pointer_type_info::__do_catch): Rename to ...
18591 (__pbase_type_info::__do_catch): ... here. Adjust.
18592 (__pbase_type_info::__pointer_catch): Implement.
18593 (__pointer_type_info::__pointer_catch): Adjust.
18594 (__pointer_to_member_type_info::__pointer_catch): Adjust.
18595
18596 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18597
18598 * tinfo.h (__user_type_info::contained_virtual_p): New
18599 predicate.
18600 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18601 shaped hierarchy.
18602 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18603 diamond shaped hierarchy. Add early out for mixed diamond and
18604 duplicate shaped hierarchy.
18605
18606 2000-05-24 Mark Mitchell <mark@codesourcery.com>
18607
18608 * cp-tree.h (build_delete): Change prototype.
18609 (build_vec_delete): Likewise.
18610 * call.c (build_scoped_method_call): Use special_function_kind
18611 values to indicate the kind of destruction to be done.
18612 (build_method_call): Likewise.
18613 * decl.c (finish_destructor_body): Likewise.
18614 (maybe_build_cleanup_1): Likewise. Rename to ...
18615 (maybe_build_cleanup): ... this.
18616 * decl2.c (delete_sanity): Use special_function_kind
18617 values to indicate the kind of destruction to be done.
18618 (build_cleanup): Likewise.
18619 * init.c (perform_member_init): Likewise.
18620 (build_vec_delete_1): Likewise.
18621 (build_dtor_call): Simplify.
18622 (build_delete): Use special_function_kind
18623 values to indicate the kind of destruction to be done.
18624 (build_vbase_delete): Likewise.
18625 (build_vec_delete): Likewise.
18626
18627 * init.c (sort_member_init): Fix typo in error message generation
18628 code.
18629
18630 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
18631
18632 * semantics.c (begin_class_definition): make the packed
18633 attribute be sensitive to the "-fpack-struct" command line flag
18634
18635 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
18636
18637 Update new-abi upcast algorithm.
18638 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18639 prototype and meaning of return value.
18640 (__si_class_type_info::__do_upcast): Likewise.
18641 (__vmi_class_type_info::__do_upcast): Likewise.
18642 * tinfo.cc (__class_type_info::__upcast_result): Replace
18643 whole2dst with part2dst. Adjust ctor.
18644 (__class_type_info::__do_upcast): Adjust call of worker function.
18645 (__class_type_info::__do_upcast): Adjust.
18646 (__si_class_type_info::__do_upcast): Adjust. Use parent's
18647 __do_upcast.
18648 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18649 virtual base in diamond hierarchy bug.
18650
18651 2000-05-23 Mark Mitchell <mark@codesourcery.com>
18652
18653 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18654 and bitfield to tinfo_fn_p.
18655 (DECL_TINFO_FN_P): Adjust.
18656 (SET_DECL_TINFO_FN_P): Likewise.
18657 (DECL_MUTABLE_P): Likewise.
18658 (DECL_C_BIT_FIELD): Likewise.
18659 (SET_DECL_C_BIT_FIELD): Likewise.
18660 (CLEAR_DECL_C_BIT_FIELD): Likewise.
18661 (DECL_UNINLINABLE): Likewise.
18662 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18663 (handle_using_decl): Remove assertion.
18664 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18665 to build FIELD_DECLs.
18666 (build_base_field): Likewise.
18667 (layout_class_type): Likewise.
18668 * decl.c (init_decl_processing): Likewise.
18669 (build_ptrmemfunc_type): Likewise.
18670 (grokdeclarator): Likewise.
18671 * decl2.c (grok_x_components): Likewise.
18672 * except.c (call_eh_info): Likewise.
18673 * init.c (init_init_processing): Likewise.
18674 * rtti.c (expand_class_desc): Likewise.
18675 (create_pseudo_type_info): Likewise.
18676 (get_vmi_pseudo_type_info): Likewise.
18677 (create_tinfo_types): Likewise.
18678 * ptree.c (print_lang_decl): Adjust.
18679 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18680 before checking DECL_MUTABLE_P.
18681
18682 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18683 parameters for template functions.
18684 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18685 destructors as well as constructors.
18686
18687 2000-05-22 Mark Mitchell <mark@codesourcery.com>
18688
18689 * class.c (build_ctor_vtbl_group): Set inits.
18690 * optimize.c (maybe_clone_body): Set DECL_INLINE and
18691 DECL_THIS_INLINE appropriately for clones.
18692
18693 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18694 (DECL_CONV_FN_P): Simplify.
18695 (DECL_OPERATOR): Remove.
18696 (language_to_string): Declare.
18697 * decl.c (duplicate_decls): Fix typo in comment.
18698 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18699 (grok_op_properties): Use DECL_CONV_FN_P instead of
18700 IDENTIFIER_TYPENAME_P.
18701 * dump.c (dequeue_and_dump): Dump the language linkage of
18702 declarations.
18703 * error.c (language_to_string): Give it external linkage.
18704 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18705 (implicitly_declare_fn): Set DECL_LANGUAGE.
18706 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18707 IDENTIFIER_TYPENAME_P.
18708 (tsubst_decl): Likewise.
18709 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18710 * semantics.c (finish_member_declaration): Don't mark members of
18711 classes declared in an extern "C" region as extern "C".
18712
18713 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18714
18715 * decl2.c (qualified_lookup_using_namespace): Look through
18716 namespace aliases.
18717
18718 * decl.c (push_using_decl): Return the old decl on namespace level.
18719
18720 2000-05-21 Mark Mitchell <mark@codesourcery.com>
18721
18722 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18723 (VTT_NAME_PREFIX): New macro.
18724 (CTOR_VTBL_NAME_PREFIX): Likewise.
18725 (get_ctor_vtbl_name): New function.
18726 * class.c (get_vtable_name): Simplify.
18727 (get_vtt_name): New function.
18728 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18729 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18730 when a virtual base becomes primary.
18731 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
18732 VTTs.
18733 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18734 additional parameters.
18735 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18736 (initialize_array): New function.
18737 (build_vtt): Likewise.
18738 (build_vtt_inits): Likewise.
18739 (dfs_build_vtt_inits): Likewise.
18740 (dfs_fixup_binfo_vtbls): Likewise.
18741 (build_ctor_vtbl_group): Likewise.
18742 (initialize_vtable): Use initialize_array.
18743 (accumulate_vtbl_inits): Reimplement to handle construction
18744 vtables.
18745 (dfs_accumulate_vtbl_inits): Likewise.
18746 (bulid_vtbl_initializer): Adjust parameter name.
18747 * method.c (build_typename_overload): Remove #if 0'd code.
18748 (get_ctor_vtbl_name): New function.
18749 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18750 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18751
18752 * cp-tree.h (struct lang_type): Remove search_slot.
18753 (CLASSTYPE_SEARCH_SLOT): Remove.
18754 (emit_base_init): Change prototype.
18755 (initialize_vtbl_ptrs): Likewise.
18756 (expand_indirect_vtbls_init): Likewise.
18757 (clear_search_slots): Remove.
18758 * decl.c (lang_mark_tree): Don't mark search_slot.
18759 * init.c (initialize_vtbl_ptrs): Simplify.
18760 (emit_base_init): Likewise.
18761 * search.c (struct vbase_info): Document decl_ptr.
18762 (convert_pointer_to_single_level): Remove.
18763 (dfs_find_vbases): Remove.
18764 (dfs_init_base_pointers): Simplify.
18765 (dfs_clear_vbase_slots): Remove.
18766 (dfs_vtable_path_unmark): New function.
18767 (init_vbase_pointers): Simplify.
18768 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18769 (expand_indirect_vtbls_init): Simplify. Don't call
18770 mark_all_temps_used.
18771 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18772 initialize_vtbl_ptrs.
18773
18774 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
18775
18776 * except.c: Add static prototypes.
18777
18778 2000-05-20 H.J. Lu <hjl@gnu.org>
18779
18780 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18781
18782 2000-05-19 Mark Mitchell <mark@codesourcery.com>
18783
18784 Don't create a separate copy of virtual bases for the
18785 CLASSTYPE_VBASECLASSES list.
18786 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18787 (BINFO_FOR_VBASE): Remove.
18788 (CANONICAL_BINFO): Adjust.
18789 (binfo_for_vbase): New function.
18790 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18791 instead of BINFO_FOR_VBASE.
18792 (build_vbase_pointer): Likewise.
18793 (build_secondary_vtable): Likewise.
18794 (dfs_mark_primary_bases): Likewise.
18795 (mark_primary_bases): Likewise.
18796 (layout_nonempty_base_or_field): Likewise.
18797 (dfs_set_offset_for_shared_vbases): Likewise.
18798 (dfs_set_offset_for_unshared_vbases): Likewise.
18799 (layout_virtual_bases): Likewise. Adjust for changes to the
18800 CLASSTYPE_VBASECLASSES list.
18801 (dump_class_hierarchy_r): Use binfo_for_vbase
18802 instead of BINFO_FOR_VBASE.
18803 (dump_class_hierarchy): Likewise.
18804 (finish_vtbls): Likewise.
18805 (build_vtbl_initializer): Adjust for changes to the
18806 CLASSTYPE_VBASECLASSES list.
18807 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18808 * decl.c (finish_destructor_body): Adjust for changes to the
18809 CLASSTYPE_VBASECLASSES list.
18810 * init.c (sort_base_init): Use binfo_for_vbase.
18811 (construct_virtual_bases): Adjust for changes to the
18812 CLASSTYPE_VBASECLASSES list.
18813 (expand_member_init): Use binfo_for_vbase.
18814 (build_vbase_delete): Adjust for changes to the
18815 CLASSTYPE_VBASECLASSES list.
18816 * method.c (do_build_copy_constructor): Likewise.
18817 * rtti.c (get_base_offset): Use binfo_for_vbase.
18818 (expand_class_desc): Remove #if 0'd code.
18819 * search.c (struct vbase_info): Remove vbase_types.
18820 (get_base_distance): Use binfo_for_vbase.
18821 (lookup_field_queue_p): Use CANONICAL_BINFO.
18822 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18823 (get_pure_virtuals): Adjust for changes to the
18824 CLASSTYPE_VBASECLASSES list.
18825 (dfs_find_vbases): Use binfo_for_vbase.
18826 (dfs_init_vbase_pointers): Likewise.
18827 (init_vbase_pointers): Don't initialize vi.vbase_types.
18828 (virtual_context): Use binfo_for_vbase.
18829 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18830 CLASSTYPE_VBASECLASSES list.
18831 (expand_indirect_vtbls_init): Simplify.
18832 (dfs_get_vbase_types): Don't replicate virtual bases.
18833 (find_vbase_instance): Use binfo_for_vbase.
18834 (binfo_for_vbase): New function.
18835 * typeck.c (get_delta_difference): Use binfo_for_vbase.
18836
18837 2000-05-17 Mark Mitchell <mark@codesourcery.com>
18838
18839 * decl2.c (finish_anon_union): Generalize error messages to handle
18840 anonymous structures.
18841 * init.c (perform_member_init): Remove `name' parameter.
18842 (build_field_list): New function.
18843 (sort_member_init): Handle anonymous union initialization order
18844 correctly. Check for multiple initializations of the same union.
18845 (emit_base_init): Don't look up fields by name here.
18846 (expand_member_init): Record the result of name lookup for future
18847 reference.
18848 * typeck.c (build_component_ref): Fix formatting.
18849
18850 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
18851
18852 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18853 * typeck.c (build_x_compound_expr): Replace warn_unused with
18854 warn_unused_value.
18855
18856 * decl2.c (lang_decode_option): Update -Wall unused flags by
18857 calling set_Wunused.
18858
18859 2000-05-16 Mark Mitchell <mark@codesourcery.com>
18860
18861 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18862 * init.c (dfs_vtable_path_unmark): Remove.
18863 * search.c (marked_new_vtable_p): Likewise.
18864 (unmarked_new_vtable_p): Likewise.
18865 (dfs_search_slot_nonempty_p): Likewise.
18866 (dfs_mark): Likewise.
18867 (dfs_vtable_path_unmark): Likewise.
18868 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18869 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18870 (dfs_init_vbase_pointers): Remove special-case new ABI code.
18871 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18872 (init_vbase_pointers): Simplify.
18873 (expand_indirect_vtbls_init): Likewise.
18874
18875 * class.c (copy_virtuals): New function.
18876 (build_primary_table): Use it.
18877 (build_secondary_vtable): Likewise.
18878 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18879 indicate that no vcall offset is required.
18880 (add_virtual_function): Likewise.
18881 (modify_all_vtables): Likewise.
18882 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18883 (dfs_accumulate_vtbl_inits): Likewise.
18884 (build_vtbl_initializer): Make changes to handle construction
18885 vtables.
18886 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18887 (build_rtti_vtbl_entries): Likewise.
18888 (build_vtable_entries): Handle a NULL vcall_index.
18889
18890 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
18891
18892 * decl2.c (lang_decode_option): Fix thinko.
18893
18894 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
18895
18896 * except.c (check_handlers): New fn.
18897 * cp-tree.h: Declare it.
18898 * semantics.c (finish_handler_sequence): Call it.
18899 (finish_function_handler_sequence): Likewise.
18900 (finish_handler_parms): Set TREE_TYPE on the handler.
18901 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18902 * search.c (get_base_distance_recursive): If protect>1, ignore
18903 special access.
18904 (get_base_distance): Don't reduce watch_access.
18905
18906 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
18907
18908 * lex.c: #include diagnostic.h.
18909 (lang_init_options): Set default prefixing rules.
18910
18911 * lang-options.h: Add -fdiagnostics-show-location=.
18912
18913 * decl2.c: #include diagnostic.h.
18914 (lang_decode_option): Handle -fdiagnostics-show-location=.
18915
18916 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
18917
18918 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18919 * vec.cc: Revert my 2000-05-07 change.
18920
18921 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
18922
18923 * class.c (check_field_decls): Complain about non-static data
18924 members with same name as class in class with constructor.
18925
18926 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
18927
18928 * decl.c (grokdeclarator): Allow non-static data members with
18929 same name as class.
18930
18931 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
18932
18933 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18934 and pending_inline.filename. Update prototypes.
18935 * decl.c (define_label): Constify filename parameter.
18936 * decl2.c (warn_if_unknown_interface): Constify local char *.
18937 * input.c Constify input_source.filename. Don't declare
18938 input_filename or lineno. Constify filename parameter to feed_input.
18939 * lex.c (init_parse): Constify parameter and return value.
18940 (cp_pragma_interface, cp_pragma_implementation): Constify
18941 filename argument.
18942 (reinit_parse_for_method, reinit_parse_for_block,
18943 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18944 Constify local char *.
18945 * pt.c: Don't declare lineno or input_filename.
18946 (print_template_context, tsubst_friend_function, tsubst_decl,
18947 tsubst, instantiate_decl): Constify local char *.
18948 * semantics.c (expand_body): Constify local char *.
18949 * tree.c (build_srcloc): Constify filename parameter.
18950 * typeck.c (c_expand_asm_operands): Constify filename
18951 parameter.
18952
18953 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
18954
18955 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18956 offsetof expansion.
18957
18958 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
18959
18960 * inc/cxxabi.h: Fix typos in comment.
18961 (__base_class_info::__offset): Use a static_cast.
18962
18963 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
18964
18965 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18966 of std::size_t and std::ptrdiff_t respectively.
18967 * tinfo.cc: Likewise.
18968 * vec.cc: Likewise.
18969
18970 2000-05-06 Richard Henderson <rth@cygnus.com>
18971
18972 * typeck.c (build_c_cast): Don't warn integer->pointer size
18973 mismatch for constants.
18974
18975 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
18976
18977 * rtti.c (ptmd_initializer): Set non-public, if class is
18978 incomplete.
18979
18980 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18981 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18982 __cxa_vec_delete): Likewise.
18983 * tinfo.cc (__dynamic_cast): Likewise.
18984 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18985 __cxa_vec_delete): Likewise.
18986
18987 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18988
18989 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18990 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18991 (lang_decl_flags): Add vcall_offset.
18992 (THUNK_VCALL_OFFSET): Use it.
18993 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18994 * method.c (make_thunk): Create the lang_decl here, not in
18995 emit_thunk.
18996 (emit_thunk): Make generic thunks into ordinary functions once
18997 they have been fed to expand_body.
18998 * semantics.c (expand_body): Set current_function_is_thunk here.
18999
19000 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19001
19002 * class.c (update_vtable_entry_for_fn): Prototype.
19003
19004 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
19005 and `tmpl'.
19006
19007 * search.c (dfs_build_inheritance_graph_order): Prototype.
19008
19009 2000-05-04 Mark Mitchell <mark@codesourcery.com>
19010
19011 * cp-tree.h (special_function_kind): Add various kinds of
19012 destructors.
19013 (special_function_p): New function.
19014 * class.c (overrides): Don't let one kind of destructor override
19015 another.
19016 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
19017 whether or not to instantiate a template.
19018 * tree.c (special_function_p): Define.
19019
19020 2000-05-03 Mark Mitchell <mark@codesourcery.com>
19021
19022 * cp-tree.def (THUNK_DECL): Remove.
19023 * cp-tree.h (DECL_THUNK_P): New macro.
19024 (DECL_NON_THUNK_FUNCTION_P): Likewise.
19025 (DECL_EXTERN_C_FUNCTION_P): Likewise.
19026 (SET_DECL_THUNK_P): Likewise.
19027 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
19028 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
19029 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
19030 * decl.c (decls_match): Use DECL_EXTERN_C_P.
19031 (duplicate_decls): Likewise.
19032 (pushdecl): Likewise. Adjust thunk handling.
19033 (grokfndecl): Use DECL_EXTERN_C_P.
19034 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
19035 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
19036 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
19037 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
19038 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
19039 DECL_NO_STATIC_CHAIN.
19040 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
19041 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
19042 * search.c (covariant_return_p): Remove THUNK_DECL handling.
19043 * ir.texi: Update.
19044
19045 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19046
19047 * tree.c (walk_tree): Set lineno.
19048
19049 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19050
19051 * exception.cc: Update license notice.
19052 * new.cc: Likewise.
19053 * new1.cc: Likewise.
19054 * new2.cc: Likewise.
19055 * tinfo.cc: Likewise.
19056 * tinfo2.cc: Likewise.
19057 * vec.cc: Likewise.
19058 * inc/cxxabi.h: Likewise.
19059 * inc/exception: Likewise.
19060 * inc/new: Likewise.
19061 * inc/new.h: Likewise.
19062 * inc/typeinfo: Likewise.
19063
19064 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19065
19066 * tree.c (build_target_expr_with_type): If we already have a
19067 TARGET_EXPR, just return it.
19068
19069 * optimize.c (initialize_inlined_parameters): Don't generate an
19070 EXPR_STMT if we can just use DECL_INITIAL.
19071 * decl.c (emit_local_var): Only make the initialization a
19072 full-expression if stmts_are_full_exprs_p.
19073
19074 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19075
19076 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
19077 macro.
19078 * call.c (standard_conversion): Use it.
19079 (direct_reference_binding): Likewise.
19080 (build_over_call): Likewise.
19081 (is_properly_derived_from): Likewise.
19082 (compare_ics): Likewise.
19083 * class.c (resolves_to_fixed_type_p): Likewise.
19084 * optimize.c (declare_return_variable): Likewise.
19085 * pt.c (is_specialization_of): Likewise.
19086 (unify): Likewise.
19087 * typeck.c (comp_target_parms): Likeiwse.
19088 (build_static_cast): Likewise.
19089 (build_reinterpret_cast): Likewise.
19090 (build_const_cast): Likewise.
19091 (comp_ptr_ttypes_real): Likewise.
19092 (comp_ptr_ttypes_const): Likewise.
19093 * typeck2.c (process_init_constructor): Likewise.
19094
19095 2000-04-30 Scott Snyder <snyder@fnal.gov>
19096
19097 * decl.c (finish_destructor_body): Use the base destructor when
19098 destroying virtual bases.
19099
19100 2000-04-30 Mark Mitchell <mark@codesourcery.com>
19101
19102 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
19103 STMT_EXPRs.
19104 * optimize.c (struct inline_data): Add target_exprs field.
19105 (declare_return_variable): When a function returns an aggregate,
19106 use the variable declared in the TARGET_EXPR as the remapped
19107 DECL_RESULT.
19108 (expand_call_inline): Update the pending target_exprs stack.
19109 (optimize_function): Initialize the stack.
19110
19111 * decl2.c (finish_file): Fix typo in comment.
19112
19113 * method.c (emit_thunk): Don't try to return a `void' value.
19114
19115 * optimize.c (initialize_inlined_parameters): If the parameter is
19116 addressable, we need to make a new VAR_DECL, even if the
19117 initializer is constant.
19118
19119 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
19120
19121 * decl.c (grok_op_properties): Add an extra check of argtypes.
19122
19123 2000-04-27 Mark Mitchell <mark@codesourcery.com>
19124
19125 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19126 variables.
19127 (initialize_inlined_parameters): Try to avoid creating new
19128 VAR_DECLs.
19129
19130 2000-04-27 Alex Samuel <samuel@codesourcery.com>
19131
19132 * lex.c (my_get_run_time): Remove.
19133 (init_filename_times): Use get_run_time instead of my_get_run_time.
19134 (check_newline): Likewise.
19135 (dump_time_statistics): Likewise.
19136 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19137 of computing elapsed time explicitly.
19138
19139 2000-04-26 Mark Mitchell <mark@codesourcery.com>
19140
19141 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19142 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19143 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19144 before calling decl_constant_value.
19145 * class.c (check_bitfield_decl): Likewise.
19146 * cvt.c (ocp_convert): Likewise.
19147 (convert): Likewise.
19148 * decl.c (compute_array_index_type): Likewise.
19149 (build_enumerator): Likewise.
19150 * decl2.c (check_cp_case_value): Likewise.
19151 * pt.c (convert_nontype_argument): Likewise.
19152 (tsubst): Likewise.
19153 * typeck.c (decay_conversion): Likewise.
19154 (build_compound_expr): Likewise.
19155 (build_reinterpret_cast): Likewise.
19156 (build_c_cast): Likewise.
19157 (convert_for_assignment): Likewise.
19158
19159 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
19160
19161 * decl.c (finish_function): Don't play games with DECL_INLINE.
19162
19163 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
19164
19165 * ir.texi: Correct typo.
19166
19167 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19168
19169 * decl.c (grokdeclarator): Reject VLAs as members.
19170
19171 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
19172
19173 * call.c (standard_conversion): Accept conversion between
19174 COMPLEX_TYPEs.
19175
19176 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19177
19178 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
19179
19180 * decl2.c (finish_file): Remove double setup for accounting
19181 compile time.
19182
19183 2000-04-24 Robert Lipe <robertlipe@usa.net>
19184
19185 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19186
19187 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
19188
19189 * new.cc (set_new_handler): Needs to be in std::.
19190
19191 2000-04-23 Mark Mitchell <mark@codesourcery.com>
19192
19193 * cp-tree.h (lang_decl): Remove pretty_function_p.
19194 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19195 language-specific node.
19196 * decl.c (cp_make_fname_decl): Use build_decl, not
19197 build_lang_decl, to build the variables.
19198 (grokvardecl): Don't call build_lang_decl for local variables in
19199 templates.
19200 (grokdeclarator): Don't call build_lang_decl for local type
19201 declarations in templates.
19202 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19203 zero'd memory, rather than calling memset.
19204 * pt.c: Include hashtab.h.
19205 (local_specializations): New variable.
19206 (retrieve_local_specialization): Use it.
19207 (register_local_specialization): Likewise.
19208 (tsubst_decl): Don't assume local variables have
19209 DECL_LANG_SPECIFIC.
19210 (instantiate_decl): Set up local_specializations.
19211 * Makefile.in (HTAB_H): New variable.
19212
19213 2000-04-23 Richard Henderson <rth@cygnus.com>
19214
19215 * typeck.c (c_expand_asm_operands): Restore the original
19216 contents of the output list.
19217
19218 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
19219
19220 * ir.texi: Document complex number representation.
19221
19222 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
19223
19224 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19225 (target_incomplete_p): New function.
19226 (tinfo_base_init): Create comdat NTBS name variable.
19227 (ptr_initializer): Add non_public parameter. Calculate it.
19228 (ptmd_initializer): Likewise.
19229 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19230 (create_real_tinfo_var): Add non_public parameter. Use it.
19231 Push proxy into global namespace.
19232 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19233 New enumeration.
19234 * inc/typeinfo (type_info::before, type_info::operator==):
19235 Compare __name addresses.
19236
19237 * tinfo2.cc: Remove new-abi builtins comment.
19238
19239 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
19240
19241 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19242
19243 * call.c (joust): Exit early if we get the same function, too.
19244
19245 * decl2.c (key_method): Return NULL_TREE for template classes.
19246 (import_export_class): Don't need to check for template classes.
19247
19248 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
19249
19250 * lex.c: Remove references to cccp.c.
19251
19252 2000-04-18 Mark Mitchell <mark@codesourcery.com>
19253
19254 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19255 volatile_memfunc. Add destructor_attr. Adjust dummy.
19256 (DECL_DESTRUCTOR_P): Use destructor_attr.
19257 (DECL_CONST_MEMFUNC_P): Reimplement.
19258 (DECL_VOLATILE_MEMFUNC_P): Remove.
19259 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19260 (overrides): Use DECL_DESTRUCTOR_P.
19261 (check_for_override): Likewise.
19262 * decl.c (start_function): Likewise.
19263 * decl2.c (grokfclassfn): Likewise.
19264 (check_classfn): Likewise.
19265 (grok_function_init): Likewise.
19266
19267 2000-04-17 Mark Mitchell <mark@codesourcery.com>
19268
19269 * decl2.c (grokfield): Issue error on illegal data member
19270 declaration.
19271
19272 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
19273
19274 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19275
19276 2000-04-16 Mark Mitchell <mark@codesourcery.com>
19277
19278 * class.c (build_vtable_entry): Don't build thunks for type-info
19279 functions.
19280
19281 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
19282
19283 * decl.c (decls_match): Allow a redeclaration of a builtin to
19284 specify args while the builtin did not.
19285
19286 2000-04-15 Mark Mitchell <mark@codesourcery.com>
19287
19288 * cp-tree.def (THUNK_DECL): Add to documentation.
19289 * cp-tree.h (flag_huge_objects): Declare.
19290 * class.c (modify_vtable_entry): Tidy.
19291 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19292 Calculate delta appropriately for the new ABI.
19293 (dfs_modify_vtables): Use it.
19294 (modify_all_vtables): Fix thinko in code to add overriding copies
19295 of functions to primary vtables.
19296 (build_clone): Fix typo in comment.
19297 (clone_function_decl): Correct order of destructors in vtable.
19298 (build_vbase_offset_vtbl_entries): Adjust comment.
19299 (dfs_vcall_offset_queue_p): Remove.
19300 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19301 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19302 (build_vtable_entry): Correct check for pure virtual functions.
19303 Don't declare flag_huge_objects.
19304 * decl.c (flag_huge_objects): Remove declaration.
19305 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19306 Use int_size_in_bytes.
19307 (emit_thunk): Handle vcall offset thunks.
19308
19309 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19310
19311 * decl2.c (parse_time, varconst_time): Delete declarations.
19312 (finish_file): Delete LINENO declaration.
19313 START_TIME and THIS_TIME now long.
19314
19315 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
19316
19317 * class.c (build_base_field): Reformat comment.
19318
19319 * inc/cxxabi.h (stddef.h): Comment inclusion.
19320 (__base_class_info::__offset): Comment shift.
19321
19322 2000-04-12 Mark Mitchell <mark@codesourcery.com>
19323
19324 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19325 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19326 (cp_push_exception_identifier): New macro.
19327 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19328 (DECL_BASE_DESTRUCTOR_P): Likewise.
19329 (DECL_DELETING_DESTRUCTOR_P): Likewise.
19330 (get_vtbl_decl_for_binfo): Fix formatting.
19331 (in_charge_arg_for_name): New macro.
19332 (maybe_build_cleanup_and_delete): Remove declaration.
19333 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19334 (in_charge_arg_for_name): New function.
19335 (build_new_method_call): Use it. Handle cloned destructors.
19336 (build_clone): Don't make the base constructor virtual.
19337 Automatically defer generated functions.
19338 (clone_function_decl): Handle destructors, too.
19339 (clone_constructors_and_destructors): Likewise.
19340 (create_vtable_ptr): Don't create a vtable entry for a cloned
19341 function.
19342 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19343 (initialize_predefined_identifiers): Update appropriately.
19344 (finish_destructor_body): Simplify.
19345 (maybe_build_cleanup_and_delete): Remove.
19346 * except.c (expand_throw): Handle new-ABI destructors.
19347 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19348 (build_dtor_call): New function.
19349 (build_delete): Use it. Simplify.
19350 * optimize.c (maybe_clone_body): Handle destructors.
19351 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19352
19353 * exception.cc (cleanup_fn): New typedef.
19354 (CALL_CLEANUP): New macro.
19355 (cp_eh_info): Use them.
19356 (__cp_push_exception): Likewise.
19357 (__cp_pop_exception): Likewise.
19358
19359 2000-04-11 Mark Mitchell <mark@codesourcery.com>
19360
19361 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19362 (complete_dtor_identifier): New macro.
19363 (CLASSTYPE_FIRST_CONVERSION): Remove.
19364 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19365 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19366 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19367 (CLASSTYPE_CONSTRUCTORS): Likewise.
19368 (CLASSTYPE_DESTRUCTORS): Likewise.
19369 (lang_decl): Add cloned_function.
19370 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19371 (DECL_BASE_CONSTRUCTOR_P): Likewise.
19372 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19373 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19374 (DECL_CLONED_FUNCTION_P): Likewise.
19375 (DECL_CLONED_FUNCTION): Likewise.
19376 (clone_function_decl): Declare.
19377 (maybe_clone_body): Likewise.
19378 * call.c (build_user_type_conversion_1): Call complete object
19379 constructors in the new ABI.
19380 (build_new_method_call): Don't add in-charge parameters under the
19381 new ABI.
19382 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19383 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19384 CLASSTYPE_DESTRUCTOR_SLOT.
19385 (build_clone): New function.
19386 (clone_function_decl): Likewise.
19387 (clone_constructors_and_destructors): Likewise.
19388 (check_bases_and_members): Use it.
19389 * decl.c (iniitialize_predefined_identifiers): Initialize
19390 complete_dtor_identifier.
19391 (finish_function): Don't add extra code to a clone.
19392 (lang_mark_tree): Mark cloned_function.
19393 * decl2.c (mark_used): Don't bother trying to instantiate things
19394 we synthesized.
19395 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19396 * method.c (set_mangled_name_for_decl): Don't treat clones as
19397 constructors.
19398 (synthesize_method): Sythesize cloned functions, not the clones.
19399 * optimize.c (inline_data): Update comment on ret_label.
19400 (remap_block): Don't assume DECL_INITIAL exists.
19401 (copy_body_r): Allow ret_label to be NULL.
19402 (maybe_clone_body): Define.
19403 * pt.c (tsubst_decl): Handle clones.
19404 (instantiate_clone): New function.
19405 (instantiate_template): Use it.
19406 (set_mangled_name_for_template_decl): Don't treat clones as
19407 constructors.
19408 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19409 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19410 * semantics.c (expand_body): Clone function bodies as necessary.
19411
19412 * optimize.c (remap_decl): Avoid sharing structure for arrays
19413 whose size is only known at run-time.
19414 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19415
19416 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19417 to has_in_charge_parm_p.
19418 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19419 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19420 (DECL_COPY_CONSTRUCTOR_P): New macro.
19421 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19422 (build_user_type_conversion_1): Likewise.
19423 (convert_like_real): Likewise.
19424 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
19425 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19426 (copy_args_p): Likewise.
19427 (grok_ctor_properties): Likewise.
19428 (start_function): Likewise.
19429 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
19430 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19431 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19432 * method.c (do_build_copy_constructor): Use
19433 DECL_HAS_IN_CHARGE_PARM_P.
19434 (synthesize_method): Likewise.
19435 * pt.c (instantiate_template): Remove goto.
19436 * tree.c (build_cplus_method_type): Remove mention of obstacks in
19437 comment.
19438
19439 * cp-tre.h (finish_function): Change prototype.
19440 * decl.c (end_cleanup_fn): Adjust caller.
19441 (finish_function): Take only one parameter.
19442 * decl2.c (finish_objects): Adjust caller.
19443 (finish_static_storage_duration_function): Likewise.
19444 * method.c (emit_thunk): Likewise.
19445 * parse.y: Likewise.
19446 * parse.c: Regenerated.
19447 * pt.c (instantiate_decl): Likewise.
19448 * rtti.c (synthesize_tinfo_fn): Likewise.
19449 * semantics.c (expand_body): Likewise.
19450
19451 * cp-tree.h (copy_decl): New function.
19452 * class.c (finish_struct_1): Use it.
19453 * lex.c (copy_decl): Define it.
19454 * pt.c (tsubst_decl): Likewise.
19455 * tree.c (copy_template_template_parm): Likewise.
19456
19457 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19458 has_nonpublic_assign_ref.
19459 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19460 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19461 * class.c (finish_struct_methods): Don't set
19462 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19463 (interface_only): Don't declare.
19464 (interface_unknown): Likewise.
19465
19466 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19467
19468 * tree.h (HAVE_TEMPLATES): Remove definition.
19469 * lang-options.h (-fthis-is-variable): Remove documentation.
19470
19471 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
19472
19473 * class.c (instantiate_type): Handle object-relative template-id.
19474
19475 * semantics.c (finish_expr_stmt): Call convert_to_void here.
19476 * decl.c (cplus_expand_expr_stmt): Not here.
19477
19478 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19479 Initialize exprtype earlier.
19480
19481 * parse.y (fn.def1): Check for defining types in return types.
19482
19483 * decl.c (check_tag_decl): Notice extra fundamental types.
19484 Diagnose empty decls in classes, too.
19485
19486 * decl.c (grokdeclarator): Don't override an anonymous name if no
19487 declarator was given.
19488
19489 * cvt.c (convert_to_void): Call resolve_offset_ref.
19490
19491 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19492
19493 * decl2.c (decl_namespace): Handle getting a type.
19494
19495 * typeck.c (build_c_cast): Re-enable warning for cast between
19496 pointer and integer of different size.
19497
19498 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
19499
19500 * inc/cxxabi.h (__pointer_type_info): Add restrict and
19501 incomplete flags.
19502 (__pointer_type_info::__pointer_catch): New virtual function.
19503 (__pointer_to_member_type_info): Derive from
19504 __pointer_type_info. Adjust.
19505 (__pointer_to_member_type_info::__do_catch): Remove.
19506 (__pointer_to_member_type_info::__is_pointer_p): Declare.
19507 (__pointer_to_member_type_info::__pointer_catch): Declare.
19508 * rtti.c (qualifier_flags): Add restrict flag.
19509 (ptmd_initializer): Reorder members.
19510 (create_tinfo_types): Expand comments. Reorder
19511 ptmd_desc_type_node members.
19512 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19513 Implement.
19514 (__pointer_type_info::__do_catch): Move specific code into
19515 __pointer_catch. Call it.
19516 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19517 specific catch checking. Fix void conversion check.
19518 (__pointer_to_member_type_info::__do_catch): Remove.
19519 (__pointer_to_member_type_info::__pointer_catch): Implement.
19520
19521 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19522
19523 * lex.c (init_parse): Remove traces of classof and headof.
19524 * decl2.c (flag_operator_names): Default to 1.
19525 (lang_decode_option): Do not set it for -ansi.
19526
19527 2000-04-09 Mark Mitchell <mark@codesourcery.com>
19528
19529 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19530 (DECL_MAIN_VARIANT): Remove.
19531 * decl.c (duplicate_decls): Don't set it.
19532 (start_function): Likewise.
19533 (lang_mark_tree): Don't mark it.
19534 * decl2.c (defer_fn): Don't use it.
19535 * lex.c (retrofit_lang_decl): Don't set it.
19536 * pt.c (tsubst_decl): Likewise.
19537 * ptree.c (print_lang_decl): Don't print it.
19538 * typeck.c (mark_addressable): Don't use it.
19539
19540 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19541
19542 * vec.cc: Include <new> and <exception>.
19543 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19544 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19545 terminate.
19546 (__cxa_vec_delete): Catch dtor exceptions.
19547
19548 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19549
19550 Prepend __ to implementation defined names.
19551 * inc/typeinfo (type_info): Rename _name to __name.
19552 (type_info::type_info): Rename parameter.
19553 (type_info::operator==, type_info::operator!=,
19554 type_info::before): Likewise.
19555 (type_info::is_pointer_p, type_info::is_function_p,
19556 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19557 parameters.
19558 * inc/cxxabi.h
19559 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19560 (__pointer_type_info::__pointer_type_info): Likewise.
19561 (__pointer_type_info::is_pointer_p,
19562 __pointer_type_info::do_catch): Prepend __. Rename parameters.
19563 (__array_type_info::__array_type_info): Rename parameters.
19564 (__function_type_info::__function_type_info): Likewise.
19565 (__function_type_info::is_function_p): Prepend __.
19566 (__enum_type_info::__enum_type_info): Rename parameters.
19567 (__pointer_to_member_type_info::__pointer_to_member_type_info):
19568 Likewise.
19569 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19570 parameters.
19571 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19572 (__class_type_info::__class_type_info): Rename parameters.
19573 (__class_type_info::sub_kind): Prepend __. Adjust member names.
19574 (__class_type_info::upcast_result,
19575 __class_type_info::dyncast_result): Prepend __. Move definition
19576 into tinfo.cc.
19577 (__class_type_info::do_upcast, __class_type_info::do_catch,
19578 __class_type_info::find_public_src,
19579 __class_type_info::do_dyncast,
19580 __class_type_info::do_find_public_src): Prepend __. Rename
19581 parameters.
19582 (__si_class_type_info::__si_class_type_info): Rename parameters.
19583 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19584 __si_class_type_info::do_find_public_src): Prepent __. Rename
19585 parameters.
19586 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19587 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19588 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19589 parameters.
19590 (__dynamic_cast): Rename parameters.
19591 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19592 type_info::do_catch, type_info::do_upcast): Prepend __.
19593 (contained_p, public_p, virtual_p, contained_public_p,
19594 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19595 (__class_type_info::do_catch,
19596 __class_type_info::do_upcast): Prepend __. Adjust.
19597 (__class_type_info::__upcast_result,
19598 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19599 Adjust.
19600 (__class_type_info::find_public_src): Prepend __. Adjust.
19601 (__class_type_info::do_find_public_src,
19602 __si_class_type_info::do_find_public_src,
19603 __vmi_class_type_info::do_find_public_src): Likewise.
19604 (__class_type_info::do_dyncast,
19605 __si_class_type_info::do_dyncast,
19606 __vmi_class_type_info::do_dyncast): Likewise.
19607 (__class_type_info::do_upcast,
19608 __si_class_type_info::do_upcast,
19609 __vmi_class_type_info::do_upcast): Likewise.
19610 (__dynamic_cast): Adjust.
19611 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19612 (__function_type_info::is_function_p): Likewise.
19613 (__pointer_type_info::do_catch): Likewise. Adjust.
19614 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19615 (__throw_type_match_rtti_2): Adjust.
19616 (__is_pointer): Adjust.
19617
19618 2000-04-08 Mark Mitchell <mark@codesourcery.com>
19619
19620 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19621 (complete_ctor_identifier): New macro.
19622 (special_function_kind): Add sfk_copy_constructor and
19623 sfk_assignment_operator.
19624 (LOOKUP_HAS_IN_CHARGE): Remove.
19625 (cons_up_default_function): Rename to ...
19626 (implicitly_declare_fn): ... this.
19627 * call.c (build_new_method_call): Add in-charge parameters for
19628 constructors here.
19629 * class.c (add_implicitly_declared_members): Change parameter name
19630 from cant_have_assignment to cant_have_const_assignment.
19631 Replace calls to cons_up_default_function to implicitly_declare_fn.
19632 * cvt.c (ocp_convert): Use complete_ctor_identifier.
19633 * decl.c (initialize_predefined_identifiers): Initialize it.
19634 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19635 complex expression.
19636 * init.c (expand_default_init): Don't calculate the in-charge
19637 parameter here.
19638 (build_new_1): Likewise.
19639 * lex.c (cons_up_default_function): Move to method.c.
19640 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19641 (implicitly_declare_fn): New function.
19642 * typeck.c (build_static_cast): Use complete_ctor_identifier.
19643 (build_modify_expr): Likewise.
19644 * typeck2.c (build_functional_cast): Likewise.
19645
19646 Under the new ABI, constructors don't return `this'.
19647 * cp-tree.h (warn_reorder): Declare.
19648 (special_function_kind): New enum.
19649 (global_base_init_list): Remove declaration.
19650 (emit_base_init): Don't return a value.
19651 (check_base_init): Don't declare.
19652 (is_aggr_typedef): Likewise.
19653 * decl.c (check_special_function_return_type): New function.
19654 (return_types): Remove.
19655 (grokdeclarator): Use check_special_function_return_type.
19656 (start_function): Don't initialize ctor_label under the new ABI.
19657 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19658 * init.c (begin_init_stmts): Move to top of file.
19659 (finish_init_stmts): Likewise.
19660 (warn_reorder): Don't declare.
19661 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
19662 value.
19663 (check_base_init): Remove.
19664 (is_aggr_typedef): Likewise.
19665 (build_new_1): Don't use the return value of a constructor.
19666 * semantics.c (setup_vtbl_ptr): Don't use the return value
19667 of emit_base_init.
19668 * typeck.c (check_return_expr): Don't magically convert return
19669 statements into `return this' in constructors under the new ABI.
19670
19671 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19672 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19673 (base_ctor_identifier): New macro.
19674 (base_dtor_identifier): Likewise.
19675 (deleting_dtor_identifier): Likewise.
19676 * decl.c: Don't include obstack.h.
19677 (obstack_chunk_alloc): Don't define.
19678 (obstack_chunk_free): Likewise.
19679 (struct predefined_identifier): New type.
19680 (initialize_predefined_identifiers): New function.
19681 (init_decl_processing): Use it.
19682 (debug_temp_inits): Remove.
19683 (start_method): Don't call preserve_data.
19684 (hack_incomplete_structures): Update comment.
19685 * init.c (init_init_processing): Don't initialize
19686 nelts_identifier.
19687 (build_offset_rf): Remove dead code.
19688 (build_delete): Use CLASSTYPE_N_BASECLASSES.
19689 * search.c (init_search_processing): Don't initialize
19690 vptr_identifier.
19691
19692 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19693
19694 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19695 some sign_compare warnings.
19696
19697 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19698
19699 Rename abi::__vmi_class_type_info members.
19700 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19701 base_list, detail_masks members to vmi_flags, vmi_base_count,
19702 vmi_bases and vmi_flags_masks respectively.
19703 (__vmi_class_type_info::vmi_flags_masks): Rename
19704 details_unknown_mask to flags_unknown_mask.
19705 * tinfo.cc (__class_type_info::do_upcast): Adjust.
19706 (__vmi_class_type_info::do_find_public_src): Adjust.
19707 (__vmi_class_type_info::do_dyncast): Adjust.
19708 (__vmi_class_type_info::do_upcast): Adjust.
19709
19710 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19711
19712 * tinfo.cc (convert_to_base): New function.
19713 (get_vbase_offset): Remove. Move into convert_to_base.
19714 (__vmi_class_type_info::do_find_public_src): Adjust.
19715 (__vmi_class_type_info::do_dyncast): Adjust.
19716 (__vmi_class_type_info::do_upcast): Adjust.
19717
19718 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
19719
19720 * tinfo.cc (operator=): Use __builtin_strcmp.
19721 * tinfo2.cc (before): Likewise.
19722
19723 2000-04-06 Mark Mitchell <mark@codesourcery.com>
19724
19725 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19726 (DECL_SAVED_INLINE): Rename to ...
19727 (DECL_DEFERRED_FN): ... this.
19728 (in_function_p): Remove declaration.
19729 (mark_inline_for_output): Rename to ...
19730 (defer_fn): ... this.
19731 * decl.c (finish_function): Adjust call to mark_inline_for_output.
19732 (in_function_p): Remove definition.
19733 * decl2.c (saved_inlines): Rename to ...
19734 (deferred_fns): ... this.
19735 (saved_inlines_used): Rename to ...
19736 (deferred_fns_used): ... this.
19737 (mark_inline_for_output): Rename to ...
19738 (defer_fn): ... this.
19739 (finish_file): Adjust accordingly.
19740 (init_decl2): Likewise.
19741 * lex.c (cons_up_default_function): Likewise.
19742 * pt.c (mark_decl_instantiated): Likewise.
19743 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19744 circumstances.
19745 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19746 * semantics.c (expand_body): Defer more functions.
19747
19748 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19749
19750 * vec.cc: New file.
19751 * Make-lang.in (CXX_LIB2FUNCS): Add it.
19752 (vec.o): Build it.
19753 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19754 __cxa_vec_delete): Declare.
19755
19756 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19757
19758 * rtti.c (dfs_class_hint_mark): New static function.
19759 (dfs_class_hint_unmark): New static function.
19760 (class_hint_flags): Use them.
19761
19762 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
19763
19764 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19765
19766 2000-04-05 Mark Mitchell <mark@codesourcery.com>
19767
19768 * cp-tree.h (instantiate_decl): Change prototype.
19769 * decl2.c (mark_used): Adjust call.
19770 * optimize.c (inlinable_function_p): Adjust handling of templates.
19771 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19772 (do_type_instantiation): Likewise.
19773 (instantiate_decl): Defer more templates.
19774 (instantiate_pending_templates): Adjust logic to handle inline
19775 friend functions.
19776
19777 * Makefile.in (GGC_H): New variable. Use it throughout in place
19778 of ggc.h.
19779
19780 * call.c: Don't include obstack.h. Include ggc.h.
19781 (obstack_chunk_alloc): Don't define.
19782 (obstack_chunk_free): Likewise.
19783 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19784 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19785 (pop_switch): Free it.
19786
19787 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19788
19789 * dump.c (dequeue_and_dump): Don't try to print the bit_position
19790 if we don't have a DECL_FIELD_OFFSET.
19791
19792 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
19793
19794 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19795 special_function_p.
19796
19797 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19798
19799 * cfns.gperf (hash, libc_name_p): Prototype.
19800
19801 * rtti.c (build_dynamic_cast_1): Constification.
19802
19803 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19804
19805 * semantics.c (deferred_type_access_control): Prototype.
19806
19807 2000-04-04 Mark Mitchell <mark@codesourcery.com>
19808
19809 Correct many new ABI issues regarding vbase and vcall offset
19810 layout.
19811 * cp-tree.h (BINFO_VTABLE): Document.
19812 (struct lang_type): Tweak formatting.
19813 (BINFO_PRIMARY_BINFO): Add to documentation.
19814 (CLASSTYPE_VSIZE): Fix typo in comment.
19815 (CLASSTYPE_VBASECLASSES): Update documentation.
19816 (BINFO_VBASE_MARKED): Remove.
19817 (SET_BINFO_VBASE_MARKED): Likewise.
19818 (CLEAR_BINFO_VBASE_MARKED): Likewise.
19819 (BINFO_FIELDS_MARKED): Remove.
19820 (SET_BINFO_FIELDS_MARKED): Likewise.
19821 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19822 (enum access_kind): New enumeration.
19823 (num_extra_vtbl_entries): Remove declaration.
19824 (size_extra_vtbl_entries): Likewise.
19825 (get_vtbl_decl_for_binfo): New function.
19826 (dfs_vbase_unmark): Remove declaration.
19827 (mark_primary_bases): Likewise.
19828 * class.c (SAME_FN): Remove.
19829 (struct vcall_offset_data_s): Move definition.
19830 (build_vbase_pointer): Use `build', not `build_binary_op', to
19831 access the vbase pointer under the new ABI.
19832 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19833 (build_primary_vtable): Likewise.
19834 (dfs_mark_primary_bases): Move here from search.c.
19835 (mark_primary_bases): Likewise.
19836 (determine_primary_bases): Under the new ABI, don't make a base
19837 class a primary base just because we don't yet have any virtual
19838 functions.
19839 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19840 (num_vfun_entries): Remove.
19841 (dfs_count_virtuals): Likewise.
19842 (num_extra_vtbl_entries): Likewise.
19843 (size_extra_vtbl_entries): Likewise.
19844 (layout_virtual_bases): Iterate in inheritance graph order under
19845 the new ABI.
19846 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19847 indicate that a vfield is present.
19848 (init_class_processing): Initialize access_public_node, etc., from
19849 ak_public, etc.
19850 (get_vtbl_decl_for_binfo): New function.
19851 (dump_class_hierarchy_r): Likewise.
19852 (dump_class_hierarchy): Use it.
19853 (finish_vtbls): Build the vtbls in inheritance graph order.
19854 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19855 (initialize_vtable): Use get_vtbl_decl_for_binfo.
19856 (accumulate_vtbl_inits): Add comments explaining why a pre-order
19857 walk is required.
19858 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19859 where the vptr points, even for primary vtables.
19860 (build_vtbl_initializer): Adjust handling of vbase and vcall
19861 offsets.
19862 (build_vcall_and_vbase_vtable_entries): New function.
19863 (dfs_build_vbase_offset_vtbl_entries): Remove.
19864 (build_vbase_offset_vtbl_entries): Reimplement.
19865 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19866 were already handled in a primary base class vtable.
19867 (build_vcall_offset_vtbl_entries): Adjust.
19868 (build_rtti_vtbl_entries): Adjust.
19869 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19870 * init.c (expand_virtual_init): Simplify.
19871 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19872 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19873 * search.c (BINFO_ACCESS): New macro.
19874 (SET_BINFO_ACCESS): Likewise.
19875 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19876 (access_in_type): Likewise.
19877 (dfs_accessible_p): Likewise.
19878 (protected_accessible_p): Likewise.
19879 (lookup_fnfields_1): Adjust documentation.
19880 (dfs_mark_primary_bases): Move to class.c
19881 (mark_primary_bases): Likewise.
19882 (dfs_vbase_unmark): Remove.
19883 (virtual_context): Use BINFO_FOR_VBASE.
19884 (dfs_get_vbase_types): Simplify.
19885 (dfs_build_inheritance_graph_order): New function.
19886 (get_vbase_types): Use it.
19887 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19888
19889 * tinfo.cc (get_vbase_offset): New function.
19890 (__vmi_class_type_info::do_find_public_src): Use it.
19891 (__vmi_class_type_info::do_dyncast): Likewise.
19892 (__vmi_class_type_info::do_upcast): Likewise.
19893
19894 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
19895
19896 * lang-specs.h: Pass -fno-show-column to the preprocessor.
19897
19898 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
19899
19900 * rtti.c (class_hint_flags): Rename flags.
19901 (class_initializer): Remove flags.
19902 (synthesize_tinfo_var): Combine offset and flags. Add flags
19903 for __vmi_class_type_info.
19904 (create_tinfo_types): Remove flags from __class_type_info and
19905 __si_class_type_info. Merge flags and offset from
19906 base_class_type_info.
19907 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19908 (__base_class_info::is_virtual_p): Adjust.
19909 (__base_class_info::is_public_p): Adjust.
19910 (__base_class_info::offset): New accessor.
19911 (__class_type_info::details): Remove member.
19912 (__class_type_info::__class_type_info): Lose details.
19913 (__class_type_info::detail_masks): Remove.
19914 (__si_class_type_info::__si_class_type_info): Lose details.
19915 (__vmi_class_type_info::details): New member.
19916 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19917 (__vmi_class_type_info::detail_masks): New member.
19918 * tinfo.cc (__class_type_info::do_upcast): Initialize result
19919 with unknown_details_mask.
19920 (__vmi_class_type_info::do_find_public_src): Adjust
19921 (__vmi_class_type_info::do_dyncast): Adjust.
19922 (__vmi_class_type_info::do_upcast): Set result details, if
19923 needed. Adjust.
19924 (__dynamic_cast): Temporarily #if out optimization.
19925
19926 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
19927
19928 * rtti.c (get_tinfo_decl): Mark used.
19929 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19930 mark as dealt with, if we output it.
19931
19932 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19933
19934 * class.c: Reorganize to put virtual function table initialization
19935 machinery at the end of the file.
19936
19937 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
19938
19939 * class.c (finish_struct): Use bitsize_zero_node.
19940 * pt.c (instantiate_class_template): Likewise.
19941
19942 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19943
19944 Put RTTI entries at negative offsets in new ABI.
19945 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19946 vbase offset at index -3, not -1.
19947 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19948 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19949 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19950 (build_rtti_vtbl_entries): New function.
19951 (set_rtti_entry): Remove.
19952 (build_primary_vtable): Don't use it.
19953 (build_secondary_vtable): Likewise.
19954 (start_vtable): Remove.
19955 (first_vfun_index): New function.
19956 (set_vindex): Likewise.
19957 (add_virtual_function): Don't call start_vtable. Do call
19958 set_vindex.
19959 (set_primary_base): Rename parameter.
19960 (determine_primary_base): Likewise.
19961 (num_vfun_entries): Don't use skip_rtti_stuff.
19962 (num_extra_vtbl_entries): Include RTTI information.
19963 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19964 (skip_rtti_stuff): Remove.
19965 (dfs_modify_vtables): Don't use it.
19966 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
19967 (layout_nonempty_base_or_field): Update size handling.
19968 (create_vtable_ptr): Tweak.
19969 (layout_class_type): Adjust parameter names.
19970 (finish_struct_1): Simplify.
19971 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19972 (skip_rtti_stuff): Remove.
19973 (first_vfun_index): New function.
19974 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19975 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19976 (marked_vtable_pathp): Declare.
19977 (unmarked_vtable_pathp): Likewise.
19978 * error.c (dump_expr): Use first_vfun_index to calculate vtable
19979 offsets.
19980 * rtti.c (build_headof): Look for RTTI at negative offsets.
19981 (get_tinfo_decl_dynamic): Likewise.
19982 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19983 here.
19984 (create_pseudo_type_info): Do it here instead. Adjust so that
19985 vptr points at first virtual function.
19986 * search.c (marked_vtable_pathp): Make it global.
19987 (unmarked_vtable_pathp): Likewise.
19988 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19989 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19990 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19991 (get_pure_virtuals): Likewise.
19992 (expand_upcast_fixups): Likewise.
19993 * tree.c (debug_binfo): Likewise.
19994 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19995 negative offset.
19996
19997 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19998
19999 * class.c (check_field_decl): Fix typo.
20000 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
20001 (check_methods): Likewise.
20002 (check_field_decls): Likewise.
20003 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
20004 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
20005 Use DECL_RESULT_FLD, not DECL_RESULT.
20006 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
20007 * lex.c (identifier_type): Likewise.
20008 * pt.c (determine_specialization, lookup_template_class): Likewise.
20009 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
20010 (resolve_overloaded_unification, more_specialized): Likewise.
20011 * semantics.c (finish_member_declaration): Likewise.
20012 * typeck.c (build_x_function_call): Likewise.
20013
20014 2000-03-26 Mark Mitchell <mark@codesourcery.com>
20015
20016 * class.c (layout_empty_base): Handle empty bases with non-byte
20017 alignment.
20018 (build_base_field): Likewise.
20019 (layout_virtual_bases): Likewise.
20020
20021 * class.c (finish_struct_1): Fix typo in this change:
20022
20023 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20024
20025 2000-03-25 Mark Mitchell <mark@codesourcery.com>
20026
20027 * decl.c (grokdeclarator): Count partial specializations when
20028 keeping track of how many template classes have been seen.
20029
20030 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
20031
20032 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20033
20034 * class.c (build_vbase_pointer_fields): layout_field now place_field.
20035 (get_vfield_offset): Use byte_position.
20036 (set_rtti_entry): Set OFFSET to ssizetype zero.
20037 (get_binfo_offset_as_int): Deleted.
20038 (dfs_record_base_offsets): Use tree_low_cst.
20039 (dfs_search_base_offsets): Likewise.
20040 (layout_nonempty_base_or_field): Reflect changes in RLI format
20041 and call byte_position.
20042 (layout_empty_base): Convert offset to ssizetype.
20043 (build_base_field): use rli_size_unit_so_far.
20044 (dfs_propagate_binfo_offsets): Do computation in proper type.
20045 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
20046 (layout_class_type): Reflect changes in RLI names and fields.
20047 (finish_struct_1): Set DECL_FIELD_OFFSET.
20048 * dump.c (dequeue_and_dump): Call bit_position.
20049 * expr.c (cplus_expand_constant): Use byte_position.
20050 * rtti.c (expand_class_desc): Use bitsize_one_node.
20051 * typeck.c (build_component_addr): Use byte_position and don't
20052 special case for zero offset.
20053
20054 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
20055
20056 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
20057
20058 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
20059 tinfo object.
20060 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
20061 vtable.
20062
20063 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20064
20065 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
20066 DECL_P macros.
20067 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
20068 make_typename_type, check_initializer, cp_finish_decl,
20069 xref_tag): Likewise.
20070 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
20071 decl_namespace, arg_assoc_template_arg, arg_assoc,
20072 validate_nonmember_using_decl, do_class_using_decl): Likewise.
20073 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
20074 args_to_string): Likewise.
20075 * friend.c (is_friend): Likewise.
20076 * lex.c (note_got_semicolon, note_list_got_semicolon,
20077 is_global): Likewise.
20078 * method.c (build_overload_nested_name, build_overload_value,
20079 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
20080 * parse.y (typename_sub, typename_sub1): Likewise.
20081 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
20082 process_partial_specialization, convert_template_argument,
20083 template_args_equal, add_pending_template, lookup_template_class,
20084 for_each_template_parm_r, maybe_fold_nontype_arg,
20085 tsubst, instantiate_template, type_unification_real, unify,
20086 instantiate_pending_templates, set_mangled_name_for_template_decl):
20087 Likewise.
20088 * repo.c (repo_get_id, repo_template_used): Likewise.
20089 * search.c (lookup_field_1): Likewise.
20090 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
20091 * xref.c (classname): Likewise.
20092
20093 2000-03-22 Mark Mitchell <mark@codesourcery.com>
20094
20095 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
20096 (CANONICAL_BINFO): New macro.
20097 (BINFO_NEW_VTABLE_MARKED): Use it.
20098 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
20099 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
20100 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
20101 not TREE_TYPE.
20102 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20103 (build_secondary_vtable): Likewise.
20104 (dfs_finish_vtbls): Likewise.
20105 (dfs_accumulate_vtbl_inits): Likewise.
20106 (accumulate_vtbl_inits): New function.
20107 (finish_vtbls): Make sure that virtual bases come after
20108 non-virtual bases in the vtable group.
20109 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
20110 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20111 * search.c (struct vbase_info): Move definition.
20112 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20113 (unmarked_new_vtable_p): Likewise.
20114 (dfs_mark_vtable_path): Remove.
20115 (dfs_mark_new_vtable): Remove.
20116 (dfs_unmark_new_vtable): Likewise.
20117 (dfs_clear_search_slot): Likewise.
20118 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20119 (dfs_clear_vbase_slots): Likewise.
20120 (init_vbase_pointers): LIkewise.
20121
20122 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
20123
20124 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20125 SIZETYPE to a non-SIZETYPE.
20126
20127 2000-03-21 Mark Mitchell <mark@codesourcery.com>
20128
20129 * class.c (layout_virtual_bases): Adjust names in conditionally
20130 compiled code.
20131
20132 * class.c (record_base_offsets): New function.
20133 (layout_conflict_p): Likewise.
20134 (layout_nonempty_base_or_field): Use it.
20135 (layout_empty_base): New function.
20136 (build_base_field): Use it.
20137 (build_base_fields): Update comment.
20138 (layout_virtual_bases): Fold in a little code form
20139 layout_basetypes. Use layout_empty_base.
20140 (layout_basetypes): Remove.
20141 (end_of_class): New function.
20142 (layout_class_type): Use it. Adjust.
20143
20144 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20145 (fntype_p): Remove.
20146 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20147 comment.
20148 (dfs_skip_nonprimary_vbases_markedp): Likewise.
20149 * typeck.c (fntype_p): Remove.
20150
20151 * cp-tree.h (TI_SPEC_INFO): Remove.
20152 (CLASSTYPE_TI_SPEC_INFO): Likewise.
20153 * pt.c (process_partial_specialization): Likewise.
20154
20155 * class.c (build_base_field): Fix thinko in computation of binfo
20156 offsets.
20157
20158 * tree.c (mark_local_for_remap_p): Mark variables declared in
20159 TARGET_EXPRs as well.
20160
20161 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20162
20163 * typeck.c (require_complete_type, complete_type,
20164 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20165 build_array_ref, convert_arguments, pointer_diff,
20166 build_x_unary_op, build_unary_op, build_c_cast,
20167 build_modify_expr): Use COMPLETE_TYPE_P etc.
20168 * call.c (is_complete, convert_like_real,
20169 build_new_method_call): Likewise.
20170 * class.c (build_vbase_pointer_fields, check_bases,
20171 build_base_field, finish_struct_1, pushclass): Likewise.
20172 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20173 * decl.c (maybe_process_template_type_declaration, pushtag,
20174 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20175 layout_var_decl, check_initializer, cp_finish_decl,
20176 grokdeclarator, require_complete_types_for_parms,
20177 grok_op_properties, xref_tag, xref_basetypes,
20178 check_function_type): Likewise.
20179 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20180 * friend.c (do_friend): Likewise.
20181 * init.c (build_offset_ref): Likewise.
20182 * parse.y (structsp): Likewise.
20183 * pt.c (maybe_process_partial_specialization,
20184 tsubst_friend_function, instantiate_class_template, tsubst,
20185 do_type_instantiation, instantiate_pending_templates): Likewise.
20186 * repo.c (repo_get_id): Likewise.
20187 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20188 synthesize_tinfo_var, emit_support_tinfos): Likewise.
20189 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20190 * semantics.c (begin_class_definition): Likewise.
20191 * tree.c (build_cplus_method_type): Likewise.
20192 * typeck2.c (digest_init, build_functional_cast,
20193 add_exception_specifier): Likewise.
20194 * parse.h, parse.c: Regenerated.
20195
20196 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20197
20198 * inc/cxxabi.h: New header file. Define new-abi entry points.
20199 (__pointer_type_info::target): Rename member to ...
20200 (__pointer_type_info::type): ... here.
20201 (__base_class_info::type): Rename member to ...
20202 (__base_class_info::base): ... here.
20203 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20204 * cp-tree.h (CPTI_ABI): New global tree enumeration.
20205 (abi_node): New global tree node.
20206 * decl.c (abi_node): Document.
20207 (init_decl_processing): Initialize abi_node.
20208 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20209 (get_vmi_pseudo_type_info): Likewise.
20210 (create_tinfo_types): Likewise.
20211 (emit_support_tinfos): Likewise.
20212 * tinfo.h (cxxabi.h): Include for new-abi.
20213 Move rtti class definitions to new header file.
20214 * tinfo.cc (abi): Use the namespace.
20215 (std): Move new abi rtti classes from here ...
20216 (__cxxabiv1): ... to here.
20217 * tinfo2.cc (cxxabi.h): Include for new-abi.
20218 Move rtti class definitions to new header file.
20219 (std): Move new abi rtti classes from here ...
20220 (__cxxabiv1): ... to here.
20221 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20222 namespace.
20223
20224 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20225 Jason Merrill <jason@casey.cygnus.com>
20226
20227 * method.c (build_overload_int): Use host_integerp.
20228
20229 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20230
20231 * init.c (build_offset_ref): Handle the case of a templated member
20232 function.
20233
20234 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20235
20236 * except.c (expand_exception_blocks): Clear catch_clauses_last.
20237
20238 2000-03-18 Mark Mitchell <mark@codesourcery.com>
20239
20240 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20241 * class.c (check_bitfield_decl): Turn illegal bitfields into
20242 non-bitfields.
20243 (dfs_propagate_binfo_offsets): Adjust for new size_binop
20244 semantics.
20245 (dfs_offset_for_unshared_vbases): Likewise.
20246 * cvt.c (cp_convert_to_pointer): Convert NULL to a
20247 pointer-to-member correctly under the new ABI.
20248 * expr.c (cplus_expand_constant): Don't use cp_convert when
20249 turning an offset into a pointer-to-member.
20250 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20251 when dereferencing them under the new ABI.
20252 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20253 of pointers-to-members under the new ABI.
20254
20255 * class.c (check_bitfield_decl): Remove restriction on really long
20256 bitfields.
20257 (layout_class_type): Implement new ABI handling of bitfields
20258 longer than their types.
20259
20260 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20261
20262 * parse.y (extdefs): Call ggc_collect.
20263 * parse.c: Regenerated.
20264
20265 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
20266
20267 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20268 (note_name_declared_in_class): Use OVL_CURRENT to get at a
20269 potential overload.
20270
20271 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20272
20273 * class.c (build_vbase_path): Use integer_zerop.
20274 (build_vtable_entry): Use tree_low_cst.
20275 (get_vfield_offset): Use bit_position.
20276 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20277 Use tree_low_cst.
20278 (check_bitfield_decl): Set DECL_SIZE using convert.
20279 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20280 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20281 Use tree_low_cst.
20282 (finish_struct_1): Use bit_position.
20283 (dump_class_hierarchy): Use tree_low_cst.
20284 * cp-tree.h (min_precision): Add declaration.
20285 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20286 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20287 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20288 * expr.c (cplus_expand_constant): Use bit_position.
20289 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20290 * rtti.c (get_base_offset): Use bit_position.
20291 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20292 host_integerp, and tree_low_cst.
20293 (pointer_int_sum): Use integer_zerop.
20294 (build_component_addr): Use bit_position.
20295
20296 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
20297
20298 * typeck.c (require_complete_type): Don't assume size_zero_node.
20299 (complete_type_or_else): Likewise.
20300
20301 2000-03-16 Steven Grady <grady@digitaldeck.com>
20302 Jason Merrill <jason@casey.cygnus.com>
20303
20304 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20305
20306 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
20307
20308 * decl2.c (grokfield): Bail out if type is error_mark_node.
20309
20310 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20311
20312 * tinfo2.cc (__ptr_to_member_data): Rename to ...
20313 (__pointer_to_member_data): ... here. Adjust.
20314 * rtti.c (create_tinfo_types): Adjust.
20315
20316 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20317
20318 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20319 * decl.c (ref_desc_type_node): Undocument.
20320 * rtti.c (ptr_ref_initializer): Rename to ...
20321 (ptr_initializer): ... here. Adjust comments.
20322 (ptmd_initializer): Fix comment thinko.
20323 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20324 (create_tinfo_types): Remove ref_desc_type_node init.
20325 * tinfo2.cc (__reference_type_info): Remove.
20326
20327 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20328
20329 * decl.c (cp_finish_decl): Remove obsolete comment.
20330
20331 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20332
20333 2000-03-14 Mark Mitchell <mark@codesourcery.com>
20334
20335 * cp-tree.h: Tweak documentation.
20336 * class.c (build_vbase_pointer_fields): Layout the fields, too.
20337 (avoid_overlap): Remove.
20338 (get_binfo_offset_as_int): New function.
20339 (dfs_serach_base_offsets): Likewise.
20340 (layout_nonempty_base_or_field): Likewise.
20341 (build_base_field): Layout fields here. Avoid placing two objects
20342 of the same type at the same address, under the new ABI.
20343 (build_base_fields): Adjust accordingly.
20344 (create_vtable_ptr): Return the new field, but don't attach it to
20345 TYPE_FIELDS.
20346 (remove_base_field): Remove.
20347 (remove_base_fields): Remove.
20348 (layout_basetypes): Adjust accordingly.
20349 (layout_class_type): Call layout_field for each field, rather than
20350 just making a wholesale call to layout_type.
20351
20352 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
20353
20354 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20355
20356 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
20357
20358 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20359
20360 * except.c (dtor_nothrow): New fn.
20361 (do_pop_exception): Use it. Take type parm.
20362 (push_eh_cleanup): Take type parm.
20363 (expand_start_catch_block): Pass it.
20364 (build_eh_type_type_ref): Accept null type.
20365
20366 2000-03-12 Mark Mitchell <mark@codesourcery.com>
20367
20368 * cp-tree.h (revert_static_member_fn): Change prototype.
20369 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20370 (grok_op_properties): Likewise.
20371 (start_function): Likewise.
20372 (revert_static_member_fn): Simplify.
20373 * pt.c (check_explicit_specialization): Adjust call to
20374 revert_static_member_fn.
20375
20376 2000-03-11 Mark Mitchell <mark@codesourcery.com>
20377
20378 * cp-tree.h (scope_kind): New type.
20379 (tmpl_spec_kind): Likewise.
20380 (declare_pseudo_global_level): Remove.
20381 (pseudo_global_level_p): Rename to template_parm_scope_p.
20382 (pushlevel): Remove declaration.
20383 (begin_scope): New function.
20384 (finish_scope): Likewise.
20385 (current_tmpl_spec_kind): Likewise.
20386 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20387 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
20388 Add template_spec_p.
20389 (toplevel_bindings_p): Adjust.
20390 (declare_pseudo_global_level): Remove.
20391 (pseudo_global_level_p): Rename to template_parm_scope_p.
20392 (current_tmpl_spec_kind): New function.
20393 (begin_scope): Likewise.
20394 (finish_scope): Likewise.
20395 (maybe_push_to_top_level): Adjust.
20396 (maybe_process_template_type_declaration): Likewise.
20397 (pushtag): Likewise.
20398 (pushdecl_nonclass_level): Likewise.
20399 (lookup_tag): Likewise.
20400 (grokfndecl): Handle member template specializations. Share
20401 constructor and non-constructor code.
20402 * decl2.c (check_classfn): Handle member template specializations.
20403 * pt.c (begin_template_parm_list): Use begin_scope.
20404 (begin_specialization): Likewise.
20405 (end_specialization): Likewise.
20406 (check_explicit_specialization): Use current_tmpl_spec_kind.
20407 Handle member template specializations.
20408 (end_template_decl): Use finish_scope. Remove call to
20409 get_pending_sizes.
20410 (push_template_decl_real): Remove bogus error message.
20411 (tsubst_decl): Fix typo in code contained in comment.
20412 (instantiate_template): Handle member template specializations.
20413 (most_general_template): Likewise.
20414
20415 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
20416
20417 * lex.c (whitespace_cr): Compress consecutive calls to warning().
20418 (do_identifier): Ditto for error().
20419
20420 * pt.c (convert_nontype_argument): Ditto for cp_error().
20421 (convert_template_argument): Ditto for cp_pedwarn().
20422
20423 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
20424
20425 * exception.cc (__check_null_eh_spec): New fn.
20426 * except.c (expand_end_eh_spec): Call it if the spec is throw().
20427
20428 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20429
20430 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20431 * except.c (expand_end_eh_spec): Add the return type.
20432 * rtti.c (throw_bad_cast): Add the parmtypes.
20433 (throw_bad_typeid): Likewise.
20434
20435 * semantics.c (expand_stmt): Only leave out rtl for unused
20436 artificials, and set DECL_IGNORED_P on them as well.
20437 * decl.c (wrapup_globals_for_namespace): Likewise.
20438
20439 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
20440
20441 * decl.c (maybe_commonize_var): Skip all artificial decls.
20442 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20443
20444 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20445
20446 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20447 * cp-tree.h: Declare flag_enforce_eh_specs.
20448 * decl.c (store_parm_decls, finish_function): Check it.
20449
20450 C library functions don't throw.
20451 * Makefile.in (cfns.h): New target.
20452 (except.o): Depend on it.
20453 * Make-lang.in (cc1plus): Depend on cfns.gperf.
20454 * cfns.gperf: New file.
20455 * cfns.h: Generated.
20456 * except.c: Include it.
20457 (nothrow_libfn_p): New fn.
20458 * decl.c (grokfndecl): Use it.
20459 * cp-tree.h: Declare it.
20460
20461 * decl.c (push_overloaded_decl_1, auto_function,
20462 define_function): Lose.
20463 (build_library_fn_1): New static fn.
20464 (builtin_function): Use it.
20465 (get_atexit_node): Use build_library_fn_ptr.
20466 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20467 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20468 push_void_library_fn, push_throw_library_fn): New fns.
20469 * cp-tree.h: Declare them.
20470 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20471 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20472 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20473 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20474 * rtti.c (build_runtime_decl): Lose.
20475 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20476 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20477 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20478
20479 * call.c (build_call): Remove result_type parm.
20480 Call mark_used on unused artificial fns.
20481 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20482
20483 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
20484
20485 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20486 appropriate.
20487 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20488 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20489 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20490 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20491 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20492 expand_generic_desc): Likewise.
20493
20494 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20495
20496 * exception.cc (__cp_pop_exception): Cleanup the original object.
20497
20498 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20499
20500 * decl.c (grok_op_properties): Merge conversion to void warning
20501 with other silly op warnings.
20502
20503 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
20504
20505 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20506 array CONSTRUCTOR elements. Don't use expr_tree_cons.
20507
20508 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20509
20510 * decl.c (cp_make_fname_decl): New function.
20511 (wrapup_globals_for_namespace): Don't emit unused static vars.
20512 (init_decl_processing): Remove comment about use of
20513 array_domain_type. Set make_fname_decl.
20514 (cp_finish_decl): Remove __FUNCTION__ nadgering.
20515 * semantics.c (begin_compound_stmt): Remove
20516 current_function_name_declared flagging.
20517 (expand_stmt): Don't emit unused local statics.
20518 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20519 specially.
20520
20521 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20522
20523 * typeck.c (convert_for_assignment): Don't look at array
20524 initializer.
20525 * call.c (convert_like_real): Likewise.
20526
20527 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
20528
20529 Add initial support for '\uNNNN' specifier.
20530 * lex.c (read_ucs): New fn.
20531 (readescape, skip_white_space): Call it.
20532 (is_extended_char, is_extended_char_1): New fns.
20533 (utf8_extend_token): New fn, #if 0'd out.
20534 (real_yylex): Treat extended chars like letters.
20535
20536 * search.c (note_debug_info_needed): Walk the bases even if we
20537 weren't deferring the type itself.
20538
20539 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20540
20541 * decl2.c (finish_objects): Constify a char*.
20542
20543 * method.c (emit_thunk): Likewise.
20544
20545 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
20546
20547 * typeck.c (dubious_conversion_warnings): Look through
20548 REFERENCE_TYPE.
20549
20550 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20551
20552 * class.c (dfs_modify_vtables): I is now unsigned.
20553 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20554 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20555 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20556 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20557 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20558 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20559 Call integer_all_onesp.
20560 * typeck2.c (process_init_constructor): Use compare_tree_int.
20561
20562 * lang-specs.h (as): Don't call if -syntax-only.
20563
20564 2000-03-06 Mark Mitchell <mark@codesourcery.com>
20565
20566 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20567 RTL_EXPR_HAS_NO_SCOPE after all.
20568
20569 2000-03-05 Mark Mitchell <mark@codesourcery.com>
20570
20571 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20572 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
20573 RTL_EXPR_HAS_NO_SCOPE.
20574
20575 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20576 later.
20577
20578 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20579
20580 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
20581
20582 * call.c (convert_like): Macrofy.
20583 (convert_like_with_context): New macro.
20584 (convert_like_real): Renamed from convert_like. Add calling
20585 context parameters, for diagnostics. Add recursive flag. Call
20586 dubious_conversion_warnings for outer conversion.
20587 (build_user_type_conversion): Use convert_like_with_context.
20588 (build_over_call): Likewise. Don't warn about dubious
20589 conversions here. Adjust convert_default_arg calls.
20590 (convert_default_arg): Add context parameters for diagnostics.
20591 Pass through to convert_like_with_context.
20592 * cp-tree.h (convert_default_arg): Add context parameters.
20593 (dubious_conversion_warnings): Prototype new function.
20594 * typeck.c (convert_arguments): Adjust convert_default_arg call.
20595 (dubious_conversion_warnings): New function, broken
20596 out of convert_for_assignment.
20597 (convert_for_assignment): Adjust.
20598
20599 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
20600
20601 * decl2.c (key_method): Break out from...
20602 (import_export_vtable, import_export_class): ...here.
20603
20604 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20605 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20606
20607 * search.c (note_debug_info_needed, dfs_debug_mark,
20608 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
20609 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20610
20611 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
20612
20613 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20614 typos.
20615
20616 2000-03-02 Mark Mitchell <mark@codesourcery.com>
20617
20618 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20619 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20620 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20621 (lang_type): Split gets_new into has_new and has_array_new.
20622 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20623 (TYPE_GETS_NEW): Split into ...
20624 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20625 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20626 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20627 (build_op_new_call): Don't declare.
20628 (build_new_1): Likewise.
20629 * call.c (build_op_new_call): Remove.
20630 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20631 instead of TYPE_NEEDS_DESTRUCTOR.
20632 (finish_struct_bits): Likewise.
20633 (add_implicitly_declared_members): Likewise.
20634 (check_field_decl): Likewise.
20635 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20636 correctly under the new ABI.
20637 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20638 instead of TYPE_NEEDS_DESTRUCTOR.
20639 (initialize_local_var): Likewise.
20640 (destroy_local_var): Likewise.
20641 (cp_finish_decl): Likewise.
20642 (register_dtor_fn): Likewise.
20643 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20644 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
20645 TYPE_VEC_DELETE_TAKES_SIZE here.
20646 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20647 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20648 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20649 (finish_destructor_body): Likewise.
20650 (maybe_build_cleanup_1): Likewise.
20651 * decl2.c (do_static_destruction): Likewise.
20652 * init.c (build_new_1): Make it static.
20653 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20654 (expand_cleanup_for_base): Likewise.
20655 (get_cookie_size): New function.
20656 (build_new_1): Handle array-new cookies correctly under the new
20657 ABI.
20658 (build_vec_delete_1): Likewise.
20659 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20660 (build_delete): Likewise.
20661 (build_vec_delete): Handle array-new cookies correctly under the new
20662 ABI.
20663 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20664 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20665 TYPE_HAS_ARRAY_NEW_OPERATOR.
20666 * ptree.c (print_lang_type): Check them.
20667 * search.c (context_for_name_lookup): Fix typo in comment.
20668 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20669 * tree.c (break_out_cleanups): Likewise.
20670 (build_cplus_array_test_1): Likewise.
20671 (cp_build_qualified_type_real): Likewise.
20672 * typeck.c (complete_type): Likewise.
20673
20674 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20675 the command-line, not the end.
20676
20677 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
20678
20679 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20680
20681 2000-03-02 Tom Tromey <tromey@cygnus.com>
20682
20683 * cp-tree.h (build_java_class_ref): Declare.
20684 * init.c (build_java_class_ref): No longer static.
20685 * except.c (expand_throw): Generate a Java-style `throw' if the
20686 thrown object is a "Java" object.
20687 (initialize_handler_parm): Generate a Java-style lookup of
20688 exception info if the caught object is a "Java" object.
20689 (catch_language, catch_language_init): New globals.
20690 (decl_is_java_type): New function.
20691 (expand_start_catch_block): Don't call push_eh_info() or
20692 push_eh_cleanup() when handling a Java-style "catch". Pass Java
20693 class reference to build_catch_block.
20694
20695 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20696
20697 * typeck.c (comptypes): Treat sizetype like its language equivalent.
20698
20699 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
20700
20701 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20702 to merge reference/pointer code and fix incorrect warnings.
20703
20704 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
20705
20706 * search.c (protected_accessible_p): Use context_for_name_lookup.
20707
20708 * init.c (construct_virtual_bases): Fix thinko.
20709 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20710
20711 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
20712
20713 * decl.c (current_function_decl): Move to toplev.c.
20714
20715 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
20716
20717 * pt.c (fn_type_unification): Unify return type, whenever
20718 provided.
20719 (get_bindings_real): Only pass return type when necessary.
20720 Remove explicit return type check.
20721 * class.c (resolve_address_of_overloaded_function): Pass desired
20722 return type to fn_type_unification.
20723
20724 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20725
20726 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20727 DECL_FIELD_SIZE.
20728 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20729 DECL_FIELD_SIZE.
20730 * rtti.c (expand_class_desc): Likewise.
20731 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20732 (THUNK_VCALL_OFFSET): Likewise.
20733 (THUNK_DELTA): Reflect changes in ../tree.h.
20734
20735 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
20736
20737 * search.c (protected_accessible_p): Also allow the access if
20738 the member is public in DERIVED. Lose TYPE parm.
20739 (friend_accessible_p): Lose TYPE parm.
20740 (accessible_p): Adjust.
20741
20742 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20743
20744 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20745 on things that are not sizes; ssize_binop deleted.
20746 Call size_diffop when appropriate.
20747 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20748 (build_primary_vtable, build_secondary_vtable): Likewise.
20749 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20750 Variable I is HOST_WIDE_INT.
20751 (get_vfield_offset): Pass proper types to size_binop.
20752 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20753 (finish_struct_1): Likewise.
20754 (skip_rtti_stuff): Arg N is now pointer to signed.
20755 (layout_class_type): Use size_zero_node.
20756 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20757 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20758 * decl.c (complete_arry_type): Pass proper types to size_binop.
20759 (xref_basetypes): BINFO_OFFSET is sizetype.
20760 * error.c (dump_expr): Don't use size_binop non-sizes.
20761 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20762 * init.c (construct_virtual_bases): Fix type error.
20763 (build_vec_delete_1): Pass proper type to size_binop and don't
20764 fold result.
20765 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20766 * rtti.c (get_base_offset): Pass proper type to size_binop.
20767 * search.c (dfs_find_vbases): Fix type error.
20768 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20769 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20770 * tree.c (debug_binfo): Variable N is signed.
20771 Use HOST_WIDE_INT_PRINT_DEC.
20772 * typeck.c (comptypes): sizetype is same as equivalent integer type.
20773 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20774 size_one_node and size_zero_node.
20775 (c_alignof): Use size_one_node.
20776 (build_component_addr): Pass proper types to size_binop.
20777 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20778
20779 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
20780
20781 Implement class scope using-declarations for functions.
20782 * class.c (handle_using_decl): Call add_method for used functions.
20783 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20784 (add_method): Used functions are hidden by local functions.
20785 (check_bases_and_members): Handle using-decls before finalizing
20786 CLASSTYPE_METHOD_VEC.
20787 * call.c (add_function_candidate): Add ctype parm; if nonzero,
20788 override the type of 'this' accordingly.
20789 (add_template_candidate, add_template_candidate_real): Add ctype parm.
20790 (convert_class_to_reference, build_user_type_conversion_1,
20791 build_new_function_call, build_object_call, build_new_op,
20792 build_new_method_call): Pass ctype parm.
20793
20794 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20795 the baselink.
20796 * call.c (convert_class_to_reference, build_user_type_conversion_1,
20797 build_new_function_call, build_object_call, build_new_op,
20798 build_new_method_call, build_op_delete_call): Don't get basetype_path
20799 from a baselink.
20800 * typeck.c (build_component_ref): Likewise.
20801 * init.c (build_offset_ref): Likewise.
20802 (resolve_offset_ref): Don't call enforce_access.
20803 Call build_scoped_ref.
20804 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
20805 would cause an error or if -pedantic.
20806 * class.c (alter_access): Lose binfo parm.
20807
20808 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20809
20810 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20811 types.
20812
20813 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
20814
20815 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20816 pseudo_type_info creation into the std namespace
20817
20818 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20819
20820 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20821 (import_export_class): Remove declaration.
20822 * decl2.c (import_export_class): Make it static.
20823 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20824 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20825 EXPR_WITH_FILE_LOCATION.
20826 * lex.c (check_newline): Tweak filename/lineno setting.
20827 * semantics.c (begin_while_stmt): Fix typo in comment.
20828
20829 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20830
20831 * lang-options.h (-fmessage-length=): Add missing option.
20832
20833 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20834
20835 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
20836
20837 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20838
20839 2000-02-25 Jim Wilson <wilson@cygnus.com>
20840
20841 * optimize.c (expand_call_inline): Emit the return label before
20842 evaluating the return value.
20843
20844 2000-02-24 Mark Mitchell <mark@codesourcery.com>
20845
20846 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20847 than duplicating functionality here.
20848 * optimize.c: Include input.h.
20849 (expand_call_inline): Use push_srcloc and pop_srcloc.
20850 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20851 * parse.c: Regenerated.
20852 * Makefile.in (lex.o): Depend on input.h.
20853 (optimize.o): Likewise.
20854
20855 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
20856
20857 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20858 function type, rather than ICE.
20859
20860 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
20861
20862 * decl.c (grokdeclarator): Call decl_type_access_control.
20863 * parse.y (parse_end_decl): Don't call decl_type_access_control if
20864 decl is null.
20865
20866 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
20867
20868 * decl.c (decls_match): Remove obsolete static member nadgering.
20869
20870 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20871
20872 * decl.c (grokdeclarator): Change ANSI to ISO.
20873 * lex.c (consume_string, readescape, do_identifier): Likewise.
20874 (parse_float, real_yylex): Likewise.
20875 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20876 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20877 new_type_id, maybe_label_decls, simple_stmt,
20878 for.init.statement): Likewise.
20879 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20880 * semantics.c (finish_named_return_value): Likewise.
20881 * parse.c: Regenerate.
20882
20883 2000-02-21 Mark Mitchell <mark@codesourcery.com>
20884
20885 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20886 (CPTI_CLASS_STAR_TYPE): Remove.
20887 (vtable_index_type): Likewise.
20888 (class_star_type_node): Remove.
20889 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20890 (build_binary_op_nodefault): Remove.
20891 * call.c (build_new_op): Use build_binary_op instead of
20892 build_binary_op_nodefault.
20893 * decl.c (init_decl_processing): Remove class_star_type_node
20894 initialization. Make delta_type_node ptrdiff_type_node under the
20895 new ABI. Initialize vtable_index_type.
20896 (build_ptrmemfunc_type): Build different structures for the new
20897 ABI.
20898 (build_enumerator): Use build_binary_op instead of
20899 build_binary_op_nodefault.
20900 * method.c (build_overload_value): Mangle pointers-to-members
20901 appropriately under the new ABI.
20902 * typeck.c (build_array_ref): Use build_binary_op instead of
20903 build_binary_op_nodefault.
20904 (get_member_function_from_ptrfunc): Adjust for the new ABI.
20905 (build_binary_op_nodefault): Rename to ...
20906 (build_binary_op): ... this. Remove old version. Adjust for
20907 pointer-to-member comparisons under the new ABI.
20908 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
20909 (build_ptrmemfunc): Adjust for the new ABI.
20910 (expand_ptrmemfunc_cst): Likewise.
20911 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20912 (pfn_from_ptrmemfunc): Adjust for the new ABI.
20913
20914 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
20915
20916 * call.c (build_object_call): Compress consecutive calls to
20917 cp_error.
20918 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20919 (build_op_delete_call): Adjust message formatting.
20920
20921 * class.c (check_bases): Compress consecutive calls to
20922 cp_pedwarn.
20923 (finish_struct_anon): Say 'ISO C++'.
20924
20925 * decl.c (start_decl): Same here.
20926 (grok_reference_init): Likewise.
20927 (grokfndecl): Correct message formatting.
20928 (grokfndecl): Improve diagnostic.
20929 (check_static_variable_definition): Likewise. Say 'ISO C++'
20930 (compute_array_index_type): Say 'ISO C++'
20931 (create_array_type_for_decl): Compress consecutive calls to
20932 cp_error.
20933 (grokdeclarator): Say 'ISO C++'
20934 (grok_op_properties): Likewise.
20935
20936 * decl2.c (delete_sanity): Clairify diagnostic.
20937 (check_member_template): Same here.
20938 (grok_function_init): Use consistent terminology.
20939
20940 * expr.c (do_case): Say 'ISO C++'
20941
20942 * friend.c (do_friend): Compress consecutive calls to warning.
20943
20944 2000-02-20 Mark Mitchell <mark@codesourcery.com>
20945
20946 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20947 * class.c (build_secondary_vtable): Reorganize. Don't create a
20948 new vtable under the new ABI.
20949 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20950 computing the size.
20951 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20952 the initializing elements.
20953 (initialize_vtable): New function.
20954 (dfs_finish_vtbls): Use it.
20955 (dfs_accumulate_vtbl_inits): New function.
20956 (finish_vtbls): Merge primary and secondary vtables under the new
20957 ABI.
20958 (finish_struct_1): Remove redundant call to layout_vtable_decl.
20959 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20960 aren't VAR_DECLs.
20961
20962 * class.c (build_vtable): New function, split out from ...
20963 (get_vtable_decl): ... here, and ...
20964 (build_secondary_vtable): ... here.
20965
20966 * pt.c (tsubst_decl): Fix formatting.
20967
20968 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20969
20970 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20971 (avoid_overlap, build_base_field): Likewise.
20972 (build_base_field, build_base_fields, is_empty_class):
20973 Test DECL_SIZE with integer_zero.
20974 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20975 * cp-tree.h (struct lang_type): New field size_unit.
20976 (CLASSTYPE_SIZE_UNIT): New macro.
20977 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20978 (cp_finish_decl): Delete -Wlarger-than processing.
20979 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20980 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20981 * tree.c (make_binfo): binfo vector is one entry longer.
20982 (walk_tree): Walk DECL_SIZE_UNIT.
20983
20984 2000-02-19 Mark Mitchell <mark@codesourcery.com>
20985
20986 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20987 comment.
20988 (build_vtable_entry): Don't assume all vtable entries are
20989 functions.
20990 (build_vtbl_initializer): Adjust accordingly.
20991 (get_vtable_decl): Fix formatting.
20992
20993 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
20994
20995 * semantics.c (deferred_type_access_control): Walk the entire
20996 type_lookups list.
20997 (save_type_access_control): Rename from
20998 initial_deferred_type_access_control. Just remember the value.
20999 (decl_type_access_control): New fn.
21000 (begin_function_definition): Use deferred_type_access_control, after
21001 we've started the function. Set type_lookups to error_mark_node.
21002 * parse.y (frob_specs, fn.def1): Adjust.
21003 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
21004 (parse_end_decl, parse_bitfield0, parse_method): New fns.
21005 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
21006 (after_type_component_declarator0): Likewise.
21007 (after_type_component_declarator): Likewise.
21008 (notype_component_declarator): Likewise.
21009 * cp-tree.h: Adjust.
21010
21011 * decl.c (redeclaration_error_message): Allow redeclaration of
21012 namespace-scope decls.
21013
21014 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
21015
21016 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
21017
21018 2000-02-17 Mark Mitchell <mark@codesourcery.com>
21019
21020 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
21021 * decl2.c (grokclassfn): Likewise.
21022
21023 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
21024
21025 * decl2.c (lang_decode_option): Don't set default message length
21026 here.
21027 * lex.c (lang_init_options): Set it here.
21028
21029 2000-02-16 Mark Mitchell <mark@codesourcery.com>
21030
21031 Make DECL_CONTEXT mean the class in which a member function was
21032 declared, even for a virtual function.
21033 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
21034 (DECL_FRIEND_CONTEXT): New macro.
21035 (DECL_REAL_CONTEXT): Remove.
21036 (SET_DECL_FRIEND_CONTEXT): Likewise.
21037 (DECL_VIRTUAL_CONTEXT): Adjust.
21038 (DECL_CLASS_SCOPE_P): Use TYPE_P.
21039 (add_friends): Remove.
21040 (hack_decl_function_context): Likewise.
21041 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
21042 CP_DECL_CONTEXT.
21043 (build_over_call): Fix indentation. Use DECL_CONTEXT
21044 instead of DECL_CLASS_CONTEXT.
21045 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
21046 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21047 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21048 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
21049 (build_base_field): Likewise.
21050 (finish_struct_1): Likewise.
21051 (build_self_reference): Likewise.
21052 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
21053 DECL_REAL_CONTEXT.
21054 (pushtag): Use decl_function_context, not
21055 hack_decl_function_context.
21056 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21057 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
21058 (pushdecl): Remove bogus code.
21059 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
21060 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21061 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21062 Use decl_function_context, nothack_decl_function_context.
21063 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
21064 (grokdeclarator): Likewise. Use decl_function_context, not
21065 hack_decl_function_context.
21066 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
21067 (start_function): Use DECL_FRIEND_CONTEXT, not
21068 DECL_CLASS_CONTEXT. Use decl_function_context, not
21069 hack_decl_function_context.
21070 (finish_function): Use decl_function_context, not
21071 hack_decl_function_context.
21072 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
21073 DECL_CLASS_CONTEXT.
21074 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
21075 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
21076 (grokfield): Likewise.
21077 (finish_builtin_type): Likewise.
21078 (finish_vtable_vardec): Use decl_function_context, not
21079 hack_decl_function_context.
21080 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21081 (start_static_initialization_or_destruction): Likewise.
21082 (finish_static_initialization_or_destruction): Likewise.
21083 (mark_used): Adjust logic for deciding when to synthesize methods.
21084 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
21085 DECL_REAL_CONTEXT.
21086 * error.c (dump_function_decl): Use DECL_CONTEXT, not
21087 DECL_CLASS_CONTEXT.
21088 * friend.c (is_friend): Likewise.
21089 (add_friends): Remove.
21090 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
21091 * lex.c (begin_definition_of_inclass_inline): Use
21092 decl_function_context, not hack_decl_function_context.
21093 (process_next_inline): Likewise.
21094 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21095 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
21096 DECL_CLASSS_CONTEXT.
21097 (hack_identifier): Likewise.
21098 (synthesize_method): Use decl_function_context, not
21099 hack_decl_function_context.
21100 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
21101 DECL_REAL_CONTEXT.
21102 (is_member_template): Use decl_function_context, not
21103 hack_decl_function_context. Use DECL_CONTEXT, not
21104 DECL_CLASS_CONTEXT.
21105 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
21106 DECL_CLASS_CONTEXT.
21107 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
21108 DECL_REAL_CONTEXT.
21109 (push_template_decl_real): Likewise.
21110 (instantiate_class_template): Don't call add_friends.
21111 (tsubst_default_argument): Use DECL_CONTEXT, not
21112 DECL_REAL_CONTEXT.
21113 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21114 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21115 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
21116 DECL_CLASS_CONTEXT.
21117 * repo.c (repo_inline_used): Likewise.
21118 * search.c (current_scope): Adjust for new _CONTEXT macros.
21119 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21120 DECL_REAL_CONTEXT.
21121 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21122 (lookup_fnfields_here):Likewise.
21123 (check_final_overrider): Likewise.
21124 (init_vbase_pointers): Likewise.
21125 (virtual_context): Likewise.
21126 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21127 (expand_body): Use decl_function_context, not
21128 hack_decl_function_context.
21129 * tree.c (hack_decl_function_context): Remove.
21130 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21131 DECL_CLASS_CONTEXT.
21132 * typeck2.c (error_not_base_type): Likewise.
21133
21134 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
21135
21136 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21137
21138 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21139
21140 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21141
21142 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
21143
21144 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21145
21146 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
21147
21148 * decl2.c (lang_decode_option): Enable automatic line wrapping.
21149
21150 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
21151
21152 * parse.y (frob_specs): Split out...
21153 (parse_decl): From here.
21154 (fn.def2): Call initial_deferred_type_access_control.
21155 (after_type_component_declarator0): Call frob_specs.
21156 (notype_component_declarator0): Likewise.
21157 * search.c (friend_accessible_p): Nested classes are friends of their
21158 enclosing classes.
21159
21160 2000-02-10 Mark Mitchell <mark@codesourcery.com>
21161
21162 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21163 used to create an implicit temporary.
21164
21165 * class.c (dfs_modify_vtables): Tweak calculation of functions to
21166 override.
21167
21168 2000-02-08 Nathan Sidwell <nathan@acm.org>
21169
21170 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21171 strip array element qualifiers too.
21172
21173 2000-02-07 Mark Mitchell <mark@codesourcery.com>
21174
21175 * decl.c (store_parm_decls): Don't build cleanups for parameters
21176 while processing_template_decl.
21177
21178 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
21179
21180 * cp-tree.h (struct saved_scope): Add incomplete field.
21181 (namespace_scope_incomplete): New macro.
21182 * decl.c (pushdecl): Use it.
21183 (hack_incomplete_structures): Use it. See through artificial
21184 binding levels.
21185 (mark_saved_scope): Mark it.
21186
21187 Implement access control for nested types.
21188 * search.c (type_access_control): New fn.
21189 (accessible_p): Now we do perform access control for types.
21190 * semantics.c (deferred_type_access_control): New fn.
21191 (initial_deferred_type_access_control): New fn.
21192 (begin_function_definition): Call it. Add lookups parm.
21193 * decl.c (struct binding_level): Add this_class field.
21194 (pushlevel_class): Set it.
21195 (mark_binding_level): Mark it.
21196 (lookup_name_real): Use it. Call type_access_control.
21197 (mark_saved_scope): Mark lookups field.
21198 * cp-tree.h (flagged_type_tree): Add lookups field.
21199 (struct saved_scope): Add lookups field.
21200 (type_lookups): New macro.
21201 * parse.y (declmods): Now <ftype>.
21202 (parse_decl): Add lookups parm. Call
21203 initial_deferred_type_access_control.
21204 (lang_extdef): Clear type_lookups.
21205 (typed_declspecs, declmods, typespec): Set lookups field.
21206 (initdcl): Call deferred_type_access_control.
21207 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21208 component_decl_1, named_parm): Adjust.
21209 * friend.c (is_friend): Nested classes are friends of their
21210 enclosing classes.
21211
21212 * class.c (currently_open_derived_class): New fn.
21213 * method.c (hack_identifier): Use it.
21214
21215 * lex.c (do_identifier): Remove obsolete code.
21216
21217 * parse.y (typed_typespecs): Propagate new_type_flag properly.
21218
21219 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
21220
21221 * tinfo.h: Remove apostrophes from C++ comment (xgettext
21222 thinks this file is plain C).
21223
21224 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21225
21226 * Makefile.in (call.o): Depend on $(EXPR_H).
21227
21228 * call.c: Include "expr.h".
21229
21230 * class.c (dump_class_hierarchy): Add prototype.
21231
21232 * search.c (dfs_get_pure_virtuals): Likewise.
21233
21234 2000-02-1 Ulrich Drepper <drepper@redhat.com>
21235
21236 * parse.y (simple_stmt): Allow :: token in asm parameter list.
21237 * parse.c: Rebuilt.
21238
21239 2000-01-31 Jim Wilson <wilson@cygnus.com>
21240
21241 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21242 Store it in DECL_FCONTEXT.
21243 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21244
21245 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
21246
21247 * tinfo.h (old abi): #include "tconfig.h".
21248 * tinfo.cc (convert_to_base): Move into old abi section.
21249
21250 2000-01-31 Mark Mitchell <mark@codesourcery.com>
21251
21252 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21253 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21254 (BINFO_PRIMARY_BINFO): New macro.
21255 (BF_DELTA): Rename to ...
21256 (BV_DELTA): ... this.
21257 (BF_VCALL_INDEX): Rename to ...
21258 (BV_VCALL_INDEX): ... this.
21259 (BF_FN): Rename to ...
21260 (BV_FN): ... this.
21261 * class.c (build_vbase_path): Adjust for changes to reverse_path.
21262 (set_rtti_entry): Rename BF_ macros to BV_ variants.
21263 (modify_vtable_entry): Simplify.
21264 (add_virtual_function): Rename BF_ macros to BV_ variants.
21265 (build_vtable_initializer): Likewise.
21266 (get_class_offset_1): Remove.
21267 (dfs_get_class_offset): Likewise.
21268 (get_class_offset): Likewise.
21269 (dfs_find_final_overrider): New function.
21270 (find_final_overrider): Likewise.
21271 (modify_one_vtable): Remove.
21272 (dfs_find_base): New function.
21273 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
21274 find_final_overrider.
21275 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
21276 virtuals.
21277 (dfs_fixup_vtable_deltas): Remove.
21278 (override_one_vtable): Remove.
21279 (merge_overrides): Likewise.
21280 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21281 unreal chilren of virtual bases.
21282 (finish_struct_1): Don't use merge_overrides. Don't use
21283 dfs_fixup_vtable_deltas.
21284 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21285 BINFOs.
21286
21287 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21288 Jason Merrill <jason@yorick.cygnus.com>
21289
21290 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21291
21292 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
21293
21294 * exception.cc (__throw_bad_typeid): Add missing std::.
21295
21296 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21297
21298 * cp-tree.h (make_thunk): PROTO -> PARAMS.
21299
21300 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
21301
21302 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21303
21304 Runtime support for new-abi rtti.
21305 * inc/typeinfo (type_info::operator!=): Define in class.
21306 (type_info::before, type_info::name, type_info::operator==,
21307 type_info::operator!=): Define new ABI implementations.
21308 (type_info::is_pointer_p, type_info::is_function_p): Declare
21309 new virtual functions.
21310 (type_info::do_catch, type_info::do_upcast): Likewise.
21311
21312 * tinfo.h (__base_class_info): Define new class.
21313 (__class_type_info): Likewise.
21314 (__si_class_type_info): Likewise.
21315 (__vmi_class_type_info): Likewise.
21316 (__dynamic_cast): Prototype.
21317
21318 * tinfo.cc: Conditionalize old and new rtti mechanisms.
21319 (type_info::is_pointer_p): Define new function.
21320 (type_info::is_function_p): Likewise.
21321 (type_info::do_catch): Likewise.
21322 (type_info::do_upcast): Likewise.
21323 (vtable_prefix): New structure for vtable access.
21324 (adjust_pointer): Define new template function.
21325 (contained_p, public_p, virtual_p, contained_public_p,
21326 contained_nonpublic_p, contained_nonvirtual_p): Define new
21327 functions.
21328 (nonvirtual_base_type): New local variable.
21329 (__class_type_info::~__class_type_info): Define.
21330 (__si_class_type_info::~__si_class_type_info): Likewise.
21331 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21332 (__class_type_info::do_catch): Define new function.
21333 (__class_type_info::do_upcast): Likewise.
21334 (__class_type_info::find_public_src): Likewise.
21335 (__class_type_info::do_find_public_src): Likewise.
21336 (__si_class_type_info::do_find_public_src): Likewise.
21337 (__vmi_class_type_info::do_find_public_src): Likewise.
21338 (__class_type_info::do_dyncast): Likewise.
21339 (__si_class_type_info::do_dyncast): Likewise.
21340 (__vmi_class_type_info::do_dyncast): Likewise.
21341 (__class_type_info::do_upcast): Likewise.
21342 (__si_class_type_info::do_upcast): Likewise.
21343 (__vmi_class_type_info::do_upcast): Likewise.
21344 (__dynamic_cast): Likewise.
21345
21346 * tinfo2.cc (__fundamental_type_info): Define new class.
21347 (__pointer_type_info): Likewise.
21348 (__reference_type_info): Likewise.
21349 (__array_type_info): Likewise.
21350 (__function_type_info): Likewise.
21351 (__enum_type_info): Likewise.
21352 (__ptr_to_member_type_info): Likewise.
21353 (__fundamental_type_info::~__fundamental_type_info): Define.
21354 (__pointer_type_info::~__pointer_type_info): Likewise.
21355 (__reference_type_info::~__reference_type_info): Likewise.
21356 (__array_type_info::~__array_type_info): Likewise.
21357 (__function_type_info::~__function_type_info): Likewise.
21358 (__enum_type_info::~__enum_type_info): Likewise.
21359 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21360 (__pointer_type_info::do_catch): Define new function.
21361 (__ptr_to_member_type_info::do_catch): Define new function.
21362
21363 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21364 (__is_pointer): Likewise.
21365
21366 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21367
21368 2000-01-30 Mark Mitchell <mark@codesourcery.com>
21369
21370 * cp/class.c (build_vtable): Rename to build_primary_vtable.
21371 (prepare_fresh_vtable): Rename to build_secondary_vtable.
21372 (make_new_vtable): New function.
21373 (modify_vtable_entry): Handle generation of new vtables correctly.
21374 (modify_one_vtable): Remove unused parameter.
21375 (dfs_fixup_vtable_deltas): Likewise.
21376 (override_one_vtable): Use build_secondary_vtable.
21377 (finish_struct_1): Use build_primary_vtable and
21378 build_secondary_vtable.
21379
21380 2000-01-28 Ulrich Drepper <drepper@redhat.com>
21381
21382 * cp/decl.c: Adjust variable names, comments, help strings.
21383
21384 2000-01-29 Nathan Sidwell <nathan@acm.org>
21385
21386 * new2.cc (operator delete[]): Use operator delete, don't assume
21387 implementation.
21388
21389 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
21390
21391 * class.c (build_vtbl_initializer): Add argument to
21392 build_vtable_entry call.
21393
21394 2000-01-27 Mark Mitchell <mark@codesourcery.com>
21395
21396 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21397 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21398 (BF_DELTA): New macro.
21399 (BF_VCALL_INDEX): Likewise.
21400 (BF_FN): Likewise.
21401 (THUNK_VCALL_OFFSET): Likewise.
21402 (make_thunk): Change prototype.
21403 * class.c (build_vtable_entry): Integrate
21404 build_vtable_entry_for_fn. Handle vcall indices.
21405 (build_vtable_entry_for_fn): Remove.
21406 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
21407 BF_VCALL_INDEX, BF_FN.
21408 (modify_vtable_entry): Integrate common code from
21409 modify_one_vtable and dfs_fixup_vtable_deltas.
21410 (add_virtual_function): Set BF_VCALL_INDEX.
21411 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
21412 and BF_FN.
21413 (modify_one_vtable): Simplify.
21414 (dfs_fixup_vtable_deltas): Likewise.
21415 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21416 * method.c (make_thunk): Handle vcall indices.
21417
21418 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
21419
21420 Compiler side new abi rtti (not enabled).
21421 * cp-tree.h (new_abi_rtti_p): New macro.
21422 (emit_support_tinfos): Prototype new function.
21423 (tinfo_decl_p): Likewise.
21424 (emit_tinfo_decl): Likwise.
21425 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21426 macros.
21427 (doing_runtime): New local static.
21428 (init_rtti_processing): Add new-abi initializer.
21429 (get_tinfo_decl): Add new-abi logic.
21430 (tinfo_from_decl): Likewise.
21431 (build_dynamic_cast_1): Likewise.
21432 (qualifier_flags): New static function.
21433 (tinfo_base_init): Likewise.
21434 (generic_initializer): Likewise.
21435 (ptr_ref_initializer): Likewise.
21436 (ptmd_initializer): Likewise.
21437 (class_hint_flags): Likewise.
21438 (class_initializer): Likewise.
21439 (synthesize_tinfo_var): Likewise.
21440 (create_real_tinfo_var): Likewise.
21441 (create_pseudo_type_info): Likewise.
21442 (get_vmi_pseudo_type_info): Likewise.
21443 (create_tinfo_types): Likewise.
21444 (emit_support_tinfos): New global function.
21445 (tinfo_decl_p): New global predicate.
21446 (emit_tinfo_decl): New global function.
21447 * class.c (set_rtti_entry): Generalize for old and new rtti.
21448 (build_vtbl_initializer): Likewise.
21449 * decl2.c (finish_file): Likewise.
21450
21451 2000-01-27 Jim Wilson <wilson@cygnus.com>
21452
21453 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21454 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21455
21456 2000-01-27 Mike Stump <mrs@wrs.com>
21457
21458 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21459 for scopes.
21460
21461 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
21462
21463 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21464
21465 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
21466
21467 * optimize.c (calls_setjmp_r): Supply new argument
21468 to special_function_p.
21469
21470 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21471
21472 * call.c: PROTO -> PARAMS.
21473 * class.c: Likewise.
21474 * cp-tree.h: Likewise.
21475 * cvt.c: Likewise.
21476 * decl.c: Likewise.
21477 * decl.h: Likewise.
21478 * decl2.c: Likewise.
21479 * dump.c: Likewise.
21480 * errfn.c: Likewise.
21481 * error.c: Likewise.
21482 * except.c: Likewise.
21483 * expr.c: Likewise.
21484 * init.c: Likewise.
21485 * input.c: Likewise.
21486 * lex.c: Likewise.
21487 * lex.h: Likewise.
21488 * method.c: Likewise.
21489 * optimize.c: Likewise.
21490 * parse.y: Likewise.
21491 * pt.c: Likewise.
21492 * repo.c: Likewise.
21493 * rtti.c: Likewise.
21494 * search.c: Likewise.
21495 * semantics.c: Likewise.
21496 * spew.c: Likewise.
21497 * tree.c: Likewise.
21498 * typeck.c: Likewise.
21499 * typeck2.c: Likewise.
21500 * xref.c: Likewise.
21501
21502 2000-01-25 Richard Henderson <rth@cygnus.com>
21503
21504 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21505
21506 2000-01-25 Mark Mitchell <mark@codesourcery.com>
21507
21508 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21509 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21510 (struct vcall_offset_data_s): New type.
21511 (dfs_vcall_offset_queue_p): New function.
21512 (dfs_build_vcall_offset_vtbl_entries): Likewise.
21513 (build_vcall_offset_vtbl_entries): Likewise.
21514 (layout_vtable_decl): Likewise.
21515 (num_vfun_entries): Likewise.
21516 (num_extra_vtbl_entries): Add the entries for vcall offsets.
21517 (build_vtbl_initializer): Likewise.
21518 (dfs_finish_vtabls): Use layout_vtable_decl.
21519 (modify_one_vtables): Always duplicate vtables under the new ABI.
21520 (finish_struct_1): Use layout_vtable_decl.
21521
21522 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21523
21524 * decl.c (member_function_or_else): Change third arg from a format
21525 specifier to an `enum overload_flags'. Callers changed.
21526
21527 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
21528
21529 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21530 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21531 build_const_cast, get_delta_difference, check_return_expr): Avoid
21532 ANSI string concatenation usage.
21533
21534 2000-01-24 Mark Mitchell <mark@codesourcery.com>
21535
21536 * class.c (layout_class_type): Put the fields required to make a
21537 class non-empty at the end, not the beginning, of the TYPE_FIELDs
21538 list.
21539
21540 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
21541
21542 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21543 template.
21544
21545 * decl2.c (mark_used): Do instantiate inlines that have been
21546 explicitly instantiated.
21547
21548 2000-01-24 Richard Henderson <rth@cygnus.com>
21549
21550 * call.c (build_over_call): Use expand_tree_builtin.
21551 * typeck.c (build_function_call_real): Likewise.
21552 (build_binary_op_nodefault): Handle unordered compares.
21553
21554 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21555
21556 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21557 cp_tree_index values.
21558 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21559 New global node #defines for them.
21560 * rtti.c (call_void_fn): Replace with ...
21561 (build_runtime_decl): ... new static function.
21562 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21563 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21564 (build_dynamic_cast_1): Always produce correctly typed result.
21565 Explicitly produce type_info addresses. Use dynamic_cast_node.
21566 * exception.cc (__throw_bad_cast): Return `void *'.
21567 (__throw_bad_typeid): Return `const type_info &'.
21568
21569 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21570
21571 * cp-tree.h (get_vtable_decl): Prototype new function.
21572 * class.c (get_vtable_decl): New function. Broken out from ...
21573 (build_vtable): ... here. Use it.
21574 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21575 by get_vtable_decl.
21576
21577 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21578
21579 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21580 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21581 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21582 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21583 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21584 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21585 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21586 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21587 (CPTI_TINFO_VAR_ID): New enumeration.
21588 (__tp_desc_type_node, __access_mode_type_node,
21589 __bltn_desc_type_node, __user_desc_type_node,
21590 __class_desc_type_node, __ptr_desc_type_node,
21591 __attr_desc_type_node, __func_desc_type_node,
21592 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21593 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21594 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21595 enum_desc_type_node, class_desc_type_node,
21596 si_class_desc_type_node, vmi_class_desc_type_node,
21597 ptmd_desc_type_node, base_desc_type_node): New #defines.
21598 (tinfo_fn_id, tinfo_fn_type): Rename to ...
21599 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21600 (tinfo_var_id): New enumeration.
21601 (DECL_TINFO_FN_P): Augment comment.
21602 * decl.c (cp_global_trees): Adjust documentation.
21603 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21604 tinfo_decl_type and tinfo_var_id.
21605 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21606 (build_typeid): Remove unused variable.
21607 (get_tinfo_var): Use tinfo_var_id.
21608 (tinfo_name): New static function.
21609 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21610 (tinfo_from_decl): Likewise.
21611 (get_base_offset): New static function, broken out of
21612 expand_class_desc.
21613 (expand_si_desc): Use tinfo_name.
21614 (expand_class_desc): Likewise. Lose local static variable.
21615 Use base_desc_type_node. Use get_base_offset.
21616 (expand_ptr_desc): Use tinfo_name.
21617 (expand_attr_desc): Likewise.
21618 (expand_generic_desc): Likewise.
21619
21620 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21621 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21622
21623 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21624
21625 * cp-tree.h (__eprintf): Remove declaration.
21626 * tree.c (__eprintf): Remove definition.
21627
21628 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
21629 Mark Mitchell <mark@codesourcery.com>
21630
21631 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21632 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21633
21634 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
21635
21636 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21637
21638 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21639
21640 * cp-tree.h (register_dtor_fn): New function.
21641 * decl.c (destroy_local_static): Rename to ...
21642 (register_dtor_fn): ... this. Give it external linkage.
21643 (expand_static_init): Use it.
21644 * decl2.c (do_static_initialization): Likewise, if using
21645 __cxa_atexit.
21646 (do_static_destruction): Check that __cxa_atexit is not in use.
21647 (finish_file): Don't call do_static_destruction if using
21648 __cxa_atexit.
21649
21650 * typeck.c (convert_arguments): Restore two-message error
21651 reporting.
21652
21653 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
21654
21655 Remap dynamic cast hint values to be consistent across ABIs.
21656 * search.c (dynamic_cast_base_recurse): Remap generated value.
21657 (get_dynamic_cast_base_type): Adjust documentation.
21658 * tinfo.h (__user_type_info::dyncast): Likewise.
21659 (__user_type_info::find_public_subobj): Remap BOFF meaning.
21660 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21661 (__class_type_info::do_dyncast): Likewise.
21662 (__class_type_info::do_find_public_subobj): Likewise.
21663 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21664
21665 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21666
21667 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21668
21669 * typeck2.c (incomplete_type_error): Restore previous
21670 cp_error and cp_error_at call sequence.
21671
21672 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
21673
21674 * class.c (dump_class_hierarchy): Make format agree with argument;
21675 cast pointer to unsigned long and print with %lx.
21676
21677 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21678
21679 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21680
21681 * typeck.c (composite_pointer_type, common_type,
21682 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21683 build_function_call_real, convert_arguments,
21684 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21685 build_unary_op, mark_addressable, build_compound_expr,
21686 build_static_cast, build_reinterpret_cast, build_const_cast,
21687 build_c_cast, build_modify_expr, get_delta_difference,
21688 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21689 'ISO C++'. Fusion consecutive calls to diagnostic message routines
21690 into a single one.
21691 * typeck2.c (readonly_error, abstract_virtuals_error,
21692 process_init_constructor, check_for_new_type): Likewise.
21693
21694 2000-01-19 Mark Mitchell <mark@codesourcery.com>
21695
21696 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21697 VAR_DECLs.
21698
21699 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
21700
21701 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21702 (build_x_typeid): Likewise.
21703 (get_tinfo_fn): Likewise.
21704 (get_tinfo_fn_unused): Rename to ...
21705 (get_tinfo_decl): ... here.
21706 * rtti.c (build_headof): Replace logic error with assertion.
21707 (get_tinfo_fn_dynamic): Rename to ...
21708 (get_tinfo_decl_dynamic): ... here. Make static. Use
21709 complete_type_or_else.
21710 (build_x_typeid): Move into ...
21711 (build_typeid): ... here. Adjust call to
21712 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21713 throw_bad_typeid expression.
21714 (get_tinfo_fn_unused): Rename to ...
21715 (get_tinfo_decl): ... here. Adjust comment.
21716 (get_tinfo_fn): Delete.
21717 (tinfo_from_decl): New static function.
21718 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21719 (get_typeid): Use complete_type_or_else.
21720 (build_dynamic_cast_1): Adjust calls to
21721 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21722 * parse.y (primary): Adjust call to build_typeid.
21723 * except.c (build_eh_type_type_ref): Adjust call to
21724 get_tinfo_decl. Mark as used.
21725 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21726 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21727 * parse.c: Regenerated.
21728
21729 2000-01-17 Mark Mitchell <mark@codesourcery.com>
21730
21731 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
21732 calling convention.
21733 (resolves_to_fixed_type_p): Document calling convention.
21734 * rtti.c (build_x_typeid): Initialize NONNULL.
21735
21736 * cp-tree.h (build_shared_int_cst): New function.
21737 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21738 * class.c (modify_vtable_entry): Likewise.
21739 (add_virtual_function): Split out code to generated shared
21740 INTEGER_CSTs to build_share_int_cst.
21741 (modify_all_vtables): Handle all the overridden functions here.
21742 Add overridden functions from non-primary virtual bases to the
21743 primary vtable.
21744 (finish_struct_1): Adjust call to modify_all_vtables. Add
21745 overridden functions from non-primary bases to the vtable.
21746 * tree.c (build_shared_int_cst): New function.
21747
21748 * cp-tree.h (scratchalloc): Remove.
21749 (build_scratch_list): Likewise.
21750 * call.c (convert_class_to_reference): Replace build_scratch_list
21751 and build_expr_list with build_tree_list.
21752 (add_candidate): Replace scratchalloc with expralloc. Note memory
21753 leak.
21754 (build_user_type_conversion_1): Replace build_scratch_list
21755 and build_expr_list with build_tree_list.
21756 (build_new_op): Likewise.
21757 (build_op_delete_call): Likewise.
21758 (convert_like): Likewise.
21759 * cvt.c (ocp_convert): Likewise.
21760 * decl.c (start_decl): Likewise.
21761 (start_function): Likewise.
21762 (finish_destructor_body): Likewise.
21763 (maybe_build_cleanup_1): Likewise.
21764 * decl2.c (reparse_decl_as_expr): Likewise.
21765 * init.c (perform_member_init): Likewise.
21766 (expand_cleanup_for_base): Likewise.
21767 (build_builtin_delete_call): Likewise.
21768 (build_new_1): Likewise.
21769 (build_delete): Likewise.
21770 * method.c (do_build_assign_ref): Likewise.
21771 * parse.y (already_scoped_stmt): Likewise.
21772 (nontrivial_exprlist): Likewise.
21773 (net_initializer): Likewise.
21774 (initlist): Likewise.
21775 * parse.c: Regenerated.
21776 * rtti.c (build_x_typeid): Likewise.
21777 (build_dynamic_cast_1): Likewise.
21778 * typeck.c (build_x_compound_expr): Likewise.
21779 (build_static_cast): Likewise.
21780 (build_modify_expr): Likewise.
21781
21782 * cp-tree.h (DECL_VINDEX): Add documentation.
21783 * class.c (build_vtable_entry): Likewise.
21784 (start_vtable): Add comment.
21785 (add_virtual_function): Replace pending_hard_virtuals with
21786 overridden_virtuals and pending_virtuals with new_virtuals.
21787 Replace redundant assignments with assertions.
21788 (check_for_override): Add comment.
21789 (check_bases_and_members): Replace pending_hard_virtuals with
21790 overridden_virtuals and pending_virtuals with new_virtuals.
21791 (create_vtbl_ptr): Likewise.
21792 (layout_class_type): Likewise.
21793 (finish_struct_1): Likewise. Add comments.
21794
21795 2000-01-16 Mark Mitchell <mark@codesourcery.com>
21796
21797 * class.c (finish_struct_1): Replace redundant code with
21798 assertions.
21799
21800 * cp-tree.h (flag_new_abi): Move.
21801 (flag_use_cxa_atexit): Likewise.
21802 (flag_honor_std): Likewise.
21803 (flag_rtti): Likewise.
21804 (vbase_offsets_in_vtable_p): Define.
21805 (vptrs_present_everywhere_p): Likewise.
21806 (TYPE_CONTAINS_VPTR_P): Likewise.
21807 (dfs_walk_real): Declare.
21808 * class.c (build_vbase_pointer_fields): Check
21809 vbase_offsets_in_vtable_p.
21810 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21811 BINFO_VPTR_FIELD.
21812 (build_vbase_offset_vtbl_entries): Simplify.
21813 (build_vbase_offset_vtbl_entries): Adjust.
21814 (build_vbase_pointer): Add ability to look up vbase offsets in
21815 vtable.
21816 (start_vtable): New function.
21817 (add_virtual_function): Use it.
21818 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21819 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21820 (build_vtbl_initializer): Take the type of the complete object as
21821 input. Use it to correctly calculate vbase offsets.
21822 (dfs_finish_vtbls): Pass the complete type to
21823 build_vtbl_initializer.
21824 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21825 (create_vtable_ptr): Create a vtable even if there are no
21826 new virtual functions, under the new ABI.
21827 (finish_struct_1): Likewise.
21828 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21829 * decl.c (exapnd_static_init): Remove call to
21830 preserve_initializer.
21831 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21832 vtables.
21833 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21834 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21835 (construct_virtual_bases): Don't initialize virtual base pointers
21836 under the new ABI.
21837 (build_aggr_init): Clean up comment.
21838 (expand_aggr_init_1): Likewise.
21839 * rtti.c (expand_class_desc): Store the virtual function table
21840 index where the vbase offset lives in the offset field.
21841 * search.c (dfs_walk_real): Make it global.
21842 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21843 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21844
21845 * tinfo.h (USItype): Make it signed under the new ABI.
21846 * tinfo.cc (convert_to_base): New function. Encapsulate base
21847 conversion logic here.
21848 (__class_type_info::do_upcast): Use it.
21849 (__class_type_info::do_dyncast): Likewise.
21850 (__class_type_info::do_find_public_subobj): Likewise.
21851
21852 * init.c (construct_virtual_bases): Don't look up the addresses of
21853 virtual bases at run-time.
21854
21855 * class.c (build_vbase_pointer): Relocate.
21856 (build_vbase_pointer_fields): Likewise.
21857 (dfs_build_vbase_offset_vtbl_entries): Likewise.
21858 (build_vbase_offset_vtbl_entries): Likewise.
21859
21860 * decl.c (init_decl_processing): Complain if -fnew-abi
21861 -fno-vtable-thunks is used.
21862
21863 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21864 flag_new_abi.
21865
21866 2000-01-15 Mark Mitchell <mark@codesourcery.com>
21867
21868 * cp-tree.h (num_extra_vtbl_entries): New function.
21869 (size_extra_vtbl_entries): Likewise.
21870 (dfs_vtable_path_unmark): Likewise.
21871 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21872 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21873 * class.c (num_extra_vtbl_entries): New function.
21874 (size_extra_vtbl_entries): Likewise.
21875 (dfs_build_vbase_offset_vtbl_entries): New function.
21876 (build_vbase_offset_vtbl_entries): Likewise.
21877 (build_vtbl_initializer): Use it.
21878 (finish_struct_1): Adjust vtable sizes (using
21879 num_extra_vtbl_entries).
21880 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21881 THUNK_DECL is non-NULL before expanding it.
21882 * init.c (expand_virtual_init): Adjust the vtable pointer by
21883 size_extra_vtbl_entries before storing it.
21884 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21885 Handle TREE_LIST parameters here, not in the dfs_* functions.
21886 (dfs_unmarked_real_bases_queue_p): Adjust.
21887 (dfs_marked_real_bases_queue_p): Likewise.
21888 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21889 (dfs_vtable_path_marked_real_bases_queue_p): New function.
21890 (dfs_vtable_path_unmark): Likewise.
21891
21892 2000-01-14 Mark Mitchell <mark@codesourcery.com>
21893
21894 * optimize.c (copy_body_r): Clear the operand three of a
21895 TARGET_EXPR when copying it.
21896
21897 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21898
21899 * method.c (build_decl_overload_real): Check whether we are in ::
21900 before returning __builtin_new/delete.
21901
21902 2000-01-13 Mark Mitchell <mark@codesourcery.com>
21903
21904 * pt.c (tsubst_friend_function): Improve comment.
21905 (instantiate_decl): Avoid crashing when a "nested" function is
21906 instantiated from the top level.
21907
21908 * dump.c (dqeueue_and_dump): Dump
21909 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21910
21911 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21912
21913 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21914
21915 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
21916
21917 * g++spec.c (lang_specific_driver): Add -fnew-abi if
21918 ENABLE_NEW_GXX_ABI defined.
21919 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21920 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21921 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21922
21923 2000-01-12 Mark Mitchell <mark@codesourcery.com>
21924
21925 * decl.c (start_cleanup_fn): Call pushdecl.
21926
21927 * call.c (convert_class_to_reference): Fix typos.
21928 (build_conditional_expr): Handle errors gracefully.
21929 * class.c (push_nested_class): Likewise.
21930 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21931 (DECL_THIS_EXTERN): Use it.
21932 (DECL_THIS_STATIC): Likewise.
21933 * cvt.c (convert_to_void): Handle errors gracefully.
21934 (build_expr_type_conversion): Likewise.
21935 * decl.c (maybe_push_decl): Likewise.
21936 (start_decl_1): Likewise.
21937 (require_complete_types_for_parms): Likewise.
21938 * parse.y (structsp): Likewise.
21939 (base_class): Likewise.
21940 * parse.c: Regenerated.
21941 * pt.c (finish_member_template_decl): Likewise.
21942 * typeck.c (decay_conversion): Likewise.
21943
21944 * cp-tree.h (dfs_skip_vbases): New function.
21945 (find_vbase_instance): Likewise.
21946 * class.c (determine_primary_base): Allow a nearly empty base to
21947 serve as a primary base class under the new ABI.
21948 (get_class_offset_1): Rename to ...
21949 (dfs_get_class_offset): ... this. Simplify. Don't issue error
21950 messages here.
21951 (get_class_offset): Use it. Issue error messages here.
21952 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21953 find the right copies of virtual bases.
21954 (fixup_vtable_deltas1): Rename to ...
21955 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
21956 bases as primary bases.
21957 (fixup_vtable_deltas): Remove.
21958 (override_one_vtable): Handle virtual bases as primary bases.
21959 (merge_overrides): Likewise.
21960 (finish_struct_1): Likewise.
21961 (dump_class_hierarchy): Dump primary-ness of bases as well.
21962 * search.c (mark_primary_bases): Use a pre-order traversal to
21963 handle primary virtual bases.
21964 (dfs_skip_vbases): New fiunction.
21965 (expand_upcast_fixups): Adjust to handle primary virtual bases.
21966 (fixup_virtual_upcast_offsets): Likewise.
21967 (fixup_all_virtual_upcast_offsets): Likewise.
21968 (dfs_find_vbase_instances): New function.
21969 (find_vbase_instance): Likewise.
21970
21971 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
21972
21973 * lex.c (DIR_SEPARATOR): Delete macro.
21974
21975 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
21976
21977 * decl2.c (lang_decode_option): Handle automatic line wrapping
21978 option.
21979
21980 2000-01-11 Mark Mitchell <mark@codesourcery.com>
21981
21982 * friend.c (do_friend): Don't resolve scopes when processing
21983 template declarations, even if the qualifying scope doesn't
21984 involve template parameters.
21985
21986 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
21987
21988 * class.c (dfs_modify_vtables_queue_p): Remove.
21989 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21990 and dfs_marked_real_bases_queue_p instead of
21991 dfs_modify_vtables_queue_p.
21992
21993 * class.c (build_vbase_path): Simplify.
21994 (dfs_propagate_binfo_offsets): New function.
21995 (propagate_binfo_offsets): Use it.
21996 (remove_base_field): Simplify.
21997 (dfs_set_offset_for_vbases): Remove.
21998 (dfs_set_offset_for_shared_vbases): New function.
21999 (dfs_set_offset_for_unshared_vbases): Likewise.
22000 (layout_virtual_bases): Use them.
22001 (layout_basetypes): Don't call propagate_binfo_offsets.
22002 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
22003 for the vbases.
22004
22005 * class.c (build_base_field): New function, split out from ...
22006 (build_base_fields): ... here. Use it. Allocate primary bases
22007 first, under the new ABI.
22008 (get_vtable_entry): Remove.
22009 (remove_base_field): New function, split out from ...
22010 (remove_base_fields): ... here. Adjust since primary bases come
22011 first under the new ABI.
22012
22013 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
22014 (initialize_vtbl_ptrs): New function.
22015 (expand_indirect_vtbls_init): Change prototype.
22016 (convert_pointer_to_vbase): Declare.
22017 * init.c (expand_direct_vtbls_init): Remove.
22018 (dfs_initialize_vtbl_ptrs): New function.
22019 (initialize_vtbl_ptrs): Likewise.
22020 (emit_base_init): Use initialize_vtbl_ptrs.
22021 * search.c (convert_pointer_to_vbase): Make it global.
22022 (expand_indirect_vtbls_init): Remove vtable initialization code.
22023 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
22024
22025 * class.c (dfs_finish_vtbls): New function.
22026 (finish_vtbls): Use it.
22027 (dump_class_hierarchy): New function.
22028
22029 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
22030 (BINFO_VBASE_PRIMARY_P): New macro.
22031 (BINFO_VIRTUALS): Add to documentation.
22032 (SET_BINFO_PRIMARY_MARKED_P): Remove.
22033 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22034 (dfs_mark_primary_bases_queue_p): Likewise.
22035 (dfs_unmarked_real_bases_queue_p): New function.
22036 (dfs_marked_real_bases_queue_p): Likewise.
22037 * search.c (dfs_mark_primary_bases): Adjust.
22038 (mark_primary_bases): Likewise.
22039 (get_shared_vbase_if_not_primary): New function.
22040 (dfs_unmarked_real_bases_queue_p): Likewise.
22041 (dfs_marked_real_bases_queue_p): Likewise.
22042 (dfs_get_pure_virtuals): Simplify.
22043 (get_pure_virtuals): Likewise.
22044
22045 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22046
22047 * lex.c: Include tm_p.h.
22048
22049 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
22050
22051 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
22052
22053 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
22054
22055 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
22056 * pt.c (instantiate_decl): Defer comdat templates that might not be
22057 needed.
22058
22059 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
22060 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
22061 (finish_file): Likewise.
22062
22063 * decl2.c (import_export_class): Undo 12/14 change.
22064
22065 * error.c (dump_decl): operator new, not operatornew.
22066
22067 * class.c (field_decl_cmp): A nontype is "greater" than a type.
22068 * search.c (lookup_field_1): Look for the last field with the
22069 desired name.
22070
22071 2000-01-05 Nathan Sidwell <nathan@acm.org>
22072
22073 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
22074 FUNCTION_DECL.
22075
22076 2000-01-05 Nathan Sidwell <nathan@acm.org>
22077
22078 * typeck.c (build_static_cast): Don't strip target qualifiers
22079 when casting from a class.
22080
22081 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22082
22083 * class.c (warn_hidden): Initialize variable `fndecl'.
22084
22085 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
22086
22087 * decl.c (flag_isoc9x): New variable to be able to use code in
22088 c-common.c. For now always zero.
22089
22090 2000-01-03 Mark Mitchell <mark@codesourcery.com>
22091
22092 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
22093 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
22094 or unshare_base_binfos for virtual bases here.
22095 * search.c (dfs_get_vbase_types): Do it here.
22096 (get_vbase_types): Adjust.
22097
22098 2000-01-02 Mark Mitchell <mark@codesourcery.com>
22099
22100 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
22101 (BINFO_PRIMARY_MARKED_P): Use flag 5.
22102 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22103 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22104 (unmark_primary_bases): Remove declaration.
22105 (unmarkedp): Declare.
22106 (dfs_vbase_unmark): Likewise.
22107 * class.c (determine_primary_base): Return immediately if there
22108 are no base classes. Call mark_primary_bases here.
22109 (modify_all_direct_vtables): Remove.
22110 (modify_all_indirect_vtables): Remove.
22111 (dfs_modify_vtables_queue_p): New function.
22112 (dfs_modify_vtables): New function.
22113 (modify_all_vtables): Use them.
22114 (build_base_fields): Build FIELD_DECLs for primary virtual base
22115 classes.
22116 (create_vtable_ptr): Don't call determine_primary_base here.
22117 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22118 (dfs_set_offset_for_vbases): ... this.
22119 (layout_virtual_bases): Use it.
22120 (layout_class_type): Call determine_primary_base here.
22121 * search.c (unmarkedp): Make it global.
22122 (shared_marked_p): Simplify.
22123 (shared_unmarked_p): Likewise.
22124 (dfs_primary_bases_queue_p): Remove.
22125 (dfs_unmark_primary_bases): Likewise.
22126 (unmark_primary_bases): Likewise.
22127 (mark_primary_bases): Simplify.
22128 (get_pure_virtuals): Don't call mark_primary_bases here.
22129 (dfs_vbase_unmark): New function.
22130 (get_vbase_types): Simplify.
22131
22132 * class.c (struct base_info): Remove.
22133 (determine_primary_base): Take has_virtual_p rather than a
22134 base_info as input. Don't calculate max_has_virtual.
22135 (finish_struct_bits): Remove max_has_virtual argument.
22136 (create_vtable_ptr): Remove max_has_virtual_p argument.
22137 (layout_virtual_bases): Remove max argument.
22138 (layout_basetypes): Likewise.
22139 (layout_class_type): Remove max_has_virtual_p argument.
22140 (finish_struct_1): Remove max_has_virtual.
22141
22142 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22143 (layout_basetypes): Remove.
22144 * class.c (propagate_binfo_offsets): Moved here from tree.c.
22145 Update to handle primary virtual bases.
22146 (remove_base_fields): New function, split out from
22147 layout_basetypes.
22148 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22149 (layout_virtual_bases): New function, split out from
22150 layout_basetypes. Update to handle primary virtual bases.
22151 (layout_basetypes): Moved here from tree.c. Use
22152 remove_base_fields and layout_virtual_bases.
22153 * search.c (dfs_mark_primary_bases_queue_p): New function.
22154 (mark_primary_bases): Use it.
22155 * tree.c (CEIL): Remove.
22156 (propagate_binfo_offsets): Remove.
22157 (layout_basetypes): Remove.
22158
22159 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22160
22161 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22162 (BINFO_PRIMARY_MARKED_P): New macro.
22163 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22164 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22165 (mark_primary_bases): New function.
22166 (unmark_primary_bases): Likewise.
22167 * search.c (get_abstract_virtuals_1): Remove.
22168 (dfs_mark_primary_bases): New function.
22169 (mark_primary_bases): Likewise.
22170 (dfs_unmark_primary_bases): Likewise.
22171 (unmark_primary_bases): Likewise.
22172 (dfs_get_pure_virtuals): Likewise.
22173
22174 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22175
22176 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22177 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22178 (modify_one_vtable): Adjust.
22179 (fixup_vtable_deltas1): Likewise.
22180 (override_one_vtable): Likewise.
22181 * search.c (get_abstract_virtuals_1): Likewise.
22182 (get_pure_virtuals): Likewise.
22183 (expand_upcast_fixups): Likewise.
22184 * tree.c (debug_binfo): Likewise.
22185
22186 * class.c (build_vtable): Don't return a value. Don't rebuild
22187 vtables for bases that have already been handled.
22188 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22189 already been handled.
22190 (modify_one_vtable): Adjust accordingly.
22191 (fixup_vtable_deltas1): Likewise.
22192 (finish_struct_1): Likewise.
22193
22194 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
22195
22196 * call.c (build_new_method_call): Also check destructors.