re PR c++/13305 (Parser error with 'class __attribute__((dllimport)) Foo;' type...
[gcc.git] / gcc / cp / ChangeLog
1 2003-12-05 Danny Smith <dannysmith@gcc.gnu.org>
2 Mark Mitchell <mark@codesourcery.com>
3
4 PR c++/13305
5 * parser.c (cp_parser_elaborated_type_specifier): Accept
6 attributes.
7
8 2003-12-05 Mark Mitchell <mark@codesourcery.com>
9
10 PR c++/13314
11 * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
12 calls.
13 (cp_parser_class_head): Likewise.
14
15 2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16
17 PR c++/13166
18 * parser.c (cp_parser_late_parsing_default_args): Make sure the
19 context is a class before calling push_nested_class and
20 pop_nested_class.
21
22 2003-12-03 James E Wilson <wilson@specifixinc.com>
23
24 * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
25 support.
26
27 2003-12-03 Mark Mitchell <mark@codesourcery.com>
28
29 PR c++/9127
30 * cp-tree.h (at_namespace_scope_p): New function.
31 * parser.c (cp_parser_class_head): Handle invalid explicit
32 specializations.
33 * search.c (at_namespace_scope_p): New function.
34
35 PR c++/13179
36 * semantics.c (finish_handler_parms): Do not call eh_type_info for
37 types used in templates.
38
39 PR c++/10771
40 * parser.c (cp_parser_check_for_invalid_template_id): New
41 function.
42 (cp_parser_simple_type_specifier): Use it.
43 (cp_parser_elaborated_type_specifier): Likewise.
44 (cp_parser_class_head): Likewise.
45
46 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
47
48 PR c++/10126
49 * pt.c (convert_nontype_argument): Handle default conversions
50 while converting a pointer to member function.
51
52 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
53
54 PR c++/12573
55 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
56 looking into them recursively.
57
58 2003-12-02 Richard Henderson <rth@redhat.com>
59
60 * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
61 * parser.c (struct cp_token): Likewise.
62 (struct cp_parser_token_tree_map_node): Likewise.
63 * lex.c (struct resword): Move const after ENUM_BITFIELD.
64
65 2003-11-30 Mark Mitchell <mark@codesourcery.com>
66
67 PR c++/9849
68 * parser.c (cp_lexer_prev_token): New function.
69 (cp_parser_skip_to_closing_parenthesis): Add consume_paren
70 parameter.
71 (cp_parser_nested_name_specifier_opt): Add is_declaration
72 parameter.
73 (cp_parser_nested_name_specifier): Likewise.
74 (cp_parser_class_or_namespace_name): Likewise.
75 (cp_parser_class_name): Likewise.
76 (cp_parser_template_id): Likewise.
77 (cp_parser_template_name): Likewise.
78 (cp_parser_id_expression): Adjust calls to
79 cp_parser_nested_name_specifier_op, cp_parser_template_id,
80 cp_parser_class_name.
81 (cp_parser_unqualified_id): Likewise.
82 (cp_parser_postfix_expression): Likewise.
83 (cp_parser_pseudo_destructor_name): Likewise.
84 (cp_parser_cast_expression): Likewise.
85 (cp_parser_mem_initializer_id): Likewise.
86 (cp_parser_simple_type_specifier): Likewise.
87 (cp_parser_type_name): Likewise.
88 (cp_parser_elaborated_type_specifier): Likewise.
89 (cp_parser_qualified_namespace_specifier): Likewise.
90 (cp_parser_using_declaration): Likewise.
91 (cp_parser_using_directive): Likewise.
92 (cp_parser_ptr_operator): Likewise.
93 (cp_parser_declarator_id): Likewise.
94 (cp_parser_class_head): Likewise.
95 (cp_parser_base_specifier): Likewise.
96 (cp_parser_constructor_declarator_p): Likewise.
97 (cp_parser_direct_declarator): Fix typo in comment.
98 (cp_parser_parenthesized_expression_list): Adjust call to
99 cp_parser_skip_to_closing_parenthesis.
100 (cp_parser_selection_statement): Likewise.
101
102 2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
103
104 PR c++/12924
105 * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
106 with OVERLOAD and DECL nodes as the first operand.
107
108 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
109
110 * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
111
112 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
113
114 PR c++/5369
115 * friend.c (is_friend): Handle member function of a class
116 template as template friend.
117 (do_friend): Likewise.
118 * decl2.c (check_classfn): Add template_header_p parameter.
119 * decl.c (start_decl): Adjust check_classfn call.
120 (grokfndecl): Likewise.
121 * pt.c (is_specialization_of_friend): New function.
122 (uses_template_parms_level): Likewise.
123 (push_template_decl_real): Use uses_template_parms_level.
124 (tsubst_friend_function): Adjust check_classfn call.
125 * cp-tree.h (check_classfn): Adjust declaration.
126 (uses_template_parms_level): Add declaration.
127 (is_specialization_of_friend): Likewise.
128
129 2003-11-21 Mark Mitchell <mark@codesourcery.com>
130
131 PR c++/12515
132 * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
133 operator.
134
135 2003-11-21 Jan Hubicka <jh@suse.cz>
136
137 * parser.c (cp_parser_postfix_expression): Initialize 's' to
138 NULL_TREE.
139
140 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
141
142 * Make-lang.in (c++.extraclean): Delete.
143
144 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
145
146 * Make-lang.in (check-g++, lang_checks): Add.
147
148 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
149
150 PR c++/12932
151 * class.c (currently_open_derived_class): Check if
152 current_class_type is NULL_TREE.
153 * semantics.c (finish_call_expr): Check if
154 currently_open_derived_class returns NULL_TREE.
155 * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
156 parameter.
157
158 2003-11-17 Jason Merrill <jason@redhat.com>
159
160 * init.c (build_new_1): Preevaluate placement args.
161 * call.c (build_op_delete_call): Don't expose placement args to
162 overload resolution.
163
164 2003-11-16 Jason Merrill <jason@redhat.com>
165
166 * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
167 and TAGS files that include them for each front end.
168
169 2003-11-15 Bernardo Innocenti <bernie@develer.com>
170
171 PR c++/2294
172 * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
173 build failure on libjava.
174
175 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
176
177 PR c++/2294
178 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
179 unless the declaration is a built-in.
180 (set_namespace_binding): While binding OVERLOADs with only one
181 declaration, we still need to call supplement_binding.
182
183 2003-11-14 Mark Mitchell <mark@codesourcery.com>
184
185 PR c++/12762
186 * parser.c (cp_parser_enclosed_template_argument_list): New
187 function.
188 (cp_parser_template_id): Use it.
189 (cp_parser_simple_type_specifier): Recognize invalid template
190 syntax.
191
192 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
193
194 PR c++/2094
195 * pt.c (unify): Add support for PTRMEM_CST and
196 FIELD_DECL unification.
197
198 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
199
200 * decl.c (grokfndecl): Change OK to type tree.
201
202 2003-11-12 Mark Mitchell <mark@codesourcery.com>
203
204 * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
205 CONSTRUCTOR.
206
207 * decl.c (cp_make_fname_decl): When creating a top-level
208 __FUNCTION__-like symbol, do register it with pushdecl.
209
210 * decl.c (finish_case_label): Do not check that we are within a
211 switch statement here.
212 * parser.c (struct cp_parser): Add in_iteration_statement_p and
213 in_switch_statement_p.
214 (cp_parser_new): Initialize them.
215 (cp_parser_labeled_statement): Check validity of case labels
216 here.
217 (cp_parser_selection_statement): Set in_switch_statement_p.
218 (cp_parser_iteration_statement): Set in_iteration_statement_p.
219 (cp_parser_jump_statement): Check validity of break/continue
220 statements here.
221
222 PR c++/12735
223 * cp-tree.h (duplicate_decls): Return a tree.
224 * decl.c (duplicate_decls): Clarify documentation. Return
225 error_mark_node to indicate a failed redeclaration.
226 * friend.c (do_friend): Handle that case.
227 * name-lookup.c (pushdecl): Likewise.
228
229 2003-11-11 Jason Merrill <jason@redhat.com>
230
231 * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
232 * name-lookup.c (parse_using_directive): New fn.
233 (is_associated_namespace): New fn.
234 (arg_assoc_namespace): Also check associated namespaces.
235 * name-lookup.h: Declare new fns.
236 * pt.c (maybe_process_partial_specialization): Allow
237 specialization in associated namespace.
238 * parser.c (cp_parser_using_directive): Accept attributes. Use
239 parse_using_directive.
240
241 2003-11-10 Richard Henderson <rth@redhat.com>
242
243 * cvt.c (convert_to_void): Use void_zero_node after overload failure.
244
245 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
246
247 PR c++/12832
248 * name-lookup.c (supplement_binding): Gracefully handle names
249 used at non-class scope prior declaration.
250
251 2003-11-06 Matt Austern <austern@apple.com>
252
253 * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
254 * method.c (use_thunk): give thunk same visibility as function.
255 * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
256
257 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
258
259 PR c++/11616
260 * pt.c (instantiate_pending_templates): Save and restore
261 input_location.
262
263 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
264
265 PR c++/2019
266 * friend.c (add_friend): Don't display previous declaration in
267 case of duplicate friend warning.
268
269 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
270
271 PR c++/9810
272 * call.c (build_over_call): Check access using primary template
273 if FN is a member function template.
274
275 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
276
277 PR c++/12796
278 * class.c (handle_using_decl): Set input_location before calling
279 error_not_base_type.
280
281 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
282
283 PR c++/10371
284 * semantics.c (finish_non_static_data_member): Handle when
285 both processing_template_decl and qualifying_scope are true.
286
287 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
288
289 PR c++/11076
290 * class.c (handle_using_decl): Swap arguments of error_not_base_type.
291 * parser.c (cp_parser_direct_declarator): Only resolve typename for
292 namespace scope declarations.
293
294 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
295
296 PR c++/12698, c++/12699, c++/12700, c++/12566
297 * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
298 (debug_class, debug_thunks): New.
299 * class.c (dump_class_hierarchy_1): New break out from ...
300 (dump_class_hierarchy): ... here.
301 (dump_thunk, debug_thunks, debug_class): New.
302 (update_vtable_entry_for_fn): Add ssizetype casts. Correct
303 continued search for primary binfo via virtual.
304 (build_vtbl_initializer): Follow covariant thunk alias.
305 * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
306 (finish_thunk): Look for an alias of the covariant thunk and point
307 to it.
308 (use_thunk): We should never use an alias.
309 * semantics.c (emit_associated_thunks): Do not emit aliases.
310
311 PR c++/12566
312 * cp-tree.h (cp_fname_init): Add TYPE pointer param.
313 * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
314 create an ad-hoc ERROR_MARK.
315 (cp_make_fname_decl): Adjust.
316 * pt.c (tsubst_expr): Adjust.
317
318 2003-10-23 Jason Merrill <jason@redhat.com>
319
320 PR c++/12726
321 * tree.c (build_target_expr_with_type): Don't call force_rvalue
322 for CONSTRUCTORs.
323
324 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
325
326 * call.c: Fix comment formatting.
327 * class.c: Likewise.
328 * cxx-pretty-print.c: Likewise.
329 * init.c: Likewise.
330 * parser.c: Likewise.
331 * pt.c: Likewise.
332 * semantics.c: Likewise.
333 * tree.c: Likewise.
334 * typeck.c: Likewise.
335 * typeck2.c: Likewise.
336
337 2003-10-21 Mark Mitchell <mark@codesourcery.com>
338
339 PR c++/11962
340 * typeck.c (build_x_conditional_expr): Handle missing middle
341 operands in templates.
342 * mangle.c (write_expression): Issue errors about attempts to
343 mangle a non-existant middle operator to the ?: operator.
344
345 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
346 * decl.c (cp_finish_decl): Remove clause intended for asm directives
347 in struct or class fields: this code is never executed.
348
349 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
350
351 * decl.c (start_decl): Exit if push_template_decl returns
352 error_mark_node.
353
354 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
355
356 * ChangeLog: Fix typos.
357 * call.c: Fix comment typos.
358 * class.c: Likewise.
359 * cp-tree.h: Likewise.
360 * cvt.c: Likewise.
361 * cxx-pretty-print.c: Likewise.
362 * decl.c: Likewise.
363 * decl2.c: Likewise.
364 * init.c: Likewise.
365 * mangle.c: Likewise.
366 * name-lookup.c: Likewise.
367 * parser.c: Likewise.
368 * search.c: Likewise.
369 * semantics.c: Likewise.
370 * tree.c: Likewise.
371 * typeck.c: Likewise.
372
373 2003-10-20 Jan Hubicka <jh@suse.cz>
374
375 * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
376 the expansion.
377
378 2003-10-20 Mark Mitchell <mark@codesourcery.com>
379
380 * Make-lang.in (c++.install-info): Remove.
381
382 2003-10-20 Jason Merrill <jason@redhat.com>
383
384 * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
385 field.
386
387 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
388
389 PR c++/9781, c++/10583, c++/11862
390 * decl.c (cp_finish_decl): Exit immediately if decl is an
391 error_mark_node.
392 * pt.c (push_template_decl_real): Return error_mark_node for
393 invalid template declaration of variable.
394
395 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
396
397 PR c++/12495
398 * pt.c (lookup_template_class): Handle when current_class_type
399 is a local class.
400
401 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
402
403 PR c++/2513
404 * decl.c (make_typename_type): Use dependent_type_p.
405 (make_unbound_class_template): Likewise.
406 * pt.c (instantiate_class_template): Increment
407 processing_template_decl during substitution of template friend
408 function. Preincrement processing_template_decl rather than
409 postincrement.
410 (get_mostly_instantiated_function_type): Increment
411 processing_template_decl during partial substitution of function
412 type.
413
414 2003-10-15 Jan Hubicka <jh@suse.cz>
415
416 PR c++/12574
417 * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
418
419 2003-10-14 Jason Merrill <jason@redhat.com>
420
421 PR c++/11878
422 * tree.c (build_target_expr_with_type): Call force_rvalue for
423 classes with non-trivial copy ctors.
424
425 PR c++/11063
426 * typeck.c (build_modify_expr): Call convert rather than abort.
427
428 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
429
430 Breack out decl.c (3/n)
431 * name-lookup.c: Include flags.h
432 (lookup_name_current_level): Make static.
433 (add_decl_to_level): Likewise.
434 (push_local_binding): Likewise.
435 (push_overloaded_decl): Likewise.
436 (lookup_using_namespace): Likewise.
437 (qualified_lookup_using_namespace): Likewise.
438 (lookup_type_current_level): Likewise.
439 (unqualified_namespace_lookup): Likewise.
440 (namespace_ancestor): Likewise.
441 (push_using_directive): Likewise.
442 * decl.c (pushdecl): Move to name-lookup.c.
443 (pushdecl_top_level_1): Likewise.
444 (pushdecl_top_level): Likewise.
445 (pushdecl_top_level_and_finish): Likewise.
446 (maybe_push_decl): Likewise.
447 (push_using_decl): Likewise.
448 (push_overloaded_decl): Likewise.
449 (make_anon_name): Likewise.
450 (anon_cnt): Likewise.
451 (clear_anon_tags): Likewise.
452 (maybe_inject_for_scope_var): Likewise.
453 (check_for_out_of_scope_variable): Likewise.
454 * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
455 * decl.c (warn_extern_redeclared_static): Export.
456 * cp-tree.h (warn_extern_redeclared_static): Declare.
457
458 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
459
460 * Make-lang.in: Replace uses of $(target_alias) with
461 $(target_noncanonical).
462
463 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
464
465 * ChangeLog: Add PR number to patch for PR c++/12370.
466
467 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
468
469 * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
470 (binding_for_name): Likewise.
471 (cxx_binding_clear): Move to name-lookup.c.
472 * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
473 (binding_for_name): Likewise.
474 * decl2.c (is_ancestor): Move to name-lookup.c
475 (namespace_ancestor): Likewise.
476 (add_using_namespace): Likewise.
477 (ambiguous_decl): Likewise.
478 (lookup_using_namespace): Likewise.
479 (qualified_lookup_using_namespace): Likewise.
480 (set_decl_namespace): Likewise.
481 (decl_namespace): Likewise.
482 (current_decl_namespace): Likewise.
483 (push_decl_namespace): Likewise.
484 (pop_decl_namespace): Likewise.
485 (push_scope): Likewise.
486 (pop_scope): Likewise.
487 (struct arg_lookup): Likewise.
488 (arg_assoc): Likewise.
489 (arg_assoc_args): Likewise.
490 (arg_assoc_type): Likewise.
491 (add_function): Likewise.
492 (arg_assoc_namespace): Likewise.
493 (arg_assoc_class): Likewise.
494 (arg_assoc_template_arg): Likewise.
495 (do_namespace_alias): Likewise.
496 (validate_nonmember_using_decl): Likewise.
497 (do_nonmember_using_decl): Likewise.
498 (do_toplevel_using_decl): Likewise.
499 (do_local_using_decl): Likewise.
500 (do_class_using_decl): Likewise.
501 (do_using_directive): Likewise.
502 (constructor_name_full): Likewise.
503 (constructor_name): Likewise.
504 (constructor_name_p): Likewise.
505
506 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
507
508 Break out decl.c (2/n)
509 * name-lookup.c: Include diagnostic.h
510 (cxx_binding_free): Make static.
511 (cxx_binding_make): Likewise.
512 (binding_table_new): Likewise
513 (binding_table_free): Likewise.
514 (binding_table_insert): Likewise.
515 (binding_table_find_anon_type): Likewise.
516 (binding_table_reverse_maybe_remap): Likewise.
517 (supplement_binding): Likewise.
518 * name-lookup.h (global_scope_name): Declare extern.
519 (global_type_node): Likewise.
520 (cxx_binding_free): Don't export.
521 (cxx_binding_make): Likewise.
522 (binding_table_new): Likewise.
523 (binding_table_free): Likewise.
524 (binding_table_insert): Likewise.
525 (binding_table_find_anon_type): Likewise.
526 (binding_table_reverse_maybe_remap): Likewise.
527 * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
528 * decl.c (lookup_namespace_name): Move to name-lookup.c
529 (select_decl): Likewise.
530 (unqualified_namespace_lookup): Likewise.
531 (lookup_qualified_name): Likewise.
532 (lookup_name_real): Likewise.
533 (lookup_name_nonclass): Likewise.
534 (lookup_function_nonclass): Likewise.
535 (lookup_name): Likewise.
536 (lookup_name_current_level): Likewise.
537 (lookup_type_current_level): Likewise.
538 (lookup_flags): Likewise.
539 (qualify_lookup): Likewise.
540 (lookup_tag): Likewise.
541 (lookup_tag_reverse): Likewise.
542 (getdecls): Likewise.
543 (storedecls): Remove.
544 (cxx_remember_type_decls): Move to name-lookup.c.
545 (global_bindings_p): Likewise.
546 (innermost_nonclass_level): Likewise.
547 (toplevel_bindings_p): Likewise.
548 (namespace_bindings_p): Likewise.
549 (kept_level_p): Likewise.
550 (innermost_scope_kind): Likewise.
551 (template_parm_scope_p): Likewise.
552 (push_binding): Likewise.
553 (push_local_binding): Likewise.
554 (add_decl_to_level): Likewise. Make extern.
555 (push_class_binding): Move to name-lookup.c.
556 (resume_level): Likewise. Rename to resume_scope.
557 (begin_scope): Move to name-lookup.c.
558 (indent): Likewise.
559 (binding_depth): Likewise.
560 (is_class_level): Likewise.
561 (cxx_scope_descriptor): Likewise.
562 (cxx_scope_debug): Likewise.
563 (namespace_scope_ht_size): Likewise.
564 (leave_scope): Likewise.
565 (pushlevel_class): Likewise.
566 (poplevel_class): Likewise.
567 (clear_identifier_class_values): Likewise.
568 (pushdecl_with_scope): Likewise.
569 (pushdecl_namespace_level): Likewise.
570 (pushdecl_class_level): Likewise.
571 (push_class_level_binding): Likewise.
572 (push_using_directive): Likewise.
573 (identifier_global_value): Likewise.
574 (keep_next_level_flag): Likewise.
575 (keep_next_level): Likewise.
576 (free_binding_level): Likewise.
577 (set_class_shadows): Likewise.
578 (maybe_push_cleanup_level): Likewise.
579 (cp_namespace_decls): Likewise.
580 (bt_print_entry): Likewise.
581 (print_binding_level): Likewise.
582 (print_other_binding_stack): Likewise.
583 (print_binding_stack): Likewise.
584 (push_namespace): Likewise.
585 (pop_namespace): Likewise.
586 (push_nested_namespace): Likewise.
587 (pop_nested_namespace): Likewise.
588 (cxx_saved_binding_make): Likewise.
589 (struct cxx_saved_binding_make): Likewise.
590 (store_bindings): Likewise.
591 (maybe_push_to_top_level): Likewise.
592 (push_to_top_level): Likewise.
593 (pop_from_top_level): Likewise.
594 (identifier_type_value): Likewise.
595 (set_identifier_type_value): Likewise.
596 (set_identifier_type_value_with_scope): Likewise.
597 (pop_everything): Likewise.
598 (pushtag): Likewise.
599 (follow_tag_typedef): Likewise.
600 (maybe_process_template_type_declaration): Likewise.
601 (pop_binding): Likewise.
602 * cp-tree.h: Move corresponding declarations to name-lookup.h
603
604 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
605
606 * cvt.c (ocp_convert): Move warning to C common code.
607
608 2003-10-09 Jason Merrill <jason@redhat.com>
609
610 PR c++/6392
611 * tree.c (build_cplus_array_type): Handle all quals the same.
612 (cp_build_qualified_type_real): Look through arrays first.
613
614 * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
615 (build_target_expr_with_type): Likewise.
616
617 * pt.c (instantiate_class_template): Sanity check that our
618 enclosing class has been instantiated.
619
620 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
621
622 * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
623 * error.c (dump_function_decl): Use it to skip the dump of the
624 arguments.
625 (dump_expr): When dumping a declaration found within an
626 expression, always set TFF_NO_FUNCTION_ARGUMENTS
627 in the flags.
628
629 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
630
631 PR c++/11097
632 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
633 USING_DECL.
634
635 2003-10-06 Mark Mitchell <mark@codesourcery.com>
636
637 PR c++/10147
638 * call.c (initialize_reference): Tweak error message.
639 * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
640 pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
641 * cxx-pretty-print.c (pp_cxx_id_expression): Always display
642 qualified entities using qualified names.
643
644 PR c++/12337
645 * init.c (build_new_1): Make sure that the expression returned is
646 not an lvalue.
647
648 PR c++/12344, c++/12236, c++/8656
649 * decl.c (start_function): Do not ignore attributes embedded in a
650 function declarator.
651
652 2003-10-06 Mark Mitchell <mark@codesourcery.com>
653
654 * Make-lang.in (c++.info): Remove.
655 (c++.dvi): Remove.
656 (c++.generated-manpages): Replace with ...
657 (generated-manpages): ... this.
658
659 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
660
661 * decl.c (struct cp_binding_level): Move to name-lookup.h
662 (current_binding_level): Likewise.
663 (class_binding_level): Likewise.
664 * cp-tree.h (enum scope_kind): Likewise.
665
666 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
667
668 * name-lookup.c (binding_entry_free): Nullify name and type
669 fields.
670
671 2003-10-02 Mark Mitchell <mark@codesourcery.com>
672
673 PR c++/12486
674 * typeck.c (finish_class_member_access_expr): Issue diagnostic
675 on erroneous use of qualified name.
676
677 2003-09-30 Richard Henderson <rth@redhat.com>
678
679 PR c++/12370
680 * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
681
682 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
683
684 * g++spec.c: Convert to ISO C90 prototypes.
685 * parser.c: Likewise.
686
687 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
688
689 * decl.c (pop_binding): Don't mess with nullifying binding->scope
690 here.
691 * name-lookup.c: Re-format.
692 (cxx_binding_free): Nullify binding->scope.
693
694 2003-09-29 Jan Hubicka <jh@suse.cz>
695
696 PR C++/12047
697 * except.c (build_eh_type_type): Call mark_used on the type.
698
699 2003-09-28 Richard Henderson <rth@redhat.com>
700
701 * typeck.c (c_expand_asm_operands): Take location_t, instead of
702 individual file and line.
703
704 2003-09-28 Andreas Jaeger <aj@suse.de>
705
706 * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
707 definition.
708 * init.c (push_base_cleanups): Likewise.
709 * decl2.c (finish_file): Likewise.
710 * mangle.c (init_mangle): Likewise.
711 (dump_substitution_candidates): Likewise.
712 * search.c: Likewise.
713
714 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
715
716 * name-lookup.h (get_global_value_if_present): New function.
717 (is_typename_at_global_scope): Likewise.
718 * except.c (do_begin_catch): Use get_global_value_if_present.
719 (do_end_catch): Likewise.
720 (do_allocate_exception): Likewise.
721 (do_free_exception): Likewise.
722 (build_throw): Likewise.
723 * parser.c (cp_parser_member_declaration): Likewise.
724 * rtti.c (throw_bad_cast): Likewise.
725 (throw_bad_typeid): Likewise.
726 * decl.c (check_tag_decl): Use is_typename_at_global_scope.
727 (grokdeclarator): Likewise.
728 * cp-tree.h (global_namespace): Move to name-lookup.h
729 * call.c (call_builtin_trap): Tidy.
730
731 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
732
733 PR c++/11415
734 * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
735 error message when parser->scope is global_namespace.
736
737 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
738
739 * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
740 macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
741
742 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
743
744 * decl.c (pop_binding_level, suspend_binding_level,
745 find_class_binding_level): Merge into leave_scope. Remove.
746 (leave_scope): New function.
747 (poplevel): Update.
748 (poplevel_class): Likewise.
749 (pop_namespace): Likewise.
750
751 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
752
753 PR c++/5655
754 * parser.c (cp_parser_check_access_in_redeclaration): New function.
755 (cp_parser_member_declaration): Use it.
756 (cp_parser_template_declaration_after_export): Likewise.
757
758 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
759
760 * cp-tree.h (scope_kind): Add new enumerator.
761 (keep_next_level): Change parameter type to bool.
762 (begin_scope): Change prototype.
763 (pushlevel): Remove declaration.
764 * decl.c (push_binding_level): Fold in begin_scope. Remove.
765 (struct cp_binding_level): Remove tag_tranparent field. Make keep
766 of bitsize one.
767 (keep_next_level_flag): Make a bool.
768 (cxx_scope_descriptor): Update scope names table
769 (make_cxx_scope): Fold in begin_scope. Remove..
770 (namespace_scope_ht_size): New function.
771 (begin_scope): Change prototype. Return a scope. Tidy.
772 (kept_level_p): Update.
773 (pushlevel): Remove.
774 (maybe_push_cleanup_level): Simplify.
775 (poplevel): Update for sk_cleanup and keep change.
776 (print_binding_level): Likewise.
777 (initial_push_namespace_scope): Fold in begin_scope. Remove.
778 (push_namespace): Update.
779 (pushtag): Likewise.
780 (lookup_tag): Likewise.
781 (lookup_name_current_level): Likewise.
782 (lookup_type_current_level): Likewise.
783 (cxx_init_decl_processing): Likewise.
784 (start_function): Likewise.
785 (begin_function_body): Likewise.
786 (start_method): Likewise.
787 * pt.c (push_inline_template_parms_recursive): Likewise.
788 (begin_template_parm_list): Likewise.
789 (begin_specialization): Likewise.
790 * semantics.c (do_pushlevel): Likewise.
791 (begin_compound_stmt): Likewise.
792 (begin_stmt_expr): Likewise.
793
794 2003-09-21 Richard Henderson <rth@redhat.com>
795
796 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
797 method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
798
799 2003-09-21 Richard Henderson <rth@redhat.com>
800
801 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
802 method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
803 DECL_SOURCE_LOCATION rename and change to const.
804
805 2003-09-20 Richard Henderson <rth@redhat.com>
806
807 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
808
809 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
810
811 PR c++/157
812 * parser.c (cp_parser_direct_declarator): Clear
813 parser->num_template_parameter_lists when parsing function
814 parameters.
815 (cp_parser_constructor_declarator_p): Likewise.
816
817 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
818
819 PR c++/495
820 * pt.c (tsubst_friend_class): Only use innermost template
821 arguments for the injected friend class template.
822
823 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
824
825 PR c++/12332
826 * pt.c (instantiate_class_template): Increment
827 processing_template_decl around the tsubst of a template member
828 function.
829
830 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
831
832 * decl.c (cxx_scope_descriptor): Fix thinko.
833 (struct cp_binding_level): Adjust type of binding_depth field.
834
835 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
836
837 PR c++/12320
838 * call.c (type_passed_as): Check for incomplete type.
839 (convert_for_arg_passing): Likewise.
840
841 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
842
843 PR c++/9848
844 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
845 here.
846 * semantics.c (expand_body): Set it here on the remaining clones.
847
848 2003-09-18 Roger Sayle <roger@eyesopen.com>
849
850 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
851 * class.c (instantiate_type): Remove FFS_EXPR case.
852
853 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
854
855 * ChangeLog: Fix recent commit.
856
857 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
858
859 * ChangeLog: Add PR number to patch for PR c++/12316.
860
861 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
862
863 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
864 "C" types.
865 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
866
867 2003-09-17 Richard Henderson <rth@redhat.com>
868
869 * semantics.c (expand_body): Don't save/restore input_location.
870
871 2003-09-17 Mark Mitchell <mark@codesourcery.com>
872
873 PR c++/12266
874 * cp-tree.h (tsubst_flags_t): Add tf_conv.
875 * class.c (standard_conversion): Pass tf_conv to
876 instantiate_type.
877 (resolve_address_of_overloaded_function): Do not call mark_used
878 when just checking conversions.
879
880 PR debug/12066
881 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
882 * cp-tree.h (cxx_builtin_type_decls): Declare.
883 * decl.c (builtin_type_decls): New variables.
884 (cxx_builtin_type_decls): New function.
885 (record_builtin_type): Add to builtin_type_decls.
886
887 2003-09-17 Richard Henderson <rth@redhat.com>
888
889 PR c++/12316
890 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
891
892 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
893
894 PR c++/7939
895 * typeck.c (comptypes): Don't ICE when its first argument is
896 error_mark_node.
897 (compparms): Reverse the arguments of same_type_p.
898
899 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
900
901 PR c++/12184
902 * typeck.c (convert_arguments): Return error_mark_node for an
903 incomplete parameter. Make error message more informative.
904
905 2003-09-12 Mark Mitchell <mark@codesourcery.com>
906
907 PR c++/3907
908 * class.c (maybe_note_name_used_in_class): Refine test for whether
909 or not we are in a class scope.
910
911 * cp-tree.h (language_function): Remove x_expanding_p.
912 (expanding_p): Remove.
913 (doing_semantic_analysis_p): Remove.
914 (scope_kind): Add sk_function_parms, sk_class,
915 sk_namespace.
916 (innermost_scope_kind): New method.
917 * call.c (cxx_type_promotes_to): Use type_decays_to.
918 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
919 (LANG_HOOKS_POPLEVEL): Likewise.
920 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
921 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
922 is_catch_scope. Add kind and explicit_spec_p.
923 (cxx_scope_descriptor): Use a lookup table.
924 (find_class_binding_level): Use "kind" field in binding_level, not
925 the various flags.
926 (pop_binding_level): Likewise.
927 (innermost_nonclass_level): Likewise.
928 (toplevel_bindings_p): Likewise.
929 (namespace_bindings_p): Likewise.
930 (template_parm_scope_p): Likewise.
931 (innermost_scope_kind): New method.
932 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
933 the various flags.
934 (pushlevel): Remove check for doing_semantic_analysis_p.
935 (begin_scope): Simplify.
936 (add_decl_to_level): Use "kind" field in binding_level, not
937 the various flags.
938 (push_local_binding): Likewise.
939 (pop_label): Remove check for doing_semantic_analysis_p.
940 (poplevel): Use "kind" field in binding_level, not
941 the various flags.
942 (set_block): Remove check for doing_semantic_analysis_p.
943 (pushlevel_class): Use "kind" field in binding_level, not
944 the various flags.
945 (poplevel_class): Likewise.
946 (initial_push_namespace_scope): Likewise.
947 (maybe_push_to_top_level): Likewise.
948 (set_identifier_type_value_with_scope): Likewise.
949 (pop_everything): Likewise.
950 (maybe_process_template_type_declaration): Likewise.
951 (pushtag): Likewise.
952 (pushdecl): Likewise.
953 (pushdecl_with_scope): Likewise.
954 (check_previous_goto_1): Likewise.
955 (define_label): Likewise.
956 (finish_case_label): Likewise.
957 (lookup_tag): Likewise.
958 (unqualified_namespace_lookup): Likewise.
959 (lookup_name_real): Likewise.
960 (lookup_name_current_level): Likewise.
961 (lookup_type_current_level): Likewise.
962 (record_builtin_type): Likewise.
963 (cp_make_fname_decl): Likewise.
964 (maybe_inject_for_scope_var): Likewise.
965 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
966 (start_function): Use begin_scope, not pushlevel.
967 (finish_function): Use "kind" field in binding_level, not
968 the various flags.
969 (start_method): Use begin_scope, not pushlevel.
970 (make_label_decl): Do not check expanding_p.
971 (save_function-data): Do not set expanding_p.
972 (cxx_push_function_context): Do not clear expanding_p.
973 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
974
975 2003-09-14 Mark Mitchell <mark@codesourcery.com>
976
977 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
978 an bit-field whose width exceeds that of its type.
979
980 2003-09-14 Geoffrey Keating <geoffk@apple.com>
981
982 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
983
984 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
985
986 * ChangeLog: Follow spelling conventions.
987 * parser.c: Likewise.
988
989 2003-09-13 Richard Henderson <rth@redhat.com>
990
991 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
992 during relaxation loop.
993
994 2003-09-11 David Edelsohn <edelsohn@gnu.org>
995
996 * decl2.c (var_finalized_p): Swap arms of conditional.
997
998 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
999
1000 PR c++/11788
1001 * typeck.c (build_address): If it is a function, mark it used.
1002 (build_unary_op): Do not lose object's side-effects when taking
1003 address of static member function.
1004 * class.c (resolve_address_of_overloaded_function): Use
1005 tsubst_flags_t parameter. Only expect overload sets. Adjust.
1006 (instantiate_type): Adjust flags passing. Do not lose object's
1007 side-effects when taking address of static member function.
1008
1009 2003-09-11 Richard Henderson <rth@redhat.com>
1010
1011 * semantics.c (expand_or_defer_fn): Update for new
1012 cgraph_finalize_function argument.
1013
1014 2003-09-10 Richard Henderson <rth@redhat.com>
1015
1016 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
1017
1018 2003-09-10 Jan Hubicka <jh@suse.cz>
1019
1020 * decl2.c (var_finalized_p): New.
1021 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
1022
1023 2003-09-10 Richard Henderson <rth@redhat.com>
1024
1025 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
1026 mark_member_pointers.
1027 (lower_function): Remove.
1028 * cp-tree.h: Update to match.
1029 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
1030 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
1031
1032 2003-09-09 Richard Henderson <rth@redhat.com>
1033
1034 * semantics.c (expand_or_defer_fn): Update call to
1035 cgraph_finalize_function.
1036
1037 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1038 always.
1039
1040 * decl2.c (finish_file): Avoid out-of-bounds array reference
1041 during memmove.
1042
1043 2003-09-09 Richard Henderson <rth@redhat.com>
1044
1045 * decl2.c (mark_member_pointers): Rename from
1046 mark_member_pointers_and_eh_handlers and don't check eh handlers.
1047
1048 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
1049
1050 PR bootstrap/12168
1051 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1052
1053 2003-09-08 Mark Mitchell <mark@codesourcery.com>
1054
1055 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1056 c_register_builtin_type.
1057
1058 PR c++/11786
1059 * decl2.c (add_function): Do not complain about seeing the same
1060 non-function twice.
1061 * semantics.c (perform_koenig_lookup): Improve documentation.
1062
1063 PR c++/5296
1064 * pt.c (try_one_overload): Add addr_p parameter.
1065 (resolve_overloaded_unification): Pass it.
1066
1067 2003-09-08 Richard Henderson <rth@redhat.com>
1068
1069 * optimize.c (maybe_clone_body): Inc/dec function_depth.
1070
1071 2003-09-08 Richard Henderson <rth@redhat.com>
1072
1073 * decl.c (finish_function): Clear current_function_decl.
1074 * decl2.c (mark_used): Don't push/pop gc context.
1075 * optimize.c (optimize_function): Likewise.
1076 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1077 * pt.c (instantiate_decl): Inc/dec function_depth instead.
1078 * semantics.c (expand_body): Update for tree_rest_of_compilation
1079 nested argument.
1080
1081 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
1082
1083 PR c++/11762
1084 * error.c (dump_decl): Handle namespace-alias-definition.
1085 * decl.c (warn_extern_redeclared_static): There is no point in
1086 checking changes in storage class specifier for a namespace
1087 declaration.
1088 (duplicate_decls): Tidy diagnostic message.
1089 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1090 (pp_cxx_right_brace): Likewise.
1091 (pp_cxx_original_namespace_definition): New function.
1092 (pp_cxx_namespace_alias_definition): Likewise.
1093 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
1094
1095 2003-09-07 Jan Hubicka <jh@suse.cz>
1096
1097 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1098 Avoid re-emitting variables in unit-at-a-time mode.
1099
1100 2003-09-06 Mark Mitchell <mark@codesourcery.com>
1101
1102 PR c++/11867
1103 * call.c (standard_conversion): Improve comments.
1104 (perform_direct_initialization): Make sure we return an expression
1105 of the correct type.
1106 * typeck.c (build_static_cast): Check for ambiguity and
1107 accessibility when performing conversions.
1108
1109 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
1110
1111 * cp-tree.h (add_binding): Remove declaration.
1112 * name-lookup.h (supplement_binding): Declare.
1113 * decl.c (add_binding): Move to name-lookup.c.
1114 (push_local_binding): Adjust.
1115 (push_class_binding): Likewise.
1116 (set_identifier_type_value_with_scope): Likewise.
1117 * name-lookup.c (supplement_binding): Rename from add_binding.
1118 Return a bool. Improve documentation.
1119 (set_namespace_binding): Adjust.
1120 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1121
1122 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1123
1124 PR c++/11794
1125 * class.c (pushclass): Push dependent using decls for nested
1126 classes of templates too.
1127
1128 2003-09-06 Roger Sayle <roger@eyesopen.com>
1129
1130 PR c++/11409
1131 * class.c (resolve_address_of_overloaded_function): When building
1132 list of matching non-template function decls, ignore anticipated
1133 declarations of undeclared or shadowed GCC builtins.
1134
1135 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
1136
1137 PR c++/11595
1138 * decl.c (define_label): Remove unreachable timevar pop.
1139 Always return the decl, even if the definition is invalid.
1140
1141 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1142
1143 PR c++/12167
1144 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1145 unparsed functions queue.
1146
1147 2003-09-05 Mark Mitchell <mark@codesourcery.com>
1148
1149 PR c++/12163
1150 * call.c (perform_direct_initialization): Correct logic for
1151 direct-initialization of a class type.
1152
1153 PR c++/12146
1154 * pt.c (lookup_template_function): Robustify.
1155
1156 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
1157
1158 PR c++/11922
1159 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1160 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1161 is_type_p to lookup_qualified_name.
1162
1163 * semantics.c (finish_call_expr): Refactor some code.
1164
1165 PR c++/12037
1166 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1167 (build_min_non_dep): Declare.
1168 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1169 (build_min_non_dep): New.
1170 * cvt.c (convert_to_void): Don't explicitly copy
1171 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1172 * call.c (build_new_method_call): Use build_min_non_dep.
1173 * decl2.c (grok_array_decl): Likewise.
1174 (build_offset_ref_call_from_tree): Likewise.
1175 * typeck.c (finish_class_member_access_expr,
1176 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1177 build_x_conditional_expr, build_x_compound_expr): Likewise.
1178 (build_static_cast, build_reinterpret_cast,
1179 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1180 * typeck2.c (build_x_arrow): Use build_min_non_dep.
1181 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1182 template.
1183 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1184 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1185 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1186
1187 2003-09-04 Richard Henderson <rth@redhat.com>
1188
1189 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1190 change in cgraph_mark_needed_node arguments.
1191
1192 2003-09-02 Geoffrey Keating <geoffk@apple.com>
1193
1194 PR 12161
1195 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1196 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1197
1198 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
1199
1200 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1201 (expr_sizeof): Replace with ...
1202 (cxx_sizeof_or_alignof_expr): ... here.
1203 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1204 * parser.c (cp_parser_unary_expression): Commonize alignof and
1205 sizeof handling.
1206 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1207 substitution.
1208 * semantics.c (finish_sizeof, finish_alignof): Remove.
1209 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1210 becomes bool. Set TREE_READONLY.
1211 (expr_sizeof): Replace with ...
1212 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1213
1214 2003-09-04 Mark Mitchell <mark@codesourcery.com>
1215
1216 Remove cast-as-lvalue extension.
1217 * call.c (build_conditional_expr): Correct formatting.
1218 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1219 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1220 * cp-tree.h (non_cast_lvalue_p): Remove.
1221 (real_non_cast_lvalue_p): Remove.
1222 (non_cast_lvalue_or_else): Remove.
1223 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1224 (real_lvalue_p): Adjust call to lvalue_p_1.
1225 (non_cast_lvalue_p): Remove.
1226 (non_cast_lvalue_or_else): Remove.
1227 (lvalue_p): Adjust call to lvalue_p_1.
1228 (lvalue_or_else): Simplify.
1229 * typeck.c (build_unary_op): Use lvalue_or_else, not
1230 non_cast_lvalue_or_else.
1231 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1232
1233 2003-09-03 DJ Delorie <dj@redhat.com>
1234
1235 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1236
1237 2003-09-03 Mark Mitchell <mark@codesourcery.com>
1238
1239 PR c++/12053
1240 * class.c (include_empty_classes): Correct logic for ABI version 1.
1241
1242 2003-09-03 Richard Henderson <rth@redhat.com>
1243
1244 * optimize.c (optimize_function): Push/pop ggc context around
1245 the call to optimize_inline_calls.
1246
1247 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
1248
1249 PR c++/11553
1250 * parser.c (cp_parser_decl_specifier_seq): Add check for a
1251 duplicate friend decl-specifier.
1252
1253 2003-09-02 Mark Mitchell <mark@codesourcery.com>
1254
1255 PR c++/11847
1256 * pt.c (convert_nontype_argument): Correct representation of
1257 REFERENCE_TYPE expressions.
1258
1259 PR c++/11808
1260 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1261 (finish_call_expr): Change prototype.
1262 * parser.c (cp_parser_postfix_expression): Adjust call to
1263 finish_call_expr.
1264 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1265 * semantics.c (finish_call_expr): Add koenig_p parameter.
1266
1267 2003-09-01 Mark Mitchell <mark@codesourcery.com>
1268
1269 PR c++/12114
1270 * cp-tree.h (initialize_reference): Change prototype.
1271 * call.c (initialize_reference): Add cleanup parameter.
1272 * decl.c (grok_reference_init): Likewise.
1273 (check_initializer): Likewise.
1274 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1275 (duplicate_decls): When replacing an anticipated builtin, do not
1276 honor TREE_NOTHROW.
1277 * typeck.c (convert_for_initialization): Correct call to
1278 initialize_reference.
1279
1280 PR c++/11972
1281 * pt.c (dependent_type_p_r): Pass only the innermost template
1282 arguments to any_dependent_template_arguments_p.
1283
1284 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
1285
1286 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1287 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1288 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1289 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1290 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1291
1292 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1293
1294 PR c++/12093
1295 * pt.c (build_non_dependent_expr): Do not build a
1296 NON_DEPENDENT_EXPR for a STRING_CST.
1297
1298 PR c++/11928
1299 * search.c (add_conversions): Avoid adding two conversion
1300 operators for the same type.
1301
1302 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1303
1304 PR c++/6196
1305 * pt.c (tsubst_copy_and_build): Correct handling of
1306 address-of-label extension.
1307 * semantics.c (finish_goto_stmt): The address of a label must go
1308 through the lvalue-to-rvalue conversion.
1309
1310 2003-08-29 Richard Henderson <rth@redhat.com>
1311 Jason Merrill <jason@redhat.com>
1312
1313 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1314 (LANG_HOOKS_RTL_EXPAND_STMT): New.
1315 * cp-tree.h (cxx_expand_function_start): Declare.
1316 * decl.c (start_function): Use allocate_struct_function.
1317 Move stmts_are_full_exprs_p assertion from expand_body.
1318 Do not free_after_parsing or free_after_compilation.
1319 (cxx_push_function_context): Move code to set struct function
1320 data from genrtl_start_function.
1321 * optimize.c (optimize_function): Don't inc/dec function_depth.
1322 * semantics.c (expand_body): Use tree_rest_of_compilation.
1323 (cxx_expand_function_start): Rename from genrtl_start_function,
1324 omit bits done by tree_rest_of_compilation.
1325 (genrtl_finish_function): Remove.
1326 (clear_decl_rtl): Move to ../tree-optimize.c.
1327
1328 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1329
1330 PR c++/11811
1331 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1332 function.
1333 * cxx-pretty-print.h: Declare.
1334 * error.c (dump_template_parameter): Use it.
1335 (dump_type): Likewise.
1336
1337 2003-08-28 Mark Mitchell <mark@codesourcery.com>
1338
1339 * init.c (decl_constant_value): Deal with COND_EXPR specially.
1340 * call.c (build_conditional_expr): Revert previous patch.
1341
1342 PR optimization/5079
1343 * call.c (build_conditional_expr): Use decl_constant_value to
1344 simplify the arguments.
1345
1346 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
1347
1348 * parser.c (struct cp_token): Use enum bitfields.
1349 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1350 512B allocation unit.
1351 (cp_parser_token_tree_map_node): Use enum bitfields.
1352
1353 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
1354
1355 PR c++/11871
1356 * decl.c (push_class_level_binding): Correct old_decl value from
1357 my 2003-07-29 reorganization.
1358
1359 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1360 (build_new_method_call): Add goto finish.
1361 * semantics.c (simplify_aggr_init_exprs_r): Don't set
1362 TREE_SIDE_EFFECTS on a call.
1363
1364 2003-08-25 Richard Henderson <rth@redhat.com>
1365
1366 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1367
1368 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1369
1370 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1371 (cxx_pretty_printer): Adjust base type.
1372 (pp_cxx_function_specifier): Declare.
1373 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1374 (pp_cxx_left_paren): Likewise.
1375 (pp_cxx_right_paren): Likewise.
1376 (pp_cxx_dot): Likewise.
1377 (pp_cxx_arrow): Likewise.
1378 (pp_cxx_semicolon): Likewise.
1379 (pp_cxx_identifier): Likewise.
1380 (pp_cxx_cv_qualifier_seq): Likewise.
1381 (pp_cxx_storage_class_specifier): Likewise.
1382 (pp_cxx_expression_list): Likewise.
1383 (pp_cxx_space_for_pointer_operator): Likewise.
1384 (pp_cxx_init_declarator): Likewise.
1385 (pp_cxx_call_argument_list): Likewise.
1386 (pp_cxx_nonconsecutive_character): Tidy.
1387 (pp_cxx_conversion_function_id): New function.
1388 (pp_cxx_template_id): Likewise.
1389 (pp_cxx_template_keyword_if_needed): Likewise.
1390 (pp_cxx_nested_name_specifier): Likewise.
1391 (pp_cxx_unqualified_id): Tidy
1392 (pp_cxx_qualified_id): Handle more nodes.
1393 (pp_cxx_primary_expression): Tidy.
1394 (pp_cxx_postfix_expression): Likewise.
1395 (pp_cxx_new_expression): Tidy.
1396 (pp_cxx_delete_expression): Likewise.
1397 (pp_cxx_cast_expression): New function.
1398 (pp_cxx_pm_expression): Tidy.
1399 (pp_cxx_conditional_expression): Likewise.
1400 (pp_cxx_assignment_operator): New function.
1401 (pp_cxx_assignment_expression): Tidy.
1402 (pp_cxx_expression): New function.
1403 (pp_cxx_function_specifier): Likewise.
1404 (pp_cxx_decl_specifier_seq): Likewise.
1405 (pp_cxx_simple_type_specifier): Tidy.
1406 (pp_cxx_type_specifier_seq): Likewise.
1407 (pp_cxx_ptr_operator): New function.
1408 (pp_cxx_implicit_parameter_type): Likewise.
1409 (pp_cxx_parameter_declaration): Tidy.
1410 (pp_cxx_parameter_declaration_clause): New function.
1411 (pp_cxx_exception_specification): Likewise.
1412 (pp_cxx_direct_declarator): Tidy.
1413 (pp_cxx_declarator): Likewise.
1414 (pp_cxx_ctor_initializer): New function.
1415 (pp_cxx_function_definition): Likewise.
1416 (pp_cxx_abstract_declarator): Tidy.
1417 (pp_cxx_direct_abstract_declarator): Likewise.
1418 (pp_cxx_type_id): Likewise.
1419 (pp_cxx_exception_declaration): New function.
1420 (pp_cxx_statement): Likewise.
1421 (pp_cxx_simple_declaration): Likewise.
1422 (pp_cxx_template_parameter_list): Likewise.
1423 (pp_cxx_template_parameter): Likewise.
1424 (pp_cxx_template_declaration): Likewise.
1425 (pp_cxx_explicit_specialization): Likewise.
1426 (pp_cxx_explicit_instantiation): Likewise.
1427 (pp_cxx_declaration): Tidy.
1428 (pp_cxx_pretty_printer_init): Initialize more fields.
1429
1430 2003-08-25 Mark Mitchell <mark@codesourcery.com>
1431
1432 PR c++/8795
1433 * cp-tree.h (build_cplus_method_type): Remove.
1434 * call.c (standard_conversion): Use build_method_type_directly
1435 instead of build_cplus_method_type.
1436 * class.c (build_clone): Likewise.
1437 (adjust_clone_args): Likewise.
1438 * decl.c (build_ptrmem_type): Likewise.
1439 (grokdeclarator): Likewise.
1440 (check_function_type): Likewise.
1441 * decl2.c (grok_method_quals): Likewise.
1442 (maybe_retrofit_in_chrg): Likewise.
1443 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1444 (tsubst_function_type): Likewise.
1445 (tsubst): Likewise.
1446 * tree.c (build_cplus_method_type): Remove.
1447 * typeck.c (merge_types): Use build_method_type_directly.
1448
1449 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1450
1451 PR c++/3765
1452 * search.c (dfs_access_in_type): Fix typo in comment.
1453 (dfs_accessible_queue_p): Likewise.
1454 (dfs_accessible_p): Only terminate when a friend is found.
1455 (accessible_p): Return immediately if access_in_type allows
1456 access.
1457
1458 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1459
1460 PR c++/641, c++/11876
1461 * friend.c (add_friend): Add complain parameter.
1462 (make_friend_class): Likewise.
1463 (do_friend): Adjust add_friend call.
1464 * decl.c (grokdeclarator): Adjust make_friend_class call.
1465 * parser.c (cp_parser_member_declaration): Likewise.
1466 (cp_parser_template_declaration_after_export): Likewise.
1467 * pt.c (instantiate_class_template): Adjust make_friend_class
1468 and add_friend call.
1469 * cp-tree.h (make_friend_class): Adjust declaration.
1470 (add_friend): Likewise.
1471
1472 2003-08-21 Jason Merrill <jason@redhat.com>
1473
1474 PR c++/11283
1475 * call.c (build_conditional_expr): Ignore cv-qual differences for
1476 non-class types.
1477
1478 2003-08-21 Mark Mitchell <mark@codesourcery.com>
1479
1480 PR c++/11551
1481 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1482 (cp_parser_primary_expression): Adjust call to
1483 cp_parser_id_expression.
1484 (cp_parser_unqualified_id): Complain about the use of
1485 typedef-names in a destructor declarator.
1486 (cp_parser_postfix_expression): Adjust call to
1487 cp_parser_id_expression.
1488 (cp_parser_type_parameter): Likewise.
1489 (cp_parser_template_argument): Likewise.
1490 (cp_parser_declarator_id): Likewise.
1491
1492 PR c++/11919
1493 * call.c (standard_conversion): Use same_type_p, not pointer
1494 equality, to compare types.
1495
1496 PR c++/10762
1497 * parser.c (cp_parser_using_declaration): Check for invalid uses
1498 of template-ids here...
1499 * decl2.c (do_class_using_decl): ... rather than here.
1500
1501 2003-08-20 Mark Mitchell <mark@codesourcery.com>
1502
1503 PR c++/11834
1504 * pt.c (more_specialized): Bump processing_template_decl.
1505
1506 2003-08-21 Jason Merrill <jason@redhat.com>
1507
1508 PR c++/11614
1509 * decl.c (grokdeclarator): Recognize a flexible array based on the
1510 type, not the form of the declarator.
1511
1512 2003-08-20 Jason Merrill <jason@redhat.com>
1513
1514 * semantics.c (simplify_aggr_init_expr): Split out from
1515 simplify_aggr_init_exprs_r. Convert slot address to match
1516 the return type.
1517 * cp-tree.h: Declare it.
1518 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1519 DECL_NAME of a user variable.
1520
1521 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
1522
1523 PR c++/11945
1524 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1525 COMPOUND_EXPR.
1526 * semantics.c (finish_expr_stmt): Always convert to void.
1527 * typeck.c (build_x_compound_exp): Always convert to void.
1528
1529 2003-08-19 Mark Mitchell <mark@codesourcery.com>
1530
1531 PR c++/11684
1532 * cp-tree.h (grok_op_properties): Change prototype.
1533 * decl.c (grok_op_properties): Add complain parameter.
1534 (grokfndecl): Pass it.
1535 * pt.c (tsubst_decl): Adjust accordingly.
1536
1537 PR c++/10926
1538 * decl.c (start_method): Return immediately if push_template_decl
1539 does not like the declaration.
1540 * pt.c (push_template_decl_real): Disallow member template
1541 destructors.
1542
1543 PR c++/11036
1544 * cp-tree.h (add_binding): Add prototype.
1545 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1546 (maybe_warn_about_overly_private_class): Use
1547 CLASSTYPE_DESTRUCTORS.
1548 (pushclass): Adjust call to set_identifier_type_value.
1549 * decl.c (add_binding): Give it external linkage.
1550 (push_local_binding): Adjust call to add_binding.
1551 (push_class_binding): Likewise.
1552 (set_identifier_type_value_with_scope): Change prototype. Use
1553 add_binding for global bindings.
1554 (set_identifier_type_value): Adjust accordingly.
1555 (pushtag): Likewise.
1556 (pushdecl): Use set_identifier_type_value, not
1557 set_identifier_type_value_with_scope.
1558 (pushdecl_namespace_level): Adjust calls to
1559 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1560 (pushdecl_class_level): Likewise.
1561 (lookup_tag): Use select_decl.
1562 (select_decl): Improve comment.
1563 (record_builtin_type): Do not call pushdecl.
1564 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1565 (cp_finish_decl): Adjust call to set_identifier_type_value.
1566 (check_elaborated_type_specifier): Improve checks for invalid uses
1567 of typedefs.
1568 (xref_tag): Adjust call to check_elaborated_type_specifier.
1569 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1570 * name-lookup.c (set_namespace_binding): Use add_binding.
1571 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1572 rather than an IDENTIFIER_NODE, to represent built-in types, if
1573 requested by the caller.
1574 (cp_parser_postfix_expression): Adjust call.
1575 (cp_parser_type_specifier): Likewise.
1576 (cp_parser_elaborated_type_specifier): Adjust call to
1577 check_elaborated_type_specifier.
1578 * typeck2.c (build_functional_cast): Do not perform name lookups.
1579
1580 PR c++/10717
1581 * decl.c (expand_static_init): Remove unnecessary code.
1582
1583 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
1584
1585 PR c++/10538, PR c/5582
1586 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1587
1588 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1589
1590 PR c++/11174
1591 * init.c (build_offset_ref): Perform access checking for
1592 pointer to member correctly.
1593
1594 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
1595
1596 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1597
1598 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
1599
1600 PR c++/11957
1601 * cp-tree.h (finish_stmt_expr): Add bool parameter.
1602 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1603 adjust the stmt_expr here.
1604 (build_vec_init): Use finish_stmt_expr_expr, convert result to
1605 array type.
1606 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1607 call.
1608 * pt.c (tsubst_copy): Likewise.
1609 * semantics.c (finish_stmt_expr): Add parameter.
1610
1611 * pt.c (instantiate_class_template): Push to class's scope before
1612 tsubsting base.
1613
1614 2003-08-17 Jan Hubicka <jh@suse.cz>
1615
1616 PR C++/11702
1617 * semantics.c (finish_id_expression): Mark all functions as used.
1618
1619 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
1620
1621 PR c++/11512
1622 * cvt.c (convert_to_void): Indicate which side of conditional has
1623 no effects, and rhs of comma operator. Test for no sideeffect
1624 expressions here and always build a convert expr.
1625 * init.c (expand_default_init): Convert the init to void.
1626 * typeck.c (build_x_compound_expr): Do not check for side effects
1627 here.
1628 (build_compound_expr): Do not convert lhs when building a
1629 template.
1630
1631 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1632
1633 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1634 * decl2.c (build_offset_ref_call_from_tree): Use
1635 build_non_dependent_expr.
1636 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1637 * pt.c (build_non_dependent_expr): Set operand.
1638
1639 2003-08-14 Jan Hubicka <jh@suse.cz>
1640
1641 * decl2.c (mark_member_pointers): Rename to...
1642 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1643 (lower_function): Update call.
1644 * except.c (eh_type_info): Break out from ...
1645 (build_eh_type): ... here; tinfo is already used.
1646 (finish_eh_spec_block): Mark tinfos as used.
1647 * semantics.c (finish_handler_params): Mark tinfo as used.
1648 * cp-tree.h (eh_type_info): Declare.
1649
1650 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1651
1652 * pt.c (instantiate_class_template): Set location before
1653 substuting bases.
1654
1655 * decl.c (make_typename_type): Use my_friendly_assert.
1656 * pt.c (tsubst_aggr_type): Rearrange context substitution.
1657
1658 2003-08-14 Jan Hubicka <jh@suse.cz>
1659
1660 * method.c (use_thunk): Expand body directly.
1661
1662 2003-08-12 Mark Mitchell <mark@codesourcery.com>
1663
1664 PR c++/11703
1665 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1666 determine whether or not to promote types.
1667 (convert_for_arg_passing): Likewise.
1668 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1669 templates.
1670 * pt.c (tsubst_decl): Do not expect it to be set.
1671
1672 PR c++/9512
1673 PR c++/10923
1674 * cp-tree.h (check_elaborated_type_specifier): Declare.
1675 (handle_class_head): Remove.
1676 (note_got_semicolon): Likewise.
1677 (note_list_got_semicolon): Likewise.
1678 (finish_class_definition): Likewise.
1679 * decl.c (check_elaborated_type_specifier): Make it public.
1680 Robustify.
1681 (handle_class_head): Remove.
1682 * parser.c (cp_parser_elaborated_type_specifier): Use
1683 check_elaborated_type_specifier.
1684 (cp_parser_class_specifier): Do not call finish_class_definition.
1685 (cp_parser_class_head): Or handle_class_head. Check for
1686 over-qualified names.
1687 * semantics.c (finish_class_definition): Remove.
1688
1689 * parser.c (cp_parser_check_for_definition_in_return_type): New
1690 function.
1691 (cp_parser_simple_declaration): Adjust call to
1692 cp_parser_init_declarator.
1693 (cp_parser_decl_specifier_seq): Change type of
1694 declares_class_or_enum parameter.
1695 (cp_parser_explicit_instantiation): Adjust accordingly.
1696 (cp_parser_type_specifier): Change type of
1697 declares_class_or_enum parameter.
1698 (cp_parser_init_declarator): Add declares_class_or_enum
1699 parameter.
1700 (cp_parser_parameter_declaration): Adjust call to
1701 cp_parser_decl_specifier_seq.
1702 (cp_parser_function_definition): Likewise.
1703 (cp_parser_member_declaration): Likewise.
1704 (cp_parser_single_declaration): Likewise.
1705
1706 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1707 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1708 (TYPE_OVERLOADS_CALL_EXPR): Remove.
1709 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1710 (TYPE_OVERLOADS_ARROW): Likewise.
1711 (CLASSTYPE_GOT_SEMICOLON): Likewise.
1712 * class.c (check_bases): Do not set them.
1713 (finish_struct_1): Likewise.
1714 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1715 (build_ptrmemfunc_type): Likewise.
1716 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1717 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1718 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1719 * lex.c (note_got_semicolon): Remove.
1720 (note_list_got_semicolon): Likewise.
1721 * parser.c (cp_parser_simple_declaration): Do not call
1722 note_list_got_semicolon.
1723 * pt.c (list_eq): Remove.
1724 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1725 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1726 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1727 * ptree.c (cxx_print_type): Do not print them.
1728 * semantics.c (finish_member_class_template): Do not call
1729 note_list_got_semicolon.
1730
1731 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
1732
1733 * call.c (standard_conversion): Opaque pointers interconvert.
1734
1735 * testsuite/g++.dg/other/opaque-3.C: New.
1736
1737 2003-08-11 Mark Mitchell <mark@codesourcery.com>
1738
1739 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1740 types correctly.
1741
1742 2003-08-10 Mark Mitchell <mark@codesourcery.com>
1743
1744 PR c++/11789
1745 * cp-tree.h (get_vbase): Remove.
1746 (get_vbase_types): Remove.
1747 * init.c (expand_member_init): Correct logic for looking up base
1748 classes.
1749
1750 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1751
1752 * error.c (dump_expr): Tidy.
1753 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1754 (pp_cxx_begin_template_argument_list): Likewise.
1755 (pp_cxx_end_template_argument_list): Likewise.
1756 (is_destructor_name): Likewise.
1757 (pp_cxx_unqualified_id): Likewise.
1758 (pp_cxx_qualified_id): Likewise.
1759 (pp_cxx_id_expression): Likewise.
1760 (pp_cxx_new_expression): Likewise.
1761 (pp_cxx_delete_expression): Likewise.
1762 (pp_cxx_pm_expression): Likewise.
1763 (pp_cxx_type_specifier): Rework.
1764 (pp_cxx_type_id): Likewise.
1765 (pp_cxx_primary_expression): Likewise.
1766 (pp_cxx_postfix_expression): Likewise.
1767 (pp_cxx_unary_expression): Likewise.
1768 (pp_cxx_multiplicative_expression): Likewise.
1769 (pp_cxx_conditional_expression): Likewise.
1770 (pp_cxx_assignment_expression): Likewise.
1771 (pp_cxx_pretty_printer_init): Tidy.
1772
1773 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
1774
1775 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1776 NODE is always a TREE_VEC of nonzero size.
1777 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1778 * decl2.c (arg_assoc): Template args will be a vec.
1779 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1780 dump_template_argument_list.
1781 (dump_template_parms): Args will be a vec.
1782 * parser.c (cp_parser_template_argument_list): Produce a
1783 vector, not a list.
1784 * pt.c (coerce_template_parms): Args are always vectors.
1785 (mangle_class_name_for_template): Likewise.
1786 (lookup_template_function): Likewise.
1787 (lookup_template_class): Likewise.
1788 (tsubst_template_args): Likewise.
1789 (tsubst_baselink): Use tsubst_template_args.
1790 (tsubst_qualified_id): Likewise.
1791 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1792 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1793 (any_dependent_template_args_p): Args are always vectors.
1794 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1795
1796 PR c++/11670
1797 * call.c (convert_like_real): Add rvalue binding error message.
1798 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1799 really a cast.
1800
1801 PR c++/10530
1802 * pt.c (dependent_type_p_r): A dependent template-id is a class
1803 type with dependent template arguments, or a bound template
1804 template parameter.
1805 (type_dependent_expression_p): A template function decl cannot
1806 have a dependent context.
1807
1808 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1809
1810 PR c++/5767
1811 * parser.c (cp_parser_class_name): Return immediately when scope
1812 is error_mark_node.
1813
1814 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
1815
1816 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1817
1818 * cp/call.c (standard_conversion): Support opaque types.
1819 Include target.h.
1820 (strip_top_quals): Use cp_build_qualified_type instead of
1821 TYPE_MAIN_VARIANT.
1822
1823 * cp/typeck.c (convert_for_assignment): Support opaque types.
1824
1825 * testsuite/g++.dg/other/opaque-1.C: New.
1826
1827 * testsuite/g++.dg/other/opaque-2.C: New.
1828
1829 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
1830
1831 * decl.c (grokparms): Use cp_build_qualified_type instead
1832 TYPE_MAIN_VARIANT.
1833
1834 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1835
1836 * cxx-pretty-print.h: New file.
1837 * cxx-pretty-print.c: Likewise.
1838 * error.c (scratch_pretty_printer): Change type.
1839 (init_error): Tidy.
1840 (dump_aggr_type): Likewise.
1841 (dump_global_iord): Likewise.
1842 (dump_expr): Likewise.
1843 (dump_char): Remove.
1844 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1845 (cxx_initialize_diagnostics): New function.
1846 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1847 (CXX_PRETTY_PRINT_H): New variable.
1848 (cp/cxx-pretty-print.o): New rule.
1849 (cp/cp-lang.o): Update dependence.
1850 (cp/error.o): Likewise.
1851
1852 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1853
1854 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1855 (DECL_DECLARED_INLINE_P): Remove.
1856 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1857 if decl is a FUNCTION_DECL. This never made sense, but now it is
1858 required to avoid a tree check failure.
1859 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1860 * optimize.c (maybe_clone_body): Likewise.
1861
1862 2003-08-04 Roger Sayle <roger@eyesopen.com>
1863
1864 * decl.c (cxx_insert_default_attributes): Delete.
1865 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1866 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1867
1868 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
1869
1870 PR c++/11704
1871 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1872 unknown type.
1873
1874 PR c++/11766
1875 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1876 member functions.
1877
1878 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1879
1880 PR c++/9447
1881 * cp-tree.def (USING_DECL): Document its type.
1882 * class.c (pushclass): If we're entering a template, push any
1883 dependent using decls it has.
1884 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1885 a dependent scope.
1886 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1887 (tsubst): Remove USING_DECL checks.
1888 (type_dependent_expression_p): Remove USING_DECL case.
1889 * semantics.c (finish_member_declaration): A USING_DECL's type
1890 indicates whether it is dependent.
1891
1892 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1893
1894 * cp-tree.h (pushclass): Remove unneeded parameter.
1895 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1896 (push_nested_class): Adjust pushclass call.
1897 * pt.c (instantiate_class_template): Likewise.
1898 * semantics.c (begin_class_definition): Likewise.
1899
1900 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
1901
1902 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1903
1904 2003-08-01 Mark Mitchell <mark@codesourcery.com>
1905
1906 PR c++/11697
1907 * decl.c (decls_match): Don't ignore the types of template
1908 classes.
1909
1910 PR c++/11744
1911 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1912
1913 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1914
1915 PR c++/8442, c++/8806
1916 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1917 preferred.
1918 (check_elaborated_type_specifier): Add allow_template_p
1919 parameter. Check tag mismatch and class template.
1920 (xref_tag): Add template_header_p parameter. Add assertion
1921 that name is an IDENTIFIER_NODE. Remove implicit typename
1922 warning. Simplify lookup process if globalize is true.
1923 (cxx_init_decl_processing): Adjust call to xref_tag.
1924 (xref_tag_from_type): Likewise.
1925 * decl2.c (handle_class_head): Likewise.
1926 * parser.c (cp_parser_elaborated_type_specifier,
1927 cp_parser_class_head): Likewise.
1928 * rtti.c (init_rtti_processing, build_dynamic_cast1,
1929 tinfo_base_init, emit_support_tinfos): Likewise.
1930 * class.c (is_base_of_enclosing_class): Remove.
1931 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1932 template template argument.
1933 * cp-tree.h (xref_tag): Adjust declaration.
1934 (is_base_of_enclosing_class): Remove.
1935 * NEWS: Document template template argument change.
1936
1937 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
1938
1939 * parser.c (cp_parser_init_declarator,
1940 cp_paser_member_declaration): Reformat.
1941 * pt.c (lookup_template_class, type_unification_real, unify,
1942 type_dependent_expression_p): Reformat.
1943
1944 PR c++/11295
1945 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1946 tf_stmt_expr_body.
1947 (finish_stmt_expr_expr): Declare.
1948 * parser.c (cp_parser_primary_expression): Tell
1949 cp_parser_compount_statement that it is a statement expression.
1950 (cp_parser_statement, cp_parser_labeled_statement,
1951 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1952 in_statement_expr_p parameter.
1953 (cp_parser_expression_statement): Likewise. Call
1954 finish_stmt_expr_expr for final expression of a statement
1955 expression.
1956 (cp_parser_for_init_statement,
1957 cp_parser_implicitly_scoped_statement,
1958 cp_parser_already_scoped_statement, cp_parser_function_definition,
1959 cp_parser_try_block, cp_parser_handled): Adjust.
1960 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1961 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1962 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1963 * semantics.c (finish_expr_stmt): Do not deal with statement
1964 expressions.
1965 (begin_stmt_expr): Clear last_expr_type.
1966 (finish_stmt_expr_expr): New.
1967 (finish_stmt_expr): Process the value expression.
1968
1969 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1970 compound expr inside the target's initializer.
1971
1972 PR c++/11525
1973 * parser.c (cp_parser_primary_expression): Do not set
1974 non-constant-p merely because it is a dependent scope.
1975
1976 PR c++/9447
1977 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1978 * semantics.c (finish_expr_stmt): Do not convert to void in a
1979 template.
1980
1981 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
1982
1983 * pt.c (coerce_template_parms): Refactor.
1984 (fn_type_unification): Increment processing_template_decl when
1985 tsubsting an incomplete set of explicit args.
1986
1987 PR c++/11347
1988 * pt.c (instantiate_class_template): Increment
1989 processing_template_decl around the tsubst of a template member
1990 class.
1991 (tsubst_qualified_id): Assert we do not have a dependent scope.
1992
1993 * pt.c (coerce_template_template_parms, lookup_template_class,
1994 can_complete_type_without_circularity, instantiate_class_template,
1995 tsubst_decl, unify): Reformat.
1996
1997 2003-07-31 Jan Hubicka <jh@suse.cz>
1998
1999 * decl2.c (maybe_make_one_only): Use mark_referenced.
2000 * method.c (use_thunk): Likewsie.
2001
2002 2003-07-30 Jan Hubicka <jh@suse.cz>
2003
2004 * class.c (build_vtable_entry_ref): Kill.
2005 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
2006 (build_vfn_ref): Do not call build_vtable_entry_ref.
2007 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
2008 * cp-tree.h (prepare_assemble_variable): Kill.
2009 * cp-decl.c (prepare_assemble_variable): Kill.
2010
2011 2003-07-29 Geoffrey Keating <geoffk@apple.com>
2012
2013 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
2014 of setting valid_pch by hand.
2015
2016 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2017
2018 * decl.c (finish_enum): Initialize underlying_type.
2019
2020 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
2021
2022 PR c++/9447
2023 * decl.c (add_binding): Add bval local variable.
2024 (push_class_level_binding): Likewise. Allow a USING_DECL to be
2025 pushed.
2026 * decl2.c (do_class_using_decl): The type of a using decl is
2027 unknown.
2028 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
2029 function call lookup code.
2030 * pt.c (tsubst): A USING_DECL will have unknown type.
2031 (tsubst_copy_and_build): Allow a using decl.
2032 (type_dependent_expression_p): A USING_DECL will make it
2033 dependent.
2034 * semantics.c (finish_member_declaration): Push a dependent using
2035 declaration.
2036
2037 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2038
2039 PR c++/11530
2040 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2041 * semantics.c (finish_id_expression): Call mark_used for all
2042 declarations.
2043
2044 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2045
2046 PR c++/11667
2047 * call.c (standard_conversion): Allow all integral->enumeral
2048 conversions, after marking them as bad.
2049 * decl.c (finish_enum): Make sure that all enumerators are
2050 properly converted to the underlying type.
2051 (build_enumerator): Set DECL_CONTEXT for namespace-scope
2052 enumeration types.
2053 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2054 (tsubst_enum): Tidy.
2055
2056 * Make-lang.in (typeck.o): Depend on convert.h.
2057 (class.o): Likewise.
2058 (rtti.o): Likewise.
2059 * call.c: Include convert.h.
2060 (convert_arg_to_ellipsis): Use convert_to_real.
2061 * class.c: Include convert.h.
2062 (build_base_path): Use convert_to_integer.
2063 * rtti.c: Include convert.h.
2064 (build_headof): Use convert_to_integer.
2065 * typeck.c: Include convert.h.
2066 (decay_conversion): Use convert_to_integer.
2067 (build_unary_op): Use build_nop.
2068 (get_delta_difference): Use convert_to_integer.
2069 (build_ptrmemfunc): Avoid unnecessary conversions.
2070
2071 2003-07-28 Jan Hubicka <jh@suse.cz>
2072
2073 * decl2.c (mark_member_pointers): Verify that member pointer points to
2074 the function.
2075
2076 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
2077
2078 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2079 (finish_compound_stmt): Remove no scope arg.
2080 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2081 end_compound_stmt calls.
2082 (expand_static_init, begin_destructor_body, begin_function_body,
2083 finish_function_body): Likewise.
2084 * decl2.c (start_objects, finish_objects,
2085 start_static_storage_duration_function,
2086 finish_static_storage_duration_function): Likewise.
2087 * init.c (begin_init_stmts, finish_init_stmts,
2088 construct_virtual_base, build_vec_init): Likewise.
2089 * method.c (do_build_assign_ref, synthesize_method): Likewise.
2090 * parser.c (cp_parser_compound_statement,
2091 cp_parser_implicitly_scoped_statement,
2092 cp_parser_already_scoped_statement): Likewise.
2093 * pt.c (tsubst_expr): Likewise.
2094 * semantics.c (begin_compound_stmt): No scope arg is a bool.
2095 (finish_compound_stmt): Remove no scope arg.
2096
2097 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2098 always dyadic.
2099
2100 2003-07-27 Mark Mitchell <mark@codesourcery.com>
2101
2102 * call.c (standard_conversion): Tweak handling of
2103 pointer-to-member types.
2104 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2105 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2106 pointer-to-data member types.
2107
2108 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
2109
2110 * parser.c (cp_parser_type_parameter): Reformat.
2111 (cp_parser_parameter_declaration): Deprecate default args where
2112 not allowed.
2113
2114 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
2115
2116 * cfns.h: Rebuilt.
2117
2118 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2119 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2120 * init.c (begin_init_stmts): Make static. Return is_global
2121 value. Always call begin_stmt_expr.
2122 (finish_init_stmts): Make static. Add is_global parm. Always
2123 building a stmt tree.
2124 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2125 (build_vec_init): Likewise. Always building a stmt tree.
2126 (expand_default_init): Always building a stmt tree.
2127 (get_temp_regvar): Likewise.
2128 * semantics.c (begin_global_stmt_expr,
2129 finish_global_stmt_expr): Remove.
2130
2131 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2132
2133 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2134 (build_x_compound_expr_from_list): Declare.
2135 * typeck.c (build_x_compound_expr_from_list): New.
2136 (build_x_compound_expr): Adjust.
2137 (build_compound_expr): Remove unreachable code. Take two
2138 parameters, adjust.
2139 * decl.c (grok_reference_init): Use
2140 build_x_compound_expr_from_list.
2141 (expand_static_init): Adjust build_compound_expr call.
2142 (cxx_maybe_build_cleanup): Likewise.
2143 * init.c (perform_member_init): Use
2144 build_x_compound_expr_from_list.
2145 (build_new_1): Likewise.
2146 (build_vec_delete): Adjust build_compound_expr calls.
2147 (build_vbase_delete): Likewise.
2148 * typeck2.c (store_init_value): Use
2149 build_x_compound_expr_from_list.
2150 (build_functional_cast): Likewise.
2151
2152 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2153
2154 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2155 * decl.c (make_typename_type): Pass it.
2156 * pt.c (lookup_template_class): Use it.
2157 (resolve_typename_type): Pass it.
2158 * semantics.c (finish_template_type): Pass it.
2159
2160 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2161
2162 PR c++/11617
2163 * cp-tree.h (qualified_name_lookup_error): Declare.
2164 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2165 errors.
2166 (tsubst_expr) <DECL_STMT case>: Likewise.
2167 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2168 * semantics.c (qualified_name_lookup_error): New, broken out of ...
2169 (finish_id_expression): ... here. Use it.
2170
2171 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
2172
2173 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2174
2175 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2176
2177 PR c++/11596
2178 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2179 (tsubst_template_arg): New.
2180 (tsubst_template_arg_vector): Rename to ...
2181 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2182 tsubst_template_arg.
2183 (coerce_template_parms): Use tsubst_template_arg for default
2184 value.
2185 (tsubst_template_parms): Likewise.
2186 (tsubst_aggr_type): Adjust.
2187 (tsubst_decl): Likewise.
2188 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2189 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2190
2191 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2192
2193 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2194 * error.c: Use the new pretty-printer framework.
2195
2196 2003-07-24 Per Bothner <pbothner@apple.com>
2197
2198 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2199 which causes errors messages to incorrectly mention included files.
2200
2201 2003-07-24 Mark Mitchell <mark@codesourcery.com>
2202
2203 * cp-tree.h (convert_to_base_statically): Declare.
2204 * call.c (build_special_member_call): Convert INSTANCE to the base
2205 type.
2206 * class.c (convert_to_base_statically): New method.
2207 * init.c (construct_virtual_base): Use it.
2208 * method.c (do_build_assign_ref): Fix typo in comment.
2209
2210 2003-07-24 Jason Merrill <jason@redhat.com>
2211
2212 * decl.c: Just set truthvalue_* to boolean_*.
2213
2214 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
2215
2216 * decl.c (reshape_init): Remove unreachable code.
2217
2218 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2219
2220 PR c++/11513
2221 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2222
2223 2003-07-23 Mark Mitchell <mark@codesourcery.com>
2224
2225 PR c++/11645
2226 * cp-tree.h (accessible_base_p): Declare.
2227 * call.c (build_over_call): Use it.
2228 * search.c (accessible_base_p): New function, split out from ...
2229 (lookup_base): ... here.
2230
2231 PR c++/11517
2232 * call.c (build_conditional_expr): Use perform_implicit_conversion
2233 and error_operand_p. Robustify.
2234 * typeck.c (build_unary_op): Use perform_implicit_conversion.
2235
2236 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
2237
2238 PR c++/10953
2239 * parser.c (cp_parser_nested_name_specifier): Reset scope on
2240 failure.
2241 (cp_parser_elaborated_type_specifier): Likewise.
2242
2243 2003-07-22 Mark Mitchell <mark@codesourcery.com>
2244
2245 Eliminate use of POINTER_TYPE for pointers-to-members.
2246 * call.c (standard_conversion): Rework pointer-to-member handling.
2247 Add comments.
2248 (add_builtin_candidate): Likewise.
2249 (resolve_scoped_fn_name): Remove.
2250 (build_conditional_expr): Rework pointer-to-member handling.
2251 (compare_ics): Likewise.
2252 * class.c (check_field_decls): Use TYPE_PTR_P.
2253 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2254 handling.
2255 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2256 (TYPE_PTRMEM_P): Add comment.
2257 (TYPE_PTR_P): Simplify.
2258 (TYPE_PTROB_P): Correct definition.
2259 (TYPE_PTR_TO_MEMBER_P): New macro.
2260 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2261 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2262 (resolved_scoped_fn_name): Remove declaration.
2263 (build_offset_ref): Change prototype.
2264 (resolve_offset_ref): Remove.
2265 (comp_target_types): Remove.
2266 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2267 handling.
2268 (convert_to_reference): Use can_convert.
2269 (ocp_convert): Improve error handling. Rework pointer-to-member
2270 handling.
2271 (perform_qualification_conversions): Rework pointer-to-member
2272 handling.
2273 * decl.c (build_ptrmem_type): Handle functions too.
2274 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2275 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2276 (grokparms): Remove OFFSET_TYPE error message.
2277 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2278 * error.c (dump_type_prefix): Likewise.
2279 * expr.c (cplus_expand_constant): Use build_nop.
2280 * init.c (build_offset_ref): Add address_p parameter. Fold in
2281 necessary bits from resolve_offset_ref.
2282 (resolve_offset_ref): Remove.
2283 * parser.c (cp_parser_postfix_expression): Remove special case
2284 code for OFFSET_TYPE.
2285 * pt.c (convert_nontype_argument): Rework pointer-to-member
2286 handling.
2287 (convert_template_argument): Likewise.
2288 (unify): Likewise.
2289 (invalid_nontype_parm_type_p): Likewise.
2290 (dependent_type_p_r): Likewise.
2291 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2292 (target_incomplete_p_): Rework pointer-to-member
2293 handling.
2294 (get_pseudo_ti_init): Likewise.
2295 (get_pseudo_ti_desc): Likewise.
2296 * semantics.c (finish_qualified_id_expr): Adjust call to
2297 build_offset_ref. Remove use of resolve_offset_ref.
2298 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2299 * typeck.c (target_type): Use TYPE_PTRMEM_P.
2300 (type_unknown_p): Remove obsolete code about the time before
2301 non-dependent expressions were handled correctly.
2302 (qualify_type_recursive): Remove.
2303 (composite_pointer_type_r): New function.
2304 (composite_pointer_type): Use it.
2305 (merge_types): Remove dead comments.
2306 (comp_cv_target_types): Remove.
2307 (comp_target_types): Likewise.
2308 (comp_target_parms): Likewise.
2309 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2310 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2311 (build_binary_op): Do not use of comp_target_types.
2312 (pointer_diff): Remove OFFSET_TYPE case.
2313 (build_unary_op): Adjust pointer-to-member handling.
2314 (unary_complex_lvalue): Likewise.
2315 (check_for_casting_away_constness): Add description parameter.
2316 (build_static_cast): Pass it.
2317 (build_reinterpret_cast): Use check_for_casting_away_constness.
2318 (build_const_cast): Adjust pointer-to-member handling.
2319 (build_c_cast): Likewise.
2320 (convert_for_assignment): Remove OFFSET_TYPE error message.
2321 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2322 (comp_ptr_ttypes_reinterpret): Remove.
2323 (casts_away_constness_r): Adjust pointer-to-member handling.
2324 (casts_away_constness): Liekwise.
2325 (strip_all_pointer_quals): Remove.
2326 * typeck2.c (digest_init): Adjust pointer-to-member handling.
2327 (build_m_component_ref): Likewise.
2328
2329 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
2330
2331 * lex.c (unqualified_fn_lookup_error): Mention that the error
2332 message needs to be kept in synch with the manual.
2333
2334 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2335
2336 PR c++/11614
2337 * decl.c (grokdeclarator): An array member is only a flexible
2338 array member if the field itself is the array.
2339
2340 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2341
2342 PR c++/10793
2343 * decl.c (xref_basetypes): Handle error_mark_node.
2344
2345 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2346
2347 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2348 * tree.c (lvalue_p_1): Set it.
2349 * class.c (check_field): Don't allow non-packed non-POD fields to
2350 be packed.
2351 * call.c (reference_binding): Need a temporary for all bitfield
2352 and packed fields.
2353 (convert_like_real): Check it is ok to make a temporary here.
2354
2355 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
2356
2357 * cp-tree.h (hack_identifier): Remove.
2358 * method.c (hack_identifier): Remove.
2359 * semantics.c (finish_id_expression): Expand hack_identifier
2360 here. Simplify.
2361
2362 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2363
2364 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2365 semantics.c typeck.c: Remove unnecessary casts.
2366
2367 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2368
2369 * cp-tree.h (hack_identifier): Remove.
2370 * method.c (hack_identifier): Remove.
2371 * semantics.c (finish_id_expression): Expand hack_identifier
2372 here. Simplify.
2373
2374 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2375
2376 * cp-tree.h (finish_non_static_data_member): Add object param.
2377 * method.c (hack_identifier): Adjust.
2378 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2379 again for a FIELD_DECL.
2380 * semantics.c (finish_non_static_data_member): Add object
2381 parameter. Always save the DECL in the COMPONENT_REF.
2382 * call.c (resolve_scoped_fn_name): Adjust.
2383
2384 2003-07-17 Zack Weinberg <zack@codesourcery.com>
2385
2386 * pt.c (get_bindings): Make definition consistent with
2387 forward declaration.
2388
2389 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2390
2391 PR c++/7809
2392 * friend.c (add_friend): Check access for member functions
2393 and templates.
2394
2395 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2396
2397 PR c++/10668
2398 * typeck.c (build_class_member_access_expr): Improve diagnostic.
2399
2400 2003-07-16 Mark Mitchell <mark@codesourcery.com>
2401
2402 PR c++/11547
2403 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2404 macro.
2405 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2406 * decl.c (duplicate_decls): Merge
2407 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2408 * parser.c (cp_parser_postfix_expression): Adjust call to
2409 cp_parser_initializer_list and
2410 cp_parser_parenthesized_expression_list.
2411 (cp_parser_parenthesized_expression_list): Add non_constant_p.
2412 (cp_parser_new_placement): Adjust call to
2413 cp_parser_parenthesized_expression_list.
2414 (cp_parser_direct_new_declarator): Likewise.
2415 (cp_parser_conditional_expression): Remove.
2416 (cp_parser_constant_expression): Parse an assignment-expression,
2417 not a conditional-expression.
2418 (cp_parser_simple_declaration): Resolve expression/declaration
2419 ambiguity more quickly.
2420 (cp_parser_mem_initializer): Adjust call to
2421 cp_parser_parenthesized_expression_list.
2422 (cp_parser_init_declarator): Keep track of whether or not the
2423 initializer is a constant-expression.
2424 (cp_parser_initializer): Add non_constant_p parameter.
2425 (cp_parser_initializer_clause): Likewise.
2426 (cp_parser_initializer_list): Likewise.
2427 (cp_parser_attribute_list): Adjust call to
2428 cp_parser_parenthesized_expression_list.
2429 (cp_parser_functional_cast): Likewise.
2430 * pt.c (tsubst_decl): Copy
2431 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2432 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2433 * semantics.c (finish_id_expression): Use
2434 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2435
2436 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
2437
2438 * lang-options.h: Remove.
2439
2440 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
2441
2442 PR c/10962
2443 * class.c (field_decl_cmp): Remove.
2444 (resort_field_decl_cmp): Remove.
2445 (resort_sorted_fields): Remove.
2446 (add_fields_to_vec): Rename to ...
2447 (add_fields_to_record_type): this.
2448 (finish_struct_1): Change to be using
2449 sorted_fields_type's fields.
2450 * cp-tree.h (lang_decl): In lang_decl_u3
2451 change sorted_fields to be a pointer to
2452 sorted_fields_type.
2453 (resort_sorted_fields): Remove prototype.
2454 * search.c (lookup_field_1): Change to be using
2455 sorted_fields_type's fields.
2456
2457 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2458
2459 PR c++/5421
2460 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2461 is a member of other class.
2462 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2463 is a specialization of function template.
2464
2465 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2466
2467 PR c++/10903
2468 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2469 Improve.
2470
2471 2003-07-15 Mark Mitchell <mark@codesourcery.com>
2472
2473 * cp-tree.def (LOOKUP_EXPR): Remove.
2474 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2475 (LOOKUP_EXPR_GLOBAL): Remove.
2476 (get_bindings): Remove.
2477 (is_aggr_type_2): Remove.
2478 * call.c (resolved_scoped_fn_name): Remove support for
2479 LOOKUP_EXPR.
2480 * decl.c (grokfndecl): Likewise.
2481 (grokdeclarator): Likewise.
2482 * error.c (dump_decl): Likewise.
2483 (dump_expr): Likewise.
2484 * friend.c (do_friend): Likewise.
2485 * init.c (build_offset_ref): Likewise.
2486 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
2487 LOOKUP_EXPRs
2488 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2489 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2490 test.
2491 * pt.c (get_bindings): Give it internal linkage.
2492 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2493 (lookup_template_function): Likewise.
2494 (for_each_tempalte_parm_r): Likewise.
2495 (tsubst_decl): Likewise.
2496 (tsubst_qualified_id): Handle template template parameters.
2497 (tsubst_copy): Remove support for LOOKUP_EXPR.
2498 (tsubst_copy_and_build): Likewise.
2499 (most_general_template): Likewise.
2500 (value_dependent_expression_p): Likewise.
2501 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2502 always dependent.
2503 * semantics.c (perform_koenig_lookup): Do not create
2504 IDENTIFIER_NODEs.
2505 (finish_fname): Likewise.
2506 (finish_id_expression): Likewise.
2507 * tree.c (is_aggr_type_2): Remove.
2508
2509 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2510
2511 PR c++/11531
2512 * typeck.c (check_return_expr): Fix thinko in diagnostic.
2513
2514 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2515
2516 PR c++/10108
2517 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2518 error_mark_node.
2519
2520 2003-07-14 Mark Mitchell <mark@codesourcery.com>
2521
2522 PR c++/11509
2523 * pt.c (dependent_scope_ref_p): New function.
2524 (value_dependent_expression_p): Use it.
2525 (type_dependent_expression_p): Likewise.
2526
2527 * pt.c (tsubst_friend_function): Use reregister_specialization.
2528
2529 PR c++/7019
2530 * cp-tree.h (lookup_qualified_name): Adjust prototype.
2531 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
2532 call to is_aggr_type.
2533 * parser.c (cp_parser_lookup_name): Adjust call to
2534 lookup_qualified_name.
2535 * pt.c (tsubst_qualified_id): Likewise.
2536 (tsubst_copy_and_build): Likewise.
2537 * semantics.c (finish_qualified_id_expr): Deal with erroneous
2538 expressions.
2539
2540 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2541
2542 PR c++/11510
2543 * call.c (op_error): Properly format REALPART_EXPR and
2544 IMAGPART_EXPR.
2545 * error.c (dump_expr): Likewise.
2546
2547 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2548
2549 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2550
2551 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2552
2553 PR c++/5293
2554 * call.c (initialize_reference): Improve diagnostic.
2555
2556 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2557
2558 PR c++/11154
2559 * pt.c (more_specialized_class): Add full_args parameter.
2560 (most_specialized_class): Adjust calls to more_specialized_class.
2561 * cp-tree.h (more_specialized_class): Adjust declaration.
2562
2563 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
2564
2565 * lex.c (enum tree_node_kind): Delete.
2566
2567 2003-07-13 Mark Mitchell <mark@codesourcery.com>
2568
2569 PR c++/11503
2570 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2571 (SET_DECL_SELF_REFERENCE_P): Likewise.
2572 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2573 * pt.c (tsubst_decl): Copy it.
2574 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2575
2576 * pt.c (reregister_specialization): Fix thinko in previous change.
2577
2578 * cp-tree.h (cp_id_kind): New type.
2579 (unqualified_name_lookup_error): Change prototype.
2580 (unqualified_fn_lookup_error): New function.
2581 (do_identifier): Remove.
2582 (do_scoped_id): Likewise.
2583 (tsubst_copy_and_build): Change prototype.
2584 (reregister_specialization): New function.
2585 (perform_koenig_lookup): Likewise.
2586 (finish_id_expression): Likewise.
2587 * call.c (build_method_call): Adjust call to
2588 unqualified_name_lookup_error.
2589 * decl.c (duplicate_decls): Use reregister_specialization.
2590 * lex.c (is_global): Remove.
2591 (unqualified_name_lookup_error): Return a value.
2592 (do_identifier): Remove.
2593 (do_scoped_id): Likewise.
2594 (identifier_typedecl_value): Remove.
2595 (unqualified_fn_lookup_error): New function.
2596 * parser.c (cp_parser_id_kind): Remove.
2597 (cp_parser_non_constant_id_expression): Remove.
2598 (cp_parser_primary_expression): Use finish_id_expression.
2599 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2600 cp_parser_id_kind.
2601 (cp_parser_postfix_expression): Use perform_koenig_lookup.
2602 (cp_parser_template_argument): Use cp_id_kind.
2603 (cp_parser_fold_non_dependent_expr): Adjust call to
2604 tsubst_copy_and_build.
2605 * pt.c (unregister_specialization): Rename to ...
2606 (reregister_specialization): This.
2607 (tsubst_friend_function): Use it.
2608 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2609 (tsubst_qualified_id): Likewise.
2610 (tsubst_expr): Likewise.
2611 (tsubst_copy_and_build): Add function_p parameter. Use
2612 finish_id_expression. Introduce RECUR macro.
2613 (tsubst_non_call_postfix_expression): New function.
2614 (regenerate_decl_from_template): Use reregister_specialization.
2615 * semantics.c (perform_koenig_lookup): New function.
2616 (finish_id_expression): Likewise.
2617
2618 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2619
2620 * pt.c (push_access_scope_real): Remove.
2621 (push_access_scope): Move code from push_access_scope_real.
2622 (pop_access_scope): Don't check for TEMPLATE_DECL.
2623 (instantiate_template): Defer access checking during template
2624 substitution.
2625 (regenerate_decl_from_template): Tidy.
2626
2627 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
2628
2629 PR c++/11437
2630 * operators.def: Add definitions for __imag__, __real__.
2631
2632 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
2633
2634 PR c++/11050
2635 * parser.c (cp_parser_expression_list): Rename to ...
2636 (cp_parser_parenthesized_expression_list): ... here. Add attribute
2637 parameter, parse the surounding parentheses.
2638 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2639 parameters. Return int.
2640 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2641 (cp_parser_postfix_expression): Adjust function call parsing.
2642 (cp_parser_new_placement): Adjust.
2643 (cp_parser_new_initializer): Likewise.
2644 (cp_parser_cast_expression): Likewise.
2645 (cp_parser_selection_statement): Likewise.
2646 (cp_parser_mem_initializer): Likewise.
2647 (cp_parser_asm_definition): Likewise.
2648 (cp_parser_init_declarator): Likewise.
2649 (cp_parser_declarator): Make
2650 cdtor_or_conv_p an int ptr.
2651 (cp_parser_direct_declarator): Likewise. Check for a parameter
2652 list on cdtors & conv functions.
2653 (cp_parser_initializer): Adjust.
2654 (cp_parser_member_declaration): Adjust.
2655 (cp_parser_attribute_list): Move code into
2656 cp_parser_parens_expression_list.
2657 (cp_parser_functional_cast): Adjust.
2658 * pt.c (type_dependent_expression_p): Erroneous expressions are
2659 non-dependent.
2660
2661 2003-07-11 Geoffrey Keating <geoffk@apple.com>
2662
2663 * decl.c (cp_finish_decl): Handle 'used' attribute.
2664
2665 * cp-lang.c (c_reset_state): New dummy routine.
2666 * cp-tree.h (finish_file): Move prototype to c-common.h.
2667 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2668
2669 2003-07-11 Mark Mitchell <mark@codesourcery.com>
2670
2671 PR c++/8327
2672 * pt.c (tsubst_qualified_id): Implement suggested resolution for
2673 Core Issue 2.
2674 (type_dependent_expression_p): Likewise.
2675
2676 2003-07-10 Mark Mitchell <mark@codesourcery.com>
2677
2678 * typeck.c (build_binary_op): Do not warn about signed
2679 vs. unsigned comparisons in the bodies of templates.
2680
2681 PR c++/9411
2682 * parser.c (cp_parser_postfix_expression): Check dependency of
2683 functions.
2684
2685 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2686
2687 PR c++/10032
2688 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2689 still errors.
2690
2691 PR c++/10527
2692 * error.c (decl_to_string): Do not print default argument
2693 expressions.
2694
2695 * cp-tree.h (break_out_calls): Remove declaration.
2696 * tree.c (break_out_calls): Remove.
2697 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2698
2699 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
2700
2701 PR c++ 9483
2702 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2703 * decl2.c (constructor_name_p): Avoid repeated constructor_name
2704 calls.
2705 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2706
2707 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2708
2709 * typeck.c (build_x_unary_op): Take note of the fact that
2710 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2711 trees.
2712
2713 * parser.c (cp_parser_primary_expression): Preserve the form of
2714 qualified expressions in templates, even if they are not
2715 dependent.
2716 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2717 (tsubst_qualified_id): Likewise.
2718 * search.c (accessible_p): Treat everything in the body of a
2719 template as accessible.
2720
2721 2003-07-08 Mark Mitchell <mark@codesourcery.com>
2722
2723 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2724 * cp-tree.h (build_call_from_tree): Remove.
2725 (build_member_call): Likewise.
2726 (dependent_template_arg_p): Remove.
2727 (any_dependent_template_arguments_p): New function.
2728 (dependent_template_id_p): Likewise.
2729 (any_type_dependent_arguments_p): Likewise.
2730 (build_non_dependent_expr): Likewise.
2731 (build_non_dependent_args): Likewise.
2732 (build_x_compound_expr): Adjust prototype.
2733 * call.c (build_new_method_call): Handle non-dependent expressions
2734 correctly.
2735 * decl2.c (grok_array_decl): Likewise.
2736 (build_offset_ref_call_from_tree): Likewise.
2737 (build_call_from_tree): Remove.
2738 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2739 (dump_expr): Likewise.
2740 * init.c (build_member_call): Remove.
2741 * mangle.c (write_expression): Update handling for template-ids.
2742 * parser.c (cp_parser_primary_expression): Use
2743 any_dependent_template_arguments_p. Update constant-expression
2744 handling.
2745 (cp_parser_postfix_expression): Use
2746 any_type_dependent_arguments_p. Simplify call processing.
2747 (cp_parser_unary_expression): Simplify.
2748 (cp_parser_expression): Adjust for changes to
2749 build_x_compound_expr.
2750 (cp_parser_template_argument): Implement standard-conforming
2751 parsing of non-type template arguments.
2752 (cp_parser_direct_declarator): Use
2753 cp_parser_fold_non_dependent_expr.
2754 (cp_parser_fold_non_dependent_expr): New function.
2755 (cp_parser_next_token_ends_template_argument_p): Likewise.
2756 * pt.c (convert_template_argument): Do not call
2757 maybe_fold_nontype_arg.
2758 (tsubst_baselink): Likewise.
2759 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
2760 processing work correctly for non-dependent expressions. Adjust
2761 handling of COMPOUND_EXPR. Simplify call processing.
2762 (value_dependent_expression_p): Deal with functional casts and
2763 sizeof/alignof correctly.
2764 (type_dependent_expression_p): Handle overloaded functions.
2765 (any_type_dependent_arguments_p): New function.
2766 (any_dependent_template_arguments_p): Likewise.
2767 (dependent_template_p): Treat SCOPE_REFs as dependent.
2768 (dependent_template_id_p): Simplify.
2769 (build_non_dependent_expr): New function.
2770 (build_non_dependent_args): Likewise.
2771 * semantics.c (finish_stmt_expr): Don't make dependent
2772 statement-expresions have void type.
2773 (finish_call_expr): Handle non-dependent expressions
2774 correctly.
2775 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2776 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2777 type size_t, even in templates.
2778 (expr_sizeof): Likewise.
2779 (finish_class_member_access_expr): Handle non-dependent expressions
2780 correctly.
2781 (build_x_indirect_ref): Likewise.
2782 (build_x_binary_op): Likewise.
2783 (build_x_unary_op): Likewise.
2784 (build_x_conditional_expr): Likewise.
2785 (build_x_compound_expr): Likewise.
2786 * typeck2.c (build_x_arrow): Likewise.
2787
2788 2003-07-09 Jan Hubicka <jh@suse.cz>
2789
2790 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2791 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2792 (start_function): Use DECL_ESTIMATED_INSNS.
2793 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2794
2795 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2796 unit-at-a-time
2797
2798 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2799
2800 PR c++/11030
2801 * pt.c (instantiate_class_template): Don't call xref_tag to
2802 inject name when the friend class is a specialization.
2803
2804 2003-07-07 Mark Mitchell <mark@codesourcery.com>
2805
2806 * cp-tree.h (build_scoped_method_call): Remove.
2807 (lookup_qualified_name): Remove parameter.
2808 (tsubst_copy_and_build): Declare.
2809 (finish_qualified_object_call_expr): Remove.
2810 (check_accessibility_of_qualified_id): New function.
2811 (finish_qualified_id_expr): Likewise.
2812 (non_reference): Likewise.
2813 (build_expr_from-tree): Remove.
2814 * call.c (non_reference): Remove.
2815 (build_scoped_method_call): Likewise.
2816 (build_method_call): Use error_operand_p. Assert that we are not
2817 processing a template.
2818 (standard_conversion): Use non_reference.
2819 * class.c (build_vtbl_entry_ref): Likewise.
2820 (build_vtbl_ref_1): Likewise.
2821 * cvt.c (build_expr_type_conversion): Use non_reference.
2822 * decl.c (lookup_qualified_name): Remove flags parameter.
2823 (grok_op_properties): Use non_reference.
2824 * decl2.c (grok_array_decl): Likewise.
2825 (build_expr_from_tree): Remove.
2826 (build_offset_ref_call_from_tree): Update comment.
2827 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2828 * except.c (prepare_eh_types): Use non_reference.
2829 (can_convert_eh): Likewise.
2830 * init.c (build_dtor_call): Avoid using build_method_call.
2831 * mangle.c (write_template_param): Remove misleading comment.
2832 * method.c (locate_copy): Use non_reference.
2833 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2834 (cp_parser_primary_expression): Do not create SCOPE_REFs is
2835 non-dependent contexts.
2836 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2837 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2838 build_expr_from_tree.
2839 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2840 Use check_accessibility_of_qualified_id.
2841 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2842 build_expr_from_tree.
2843 (tsubst_baselink): New function.
2844 (tsubst_qualified_id): Likewise.
2845 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
2846 (tsubst_expr): Adjust call to lookup_qualified_name.
2847 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
2848 handling of CALL_EXPRs.
2849 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2850 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2851 * search.c (check_final_overrider): Likewise.
2852 * semantics.c (check_accessibility_of_qualified_id): New function.
2853 (finish_qualified_object_call_expr): Remove.
2854 * typeck.c (target_type): Use non_reference.
2855 (cxx_sizeof_or_alignof_type): Likewise.
2856 (dubious_conversion_warnings): Likewise.
2857 (convert_for_initialization): Likewise.
2858 (non_reference): New function.
2859
2860 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2861
2862 * decl.c (print_binding_level, print_other_binding_stack,
2863 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2864 stdio calls.
2865 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2866
2867 2003-07-07 Andreas Jaeger <aj@suse.de>
2868
2869 * friend.c: Convert to ISO C90 prototypes.
2870
2871 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2872 language.
2873 * cfns.h: Regenerate.
2874
2875 * typeck.c: Convert remaining prototypes to ISO C90.
2876 * search.c: Likewise.
2877
2878 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2879 * semantics.c (expand_or_defer_fn): Likewise
2880 * mangle.c (discriminator_for_string_literal): Likewise.
2881 * g++spec.c (lang_specific_driver): Likewise.
2882
2883 * search.c (lookup_base_r): Remove unused variable.
2884
2885 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
2886
2887 * semantics.c: (genrtl_try_block) Adjust emit_line_note
2888 calls.
2889
2890 2003-07-07 Andreas Jaeger <aj@suse.de>
2891
2892 * search.c (lookup_base_r): Remove unused variable.
2893
2894 2003-07-06 Michael Chastain <mec@shout.net>
2895
2896 PR debug/10055
2897 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2898 assigning to input_filename directly.
2899
2900 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
2901
2902 * call.c: Fix comment formatting.
2903 * class.c: Likewise.
2904 * cp-tree.h: Likewise.
2905 * decl.c: Likewise.
2906 * decl2.c: Likewise.
2907 * error.c: Likewise.
2908 * method.c: Likewise.
2909 * name-lookup.c: Likewise.
2910 * parser.c: Likewise.
2911 * pt.c: Likewise.
2912 * rtti.c: Likewise.
2913 * search.c: Likewise.
2914 * typeck.c: Likewise.
2915
2916 2003-07-06 Mark Mitchell <mark@codesourcery.com>
2917
2918 PR c++/11345
2919 * search.c (lookup_base_r): Remove is_non_public and
2920 within_current_scope parameters. Remove other dead code.
2921 (lookup_base): Adjust call to lookup_base_r.
2922 (adjust_result_of_qualified_name_lookup): Improve comment.
2923 * semantics.c (finish_call_expr): Use maybe_dummy_object.
2924
2925 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
2926
2927 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2928 LANG_HOOKS_MISSING_ARGUMENT): Override.
2929
2930 2003-07-05 Mark Mitchell <mark@codesourcery.com>
2931
2932 PR c++/11431
2933 * typeck.c (build_static_cast): Check for reference conversions
2934 earlier.
2935
2936 2003-07-04 Mark Mitchell <mark@codesourcery.com>
2937
2938 * cp-tree.h (perform_integral_promotions): Declare.
2939 * call.c (build_addr_func): Use decay_conversion.
2940 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
2941 (convert_for_arg_passing): Use perform_integral_promotions.
2942 * cvt.c (build_expr_type_conversion): Use decay_conversion.
2943 (type_promotes_to): Do not return a cv-qualified type.
2944 * decl.c (grok_reference_init): Fix formatting.
2945 (get_atexit_node): Use decay_conversion.
2946 (build_enumerator): Use perform_integral_promotions.
2947 * init.c (build_vec_init): Use decay_conversion.
2948 * semantics.c (finish_expr_stmt): Likewise.
2949 (finish_switch_cond): Use perform_integral_promotions.
2950 * typeck.c (default_conversion): Likewise.
2951 (perform_integral_promotions): New function.
2952 (build_indirect_ref): Use decay_conversion.
2953 (build_array_ref): Use perform_integral_promotions.
2954 (convert_arguments): Use decay_conversion.
2955 (build_unary_op): Use perform_integral_promotions.
2956 (build_c_cast): Use decay_conversion.
2957 (build_modify_expr): Likewise.
2958 (convert_for_initialization): Likewise.
2959 * typeck2.c (build_x_arrow): Likewise.
2960
2961 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
2962
2963 * call.c: Fix comment typos.
2964 * class.c: Likewise.
2965 * cp-tree.h: Likewise.
2966 * cvt.c: Likewise.
2967 * decl2.c: Likewise.
2968 * decl.c: Likewise.
2969 * init.c: Likewise.
2970 * mangle.c: Likewise.
2971 * parser.c: Likewise.
2972 * pt.c: Likewise.
2973 * search.c: Likewise.
2974 * semantics.c: Likewise.
2975 * tree.c: Likewise.
2976 * typeck.c: Likewise.
2977
2978 2003-07-04 Zack Weinberg <zack@codesourcery.com>
2979
2980 * parser.c (cp_lexer_read_token): No need to handle string
2981 constant concatenation.
2982
2983 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2984
2985 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2986 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2987 ATTRIBUTE_GCC_CXXDIAG.
2988
2989 2003-07-03 Mark Mitchell <mark@codesourcery.com>
2990
2991 * call.c (build_addr_func): Handle bound pointers-to-members.
2992 (build_method_call): Do not call resolve_offset_ref.
2993 (implicit_conversion): Likewise.
2994 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2995 resolve_offset_ref.
2996 (resolve_args): Do not call resolve_offset_ref.
2997 (build_conditional_expr): Likewise.
2998 (build_new_method_call): Likewise.
2999 * cp-tree.def (OFFSET_REF): Update documentation.
3000 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
3001 pointers to members to pointers.
3002 (ocp_convert): Do not call resolve_offset_ref.
3003 (convert_to_void): Likewise.
3004 (build_expr_type_conversion): Likewise.
3005 * decl2.c (delete_sanity): Likewise.
3006 * init.c (resolve_offset_ref): Simplify greatly.
3007 (build_vec_delete): Do not call resolve_offset_ref.
3008 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
3009 if appropriate.
3010 (cp_parser_unary_expression): Use
3011 cp_parser_simple_cast_expression.
3012 (cp_parser_delete_expression): Likewise.
3013 (cp_parser_cast_expression): Likewise.
3014 (cp_parser_pm_expression): Use cp_parser_binary_op.
3015 (cp_parser_simple_cast_expression): New function.
3016 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
3017 * semantics.c (finish_increment_expr): Likewise.
3018 (finish_typeof): Likewise.
3019 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
3020 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
3021 (decay_conversion): Do not call resolve_offset_ref.
3022 (finish_class_member_access_expr): Likewise.
3023 (convert_arguments): Likewise.
3024 (build_x_binary_op): Handle DOTSTAR_EXPR.
3025 (condition_conversion): Do not call resolve_offset_ref.
3026 (unary_complex_lvalue): Likewise.
3027 (build_static_cast): Likewise.
3028 (build_reinterpret_cast): Likewise.
3029 (build_const_cast): Likewise.
3030 (build_c_cast): Likewise.
3031 (build_modify_expr): Likewise.
3032 (convert_for_assignment): Likewise.
3033 (convert_for_initialization): Likewise.
3034 * typeck2.c (build_x_arrow): Likewise.
3035 (build_m_component_ref): Simplify.
3036
3037 * call.c (build_scoped_method_call): Use convert_to_void.
3038 (build_method_call): Likewise.
3039 * class.c (check_field_decls): Remove dead code.
3040 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3041 * decl2.c (grok_array_decl): Remove dead code.
3042 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3043 as pointer-to-member representation.
3044 * init.c (build_offset_ref): Tidy.
3045 (build_vec_delete_1): Use convert_to_void.
3046 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3047 as pointer-to-member representation.
3048
3049 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
3050
3051 PR c++/9162
3052 * decl.c (grokdeclarator): Return friend decls, not
3053 void_type_node.
3054 * decl2.c (grokfield): Alter friend decl check.
3055 * parser.c (struct cp_parser): Document default_arg chain on
3056 unparsed_functions_queue.
3057 (cp_parser_save_default_args): New.
3058 (cp_parser_init_declarator, cp_parser_function_definition,
3059 cp_parser_member_declaration): Call it.
3060 (cp_parser_class_specifier): Remove unused variable. Alter
3061 processing of unparsed_functions_queue.
3062
3063 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3064
3065 * class.c (add_method, check_field_decl): Fix format specifier.
3066 * decl.c (duplicate_decls, pushdecl, check_goto,
3067 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3068 start_enum): Likewise.
3069 * decl2.c (ambiguous_decl): Likewise.
3070 * pt.c (redeclare_class_template): Likewise.
3071
3072 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
3073
3074 PR c++/10219
3075 * pt.c (type_unification_real): Don't unify exprs of error type.
3076 * tree.c (error_type): Don't die on error_type.
3077
3078 PR c++/9779
3079 * decl2.c (arg_assoc_class): Don't die on NULL type.
3080 * typeck.c (type_unknown_p): Don't die on untyped expressions.
3081
3082 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3083
3084 PR c++/6949
3085 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3086 classes.
3087
3088 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3089
3090 * error.c (locate_error): %P takes an `int', not a `tree'.
3091
3092 2003-07-02 Jan Hubicka <jh@suse.cz>
3093
3094 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3095 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3096 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3097 massaging.
3098
3099 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3100 (expand_or_defer_fn): Declare.
3101 (lower_function): Declare.
3102 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3103 * decl2.c: Include cgraph.h and varpool.h
3104 (maybe_emit_vtables): Make explicit instantations as needed.
3105 (mark_member_pointers, lower_function): New functions.
3106 (finish_file): Do unit-at-a-time.
3107 * method.c (synthesize_method): Use expand_or_defer_fn.
3108 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3109 * parser.c (cp_parser_function_definition_after_decl): Use
3110 expand_or_defer_fn.
3111 * pt.c (instantiate_decl): Likewise.
3112 * semantics.c: Include cgraph.h
3113 (expand_or_defer_fn): Break out from ...
3114 (expand_body): ... here; deal with unit-at-a-time.
3115 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3116 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3117
3118 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3119
3120 * call.c (resolve_scoped_fn_name): Return error_mark_node for
3121 erroneous cases.
3122
3123 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3124
3125 PR c++/11149
3126 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3127 is a class type.
3128
3129 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
3130
3131 PR c++/8046
3132 * error.c (dump_decl): Handle BIT_NOT_EXPR as
3133 pseudo destructor calls.
3134
3135 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3136
3137 * cp-tree.h (define_label): Replace filename and lineno
3138 arguments with a location_t.
3139 * decl.c (pop_label): Adjust define_label call.
3140 (define_label): Replace filename and lineno arguments with a
3141 location_t.
3142 * semantics.c (finish_label): Adjust define_label call.
3143
3144 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3145
3146 PR c++/9559
3147 * decl2.c (grokfield): Do not build NOP_EXPRs around the
3148 error_mark_node.
3149
3150 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
3151
3152 * Make-lang.in: Update.
3153 * cp-lang.c (c_language): Define.
3154 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3155 * cp-tree.h (cxx_init_options): Remove.
3156 * lex.c: Don't include diagnostic.h.
3157 (cxx_init_options): Remove.
3158
3159 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3160
3161 PR c++/4933
3162 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3163 tree generated within a template. Use dump_expr to dump an
3164 expression sizeof.
3165
3166 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3167
3168 * mangle.c (write_expression): Exit gracefully when trying to
3169 mangle a CALL_EXPR.
3170
3171 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3172
3173 PR c++/10750
3174 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3175 (value- or type-) dependent expression as DECL_INITIAL is a
3176 valid constant-expression (at parser time).
3177
3178 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3179
3180 PR c++/11106
3181 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3182 USING_DECL, instead of print_tree_identifier.
3183
3184 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3185
3186 * cp-tree.h (language_to_string): Adjust declaration.
3187 * dump.c (cp_dump_tree): Adjust usage.
3188 * error.c (dump_char): Use output_formatted_scalar. Tidy.
3189 (parm_to_string): Lose unused parameter. Tidy.
3190 (expr_to_string): Likewise.
3191 (code_to_string): Likewise.
3192 (language_to_string): Likewise.
3193 (op_to_string): Likewise.
3194 (assop_to_string): Likewise.
3195 (digit_buffer): Remove.
3196 (dump_type): Format builtin vector type as __vector__.
3197
3198 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3199
3200 * error.c (print_integer): Remove.
3201 (dump_type_suffix): Adjust.
3202 (dump_expr): Likewise.
3203
3204 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3205
3206 * error.c (print_instantiation_partial_context): Take a
3207 location_t.
3208 (print_instantiation_full_context): Adjust.
3209 (print_instantiation_context): Adjust.
3210
3211 * cp-tree.h (cp_line_of, cp_file_of): Remove.
3212 * error.c (cp_line_of, cp_file_of): Merge into ...
3213 (location_of): ... here. Make static, return a location_t.
3214 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3215
3216 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3217
3218 PR c++/10784
3219 * call.c (joust): Move warn_conversion check outwards.
3220
3221 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3222
3223 * decl.c (build_typename_type)
3224 * mangle.c (write_template_template_arg)
3225 * parser.c (cp_parser_scope_through_which_access_occurs)
3226 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3227 * repo.c (get_base_filename)
3228 * semantics.c (maybe_convert_cond):
3229 Mark the definition static, matching the forward declaration.
3230
3231 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3232
3233 PR c++/10468
3234 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3235
3236 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3237
3238 PR c++/10796
3239 * decl.c (finish_enum): Implement DR377.
3240
3241 * decl.c (cp_finish_decl): Don't make variables with reference
3242 type readonly while they are being initialized.
3243
3244 2003-06-26 Mark Mitchell <mark@codesourcery.com>
3245
3246 PR c++/11332
3247 * typeck.c (build_static_cast): Avoid returning expressions with
3248 reference type.
3249
3250 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
3251
3252 * call.c (build_op_delete_call): Use strip_array_call. Correct
3253 error message to say 'delete' or 'delete[]'.
3254
3255 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
3256
3257 PR c++/8266
3258 * pt.c (check_explicit_specialization): When looking up a
3259 template function from an identifier outside class-scope, bind
3260 it to CP_DECL_CONTEXT.
3261
3262 2003-06-25 Mark Mitchell <mark@codesourcery.com>
3263
3264 PR c++/10990
3265 * search.c (lookup_base_r): Rely on accessible_p, rather than
3266 trying to emulate that logic here.
3267
3268 PR c++/10931
3269 * call.c (convert_like): Pass issue_conversion_warnings.
3270 (convert_like_with_context): Likewise.
3271 (convert_like_real): Add issue_conversion_warnings parameter.
3272 (perform_direct_initialization_if_possible): New function.
3273 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3274 * typeck.c (check_for_casting_away_constness): New function.
3275 (build_static_cast): Rewrite.
3276
3277 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
3278
3279 * call.c (enforce_access): Assert we get a binfo.
3280 (build_op_delete_call): Pass a binfo to
3281 perform_or_defer_access_check.
3282 * class.c (alter_access): Likewise.
3283 * decl.c (make_typename_type): Likewise.
3284 (make_unbound_class_template): Likewise.
3285 * lex.c (do_identifier): Likewise.
3286 * method.c (hack_identifier): Likewise.
3287 * parser.c (cp_parser_lookup_name): Likewise.
3288 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3289 test.
3290 * semantics.c (finish_non_static_data_member): Likewise.
3291 (perform_or_defer_access_check): Expect a binfo.
3292 * typeck.c (comptypes): Expect types.
3293
3294 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3295 * friend.c (make_friend_class): Likewise.
3296 * pt.c (check_default_tmpl_args): Likewise.
3297 (lookup_template_class): Likewise.
3298
3299 2003-06-24 Jan Hubicka <jh@suse.cz>
3300
3301 * method.c (thunk_labelno): Move outside ifdef block to make garbage
3302 collector happy.
3303
3304 2003-06-24 Jan Hubicka <jh@suse.cz>
3305
3306 * class.c (build_vtable): Make vtables.
3307 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3308 * decl2.c (output_vtable_inherit): Rename to ...
3309 (prepare_assemble_variable): ... this one; change interface.
3310 (maybe_emit_vtables): Do not call output_vtable_inherit.
3311 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3312 * cp-tree.h (prepare_assemble_variable): New.
3313
3314 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
3315
3316 * method.c: add prototype for make_alias_for_thunk.
3317 (thunk_labelno, make_alias_for_thunk): only define
3318 if ASM_OUTPUT_DEF is defined.
3319
3320 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3321
3322 * method.c (thunk_labelno): New variable.
3323 (make_alias_for_thunk): New function.
3324 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
3325 into the same section as the function it is calling.
3326 Include gt-cp-method.h.
3327 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3328 (cp/method.o): Depend on gt-cp-method.h.
3329 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3330
3331 2003-06-23 Jan Hubicka <jh@suse.cz>
3332
3333 * decl.c (register_dtor_fn): Mark cleanup as used.
3334 * decl2.c (mark_vtable_entries): Skip nops.
3335 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3336 (build_dynamic_cast_1): Likewise.
3337 (tinfo_base_init): Likewise.
3338 (emit_tinfo_decl): Likewise.
3339
3340 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3341
3342 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3343 to it.
3344
3345 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3346
3347 PR c++/10784
3348 * call.c (joust): Warn about choosing conversion sequence only if
3349 -Wconversion.
3350
3351 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3352
3353 PR c++/10864
3354 * call.c (op_error): Tidy.
3355 * error.c (dump_expr): Properly format 'T()' when T is an
3356 aggregate type.
3357
3358 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3359
3360 PR c++/10915
3361 * decl.c (grok_op_properties): Warn possible confusing conversion
3362 only if -Wconversion.
3363
3364 2003-06-20 Mark Mitchell <mark@codesourcery.com>
3365
3366 PR c++/10749
3367 * parser.c (cp_parser_class_head): See through dependent names
3368 when parsing a class-head.
3369
3370 PR c++/10845
3371 * pt.c (try_class_unification): Correct handling of member class
3372 templates.
3373
3374 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3375
3376 * semantics.c (genrtl_finish_function): Adjust
3377 expand_function_end call.
3378
3379 2003-06-19 Mark Mitchell <mark@codesourcery.com>
3380
3381 PR c++/10939
3382 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3383 functions.
3384 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3385
3386 PR c++/9649
3387 * cp-tree.h (pushdecl_class_level): Change prototype.
3388 (push_class_level_binding): Likewise.
3389 * decl.c (add_binding): Reject duplicate static data members.
3390 (pushdecl_class_level): Return a value indicating whether or not
3391 the binding was valid.
3392 (push_class_level_binding): Likewise.
3393 * semantics.c (finish_member_declaration): Don't keep invalid
3394 declarations.
3395
3396 PR c++/11041
3397 * call.c (initialize_reference): Do not use cp_finish_decl to emit
3398 temporary variables.
3399 * cp-tree.h (static_aggregates): Declare.
3400 (pushdecl_top_level_and_finish): Likewise.
3401 * decl.c (pushdecl_top_level_1): New function.
3402 (pushdecl_top_level): Use it.
3403 (pushdecl_top_level_and_finish): New function.
3404 (initialize_local_var): Remove redundant code.
3405 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
3406 building_stmt_tree.
3407 * decl.h (static_aggregates): Remove.
3408 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3409 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3410 (tinfo_base_init): Likewise.
3411
3412 2003-06-19 Matt Austern <austern@apple.com>
3413
3414 PR c++/11228
3415 * init.c (build_zero_init): Assert that number of array elements
3416 is an integer constant.
3417 (build_default_init) Don't use build_zero_init for arrays with
3418 variable number of elements.
3419
3420 2003-06-19 Andreas Jaeger <aj@suse.de>
3421
3422 * cp-tree.h: Remove duplicated declarations.
3423
3424 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
3425
3426 * pt.c: Convert to ISO C.
3427 * semantics.c: Convert to ISO C.
3428
3429 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3430
3431 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3432 at_least_as_qualified_p, more_qualified_p): Return bool.
3433 * typeck.c: ANSIFY function definitions.
3434 (comp_array_types): Take redeclaration bool parameter.
3435 (comptypes): Rearrange STRICT handling.
3436 (at_least_as_qualified_p, more_qualified_p,
3437 comp_cv_qualification): Cache cv quals.
3438 (compparms): Rearrange loop.
3439
3440 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3441
3442 * cp-tree.h (COMPARE_RELAXED): Rename to ...
3443 (COMPARE_DERIVED): ... here. Adjust comment.
3444 (resolve_typename_type_in_current_instantiation): Remove.
3445 (cp_tree_equal, comptypes): Return a bool.
3446 * cvt.c (convert_to_reference): Adjust comptypes call.
3447 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3448 (resolve_typename_type_in_current_instantiation): Remove.
3449 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3450 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3451 calls. Refactor code.
3452 * typeck.c (comp_array_types): Return bool. Lose callback.
3453 parameter. Adjust cp_tree_equal calls.
3454 (comptypes): Return bool. Adjust strict handling. Remove relaxed
3455 enumeration and java type handling. Deal with typename types here.
3456 Adjust recursive and cp_tree_equals calls. Adjust base and derived
3457 checking.
3458 (comp_target_types): Remove unreachable code. Adjust
3459 same_or_base_type_p calls.
3460 (ptr_reasonably_similar): Adjust base and derived check.
3461
3462 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3463 unused calculation.
3464 (check_return_expr): Adjust error messages.
3465 * cp-tree.def (SCOPE_REF): Correct comment.
3466
3467 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3468
3469 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3470 string again.
3471
3472 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3473
3474 * optimize.c (dump_function): Form complete flag name by
3475 prefixing 'fdump-' to string returned by dump_flag_name().
3476
3477 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3478
3479 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3480 string.
3481
3482 2003-06-17 Jason Merrill <jason@redhat.com>
3483
3484 PR c++/10929
3485 * decl.c (grokfndecl): Don't mark a function inline for
3486 -finline-functions if it isn't defined.
3487
3488 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3489
3490 PR c++/10712
3491 * class.c (handle_using_decl): Robustify.
3492
3493 PR c++/11105
3494 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3495 * mangle.c (struct globals): Remove internal_mangling_p.
3496 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3497 (write_template_parm): Don't write out the level number.
3498 (conv_type_names): New variable.
3499 (hash_type): New function.
3500 (compare_type): Likewise.
3501 (mangle_conv_op_name_for_type): Don't try to mangle conversion
3502 operator names.
3503 * search.c (lookup_conversion_operator): New function.
3504 (lookup_fnfields_1): Use it.
3505
3506 2003-06-17 Andreas Jaeger <aj@suse.de>
3507
3508 * except.c: Remove duplicate declaration of push_eh_cleanup.
3509
3510 * call.c: Remove extra declaration of inhibit_warnings.
3511
3512 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3513
3514 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
3515 * mangle.c: Convert to ISO C.
3516
3517 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3518
3519 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3520 macro.
3521
3522 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3523
3524 * tree.c: Convert to ISO C.
3525
3526 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
3527
3528 * cp-tree.h: Follow spelling conventions.
3529 * mangle.c: Likewise.
3530 * method.c: Likewise.
3531 * parser.c: Likewise.
3532
3533 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3534
3535 * decl.c (start_function): Adjust init_function_start call.
3536 * method.c (use_thunk): Likewise.
3537 * semantics.c (genrtl_start_function): Likewise.
3538
3539 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3540
3541 * Make-lang.in: Remove c-options.o.
3542
3543 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
3544
3545 * lex.c: Convert to ISO C.
3546
3547 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
3548 * init.c: removes use of PARAMS macro. Use ISO style function
3549 declarations. (Not copyright-significant change.)
3550
3551 * rtti.c: Remove PARAMS.
3552
3553 * typeck2.c: Convert to ISO C.
3554
3555 2003-06-12 Mark Mitchell <mark@codesourcery.com>
3556
3557 PR c++/10635
3558 * typeck.c (build_c_cast): Check that the destination type is
3559 complete.
3560
3561 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3562
3563 PR c++/10432
3564 * cp-tree.h (finish_declarator): Remove.
3565 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3566 erroneous declarations.
3567 * semantics.c (finish_declarator): Remove.
3568
3569 2003-06-11 Roger Sayle <roger@eyesopen.com>
3570
3571 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3572 global static constructor/destructor if it will be empty, i.e.
3573 either doesn't call any ctors/dtors or only calls pure or const
3574 ctors/dtors.
3575
3576 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3577
3578 * mangle.c (tm_p.h): Include it.
3579 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3580
3581 PR c++/11131
3582 * tree.c (cp_cannot_inline_fn): Check for "inline" before
3583 instantiation.
3584
3585 2003-06-10 Jason Merrill <jason@redhat.com>
3586
3587 PR c++/10968
3588 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3589
3590 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
3591
3592 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3593 (start_cleanup_cnt): New.
3594
3595 2003-06-10 Mark Mitchell <mark@codesourcery.com>
3596
3597 PR c++/11131
3598 * cp-tree.h (template_for_substitution): Declare.
3599 * decl2.c (mark_used): Use it when figuring out whether or not a
3600 function is inline.
3601 * pt.c (template_for_substitution): Give it external linkage.
3602 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3603 possible.
3604
3605 2003-06-09 Zack Weinberg <zack@codesourcery.com>
3606
3607 PR 8861
3608 * mangle.c (write_real_cst): New function. Implement
3609 ABI-compliant mangling of floating-point literals when
3610 -fabi-version>=2; provide backward compatibility with 3.3 when
3611 -fabi-version=1 (with warning). Clarify commentary.
3612 (write_template_arg_literal): Use write_real_cst.
3613
3614 2003-06-07 Andreas Jaeger <aj@suse.de>
3615
3616 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3617
3618 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3619
3620 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3621 (LANG_HOOKS_HANDLE_OPTION): Override.
3622 * cp-tree.h (cxx_init_options): Update.
3623 * lex.c (cxx_init_options): Update.
3624
3625 2003-06-05 Jan Hubicka <jh@suse.cz>
3626
3627 * Make-lang.in: Add support for stageprofile and stagefeedback
3628
3629 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
3630
3631 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3632
3633 2003-06-04 Andreas Jaeger <aj@suse.de>
3634
3635 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3636
3637 2003-06-03 Jason Merrill <jason@redhat.com>
3638
3639 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3640
3641 * cp/decl.c (reshape_init): Handle vectors.
3642
3643 * testsuite/g++.dg/init/array10.C: New.
3644
3645 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3646
3647 PR c++/10940
3648 * pt.c (check_explicit_specialization): Check for 'static'
3649 earlier.
3650
3651 2003-05-31 Diego Novillo <dnovillo@redhat.com>
3652
3653 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3654 the operand of a CONSTRUCTOR node.
3655
3656 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3657
3658 * decl.c (cp_binding_level::this_entity): Rename from this_class.
3659 (cxx_scope_descriptor): New function.
3660 (cxx_scope_debug): Likewise.
3661 (push_binding_level): Use it.
3662 (pop_binding_level): Likewise.
3663 (suspend_binding_level): Likewise.
3664 (resume_binding_level): Likewise.
3665 (pushlevel_class): Adjust use of this_class.
3666 (pushtag): Likewise.
3667 (lookup_name_real): Likewise.
3668 (global_scope_name): New variable.
3669 (initialize_predefined_identifiers): Initialize it.
3670 (push_namespace): Use it.
3671 (make_cxx_scope): New function.
3672 (pushlevel): Use it.
3673 (pushlevel_class): Likewise.
3674 (push_binding_level): Simplify. Loose the last two arguments.
3675 (make_binding_level): Remove.
3676 (initial_push__namespace_scope): New function.
3677 (push_namespace): Use it. Simplify.
3678 (cxx_init_decl_processing): Likewise.
3679 (declare_namespace_level): Remove.
3680
3681 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3682
3683 PR c++/10956
3684 * pt.c (instantiate_decl): Don't use full template arguments if
3685 we are dealing with specializations.
3686
3687 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3688
3689 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3690 (binding_depth): Unconditionally define.
3691 (is_class_level): Likewise.
3692 (indent): Likewise. Take an indenting parameter.
3693 (push_binding_level): Remove conditional definittion.
3694 (pop_binding_level): Likewise.
3695 (suspend_binding_level): Likewise.
3696 (resume_binding_level): Likewise.
3697 (pushlevel): Likewise.
3698 (pushlevel_class): Likewise.
3699 (poplevel_class): Likewise.
3700 (pop_everything): Likewise.
3701
3702 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3703
3704 * name-lookup.h (global_scope_p): New macro.
3705 * decl.c (pop_binding_level): Use it. Don't refer directly to
3706 global_binding_level.
3707 (suspend_binding_level): Likewise.
3708 (global_bindings_p): Likewise.
3709 (print_other_binding_stack): Likewise.
3710 (print_binding_stack): Likewise.
3711 (maybe_push_to_top_level): Likewise.
3712 (pushdecl_namespace_level): Likewise.
3713 (cxx_init_decl_processing): Likewise.
3714 (start_decl): Likewise.
3715 (cp_finish_decl): Likewise.
3716 (start_function): Likewise.
3717 (global_binding_level): Remove.
3718
3719 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3720
3721 * parser.c (cp_parser_explicit_instantiation): Restore old
3722 access before template instantiation.
3723
3724 2003-05-23 Geoffrey Keating <geoffk@apple.com>
3725
3726 * lang-specs.h: Use -o to specify preprocessor's output file.
3727 Make -no-integrated-cpp work when building PCH files.
3728
3729 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3730
3731 PR c++/10682
3732 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3733 check for implicitly created typedef to an enum.
3734
3735 2003-05-21 Jason Merrill <jason@redhat.com>
3736
3737 * init.c (build_vec_delete): Copy the address into a temporary
3738 variable before calling build_vec_delete_1.
3739 * decl2.c (delete_sanity): Don't call stabilize_reference.
3740
3741 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
3742
3743 * pt.c (register_specialization): Update the decl's location,
3744 if necessary.
3745 (check_explicit_specialization): Likewise.
3746
3747 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3748
3749 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3750
3751 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
3752
3753 PR c++/9738
3754 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3755 if the old decl had instantiated DECL_RTL.
3756 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3757
3758 2003-05-19 Matt Austern <austern@apple.com>
3759
3760 * lang-options.h: Document -Wno-invalid-offsetof
3761 * typeck.c (build_class_member_access_expr): Don't complain about
3762 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3763
3764 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3765
3766 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3767 (binding_entry_make): Make entry->chain NULL after getting an entry.
3768 fix the spelling of chain in a comment.
3769 (binding_table_free): speed up by having temporary variable.
3770 (binding_table_new): set table->chain to be NULL after allocating
3771 a table.
3772 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3773 binding->previous to NULL after getting an binding for speed.
3774
3775 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3776
3777 * cp-tree.h (struct lang_type_class): Replace data member tags
3778 with hash-table nested_udts.
3779 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3780 * class.c (unreverse_member_declarations): Don't touch
3781 CLASSTYPE_TAGS.
3782 (pushclass): Use cxx_remember_type_decls.
3783 * decl.c (struct cp_binding_level): Replace data member tags with
3784 hash-table type_decls.
3785 (pop_binding_level): Handle level->type_decls.
3786 (kept_level_p): Adjust.
3787 (poplevel): Remove unused local variable.
3788 (bt_print_entry): New function.
3789 (print_binding_level): Use it.
3790 (push_namespace): Build current_binding_level->type_decls.
3791 (maybe_process_template_type_declaration): Adjust.
3792 (pushtag): Likewise.
3793 (clear_anon_tags): Use binding_table_remove_anonymous_types.
3794 (gettags): Remove.
3795 (cxx_remember_type_decls): Rename from storetags. Adjust.
3796 (lookup_tag): Use binding_table_find_anon_type. Tidy.
3797 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3798 (cxx_init_decl_processing): Build global_binding_level->type_decls.
3799 (store_parm_decls): Remove pointless code.
3800 * name-lookup.c (free_binding_entry): New variable.
3801 (ENTRY_INDEX): New macro.
3802 (struct binding_table_s): New datatype.
3803 (binding_entry_make): New function.
3804 (binding_entry_free): Likewise.
3805 (binding_table_construct): Likewise.
3806 (binding_table_free): Likewise.
3807 (binding_table_new): Likewise.
3808 (binding_table_expand): Likewise.
3809 (binding_table_insert): Likewise.
3810 (binding_table_find): Likewise.
3811 (binding_table_find_anon_type): Likewise.
3812 (binding_table_reverse_maybe_remap): Likewise.
3813 (binding_table_remove_anonymous_types): Likewise.
3814 (binding_table_foreach): Likewise.
3815 * name-lookup.h (binding_table): New type.
3816 (binding_entry): Likewise.
3817 (bt_foreach_proc): Likewise.
3818 (struct binding_entry_s): New datatype.
3819 (SCOPE_DEFAULT_HT_SIZE): New macro.
3820 (CLASS_SCOPE_HT_SIZE): Likewise.
3821 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3822 (NAMESPACE_STD_HT_SIZE): Likewise.
3823 (GLOBAL_SCOPE_HT_SIZE): Likewise.
3824 (binding_table_new): Declare.
3825 (binding_table_free): Likewise.
3826 (binding_table_insert): Likewise.
3827 (binding_table_find_anon_type): Likewise.
3828 (binding_table_reverse_maybe_remap): Likewise.
3829 (binding_table_remove_anonymous_types): Likewise.
3830 (binding_table_foreach): Likewise.
3831 (binding_table_find): Likewise.
3832 (cxx_remember_type_decls): Likewise.
3833 * pt.c (bt_instantiate_type_proc): New function.
3834 (do_type_instantiation): Use it.
3835 * search.c (lookup_field_r): Use binding_table_find.
3836
3837 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3838
3839 * semantics.c (perform_deferred_access_checks): Don't discard
3840 checked access.
3841
3842 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3843
3844 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3845 libiberty VA_ macros, always use stdarg.
3846 * rtti.c (create_pseudo_type_info): Likewise.
3847 * tree.c (build_min_nt, build_min): Likewise.
3848
3849 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3850
3851 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3852 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3853 collapse multiple function calls into one.
3854 * tree.c (debug_binfo): Likewise.
3855
3856 2003-05-15 Jason Merrill <jason@redhat.com>
3857
3858 PR c++/5388
3859 * call.c (conditional_conversion): Don't consider implicit
3860 conversions if T2 is a base of T1.
3861 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3862 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3863
3864 * parser.c (cp_parser_primary_expression): Convert a static data
3865 member from reference.
3866
3867 2003-05-15 Mark Mitchell <mark@codesourcery.com>
3868
3869 * call.c (build_op_delete_call): Avoid creating unnecessary types.
3870 * class.c (instantiate_type): Remove tests for tf_no_attributes.
3871 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3872 (COMPARE_NO_ATTRIBUTES): Remove.
3873 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3874
3875 PR c++/8385
3876 * semantics.c (finish_typeof): Refine type-dependency check.
3877
3878 2003-05-13 Jason Merrill <jason@redhat.com>
3879
3880 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3881 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3882
3883 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3884
3885 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3886
3887 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3888
3889 PR c++/10230, c++/10481
3890 * semantics.c (finish_non_static_data_member): Handle when the
3891 non-static member is not from a base of the current class type.
3892
3893 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3894
3895 PR c++/10552
3896 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3897 template and has dependent context.
3898
3899 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3900
3901 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3902
3903 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3904
3905 PR c++/9252
3906 * cp-tree.h (saved_scope): Remove check_access field.
3907 (tsubst_flags_t): Remove tf_parsing.
3908 * decl.c (maybe_push_to_top_level): Don't initialize
3909 scope_chain->check_access.
3910 (make_typename_type, make_unbound_class_template): Don't use
3911 tf_parsing.
3912 (register_dtor_fn): Use push/pop_deferring_access_checks
3913 instead of scope_chain->check_access.
3914 * method.c (use_thunk): Likewise.
3915 * parser.c (cp_parser_explicit_instantiation
3916 (cp_parser_constructor_declarator_p): Don't call
3917 push/pop_deferring_access_checks here.
3918 (cp_parser_template_argument, cp_parser_class_name): Don't use
3919 tf_parsing.
3920 (yyparse): Check flag_access_control.
3921 * pt.c (instantiate_class_template): Call
3922 push/pop_deferring_access_checks.
3923 * semantics.c (push_deferring_access_checks): Propagate
3924 dk_no_check.
3925 (perform_or_defer_access_check): Make sure basetype_path is
3926 a type before comparison.
3927 * call.c (build_op_delete_call, build_over_call): Use
3928 perform_or_defer_access_check.
3929 * class.c (alter_access): Likewise.
3930 * init.c (build_offset_ref): Likewise.
3931 * lex.c (do_identifier): Likewise.
3932 * method.c (hack_identifier): Likewise.
3933 * search.c (lookup_member): Likewise.
3934 * semantics.c (finish_non_static_data_member): Likewise.
3935 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3936 instead of flag_access_control.
3937
3938 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3939
3940 PR c++/9554
3941 * parser.c (cp_parser_class_name): Remove check_access parameter.
3942 All caller adjusted. Update declaration.
3943 (cp_parser_lookup_name): Likewise.
3944 * semantics.c (push_deferring_access_checks): Change parameter type
3945 to enum deferring_kind. All caller adjusted.
3946 (resume_deferring_access_checks): Adjust to use new enum.
3947 (stop_deferring_access_checks): Likewise.
3948 (perform_or_defer_access_check): Likewise.
3949 * cp-tree.h (deferring_kind): New enum.
3950 (deferred_access): Adjust field type.
3951 (push_deferring_access_checks): Update declaration.
3952
3953 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3954
3955 PR c++/10555, c++/10576
3956 * pt.c (lookup_template_class): Handle class template with
3957 multiple levels of parameters when one of the levels contain
3958 errors.
3959
3960 2003-05-08 Jason Merrill <jason@redhat.com>
3961
3962 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3963 expression. Undo some of the recent reorg.
3964
3965 2003-05-07 Richard Henderson <rth@redhat.com>
3966
3967 PR c++/10570
3968 * cfns.gperf: Comment out POSIX thread cancellation points,
3969 plus abort and raise.
3970 * cfns.h: Regenerate.
3971
3972 2003-05-07 Jason Merrill <jason@redhat.com>
3973
3974 * call.c (build_conditional_expr): Don't assume that the folded
3975 expression has result_type.
3976
3977 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3978
3979 * typeck.c (build_unary_op): Deal with const qualifier in
3980 invalid pointer-to-member earlier.
3981
3982 2003-05-05 Jason Merrill <jason@redhat.com>
3983
3984 PR c++/9537
3985 * call.c (conditional_conversion): Build an RVALUE_CONV if
3986 we're just changing the cv-quals.
3987 (build_conditional_expr): Don't call convert to change
3988 cv-quals.
3989
3990 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3991
3992 PR c++/10496
3993 * typeck.c (build_unary_op): Don't output const qualifier when
3994 output invalid pointer-to-member diagnostics.
3995
3996 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3997
3998 * decl.c: Fix typos.
3999
4000 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4001
4002 PR c++/4494
4003 * decl.c (start_function): Use same_type_p to check return type
4004 of main.
4005
4006 2003-05-03 Zack Weinberg <zack@codesourcery.com>
4007
4008 PR c/10604
4009 * cp/typeck.c (build_x_compound_expr): No need to check
4010 extra_warnings as well as warn_unused_value.
4011
4012 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4013
4014 PR c++/9364, c++/10553, c++/10586
4015 * decl.c (make_typename_type): Don't crash on illegal code.
4016
4017 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
4018
4019 * class.c (finish_struct): Use location_t and input_location
4020 directly.
4021 * decl.c (make_label_decl): Likewise.
4022 (use_label): Likewise.
4023 * decl2.c (warn_if_unknown_interface): Likewise.
4024 (start_static_initialization_or_destruction): Likewise.
4025 (generate_ctor_or_dtor_function): Likewise.
4026 (finish_file): Likewise.
4027 * error.c (print_instantiation_full_context): Likewise.
4028 * init.c (create_temporary_var): Likewise.
4029 * method.c (synthesize_method): Likewise.
4030 * parser.c (cp_token): Likewise.
4031 (cp_lexer_set_source_position_from_token): Likewise.
4032 (cp_lexer_get_preprocessor_token): Likewise.
4033 (cp_parser_statement): Likewise.
4034 * pt.c (tsubst_friend_function): Likewise.
4035 (instantiate_class_template): Likewise.
4036 (tsubst_decl): Likewise.
4037 (tsubst): Likewise.
4038 (instantiate_decl): Likewise.
4039 * semantics.c (begin_class_definition): Likewise.
4040 (expand_body): Likewise.
4041
4042 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
4043
4044 * class.c (finish_struct): Rename lineno to input_line.
4045 * decl.c (push_binding_level, pop_binding_level,
4046 suspend_binding_level, resume_binding_level, make_label_decl,
4047 use_label, start_function): Likewise.
4048 * decl2.c (warn_if_unknown_interface,
4049 start_static_initialization_or_destruction,
4050 generate_ctor_or_dtor_function, finish_file): Likewise.
4051 * error.c (cp_line_of, print_instantiation_full_context,
4052 print_instantiation_context): Likewise.
4053 * except.c (check_handlers_1, check_handlers): Likewise.
4054 * init.c (create_temporary_var): Likewise.
4055 * method.c (use_thunk, synthesize_method): Likewise.
4056 * parser.c (cp_lexer_set_source_position_from_token,
4057 cp_lexer_get_preprocessor_token): Likewise.
4058 * pt.c (push_tinst_level, pop_tinst_level,
4059 tsubst_friend_function, instantiate_class_template, tsubst_decl,
4060 tsubst, tsubst_expr, instantiate_decl): Likewise.
4061 * semantics.c (genrtl_try_block, finish_label_stmt,
4062 begin_class_definition, expand_body,
4063 genrtl_finish_function): Likewise.
4064 * tree.c (build_min_nt, build_min): Likewise.
4065
4066 2003-05-01 Mark Mitchell <mark@codesourcery.com>
4067
4068 * decl2.c (comdat_linkage): Don't externalize explicit
4069 instantiations.
4070
4071 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4072
4073 PR c++/10554
4074 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4075 is not NULL.
4076
4077 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
4078
4079 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
4080 (struct lang_identifier): ... to here.
4081 (LANG_ID_FIELD): Remove.
4082 (SET_LANG_ID): Remove.
4083 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4084 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4085 (IDENTIFIER_IMPLICIT_DECL): Likewise.
4086 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4087 (IDENTIFIER_ERROR_LOCUS): Likewise.
4088 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4089
4090 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4091
4092 PR c++/8772
4093 * pt.c (convert_template_argument): Correct diagnostic.
4094
4095 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4096
4097 PR c++/9432, c++/9528
4098 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4099
4100 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
4101
4102 * decl.c (check_previous_goto_1): Adjust prototype.
4103 (check_previous_goto): Adjust use.
4104 (check_switch_goto): Likewise.
4105 (use_label): Adjust.
4106 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4107 (struct named_label_use_list): Use location_t datatype.
4108
4109 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4110
4111 PR c++/10551
4112 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4113 that have not yet been written out.
4114
4115 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4116
4117 PR c++/10549
4118 * class.c (layout_class_type): Mark overlong bitfields as having
4119 the maximum size permitted by their type, after layout.
4120
4121 PR c++/10527
4122 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4123
4124 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4125
4126 * call.c (build_operator_new_call): Fix typo.
4127 * lang-options.h: Likewise.
4128
4129 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4130
4131 PR c++/10515
4132 * cp-tree.h (lookup_field_1): Declare it.
4133 * search.c (lookup_field_1): Make it public.
4134 * decl.c (reshape_init): Handle designated initializers.
4135
4136 * decl.c (maybe_commonize_var): Further tweak support for systems
4137 without weak symbols.
4138
4139 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4140
4141 * decl.c (maybe_commonize_var): Fix thinko in last patch.
4142
4143 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4144
4145 PR c++/10506
4146 * method.c (use_thunk): Decrement immediate_size_expand.
4147
4148 PR c++/10503
4149 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4150 (DECL_MAYBE_TEMPLATE): Remove.
4151 * class.c (fixed_type_or_null): Avoid infinite recursion.
4152
4153 * decl.c (maybe_commonize_var): Make the code match the comments.
4154 * pt.c (instantiate_decl): Move call to import_export_decl.
4155
4156 2003-04-26 Mark Mitchell <mark@codesourcery.com>
4157
4158 * decl2.c (finish_file): Fix merge botch.
4159
4160 2003-04-25 Mark Mitchell <mark@codesourcery.com>
4161
4162 * decl2.c (finish_file): Don't call import_export_decl for
4163 functions that are not defined.
4164 (handle_class_head): Robustify.
4165 * pt.c (instantiate_decl): Do not call cp_finish_decl for
4166 variables that are not defined.
4167
4168 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
4169
4170 * call.c (print_z_candidates): Fix off by one error.
4171
4172 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
4173
4174 PR c++/10337
4175 * call.c (joust): Don't warn about conversion ops that are exact
4176 or cv-conversions. Rearrange to avoid multiple type comparisons.
4177
4178 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4179
4180 PR c++/10471
4181 * call.c (build_cxx_call): Robustify.
4182
4183 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
4184
4185 * Make-lang.in (lex.o): Remove mbchar.h.
4186 * lex.c (MULTIBYTE_CHARS): Lose.
4187 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4188 in c-lex.c.
4189
4190 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4191
4192 PR c++/9847
4193 * cp-tree.h (duplicate_tag_error): Remove.
4194 * class.c (duplicate_tag_error): Remove.
4195 * semantics.c (begin_class_definition): Return immediately for a
4196 duplicate class definition.
4197
4198 PR c++/10451
4199 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4200
4201 2003-04-22 Mark Mitchell <mark@codesourcery.com>
4202
4203 PR c++/10446
4204 * search.c (lookup_fnfields_1): Handle empty slots in the method
4205 vector.
4206
4207 PR c++/10428
4208 * decl.c (check_elaborated_type_specifier): New function, split
4209 out from ...
4210 (xref_tag): ... here. Use the new function in more places.
4211
4212 * rtti.c (throw_bad_typeid): Use build_cxx_call.
4213
4214 2003-04-21 Mark Mitchell <mark@codesourcery.com>
4215
4216 * call.c (build_over_call): Use build_cxx_call.
4217 (build_cxx_call): New method, split out of build_over_call.
4218 * cp-tree.h (language_function): Add can_throw.
4219 (build_cxx_call): Declare it.
4220 * decl.c (finish_function): If a function does not contain any
4221 calls to functions that can throw an exception, indicate that
4222 fact.
4223 * decl2.c (mark_used): Do not defer the instantiation of
4224 functions, if the current function does not throw.
4225 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4226 * pt.c (instantiate_decl): Make sure import_export_decl is called
4227 before emitting things.
4228 * rtti.c (throw_bad_cast): Use build_cxx_call.
4229 (build_dynamic_cast_1): Likewise.
4230 * typeck.c (build_function_call): Likewise.
4231
4232 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
4233
4234 PR c++/9881
4235 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4236 expressions. Reverts my 2002-08-08 patch.
4237
4238 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4239 cheaper early exit.
4240
4241 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4242
4243 * cp/decl2.c (start_static_storage_duration_function): Take count
4244 arg, don't check if it wraps round.
4245 (generate_ctor_or_dtor_function): Add locus arg, use it.
4246 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4247 locus.
4248 (finish_file): Set line numbers to past EOF for synthesized
4249 functions.
4250
4251 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4252
4253 PR c++/10405
4254 * search.c (lookup_field_1): Final scan goes backwards for
4255 types, forwards for non-types.
4256
4257 2003-04-17 Roger Sayle <roger@eyesopen.com>
4258
4259 PR c/10375
4260 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4261 "nothrow" function attributes.
4262
4263 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4264
4265 PR c++/10347
4266 * pt.c (type_dependent_expression_p): Handle array new.
4267
4268 2003-04-15 Mark Mitchell <mark@codesourcery.com>
4269
4270 PR c++/10381
4271 * parser.c (cp_parser_primary_expression): Reorganize logic for
4272 dealing with name lookup failures.
4273
4274 2003-04-15 Jason Merrill <jason@redhat.com>
4275
4276 * decl2.c (mark_used): Don't instantiate anything if
4277 skip_evaluation.
4278
4279 2003-04-14 Ziemowit Laski <zlaski@apple.com>
4280
4281 * tree.c (build_cplus_array_type_1): Do not call
4282 uses_template_parms() on a NULL index_type.
4283
4284 2003-04-13 Roger Sayle <roger@eyesopen.com>
4285
4286 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4287
4288 2003-04-12 Mark Mitchell <mark@codesourcery.com>
4289
4290 PR c++/10300
4291 * init.c (build_new_1): Reorganize.
4292
4293 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4294
4295 * class.c (initialize_array)
4296 * decl.c (reshape_init)
4297 * decl2.c (build_expr_from_tree)
4298 * init.c (build_zero_init)
4299 * pt.c (tsubst_copy, tsubst_copy_and_build)
4300 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4301 (ptm_initializer, class_initializer, get_pseudo_ti_init)
4302 * semantics.c (finish_compound_literal)
4303 * typeck.c (build_ptrmemfunc1)
4304 * typeck2.c (store_init_value, process_init_constructor)
4305 (build_functional_cast): Use build_constructor.
4306
4307 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4308
4309 * call.c (print_z_candidates): Use gcc_gettext_width, not
4310 strlen, to determine how much padding to use.
4311
4312 2003-04-10 Zack Weinberg <zack@codesourcery.com>
4313
4314 * decl.c: Update all calls to shadow_warning.
4315
4316 2003-04-10 Mark Mitchell <mark@codesourcery.com>
4317
4318 * class.c (layout_class_type): Correct handling for overlong
4319 bit-fields whose width is the same as an integer type.
4320
4321 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4322
4323 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4324 * cp-lang.c (cp_tree_size): New function.
4325 (LANG_HOOKS_TREE_SIZE): Override.
4326
4327 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4328 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4329 (union lang_tree_node): Remove common and srcloc members.
4330 (build_srcloc_here): Don't prototype.
4331 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4332 * pt.c (pending_templates): Correct comment.
4333 * tree.c (build_srcloc, build_srcloc_here): Kill.
4334
4335 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4336
4337 * call.c: Include intl.h.
4338 (print_z_candidate): Always use inform; get rid of errfn
4339 argument. Reorganize so that all the strings get picked up
4340 by xgettext. Note obligation of caller to pass first argument
4341 through gettext.
4342 (print_z_candidates): Update to match. Indent second and
4343 successive candidates by strlen() of translated message.
4344 (joust): Restructure ambiguous-conversion pedwarn so that
4345 translators see a complete sentence. Update calls to
4346 print_z_candidate.
4347
4348 * Make-lang.in (cp/call.o): Update dependencies.
4349
4350 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4351
4352 * decl.c (set_current_binding_level): Delete, revert last change.
4353 (current_binding_level): Modify to allow it as as lvalue.
4354
4355 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4356
4357 * name-lookup.c (find_binding): Pass appropriate pointer type to
4358 POP_TIMEVAR_AND_RETURN.
4359
4360 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4361
4362 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4363 * cp-tree.h: Don't insist on having GNUC.
4364
4365 2003-04-03 Jason Merrill <jason@redhat.com>
4366
4367 * cvt.c (ocp_convert): Only abort if we try to convert an object
4368 of TREE_ADDRESSABLE type.
4369
4370 * class.c (build_vtable): Set DECL_ALIGN here.
4371 (get_vtable_decl): Not here.
4372 (layout_vtable_decl): Or here.
4373 (create_vtable_ptr): Or here.
4374 (layout_class_type): Or here.
4375 (check_bitfield_decl): Don't mess with field alignment.
4376
4377 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4378
4379 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4380 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4381 * rtti.c (dfs_class_hint_mark): Likewise.
4382
4383 * decl.c (push_local_name, push_class_level_binding,
4384 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4385 functions returning void.
4386 * decl2.c (add_using_namespace): Likewise.
4387
4388 * decl.c (print_binding_level, print_other_binding_stack,
4389 print_binding_stack): Cast argument of %p specifier to void*.
4390 * ptree.c (cxx_print_decl): Likewise.
4391
4392 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4393 VAR_FUNCTION_OR_PARM_DECL_CHECK,
4394 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4395 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4396 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4397
4398 * decl.c (set_current_binding_level): New macro. Use throughout
4399 when setting the current binding level.
4400
4401 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4402 in enum.
4403 * method.c (mangling_flags): Likewise.
4404
4405 * cp-tree.h (lang_type_header): Add __extension__ and use
4406 CHAR_BITFIELD for members.
4407
4408 2003-04-02 Geoffrey Keating <geoffk@apple.com>
4409
4410 PR other/9274
4411 * mangle.c: Include gt-cp-mangle.h.
4412 (subst_identifiers): Mark with GTY.
4413 * config-lang.in (gtfiles): Add cp/mangle.c.
4414 * Make-lang.in: (gt-cp-mangle.h): New rule.
4415 (cp/mangle.o): Depends on gt-cp-mangle.h.
4416
4417 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
4418
4419 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4420 after \$(srcdir)/cp/name-lookup.h.
4421 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4422 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
4423 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4424 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4425
4426 2003-03-31 Jason Merrill <jason@redhat.com>
4427
4428 PR java/10145
4429 * class.c (check_field_decl): Don't set DECL_ALIGN.
4430
4431 2003-03-30 Mark Mitchell <mark@codesourcery.com>
4432
4433 PR c++/7647
4434 * decl.c (grokdeclarator): Tidy, slightly.
4435 * search.c (lookup_field_1): Add want_type parameter.
4436 (lookup_field_r): Adjust call to lookup_field_1.
4437
4438 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4439
4440 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4441
4442 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4443
4444 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
4445 prototype.
4446 (cxx_scope_find_binding_for_name): Likewise.
4447 * decl.c (find_binding: Move to name-lookup.c.
4448 (binding_for_name): Likewise.
4449 (cxx_scope_find_binding_for_name): Likewise.
4450 (BINDING_LEVEL): Remove.
4451 (push_binding): Tidy.
4452 (push_class_binding): Likewise.
4453 (pop_binding): Likewise.
4454 (poplevel): Likewise.
4455 (poplevel_class): Likewise.
4456 (set_identifier_type_value_with_scope): Likewise.
4457 (push_overloaded_decl): Likewise.
4458 (lookup_tag): Likewise.
4459 (unqualified_namespace_lookup): Likewise.
4460 (lookup_name_current_level): Likewise.
4461 (maybe_inject_for_scope_var): Likewise.
4462 (namespace_binding): Move to name-lookup.c.
4463 (set_namespace_binding): Likewise.
4464 * decl2.c (lookup_using_namespace): Tidy.
4465 (qualified_lookup_using_namespace): Likewise.
4466 (do_toplevel_using_decl): Likewise.
4467 * name-lookup.c: Include "timevar.h"
4468 * name-lookup.h (cxx_scope): Declare.
4469 (struct cxx_binding): Lose member "has_level". Adjust "scope"
4470 member declaration.
4471 (BINDING_SCOPE): Adjust definition.
4472 (BINDING_HAS_LEVEL_P): Remove.
4473
4474 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4475
4476 * name-lookup.c: New file.
4477 * name-lookup.h: Likewise..
4478 * decl.c (push_binding): Adjust use cxx_binding_make.
4479 (free_bindings): Move to name-lookup.c
4480 (pop_binding): Use cxx_binding_free.
4481 (binding_for_name): Tidy.
4482 * cp-tree.h: Include "name-lookup.h"
4483 (cxx_binding_make): Move to name-lookup.h
4484 (cxx_binding_clear): Likewise.
4485 (struct cxx_binding): Likewise.
4486 (LOCAL_BINDING_P): Likewise.
4487 (INHERITED_VALUE_BINDING_P): Likewise.
4488 (BINDING_SCOPE): Likewise.
4489 (BINDING_HAS_LEVEL_P): Likewise.
4490 (BINDING_VALUE): Likewise.
4491 (BINDING_TYPE): Likewise.
4492 * config-lang.in (gtfiles): Add cp/name-lookup.h
4493 * Make-lang.in (cp/name-lookup.o): New rule.
4494 (CXX_OBJS): Add cp/name-lookup.o
4495 (CXX_TREE_H): Add cp/name-lookup.h
4496
4497 2003-03-28 Jason Merrill <jason@redhat.com>
4498
4499 PR c++/10245
4500 * cvt.c (force_rvalue): New fn.
4501 * call.c (build_conditional_expr): Use it.
4502 * cp-tree.h: Declare it.
4503
4504 2003-03-28 Mike Stump <mrs@apple.com>
4505
4506 * error.c (dump_expr): Add 0x to printed hex numbers to make
4507 output match source code better.
4508
4509 2003-03-28 Mark Mitchell <mark@codesourcery.com>
4510
4511 PR c++/10218
4512 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4513 definitions.
4514
4515 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4516 non-existant ssdf_decls array.
4517 (finish_file): Call generator_ctor_or_dtor_function when there are
4518 static constructors or destructors and no other static
4519 initializations.
4520
4521 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
4522
4523 PR c++/10047
4524 * decl2.c (finish_file): Don't warn about explicitly instantiated
4525 inline decls.
4526
4527 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4528
4529 PR c++/10224
4530 * pt.c (lookup_template_class): Only check instantiated args if
4531 they do not contain template parameters.
4532
4533 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4534
4535 PR c++/10158
4536 * parser.c (cp_parser_function_definition): Set
4537 DECL_INITIALIZED_IN_CLASS for members.
4538 * pt.c (instantiate_decl): Only reduce the template args for
4539 friends that are not defined in class.
4540
4541 2003-03-25 Jason Merrill <jason@redhat.com>
4542
4543 * call.c (print_z_candidate): Change name of first arg to msgid.
4544 (joust): Add comment for translators.
4545
4546 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4547
4548 PR c++/9898, PR c++/383, DR 322
4549 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4550 through reference types on both PARM and ARG.
4551
4552 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4553
4554 PR c++/10119
4555 * error.c (dump_expr) <BASELINK>: Use dump_expr.
4556 * pt.c (maybe_fold_nontype_args): New function.
4557 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4558 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4559 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4560 maybe_fold_nontype_args.
4561
4562 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4563
4564 PR c++/10026
4565 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4566
4567 2003-03-23 Mark Mitchell <mark@codesourcery.com>
4568
4569 PR c++/7086
4570 * typeck.c (cxx_mark_addressable): Adjust call to
4571 gen_mem_addressof or put_var_into_stack.
4572
4573 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
4574
4575 PR c++/9978, c++/9708
4576 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4577 * call.c (add_template_candidate_real): Adjust
4578 instantiate_template call.
4579 * class.c (resolve_address_of_overloaded_function): Likewise.
4580 * decl.c (build_enumerator): Set TREE_CONSTANT.
4581 * pt.c (check_instantiated_args): New.
4582 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4583 TREE_READONLY.
4584 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4585 (reduce_template_parm_level): Likewise.
4586 (process_template_parm): Likewise.
4587 (check_explicit_specialization): Adjust instantiate_template call.
4588 (convert_template_argument): Don't check non-type argument here.
4589 (lookup_template_class): Check them here.
4590 (tsubst_friend_function): Adjust instantiate_template call.
4591 (instantiate_template): Add tsubst_flags parameter, use it. Check
4592 instantiated args.
4593
4594 2003-03-21 Zack Weinberg <zack@codesourcery.com>
4595
4596 * decl.c: Update calls to shadow_warning.
4597
4598 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
4599
4600 PR c++/9898
4601 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4602 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4603
4604 2003-03-20 Mark Mitchell <mark@codesourcery.com>
4605
4606 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4607 friends.
4608 * cp/pt.c (instantiate_class_template): Fix formatting.
4609
4610 2003-03-14 Matt Austern <austern@apple.com>
4611
4612 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4613 (unemitted_tinfo_decl_p): Remove.
4614 (emit_tinfo_decl): Change declaration to remove unused parameter.
4615 * decl2.c (finish_file): Change tinfo emission to loop through
4616 unemitted_tinfo_decls array instead of looping through all decls.
4617 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4618 unused second parameter.
4619 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4620 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4621 (emit_tinfo_decl): remove unused second parameter, add assertion
4622 that decl hasn't already been emitted.
4623
4624 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
4625
4626 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4627 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4628 return statements.
4629
4630 2003-03-19 Jason Merrill <jason@redhat.com>
4631
4632 PR c++/8316, c++/9315, c++/10136
4633 * call.c (print_z_candidate): Split out from...
4634 (print_z_candidiates): ...here.
4635 (joust): Use it.
4636
4637 2003-03-17 Roger Sayle <roger@eyesopen.com>
4638
4639 PR c++/10031
4640 * decl.c (duplicate_decls): Use the new type when prototyping
4641 anticipated decls, even when the types match. This defines the
4642 exception list for the built-in function.
4643
4644 2003-03-17 Jason Merrill <jason@redhat.com>
4645
4646 PR c++/10091
4647 * typeck.c (build_class_member_access_expr): Compare
4648 TYPE_MAIN_VARIANTs.
4649
4650 2003-03-17 Mark Mitchell <mark@codesourcery.com>
4651
4652 PR c++/9639
4653 * parser.c (cp_parser_declarator_id): Clear parser->scope.
4654
4655 2003-03-16 Jason Merrill <jason@redhat.com>
4656
4657 PR c++/9993
4658 * decl.c (finish_function): Only allow the NRVO to use variables
4659 declared at function scope.
4660
4661 2003-03-17 Andreas Jaeger <aj@suse.de>
4662
4663 * Make-lang.in (cp/TAGS): Remove.
4664
4665 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
4666
4667 PR c++/9629
4668 * cp-tree.h (struct language_function): Add in_base_initializer.
4669 (in_base_initializer): define it.
4670 (expand_member_init): Remove INIT param.
4671 * init.c (expand_member_init): Remove INIT param, return the member.
4672 (emit_mem_initializers): Set in_base_initializer.
4673 * class.c (build_base_path): Check in_base_initializer.
4674 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4675 * pt.c (tsubst_initializer_list): Likewise.
4676
4677 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
4678
4679 * decl.c (binding_for_name): Fix initialization thinko.
4680
4681 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4682
4683 Compile-time improvement: 2/n.
4684 * cp-tree.h (struct cxx_binding): New datatype;
4685 (struct lang_identifier): Use it.
4686 (LOCAL_BINDING_P): Adjust definition.
4687 (INHERITED_VALUE_BINDING_P): Likewise.
4688 (BINDING_SCOPE): Likewise.
4689 (BINDING_HAS_LEVEL_P): Likewise.
4690 (BINDING_VALUE): Likewise.
4691 (BINDING_TYPE): Likewise.
4692 (IDENTIFIER_VALUE): Likewise.
4693 (struct tree_binding): Remove.
4694 (TS_CP_BINDING): Likewise.
4695 ((union lang_tree_node): Remove field "binding".
4696 (cxx_binding_clear): New macro.
4697 (binding_for_name): Adjust return type.
4698 (qualified_lookup_using_namespace): Adjust prototype.
4699 (lookup_using_namespace): Adjust prototype.
4700 (cxx_scope_find_binding_for_name): Declare.
4701 * cp-tree.def: Remove CPLUS_BINDING definition.
4702 * decl.c (push_binding): Adjust local variable type.
4703 (add_binding): Likewise.
4704 (push_class_binding): Likewise.
4705 (pop_binding): Likewise.
4706 (poplevel): Likewise.
4707 (poplevel_class): Likewise.
4708 (free_bindings): Adjust type.
4709 (find_binding): Adjust return type, add a third parameter. Remove
4710 non-useful assertion now that we use static typing.
4711 (cxx_scope_find_binding_for_name): New function.
4712 (binding_for_name): Use it. Adjust local variable type. Simplify.
4713 (namespace_binding): Simplify.
4714 (set_namespace_binding): Likewise.
4715 (set_identifier_type_value_with_scope): Adjust local variable type.
4716 (lookup_tag): Don't type-abuse of local variable 'old'.
4717 (lookup_namespace_name): Likewise. Allocate binding on stack.
4718 (select_decl): Adjust prototype.
4719 (unqualified_namespace_lookup): Allocate binding on stack.
4720 Don't type-abuse of local variable 'val'.
4721 (lookup_name_real): Likewise.
4722 (maybe_inject_for_scope_var): Adjust local variable type.
4723 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4724 (namespace_binding): Adjust logic, simplify.
4725 (BINDING_LEVEL): Adjust definition.
4726 (push_class_level_binding): Adjust local variable type.
4727 (struct cxx_saved_binding): Adjust field 'binding' type.
4728 * decl2.c (ambiguous_decl): Adjust prototype.
4729 (lookup_using_namespace): Adjust local variable type.
4730 (qualified_lookup_using_namespace): Catch type error and correct
4731 ensueing logic error.
4732 (do_nonmember_using_decl): Adjust local variable type. Allocate
4733 temporary cxx_binding on stack.
4734 (do_toplevel_using_decl): Adjust local variable type.
4735 * ptree.c (cxx_print_cxx_binding): New function.
4736 (cxx_print_identifier): Use it.
4737 (cxx_print_xnode): Delete CPLUS_BINDING case label.
4738
4739 2003-03-15 Roger Sayle <roger@eyesopen.com>
4740
4741 * tree.c (count_functions): Fix whitespace.
4742
4743 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
4744
4745 * Make-lang.in: Update.
4746
4747 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4748
4749 PR c++/6440
4750 * pt.c (maybe_process_partial_specialization): Handle
4751 member class template when enclosing class template is
4752 explicit specialized.
4753 (most_general_template): Stop looking when DECL is already
4754 specialized.
4755
4756 2003-03-13 Jason Merrill <jason@redhat.com>
4757
4758 PR c++/9420
4759 * search.c (lookup_conversions): Call complete_type here.
4760 * call.c (implicit_conversion): Not here.
4761
4762 2003-03-13 Mark Mitchell <mark@codesourcery.com>
4763
4764 * decl2.c (do_nonmember_using_decl): Correct handling of
4765 simultaneous type/non-type bindings.
4766
4767 * call.c (initialize_reference): Remove bogus assertion.
4768 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4769
4770 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
4771
4772 PR c++/7050
4773 * expr.c (cxx_expand_expr): Return const0_rtx for throw
4774 expressions.
4775
4776 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4777
4778 PR c++/9474
4779 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4780 to merge old and new declarations.
4781
4782 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4783
4784 * g++.1: Remove.
4785 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4786 (cp/g++.1): Build it from scratch in the build tree.
4787 (c++.install-man): Depend on it. Install it from the build tree.
4788 (c++.mostlyclean): Clean it.
4789
4790 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4791
4792 PR c++/9474
4793 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4794 to merge old and new declarations.
4795
4796 PR c++/9924
4797 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4798
4799 2003-03-11 Jason Merrill <jason@redhat.com>
4800
4801 PR c++/9820
4802 * search.c (lookup_member): Fix handling of functions in a class
4803 being defined.
4804
4805 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4806
4807 PR c++/8700
4808 * call.c (convert_class_to_reference): Adjust usage of
4809 splice_viable.
4810 (any_viable): Remove.
4811 (splice_viable): Combine with any_viable.
4812 (print_z_candidates): Avoid printing duplicates.
4813 (build_user_type_conversion_1): Adjust usage of splice_viable.
4814 (build_new_function_call): Likewise.
4815 (build_operator_new_call): Likewise.
4816 (build_object_call): Likewise.
4817 (build_conditional_expr): Likewise.
4818 (build_new_op): Likewise.
4819 (build_new_method_call): Likewise.
4820 (joust): Remove spurious comment.
4821 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4822 * decl2.c (arg_assoc_class): Simplify.
4823 * friend.c (add_friend): Likewise.
4824
4825 2003-03-11 Jason Merrill <jason@redhat.com>
4826
4827 PR c++/8660
4828 * decl2.c (check_classfn): A member template only matches a
4829 member template.
4830
4831 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
4832
4833 * Make-lang.in (CXX_C_OBJS): Update.
4834 * lang-specs.h: Don't define __GNUG__ here.
4835
4836 2003-03-10 Mark Mitchell <mark@codesourcery.com>
4837
4838 * call.c (perform_overload_resolution): New function.
4839 (build_new_function_call): Use it.
4840 (build_operator_new_call): Likewise.
4841 (add_candidates): Add explicit_targs and template_only parameters.
4842 (build_new_op): Adjust accordingly.
4843 * cp-tree.h (build_operator_new_call): New function.
4844 (build_function_call_real): Remove.
4845 (build_function_call_maybe): Likewise.
4846 * init.c (build_new_1): Use build_operator_new_call.
4847 * typeck.c (build_function_call_real): Rename to ...
4848 (build_function_call): ... this.
4849
4850 2003-03-10 Devang Patel <dpatel@apple.com>
4851
4852 PR c++/9394
4853 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4854
4855 2003-03-10 Jason Merrill <jason@redhat.com>
4856
4857 PR c++/9798
4858 * decl.c (push_using_directive): Push before recursing.
4859
4860 PR c++/9868, c++/9524
4861 * call.c (resolve_scoped_fn_name): Handle the case of a function
4862 pointer member.
4863
4864 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4865 argument in the pointer-to-member case.
4866
4867 2003-03-09 Mark Mitchell <mark@codesourcery.com>
4868
4869 PR c++/9373
4870 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4871 pointers to member functions.
4872
4873 PR c++/8534
4874 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4875 in pointer-to-member-function types.
4876
4877 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4878
4879 * expr.c (cplus_expand_constant): Use C90 prototype style.
4880 (cxx_expand_expr): Likewise.
4881
4882 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4883
4884 PR c++/9970
4885 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4886 functions.
4887
4888 2003-03-08 Geoffrey Keating <geoffk@apple.com>
4889
4890 * lang-specs.h (c++-header): Change .pch to .gch.
4891
4892 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
4893
4894 * cp-tree.h (cxx_init): Update prototype.
4895 * lex.c (cxx_init): Similarly.
4896
4897 2003-03-08 Mark Mitchell <mark@codesourcery.com>
4898
4899 PR c++/9823
4900 * cp-tree.h (begin_mem_initializers): Remove.
4901 * parser.c (cp_parser_mem_initializer_list): Inline it here.
4902 Do not call finish_mem_initializers if not in a constructor.
4903 (cp_parser_class_head): Fix typo in error message.
4904 * semantics.c (begin_mem_initializers): Remove.
4905 * testsuite/g++.dg/parser/constructor1.C: New test.
4906
4907 PR c++/9809
4908 * call.c (add_function_candidate): Skip builtin fuctions that have
4909 not yet been declared.
4910
4911 PR c++/9982
4912 * init.c (build_new_1): Correct logic for determining whether or
4913 not to use an array cookie.
4914
4915 PR c++/9524
4916 * parser.c (cp_parser_postfix_expression): Call
4917 finish_non_static_data_member, even when processing_template_decl.
4918
4919 PR c++/9912
4920 * cp-tree.h (is_ancestor): New function.
4921 (handle_class_head): Change prototype.
4922 * decl2.c (is_namespace_ancestor): Rename to ...
4923 (namespace_anecestor): ... this.
4924 (set_decl_namespace): Adjust accordingly.
4925 (handle_class_head): Remove unnecessary parameters.
4926 * parser.c (cp_parser_class_head): Check that
4927 nested-name-specifiers are used appropriately.
4928
4929 2003-03-07 Mark Mitchell <mark@codesourcery.com>
4930
4931 * call.c (reference_binding): Remove REF_IS_VAR parameter.
4932 (implicit_conversion): Adjust call to reference_binding.
4933 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4934 (initialize_reference): Adjust handling for references bound to
4935 rvalues.
4936 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4937 prototype.
4938 (real_non_cast_lvalue_p): New method.
4939 * cvt.c (build_up_reference): Adjust use of
4940 make_temporary_var_for_ref_to_temp.
4941 * tree.c (real_non_cast_lvalue_p): New method.
4942
4943 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4944
4945 * except.c (init_exception_processing): Use C90 prototype style.
4946 (cp_protect_cleanup_actions): Likewise.
4947 (prepare_eh_type): Likewise.
4948 (build_eh_type_type): Likewise.
4949 (build_exc_ptr): Likewise.
4950 (do_begin_catch): Likewise.
4951 (dtor_nothrow): Likewise.
4952 (do_end_catch): Likewise.
4953 (push_eh_cleanup): Likewise.
4954 (decl_is_java_type): Likewise.
4955 (choose_personality_routine): Likewise.
4956 (initialize_handler_parm): Likewise.
4957 (expand_start_catch_block): Likewise.
4958 (expand_end_catch_block): Likewise.
4959 (begin_eh_spec_block): Likewise.
4960 (finish_eh_spec_block): Likewise.
4961 (do_allocate_exception): Likewise.
4962 (do_free_exception): Likewise.
4963 (wrap_cleanups_r): Likewise.
4964 (stabilize_throw_expr): Likewise.
4965 (build_throw): Likewise.
4966 (complete_ptr_ref_or_void_ptr_p): Likewise.
4967 (is_admissible_throw_operand): Likewise.
4968 (nothrow_libfn_p): Likewise.
4969 (can_convert_eh): Likewise.
4970 (check_handlers_1): Likewise.
4971 (check_handlers): Likewise.
4972
4973 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4974
4975 * call.c (merge_conversion_sequences): New function.
4976 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4977 (convert_class_to_reference): Correct handling of second
4978 standard conversion sequence in a user-defined conversion
4979 sequence.
4980 (build_user_type_conversion_1): Use merge_conversion_sequences.
4981 * cp-tree.def: Add comments for CONV nodes.
4982 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4983
4984 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4985
4986 * error.c (init_error): Use C90 prototype style.
4987 (dump_scope): Likewise.
4988 (dump_qualifiers): Likewise.
4989 (dump_template_argument): Likewise.
4990 (dump_template_argument_list): Likewise.
4991 (dump_template_parameter): Likewise.
4992 (dump_template_bindings): Likewise.
4993 (dump_type): Likewise.
4994 (dump_typename): Likewise.
4995 (class_key_or_enum): Likewise.
4996 (dump_aggr_type): Likewise.
4997 (dump_type_prefix): Likewise.
4998 (dump_type_suffix): Likewise.
4999 (dump_global_iord): Likewise.
5000 (dump_simple_decl): Likewise.
5001 (dump_decl): Likewise.
5002 (dump_template_decl): Likewise.
5003 (dump_function_decl): Likewise.
5004 (dump_parameters): Likewise.
5005 (dump_exception_spec): Likewise.
5006 (dump_function_name): Likewise.
5007 (dump_template_parms): Likewise.
5008 (dump_char): Likewise.
5009 (dump_expr_list): Likewise.
5010 (dump_expr): Likewise.
5011 (dump_binary_op): Likewise.
5012 (dump_unary_op): Likewise.
5013 (type_as_string): Likewise.
5014 (expr_as_string): Likewise.
5015 (decl_as_string): Likewise.
5016 (context_as_string): Likewise.
5017 (lang_decl_name): Likewise.
5018 (cp_file_of): Likewise.
5019 (cp_line_of): Likewise.
5020 (decl_to_string): Likewise.
5021 (expr_to_string): Likewise.
5022 (fndecl_to_string): Likewise.
5023 (code_to_string): Likewise.
5024 (language_to_string): Likewise.
5025 (parm_to_string): Likewise.
5026 (op_to_string): Likewise.
5027 (type_to_string): Likewise.
5028 (assop_to_string): Likewise.
5029 (args_to_string): Likewise.
5030 (cv_to_string): Likewise.
5031 (cxx_print_error_function): Likewise.
5032 (cp_diagnostic_starter): Likewise.
5033 (cp_diagnostic_finalizer): Likewise.
5034 (cp_print_error_function): Likewise.
5035 (function_category): Likewise.
5036 (print_instantiation_full_context): Likewise.
5037 (print_instantiation_partial_context): Likewise.
5038 (maybe_print_instantiation_context): Likewise.
5039 (print_instantiation_context): Likewise.
5040 (cp_printer): Likewise.
5041 (print_integer): Likewise.
5042 (print_non_consecutive_character): Likewise.
5043 (locate_error): Likewise.
5044
5045 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5046
5047 PR c++/9965
5048 * call.c (reference_binding): Add ref_is_var parameter.
5049 (implicit_conversion): Adjust call to reference_binding.
5050 (initialize_reference): Likewise.
5051
5052 PR c++/9400
5053 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5054 PARM_DECLs.
5055
5056 PR c++/9791
5057 * class.c (get_basefndecls): Use lookup_fnfields_1.
5058
5059 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5060
5061 PR c++/9188
5062 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5063 in error message.
5064 (cp_parser_single_declaration): Likewise.
5065
5066 2003-03-05 Jason Merrill <jason@redhat.com>
5067
5068 PR c++/9440
5069 * call.c (build_conditional_expr): Use convert rather than an
5070 explicit NOP_EXPR.
5071
5072 2003-03-02 Matt Austern <austern@apple.com>
5073
5074 * decl.c (cp_binding_level): Add static_decls varray member.
5075 (add_decl_to_level): Add static/inline namespace scope
5076 declarations to static_decls array.
5077 (wrapup_global_for_namespace): Pass static_decls only, instead of
5078 all decls, to wrapup_global_declarations/check_global_declarations.
5079 (push_namespace): Initialize static_decls for ordinary namespaces.
5080 (cxx_init_decl_processing): Initialize static_decls for global
5081 namespace.
5082
5083 2003-03-05 Mark Mitchell <mark@codesourcery.com>
5084
5085 * class.c (end_of_class): Correct thinko.
5086
5087 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
5088
5089 * config-lang.in: Replace ${libstdcxx_version} by its value.
5090
5091 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5092
5093 * cp-tree.h (cxx_saved_binding): Declare.
5094 (struct saved_scope): Adjust type of field 'old_binding'.
5095 * decl.c (cxx_saved_binding_make): New macro.
5096 (struct cxx_saved_binding): Define.
5097 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
5098 C++ bindings.
5099 (maybe_push_to_top_level): Adjust local variable type.
5100 (pop_from_top_level): Likewise.
5101
5102 2003-03-04 Tom Tromey <tromey@redhat.com>
5103
5104 * Make-lang.in (c++.tags): New target.
5105
5106 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
5107
5108 * Make-lang.in: Update.
5109
5110 2003-03-03 Jason Merrill <jason@redhat.com>
5111
5112 * decl.c (finish_enum): Do set the type in a template. Simplify.
5113 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5114
5115 2003-03-03 Mark Mitchell <mark@codesourcery.com>
5116
5117 PR c++/9878
5118 * call.c (convert_class_to_reference): Correct conversion
5119 sequences.
5120 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5121 (implicit_conversion): Adjust call to reference_binding.
5122 (add_candidate): Change type of candidates parameter.
5123 (add_function_candidate): Likewise.
5124 (add_conv_candidate): Likewise.
5125 (build_builtin_candidate): Likewise.
5126 (add_builtin_candidate): Likewise.
5127 (add_builtin_candidates): Likewise.
5128 (add_template_candidate_real): Likewise.
5129 (add_template_candidate): Likewise.
5130 (add_template_conv_candidate): Likewise.
5131 (build_user_type_conversion_1): Adjust accordingly.
5132 (build_object_call): Likewise.
5133 (build_conditional_expr): Likewise.
5134 (add_candidates): Likewise.
5135 (build_new_op): Likewise.
5136 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
5137 (build_new_method_call): Adjust calls to add_function_candidate.
5138 (make_temporary_var_for_ref_to_temp): New function.
5139 (initialize_reference): Add decl parameter.
5140 * class.c (build_rtti_vtbl_entries): Use build_address and
5141 build_nop.
5142 * cp-tree.h (initialize_reference): Change prototype.
5143 (make_temporary_var_for_ref_to_temp): New function.
5144 (build_type_conversion): Change prototype.
5145 (build_address): New function.
5146 (build_nop): Likewise.
5147 * cvt.c (cp_convert_to_pointer): Adjust call to
5148 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
5149 Use build_nop.
5150 (convert_to_pointer_force): Use build_nop.
5151 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5152 (convert_to_reference): Adjust call to build_type_conversion.
5153 (ocp_convert): Likewise.
5154 (build_type_conversion): Remove for_sure parameter.
5155 * decl.c (grok_reference_init): Use initialize_reference.
5156 * typeck.c (build_address): New function.
5157 (build_nop): Likewise.
5158 (build_unary_op): Use them.
5159 (build_ptrmemfunc): Tidy slightly.
5160 (convert_for_initialization): Adjust call to
5161 initialize_reference.
5162 * typeck2.c (store_init_value): Remove #if 0'd code.
5163
5164 2003-03-03 Jason Merrill <jason@redhat.com>
5165
5166 * decl.c (start_function): Clear DECL_NUM_STMTS.
5167
5168 * class.c (get_vtable_decl): Use vtbl_type_node.
5169 (build_primary_vtable): Check for it.
5170
5171 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
5172
5173 * decl.c (check_initializer): Check for vector_opaque_p.
5174
5175 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
5176
5177 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5178 invoke an external cpp during compilation.
5179
5180 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5181
5182 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5183 that of warning().
5184 (start_decl): Likewise.
5185 (start_function): Likewise.
5186
5187 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
5188
5189 * Make-lang.in (CXX_C_OBJS): Update.
5190
5191 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5192
5193 PR c++/9892
5194 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5195 instantiating it.
5196
5197 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
5198
5199 * parser.c (cp_parser_init_declarator): Revert opaque
5200 vector_opaque_p change.
5201 Do not include target.h.
5202
5203 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5204
5205 PR c++/9879
5206 * cp-tree.h (build_zero_init): Add parameter.
5207 * decl.c (cp_finish_decl): Adjust call.
5208 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
5209 calls.
5210 (build_default_init): Add nelts parameter. Adjust calls to
5211 build_zero_init.
5212 (build_new_1): Adjust call to build_default_init.
5213 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5214
5215 2003-02-26 Devang Patel <dpatel@apple.com>
5216
5217 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5218 required. Postpone enum setting for template decls.
5219 (build_enumerator): Delay copying value node until finish_enum
5220 (). Remove #if 0'ed code.
5221 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5222 (tsubst_copy): Add check for enum type.
5223
5224 2003-02-25 Mark Mitchell <mark@codesourcery.com>
5225
5226 PR c++/9683
5227 * decl2.c (prune_vars_needing_no_initialization): Do not throw
5228 away initializations for DECL_EXTERNAL VAR_DECLs.
5229 (finish_file): Adjust accordingly.
5230 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5231
5232 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5233
5234 * decl.c (add_binding): Time TV_NAME_LOOKUP.
5235 (push_class_binding): Likewise.
5236 (set_namespace_binding): Likewise.
5237
5238 2003-02-24 Mark Mitchell <mark@codesourcery.com>
5239
5240 PR c++/9836
5241 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5242 specializations back to the main template.
5243 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5244 * pt.c (resolve_typename_type): Likewise.
5245
5246 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
5247
5248 PR c++/9778
5249 * pt.c (tsubst_copy_and_build): For a templated function inside a
5250 scope, process template arguments.
5251
5252 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5253
5254 PR c++/9602
5255 * typeck2.c (abstract_virtuals_error): Don't check when
5256 TYPE is still template parameter dependent.
5257
5258 2003-02-23 Mark Mitchell <mark@codesourcery.com>
5259
5260 PR c++/5333
5261 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5262 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5263 * pt.c (instantiate_class_template): Don't try to instantiate
5264 dependent types.
5265 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5266
5267 2003-02-21 Mark Mitchell <mark@codesourcery.com>
5268
5269 PR c++/9749
5270 * decl.c (grokdeclarator): Do not allow parameters with variably
5271 modified types.
5272
5273 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
5274
5275 * search.c (grow_bfs_bases): Remove. Fold into ...
5276 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5277 in previous patch.
5278
5279 2003-02-20 Mark Mitchell <mark@codesourcery.com>
5280
5281 PR c++/9729
5282 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5283 when the G++ 3.2 ABI prevents correct compilation.
5284
5285 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
5286
5287 Change base class access representation. Share virtual base
5288 binfos.
5289 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5290 call.
5291 * cp/class.c (build_base_path): Likewise.
5292 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5293 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5294 (make_new_vtable): Adjust.
5295 (force_canonical_binfo_r): Delete.
5296 (force_canonical_binfo): Delete.
5297 (mark_primary_virtual_base): Delete.
5298 (dfs_unshared_virtual_bases): Delete.
5299 (mark_primary_bases): Adjust.
5300 (maybe_warn_about_overly_private_class): Adjust.
5301 (dfs_base_derived_from): Delete.
5302 (base_derived_from): Follow the inheritance chain.
5303 (struct find_final_overrider_data): Add vpath member.
5304 (dfs_find_final_overrider): Adjust.
5305 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5306 (find_final_overrider): Adjust.
5307 (update_vtable_entry_for_fn): Adjust.
5308 (modify_all_vtables): Adjust.
5309 (walk_subobject_offsets): Adjust.
5310 (layout_nonempty_base_or_field): Adjust.
5311 (layout_empty_base): Remove last parameter. Adjust.
5312 (build_base_field): Adjust.
5313 (build_base_fields): Adjust.
5314 (propagate_binfo_offsets): Remove last parameter. Adjust.
5315 (dfs_set_offset_for_unshared_vbases): Delete.
5316 (layout_virtual_bases): Adjust.
5317 (finish_struct_1): Adjust.
5318 (init_class_processing): Don't init access nodes.
5319 (dfs_get_primary_binfo): Delete.
5320 (get_primary_binfo): Adjust.
5321 (dump_class_hierarchy_r): Remove most derived arg, add IGO
5322 parameter. Adjust.
5323 (dump_class_hierarchy): Adjust.
5324 (finish_vtbls): Adjust.
5325 (get_original_base): Delete.
5326 (build_vtt_inits): Adjust.
5327 (dfs_build_secondary_vptr_vtt_inits): Adjust.
5328 (dfs_ctor_vtable_bases_queue_p): Adjust.
5329 (build_ctor_vtbl_group): Adjust.
5330 (dfs_accumulate_vtbl_inits): Adjust.
5331 (build_vtbl_initializer): Adjust.
5332 (build_vbase_offset_vtbl_entries): Adjust.
5333 (add_vcall_offset_vtbl_entries_1): Adjust.
5334 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5335 (access_*_node): Remove.
5336 (CANONICAL_BINFO): Delete.
5337 (BINFO_UNSHARED_MARKED): Remove.
5338 (BINFO_MARKED): Set LANG_FLAG_0 directly.
5339 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5340 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5341 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5342 Delete.
5343 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5344 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5345 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5346 Delete.
5347 (BINFO_DEPENDENT_BASE_P): New.
5348 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5349 index.
5350 (markedp, unmarkedp): Adjust.
5351 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5352 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5353 find_vbase_instance, binfo_for_vbase): Delete.
5354 (copied_binfo, original_binfo): Declare.
5355 (finish_base_specifier): Add virtual_p arg.
5356 (unshare_base_binfos): Delete.
5357 (copy_base_binfos): Declare.
5358 (reverse_path): Delete.
5359 * cp/decl.c (xref_basetypes): Access and virtuality passed
5360 differently. Don't copy direct base binfos here. Call
5361 copy_base_binfos.
5362 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5363 (initialize_vtbl_ptrs): Adjust.
5364 (expand_member_init): Adjust.
5365 * cp/parser.c (cp_parser_base_specifier): Adjust.
5366 * cp/pt.c (instantiate_class_template): Adjust.
5367 (get_template_base_recursive): Adjust.
5368 * cp/rtti.c (get_pseudo_ti_init): Adjust.
5369 (get_pseudo_ti_desc): Adjust.
5370 * cp/tree.c (unshare_base_binfos): Rename to ...
5371 (copy_base_binfos): ... here, reimplement.
5372 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5373 (reverse_path): Remove.
5374 * cp/typeck.c (get_delta_difference): Adjust error messages.
5375 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5376 * cp/search.c (lookup_base_r): Adjust.
5377 (dynamic_cast_base_recurse): Adjust.
5378 (canonical_binfo): Remove.
5379 (dfs_canonical_queue): Remove.
5380 (dfs_assert_unmarked_p): Remove.
5381 (assert_canonical_unmarked): Remove.
5382 (shared_marked_p, shared_unmarked_p): Remove.
5383 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5384 (dfs_access_in_type): Adjust.
5385 (access_in_type): Adjust.
5386 (dfs_accessible_queue_p): Adjust.
5387 (dfs_accessible_p): Adjust.
5388 (is_subobject_of_p_1, is_subobject_of_p): Remove.
5389 (struct lookup_field_info): Remove from_dep_base_p field.
5390 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5391 (lookup_field_r): Remove dependent base code.
5392 (lookup_member): Likewise.
5393 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5394 (dfs_unmarked_real_bases_queue_p): Remove.
5395 (dfs_marked_real_bases_queue_p): Remove.
5396 (dfs_skip_vbases): Remove.
5397 (dfs_get_pure_virtuals): Adjust.
5398 (markedp, unmarkedp): Adjust.
5399 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5400 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5401 (dfs_unmark): Adjust.
5402 (dfs_get_vbase_types):Remove.
5403 (dfs_build_inheritance_graph_order): Remove.
5404 (get_vbase_types): Remove
5405 (dfs_find_vbase_instance): Remove.
5406 (find_vbase_instance): Remove.
5407 (dfs_debug_unmarkedp): Adjust.
5408 (dependent_base_p): Remove.
5409 (dfs_push_type_decls): Adjust.
5410 (dfs_push_decls): Adjust.
5411 (dfs_no_overlap_yet): Adjust.
5412 (copied_binfo): New function.
5413 (original_binfo): New function.
5414 (binfo_for_vbase): Remove.
5415
5416 2003-02-18 Zack Weinberg <zack@codesourcery.com>
5417
5418 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5419 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5420 vectors, for speed.
5421
5422 2003-02-18 Mark Mitchell <mark@codesourcery.com>
5423
5424 PR c++/9704
5425 * class.c (layout_class_type): In the 3.2 ABI, take into account
5426 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5427
5428 2003-02-18 Matt Austern <austern@apple.com>
5429
5430 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5431 nothing for C++.
5432 * cp/decl.c (wrapup_globals_for_namespace): Remove special
5433 handling of global namespace.
5434
5435 2003-02-18 Geoffrey Keating <geoffk@apple.com>
5436
5437 * cp-tree.h (rid_to_yy): Delete.
5438 (C_RID_YYCODE): Delete.
5439 (finish_file): Delete redundant declaration.
5440
5441 2003-02-18 Jason Merrill <jason@redhat.com>
5442
5443 PR c++/9623
5444 * decl.c (reshape_init): Don't mess with initializer labels.
5445
5446 PR c++/9485
5447 * parser.c (cp_parser_postfix_expression): Set idk properly for
5448 object->scope::member.
5449
5450 2003-02-18 Ben Elliston <bje@redhat.com>
5451
5452 PR other/7350
5453 * decl.c (duplicate_decls): Fix typo in comment.
5454
5455 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
5456
5457 PR debug/9717
5458 * class.c (build_base_field): Mark fields for base classes with
5459 DECL_IGNORED_P.
5460
5461 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5462
5463 PR c++/9457
5464 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5465 CONSTRUCTOR_ELTS only once.
5466
5467 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5468
5469 PR c++/9459
5470 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5471 (dump_type_suffix): Likewise.
5472
5473 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
5474
5475 * search.c: ANSIfy function declarations and definitions.
5476 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5477 * call.c (build_method_call, resolve_scoped_fn_name,
5478 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5479 calls.
5480 * class.c (handle_using_decl): Likewise.
5481 * decl.c (make_typename_type, make_unmound_class_template,
5482 start_decl, compute_array_index_type): Likewise.
5483 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5484 * init.c (expand_member_init, build_member_call): Likewise.
5485 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5486 resolve_typename_type): Likewise.
5487 * typeck.c (lookup_destructor, finish_class_member_access_exprm
5488 build_prememfunc_access_expr): Likewise.
5489
5490 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5491
5492 * decl2.c: Include "timevar.h".
5493 (namespace_ancestor): Time name lookup.
5494 (add_using_namespace): Likewise.
5495 (lookup_using_namespace): Likewise.
5496 (qualified_lookup_using_namespace): Likewise.
5497 (decl_namespace): Likewise.
5498 (lookup_arg_dependent): Likewise.
5499 * lex.c (do_identifier): Likewise.
5500 (do_scoped_id): Likewise.
5501 * pt.c (lookup_template_class): Likewise.
5502
5503 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
5504
5505 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5506
5507 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5508
5509 * decl.c: Include "timevar.h".
5510 (poplevel): Time name lookup.
5511 (find_binding): Likewise.
5512 (push_namespace): Likewise.
5513 (pop_nested_namespace): Likewise.
5514 (store_bindings): Likewise.
5515 (maybe_push_to_top_level): Likewise.
5516 (pop_from_top_level): Likewise.
5517 (push_local_name): Likewise.
5518 (pushtag): Likewise.
5519 (pushdecl): Likewise.
5520 (pushdecl_with_scope): Likewise.
5521 (pushdecl_namespace_level): Likewise.
5522 (pushdecl_top_level): Likewise.
5523 (pushdecl_class_level): Likewise.
5524 (push_class_level_binding): Likewise.
5525 (push_using_decl): Likewise.
5526 (push_using_directive): Likewise.
5527 (push_overloaded_decl): Likewise.
5528 (lookup_label): Likewise.
5529 (define_label): Likewise.
5530 (lookup_tag): Likewise.
5531 (lookup_tag_reverse): Likewise.
5532 (lookup_namespace_name): Likewise.
5533 (select_decl): Likewise.
5534 (unqualified_namespace_lookup): Likewise.
5535 (lookup_name_real): Likewise.
5536 (lookup_name_current_level): Likewise.
5537 (lookup_type_current_level): Likewise.
5538 (maybe_inject_for_scope_var): Likewise.
5539 (xref_tag): Likewise.
5540
5541 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5542
5543 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
5544
5545 * decl.c (build_enumerator): Remove unneeded test.
5546
5547 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
5548
5549 * cp-tree.h (struct lang_type_header): Make all fields unsigned
5550 char.
5551
5552 2003-02-03 Mark Mitchell <mark@codesourcery.com>
5553
5554 PR c++/7129
5555 * call.c (z_candidate): Add args.
5556 (convert_class_to_reference): Set it.
5557 (implicit_conversion): Tidy.
5558 (add_candidate): Add args parameter.
5559 (add_function_candidate): Adjust call to add_candidate.
5560 (add_conv_candidate): Likewise.
5561 (build_builtin_candidate): Likewise.
5562 (build_user_type_conversion_1): Eliminate wasteful tree_cons
5563 usage.
5564 (build_new_function_call): Likewise.
5565 (build_object_call): Likewise.
5566 (add_candidates): New function.
5567 (build_new_op): Use it.
5568 (covert_like_real): Adjust call to build_over_call.
5569 (build_over_call): Remove args parameter.
5570 * operators.def: Add <?= and >?=.
5571
5572 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
5573
5574 * typeck.c (build_indirect_ref): Don't check flag_volatile.
5575
5576 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5577
5578 PR c++/8849
5579 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5580
5581 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
5582
5583 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5584 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5585 (BINFO_LANG_ELTS): New #define.
5586 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5587
5588 2003-01-30 Geoffrey Keating <geoffk@apple.com>
5589
5590 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5591
5592 2003-01-30 Mark Mitchell <mark@codesourcery.com>
5593
5594 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5595 for class types.
5596 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5597 rather than TYPE_LANG_FLAG_0.
5598 (TYPE_BUILT_IN): Remove.
5599 (TYPE_DEPENDENT_P): New macro.
5600 (TYPE_DEPENDENT_P_VALID): Likewise.
5601 (lang_type_class): Add fields_readonly.
5602 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5603 * pt.c (dependent_type_p_r): New function, split out from ...
5604 (dependent_type_p): ... here. Memoize results.
5605 * search.c (dependent_base_p): Use dependent_type_p, not
5606 uses_template_parms.
5607 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5608 for class types.
5609
5610 2003-01-29 Mark Mitchell <mark@codesourcery.com>
5611
5612 * call.c (build_field_call): Use build_new_op, not build_opfncall.
5613 (prep_operand): New function.
5614 (build_new_op): Use it. Remove dead code.
5615 * class.c (pushclass): Change "modify" parameter type from int to
5616 bool.
5617 (currently_open_class): Use same_type_p, not pointer equality.
5618 (push_nested_class): Adjust calls to pushclass, remove modify
5619 parameter.
5620 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5621 (pushclass): Change prototype.
5622 (push_nested_class): Likewise.
5623 (grokoptypename): Remove.
5624 (build_opfncall): Remove.
5625 (value_dependent_expression_p): Declare.
5626 (resolve_typename_type): Likewise.
5627 (resolve_typename_type_in_current_instantiation): Likewise.
5628 (enter_scope_of): Remove.
5629 (tsubst): Remove.
5630 (tsubst_expr): Likewise.
5631 (tsubst_copy): Likewise.
5632 (tsubst_copy_and_build): Likewise.
5633 * decl.c (warn_about_implicit_typename_lookup): Remove.
5634 (finish_case_label): Return error_mark_node for erroneous labels.
5635 (start_decl): Adjust calls to push_nested_class.
5636 (grokfndecl): Call push_scope/pop_scope around call to
5637 duplicate_decls.
5638 (grokdeclarator): Do not call tsubst.
5639 (start_function): Adjust calls to push_nested_class.
5640 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5641 (check_classfn): Use push_scope/pop_scope around type comparisions.
5642 (grokoptypename): Remove.
5643 (push_sscope): Adjust call to push_nested_class.
5644 * error.c (dump_type): Show cv-qualification of typename types.
5645 * init.c (build_member_call): Use build_new_op, not
5646 build_opfncall.
5647 * method.c (build_opfncall): Remove.
5648 * parser.c (cp_parser): Add allow_non_constant_expression_p and
5649 non_constant_expression_p.
5650 (cp_parser_constant_expression): Adjust prototype.
5651 (cp_parser_resolve_typename_type): Remove.
5652 (cp_parser_non_constant_expression): New function.
5653 (cp_parser_non_constant_id_expression): Likewise.
5654 (cp_parser_new): Set allow_non_constant_expression_p and
5655 non_constant_expression_p.
5656 (cp_parser_primary_expression): Reject `this' and `va_arg' in
5657 constant-expressions. Note that dependent names aren't really
5658 constant.
5659 (cp_parser_postfix_expression): Reject conversions to non-integral
5660 types in constant-expressions. Neither are increments or
5661 decrements.
5662 (cp_parser_unary_expression): Reject increments and decrements in
5663 constant-expressions.
5664 (cp_parser_direct_new_declarator): Adjust call to
5665 cp_parser_constant_expression.
5666 (cp_parser_cast_expression): Reject conversions to non-integral
5667 types in constant-expressions.
5668 (cp_parser_assignment_expression): Rejects assignments in
5669 constant-expressions.
5670 (cp_parser_expression): Reject commas in constant-expressions.
5671 (cp_parser_labeled_statement): Adjust call to
5672 cp_parser_constant_expression.
5673 (cp_parser_direct_declarator): Simplify array bounds, even in
5674 templates, when they are non-dependent. Use
5675 resolve_typename_type, not cp_parser_resolve_typename_type.
5676 (cp_parser_class_head): Use resolve_typename_type, not
5677 cp_parser_resolve_typename_type.
5678 (cp_parser_member_declaration): Adjust call to
5679 cp_parser_constant_expression.
5680 (cp_parser_constant_initializer): Likewise.
5681 (cp_parser_constructor_declarator): Use resolve_typename_type, not
5682 cp_parser_resolve_typename_type.
5683 (cp_parser_late_parsing_default_args): Adjust call to
5684 push_nested_class.
5685 * pt.c (tsubst): Give it internal linkage.
5686 (tsubst_expr): Likewise.
5687 (tsubst_copy): Likewise.
5688 (tsubst_copy_and_build): Likewise.
5689 (push_access_scope_real): Likewise.
5690 (tsubst_friend_class): Likewise.
5691 (instantiate_class_template): Adjust call to pushclass.
5692 (value_dependent_expression_p): Give it external linkage.
5693 Robustify.
5694 (resolve_typename_type): New function.
5695 * semantics.c (finish_call_expr): Use build_new_op, not
5696 build_opfncall.
5697 (begin_constructor_declarator): Remove.
5698 (begin_class_definition): Adjust call to pushclass.
5699 (enter_scope_of): Remove.
5700 * typeck.c (comptypes): Resolve typename types as appropriate.
5701 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5702 (build_x_compound_expr): Likewise.
5703 (build_modify_expr): Likewise.
5704 (build_x_modify_expr): Likewise.
5705 * typeck2.c (build_x_arrow): Likewise.
5706
5707 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
5708
5709 * pt.c (last_pending_template) Declare GTY().
5710
5711 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5712
5713 PR c++/8591
5714 * parser.c (cp_parser_elaborated_type_specifier): Convert
5715 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5716 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5717
5718 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
5719
5720 PR c++/9437
5721 * pt.c (unify): Don't unify '*T' with 'U C::*'.
5722
5723 PR c++/3902
5724 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5725 inside a declarator.
5726
5727 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
5728
5729 * class.c (update_vtable_entry_for_fn): Add index parameter.
5730 Generate vcall thunk for covariant overriding from a virtual
5731 primary base.
5732 (dfs_modify_vtables): Adjust.
5733
5734 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
5735
5736 PR c++/9403
5737 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5738 template keyword.
5739 (cp_parser_base_specifier): Look for and consume a
5740 TEMPLATE keyword. Replace switch with array index.
5741
5742 PR c++/795
5743 * semantics.c (finish_non_static_data_member): Remember the
5744 field's type even in a template.
5745
5746 PR c++/9415
5747 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5748 already scoped.
5749
5750 PR c++/8545
5751 * parser.c (cp_parser_cast_expression): Be more tentative.
5752
5753 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5754
5755 * cp-tree.h (flagged_type_tree_s): Remove.
5756 (check_for_new_type): Likewise.
5757 * typeck2.c (check_for_new_type): Likewise.
5758
5759 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
5760
5761 * dump.c: ANSIfy function declarations and definitions.
5762
5763 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
5764
5765 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5766
5767 PR c++/9354
5768 * init.c (build_new): Set the type of the new-expression, even
5769 when processing_templte_decl.
5770
5771 PR c++/9216
5772 * parser.c (cp_parser_primary_expression): Improve error message
5773 for templates used in an expression context.
5774
5775 PR c++/8696
5776 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5777 parse when encountering "typedef".
5778
5779 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
5780
5781 * class.c, parser.c: ANSIfy function definitions and declarations.
5782
5783 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5784
5785 PR c++/9328
5786 * error.c (dump_decl): For an OVERLOAD, just print the name of the
5787 function; it doesn't make sense to try to print its type.
5788 * semantics.c (finish_typeof): Issue errors about invalid uses.
5789
5790 PR c++/9298
5791 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5792 function.
5793 (cp_parser_expression_statement): Use it.
5794 (cp_parser_explicit_instantiation): Likewise.
5795 * pt.c (do_decl_instantiation): Improve error handling logic.
5796
5797 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5798
5799 PR c++/9384
5800 * parser.c (cp_parser_using_declaration): Issue error messages
5801 about name resolution failures here.
5802
5803 PR c++/9388
5804 * class.c (currently_open_derived_class): Use dependent_type_p.
5805 * cp-tree.h (dependent_type_p): New function.
5806 (dependent_template_arg_p): Likewise.
5807 (dependent_template_p): Likewise.
5808 (type_dependent_expression_p): Likewise.
5809 * parser.c (cp_parser_dependent_type_p): Remove.
5810 (cp_parser_value_dependent_type_p): Likewise.
5811 (cp_parser_type_dependent_expression_p): Likewise.
5812 (cp_parser_dependent_template_arg_p): Likewise.
5813 (cp_parser_dependent_template_id_p): Likewise.
5814 (cp_parser_dependent_template_p): Likewise.
5815 (cp_parser_diagnose_invalid_type_name): Replace
5816 cp_parser_dependent_type_p with dependent_type_p, etc.
5817 (cp_parser_primary_expresion): Likewise.
5818 (cp_parser_nested_name_specifier_opt): Likewise.
5819 (cp_parser_postfix_expression): Likewise.
5820 (cp_parser_unary_expression): Likewise.
5821 (cp_parser_template_name): Likewise.
5822 (cp_parser_class_name): Likewise.
5823 (cp_parser_lookup_name): Likewise.
5824 * pt.c (dependent_type_p): New function.
5825 (value_dependent_expression_p): Likewise.
5826 (type_dependent_expression_p): Likewise.
5827 (dependent_template_arg_p): Likewise.
5828 (dependent_template_id_p): Likewise.
5829 (dependent_template_p): Likewise.
5830
5831 PR c++/9285
5832 PR c++/9294
5833 * parser.c (cp_parser_simple_declaration): Return quickly when
5834 encountering errors.
5835
5836 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5837
5838 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5839
5840 2003-01-17 Jason Merrill <jason@redhat.com>
5841
5842 PR c++/9167, c++/9358
5843 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5844
5845 2003-01-17 Jason Merrill <jason@redhat.com>
5846
5847 PR c++/9342
5848 * call.c (build_conditional_expr): Always do lvalue-rvalue
5849 conversion.
5850
5851 2003-01-17 Mark Mitchell <mark@codesourcery.com>
5852
5853 PR c++/9294
5854 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5855 * cp-tree.h (BASELINK_BINFO): Adjust.
5856 (BASELINK_FUNCTIONS): Likewise.
5857 (BASELINK_ACCESS_BINFO): Likewise.
5858 (tree_baselink): New structure.
5859 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5860 (lang_tree_node): Add baselink.
5861 * decl.c (cp_tree_node_structure): Add BASELINK case.
5862 * search.c (build_baselink): Adjust.
5863 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
5864 test from TREE_LIST case.
5865
5866 PR c++/9272
5867 * parser.c (cp_parser_constructor_declarator_p): Do not assume
5868 that a constructor cannot be declared outside of its own class.
5869
5870 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5871 be resolved, neither can the qualified name.
5872
5873 * rtti.c (get_pseudo_ti_desc): Fix thinko.
5874
5875 2003-01-16 Jason Merrill <jason@redhat.com>
5876
5877 PR c++/8564
5878 * init.c (build_vec_init): Re-add maxindex parm.
5879 (perform_member_init, build_aggr_init): Pass it.
5880 (build_new_1): Pass it. Use an incomplete array type for full_type.
5881 * typeck.c (build_modify_expr): Pass it.
5882 * cp-tree.h: Adjust.
5883
5884 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
5885
5886 * cp-tree.h (tsubst_copy_and_build): New declaration.
5887 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5888 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
5889 (tsubst_copy_and_build): New function.
5890
5891 2003-01-16 Mark Mitchell <mark@codesourcery.com>
5892
5893 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5894 (PARTIAL_INSTANTIATION_P): Remove.
5895 (IMPLICIT_TYPENAME_P): Likewise.
5896 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5897 (build_typename_type): Remove declaration.
5898 (parmlist_is_exprlist): Likewise.
5899 * decl.c (build_typename_type): Make it static, remove third
5900 parameter.
5901 (push_class_binding): Don't do implicit typename stuff.
5902 (make_typename_type): Likewise.
5903 (lookup_name_real): Likewise.
5904 (grokdeclarator): Don't try to convert declarations into
5905 initializations. Don't do implicit typename stuff.
5906 (parmlist_is_exprlist): Remove.
5907 (xref_basetypes): Simplify.
5908 * decl2.c (grokfield): Don't try to convert declarations into
5909 initializations.
5910 (build_anon_union_vars): Do this while processing templates, too.
5911 (finish_anon_union): Likewise.
5912 * error.c (dump_type): Remove implicit typename handling.
5913 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5914 (cp_parser_primary_expression): Correct handling of names not
5915 found by unqualified name lookup in templates.
5916 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5917 of types when possible.
5918 (cp_parser_simple_declaration): Complain intelligently about some
5919 invalid declarations.
5920 (cp_parser_member_declaration): Likewise.
5921 (cp_parser_constructor_declarator_p): Don't check when we're in a
5922 function scope.
5923 * pt.c (instantiate_class_template): Remove
5924 PARTIAL_INSTANTIATION_P gunk.
5925 * search.c (lookup_field_r): Don't build implicit typenames.
5926 (marked_pushdecls_p): Don't enter dependent base types.
5927 (unmarked_pushdecls_p): Likewise.
5928 * semantics.c (begin_class_definition): Remove implicit typename
5929 stuff.
5930
5931 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
5932
5933 PR c++/9212
5934 * parser.c (cp_parser_direct_declarator): If accepting either
5935 abstract or named, the name must be an unqualified-id.
5936
5937 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5938
5939 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5940
5941 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5942
5943 * decl2.c (check_classfn): Fix uninitialized warning.
5944 (build_anon_union_vars): Likewise.
5945 * pt.c (tsubst_copy): Likewise.
5946
5947 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
5948
5949 Further conform g++'s __vmi_class_type_info to the C++ ABI
5950 specification.
5951 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5952 the specification.
5953 (class_hint_flags): Likewise.
5954
5955 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5956
5957 * config-lang.in: Add semantics.c to gtfiles.
5958 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5959 (saved_scope): Likewise.
5960 (type_lookups): Remove.
5961 (deferred_access): New structure.
5962 (type_access_control): Remove.
5963 (save_type_access_control): Likewise.
5964 (reset_type_access_control): Likewise.
5965 (decl_type_access_control): Likewise.
5966 (push_deferring_access_checks): Declare.
5967 (resume_deferring_access_checks): Likewise.
5968 (stop_deferring_access_checks): Likewise.
5969 (pop_deferring_access_checks): Likewise.
5970 (get_deferred_access_checks): Likewise.
5971 (pop_to_parent_deferring_access_checks): Likewise.
5972 (perform_deferred_access_checks): Likewise.
5973 (perform_or_defer_access_check): Likewise.
5974 * decl.c (make_typename_type): Use perform_or_defer_access_check.
5975 (make_unbound_class_template): Likewise.
5976 (grokdeclarator): Don't call decl_type_access_control.
5977 * parser.c (cp_parser_context): Remove deferred_access_checks
5978 and deferring_access_checks_p fields.
5979 (cp_parser_context_new): Adjust.
5980 (cp_parser): Remove access_checks_lists.
5981 (cp_parser_defer_access_check): Remove.
5982 (cp_parser_start_deferring_access_checks): Remove.
5983 (cp_parser_stop_deferring_access_checks): Remove.
5984 (cp_parser_perform_deferred_access_checks): Remove.
5985 (cp_parser_nested_name_specifier_opt): Use new deferred access
5986 functions.
5987 (cp_parser_simple_declaration): Likewise.
5988 (cp_parser_template_id): Likewise.
5989 (cp_parser_function_definition): Likewise.
5990 (cp_parser_class_specifier): Likewise.
5991 (cp_parser_lookup_name): Likewise.
5992 (cp_parser_single_declaration): Likewise.
5993 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5994 (cp_parser_parse_tentatively): Likewise.
5995 (cp_parser_parse_definitely): Likewise.
5996 (yyparse): Likewise.
5997 (cp_parser_init_declarator): Remove access_checks parameter.
5998 Use new deferred access functions.
5999 (cp_parser_function_definition_from_specifiers_and_declarator):
6000 Likewise.
6001 (cp_parser_class_head): Remove deferring_access_checks_p and
6002 saved_access_checks parameters. Use new deferred access functions.
6003 (cp_parser_member_specification_opt): Don't call
6004 reset_type_access_control.
6005 * search.c (type_access_control): Remove.
6006 * semantics.c: Include "gt-cp-semantics.h".
6007 (deferred_type_access_control): Remove.
6008 (deferred_access_stack): New variable.
6009 (deferred_access_free_list): Likewise.
6010 (push_deferring_access_checks): New function.
6011 (resume_deferring_access_checks): Likewise.
6012 (stop_deferring_access_checks): Likewise.
6013 (pop_deferring_access_checks): Likewise.
6014 (get_deferred_access_checks): Likewise.
6015 (pop_to_parent_deferring_access_checks): Likewise.
6016 (perform_deferred_access_checks): New function, adapted from
6017 cp_parser_perform_deferred_access_checks.
6018 (perform_or_defer_access_check): New function, adapted from
6019 cp_parser_defer_access_check.
6020 (current_type_lookups): Remove.
6021 (deferred_type_access_control): Likewise.
6022 (decl_type_access_control): Likewise.
6023 (save_type_access_control): Likewise.
6024 (reset_type_access_control): Likewise.
6025 (begin_function_definition): Adjust.
6026 (begin_class_definiton): Likewise.
6027
6028 2003-01-13 Jason Merrill <jason@redhat.com>
6029
6030 PR c++/8748
6031 * class.c (build_base_path): Take the address before calling save_expr.
6032
6033 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6034 all the ambiguous conversions are bad.
6035
6036 * class.c (maybe_warn_about_overly_private_class): Don't stop
6037 searching when we find a nonprivate method.
6038
6039 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6040
6041 2003-01-12 Mark Mitchell <mark@codesourcery.com>
6042
6043 * cp-tree.h (get_arglist_len_in_bytes): Remove.
6044
6045 PR c++/9264
6046 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6047 typeame types more robustly.
6048
6049 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
6050
6051 * parser.c: Fix comment typos.
6052
6053 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6054
6055 PR c++/9099
6056 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6057 an object_type which is not a class type.
6058
6059 2003-01-10 Geoffrey Keating <geoffk@apple.com>
6060
6061 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6062 (cp_parser_late_parsing_default_args): Likewise.
6063
6064 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
6065
6066 * cfns.gperf: ANSIfy function declarations.
6067 * cfns.h: Regenerate.
6068 * cp-tree.h: ANSIfy function declarations.
6069
6070 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6071
6072 * cp-tree.h (reparse_absdcl_as_expr): Remove.
6073 (reparse_absdcl_as_casts): Likewise.
6074 (reparse_decl_as_expr): Likewise.
6075 (finish_decl_parsing): Likewise.
6076 * decl2.c (reparse_absdcl_as_expr): Remove.
6077 (reparse_absdcl_as_casts): Likewise.
6078 (repase_decl_as_expr): Likewise.
6079 (finish_decl_parsing): Likewise.
6080
6081 PR c++/9128
6082 PR c++/9153
6083 PR c++/9171
6084 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6085 function.
6086 (cp_parser_nested_name_specifier_opt): Correct the
6087 check_dependency_p false.
6088 (cp_parser_postfix_expression): Fix formatting.
6089 (cp_parser_decl_specifier_seq): Avoid looking for constructor
6090 declarators when possible.
6091 (cp_parser_template_id): Avoid performing name-lookup when
6092 possible.
6093 (cp_parser_class_head): Do not count specializations when counting
6094 levels of templates.
6095 (cp_parser_constructor_declarator_p): Return immediately if
6096 there's no chance that the tokens form a constructor declarator.
6097 * rtti.c (throw_bad_typeid): Add comment. Do not return an
6098 expression with reference type.
6099 (get_tinfo_decl_dynamic): Do not return an expression with
6100 reference type.
6101 (build_typeid): Add comment. Do not return an expression with
6102 reference type.
6103 * typeck.c (build_class_member_access_expr): Improve handling of
6104 conditionals and comma-expressions as objects.
6105
6106 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6107
6108 * cfns.gperf: ANSIfy function declarations.
6109 * cfns.h: Regenerate.
6110 * cp-tree.h: ANSIfy function declarations.
6111 * parser.c: ANSIfy function declarations & definitions.
6112
6113 * decl.c (bad_specifiers): Fix parameter order error I introduced.
6114
6115 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6116
6117 Merge from pch-branch:
6118
6119 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6120
6121 Merge to tag pch-merge-20030102:
6122
6123 * semantics.c (finish_translation_unit): Don't call finish_file.
6124 * parser.c: Don't include ggc.h.
6125 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6126 read first token here. Don't allow PCH files after the first
6127 token is read.
6128 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6129 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6130 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6131 (cp_parser_late_parsing_for_member): Don't duplicate call to
6132 cp_lexer_set_source_position_from_token.
6133 (cp_parser_late_parsing_default_args): Likewise.
6134 (yyparse): Call finish_file after clearing the_parser.
6135
6136 2002-12-11 Geoffrey Keating <geoffk@apple.com>
6137
6138 * Make-lang.in: Remove $(GGC_H) from all dependencies.
6139 (CXX_TREE_H): Add $(GGC_H).
6140 * class.c: Don't include ggc.h.
6141 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6142 (method_name_cmp): Likewise.
6143 (resort_data): New variable.
6144 (resort_field_decl_cmp): New.
6145 (resort_method_name_cmp): New.
6146 (resort_sorted_fields): New.
6147 (resort_type_method_vec): New.
6148 (finish_struct_methods): Delete cast.
6149 (finish_struct_1): Delete cast.
6150 * cp-tree.h: Include ggc.h.
6151 (struct lang_type_class): Add reorder attribute to field `methods'.
6152 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6153 (resort_sorted_fields): New prototype.
6154 (resort_type_method_vec): New prototype.
6155 * call.c: Don't include ggc.h.
6156 * decl.c: Likewise.
6157 * decl2.c: Likewise.
6158 * init.c: Likewise.
6159 * lex.c: Likewise.
6160 * method.c: Likewise.
6161 * optimize.c: Likewise.
6162 * parse.y: Likewise.
6163 * pt.c: Likewise.
6164 * repo.c: Likewise.
6165 * search.c: Likewise.
6166 * semantics.c: Likewise.
6167 * spew.c: Likewise.
6168 * tree.c: Likewise.
6169
6170 * lang-specs.h: Remove comment.
6171
6172 2002-12-03 Geoffrey Keating <geoffk@apple.com>
6173
6174 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6175 (operator_name_info): Mark to be saved for PCH, specify size.
6176 (assignment_operator_name_info): Likewise.
6177
6178 2002-11-19 Geoffrey Keating <geoffk@apple.com>
6179
6180 * decl.c (anon_cnt): Mark to be saved for PCH.
6181
6182 2002-10-25 Geoffrey Keating <geoffk@apple.com>
6183
6184 * lex.c (init_reswords): Delete now-untrue comment.
6185 Allocate ridpointers using GGC.
6186
6187 2002-10-04 Geoffrey Keating <geoffk@apple.com>
6188
6189 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6190
6191 * g++spec.c (lang_specific_driver): Don't include standard
6192 libraries in `added'.
6193
6194 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
6195
6196 * decl2.c (finish_file): Call c_common_write_pch.
6197 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6198
6199 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
6200
6201 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6202 files when using g++.
6203 * lang-specs.h: Handle compiling C++ header files.
6204
6205 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6206
6207 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6208
6209 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6210
6211 * pt.c (push_access_scope_real): Call push_to_top_level for
6212 function in namespace scope.
6213 (pop_access_scope): Call pop_from_top_level for function in
6214 namespace scope.
6215
6216 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6217
6218 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6219
6220 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6221
6222 * Make-lang.in (c++.install-common, c++.install-man,
6223 c++.uninstall): Prepend $(DESTDIR) to destination paths in
6224 all (un)installation commands.
6225 (c++.install-common): Rewrite $(LN) commands to support
6226 DESTDIR with "ln" as well as with "ln -s".
6227
6228 2003-01-08 Jason Merrill <jason@redhat.com>
6229
6230 * parser.c (cp_parser_primary_expression): See through explicitly
6231 scoped ALIAS_DECLs, too.
6232
6233 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6234
6235 * decl.c: Remove some #if 0 code.
6236
6237 * decl.c: ANSIfy function declarations.
6238
6239 2003-01-07 Mark Mitchell <mark@codesourcery.com>
6240
6241 * parser.c (cp_parser_asm_definition): Correct handling of omitted
6242 operands.
6243
6244 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6245
6246 PR c++/9030
6247 * decl.c (make_typename_type): Check access only when tf_error.
6248 (make_unbound_class_template): Likewise.
6249 * pt.c (saved_access_scope): New variable.
6250 (push_access_scope_real): New function.
6251 (push_access_scope): Likewise.
6252 (pop_access_scope): Likewise.
6253 (tsubst_default_argument): Use them.
6254 (instantiate_template): Likewise.
6255 (regenerate_decl_from_template): Likewise.
6256 (instantiate_decl): Likewise.
6257 (get_mostly_instantiated_function_type): Likewise.
6258
6259 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
6260
6261 * tree.c: Delete bogus #if 0 code.
6262
6263 2003-01-07 Andreas Schwab <schwab@suse.de>
6264
6265 * class.c (layout_class_type): Don't use
6266 PCC_BITFIELD_TYPE_MATTERS if not defined.
6267
6268 2003-01-06 Mark Mitchell <mark@codesourcery.com>
6269
6270 PR c++/9165
6271 * decl2.c (build_cleanup): Mark the object as used.
6272
6273 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6274 (hash_local_specialization): New function.
6275 (register_local_specialization): Revert 2003-01-05 change.
6276 (instantiate_decl): Use hash_local_specialization when creating
6277 the local_specializations table.
6278
6279 * decl2.c (mark_used): Do not synthesize thunks.
6280
6281 * class.c (layout_class_type): Correct handling of unnamed
6282 bitfields wider than their types.
6283
6284 PR c++/9189
6285 * parser.c (cp_parser): Remove default_arg_types. Update
6286 documentation for unparsed_functions_queues.
6287 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6288 parameter.
6289 (cp_parser_new): Don't set parser->default_arg_types.
6290 (cp_parser_function_definition): Adjust usage of
6291 unparsed_funtions_queues.
6292 (cp_parser_class_specifier): Don't mess with
6293 parser->default_arg_types. Handle default argument processing in
6294 a separate phase from function body processing.
6295 (cp_parser_template_declaration_after_export): Adjust usage of
6296 unparsed_functions_queues.
6297 (cp_parser_late_parsing_for_member): Do not handle default
6298 arguments.
6299
6300 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
6301
6302 PR c++/9109
6303 * parser.c (cp_parser_declarator_kind): New enum.
6304 (cp_parser_declarator): Adjust.
6305 (cp_parser_direct_declarator): Adjust. Allow for either named or
6306 abstract declarator. Prefer abstract, if possible. Allow
6307 parenthesized function name.
6308 (cp_parser_condition): Adjust cp_parser_declarator call.
6309 (cp_parser_explicit_instantiation): Likewise.
6310 (cp_parser_init_declarator): Likewise.
6311 (cp_parser_type_id): Likewise.
6312 (cp_parser_function_definition): Likewise.
6313 (cp_parser_member_declaration): Likewise.
6314 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6315 the tentative parsing.
6316 (cp_parser_exception_declaration): Likewise.
6317
6318 2003-01-05 Mark Mitchell <mark@codesourcery.com>
6319
6320 * parser.c (cp_parser_template_parameter): Adjust call to
6321 cp_parser_parameter_declaration.
6322 (cp_parser_parameter_declaration_list): Likewise.
6323 (cp_parser_parameter_declaration): Replace
6324 greater_than_is_operator_p with template_parm_p parameter. Do not
6325 cache tokens for template default arguments.
6326
6327 * pt.c (retrieve_local_specialization): Use htab_find, not
6328 htab_find_with_hash.
6329 (register_local_specialization): Use htab_find_slot, not
6330 htab_find_slot_with_hash.
6331 (instantiate_decl): Pass a hash function to htab_create.
6332
6333 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6334
6335 * parser.c (cp_parser_binary_expression,
6336 cp_parser_multiplicative_expression,
6337 cp_parser_additive_expression, cp_parser_shift_expression,
6338 cp_parser_relational_expression, cp_parser_equality_expression,
6339 cp_parser_and_expression, cp_parser_exclusive_or_expression,
6340 cp_parser_inclusive_or_expression,
6341 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6342 cp_parser_binary_expression): Const-ify.
6343
6344 2003-01-04 Mark Mitchell <mark@codesourcery.com>
6345
6346 * method.c (use_thunk): Disable access control while building the
6347 body of the thunk.
6348
6349 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
6350
6351 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6352 front end.
6353
6354 2003-01-03 Matt Austern <austern@apple.com>
6355
6356 * cp-tree.h (struct lang_type_class): add field for key method
6357 (cp_global_trees): rename dynamic_classes to keyed_classes
6358 (key_method): add definition
6359 * class.c (finish_struct_1): compute class's key method, and add
6360 the class to keyed_classes list if there is no key method.
6361 * decl.c (finish_function): add class to keyed_classes list if we
6362 see a definition of the class's key method.
6363 * pt.c (instantiate_class_template): add template specialization
6364 of a dynamic class to keyed_classes list.
6365 * decl2.c (key_method): remove
6366 (finish_file): iterate only through keyed_classes list when
6367 deciding whether to emit vtables, remove class from its list after
6368 we do the emission.
6369
6370 2003-01-02 Jason Merrill <jason@redhat.com>
6371
6372 * call.c (build_conditional_expr): Stabilize lvalues properly.
6373 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6374 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6375 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6376
6377 * call.c (convert_like_real): Call decl_constant_value for an
6378 IDENTITY_CONV even if there are no more conversions.
6379
6380 * cvt.c (build_up_reference): Don't push unnamed temps.
6381
6382 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6383
6384 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6385 for a backend struct.
6386
6387 * except.c (wrap_cleanups_r, build_throw): Make
6388 MUST_NOT_THROW_EXPRs void.
6389 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6390
6391 * init.c (build_vec_delete_1): Pre-evaluate the base address.
6392
6393 * init.c (get_temp_regvar): Simplify logic.
6394
6395 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6396 our replacement is a decl.
6397
6398 * decl.c (cp_make_fname_decl): Push the decls inside the
6399 outermost scope.
6400
6401 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
6402
6403 PR c++/45, c++/3784
6404 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6405 the same too.
6406
6407 2003-01-03 Graham Stott <graham.stott@btinternet.com>
6408
6409 * parser.c (struct cp_parser): Add access_checks_lists field
6410 (cp_parser_simple_declaration): Use.
6411 (cp_parser_init_declarator): Likewise.
6412
6413 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6414
6415 * parser.c (cp_parser_declaration): Accept the __extension__
6416 keyword before the declaration.
6417
6418 PR c++/2843
6419 * parser.c (cp_parser_parameter_declaration): Allow attributes to
6420 appear after the declarator.
6421
6422 * call.c (build_new_method_call): Fix typo in message format
6423 string.
6424
6425 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6426
6427 * parser.c (cp_lexer_next_token_is): Declare it inline.
6428 (cp_lexer_set_source_position_from_token): Likewise.
6429 (cp_lexer_debugging_p): Likewise.
6430 (cp_parser_parsing_tentatively): Likewise.
6431 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6432 to the cp_lexer_peek_token.
6433
6434 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6435 expression.
6436
6437 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6438
6439 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6440 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6441 cp/repo.c: Fix copyright years.
6442
6443 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
6444
6445 * lex.c: Remove superfluous include of cpplib.h.
6446 (CONSTRAINT): Define without conditions.
6447 (init_cp_pragma): Use c_register_pragma.
6448
6449 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6450
6451 * .cvsignore: Remove.
6452
6453 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
6454
6455 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6456 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6457 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6458 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6459 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6460 copyright header.
6461 * lex.h: parse.y is dead, so don't mention it. Also replace the
6462 copyright header with the default GNU copyright header.
6463
6464 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6465
6466 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6467 (lookup_name_namespace_only): Likewise.
6468 (begin_only_namespace_names): Likewise.
6469 (end_only_namespace_names): Likewise.
6470 * decl.c (only_namespace_names): Remove.
6471 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6472 (lookup_name_real): Do not check only_namespace_names.
6473 (lookup_name_namespace_only): Remove.
6474 (begin_only_namespace_names): Likewise.
6475 (end_only_namespace_names): Likewise.
6476 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6477 nested-name-specifiers more gracefully.
6478 (cp_parser_class_or_namespace_name): Avoid looking up namespace
6479 names when they cannot possibly appear.
6480 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6481 (cp_parser_elaborated_type_specifier): Likewise.
6482 (cp_parser_namespace_name): Only look for namespace names.
6483 (cp_parser_lookup_name): Add is_namespace parameter.
6484 (cp_parser_lookup_name_simple): Adjust call to
6485 cp_parser_lookup_name.
6486
6487 * parser.c (cp_parser_dependent_type_p): Fix thinko.
6488
6489 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6490
6491 * .cvsignore: Update.
6492
6493 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
6494
6495 * class.c (modify_vtable_entry): Remove unused variable.
6496 (get_vcall_index): Always expect a non-thunk.
6497 (update_vtable_entry_for_fn): Combine covariant adjustments, when
6498 overriding a thunk. Pass get_vcall_index a non-thunk.
6499
6500 * decl2.c (finish_file): Mark undefined inlines as extern.
6501
6502 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6503
6504 * cp-tree.def (RETURN_INIT): Remove.
6505 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6506 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6507 (note_level_for_for): Remove.
6508 (note_level_for_try): Likewise.
6509 (note_level_for_catch): Likewise.
6510 (finish_named_return_value): Likewise.
6511 (do_pushlevel): Change prototype.
6512 (pending_lang_change): Remove.
6513 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6514 sk_for.
6515 (note_level_for_for): Remove.
6516 (note_level_for_try): Likewise.
6517 (note_level_for_catch): Likewise.
6518 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6519 * parser.c (cp_parser_context_free_list): Make it "deletable".
6520 (cp_parser_template_argument): Remove misleading comment.
6521 * pt.c (tsubst_expr): Remove RETURN_INIT code.
6522 * semantics.c (genrtl_named_return_value): Remove.
6523 (do_pushlevel): Take a scope kind as an argument.
6524 (begin_if_stmt): Adjust.
6525 (begin_while_stmt): Likewise.
6526 (begin_for_stmt): Likewise.
6527 (finish_for_init_stmt): Likewise.
6528 (begin_switch_stmt): Likewise.
6529 (begin_handler): Likewise.
6530 (begin_compound_stmt): Likewise.
6531 (finish_named_return_value): Remove.
6532 (cp_expand_stmt): Remove RETURN_INIT case.
6533 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6534
6535 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6536
6537 PR c++/9112
6538 * parser.c (cp_parser_direct_declarator): Handle erroneous
6539 parenthesized declarators correctly.
6540
6541 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6542
6543 * cp-tree.h (pending_lang_change): Declare.
6544
6545 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6546
6547 * parser.c (cp_parser_context_free_list): New variable.
6548 (cp_parser_context_new): Use it.
6549 (cp_parser_error): Check return code from
6550 cp_parser_simulate_error.
6551 (cp_parser_simulate_error): Return a value.
6552 (cp_parser_id_expression): Optimize common case.
6553 (cp_parser_class_name): Likewise.
6554 (cp_parser_class_specifier): Adjust call to
6555 cp_parser_late_parsing_default_args.
6556 (cp_parser_lookup_name): Optimize common case.
6557 (cp_parser_late_parsing_for_member): Adjust call to
6558 cp_parser_late_parsing_default_args.
6559 (cp_parser_late_parsing_default_args): Add scope parameter.
6560 (cp_parser_require): Avoid creating the error message unless it's
6561 needed.
6562 (cp_parser_parse_definitely): Place free'd contexts on the free
6563 list.
6564
6565 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6566
6567 2002-12-30 David Edelsohn <edelsohn@gnu.org>
6568
6569 * parser.c (cp_parser_parameter_declaration_clause): Treat system
6570 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6571
6572 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6573
6574 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6575 GCC, not GNU CC.
6576
6577 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6578
6579 * parse.y: Remove.
6580 * spew.c: Likewise.
6581 * Make-lang.in (gt-cp-spew.h): Remove.
6582 * cp-tree.h (do_pending_lang_change): Remove.
6583 (do_identifier): Change prototype.
6584 (finish_id_expr): Remove.
6585 * decl.c (lookup_name_real): Remove yylex variable.
6586 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6587 * lex.c (init_cpp_parse): Remove.
6588 (reduce_cmp): Likewise.
6589 (token_cmp): Likewise.
6590 (yychar): Likewise.
6591 (lastiddecl): Likewise.
6592 (token_count): Likewise.
6593 (reduce_count): Likewise.
6594 (yyhook): Likewise.
6595 (print_parse_statistics): Likewise.
6596 (do_pending_lang_change): Likewise.
6597 (do_identifier): Remove parsing parameter.
6598 * lex.h (lastiddecl): Remove.
6599 (looking_for_typename): Remove.
6600 (looking_for_template): Likewise.
6601 (pending_lang_change): Likewise.
6602 (yylex): Likewise.
6603 * semantics.c (finish_id_expr): Remove.
6604
6605 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6606 thread" correctly.
6607
6608 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6609
6610 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
6611 end, not the C front end.
6612
6613 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
6614
6615 * cp-tree.h (THUNK_TARGET): New macro.
6616 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6617 (finish_thunk): Remove offset parms.
6618 * class.c (find_final_overrider): Look through thunks.
6619 (get_vcall_index): Use THUNK_TARGET.
6620 (update_vtable_entry_for_fn): Look through thunks. Set covariant
6621 fixed offset here. Adjust finish_thunk call.
6622 (build_vtbl_initializer): Adjust finish_thunk calls.
6623 * mangle.c (mangle_call_offset): Remove superfluous if.
6624 (mangle_thunk): Adjust.
6625 * method.c (make_thunk): Adjust.
6626 (finish_thunk): Adjust.
6627 (thunk_adjust): Remove assert.
6628 (use_thunk): Use THUNK_TARGET
6629 * dump1.c (cp_dump_tree): Adjust thunk dumping.
6630
6631 PR c++/9054
6632 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6633 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6634
6635 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6636
6637 Remove traditional C constructs 4/n.
6638 * decl2.c (grok_method_quals, warn_if_unknown_interface,
6639 grok_x_components, cp_build_parm_decl, build_artificial_parm,
6640 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6641 delete_sanity, check_member_template, check_java_method,
6642 check_classfn, finish_static_data_member_decl, grokfield,
6643 grokbitfield, grokoptypename, grok_function_init,
6644 cplus_decl_attributes, constructor_name, defer_fn,
6645 build_anon_union_vars, finish_anon_union, coerce_new_type,
6646 coerce_delete_type, comdat_linkage, maybe_make_one_only,
6647 key_method, import_export_vtable, import_export_class,
6648 output_vtable_inherit, import_export_decl, import_export_tinfo,
6649 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6650 set_guard, start_objects, finish_objects,
6651 start_static_storage_duration_function,
6652 finish_static_storage_duration_function, get_priority_info,
6653 start_static_initialization_or_destruction,
6654 finish_static_initialization_or_destruction,
6655 do_static_initialization, do_static_destruction,
6656 prune_vars_needing_no_initialization, write_out_vars,
6657 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6658 add_using_namespace, merge_functions, ambiguous_decl,
6659 lookup_using_namespace, lookup_using_namespace,
6660 qualified_lookup_using_namespace, set_decl_namespace,
6661 decl_namespace, current_decl_namespace, push_decl_namespace,
6662 pop_decl_namespace, push_scope, pop_scope, add_function,
6663 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6664 lookup_arg_dependent, do_namespace_alias,
6665 validate_nonmember_using_decl, do_nonmember_using_decl,
6666 do_toplevel_using_decl, do_local_using_decl,
6667 do_class_using_decl, do_using_directive, check_default_args,
6668 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
6669 * parser.c (cp_parser_class_head): Use booleanss.
6670 * decl.c (walk_globals, walk_vtables): Likewise.
6671 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6672 walk_globals): Change return type from 'int' to 'bool'.
6673 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6674 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6675 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6676 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6677 qualifier_flags, tinfo_base_init, generic_initializer,
6678 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6679 dfs_class_hint_unmark, class_hint_flags, class_initializer,
6680 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6681 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6682 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6683 * repo.c (repo_compile_flags, repo_template_declared,
6684 repo_template_defined, repo_class_defined, repo_get_id,
6685 repo_template_used, repo_vtable_used, repo_inline_used,
6686 repo_tinfo_used, repo_template_instantiated, extract_string,
6687 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6688 finish_repo): Likewise.
6689 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6690 cxx_print_xnode): Likewise..
6691 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6692 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6693 * cxxfilt.c (demangle_it, print_demangler_list, usage,
6694 standard_symbol_characters, hp_symbol_characters, main, fatal):
6695 Likewise.
6696 (strip_underscore): Change type from 'int' to 'bool'.
6697 (main): Use boolean constants.
6698
6699 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6700
6701 Remove traditional C constructs 3/n.
6702 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6703 build_up_reference, warn_ref_binding, convert_to_reference,
6704 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6705 convert_to_void, convert, convert_force, build_type_conversion,
6706 build_expr_type_conversion, type_promotes_to,
6707 perform_qualification_conversions): Use C90 prototyping style.
6708 * decl2.c (grok_array_decl): Use boolean constant.
6709 (delete_sanity): Likewise.
6710 * typeck.c (build_unary_op): Likewise.
6711 * semantics.c (finish_switch_cond): Likewise.
6712 * parser.c (cp_parser_direct_new_declarator): Likewise.
6713 * init.c (build_new): Likewise.
6714
6715 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6716
6717 * Make-lang.in (po-generated): Remove parse.c.
6718 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
6719 ($(srcdir)/cp/parse.h): Remove target.
6720 ($(srcdir)/cp/parse.c): Likewise.
6721 (gt-cp-parse.h): Likewise.
6722 (gt-cp-parser.h): New target.
6723 (c++.distclean): Do not remove parse.output.
6724 (c++.maintainer-clean): Do not remove parse.c or parse.h.
6725 (cp/spew.o): Remove target.
6726 (cp/lex.o): Adjust dependencies.
6727 (cp/pt.o): Likewise.
6728 (cp/parse.o): Likewise.
6729 (cp/TAGS): Do not mention parse.c.
6730 (cp/parser.o): New target.
6731 * NEWS: Mention the new parser.
6732 * call.c (build_scoped_method_call): Simplify.
6733 (build_method_call): Likewise.
6734 (build_new_function_call): Adjust calls to add_function_candidate
6735 and add_template_candidate.
6736 (build_new_op): Improve handling of erroroneous operands.
6737 (convert_default_arg): Remove circular argument processing.
6738 (name_as_c_string): New function.
6739 (build_new_method_call): Use it.
6740 (perform_implicit_conversion): Use error_operand_p.
6741 * class.c (finish_struct_anon): Use constructor_name_p.
6742 (check_field_decls): Likewise.
6743 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6744 (resolve_address_of_overloaded_function): Likewise.
6745 (instantiate_type): Tweak pointer-to-member handling.
6746 (get_primary_binfo): Remove incorrect assertion.
6747 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6748 * cp-tree.h (DEFARG_TOKENS): New macro.
6749 (default_arg): New structure.
6750 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6751 (lang_tree_node): Add default_arg.
6752 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6753 (type_info_ref_type): New macro.
6754 (saved_scope): Make processing_explicit_instantiation a boolean.
6755 (check_access): New field.
6756 (unparsed_text): Remove.
6757 (language_function): Remove unparsed_inlines.
6758 (error_operand_p): New macro.
6759 (lang_decl): Adjust pending_inline_info.
6760 (DEFARG_POINTER): Remove.
6761 (tag_types): Add typenames.
6762 (lookup_ualified_name): Declare.
6763 (lookup_name_real): Likewise.
6764 (shadow_tag): Adjust prototype.
6765 (get_scope_of_declarator): Declare it.
6766 (process_next_inline): Remove it.
6767 (check_for_missing_semicolon): Likewise.
6768 (maybe_get_template_decl_from_type_decl): Declare it.
6769 (finish_label_stmt): Adjust prototype.
6770 (finish_non_static_data_meber): Declare it.
6771 (finish_pseudo_destructor_call_expr): Rename to ...
6772 (finish_pseudo_destructor_expr): ... this.
6773 (finish_compound_literal): Declare it.
6774 (begin_inline_definitions): Remove it.
6775 (init_spew): Remove.
6776 (peekyylex): Likewise.
6777 (arbitrate_lookup): Likewise.
6778 (frob_opname): Likewise.
6779 (maybe_snarf_defarg): Likewise.
6780 (add_defarg_fn): Likewise.
6781 (do_pending_defargs): Likewise.
6782 (done_pending_defargs): Likewise.
6783 (unprocessed_defarg_fn): Likewise.
6784 (replace_defarg): Likewise.
6785 (end_input): Likewise.
6786 (get_overloaded_fn): Likewise.
6787 * cvt.c (convert_to_reference): Improve error handling.
6788 * decl.c (lookup_name_real): Do not declare it static.
6789 (maybe_push_to_top_level): Set check_access.
6790 (identifier_type_value): Adjust call to lookup_name_real.
6791 (lookup_qualified_name): New method.
6792 (lookup_name_real): Remove special-case parsing code.
6793 (lookup_name-nonclass): Adjust call to lookup_name_real.
6794 (lookup_name_namespace_only): Likewise.
6795 (lookup_name): Likewise.
6796 (check_tag_decl): Return the type declared.
6797 (shadow_tag): Likewise.
6798 (register_dtor_fn): Tweak check_access.
6799 (grokfndecl): Use constructor_name_p.
6800 (get_scope_of_declarator): New function.
6801 (grokdeclarator): Obscure tweaks for slightly different declarator
6802 representations.
6803 (start_method): Return error_mark_node to indicate failure.
6804 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6805 * decl2.c (constructor_name_full): Simplify.
6806 (constructor_name): Use it.
6807 (build_expr_from_tree): Adjust for changes to do new parser.
6808 (push_scope): Improve robustness.
6809 (validate_nonmember_using_decl): Process declarations, not names.
6810 (do_class_using_decl): Likewise.
6811 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6812 here.
6813 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6814 * expr.c (cxx_expand_expr): Handle BASELINKs.
6815 * init.c (member_init_ok_or_else): Issue more errors.
6816 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6817 * lex.c: Do not include parse.h.
6818 (yypring): Do not declare.
6819 (yylval): Likewise.
6820 (make_reference_declarator): Remove error-generating code.
6821 (rid_to_yy): Remove.
6822 (cxx_init): Do not call init_spew.
6823 (yypring): Remove.
6824 (check_for_missing_semicolon): Remove.
6825 * lex.h (got_scope): Remove.
6826 (got_object): Remove.
6827 * method.c (hack_identifier): Use finish_non_static_data_member.
6828 (implicitly_declare_fn): Adjust use of constructor_name.
6829 * parser.c: New file.
6830 * pt.c (parse.h): Do not include it.
6831 (maybe_get_template_decl_from_template): Do not declare it.
6832 (finish_member_template_decl): Tweak.
6833 (begin_explicit_instantiation): Adjust for
6834 processing_explicit_instantiation being boolean.
6835 (end_explicit_instantiation): Likewise.
6836 (maybe_process_partial_specialization): Tighten specialization
6837 test.
6838 (retrieve_local_specialization): Adjust ue of hash table.
6839 (eq_local_specializations): New function.
6840 (register_local_specialization): Likewise.
6841 (push_template_decl_real): Remove unnecessary test.
6842 (maybe_get_template_decl_from_type_decl): Don't make it static.
6843 (for_each_template_parm_r): Handle TYPEOF_TYPE.
6844 (tsubst_copy): Use retrieive_local_specialization to handle
6845 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
6846 Handle COMPONENT_REFs with pseudo-destructor-expressions.
6847 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6848 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6849 (unify): Tweak handling of CONST_DECLs.
6850 (regenerate_decl_from_template): Use push_nested_class.
6851 (template_for_substitution): New funciton.
6852 (instantiate_decl): Use it. Register parameters as local
6853 specializations.
6854 * rtti.c (init_rtti_processing): Set type_info_ref_type.
6855 (build_typeid): Use it.
6856 (get_typeid): Likeise.
6857 * search.c (accessible_p): Use check_access, not
6858 flag_access_control.
6859 (adjust_result_of_qualified_name_lookup): Pay attention to the
6860 context_class.
6861 * semantics.c (finish_asm_stmt): Adjust error handling.
6862 (finish_label_stmt): Return the statement.
6863 (finish_non_static_data_member): New function.
6864 (finish_class_expr): Handle BASELINKs.
6865 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6866 (finish_object_call_expr): Simplify handling during templates.
6867 (finish_pseudo_destructor_call_expr): Rename to ...
6868 (finish_pseudo_dtor_expr): ... this.
6869 (finish_compound_literal): New function.
6870 (begin_inline_definitions): Remove.
6871 (finish_sizeof): Remove special template handling.
6872 * spew.c: Do not include parse.h.
6873 * tree.c (get_overloaded_fn): Remove.
6874 * typeck.c (build_class_member_access_expr): Handle
6875 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
6876 (lookup_destructor): New function.
6877 (finish_class_member_access_expr): Use it.
6878 (convert_arguments): Simplify.
6879 (build_unary_op): Handle BASELINKs.
6880
6881 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
6882
6883 PR c++/4803
6884 * decl2.c (mark_used): Defer inline functions.
6885 (finish_file): Merge deferred_fns loops. Check all used
6886 inline functions have a definition.
6887 * method.c (make_thunk): Thunks are not inline.
6888
6889 PR c++/5116, c++/764
6890 * call.c (build_new_op): Make sure template class operands are
6891 instantiated.
6892
6893 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
6894
6895 PR C++/7964
6896 * cp-tree.h (resolve_scoped_fn_name): Prototype.
6897 * call.c (resolve_scoped_fn_name): New function. Deal with
6898 more template expansion. Broken out of ...
6899 * parse.y (parse_finish_call_expr): ... here. Call it.
6900 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6901 resolve_scoped_fn_name and build_call_from_tree.
6902
6903 PR c++/9053
6904 * decl.c (duplicate_decls): Templates may be disambiguated by
6905 return type.
6906
6907 PR c++/8702
6908 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6909 conversion operators on failure.
6910
6911 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6912
6913 Remove traditional C constructs 2/n.
6914 * call.c (tourney, build_field_call, equal_functions, joust,
6915 compare_ics, build_over_call, build_java_interface_fn_ref,
6916 convert_like_real, op_error, build_object_call, resolve_args,
6917 build_vfield_ref, check_dtor_name, build_scoped_method_call,
6918 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6919 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6920 standard_conversion, reference_related_p,
6921 reference_compatible_p, convert_class_to_reference,
6922 direct_reference_binding, reference_binding,
6923 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6924 add_template_conv_candidate, any_viable, any_strictly_viable,
6925 build_this, splice_viable, print_z_candidates,
6926 build_user_type_conversion, build_new_function_call,
6927 conditional_conversion, build_conditional_expr, build_new_op,
6928 build_op_delete_call, enforce_access, call_builtin_trap,
6929 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6930 convert_default_arg, type_passed_as, convert_for_arg_passing,
6931 in_charge_arg_for_name, is_properly_derived_from,
6932 maybe_handle_implicit_object, maybe_handle_ref_bind,
6933 source_type, add_warning, can_convert, can_convert_arg,
6934 perform_implicit_conversion, can_convert_arg_bad,
6935 initialize_reference, add_conv_candidate,
6936 add_template_candidate_real, add_template_candidate): Ansify.
6937
6938 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
6939
6940 PR c++/8572
6941 * cp-tree.h (grokoptypename): Add SCOPE parameter.
6942 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6943 if in a template scope.
6944 * parse.y (unoperator): Return the scope.
6945 (operator_name): Adjust grokoptypename call.
6946
6947 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6948
6949 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6950 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
6951 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6952
6953 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
6954
6955 * ChangeLog: Fix a typo.
6956 * class.c: Fix comment typos.
6957 * cp-tree.h: Likewise.
6958
6959 2002-12-18 Jason Merrill <jason@redhat.com>
6960
6961 Handle anonymous unions at the tree level.
6962 C++ ABI change: Mangle anonymous unions using the name of their
6963 first named field (by depth-first search). Should not cause
6964 binary compatibility problems, though, as the compiler previously
6965 didn't emit anything for affected unions.
6966 * cp-tree.def (ALIAS_DECL): New tree code.
6967 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
6968 first field, not the largest.
6969 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
6970 push the decl, and write it out at namespace scope.
6971 * decl.c (lookup_name_real): See through an ALIAS_DECL.
6972 (pushdecl): Add namespace bindings for ALIAS_DECLs.
6973 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6974 of a decl which doesn't have one.
6975 * typeck.c (build_class_member_access_expr): Don't recurse if
6976 we already have the type we want.
6977
6978 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6979
6980 PR c++/8099
6981 * friend.c (make_friend_class): Allow partial specialization
6982 when declaration is not a template friend.
6983
6984 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6985
6986 PR c++/3663
6987 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6988 TREE_PROTECTED to created decl nodes.
6989
6990 2002-12-18 Mark Mitchell <mark@codesourcery.com>
6991
6992 * class.c (build_base_field): Do not set DECL_PACKED on the
6993 FIELD_DECL.
6994
6995 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
6996
6997 * cp-tree.h (struct tree_srcloc): Use location_t.
6998 (SOURCE_LOCUS): New.
6999 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
7000
7001 2002-12-17 Jason Merrill <jason@redhat.com>
7002
7003 * decl.c (finish_function): Also complain about no return in
7004 templates.
7005 * semantics.c (finish_return_stmt): Also call check_return_expr in
7006 templates.
7007 * typeck.c (check_return_expr): In a template, just remember that we
7008 saw a return.
7009
7010 2002-12-16 Jason Merrill <jason@redhat.com>
7011
7012 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
7013 of the CALL_EXPR.
7014
7015 * semantics.c (do_pushlevel): Call pushlevel after adding the
7016 SCOPE_STMT.
7017 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
7018 * parse.y (function_body): Go back to using compstmt.
7019 * decl.c (pushdecl): Skip another level to get to the parms level.
7020
7021 * call.c (build_new_method_call): Use is_dummy_object to determine
7022 whether or not to evaluate the object parameter to a static member
7023 function.
7024
7025 2002-12-14 Jason Merrill <jason@redhat.com>
7026
7027 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
7028 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
7029 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
7030 don't bother with an AGGR_INIT_EXPR.
7031 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
7032 just generate a new decl normally. Take return slot parm.
7033 * cp-tree.h: Adjust prototype.
7034
7035 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
7036
7037 PR C++/8031
7038 * cvt.c (convert_to_pointer_force): Don't try comparing against
7039 erronous type.
7040
7041 2002-12-13 Geoffrey Keating <geoffk@apple.com>
7042
7043 * cp-tree.h: Have the multiple-include guards around
7044 the entire file.
7045
7046 2002-12-10 David Edelsohn <edelsohn@gnu.org>
7047
7048 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
7049 for SPEW_DEBUG.
7050 (snarf_method): Same.
7051 (snarf_defarg): Same.
7052
7053 2002-12-10 Mark Mitchell <mark@codesourcery.com>
7054
7055 PR c++/8372
7056 * pt.c (tsubst_copy): Handle destructor names more correctly.
7057
7058 2002-12-10 Matt Austern <austern@apple.com>
7059
7060 * cp-tree.h: get rid of needs_virtual_reinit bit.
7061
7062 2002-12-09 Mark Mitchell <mark@codesourcery.com>
7063
7064 * NEWS: Document removal of in-class initialization extension for
7065 static data members of non-arithmetic, non-enumeration type.
7066 * decl.c (check_static_variable_definition): Do not allow that
7067 extension.
7068 * decl2.c (grokfield): Do not call digest_init when processing
7069 templates.
7070
7071 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7072
7073 * error.c (dump_expr): Fix format specifier warning.
7074
7075 2002-12-04 Geoffrey Keating <geoffk@apple.com>
7076
7077 * class.c (finish_struct_1): Correct comment.
7078 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
7079
7080 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7081
7082 PR C++/8799
7083 * error.c (dump_expr): Don't ever try to dump a non-existent
7084 expression.
7085
7086 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
7087
7088 Implement covariant returns.
7089 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
7090 (struct lang_decl_flags): Add this_thunk_p flag.
7091 Rename vcall_offset to virtual_offset.
7092 (struct lang_decl): Rename delta to fixed_offset.
7093 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
7094 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
7095 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
7096 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
7097 (make_thunk): Add this_adjusting arg.
7098 (finish_thunk): Declare.
7099 (mangle_thunk): Add this_adjusting arg.
7100 * class.c (get_vcall_index): Use base function for lookup.
7101 (update_vtable_entry_for_fn): Generate covariant thunk.
7102 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
7103 (build_vtbl_initializer): Use base function for lookup.
7104 Finish covariant thunk here. Adjust thunk generation.
7105 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
7106 Adjust thunk dumping.
7107 * mangle.c (mangle_call_offset): New function.
7108 (mangle_thunk): Adjust for covariant thunks.
7109 * method.c (make_thunk): Adjust. Do not set name here.
7110 (finish_thunk): New function. Set name here.
7111 (use_thunk): Generate covariant thunks too.
7112 (thunk_adjust): New function.
7113 * search.c (covariant_return_p): Remove. Fold into ...
7114 (check_final_overrider): ... here. Simplify.
7115 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7116
7117 2002-12-03 Jason Merrill <jason@redhat.com>
7118
7119 PR c++/8674
7120 * call.c (build_over_call): Check specifically for TARGET_EXPR
7121 when eliding.
7122
7123 PR c++/8461, c++/8625
7124 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7125 (cp_convert_parm_for_inlining): Remove.
7126 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7127 Remove.
7128 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7129 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7130
7131 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7132 an ambiguous conversion.
7133
7134 2002-12-03 Mark Mitchell <mark@codesourcery.com>
7135
7136 PR c++/8688
7137 * decl.c (reshape_init): Handle erroneous initializers.
7138
7139 2002-12-02 Mark Mitchell <mark@codesourcery.com>
7140
7141 PR c++/8720
7142 * spew.c (remove_last_token): Make sure that last_chunk is set
7143 correctly.
7144
7145 PR c++/8615
7146 * error.c (dump_expr): Handle character constants with
7147 TREE_OVERFLOW set.
7148
7149 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7150
7151 DR 180
7152 * decl.c (grokdeclarator): Require class-key for all friend class.
7153 Output the correct type and context in the error message.
7154
7155 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7156
7157 PR c++/5919
7158 * pt.c (unify): Use variably_modified_type_p to test validity of
7159 template argument types.
7160
7161 PR c++/8727
7162 * cp-tree.h (lang_type_class): Add typeinfo_var.
7163 (CLASSTYPE_TYPEINFO_VAR): New macro.
7164 * rtti.c (get_tinfo_decl): Use it.
7165
7166 PR c++/8663
7167 * init.c (expand_member_init): Always get the main variant of a
7168 base class.
7169
7170 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7171
7172 PR c++/8332
7173 PR c++/8493
7174 * decl.c (cxx_init_decl_processing): Use size_type_node, not
7175 c_size_type_node.
7176 * decl2.c (coerce_new_type): Likewise.
7177 * except.c (do_allocate_exception): Likewise.
7178
7179 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7180
7181 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7182 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7183 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7184 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7185 typeck2.c: Include coretypes.h and tm.h.
7186 * Make-lang.in: Update dependencies.
7187
7188 2002-11-30 Mark Mitchell <mark@codesourcery.com>
7189
7190 PR c++/8227
7191 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7192 (check_initializer): Validate the type of the initialized
7193 variable, even if the initializer is absent.
7194 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7195
7196 PR c++/8214
7197 * typeck.c (convert_for_assignment): Do not use
7198 decl_constant_value on the operand.
7199
7200 PR c++/8511
7201 * pt.c (instantiate_decl): Handle template friends defined outside
7202 of the class correctly.
7203
7204 2002-11-29 Joe Buck <jbuck@synopsys.com>
7205
7206 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7207 anonymous structs.
7208
7209 2002-11-29 Mark Mitchell <mark@codesourcery.com>
7210
7211 * class.c (walk_subobject_offsets): Recur on binfos as well as on
7212 types.
7213 (layout_nonempty_base_or_field): Pass it a binfo when processing a
7214 base class.
7215 (layout_empty_base): Likewise.
7216 (build_base_field): Likewise.
7217
7218 2002-11-27 Mark Mitchell <mark@codesourcery.com>
7219
7220 * class.c (build_base_field): Make sure we get the canonical base
7221 when descending through primary bases.
7222
7223 2002-11-26 Geoffrey Keating <geoffk@apple.com>
7224
7225 * decl.c (check_initializer): Don't error on initialisation of
7226 a scalar with a brace-enclosed expression.
7227
7228 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
7229
7230 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7231 (template_parms_equal): Remove prototype.
7232 * typeck.c (buuld_indirect_ref): Reformat.
7233
7234 2002-11-25 Jason Merrill <jason@redhat.com>
7235
7236 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7237 and a DO_STMT.
7238
7239 2002-11-25 Mark Mitchell <mark@codesourcery.com>
7240
7241 * tree.c (cp_build_qualified_type_real): Correct handling of
7242 array types.
7243 * class.c (walk_subobject_offsets): Fix thinko.
7244 (build_base_field): Record offsets of empty bases in primary
7245 virtual bases.
7246 (layout_class_type): Record offsets of empty bases in fields.
7247
7248 * search.c (is_subobject_of_p_1): Fix thinko.
7249 (lookup_field_queue_p): Likewise.
7250
7251 2002-11-24 Mark Mitchell <mark@codesourcery.com>
7252
7253 * class.c (layout_class_type): Reuse tail padding when laying out
7254 virtual bases.
7255
7256 2002-11-22 Mark Mitchell <mark@codesourcery.com>
7257
7258 * rtti.c (qualifier_flags): Fix thinko.
7259
7260 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7261
7262 Remove traditional C constructs 1/n.
7263 * cp-tree.h (init_method, set_mangled_name_for_decl,
7264 build_opfncall, hack_identifier, make_thunk, use_thunk,
7265 synthesize_method, implicitly_declare_fn,
7266 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7267 maybe_clone_body): Remove use of PARAMS.
7268
7269 * method.c (do_build_assign_ref, do_build_copy_constructor,
7270 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7271 Likewise.
7272 (synthesize_method): Use 'bool' type and constants instead of
7273 'int'.
7274 (locate_copy): Likewise.
7275 (implicitly_declare_fn): Likewise.
7276
7277 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7278 Remove old-style declaration.
7279 (maybe_clone_body): Use 'bool' type and constants.
7280
7281 2002-11-21 Glen Nakamura <glen@imodulo.com>
7282
7283 PR c++/8342
7284 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7285 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7286 of the branches of a COND_EXPR.
7287
7288 2002-11-19 Mark Mitchell <mark@codesourcery.com>
7289
7290 * pt.c (for_each_template_parm): Free allocated memory.
7291 * search.c (is_subobject_of_p_1): New function.
7292 (is_subobject_of_p): Avoid walking virtual bases multiple times.
7293
7294 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7295
7296 * g++spec.c (lang_specific_spec_functions): New.
7297
7298 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
7299
7300 * ChangeLog: Follow spelling conventions.
7301 * class.c: Likewise.
7302 * decl2.c: Likewise.
7303
7304 2002-11-14 Zack Weinberg <zack@codesourcery.com>
7305
7306 * search.c (dfs_push_decls): Do not try to reorder elements
7307 3..n of method_vec if method_vec has only two elements.
7308 Reverse order of two tests to avoid accessing unallocated
7309 memory.
7310
7311 2002-11-14 Mark Mitchell <mark@codesourcery.com>
7312
7313 * class.c (dfs_find_final_overrider): Adjust so that the most
7314 derived object is a binfo, rather than a class type.
7315 (find_final_overrider): Likewise.
7316 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7317 (add_vcall_offset): Likewise.
7318
7319 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7320
7321 PR c++/8389
7322 * pt.c (instantiate_template): Push class scope for member
7323 functions.
7324 (get_mostly_instantiated_function_type): Likewise. Don't call
7325 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
7326 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7327 * mangle.c (write_encoding, write_unqualified_name): Adjust.
7328
7329 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7330
7331 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7332 vcall offfsets. Split out ...
7333 (add_vcall_offset): ... new function.
7334
7335 PR c++/8338
7336 * pt.c (for_each_template_parm): Add htab parameter.
7337 (process_partial_specialization): Adjust call.
7338 (push_template_decl_real): Likewise.
7339 (pair_fn_data): Add visited.
7340 (for_each_template_parm_r): Avoid walking duplicates more than
7341 once.
7342 (uses_template_parms): Adjust call to for_each_template_parm.
7343
7344 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7345
7346 * class.c (add_implicitly_declared_members): Put implicitly
7347 declared functions at the end of TYPE_METHODs when -fabi-version
7348 is at least 2.
7349
7350 2002-11-05 Geoffrey Keating <geoffk@apple.com>
7351
7352 * decl2.c (finish_file): Correct spelling.
7353
7354 2002-11-03 Mark Mitchell <mark@codesourcery.com>
7355
7356 * call.c (build_special_member_call): Do not try to lookup VTTs by
7357 name.
7358 * class.c (vtbl_init_data): Add generate_vcall_entries.
7359 (get_vtable_decl): Do not look up virtual tables by name.
7360 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7361 (set_primary_base): Do not set CLASSTYPE_RTTI.
7362 (determine_primary_base): Likewise.
7363 (get_matching_virtual): Remove.
7364 (get_vcall_index): New function.
7365 (update_vtable_entry_for_fn): Do not try to use virtual thunks
7366 when they are not required. Assign vcall indices at this point.
7367 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7368 Do update dynamic_classes.
7369 (build_vtt): Do not add VTTs to the symbol table.
7370 (build_ctor_vtbl_group): Likewise.
7371 (build_vtbl_initializer): Simplify handling of vcall indices.
7372 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7373 for the most derived class.
7374 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7375 the vtable.
7376 * cp-tree.h (dynamic_classes): New macro.
7377 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
7378 (CLASSTYPE_RTTI): Remove.
7379 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7380 (CLASSTYPE_VCALL_INDICES): New macro.
7381 (CLASSTYPE_VTABLES): Likewise.
7382 (BV_USE_VCALL_INDEX_P): Remove.
7383 (build_vtable_path): Remove.
7384 * decl2.c (finish_vtable_vardecl): Remove.
7385 (key_method): Remove #if 0'd code.
7386 (finish_vtable_vardecl): Rename to ...
7387 (maybe_emit_vtables): ... this.
7388 (finish_file): Use it.
7389 * search.c (look_for_overrides_here): Update comment.
7390
7391 2002-11-01 Zack Weinberg <zack@codesourcery.com>
7392
7393 PR c/7353 redux
7394 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7395
7396 2002-10-30 Jason Merrill <jason@redhat.com>
7397
7398 PR c++/8186
7399 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7400 * call.c (convert_for_arg_passing): Set it.
7401 * except.c (stabilize_throw_expr): Recurse for such an arg.
7402
7403 2002-10-31 Mark Mitchell <mark@codesourcery.com>
7404
7405 * cp-tree.h (lang_decl_flags): Remove init_priority.
7406 (lang_decl): Add delta.
7407 (GLOBAL_INIT_PRIORITY): Remove.
7408 (THUNK_DELTA): Revise definition.
7409 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7410 * dump.c (cp_dump_tree): Don't dump it.
7411
7412 2002-10-30 Mark Mitchell <mark@codesourcery.com>
7413
7414 PR c++/8160
7415 * typeck2.c (process_init_constructor): Call complete_array_type.
7416
7417 PR c++/8149
7418 * decl.c (make_typename_type): Issue errors about invalid results.
7419
7420 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7421
7422 Core issue 287, PR c++/7639
7423 * cp-tree.h (lang_type_class): Add decl_list field.
7424 (CLASSTYPE_DECL_LIST): New macro.
7425 (maybe_add_class_template_decl_list): Add declaration.
7426 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7427 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7428 (maybe_add_class_template_decl_list): New function.
7429 (add_implicitly_declared_members): Use it.
7430 * decl.c (maybe_process_template_type_declaration): Likewise.
7431 (pushtag): Likewise.
7432 * friend.c (add_friend): Likewise.
7433 (make_friend_class): Likewise.
7434 * semantics.c (finish_member_declaration): Likewise.
7435 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7436 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7437 to process members and friends in the order of declaration.
7438
7439 2002-10-29 Mark Mitchell <mark@codesourcery.com>
7440
7441 PR c++/8287
7442 * decl.c (finish_destructor_body): Create the label to jump to
7443 when returning from a destructor here.
7444 (finish_function_body): Rather than here.
7445
7446 2002-10-25 Zack Weinberg <zack@codesourcery.com>
7447
7448 PR c++/7266
7449 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7450 SCOPE_REF is not null before dereferencing it.
7451
7452 2002-10-25 Mark Mitchell <mark@codesourcery.com>
7453
7454 * call.c (build_over_call): Use DECL_CONTEXT, not
7455 DECL_VIRTUAL_CONTEXT.
7456 * class.c (modify_vtable_entry): Don't mess with
7457 DECL_VIRTUAL_CONTEXT.
7458 (set_vindex): Remove.
7459 (set_primary_base): Remove vfuns_p parameter.
7460 (determine_primary_base): Likewise.
7461 (modify_all_vtables): Likewise.
7462 (layout_class_type): Likewise. Adjust calls to other functions
7463 accordingly.
7464 (finish_struct_1): Adjust calls to modified functions. Set
7465 DECL_VINDEX here.
7466 * cp-tree.h (lang_type_class): Remove vsize.
7467 (CLASSTYPE_VSIZE): Remove.
7468 (lang_decl): Remove thunks.
7469 (DECL_THUNKS): Adjust.
7470 (DECL_VIRTUAL_CONTEXT): Remove.
7471 (duplicate_decls): Don't copy it.
7472 * pt.c (build_template_decl): Don't set it.
7473 (tsubst_decl): Likewise.
7474 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7475
7476 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7477 (build_vtable_entry): Remove.
7478 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7479 (lang_decl): Add thunks.
7480 (DECL_THUNKS): New macro.
7481 * decl.c (duplicate_decls): Copy it.
7482 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7483 * semantics.c (emit_associated_thunks): Simplify.
7484
7485 2002-10-24 David Edelsohn <edelsohn@gnu.org>
7486
7487 PR c++/7228
7488 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7489 lang_type structure exists before accessing field.
7490 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7491 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7492 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7493 * class.c (check_field_decls): Use new macros.
7494 * typeck2.c (process_init_constructor): Remove redundant check for
7495 existence of lang_type structure.
7496
7497 2002-10-24 Mark Mitchell <mark@codesourcery.com>
7498
7499 * class.c (end_of_base): New method.
7500 (end_of_class): Use it. Check indirect virtual bases.
7501
7502 * class.c (check_field_decls): Fix typo.
7503
7504 2002-10-23 Mark Mitchell <mark@codesourcery.com>
7505
7506 PR c++/8067
7507 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7508 related variables.
7509
7510 PR c++/7679
7511 * spew.c (next_token): Do not return an endless stream of
7512 END_OF_SAVED_INPUT tokens.
7513 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7514 the cached token stream.
7515 (snarf_defarg): Likewise.
7516
7517 2002-10-23 Zack Weinberg <zack@codesourcery.com>
7518
7519 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7520 variably_modified_type_p.
7521 * cp-tree.h: Remove prototype of variably_modified_type_p.
7522 * tree.c (variably_modified_type_p): Remove; now implemented
7523 in language-independent code.
7524
7525 2002-10-22 Mark Mitchell <mark@codesourcery.com>
7526
7527 PR c++/6579
7528 * spew.c (snarf_parenthesized_expression): New function.
7529 (snarf_block): Use it.
7530
7531 2002-10-22 Richard Henderson <rth@redhat.com>
7532
7533 * method.c (use_thunk): Always compute vcall_value; assert that
7534 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
7535 for vcall thunks as well.
7536
7537 2002-10-21 Mark Mitchell <mark@codesourcery.com>
7538
7539 * class.c (empty_base_at_nonzero_offset_p): New function.
7540 (layout_nonempty_base_or_field): Do not check for conflicts when
7541 laying out a virtual base using the GCC 3.2 ABI.
7542 (build_base_field): Correct checking for presence of empty classes
7543 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7544
7545 * class.c (include_empty_classes): Use normalize_rli.
7546 (layout_class_type): Likewise.
7547
7548 * decl.c (reshape_init): Tweak handling of character arrays.
7549
7550 PR c++/8218
7551 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7552 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7553 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7554 (check_field_decls): Likewise.
7555 (layout_class_type): Likewise.
7556 (finish_struct_1): Initialize it.
7557 (walk_subobject_offsets): Use it to prune searches.
7558
7559 2002-10-20 Mark Mitchell <mark@codesourcery.com>
7560
7561 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7562 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7563 TARGET_ASM_OUTPUT_MI_THUNK in comments.
7564
7565 2002-10-18 Zack Weinberg <zack@codesourcery.com>
7566
7567 * decl.c (start_decl): Point users of the old initialized-
7568 typedef extension at __typeof__.
7569
7570 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7571
7572 * Make-lang.in (method.o): Depend on TARGET_H.
7573 * method.c (target.h): Include it.
7574 (use_thunk): Use target hooks. Use vcall thunks, if available.
7575
7576 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7577
7578 * class.c (base_derived_from): Make sure return value is a bool.
7579
7580 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7581
7582 * class.c (find_final_overrider_data_s): Remove overriding_fn and
7583 overriding_base.
7584 (dfs_base_derived_from): New function.
7585 (base_derived_from): Likewise.
7586 (dfs_find_final_overrider): Use base_derived_from.
7587 (find_final_overrider): Adjust.
7588
7589 2002-10-18 Jason Merrill <jason@redhat.com>
7590
7591 PR c++/8080
7592 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7593 with condition decls in a template.
7594
7595 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
7596
7597 * class.c (add_method): Compare template parms too.
7598
7599 2002-10-17 Mark Mitchell <mark@codesourcery.com>
7600
7601 PR c++/7584
7602 * class.c (handle_using_decl): Allow the declaration used to be
7603 from an ambiguous base.
7604
7605 * pt.c (convert_template_argument): Revert this change:
7606 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7607 * pt.c (convert_template_argument): Do not fold non-type
7608 template rguments when inside a template.
7609
7610 * init.c (expand_default_init): Handle brace-enclosed initializers
7611 correctly.
7612
7613 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7614
7615 * mangle.c (write_expression): Correct handling of enumeration
7616 constants.
7617 (write_template_arg): Likewise.
7618 * pt.c (convert_template_argument): Do not fold non-type template
7619 arguments when inside a template.
7620
7621 PR c++/7478
7622 * cvt.c (convert_to_reference): Allow references as the incoming
7623 type.
7624
7625 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7626
7627 PR c++/7524
7628 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7629 build_qualified_type.
7630
7631 2002-10-15 Richard Henderson <rth@redhat.com>
7632
7633 * error.c (dump_expr): Use real_to_decimal directly, and with
7634 the new arguments.
7635
7636 2002-10-15 Mark Mitchell <mark@codesourcery.com>
7637
7638 * decl.c (reshape_init): Fix typo.
7639
7640 * cp-tree.h (operator_name_info_t): Add arity.
7641 * lex.c (init_operators): Initialize it.
7642 * mangle.c (write_conversion_operator_name): New function.
7643 (write_unqualified_name): Use it.
7644 (write_template_args): Accept template arguments as a TREE_LIST.
7645 (write_expression): Adjust handling of qualified names to match
7646 specification.
7647
7648 2002-10-15 Jason Merrill <jason@redhat.com>
7649
7650 * call.c (call_builtin_trap): New fn.
7651 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
7652 (build_call): Don't set current_function_returns_abnormally outside
7653 a function.
7654
7655 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7656
7657 * class.c (check_field_decls): Remove empty_p parameter. Instead,
7658 clear CLASSTYPE_EMPTY_P.
7659 (build_base_field): Likewise.
7660 (build_base_fields): Likewise.
7661 (check_bases_and_members): Likewise.
7662 (create_vtbl_ptr): Likewise.
7663 (layout_class_type): Likewise. Ensure that empty classes have
7664 size zero when used as base classes in the 3.2 ABI.
7665 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7666 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
7667 parameter.
7668 (is_empty_class): Correct definition when using post-3.2 ABI.
7669 * cp-tree.h (lang_type_class): Add empty_p.
7670 (CLASSTYPE_EMPTY_P): New macro.
7671
7672 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
7673
7674 * init.c (build_delete): Do not apply save_expr for arrays.
7675 (build_vec_delete): Likewise.
7676
7677 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7678
7679 * decl.c (layout_var_decl): Call layout_decl even for variables
7680 whose type is an array with unspecified bounds.
7681
7682 PR c++/7176
7683 * lex.c (do_identifier): Add another option for the parsing
7684 parameter.
7685 * parse.y (do_id): Use it.
7686
7687 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
7688
7689 PRs C++/6803, C++/7721 and C++/7803
7690 * decl.c (grokdeclarator): Gracefully handle template-name as
7691 decl-specifier.
7692
7693 2002-10-11 Jason Molenda <jmolenda@apple.com>
7694
7695 * init.c (build_field_list): Provide uses_unions_p with a default
7696 value.
7697
7698 2002-10-11 Mark Mitchell <mark@codesourcery.com>
7699
7700 PR c++/5661
7701 * cp-tree.h (variably_modified_type_p): New function.
7702 (grokdeclarator) Tighten check for variably modified types as
7703 fields.
7704 * pt.c (convert_template_argument): Do not allow variably modified
7705 types as template arguments.
7706 * tree.c (variably_modified_type_p): New function.
7707
7708 * NEWS: Document removal of "new X = ..." extension.
7709 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7710 brace-enclosed initializers.
7711 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7712 (initialize_local_var): Remove declaration.
7713 (expand_static_init): Likewise.
7714 * decl.c (next_initializable_field): New function.
7715 (reshape_init): Likewise.
7716 (check_initializer): Use them. Build dynamic initializer for
7717 aggregates here too.
7718 (initialize_local_var): Simplify, and incorporate cleanup
7719 insertion code as well.
7720 (destroy_local_var): Remove.
7721 (cp_finish_decl): Tidy.
7722 (expand_static_init): Fold checks for whether or not a variable
7723 needs initialization into this function. Simplify.
7724 * decl2.c (do_static_initialization): Simplify.
7725 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7726 be done for us automatically.
7727 (expand_default_init): Handle brace-enclosed initializers
7728 correctly.
7729 (expand_aggr_init_1): Remove RTL-generation code.
7730 (build_vec_init): Remove "new X = ..." support.
7731 * parse.y (new_initializer): Likewise.
7732 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7733 brace-enclosed initializer.
7734 (create_pseudo_type_info): Likewise.
7735 * typeck2.c (store_init_value): Don't try to handle digest_init
7736 being called more than once.
7737 (digest_init): Tidy handling of brace-enclosed initializers.
7738
7739 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7740
7741 * decl.c (typename_hash): Use htab_hash_pointer.
7742
7743 2002-10-10 Jim Wilson <wilson@redhat.com>
7744
7745 * decl.c (duplicate_decls): Don't call decl_attributes.
7746
7747 2002-10-09 Zack Weinberg <zack@codesourcery.com>
7748
7749 PR c/7353
7750 * decl.c (start_decl): Unconditionally issue error for
7751 'typedef foo = bar'.
7752 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7753 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7754
7755 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7756
7757 * decl2.c (prune_vtable_vardecl): Delete unused function.
7758
7759 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7760
7761 PR c++/7754
7762 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7763 procesing template functions.
7764 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7765 type. Call layout_decl.
7766 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7767
7768 2002-10-07 Richard Henderson <rth@redhat.com>
7769
7770 * decl2.c, pt.c: Revert c++/7754 fix.
7771
7772 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7773
7774 PR c++/7804
7775 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7776
7777 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7778
7779 PR c++/7931
7780 * pt.c (for_each_template_parm_r): Handle BASELINKs.
7781
7782 PR c++/7754
7783 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7784 procesing template functions.
7785 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7786 type. Call layout_decl.
7787 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7788
7789 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7790
7791 PR c++/8006
7792 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7793 template parameters.
7794 (globals): Add entity and need_abi_warning.
7795 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7796 CLASSTYPE_TEMPLATE_INFO.
7797 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7798 TYPE_TI_TEMPLATE.
7799 (write_prefix): Handle typename types correctly.
7800 (write_template_prefix): Handle template template parameters
7801 correctly.
7802 (start_mangling): Add entity parameter.
7803 (finish_mangling): Warn about names whose mangling will change.
7804 (mangle_decl_string): Adjust.
7805 (mangle_type_string): Likewise.
7806 (mangle_special_for_type): Likewise.
7807 (mangle_ctor_vtbl_for_type): Likewise.
7808 (mangle_thunk): Likewise.
7809 (mangle_guard_variable): Likewise.
7810 (mangle_ref_init_variable): Likewise.
7811
7812 2002-10-02 Mark Mitchell <mark@codesourcery.com>
7813
7814 PR c++/7188.
7815 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7816 * cp-tree.h (emit_base_init): Rename to ....
7817 (emit_mem_initializers): ... this.
7818 (expand_member_init): Change prototype.
7819 * init.c (perform_member_init): Compute explicit, rather than
7820 requiring it as a parameter.
7821 (sort_member_init): Rename to ...
7822 (sort_mem_initializers): ... this. Process bases and data members
7823 together.
7824 (sort_base_init): Remove.
7825 (emit_base_init): Rename to ...
7826 (emit_mem_initializers): ... this.
7827 (expand_aggr_vbase_init_1): Remove.
7828 (construct_virtual_bases): Rename to ...
7829 (construct_virtual_base): ... this.
7830 (expand_member_init): Rework handling of base initializers.
7831 * method.c (do_build_copy_constructor): Use
7832 finish_mem_initializers.
7833 * parse.y (member_init): Adjust calls to expand_member_init.
7834 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7835 (tsubst_initializer_list): Use expand_member_init.
7836 * semantics.c (finish_mem_intiailizers): Simplify.
7837
7838 2002-10-02 Matt Austern <austern@apple.com>
7839 * decl.c (walk_vtables_r): Fixed typo that caused result to
7840 never get a nonzero value.
7841
7842 2002-10-02 Roger Sayle <roger@eyesopen.com>
7843
7844 PR optimization/6627
7845 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7846 from here, and move it to tree.h.
7847 * decl.c (cxx_init_decl_processing): If storing the vbit
7848 in function pointers, ensure that force_align_functions_log
7849 is atleast one.
7850
7851 2002-10-02 Matt Austern <austern@apple.com>
7852
7853 * class.c (check_field_decls): Changed warning about const member
7854 variables so that it doesn't get issued for a class aggregate.
7855
7856 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7857
7858 * decl.c (cp_finish_decl): Make sure array types are laid out,
7859 even if the array bounds are unknown.
7860
7861 2002-10-01 Steve Ellcey <sje@cup.hp.com>
7862
7863 * class.c (build_vtbl_initializer): Change build_c_cast
7864 to build1.
7865
7866 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7867
7868 * decl.c (cp_finish_decl): Make sure array types are laid out,
7869 even if the array bounds are unknown.
7870
7871 * decl.c (cp_finish_decl): Correct check for dynamic
7872 initialization of thread-local storage.
7873
7874 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
7875
7876 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7877 overloaded.
7878
7879 2002-09-30 Steve Ellcey <sje@cup.hp.com>
7880
7881 * class.c (build_vtbl_initializer): Add cast.
7882 (add_vcall_offset_vtbl_entries_1):
7883 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7884
7885 2002-09-30 Mark Mitchell <mark@codesourcery.com>
7886
7887 * class.c (walk_subobject_offsets): Correct the calculation of
7888 offsets for virtual bases. Correct the counting of array
7889 elements.
7890 (layout_nonempty_base_or_field): Simplify. Correct the
7891 calculation of offsets to be propagated through the binfo
7892 hierarchy.
7893 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7894 Add the FIELD_DECL to TYPE_FIELDS.
7895 (build_base_fields): Adjust accordingly.
7896 (layout_virtual_bases): Use build_base_field.
7897 (end_of_class): Return a tree, not an integer.
7898 (warn_about_ambiguous_direct_bases): Rename to ...
7899 (warn_about_ambiguous_bases): ... this.
7900 (include_empty_classes): New function.
7901 (layout_class_type): Create an alternative version of the type to
7902 be used when as a base class type. Do not call
7903 finish_record_layout until we are done laying out the class.
7904 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
7905 as_base.
7906 (CLASSTYPE_SIZE): Reimplement.
7907 (CLASSTYPE_SIZE_UNIT): Likewise.
7908 (CLASSTYPE_ALIGN): Likweise.
7909 (CLASSTYPE_USER_ALIGN): Likewise.
7910 (CLASSTYPE_AS_BASE): New macro.
7911 (DECL_INITIALIZED_P): Likewise.
7912 (extract_init): Remove prototype.
7913 (build_forced_zero_init): Rename to ...
7914 (build_zero_init): ... this.
7915 (force_store_init_value): Remove.
7916 * decl.c (obscure_complex_init): Remove.
7917 (duplicate_decls): Copy DECL_INITIALIZED_P.
7918 (check_initializer): Do not leave junk in DECL_INITIAL.
7919 (cp_finish_decl): Handle zero-initialization of entities with
7920 static storage duration.
7921 * expr.c (extract_init): Remove.
7922 * init.c (build_forced_zero_init): Remove.
7923 (build_zero_init): New function.
7924 (build_default_init): Use it.
7925 (build_field_list): Skip FIELD_DECLs for base subobjects.
7926 (push_base_cleanups): Likewise.
7927 * method.c (do_build_assign_ref): Likewise.
7928 (synthesize_exception_spec): Likewise.
7929 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7930 (regenerate_decl_from_template): To not set DECL_INITIAL for a
7931 static data member whose initialization took place in its class.
7932 (instantiate_decl): Do not pass an initializer to cp_finish_decl
7933 in that situation.
7934 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7935 (dfs_unuse_fields): Likewise.
7936 * tree.c (pod_type_p): Handle error_mark_node.
7937 (zero_init_p): Likewise.
7938 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7939 subobjects.
7940 * typeck2.c (store_init_value): Remove #if 0'd code.
7941 (force_store_init_value): Remove.
7942 (process_init_constructor): Use build_zero_init.
7943
7944 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
7945
7946 PR c++/7788
7947 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7948
7949 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
7950
7951 * cp-tree.h: Fix comment typos.
7952 * decl.c: Likewise.
7953 * pt.c: Likewise.
7954
7955 2002-09-25 Mark Mitchell <mark@codesourcery.com>
7956
7957 * cp/class.c (contains_empty_class_p): New method.
7958 (walk_subobject_offsets): Correct computation of field offset.
7959 (layout_empty_base): Correct placement of emtpy base classes.
7960 (layout_class_type): Warn about ABI changes.
7961
7962 2002-09-23 Mark Mitchell <mark@codesourcery.com>
7963
7964 * cp/class.c (layout_virtual_bases): Do not round the size of the
7965 type to a multiple of the alignment before laying out virtual bases.
7966 (layout_class_type): Correct handling of bit-fields that are wider
7967 than their type inside unions. Round the size of the type to a
7968 even number of bytes when computing the size without virtual
7969 bases.
7970 * cp/cp-tree.h (abi_version_at_least): New macro.
7971
7972 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
7973
7974 * ChangeLog: Follow spelling conventions.
7975 * ChangeLog.2: Likewise.
7976 * call.c: Likewise.
7977 * class.c: Likewise.
7978 * cp-tree.h: Likewise.
7979 * cvt.c: Likewise.
7980 * decl.c: Likewise.
7981 * decl2.c: Likewise.
7982 * except.c: Likewise.
7983 * friend.c: Likewise.
7984 * g++spec.c: Likewise.
7985 * init.c: Likewise.
7986 * lex.c: Likewise.
7987 * mangle.c: Likewise.
7988 * method.c: Likewise.
7989 * operators.def: Likewise.
7990 * optimize.c: Likewise.
7991 * pt.c: Likewise.
7992 * rtti.c: Likewise.
7993 * search.c: Likewise.
7994 * semantics.c: Likewise.
7995 * spew.c: Likewise.
7996 * tree.c: Likewise.
7997 * typeck.c: Likewise.
7998
7999 2002-09-18 Devang Patel <dpatel@apple.com>
8000
8001 * cp/cp-tree.h: New prototype for walk_vtabls().
8002 * cp/decl.c (walk_vtables_r): New function.
8003 (struct cp_binding_level): Add new members, namespaces,
8004 names_size and vtables.
8005 (add_decl_to_level): Add decl in namespaces or vtables
8006 chain, if conditions match.
8007 (walk_vtables): New function.
8008 (walk_namespaces_r): Travers separate namespace chain
8009 for namespace decls.
8010 (wrapup_globals_for_namespace): Use names_size instead
8011 of list_length().
8012 * cp/decl2.c (finish_file): Use walk_vtables() instead of
8013 walk_globals() to walk vtable decls.
8014
8015 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
8016
8017 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
8018 ICE with invalid pointers & references.
8019
8020 2002-09-17 Zack Weinberg <zack@codesourcery.com>
8021
8022 * Make-lang.in: Remove all references to the demangler.
8023 * cxxfilt.c: Moved to binutils.
8024
8025 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8026
8027 PR c++/7718
8028 * pt.c (tsubst_decl): Remove assert.
8029
8030 Remove DR 295 implementation.
8031 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
8032 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
8033 about ignoring volatile qualifiers.
8034
8035 * search.c (lookup_member): Correct documentation.
8036
8037 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8038
8039 * cp-tree.h (union lang_tree_node): Add chain_next option.
8040
8041 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8042
8043 * parse.y (parse_finish_call_expr): Check lookup_member result.
8044
8045 PR c++/7015
8046 * semantic.c (finish_asm_stmt): Fix operand/output_operands
8047 thinko.
8048 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
8049
8050 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
8051
8052 PR c++/7919
8053 * call.c (build_over_call): Convert this pointer for fns found by
8054 using decls.
8055
8056 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8057
8058 * ChangeLog: Follow spelling conventions.
8059 * ChangeLog.1: Likewise.
8060
8061 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
8062
8063 PR c++/7768
8064 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
8065
8066 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
8067
8068 * error.c: Fix comment formatting.
8069 * except.c: Likewise.
8070 * expr.c: Likewise.
8071 * friend.c: Likewise.
8072 * g++spec.c: Likewise.
8073 * init.c: Likewise.
8074 * lex.c: Likewise.
8075 * mangle.c: Likewise.
8076 * method.c: Likewise.
8077 * optimize.c: Likewise.
8078 * pt.c: Likewise.
8079 * rtti.c: Likewise.
8080 * search.c: Likewise.
8081 * semantics.c: Likewise.
8082 * spew.c: Likewise.
8083 * tree.c: Likewise.
8084 * typeck.c: Likewise.
8085 * typeck2.c: Likewise.
8086
8087 2002-09-13 Matt Austern <austern@apple.com>
8088
8089 PR C++/7828
8090 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
8091 * cp/call.c: Change call-by-const-reference mechanism to use
8092 non_cast_lvalue_p when deciding whether the create a temporary.
8093 We need a temporary when passing, e.g. (long) x by const ref.
8094
8095 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
8096
8097 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
8098
8099 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
8100
8101 * decl.c: Fix comment formatting.
8102 * decl2.c: Likewise.
8103
8104 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
8105
8106 * call.c: Fix comment formatting.
8107 * class.c: Likewise.
8108 * cp-lang.c: Likewise.
8109 * cp-tree.h: Likewise.
8110 * cvt.c: Likewise.
8111
8112 2002-09-11 Zack Weinberg <zack@codesourcery.com>
8113
8114 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8115 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8116 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8117 minor adjustments (use version_string, eliminate yet another
8118 duplicate of xmalloc)
8119
8120 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8121
8122 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8123
8124 2002-09-05 Jason Merrill <jason@redhat.com>
8125
8126 * typeck2.c (add_exception_specifier): Only pedwarn for an
8127 incomplete type.
8128 (require_complete_eh_spec_types): New fn.
8129 (cxx_incomplete_type_diagnostic): Also support pedwarning.
8130 * typeck.c (complete_type_or_diagnostic): Likewise.
8131 * call.c (build_call): Call require_complete_eh_spec_types.
8132 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8133 on an incomplete type.
8134
8135 2002-09-04 Jakub Jelinek <jakub@redhat.com>
8136
8137 * decl.c (start_cleanup_fn): Clear interface_only before
8138 start_function, restore it afterwards.
8139
8140 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
8141
8142 * cp-tree.h (finish_builtin_type): Remove.
8143 * decl2.c (finish_builtin_type): Move to common code.
8144 * decl.c (build_ptrmemfunc_type): Adjust.
8145 * rtti.c (create_pseudo_type_info): Adjust.
8146 (create_tinfo_types): Adjust.
8147
8148 2002-08-31 Jason Merrill <jason@redhat.com>
8149
8150 * cp-lang.c (cp_expr_size): Allow initialization from a
8151 CONSTRUCTOR.
8152
8153 2002-08-30 Richard Henderson <rth@redhat.com>
8154
8155 PR opt/7515
8156 * tree.c: Include target.h.
8157 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8158 don't bind locally.
8159 * Makefile.in (tree.o): Update.
8160
8161 2002-08-27 Mark Mitchell <mark@codesourcery.com>
8162
8163 * class.c (layout_virtual_bases): Warn about bugs in G++ that
8164 result in incorrect object layouts.
8165 (layout_class_type): Likewise.
8166
8167 2002-08-24 Matt Austern <austern@apple.com>
8168
8169 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8170 are allowable.
8171 (real_lvalue_p): Update caller.
8172 (lvalue_p): Ditto.
8173 (non_cast_lvalue_or_else): New.
8174 * tree.h: Declare it.
8175 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8176
8177 2002-08-22 Mark Mitchell <mark@codesourcery.com>
8178
8179 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8180 and COND_EXPR specially; fix error message output.
8181
8182 2002-08-22 Jason Merrill <jason@redhat.com>
8183
8184 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8185 * semantics.c (nullify_returns_r): Likewise.
8186
8187 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
8188
8189 Fix PR/7621
8190 * typeck.c (finish_class_member_access_expr): Diagnose cases where
8191 name lookup finds nothing.
8192
8193 2002-08-15 Jason Merrill <jason@redhat.com>
8194
8195 * semantics.c (finish_then_clause): Remove redundant assignment.
8196 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8197 extra binding level outside the if/switch statement.
8198 (finish_while_cond, finish_for_cond): Rewrite complex condition
8199 into the loop body.
8200
8201 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
8202
8203 * parse.y (sizeof, alignof, typeof): New non-terminals to
8204 increment skip_evaluation. Replace terminals with them and
8205 decrement skip_evaluation at the end of rules using them.
8206 * decl2.c (mark_used): Don't assemble_external if
8207 skipping evaluation.
8208
8209 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
8210
8211 Fix PR/7504
8212 * parse.y (parse_finish_call_expr): Handle incomplete
8213 type used to name a scope.
8214
8215 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
8216
8217 PR c++/7598
8218 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8219 regression caused by my 2002-08-08 patch.
8220
8221 2002-08-13 Mark Mitchell <mark@codesourcery.com>
8222
8223 * decl.c (pushdecl_class_level): Honor requests to bind names to
8224 OVERLOADs.
8225
8226 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8227
8228 * decl2.c (build_call_from_tree): Fix uninitialized variable.
8229 * parse.y (parse_finish_call_expr): Likewise.
8230 * repo.c (old_args, old_dir, old_main): Const-ify.
8231
8232 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
8233
8234 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8235 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8236 * optimize.c (maybe_clone_body): Likewise.
8237 * pt.c (tsubst_enum): Likewise.
8238 (lookup_template_class): Likewise.
8239 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8240
8241 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
8242
8243 * lang-specs.h: Remove -ansi.
8244
8245 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
8246
8247 * tree.c (maybe_dummy_object): Replace // with /* */
8248
8249 2002-08-09 Mark Mitchell <mark@codesourcery.com>
8250
8251 * call.c (standard_conversion): Use build_ptrmem_type.
8252 * cp-tree.h (build_ptrmem_type): New function.
8253 (adjust_result_of_qualified_name_lookup): Likewise.
8254 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8255 static data members.
8256 (build_ptrmem_type): New function.
8257 (grokdeclarator): Do not use build_offset_type when encountering a
8258 qualified name.
8259 * parse.y (parse_finish_call_expr): Use
8260 adjust_result_of_qualified_name_lookup.
8261 * search.c (adjust_result_of_qualified_name_lookup): New function.
8262 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8263 accessing OFFSET_TYPEs directly.
8264
8265 2002-08-08 Mike Stump <mrs@apple.com>
8266
8267 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8268 (type_decays_to): Likewise.
8269 * class.c (find_final_overrider): Likewise.
8270 (maybe_note_name_used_in_class): Likewise.
8271 * decl.c (current_tmpl_spec_kind): Likewise.
8272 (add_binding): Likewise.
8273 (push_class_binding): Likewise.
8274 (duplicate_decls): Likewise.
8275 (layout_var_decl): Likewise.
8276 (grokfndecl): Likewise.
8277 (grokdeclarator): Likewise.
8278 (check_default_argument): Likewise.
8279 * decl2.c (handle_class_head): Likewise.
8280 * error.c (dump_template_decl): Likewise.
8281 * init.c (build_offset_ref): Likewise.
8282 * pt.c (check_specialization_scope): Likewise.
8283 (determine_specialization): Likewise.
8284 (check_explicit_specialization): Likewise.
8285 (maybe_check_template_type): Likewise.
8286 (process_partial_specialization): Likewise.
8287 (check_default_tmpl_args): Likewise.
8288 (push_template_decl_real): Likewise.
8289 (convert_template_argument): Likewise.
8290 (try_class_unification): Likewise.
8291 (get_bindings_real): Likewise.
8292 (do_decl_instantiation): Likewise.
8293 * semantics.c (begin_function_definition): Likewise.
8294 (finish_member_declaration): Likewise.
8295 (check_multiple_declarators): Likewise.
8296 * typeck.c (comp_array_types): Likewise.
8297 (comptypes): Likewise.
8298 (expr_sizeof): Likewise.
8299 (build_binary_op): Likewise.
8300 (dubious_conversion_warnings): Likewise.
8301 (check_return_expr): Likewise.
8302
8303 2002-08-08 Mark Mitchell <mark@codesourcery.com>
8304
8305 * typeck.c (build_class_member_access_expr): Do not return
8306 error_mark_node when no error has occurred.
8307
8308 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8309
8310 * typeck.c (build_component_addr): Remove.
8311 (build_unary_op): Just check it's not a bitfield, and then build
8312 an ADDR_EXPR.
8313
8314 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8315
8316 * class.c (convert_to_base): Correct check for error_mark_node.
8317 (create_vtable_ptr): Remove unused VFUNS_P parm.
8318
8319 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8320
8321 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8322
8323 2002-08-07 Mark Mitchell <mark@codesourcery.com>
8324
8325 Rework build_component_ref.
8326 * call.c (build_vfield_ref): Do not go through build_component_ref.
8327 (build_field_call): Use build_class_member_access_expr.
8328 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8329 (build_object_call): Likewise.
8330 * class.c (convert_to_base): New function.
8331 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8332 (instantiate_type): Handle BASELINKs.
8333 * cp-tree.def (BASELINK): New tree code.
8334 * cp-tree.h (BASELINK_P): Reimplement.
8335 (SET_BASELINK_P): Remove.
8336 (BASELINK_BINFO): Reimplement.
8337 (BASELINK_FUNCTIONS): Likewise.
8338 (BASELINK_ACCESS_BINFO): Likewise.
8339 (BASELINK_OPTYPE): Likewise.
8340 (convert_to_base): New function.
8341 (name_p): Likewise.
8342 (build_object_ref): Remove.
8343 (build_component_ref_1): Likewise.
8344 (build_component_ref): Likewise.
8345 (build_x_component_ref): Likewise.
8346 (build_class_member_access_expr): New function.
8347 (finish_class_member_access_expr): Likewise.
8348 (build_ptrmemfunc_access_expr): Likewise.
8349 * decl.c (grokdeclarator): Handle BASELINKs.
8350 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8351 finish_class_member_access_expr.
8352 (arg_assoc): Handle BASELINKs.
8353 (do_class_using_decl): Likewise.
8354 * error.c (dump_decl): Likewise.
8355 (dump_expr): Use build_ptrmemfunc_access_expr.
8356 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8357 destructors.
8358 (build_throw): Use BASELINK_FUNCTIONS.
8359 * init.c (perform_member_init): Use
8360 build_class_member_access_expr.
8361 (build_offset_ref): Handle BASELINKs. Use
8362 build_class_member_access_expr.
8363 * method.c (hack_identifier): Likewise.
8364 * parse.y (do_id): Use BASELINK, not TREE_LIST.
8365 (primary): Remove uses of build_object_ref.
8366 * pt.c (lookup_template_function): Handle BASELINKs.
8367 (resolve_overloaded_unification): Likewise.
8368 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8369 (lookup_field): Use BASELINK, not TREE_LIST.
8370 (lookup_fnfiels): Likewise.
8371 (setup_class_bindings): Likewise.
8372 * semantics.c (finish_object_call_expr): Do not use
8373 build_method_call when we already know what function is being
8374 called.
8375 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8376 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8377 TREE_CHAIN.
8378 (name_p): New function.
8379 * typeck.c (build_object_ref): Remove.
8380 (build_component_ref_1): Likewise.
8381 (build_x_component_ref): Likewise.
8382 (build_class_member_access_expr): New function.
8383 (finish_class_member_access_expr): Likewise.
8384 (build_ptrmemfunc_access_expr): Likewise.
8385 (get_member_function_from_ptrfunc): Use
8386 build_ptrmemfunc_access_expr.
8387 (build_binary_op): Likewise.
8388 (build_unary_op): Likewise.
8389 (build_ptrmemfunc): Likewise.
8390 (pfn_from_ptrmemfunc): Likewise.
8391 * typeck2.c (build_m_component_ref): Adjust comment.
8392
8393 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
8394
8395 * Make-lang.in (CXX_C_OBJS): Update.
8396 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8397 * cp-tree.h (cxx_decode_option): Remove.
8398 * decl2.c (compare_options, lang_f_options, unsupported_options,
8399 cxx_decode_option): Remove.
8400
8401 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
8402
8403 * typeck.c (build_x_unary_op): Handle pointer-to-member.
8404
8405 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8406
8407 * class.c: Don't include obstack.h.
8408 (popclass):
8409 * decl2.c: Delete bogus comment.
8410 * error.c: Don't include obstack.h.
8411 * except.c: Likewise.
8412 (dump_type): Correct comment.
8413 * method.c: Don't include obstack.h.
8414 * tree.c: Likewise.
8415
8416 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
8417
8418 Fix PR/2213
8419 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8420 expressions to pointer-to-data-member of pointer-to-member-functions.
8421
8422 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8423
8424 * cvt.c (ocp_convert): Delete obsolete code.
8425 * parse.y (permanent_obstack): Delete declaration.
8426 * pt.c (permanent_obstack): Delete declaration.
8427 * repo.c (permanent_obstack): Delete declaration.
8428 (open_repo_file): Use xmalloc instead of permanent_obstack.
8429 (init_repo): Use xstrdup instead of permanent_obstack.
8430
8431 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
8432
8433 * cp-tree.h (VF_DERIVED_VALUE): Remove.
8434 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8435
8436 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
8437
8438 PR 7470.
8439 C++ ABI change - vfunc ordering.
8440 * class.c (add_virtual_function): Remove.
8441 (dfs_modify_all_vtables): Take list of all declared
8442 virtuals. Assign all that are not in primary base.
8443 (check_for_override): Adjust comments.
8444 (create_vtable_ptr): Take single list of virtuals. Build chain
8445 of declared virtuals here.
8446 (layout_class_type): Take single list of virtuals. Adjust.
8447 (finish_struct_1): Keep virtuals on single list. Adjust.
8448
8449 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8450
8451 * init.c (build_member_call): Use build_new_method_call, not
8452 build_method_call.
8453
8454 2002-08-02 Krister Walfridsson <cato@df.lth.se>
8455
8456 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8457
8458 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8459
8460 * call.c (build_method_call): Issue a more helpful error message
8461 about ambiguous method names.
8462
8463 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
8464
8465 * tree.c (build_shared_int_cst): Make cache file scope, and
8466 GTY it.
8467
8468 2002-08-02 Jason Merrill <jason@redhat.com>
8469
8470 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8471 (cp_expr_size): New fn.
8472 * call.c (build_over_call): Lose empty class hackery.
8473 (convert_arg_to_ellipsis): Promote non-POD warning to error.
8474 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8475
8476 * semantics.c (expand_body): Do tree optimization in the function
8477 context, too.
8478
8479 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
8480
8481 * cp-tree.h: Move all warning and flag declarations to c-common.h.
8482 * decl.c: Move all warning and flag variables to c-common.c.
8483 * decl2.c: Move all warning and flag variables to c-common.c.
8484 * lex.c (flag_digraphs): Remove.
8485 (warn_traditional): Now in c-common.c.
8486
8487 2002-07-31 Mark Mitchell <mark@codesourcery.com>
8488
8489 * call.c (build_field_call): Do not look up the field by name.
8490 (build_method_call): Simplify.
8491 (struct z_candidate): Add access_path and conversion_path. Remove
8492 basetype_path.
8493 (convert_class_to_reference): Adjust use of
8494 add_function_candidate.
8495 (add_candidate): Add conversion_path argument.
8496 (add_function_candidate): Use it.
8497 (add_conv_dndidate): Likewise.
8498 (build_builtin_candidate): Likewise.
8499 (add_template_candidate_real): Add conversion_path argument.
8500 (add_template_conv_candidate): Likewise.
8501 (add_template_candidate): Likewise.
8502 (build_user_type_conversion_1): Use it.
8503 (build_new_function_call): Remove name lookup code. Adjust use of
8504 add_template_candidate and add_function_candidate.
8505 (build_new_op): Likewise.
8506 (convert_like_real): Use build_special_member_call.
8507 (build_over_call): Use cand->conversion_path.
8508 (build_special_member_call): New method.
8509 (build_new_method_call): Remove name lookup code.
8510 * cp-tree.def (OFFSET_REF): Update documentation.
8511 (TEMPLATE_ID_EXPR): Likewise.
8512 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8513 (BASELINK_OPTYPE): Likewise.
8514 (build_new_method_call): Adjust prototype.
8515 (build_special_member_call): New method.
8516 (build_baselink): New method.
8517 (build_offset_ref_call_from_tree): Likewise.
8518 (build_call_from_tree): Likewise.
8519 (finish_qualified_call_expr): Remove.
8520 (finish_call_expr): Adjust prototype.
8521 (build_x_function_call): Remove.
8522 * cvt.c (ocp_convert): Use build_special_member_call.
8523 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8524 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8525 CALL_EXPR.
8526 (build_offset_ref_call_from_tree): New function.
8527 (build_call_from_tree): Likewise.
8528 * init.c (expand_cleanup): Use build_special_member_call.
8529 (expand_default_init): Likewise.
8530 (build_member_call): Use finish_call_expr.
8531 (build_new_1): Use build_special_member_call.
8532 (push_base_cleanups): Likewise.
8533 * method.c (do_build_assign_ref): Likewise.
8534 * parse.y (template_id): Do not pass a COMPONENT_REF to
8535 lookup_template_function.
8536 (primary): Use parse_finish_call_epxr, not finish_call_expr.
8537 (parse_finish_call_expr): New function.
8538 * pt.c (lookup_template_function): Add assertions.
8539 * search.c (lookup_base): Allow T to be a binfo.
8540 (build_baselink): New function.
8541 (lookup_member): Use it.
8542 * semantics.c (finish_call_expr): Do not do name lookup.
8543 (finish_object_call_expr): Remove #if 0'd code.
8544 (finish_qualified_call_expr): Remove.
8545 * typeck.c (build_x_function_call): Remove.
8546 (build_static_case): Use build_special_member_call.
8547 * typeck2.c (build_functional_cast): Likewise.
8548
8549 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8550
8551 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8552
8553 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
8554
8555 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8556
8557 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
8558
8559 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8560 documentation.
8561
8562 2002-07-29 Alan Modra <amodra@bigpond.net.au>
8563
8564 * cp-tree.h: Comment typo fix.
8565
8566 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
8567
8568 * spew.c (space_for_token): Allocate zeroed memory for a new token
8569 chunk.
8570
8571 2002-07-27 Roger Sayle <roger@eyesopen.com>
8572
8573 * decl.c (builtin_function_1): No need to explicitly mark
8574 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8575
8576 2002-07-27 Roger Sayle <roger@eyesopen.com>
8577
8578 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8579
8580 2002-07-26 Jason Merrill <jason@redhat.com>
8581
8582 * call.c (build_over_call): Likewise.
8583 (cp_convert_parm_for_inlining): New fn.
8584 (convert_for_arg_passing): New fn.
8585 (convert_default_arg, build_over_call): Use it.
8586 (type_passed_as): New fn.
8587 * pt.c (tsubst_decl): Use it.
8588 * decl2.c (cp_build_parm_decl): New fn.
8589 (build_artificial_parm): Use it.
8590 (start_static_storage_duration_function): Likewise.
8591 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8592 (grokparms): Don't mess with DECL_ARG_TYPE.
8593 * typeck.c (convert_arguments): Use convert_for_arg_passing.
8594 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8595 Define.
8596 * cp-tree.h: Declare new fns.
8597
8598 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
8599
8600 * cp-tree.h (flag_operator_names): Remove.
8601 * decl2.c (flag_operator_names): Remove.
8602 (lang_f_options): Remove operator-names.
8603 * lex.c (D_OPNAME): Remove.
8604 (reswords): Remove operator names.
8605 (rid_to_yy): Remove operator names.
8606 (init_reswords): No need to handle D_OPNAME.
8607 * spew.c (read_process_identifier): There are no operator
8608 names.
8609
8610 2002-07-26 Jason Merrill <jason@redhat.com>
8611
8612 * dump.c (cp_dump_tree): Call c_dump_tree.
8613 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8614
8615 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8616
8617 * error.c (print_whitespace): Remove.
8618 * g++spec.c (LIBUNWIND): Move.
8619 * mangle.c (mangled_position, write_signed_number): Remove.
8620
8621 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8622
8623 * decl2.c (cxx_decode_option): Similarly.
8624
8625 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
8626
8627 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8628 (cxx_sizeof_or_alignof_type): Take a third argument.
8629 (cxx_sizeof): Adjust definition.
8630 (cxx_alignof): Likewise.
8631 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8632 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8633 complaining.
8634 (c_sizeof_nowarn): Remove definition.
8635 (build_unary_op): Use cxx_sizeof_nowarn.
8636
8637 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
8638
8639 * tree.c (cp_build_qualified_type_real): When copying
8640 pointer-to-method types, unshare the record that holds
8641 the cached pointer-to-member-function type.
8642
8643 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8644
8645 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8646
8647 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
8648
8649 Fix PR/7363:
8650 * typeck.c (cxx_sizeof_or_alignof_type): New function.
8651 (c_sizeof): Remove definition.
8652 (expr_sizeof): Use cxx_sizeof.
8653 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8654 * decl.c (finish_destructor_body): Use cxx_sizeof.
8655 * semantics.c (finish_alignof): Likewise.
8656 (finish_alignof): Use cxx_alignof.
8657 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8658 (cxx_sizeof_or_alignof_type): Declare.
8659 (my_friendly_assert): Move to ../c-common.h.
8660
8661 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8662
8663 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8664
8665 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8666
8667 PR c++/7347, c++/7348
8668 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8669 * decl.c (make_typename_type): Use it.
8670 (make_unbound_class_template): Likewise.
8671 (lookup_name_real): Don't call type_access_control if scope is
8672 template parameter dependent.
8673 * parse.y (template_arg): Call make_unbound_class_template with
8674 tf_parsing set.
8675 (nest_name_specifier): Call make_typename_type with tf_parsing set.
8676 (typename_sub0): Likewise.
8677 (typename_sub1): Likewise.
8678 (instantiate_decl): Push class scope.
8679 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8680 for both static variable and member function template.
8681 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8682 and arguments.
8683 * search.c (type_access_control): Do type access for TEMPLATE_DECL
8684 too.
8685
8686 2002-07-20 Roger Sayle <roger@eyesopen.com>
8687
8688 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8689 test by using positive_option. Make whitespace consistent.
8690
8691 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
8692
8693 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8694 members with 'locus'. Adjust use throughout.
8695 (struct feed): Likewise.
8696 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8697 Adjust use.
8698 (snarf_defarg): Use error(), not error_with_file_and_line().
8699
8700 2002-07-19 Chris Demetriou <cgd@broadcom.com>
8701
8702 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8703 cpp_options is included.
8704
8705 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8706
8707 PR c++/2862, c++/2863
8708 * pt.c (determine_specialization): Compare the length of
8709 TYPE_ARG_TYPES. Tidy.
8710
8711 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8712
8713 PR c++/3797
8714 * decl.c (duplicate_decls): Don't propagate inlining parameters from
8715 olddecl to newdecl when newdecl is a specialization of the
8716 instantiation olddecl.
8717
8718 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8719
8720 PR c++/4802, c++/5387
8721 * decl.c (make_typename_type): Use enforce_access.
8722
8723 2002-07-17 Scott Snyder <snyder@fnal.gov>
8724
8725 PR c++/7320
8726 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8727
8728 2002-07-12 Mark Mitchell <mark@codesourcery.com>
8729
8730 * class.c (add_method): Correct handling of conversion operators.
8731
8732 2002-07-11 Mark Mitchell <mark@codesourcery.com>
8733
8734 PR c++/7224
8735 * class.c (add_method): Simplify.
8736
8737 2002-07-11 Jason Merrill <jason@redhat.com>
8738
8739 PR c++/7279
8740 * tree.c (cp_copy_res_decl_for_inlining): Also copy
8741 TREE_ADDRESSABLE.
8742
8743 2002-07-10 Graham Stott <graham.stott@btinternet.com>
8744
8745 * pt.c (template_parm_this_level_p, push_template_decl_real):
8746 Pass depth as int pointer.
8747
8748 2002-07-11 Tim Josling <tej@melbpc.org.au>
8749
8750 Remove front end hard coding from gengtype.c.
8751
8752 * config-lang.in (gtfiles): Add files needed for this front end.
8753
8754 2002-07-10 Mark Mitchell <mark@codesourcery.com>
8755
8756 * cp-tree.h (unqualified_name_lookup_error): Declare it.
8757 (begin_function_definition): Adjust prototype.
8758 * lex.c (unqualified_name_lookup_error): New function, split out
8759 from ...
8760 (do_identifier): ... here.
8761 * parse.y (parse_begin_function_definition): New function.
8762 (fn.def1): Use it.
8763 * semantics.c (begin_function_definition): Accept decl-specifiers
8764 and attributes as separate parameters.
8765
8766 2002-07-10 Jason Merrill <jason@redhat.com>
8767
8768 PR c++/6255
8769 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8770 modifying the old one.
8771
8772 2002-07-09 Mark Mitchell <mark@codesourcery.com>
8773
8774 * cp-tree.h (constructor_name_p): Declare it.
8775 (check_template_template_default_arg): Likewise.
8776 * class.c (handle_using_decl): Use constructor_name_p.
8777 * decl.c (grokdeclarator): Likewise.
8778 * decl2.c (constructor_name_p): Define it.
8779 * init.c (build_member_call): Use constructor_name_p.
8780 * parse.y (template_parm): Use check_template_template_default_arg.
8781 * pt.c (check_explicit_specialization): Use constructor_name_p.
8782 * semantics.c (check_template_template_default_arg): New function.
8783
8784 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8785
8786 * pt.c (can_complete_type_without_circularity): Add static to
8787 function definition.
8788
8789 2002-07-08 Mark Mitchell <mark@codesourcery.com>
8790
8791 * cp-tree.h (have_extern_spec): Declare it
8792 * decl.c (have_extern_spec): Define it.
8793 (start_decl): Eliminate use of used_extern_spec.
8794 (start_function): Likewise.
8795 * parse.y (have_extern_spec): Remove declaration.
8796 (used_extern_spec): Likewise.
8797 (frob_specs): Eliminate use of used_extern_spec.
8798 (.hush_warning): Likewise.
8799
8800 2002-07-07 Mark Mitchell <mark@codesourcery.com>
8801
8802 * Make-lang.in (cp/parse.o): Depend on decl.h.
8803 * cp-tree.h (do_decl_instantiation): Change prototype.
8804 * parse.y: Include decl.h.
8805 (parse_decl_instantiation): New function.
8806 (explicit_instantiation): Use it.
8807 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8808 and DECLSPECS.
8809
8810 2002-07-07 Roger Sayle <roger@eyesopen.com>
8811
8812 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8813 constructor and destructor tests when passed a TEMPLATE_DECL.
8814
8815 2002-07-05 Jason Merrill <jason@redhat.com>
8816
8817 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8818 pointers.
8819
8820 PR optimization/7145
8821 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8822
8823 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
8824
8825 Repair damage on weak-impared targets caused by my previous patch.
8826 * cp-tree.h (import_export_tinfo): Add parameter.
8827 * decl2.c (import_export_tinfo): Add parameter, post adjust
8828 DECL_COMDAT.
8829 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8830 import_export_tinfo.
8831
8832 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8833
8834 PR c++/6944
8835 * init.c (build_aggr_init): Remove qualifiers of init before calling
8836 build_vec_init.
8837 (build_vec_init): Flatten multi-dimensional array during cleanup.
8838 (build_vec_delete_1): Abort if the type of each element is array.
8839
8840 2002-07-03 Graham Stott <graham.stott@btinternet.com>
8841
8842 * pt.c (instantiate_class_template): Fix typo.
8843
8844 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8845
8846 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8847 by CVS conflict in my last patch.
8848
8849 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8850
8851 PR c++/6716
8852 * pt.c (can_complete_type_without_circularity): New function.
8853 (instantiate_class_template): Use it.
8854 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8855 message due to incomplete fields.
8856
8857 2002-07-01 Mark Mitchell <mark@codesourcery.com>
8858
8859 PR c++/7112
8860 * mangle.c (write_expression): Add mangling for sizeof when
8861 applied to a type.
8862 * operators.def: Remove stale comment.
8863
8864 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
8865
8866 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8867 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8868 (tinfo_decl_type): Replace with ...
8869 (type_info_ptr_type): ... this.
8870 (import_export_tinfo): Declare.
8871 (tinfo_decl_p): Rename to ...
8872 (unemitted_tinfo_decl_p): ... this.
8873 * decl2.c (import_export_decl): Break out tinfo handling into ...
8874 (import_export_tinfo): ... here. New function.
8875 (finish_file): Adjust.
8876 * rtti.c (TINFO_REAL_NAME): New macro.
8877 (init_rtti_processing): Create the tinfo types.
8878 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8879 (get_tinfo_decl): Adjust.
8880 (get_tinfo_ptr): New function.
8881 (get_type_id): Use it.
8882 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8883 (ptr_initializer): Use get_tinfo_ptr.
8884 (ptm_initializer): Likewise.
8885 (synthesize_tinfo_var): Break into ...
8886 (get_pseudo_ti_init): ... this. Just create the initializer.
8887 (get_pseudo_ti_desc): .. and this.
8888 (create_real_tinfo_var): Remove.
8889 (create_pseudo_type_info): Don't create the vtable decl here.
8890 (get_vmi_pseudo_type_info): Remove.
8891 (create_tinfo_types): Adjust.
8892 (tinfo_decl_p): Rename to ...
8893 (unemitted_tinfo_decl_p): ... here. Adjust.
8894 (emit_tinfo_decl): Adjust. Create the initializer.
8895
8896 2002-06-27 Mark Mitchell <mark@codesourcery.com>
8897
8898 PR c++/6695
8899 * pt.c (tsubst_friend_class): Substitute into the context of the
8900 friend before using it.
8901
8902 2002-06-26 Mark Mitchell <mark@codesourcery.com>
8903
8904 * cp-tree.h (xref_tag): Change prototype.
8905 (handle_class_head): Likewise.
8906 (build_x_component_ref): Likewise.
8907 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8908 (xref_tag): Take attributes as a separate parameter.
8909 (xref_tag_from_type): Adjust call to xref_tag.
8910 * decl2.c (build_expr_from_tree): Adjust call to
8911 build_x_component_ref.
8912 (handle_class_head): Take attributes as a separate parameter.
8913 * parse.y (parse_xref_tag): New function.
8914 (parse_handle_class_head): Likewise.
8915 (primary): Use parse_xref_tag.
8916 (class_head_decl): Use parse_handle_class_head.
8917 (class_head_defn): Likewise.
8918 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8919 (build_dynamic_cast_1): Likewise.
8920 (create_pseudo_type_info): Likewise.
8921 (emit_support_tinfos): Likewise.
8922 * typeck.c (build_object_ref): Adjust call to
8923 build_x_component_ref.
8924 (build_x_component_ref): Remove protect parameter.
8925
8926 2002-06-25 Mark Mitchell <mark@codesourcery.com>
8927
8928 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8929 * class.c (handle_using_decl): Likewise.
8930 (instantiate_type): Likewise.
8931 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8932 (xref_basetypes): Change prototype.
8933 (begin_mem_initializers): New function.
8934 (get_overloaded_fn): Likewise.
8935 * decl.c (xref_basetypes): Simplify.
8936 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8937 * init.c (build_offset_ref): Likewise.
8938 * parse.y (base_init): Use begin_mem_initializers().
8939 (structsp): Adjust call to xref_basetypes.
8940 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8941 (instantiate_class_template): Adjust call to xref_basetypes.
8942 * semantics.c (begin_mem_initializers): New function.
8943 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8944 (really_overloaded_fn): Likewise.
8945 (get_overloaded_fn): New function.'
8946 (get_first_fn): USe BASELINK_FUNCTIONS.
8947
8948 2002-06-24 Mark Mitchell <mark@codesourcery.com>
8949
8950 * cp-tree.h (SCALAR_TYPE_P): New macro.
8951 (check_for_out_of_scope_variable): New function.
8952 (at_class_scope_p): Likewise.
8953 (finish_fname): Likewise.
8954 * class.c (finish_struct): Use at_function_scope_p.
8955 * decl.c (check_for_out_of_scope_variable): New function, split
8956 out from do_identifier.
8957 (finish_enum): Use at_function_scope_p.
8958 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8959 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
8960 (primary): Use at_function_scope_p.
8961 * search.c (at_class_scope_p): New function.
8962 * semantics.c (finish_fname): Likewise.
8963 (check_multiple_declarators): Use at_function_scope_p.
8964
8965 2002-06-23 Mark Mitchell <mark@codesourcery.com>
8966
8967 * parse.y (parse_scoped_id): New function.
8968 (primary): Use it.
8969 * cp-tree.h (do_scoped_id): Adjust declaration.
8970 * lex.c (do_scoped_id): Remove call to yylex.
8971 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8972 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8973 expanding it inline.
8974
8975 2002-06-23 Matt Thomas <matt@3am-software.com>
8976
8977 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8978 "#if VMS_TARGET".
8979
8980 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8981
8982 * mangle.c (integer_type_codes): Const-ify.
8983
8984 2002-06-20 Richard Henderson <rth@redhat.com>
8985
8986 PR c++/6747
8987 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8988 Call put_var_into_stack.
8989
8990 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8991
8992 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8993 array size calculation.
8994
8995 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8996
8997 PR c++/6892
8998 * pt.c (tsubst_expr): Handle FILE_STMT.
8999
9000 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9001
9002 PR c++/6723
9003 * pt.c (lookup_template_class): Don't build complete argument of
9004 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
9005 argument.
9006
9007 2002-06-19 Akim Demaille <akim@epita.fr>
9008
9009 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
9010 decl.h's TYPENAME.
9011 * spew.c, lex.c: Adjust.
9012 * parse.y (explicit_instantiation): Add empty action to override
9013 the default $$ = $1 where it introduces a type clash.
9014
9015 2002-06-14 Jason Merrill <jason@redhat.com>
9016
9017 * semantics.c (begin_for_stmt): Push the 'for' scope before
9018 adding the FOR_STMT.
9019
9020 C++ ABI changes.
9021 * class.c (build_base_field): Set DECL_PACKED.
9022 (layout_class_type): Don't use tail padding of PODs.
9023 * mangle.c (write_unqualified_name): Fix template conversion op
9024 mangling.
9025
9026 2002-06-16 Richard Henderson <rth@redhat.com>
9027
9028 PR opt/6793
9029 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
9030 after template instantiation.
9031
9032 2002-06-16 Richard Henderson <rth@redhat.com>
9033
9034 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
9035
9036 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
9037
9038 * cp-tree.h (compiler_error): Remove declaration.
9039 * lex.c (compiler_error): Remove definition.
9040
9041 2002-06-14 Steve Ellcey <sje@cup.hp.com>
9042
9043 * g++spec.c (LIBUNWIND): New.
9044 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
9045
9046 2002-06-13 Jessica Han <jessica@cup.hp.com>
9047
9048 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
9049 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
9050 (build_vbase_offset_vtbl_entries): Likewise.
9051 * rtti.c (build_headof): Likewise.
9052 (get_tinfo_decl_dynamic): Likewise.
9053 (create_pseudo_type_info): Likewise.
9054
9055 2002-06-12 Stan Shebs <shebs@apple.com>
9056
9057 * mpw-config.in: Remove file, no longer used.
9058 * mpw-make.sed: Ditto.
9059
9060 2002-06-07 Zack Weinberg <zack@codesourcery.com>
9061
9062 * decl2.c: Update call to cpp_handle_option.
9063
9064 2002-06-07 H.J. Lu (hjl@gnu.org)
9065
9066 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
9067
9068 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
9069
9070 * error.c (cp_error_at): Fix typo.
9071
9072 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
9073
9074 * error.c (cp_diagnostic_starter): Adjust call.
9075 (maybe_print_instantiation_context): Change prototype to take a
9076 'diagnostic_info *'.
9077 (print_instantiation_full_context): Likewise.
9078 (print_instantiation_partial_context): Likewise.
9079 (cp_diagnostic_starter): Likewise.
9080 (cp_diagnostic_finalizer): Likewise.
9081 (cp_print_error_function): Likewise.
9082 (cp_printer): Take a secondary parameter as a 'text_info *'.
9083 Remove output_state savings. Adjust calls.
9084
9085 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9086
9087 * pt.c (inline_parm_levels): Mark for GC.
9088
9089 * mangle.c (start_mangling): Allocate G.substitutions here...
9090 (init_mangle): ... rather than here.
9091 (finish_mangling): Clear the varray pointer when done with it.
9092 * spew.c (yylexstring): Don't use VARRAY_FREE.
9093 * search.c (bfs_walk): Don't use VARRAY_FREE.
9094 * decl2.c (pending_statics): Use gengtype to mark.
9095 (deferred_fns): Likewise.
9096 (ssdf_decls): Likewise.
9097 (init_decl2): Delete.
9098 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
9099 (cxx_init_decl_processing): Don't call init_decl2.
9100 (cxx_pop_function_context): Don't use VARRAY_FREE.
9101 * cp-tree.h (struct saved_scope): No need for special marking
9102 of varrays.
9103 (struct language_function): Likewise.
9104 (local_classes): Use gengtype to mark.
9105 (init_decl2): Delete prototype.
9106 * class.c (init_class_processing): Don't use
9107 ggc_add_tree_varray_root.
9108 (build_vtbl_initializer): Don't use VARRAY_FREE.
9109
9110 * decl.c (typename_compare): Don't use same_type_p.
9111
9112 * decl.c: Include hashtab.h instead of hash.h.
9113 (typename_hash): Update to use htab_h.
9114 (typename_compare): Likewise.
9115 (typename_htab): Use gengtype to mark.
9116 (build_typename_type): Update to use htab_h.
9117 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9118
9119 * Make-lang.in (gt-cp-tree.h): New rule.
9120 (cp/tree.o): Depend on gt-cp-tree.h.
9121 * config-lang.in (gtfiles): Add cp/tree.c.
9122 * tree.c: Include gt-cp-tree.h.
9123 (list_hash_table): Use gengtype to mark.
9124 (init_tree): Use gengtype to mark trees.
9125
9126 * Make-lang.in (cp/decl.o): Add debug.h dependency.
9127 * call.c (struct z_candidate): Use gengtype.
9128 (USER_CONV_CAND): Use WRAPPER_ZC.
9129 (convert_class_to_reference): Use build_zc_wrapper.
9130 (build_type_conversion_1): Likewise.
9131 (build_over_call): Use WRAPPER_ZC.
9132 (add_warning): Use build_zc_wrapper.
9133 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9134 * cp-tree.h (struct lang_identifier): Use gengtype.
9135 (struct template_parm_index_s): Likewise.
9136 (struct ptrmem_cst): Likewise.
9137 (struct tree_binding): Likewise.
9138 (struct tree_overload): Likewise.
9139 (struct tree_srcloc): Likewise.
9140 (struct tree_wrapper): Likewise. Also modify to have a pointer
9141 to struct z_candidate rather than void.
9142 (enum cp_tree_node_structure_enum): New.
9143 (union lang_tree_node): New.
9144 (cxx_mark_tree): Delete prototype.
9145 (cp_tree_node_structure): New prototype.
9146 (build_ptr_wrapper): Delete prototype.
9147 (build_int_wrapper): Delete prototype.
9148 (build_zc_wrapper): New prototype.
9149 * decl.c: Include debug.h
9150 (cxx_mark_tree): Delete.
9151 (cp_tree_node_structure): New.
9152 * tree.c (build_ptr_wrapper): Delete.
9153 (build_int_wrapper): Delete.
9154 (build_zc_wrapper): New.
9155
9156 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9157 Correct typo. Patch from k_fukui@highway.ne.jp.
9158
9159 * semantics.c (current_stmt_tree): Update for change to
9160 struct language_function.
9161 (finish_mem_initializers): Likewise.
9162 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9163 * cp-tree.h (struct language_function): Rename from
9164 cp_language_function. Change all uses.
9165 (cp_function_chain): Don't need to cast.
9166
9167 * class.c (duplicate_tag_error): Reset discriminator.
9168 (check_bases_and_members): Update for data structure changes.
9169 * cp-tree.h (struct lang_id2): Use gengtype.
9170 (flagged_type_tree): Likewise.
9171 (SET_LANG_ID): Use GGC on struct lang_id2.
9172 (struct cp_language_function): Use gengtype. Remove field
9173 'x_vcalls_possible_p'.
9174 (current_vcalls_possible_p): Delete.
9175 (struct lang_type_header): New.
9176 (struct lang_type_class): Rename from struct lang_type. Include
9177 struct lang_type_header.
9178 (struct lang_type_ptrmem): New.
9179 (struct lang_type): New.
9180 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
9181 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
9182 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9183 (struct lang_decl_flags): Use gengtype. Add discriminators.
9184 (struct lang_decl): Use gengtype. Add and use discriminators.
9185 Update the macros that reference moved fields.
9186 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
9187 (SET_DECL_THUNK_P): Set discriminator too.
9188 (clear_inline_text_obstack): Delete prototype.
9189 (finish_inline_definitions): Delete prototype.
9190 (mark_pending_inlines): Delete prototype.
9191 (lang_check_failed): New prototype.
9192 * decl.c (struct named_label_use_list): Use gengtype.
9193 (struct named_label_list): Likewise.
9194 (mark_binding_level): Delete.
9195 (mark_named_label_lists): Delete.
9196 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9197 (cxx_init_decl_processing): Use generated marker routine.
9198 (begin_destructor_body): Delete dead set to
9199 current_vcalls_possible_p.
9200 (mark_lang_function): Delete.
9201 (mark_cp_function_context): Delete.
9202 (lang_mark_tree): Use generated marker routines.
9203 * decl2.c (start_objects): Set discriminator when setting
9204 GLOBAL_INIT_PRIORITY.
9205 * lex.c (retrofit_lang_decl): Set discriminators.
9206 (copy_lang_type): Update for changes to lang_type structure.
9207 (cp_make_lang_type): Set discriminator.
9208 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
9209 * search.c: Include ggc.h.
9210 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9211 (finish_inline_definitions): Delete.
9212 * spew.c (struct token): Use gengtype.
9213 (struct token_chunk): New.
9214 (struct unparsed_text): Use gengtype. Store tokens in chunks.
9215 (struct feed): Use gengtype.
9216 (feed_obstack): Delete.
9217 (feed): Mark as GC root.
9218 (pending_inlines): Mark as GC root.
9219 (pending_inlines_tail): Likewise.
9220 (processing_these_inlines): Likewise.
9221 (token_obstack): Make static.
9222 (first_token): Likewise.
9223 (init_spew): Don't initialize deleted things; use gengtype for roots.
9224 (clear_inline_text_obstack): Delete.
9225 (feed_input): Use GC for struct feed. Update for changes to
9226 struct unparsed_text.
9227 (mark_pending_inlines): Delete.
9228 (next_token): Rename from add_token. Change all callers. Update
9229 for changes to struct unparsed_text.
9230 (space_for_token): New.
9231 (remove_last_token): New.
9232 (alloc_unparsed_text): New.
9233 (snarf_block): Take an unparsed_text. Update for changes to struct
9234 unparsed_text.
9235 (snarf_method): Update for changes to struct unparsed_text.
9236 (snarf_defarg): Update for changes to struct unparsed_text.
9237 * tree.c (lang_check_failed): New.
9238
9239 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9240 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9241 (cp/spew.o): Add dependency on gt-<filename>.h.
9242 (cp/decl2.o): Add dependency on gt-<filename>.h.
9243 (cp/call.o): Add dependency on gt-<filename>.h.
9244 (cp/pt.o): Add dependency on gt-<filename>.h.
9245 (cp/repo.o): Add dependency on gt-<filename>.h.
9246 (cp/parse.o): Add dependency on gt-<filename>.h.
9247 * call.c: Use gengtype for roots.
9248 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9249 decl2.c parse.y pt.c repo.c spew.c.
9250 * cp-tree.h: Use gengtype for roots.
9251 (struct saved_scope): Use GGC, gengtype.
9252 (cp_parse_init): Delete prototype.
9253 (init_pt): Delete prototype.
9254 * decl.c: Use gengtype for roots.
9255 (mark_saved_scope): Delete.
9256 (cxx_init_decl_processing): Don't call deleted initilisation
9257 routines.
9258 (signed_size_zero_node): Delete, unused.
9259 * decl.h: Use gengtype for roots.
9260 * decl2.c: Use gengtype for roots.
9261 * lex.h: Use gengtype for roots.
9262 * parse.y: Use gengtype for roots.
9263 (cp_parse_init): Delete.
9264 * pt.c: Use gengtype for roots.
9265 (init_pt): Delete.
9266 * repo.c: Use gengtype for roots.
9267 * spew.c: Use gengtype for roots.
9268
9269 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
9270 (cp/decl.o): Add dependency on gtype-cp.h.
9271 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9272 Include gtype-cp.h. Allow for filename changes.
9273
9274 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9275 (cp/decl.o): Add cp/gt-decl.h dependency.
9276 * config-lang.in (gtfiles): New.
9277 * tree.h: Rename struct binding_level to struct cp_binding_level.
9278 * decl.c: Rename struct binding_level to struct cp_binding_level.
9279 Include cp/gt-decl.h.
9280 (struct cp_binding_level): Use gengtype.
9281 (make_binding_level): Use GGC on struct cp_binding_level.
9282 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9283 (cxx_init_decl_processing): Mark free_binding_level as
9284 deletable.
9285
9286 * decl.c (mark_cp_function_context): Update calling sequence.
9287
9288 * decl.c (start_function): Don't free 'struct
9289 cp_language_function'.
9290 (pop_cp_function_context): Likewise.
9291 (save_function_data): Allocate it using GC.
9292 * semantics.c (genrtl_start_function): Don't free 'struct
9293 cp_language_function'.
9294
9295 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
9296
9297 * lang-specs.h: Use cpp_debug_options.
9298
9299 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9300
9301 * mangle.c, tree.c: Include real.h.
9302 * Make-lang.in: Update dependency lists.
9303
9304 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
9305
9306 * lex.c: Don't include c-lex.h.
9307 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9308
9309 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
9310
9311 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9312
9313 2002-05-22 Richard Henderson <rth@redhat.com>
9314
9315 * decl.c (obscure_complex_init): Check for VAR_DECL
9316 before using DECL_THREAD_LOCAL.
9317
9318 2002-05-22 Richard Henderson <rth@redhat.com>
9319
9320 * decl.c (check_tag_decl): Handle RID_THREAD.
9321 (obscure_complex_init): Reject run-time init of tls.
9322 (grokvardecl, grokdeclarator): Handle RID_THREAD.
9323 * lex.c (reswords): Add __thread.
9324 (rid_to_yy): Map RID_THREAD to SCSPEC.
9325
9326 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
9327
9328 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9329 * cp-tree.h (cxx_post_options): Kill.
9330 * cp-lex.c (cxx_post_options): Kill.
9331
9332 2002-05-21 Richard Henderson <rth@redhat.com>
9333
9334 * lex.c (rid_to_yy): Add RID_THREAD.
9335
9336 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
9337
9338 * init.c (build_vec_init): Test for trivial copy-assignment when
9339 copy-assigning arrays.
9340
9341 2002-05-20 Andreas Jaeger <aj@suse.de>
9342
9343 * init.c (build_default_init): Remove unused variable.
9344
9345 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
9346
9347 * call.c (any_strictly_viable): New.
9348 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9349
9350 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9351
9352 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9353
9354 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9355
9356 PR c++/186, DR 259
9357 * pt.c (do_decl_instantiation): Don't complain explicit
9358 instantiation after explicit specialization.
9359 (do_type_instantiation): Likewise.
9360
9361 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
9362
9363 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9364 renamed from...
9365 (complete_type_or_else): ... this. Redefined as macro.
9366 (cxx_incomplete_type_diagnostic): Declare.
9367 (cxx_incomplete_type_error): Define as macro.
9368 * init.c (build_delete): Warn about incomplete types other than
9369 void, and use the built-in operator delete for them.
9370 * typeck.c (complete_type_or_diagnostic): Renamed from
9371 complete_type_or_else. Added warn_only argument, passed to...
9372 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
9373 warnings or errors depending on new warn_only argument. Renamed
9374 from...
9375 (cxx_incomplete_type_error): ... this. New implementation in
9376 terms of cxx_incomplete_type_diagnostic.
9377
9378 2002-05-18 Jason Merrill <jason@redhat.com>
9379
9380 PR c++/6611
9381 * decl2.c (import_export_decl): If we clear
9382 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9383
9384 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9385
9386 PR c++/6620
9387 * pt.c (verify_class_unification): Don't check if PARM is template
9388 parameter dependent. Simplify.
9389 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9390 parameter dependent expression.
9391
9392 2002-05-14 Jason Merrill <jason@redhat.com>
9393
9394 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9395 Do set DECL_COMDAT.
9396 (synthesize_tinfo_var): Take the public decl.
9397 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
9398 (emit_tinfo_decl): Adjust. Call import_export_decl.
9399 * decl2.c (import_export_decl): Simplify tinfo decl handling.
9400
9401 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
9402
9403 * cp-tree.h (struct lang_type): Added non_zero_init.
9404 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9405 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9406 * class.c (check_field_decls): Test non_zero_init.
9407 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9408 zero-to-NULL conversions.
9409 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9410 type that needs zero-initialization without zeros.
9411 (check_initializer_decl): Compute zero-initializer for types
9412 that require a non-trivial one.
9413 * init.c (build_forced_zero_init): New function.
9414 (build_default_init): Use it.
9415 * tree.c (zero_init_p): New function.
9416 * typeck2.c (force_store_init_value): New function.
9417 (process_init_constructor): Create non-trivial zero-initializers
9418 for array members and class fields.
9419
9420 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
9421
9422 * lang-specs.h: Remove redundant -lang-c++.
9423
9424 2002-05-13 Jason Merrill <jason@redhat.com>
9425
9426 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9427 (fixed_type_or_null): See through reference vars.
9428 (build_base_path): Vtable contents are constant.
9429 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9430
9431 2002-05-12 Jason Merrill <jason@redhat.com>
9432
9433 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9434 structs are safe.
9435
9436 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
9437
9438 * cp-tree.h (flag_ansi): Remove.
9439 * decl2.c (flag_ansi): Remove.
9440 (cxx_decode_option): Set flag_iso and flag_undef.
9441
9442 2002-05-09 Jason Merrill <jason@redhat.com>
9443
9444 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9445 Use subtraction rather than a bitmask to get the index.
9446 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9447
9448 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9449
9450 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
9451
9452 * Make-lang.in (decl2.o): Update.
9453 * cp-tree.h (warn_multichar): Remove.
9454 * decl2.c: Include c-common.h.
9455 (warn_multichar): Remove.
9456
9457 2002-05-03 Jason Merrill <jason@redhat.com>
9458
9459 * tree.c (build_cplus_array_type): Only const and volatile get
9460 special handling.
9461
9462 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9463
9464 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9465
9466 ABI change, returning simple classes from functions.
9467 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9468 TYPE_HAS_TRIVIAL_INIT_REF is false or
9469 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9470
9471 2002-04-30 Jason Merrill <jason@redhat.com>
9472
9473 PR debug/6436
9474 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9475 anonymous class with a typedef if there are attributes.
9476
9477 2002-04-29 Paul Eggert <eggert@twinsun.com>
9478
9479 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9480
9481 2002-04-29 Jakub Jelinek <jakub@redhat.com>
9482
9483 PR c++/6477
9484 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9485 non-NULL first.
9486
9487 2002-04-29 Mark Mitchell <mark@codesourcery.com>
9488
9489 PR c++/6492
9490 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9491 enter that scope before name lookup.
9492
9493 PR c++/6486
9494 * method.c (do_build_copy_constructor): Avoid building
9495 cv-qualified reference types.
9496
9497 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
9498
9499 PR c++/5719
9500 * decl.c (grok_op_properties): Assignment ops don't have to return
9501 by value. operator% should.
9502
9503 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
9504
9505 PR c/6343
9506 * decl.c (duplicate_decls): Call merge_weak.
9507
9508 2002-04-26 Richard Henderson <rth@redhat.com>
9509
9510 * parse.y (malloced_yyss, malloced_yyvs): New.
9511 (yyoverflow): Re-add. Set them.
9512 (free_parser_stacks): New.
9513
9514 2002-04-26 Mark Mitchell <mark@codesourcery.com>
9515
9516 PR c++/6497
9517 * method.c (do_build_assign_ref): Pass a derivation to
9518 build_method_call when calling base class assignment operators.
9519
9520 2002-04-26 Richard Henderson <rth@redhat.com>
9521
9522 * parse.y (yyoverflow): Revert.
9523
9524 2002-04-26 Richard Henderson <rth@redhat.com>
9525
9526 PR c/3581
9527 * parse.y (string): Remove. Update all uses to use STRING
9528 instead, and not call combine_strings.
9529 * rtti.c (tinfo_name): Use fix_string_type.
9530 * semantics.c (finish_asm_stmt): Don't call combine_strings.
9531 * spew.c (yylexstring): New.
9532 (read_token): Use it.
9533
9534 2002-04-25 Richard Henderson <rth@redhat.com>
9535
9536 PR c/2161
9537 * parse.y (yyoverflow): New.
9538
9539 2002-04-25 Jason Merrill <jason@redhat.com>
9540
9541 PR c++/5607
9542 * search.c (check_final_overrider): No longer static.
9543 * class.c (update_vtable_entry_for_fn): Call it.
9544 * cp-tree.h: Adjust.
9545
9546 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9547
9548 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9549 * cp-tree.h (cxx_set_yydebug): Die.
9550 * lex.c (YYDEBUG): Get from c-lex.h.
9551 (cxx_set_yydebug): Remove.
9552 * parse.y: Include c-lex.h.
9553 (YYDEBUG): Get from c-lex.h.
9554
9555 2002-04-24 Mark Mitchell <mark@codesourcery.com>
9556
9557 PR c++/6438.
9558 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9559 void.
9560
9561 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
9562
9563 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9564 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9565 Redefine.
9566 * cp-tree.h (cp_attribute_table): Rename.
9567 * decl.c (lang_attribute_table): Remove declaration.
9568 (cxx_init_decl_processing): Don't set it.
9569 * tree.c (cp_attribute_table): Rename.
9570
9571 2002-04-24 Jason Merrill <jason@redhat.com>
9572
9573 PR c++/6331
9574 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9575 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9576 The pedwarn for array assignment is now unconditional.
9577 * tree.c (build_cplus_array_type_1): Still process simple array types
9578 normally in templates.
9579
9580 PR c++/6395
9581 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9582 stuff for comdats.
9583
9584 2002-04-23 Jakub Jelinek <jakub@redhat.com>
9585
9586 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9587 node with attributes.
9588
9589 2002-2-23 David O'Brien <obrien@FreeBSD.org>
9590
9591 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9592 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9593
9594 2002-04-23 Mark Mitchell <mark@codesourcery.com>
9595
9596 PR c++/6256:
9597 * pt.c (tsubst_friend_class): Handle templates with explicit
9598 nested names.
9599
9600 PR c++/6331:
9601 * typeck.c (merge_types): Remember the cv-qualification of pointer
9602 types when merging them.
9603
9604 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
9605
9606 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9607 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9608 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9609 cxx_mark_function_context): New.
9610 * decl.c (push_cp_function_context, pop_cp_function_context,
9611 mark_cp_function_context): Rename for consistency.
9612 (cxx_init_decl_processing): Don't set old hooks.
9613
9614 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
9615
9616 * call.c (convert_type_from_ellipsis): Rename, update.
9617 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9618 * cp-tree.h (convert_type_from_ellipsis): Rename.
9619 * decl.c (cxx_init_decl_processing): Don't set hook.
9620
9621 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9622
9623 * call.c (build_new_method_call): Update.
9624 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9625 * cp-tree.h (cxx_incomplete_type_error): New.
9626 * decl.c (grokdeclarator, grokparms): Update.
9627 * decl2.c (check_classfn): Update.
9628 * pt.c (tsubst): Update.
9629 * typeck.c (complete_type_or_else, expr_sizeof,
9630 decay_conversion): Update.
9631 * typeck2.c (incomplete_type_error): Rename.
9632 (add_exception_specifier): Update.
9633
9634 2002-04-18 Jason Merrill <jason@redhat.com>
9635
9636 PR c++/5658
9637 * search.c (setup_class_bindings): A class template qualifies as a
9638 type binding.
9639
9640 2002-04-17 Jakub Jelinek <jakub@redhat.com>
9641
9642 PR c++/6316
9643 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9644 before expanding.
9645
9646 2002-04-16 Mark Mitchell <mark@codesourcery.com>
9647
9648 * init.c (begin_init_stmts): Remove commented out code.
9649 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9650 * semantics.c (begin_gobal_stmt_expr): Adjust call to
9651 expand_start_stmt_expr.
9652
9653 2002-04-15 Mark Mitchell <mark@codesourcery.com>
9654
9655 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9656 dso_handle itself, to __cxa_atexit.
9657
9658 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9659
9660 * error.c (cxx_print_error_function): Adjust call to macros.
9661
9662 2002-04-14 Jakub Jelinek <jakub@redhat.com>
9663
9664 * class.c (layout_virtual_bases): Do all dsize computation on trees.
9665
9666 2002-04-14 Jason Merrill <jason@redhat.com>
9667
9668 * typeck.c (get_member_function_from_ptrfunc): Don't do
9669 gratuitious division and multiplication on
9670 ptrmemfunc_vbit_in_delta targets.
9671
9672 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9673
9674 PR c++/5373.
9675 * semantics.c (finish_expr_stmt): Remember the type of the
9676 expression before any conversions are performed.
9677
9678 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9679
9680 PR c++/5189.
9681 * call.c (add_template_candidate_real): Do not treat member
9682 templates as copy constructors.
9683
9684 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9685
9686 * decl.c (duplicate_decls): Do not copy the RTL for a variable
9687 declaration if the old variable had an incomplete type and the new
9688 variable does not.
9689 (complete_vars): Do not call layout_decl for completed variables.
9690
9691 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
9692
9693 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9694 with an explicit one.
9695 (follow_tag_typedef): New.
9696 (lookup_tag): Use it to extract the tag of an explicit typedef.
9697 (xref_tag): Likewise.
9698
9699 2002-04-11 Andrew Haley <aph@redhat.com>
9700
9701 * typeck.c (type_after_usual_arithmetic_conversions):
9702 If two types have the same variant, return immediately.
9703 When two floating-point operands are the same precision:
9704 convert to float if one of the operands is float;
9705 if neither operand is one of the standard types, return the type
9706 of the first operand.
9707
9708 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
9709
9710 PR c++/5507
9711 * decl.c (make_typename_type): Remove implicit typenameness.
9712
9713 2002-04-09 Jason Merrill <jason@redhat.com>
9714
9715 PR optimization/6189
9716 * semantics.c (genrtl_start_function): Don't free
9717 DECL_SAVED_FUNCTION_DATA for inline functions.
9718
9719 * init.c (build_member_call): For now, don't convert to
9720 intermediate base if it would cause an error.
9721
9722 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
9723
9724 * parse.y (namespace_qualifier, maybe_identifier,
9725 begin_explicit_instantiation, end_explicit_instantiation,
9726 apparent_template_type, .finish_template_type,
9727 do_id, maybe_init, defarg_again, component_decl_1):
9728 Add ending ';', in accordance with POSIX.
9729
9730 2002-04-06 Mark Mitchell <mark@codesourcery.com>
9731
9732 PR c++/5571
9733 * class.c (layout_class_type): Remember incomplete static
9734 variables.
9735 (finish_struct_1): Call complete_vars, not
9736 hack_incomplete_structures.
9737 * cp-tree.h (hack_incomplete_structures): Rename to ...
9738 (complete_vars): ... this.
9739 (struct saved_scope): Remove incomplete.
9740 (namespace_scope_incomplete): Remove.
9741 * decl.c (struct binding_level): Remove incomplete.
9742 (incomplete_vars): New variable.
9743 (mark_binding_level): Don't mark incomplete.
9744 (print_binding_level): Don't print it.
9745 (mark_saved_scope): Don't mark incomplete.
9746 (pushdecl): Use maybe_register_incopmlete_var.
9747 (cxx_init_decl_processing): Register incomplete_vars for GC.
9748 (start_decl_1): Clarify error message.
9749 (hack_incomplete_vars): Remove.
9750 (maybe_register_incomplete_var): New function.
9751 (complete_vars): Likewise.
9752
9753 2002-04-06 Jason Merrill <jason@redhat.com>
9754
9755 PR c++/4934
9756 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9757 set before checking it.
9758
9759 PR c++/525
9760 * init.c (build_member_call): Use build_scoped_ref.
9761 (resolve_offset_ref): Likewise.
9762 * call.c (build_scoped_method_call): Likewise.
9763 * tree.c (maybe_dummy_object): Kludge around current_class_type being
9764 wrong.
9765 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9766 * cp-tree.h: Adjust.
9767
9768 * init.c (push_base_cleanups): Just use build_scoped_method_call.
9769
9770 PR c++/6179
9771 * method.c (implicitly_declare_fn): Pass unqualified type to
9772 synthesize_exception_spec.
9773
9774 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9775
9776 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9777 * cvt.c: Update comment.
9778 * init.c (expand_cleanup_for_base): Update.
9779 * semantics.c (finish_parenthesized_expr): Update.
9780 * typeck.c (cp_truthvalue_conversion): Update.
9781
9782 2002-04-04 Jason Merrill <jason@redhat.com>
9783
9784 * semantics.c (finish_eh_cleanup): New fn.
9785 * cp-tree.h: Add prototype.
9786 * init.c (perform_member_init, expand_cleanup_for_base): Use
9787 finish_eh_cleanup.
9788 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9789 * cp-tree.h: Remove references.
9790 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9791 * dump.c (cp_dump_tree): Likewise.
9792 * pt.c (tsubst_expr): Likewise.
9793 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9794 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9795 * tree.c (cp_statement_code_p): Likewise.
9796
9797 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9798
9799 PR c++/5636
9800 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9801 cleanup for nrv.
9802
9803 PR c++/5104
9804 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9805 specifiers.
9806 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9807
9808 2002-04-03 Richard Henderson <rth@redhat.com>
9809
9810 * cp-lang.c (cxx_warn_unused_global_decl): New.
9811 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9812
9813 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
9814
9815 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9816 * tree.c (init_tree): Don't set hook.
9817
9818 2002-04-03 Roger Sayle <roger@eyesopen.com>
9819
9820 PR c++/5998:
9821 * decl.c (duplicate_decls): Don't mess with assembler names when
9822 redeclaring builtin functions as static.
9823
9824 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9825
9826 * call.c (build_addr_func): Update.
9827 * class.c (resolve_address_of_overloaded_function): Update.
9828 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9829 * cp-tree.h (cxx_mark_addressable): New.
9830 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9831 * decl2.c (build_cleanup): Update.
9832 * except.c (build_throw): Update.
9833 * init.c (resolve_offset_ref): Update.
9834 * pt.c (convert_nontype_argument): Update.
9835 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9836 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9837 unary_complex_lvalue): Update.
9838 (mark_addressable): Rename.
9839
9840 2002-04-01 Roger Sayle <roger@eyesopen.com>
9841
9842 PR c++/5998:
9843 * decl.c (duplicate_decls): Overwrite the RTL when (and only
9844 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
9845 but follow the SET_DECL_RTL idiom used elsewhere in the function.
9846
9847 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9848
9849 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9850 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9851 * decl.c (grokdeclarator): Update.
9852 * mangle.c (write_integer_cst): Update.
9853 * typeck.c (build_binary_op): Update.
9854
9855 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9856
9857 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9858 * lex.c (cxx_init): Don't set hook.
9859
9860 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9861
9862 * Make-lang.in (error.o): Update.
9863 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9864 * cp-tree.h (struct diagnostic_context): Predeclare.
9865 (cxx_print_error_function): New.
9866 * error.c: Include langhooks-def.h.
9867 (lang_print_error_function): Rename. Update.
9868 (init_error): Don't set hook.
9869
9870 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9871
9872 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9873 Redefine.
9874 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9875 * decl.c (finish_enum): Similarly.
9876 * error.c (dump_type): Similarly.
9877 * lex.c (cxx_init): Similarly.
9878 * mangle.c (write_builtin_type): Similarly.
9879 * typeck.c (comptypes): Similarly.
9880
9881 2002-03-28 Roger Sayle <roger@eyesopen.com>
9882
9883 PR c++/5998:
9884 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9885 in the g++ front-end.
9886 (duplicate_decl): Allow redefinition of anticipated built-ins.
9887 Fix inlining problem by over-writing the old DECL_RTL.
9888 (lookup_namespace_name): Fail to find an identifier in the
9889 specified namespace if its still anticipated.
9890 (builtin_function_1): New function split out from builtin_function
9891 to create a builtin in the current namespace with given context.
9892 (builtin_function): Call builtin_function_1 to define the
9893 appropriate builtins in both the std and global namespaces.
9894 (select_decl): Don't test for anticipated decls here.
9895 (unqualified_namespace_lookup): Instead ignore them whilst
9896 searching through scopes and namespaces.
9897 * decl2.c (do_nonmember_using_decl): If a using declaration
9898 specifies an anticipated built-in function, mark it as no longer
9899 anticipated in that scope.
9900 (ambiguous_decl): Avoid resolving to an anticipated decl.
9901 * lex.c (do_scoped_id): Fail to find an identifier in the global
9902 namespace if its still anticipated.
9903
9904 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9905
9906 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9907 * cp-tree.h (cp_make_lang_type): Rename.
9908 * lex.c (cp_make_lang_type): Rename.
9909 (make_aggr_type): Update.
9910 * tree.c (init_tree): Don't set make_lang_type_fn.
9911
9912 2002-03-29 Jakub Jelinek <jakub@redhat.com>
9913
9914 PR c++/6073
9915 * class.c (finish_struct_1): Update static field's DECL_MODE even
9916 if its type is a variant of t.
9917
9918 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9919
9920 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9921 * cp-tree.h (cxx_insert_default_attributes): New.
9922 * decl.c (insert_default_attributes): Rename.
9923
9924 2002-03-27 Mark Mitchell <mark@codesourcery.com>
9925
9926 PR c++/4884
9927 * call.c (build_op_delete_call): Allow for the fact the placement
9928 may be a COMPOUND_EXPR.
9929
9930 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9931
9932 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9933 * cp-tree.h (init_cplus_expand): Remove.
9934 (cxx_expand_expr): New.
9935 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9936 fix prototype.
9937 (init_cplus_expand): Remove.
9938 * lex.c (cxx_init): Don't call init_cplus_expand.
9939
9940 2002-03-26 Mark Mitchell <mark@codesourcery.com>
9941
9942 PR c++/4884.
9943 * init.c (build_new_1): Allow for the fact the result of
9944 build_function_call may be a COMPOUND_EXPR.
9945
9946 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
9947
9948 PR c++/5682
9949 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9950 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9951 (dfs_skip_nonprimary_vbases_markedp): Remove.
9952 * search.c (get_shared_vbase_if_not_primary): Remove.
9953 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9954 (dfs_skip_nonprimary_vbases_markedp): Remove.
9955 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9956 (dfs_marked_real_bases_queue_p): Likewise.
9957
9958 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9959
9960 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9961 * cp-tree.h (cxx_mark_tree): New.
9962 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9963
9964 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9965
9966 * cp-tree.h (cxx_maybe_build_cleanup): New.
9967 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9968 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9969 * tree.c (build_target_expr): Update.
9970 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9971
9972 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
9973
9974 * decl2.c (cxx_decode_option): Handle -E.
9975 * lang-specs.h (default_compilers): Preprocess with cc1plus.
9976 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9977
9978 2002-03-23 Jakub Jelinek <jakub@redhat.com>
9979
9980 PR c++/6037
9981 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9982
9983 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9984
9985 * error.c (dump_type): Be careful about implicit typenames.
9986
9987 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9988
9989 PR C++/3656
9990 * semantics.c (finish_base_specifier): Handle erronous base
9991 classes.
9992
9993 2002-03-22 Zack Weinberg <zack@codesourcery.com>
9994
9995 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9996 REAL_IS_NOT_DOUBLE.
9997
9998 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
9999
10000 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
10001 an index into the vtable_entry array regardless of
10002 TARGET_PTRMEMFUNC_VBIT_LOCATION.
10003
10004 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
10005
10006 * tree.c (cp_cannot_inline_tree_fn): Same.
10007
10008 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
10009
10010 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
10011 insert_block, getdecls, global_bindings_p): New.
10012
10013 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
10014
10015 PR c++/4361
10016 * mangle.c (struct globals) Add internal_mangling_p member.
10017 (write_template_param): Do internal mangling, if needed.
10018 (mangle_conv_op_name_for_type): Request internal mangling.
10019
10020 2002-03-20 Jason Merrill <jason@redhat.com>
10021
10022 PR c++/2136
10023 * init.c (build_delete): Check access for a member op delete here.
10024 * decl2.c (delete_sanity): Not here.
10025
10026 2002-03-19 Jason Merrill <jason@redhat.com>
10027
10028 PR c++/5118
10029 * class.c (get_vfield_name): Use the constructor_name.
10030
10031 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
10032
10033 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
10034 * cp-tree.h (lang_printable_name): Rename.
10035 * error.c (lang_decl_name): Use new hook.
10036 * lex.c (cxx_init): Remove old hook.
10037 * pt.c (tsubst_decl): Use new hook.
10038 * tree.c (lang_printable_name): Rename.
10039
10040 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
10041
10042 PR c++/3882
10043 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
10044 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
10045 only after recording the declaration.
10046
10047 2002-03-18 Jason Merrill <jason@redhat.com>
10048
10049 PR c++/2039
10050 * init.c (resolve_offset_ref): Hand off to build_component_ref.
10051
10052 PR c++/4222, c++/5995
10053 * call.c (build_over_call): Fix empty class logic.
10054
10055 PR c++/3870
10056 * cp-tree.h (struct saved_scope): Add last_parms field.
10057 * decl.c (maybe_push_to_top_level): Save last_function_parms.
10058 (pop_from_top_level): Restore it.
10059
10060 PR c++/4377
10061 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
10062 NON_LVALUE_EXPRs.
10063
10064 PR c++/4003
10065 * pt.c (tsubst_friend_function): Use decl_namespace_context.
10066
10067 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
10068 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
10069 type with a nontrivial destructor.
10070
10071 2002-03-17 Jason Merrill <jason@redhat.com>
10072
10073 PR c++/4460
10074 * class.c (build_base_path): Virtual base layout is fixed in
10075 in-charge [cd]tors.
10076
10077 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
10078
10079 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
10080 * parse.y (yyparse): Remove macro.
10081
10082 2002-03-17 Jason Merrill <jason@redhat.com>
10083
10084 PR c++/5757
10085 * init.c (build_new_1): Pass the right pointer to op delete.
10086
10087 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
10088
10089 PR c++/4361
10090 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
10091 conversion operators go.
10092 (struct lang_decl_flags): Add template_conv_p and unused
10093 bitfields.
10094 (DECL_TEMPLATE_CONV_FN_P): New macro.
10095 * call.c (build_user_type_conversion_1): Don't check second type
10096 conversion of overload set first.
10097 * class.c (add_method): Make sure templated conversion operators
10098 all end up on slot 2.
10099 * lex.c (do_identifier): A conversion operator token might be
10100 satisfied by a templated conversion operator.
10101 * pt.c (check_explicit_specialization): Use
10102 CLASSTYPE_FIRST_CONVERSION_SLOT.
10103 (template_parm_this_level_p): New function.
10104 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
10105 * search.c (lookup_fnfields_1): Template conversions will be on
10106 the first slot.
10107 * typeck.c (build_component_ref): Preserve the type of an
10108 conversion operator name on the overload type.
10109 (build_x_function_call): Retrieve the conversion operator name.
10110
10111 2002-03-15 Richard Henderson <rth@redhat.com>
10112
10113 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10114
10115 2002-03-15 Mark Mitchell <mark@codesourcery.com>
10116
10117 * cp-tree.h (CLEANUP_DECL): Remove.
10118 (CLEANUP_EXPR): Likewise.
10119 * decl.c (destroy_local_var): Simplify.
10120 (maybe_build_cleanup): Tidy.
10121 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10122 * semantics.c (cp_expand_stmt): Likewise.
10123 * cp/tree.c (cp_statement_code_p): Likewise.
10124
10125 2002-03-15 Jason Merrill <jason@redhat.com>
10126
10127 PR c++/5857
10128 * decl.c (duplicate_decls): Use merge_types instead of common_type.
10129 * typeck.c (common_type): Just hand off to
10130 type_after_usual_arithmetic_conversions and
10131 composite_pointer_type.
10132 (merge_types): New fn.
10133 (commonparms): Use it instead of common_type.
10134 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10135 (composite_pointer_type): Also handle attributes.
10136 * cp-tree.h: Declare merge_types.
10137
10138 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10139 variables.
10140 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10141
10142 2002-03-14 Richard Henderson <rth@redhat.com>
10143
10144 * decl.c: Include c-pragma.h.
10145 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10146 * Make-lang.in: Update dependencies.
10147
10148 2002-03-14 Jakub Jelinek <jakub@redhat.com>
10149
10150 PR c++/5908
10151 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10152 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10153
10154 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10155
10156 * mangle.c (write_builtin_type): Handle 128-bit integers even if
10157 they are not a standard integer type.
10158
10159 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10160
10161 * cp-tree.h (init_init_processing): Remove declaration.
10162 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10163 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10164
10165 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10166
10167 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10168 Define.
10169 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10170 tree_code_length.
10171 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10172 cplus_tree_code_name): Delete.
10173 (cxx_init): Don't call add_c_tree_codes, instead set
10174 lang_unsafe_for_reeval. Don't try to copy into the various
10175 tree_code arrays.
10176
10177 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
10178
10179 PR c++/5659
10180 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10181 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10182 definitions.
10183
10184 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10185
10186 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
10187 DR209 is now not a defect.
10188 * cp-tree.h (skip_type_access_control): Remove.
10189 * decl.c (grokdeclarator): Do type access control for friend
10190 declarations.
10191 * semantics.c (decl_type_access_control): Don't reset
10192 current_type_lookups.
10193 (save_type_access_control): Always save the lookups.
10194 (skip_type_access_control): Remove.
10195 (finish_class_definition): Don't change type_lookups.
10196
10197 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10198
10199 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
10200 It is incorrect.
10201 * typeck.c (build_static_cast): Compare non-qualified types
10202 with pointer to member conversions.
10203
10204 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
10205 Daniel Berlin <dan@dberlin.org>
10206
10207 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10208 (cxx_get_alias_set): Use it.
10209
10210 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10211
10212 * cp-tree.h (stabilize_expr): Prototype.
10213
10214 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
10215
10216 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10217 conditional return void.
10218
10219 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
10220
10221 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10222 * cp-tree.h (cxx_unsave): New.
10223 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10224 (init_tree): Update.
10225
10226 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10227
10228 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10229 explicit sizeof/sizeof.
10230 * decl2.c (cxx_decode_option): Likewise.
10231 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10232
10233 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
10234
10235 PR c++/775
10236 * decl.c (lookup_tag): Only reject enum/class mismatch, not
10237 class/union mismatch.
10238 * parse.y (check_class_key): New function.
10239 (structsp): Call it.
10240
10241 2002-03-01 Michael Matz <matz@suse.de>
10242
10243 * typeck.c (cp_pointer_int_sum): Complete inner type which is
10244 used later by size_in_bytes().
10245
10246 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
10247
10248 * cp-tree.h: Require __GNUC__ to be #defined.
10249 (build_init): Add missing prototype.
10250
10251 2002-03-01 Jason Merrill <jason@redhat.com>
10252
10253 * except.c: Don't include decl.h or obstack.h. Do include
10254 tree-inline.h.
10255 (build_throw): Destroy temporaries from the thrown
10256 expression before calling __cxa_throw. Construct a thrown
10257 temporary directly into the exception object.
10258 (stabilize_throw_expr): New function.
10259 (wrap_cleanups_r): New function.
10260 * tree.c (stabilize_expr): New function.
10261 * init.c (build_init): New function.
10262 * Make-lang.in (cp/except.o): Adjust .h deps.
10263
10264 2002-02-28 Jason Merrill <jason@redhat.com>
10265
10266 * search.c (lookup_base_r): Don't clear is_non_public just because
10267 we found a friendly scope.
10268
10269 * decl.c (finish_function): Only warn about missing return
10270 statement with -Wreturn-type.
10271
10272 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
10273
10274 * class.c (build_clone): Update.
10275 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10276 * cp-tree.h (cxx_dup_lang_specific_decl): New.
10277 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10278 (copy_decl): Update.
10279 * method.c (make_thunk): Update.
10280
10281 2002-02-27 Zack Weinberg <zack@codesourcery.com>
10282
10283 * decl2.c: Delete traditional-mode-related code copied from
10284 the C front end but not used, or used only to permit the
10285 compiler to link.
10286
10287 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
10288
10289 PR c++/4093
10290 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10291 to void.
10292
10293 2002-02-22 Jakub Jelinek <jakub@redhat.com>
10294
10295 PR other/5746
10296 * semantics.c (finish_switch_cond): Don't call get_unwidened
10297 if error_mark_node.
10298
10299 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
10300
10301 PR c++/2645, DR 295
10302 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10303 tf_keep_type_decl.
10304 (make_typename_type): Use tsubst_flags_t.
10305 * decl.c (make_typename_type): Adjust. Return non-artificial
10306 TYPE_DECLs, if required.
10307 (grokdeclarator): Simplify CVR qualification handling. Allow bad
10308 qualifiers on typedef types.
10309 * decl2.c (handle_class_head): Adjust make_typename_type call.
10310 * parse.y (nested_name_specifier): Likewise.
10311 (typename_sub0): Likewise.
10312 (typename_sub1): Likewise.
10313 * pt.c (convert_template_argument): Adjust make_typename_type
10314 return value.
10315 (tsubst): Adjust cp_build_qualified_type_real calls.
10316 (check_cv_quals_for_unify): Cope with allowing bad qualifications
10317 on template type parms.
10318 (instantiate_decl): Recheck substitutions to give warnings on bad
10319 qualifications.
10320 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10321
10322 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
10323
10324 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10325
10326 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10327 unless DECL_ALWAYS_INLINE.
10328
10329 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10330
10331 * typeck.c (cp_pointer_int_sum): Renamed from
10332 pointer_int_sum, call pointer_int_sum.
10333
10334 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10335
10336 * decl.c (duplicate_decls): Return 0 if issued error about
10337 redeclaration.
10338
10339 2002-02-19 Jason Merrill <jason@redhat.com>
10340
10341 ABI change: Mangle `void (A::*)() const' as
10342 M1AKFvvE, not MK1AFvvE.
10343 * mangle.c (write_function_type): Write cv-quals for member
10344 function type here.
10345 (write_pointer_to_member_type): Not here.
10346
10347 2002-02-18 Jason Merrill <jason@redhat.com>
10348
10349 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10350 (do_decl_instantiation): Likewise.
10351
10352 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
10353
10354 PR c++/5685
10355 * decl.c (duplicate_decls): Make warning unconditional
10356 if duplicate default argument declarations are present.
10357
10358 2002-02-17 Jakub Jelinek <jakub@redhat.com>
10359
10360 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10361 shortening.
10362
10363 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
10364
10365 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10366 remove incorrect comment. Move #if 0'd code to common path. Use
10367 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10368
10369 2002-02-13 Jason Merrill <jason@redhat.com>
10370
10371 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10372 (finish_function): Don't warn if current_function_returns_null.
10373
10374 * typeck2.c (digest_init): Do handle values of vector type.
10375
10376 * typeck2.c (digest_init, process_init_constructor): Treat vectors
10377 like arrays.
10378
10379 2002-02-11 Jason Merrill <jason@redhat.com>
10380
10381 * parse.y (reserved_declspecs): Don't handle attributes.
10382 (reserved_typespecquals): Handle them here.
10383 * Make-lang.in (parse.c): Adjust expected conflicts.
10384
10385 2002-02-08 Jakub Jelinek <jakub@redhat.com>
10386
10387 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10388 instead of compstmt.
10389 (compstmt_or_stmtexpr): Renamed from compstmt.
10390 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10391
10392 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10393
10394 Rename instantiate_type_flags to tsubst_flags_t & expand use.
10395 * cp-tree.h (instantiate_type_flags): Rename to ...
10396 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10397 add tf_warning flag.
10398 (instantiate_type): Adjust prototype.
10399 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10400 do_type_instantiation, cp_build_qualified_type_real): Likewise.
10401 cp_build_qualified_type: Adjust.
10402 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10403 tf_*.
10404 * call.c (standard_conversion): Rename itf_* to tf_*.
10405 (reference_binding): Likewise.
10406 (convert_like_real): Likewise.
10407 * cvt.c (cp_convert_to_pointer): Likewise.
10408 (convert_to_reference): Likewise.
10409 * decl.c (lookup_namespace_name): Use tf_* flags.
10410 (make_typename_type): Likewise.
10411 (grokdeclarator): Likewise.
10412 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10413 (coerce_template_template_parms, convert_template_argument,
10414 coerce_template_parms, maybe_get_template_decl_from_type_decl,
10415 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10416 instantiate_class_template, tsubst_template_arg_vector,
10417 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10418 tsubst_decl, tsubst_arg_types, tsubst_function_type,
10419 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10420 instantiate_template, fn_type_unification,
10421 resolve_overloaded_unification, verify_class_unification,
10422 unify, get_bindings_real, do_type_instantiation,
10423 regenerate_decl_from_template, instantiate_decl,
10424 tsubst_initializer_list, tsubst_enum,
10425 get_mostly_instantiated_function_type,
10426 invalid_nontype_parm_type_p): Likewise.
10427 * tree.c (cp_build_qualified_type_real): Likewise.
10428 * typeck.c (build_binary_op): Rename itf_* to tf_*.
10429 (build_ptrmemfunc): Likewise.
10430 (convert_for_assignment): Likewise.
10431
10432 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10433
10434 PR c++/109
10435 * decl.c (grokdeclarator): Allow friend declarations from
10436 dependent types.
10437 * decl2.c (handle_class_head): Don't push into template parm contexts.
10438 * pt.c (push_template_decl_real): Template parm contexts are never
10439 being defined.
10440
10441 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
10442
10443 * class.c: Include target.h.
10444 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10445 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10446 bit-field layout.
10447 * Make-lang.in: Adjust deps.
10448
10449 2002-02-05 Jason Merrill <jason@redhat.com>
10450
10451 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10452
10453 2002-02-04 Jakub Jelinek <jakub@redhat.com>
10454
10455 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10456 (finish_switch_cond): Set SWITCH_TYPE.
10457
10458 2002-02-04 Richard Henderson <rth@redhat.com>
10459
10460 * method.c (use_thunk): Always initialize the block tree. Reindent.
10461 * semantics.c (expand_body): Emit thunks after function, not before.
10462
10463 2002-02-04 Jason Merrill <jason@redhat.com>
10464
10465 * decl.c (start_function): Call cplus_decl_attributes immediately
10466 after grokdeclarator.
10467
10468 * decl.c (start_function): Combine DECL_RESULT handling code.
10469
10470 2002-02-03 Jason Merrill <jason@redhat.com>
10471
10472 * xref.c: Remove.
10473 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10474 (cp/xref.o): Remove dependencies.
10475 * class.c (finish_struct_1, check_methods): Don't call xref fns.
10476 (finish_struct_1): Likewise.
10477 * friend.c (make_friend_class): Likewise.
10478 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10479 * spew.c (read_process_identifier): Likewise.
10480
10481 2002-02-01 Jason Merrill <jason@redhat.com>
10482
10483 PR c++/4872
10484 * decl.c (finish_function): Warn about a non-void function with
10485 no return statement and no abnormal exit.
10486 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10487 (current_function_returns_abnormally): New macro.
10488 * call.c (build_call): Set it.
10489
10490 * typeck.c (build_component_ref): Always complain about offsetof
10491 constructs on non-PODs. Only make it an error for members of
10492 virtual bases.
10493
10494 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10495 (dump_function_decl): Always dump parms.
10496
10497 * decl2.c (finish_static_data_member_decl): Complain about a local
10498 class with a static data member.
10499
10500 PR c++/4286
10501 * search.c (lookup_field_1): Don't xref a static data member
10502 just because we looked it up.
10503
10504 2002-01-31 Jason Merrill <jason@redhat.com>
10505
10506 * Make-lang.in (parse.c): Handle .output file.
10507
10508 PR c++/3395
10509 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10510 not TREE_TYPE.
10511 * semantics.c (finish_class_definition): Adjust.
10512
10513 Allow attributes in parms and casts.
10514 * parse.y (named_parm): Don't strip attrs.
10515 (declmods): Remove 'attributes' production.
10516 (nonempty_cv_qualifiers): Accept attributes.
10517 (ATTRIBUTE): Give precedence.
10518 * decl.c (groktypename): Handle attributes.
10519 (grokparms): Likewise.
10520
10521 2002-01-29 Jakub Jelinek <jakub@redhat.com>
10522
10523 * decl2.c (cxx_decode_option): Pass 0 as last argument to
10524 cpp_handle_option.
10525 * lang-specs.h: Use cpp_unique_options instead of cpp_options
10526 when used together with cc1_options.
10527
10528 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
10529
10530 PR c++/5132
10531 * typeck2.c (digest_init): Make sure non-array core type is
10532 instantiated.
10533 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10534 constructor, rather than build a new one.
10535 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10536 PURPOSE of constructor elts.
10537
10538 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10539
10540 * Make-lang.in (parse.c): Adjust expected number of
10541 shift-reduce conflicts.
10542 (decl.o): Depend on diagnostic.h.
10543 * decl.c: Include diagnostic.h.
10544 (grokdeclarator): Check for null pointer.
10545 (finish_function): Don't abort when
10546 current_binding_level->parm_flag != 1, if errors have
10547 occurred; throw away the statement tree and extra binding
10548 levels, and continue.
10549 * lex.c (note_list_got_semicolon): Check for null pointer.
10550 * method.c (hack_identifier): Just return error_mark_node if
10551 value is error_mark_node.
10552 * parse.y (primary: TYPEID(type_id)): No need to use
10553 TYPE_MAIN_VARIANT here.
10554 (handler_seq): Accept an empty list of catch clauses and
10555 generate a fake handler block to avoid later crashes.
10556 (ansi_raise_identifier): Accept the error token too.
10557 * semantics.c (begin_class_definition,
10558 finish_class_definition): Check for error_mark_node.
10559
10560 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10561
10562 * typeck2.c (friendly_abort): Delete definition.
10563 * cp-tree.h (friendly_abort): Don't prototype.
10564 (my_friendly_assert): Use fancy_abort.
10565
10566 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10567
10568 * cp-tree.h (my_friendly_abort): Remove.
10569
10570 2002-01-23 Jakub Jelinek <jakub@redhat.com>
10571
10572 * spew.c (pending_inlines, pending_inlines_tail,
10573 processing_these_inlines): Make static.
10574 (mark_pending_inlines): Remove static.
10575 (begin_parsing_inclass_inline): If in function, save pi
10576 for GC to cp_function_chain->unparsed_inlines instead.
10577 (process_next_inline): Likewise.
10578 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10579 (mark_pending_inlines): Add prototype.
10580 * decl.c (spew_debug): Remove unused extern.
10581 (mark_lang_function): Call mark_pending_inlines.
10582
10583 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10584
10585 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10586 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10587 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10588 Change my_fancy_abort() to abort().
10589
10590 2002-01-23 Jason Merrill <jason@redhat.com>
10591
10592 PR c++/5453
10593 * class.c (fixed_type_or_null): Fix thinko.
10594
10595 PR c++/3331
10596 * init.c (resolve_offset_ref): Use build_indirect_ref.
10597
10598 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10599
10600 2002-01-22 Jason Merrill <jason@redhat.com>
10601
10602 * parse.y (function_body): Suppress the block for the outermost
10603 curly braces.
10604 * decl.c (pushdecl): Don't try to skip it.
10605 (begin_function_body): Keep the block we create, not the next one.
10606 * init.c (emit_base_init): Don't mess with keep_next_level.
10607
10608 * class.c (build_base_path): Tweak formatting.
10609
10610 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
10611
10612 Fix regression introduced with patch for c++/775
10613 * parse.y (class_head_defn): Check for template specializations
10614 with a different class-key.
10615
10616 2002-01-17 Jason Merrill <jason@redhat.com>
10617
10618 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10619 (begin_function_body): Call them and keep_next_level.
10620 * init.c (emit_base_init): Call keep_next_level.
10621 * semantics.c (setup_vtbl_ptr): Lose.
10622 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10623 (vtbls_set_up_p): Lose.
10624 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10625 * method.c (do_build_copy_constructor): Likewise.
10626 (synthesize_method): Call finish_mem_initializers.
10627 * parse.y (nodecls): Likewise.
10628
10629 * error.c (dump_type_suffix): Print the exception specs before
10630 recursing.
10631 (dump_function_decl): Here, too.
10632
10633 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10634
10635 2002-01-10 Ira Ruben <ira@apple.com>
10636
10637 PR c++/907
10638 * decl.c (start_method): Handle attrlist.
10639
10640 2002-01-10 Jakub Jelinek <jakub@redhat.com>
10641
10642 * decl2.c (max_tinst_depth): Increase default limit to 500.
10643
10644 2002-01-10 Graham Stott <grahams@redhat.com>
10645
10646 * spew.c (YYCHAR): Uppercase macro parameter and add
10647 parenthesis.
10648 (YYCODE): Likewise.
10649 (NAME): Uppercase macro parameter.
10650
10651 2002-01-09 Graham Stott <grahams@redhat.com>
10652
10653 * decl.h (grokdeclarator): Wrap long line.
10654
10655 * semantics.c (FINISH_COND): Uppercase macro paramaters and
10656 add parenthesis.
10657
10658 2002-01-08 Graham Stott <grahams@redhat.com>
10659
10660 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10661 (PALLOC): Uppercase macro parameter and whitespace.
10662 (SALLOC): Uppercase macro parameter.
10663 (SFREE): Uppercase macros parameter, add parenthese and
10664 whitespace.
10665 (STREQL): Uppercase macro parameter and whitespace.
10666 (STRNEQ): Likewise.
10667 (STRLSS): Likewise.
10668 (STRLEQ): Likewise.
10669 (STRGTR): Likewise.
10670 (STRGEQ): Likewise.
10671
10672 * call.c (convert_like): Add parenthesis and wrap.
10673 (convert_like_with_context): Likewise.
10674 (ICS_RANK): Whitespace.
10675 (NEED_TEMPORARY_P): Remove parenthesis.
10676
10677 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10678 whitespace.
10679 (VTT_MARKED_BINFO_P): Likewise.
10680
10681 * decl.c (BINDING_LEVEL): Add parenthesis.
10682 (DEF_OPERATOR): Likewise.
10683
10684 * mangle.c (MANGLE_TRACE): Add parenthesis.
10685 (MANGLE_TRACE_TREE): Likewise.
10686 (write_signed_number): Likewise.
10687 (write_unsigned_number): Likewise.
10688
10689 * pt.c (ccat): Uppercase macro parameter.
10690 (cat): Likewise
10691
10692 * search.c (SET_BINFO_ACCESS): Add parenthesis.
10693
10694 2002-01-07 Jason Merrill <jason@redhat.com>
10695
10696 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10697 to pedwarn.
10698
10699 PR c++/3536
10700 * method.c (make_thunk): If !flag_weak, give the thunk the
10701 function's linkage.
10702 (use_thunk): Here, too.
10703
10704 2002-01-07 Graham Stott <grahams@redhat.com>
10705
10706 * error.c: Update copyright date.
10707 (print_scope_operator): Add parenthesis.
10708 (print_left_paren): Likewise.
10709 (print_right_paren): Likewise.
10710 (print_left_bracket): Likewise.
10711 (print_right_bracket): Likewise.
10712 (print_template_argument_list_start): Likewise.
10713 (print_template_argument_list_end): Likewise.
10714 (print_non_consecutive_character): Likewise.
10715 (print_tree_identifier): Likewise.
10716 (print_identifier): Likewise.
10717 (NEXT_CODE): Uppercase macro parameter.
10718 (ident_fndecl): Delete unused.
10719 (GLOBAL_THING): Likewise.
10720
10721 2002-01-06 Graham Stott <grahams@redhat.com>
10722
10723 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10724 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10725 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10726 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10727 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10728 (C_IS_RESERVED_WORD): Uppercase macro parameter.
10729 (C_RID_YYCODE) Likewise.
10730 (ptrmem_cst): Use rtx.
10731 (LOCAL_BINDING_P): Add whitespace.
10732 (INHERITED_VALUE_BINDING_P): Likewise.
10733 (BINDING_SCOPE): Wrap long line.
10734 (BINDING_HAS_LEVEL_P): Remove parenthesis.
10735 (BINDING_VALUE): Wrap long line.
10736 (BINDING_TYPE): Whitespace.
10737 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10738 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10739 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10740 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10741 (same_type_p): Uppercase macro parameters.
10742 (same_type_ignoring_top_level_qualifiers_p): Likewise.
10743 (OVL_FUNCTION): Wrap long line.
10744 (OVL_CHAIN): Whitespace.
10745 (OVL_CURRENT): Add parenthesis and whitespace.
10746 (OVL_NEXT): Whitespace.
10747 (OVL_USED): Likewise.
10748 (IDENTIFIER_TYPE_VALUE): Likewise.
10749 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10750 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10751 (LANG_ID_FIELD): Whitespace.
10752 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10753 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10754 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10755 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10756 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10757 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10758 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10759 (IDENTIFIER_VIRTUAL_P): Likewise.
10760 (IDENTIFIER_OPNAME_P): Likewise.
10761 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10762 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10763 (C_SET_EXP_ORIGINAL_CODE): Likewise.
10764 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10765 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10766 (IS_AGGR_TYPE): Uppercase macro parameter.
10767 (CLASS_TYPE_P): Likewise.
10768 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10769 (IS_AGGR_TYPE_2): Whitespace.
10770 (TAGGED_TYPE_P): Uppercase macro parameter.
10771 (TYPE_BUILT_IN): Whitespace.
10772 (TYPE_FOR_JAVA): Likewise.
10773 (FUNCTION_ARG_CHAIN): Remove parenthesis.
10774 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10775 (FUNCTION_FIRST_USER_PARAM): Likewise.
10776 (PROMOTES_TO_AGGR_TYPE): Whitespace.
10777 (DERIVED_FROM_P): Add parenthesis and wrap.
10778 (UNIQUELY_DERIVED_FROM_P): Likewise.
10779 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10780 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10781 (CLASSTYPE_USE_TEMPLATE): Whitespace.
10782 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10783 (TYPE_GETS_DELETE): Add parenthesis.
10784 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10785 (TYPE_HAS_ASSIGN_REF): Likewise,
10786 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10787 (TYPE_HAS_INIT_REF): Likewise.
10788 (TYPE_HAS_CONST_INIT_REF): Likewise.
10789 (TYPE_BEING_DEFINED): Likewise.
10790 (TYPE_LANG_SPECIFIC): Likewise.
10791 (CLASSTYPE_RTTI): Likewise.
10792 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10793 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10794 (TYPE_OVERLOADS_ARROW): Likewise.
10795 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10796 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10797 (CLASSTYPE_METHOD_VEC): Likewise.
10798 (CLASSTYPE_MARKED_N): Likewise.
10799 (CLASSTYPE_MARKED): Likewise.
10800 (CLASSTYPE_MARKED2): Likewise.
10801 (CLASSTYPE_MARKED3): Likewise.
10802 (CLASSTYPE_MARKED4): Likewise.
10803 (CLASSTYPE_MARKED5): Likewise.
10804 (CLASSTYPE_MARKED6): Likewise.
10805 (SET_CLASSTYPE_MARKED): Whitespace.
10806 (CLEAR_CLASSTYPE_MARKED): Likewise.
10807 (SET_CLASSTYPE_MARKED2): Likewise.
10808 (CLEAR_CLASSTYPE_MARKED2): Likewise.
10809 (SET_CLASSTYPE_MARKED3): Likewise.
10810 (CLEAR_CLASSTYPE_MARKED3): Likewise.
10811 (SET_CLASSTYPE_MARKED4): Likewise.
10812 (CLEAR_CLASSTYPE_MARKED4): Likewise.
10813 (SET_CLASSTYPE_MARKED5): Likewise.
10814 (CLEAR_CLASSTYPE_MARKED5): Likewise.
10815 (SET_CLASSTYPE_MARKED6): Likewise.
10816 (CLEAR_CLASSTYPE_MARKED6): Likewise.
10817 (CLASSTYPE_TAGS): Likewise.
10818 (CLASSTYPE_VSIZE): Likewise.
10819 (CLASSTYPE_VBASECLASSES): Likewise.
10820 (CANONICAL_BINFO): Add parenthesis.
10821 (CLASSTYPE_SIZE(NODE): Likewise.
10822 (CLASSTYPE_SIZE_UNIT): Likewise.
10823 (CLASSTYPE_ALIGN(NODE): Likewise.
10824 (CLASSTYPE_USER_ALIGN): Likewise.
10825 (TYPE_JAVA_INTERFACE): Likewise.
10826 (CLASSTYPE_PURE_VIRTUALS): Likewise.
10827 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10828 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10829 (CLASSTYPE_HAS_MUTABLE): Likewise.
10830 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10831 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10832 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10833 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10834 (CLASSTYPE_INTERFACE_ONLY): Likewise.
10835 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10836 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10837 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10838 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10839 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10840 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10841 (BINFO_UNSHARED_MARKED): Whitespace.
10842 (BINFO_MARKED): Whitespace and wrap.
10843 (SET_BINFO_MARKED): Likewise.
10844 (CLEAR_BINFO_MARKED): Likewise.
10845 (BINFO_VTABLE_PATH_MARKED): Likewise.
10846 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10847 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10848 (BINFO_SUBVTT_INDEX): Remove parenthesis.
10849 (BINFO_VPTR_INDEX): Likewise.
10850 (BINFO_PRIMARY_BASE_OF): Likewise,
10851 (CLASSTYPE_VFIELDS): Whitespace.
10852 (VF_DERIVED_VALUE): Wrap long line.
10853 (NAMESPACE_LEVEL): Whitespace.
10854 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10855 (DEFARG_POINTER): Whitespace.
10856 (DECL_NEEDED_P): Remove parenthesis.
10857 (DECL_LANGUAGE): Whitespace.
10858 (SET_DECL_LANGUAGE): Add parenthesis.
10859 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10860 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10861 (DECL_IN_AGGR_P): Whitespace.
10862 (DECL_FRIEND_P): Likewise.
10863 (DECL_BEFRIENDING_CLASSES): Likewise.
10864 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10865 (DECL_NONCONVERTING_P): Whitespace.
10866 (DECL_PURE_VIRTUAL_P): Likewise.
10867 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10868 (DECL_PENDING_INLINE_INFO): Whitespace.
10869 (DECL_SORTED_FIELDS): Likewise.
10870 (DECL_DEFERRED_FN): Likewise.
10871 (DECL_TEMPLATE_INFO): Likewise.
10872 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10873 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10874 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10875 (TMPL_ARGS_LEVEL): Likewise.
10876 (SET_TMPL_ARGS_LEVEL): Likewise.
10877 (INNERMOST_TEMPLATE_PARMS): Whitespace.
10878 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10879 (INTEGRAL_CODE_P(CODE): Add parenthesis.
10880 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10881 (TYPE_HAS_CONSTRUCTOR): Whitespace.
10882 (TREE_HAS_CONSTRUCTOR): Likewise.
10883 (TYPE_HAS_DESTRUCTOR): Likewise.
10884 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10885 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10886 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10887 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10888 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10889 (TYPE_PTRMEMFUNC_P): Likewise.
10890 (TYPE_PTRMEMFUNC_FLAG): Likewise.
10891 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10892 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10893 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10894 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10895 (DECL_ACCESS): Whitespace.
10896 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10897 (DECL_GLOBAL_DTOR_P): Likewise.
10898 (GLOBAL_INIT_PRIORITY): Likewise.
10899 (DECL_TEMPLATE_PARMS): Likewise.
10900 (DECL_TEMPLATE_RESULT): Likewise.
10901 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10902 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10903 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10904 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10905 (PRIMARY_TEMPLATE_P): Add parenthesis.
10906 (DECL_USE_TEMPLATE): Whitespace.
10907 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10908 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10909 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10910 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10911 (CALL_DECLARATOR_PARMS): Remove parenthesis.
10912 (CALL_DECLARATOR_QUALS): Likewise.
10913 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10914 (TEMP_NAME_P): Wrap.
10915 (VFIELD_NAME_P): Likewise.
10916 (B_SET): Uppercase macro parameters and add parenthesis.
10917 (B_CLR): Likewise.
10918 (B_TST): Likewise.
10919 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10920 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10921 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10922 (same_or_base_type_p): Likewise.
10923 (cp_deprecated): Likewise.
10924
10925 2002-01-05 Richard Henderson <rth@redhat.com>
10926
10927 * semantics.c (expand_body): Revert last change.
10928
10929 2002-01-04 Jason Merrill <jason@redhat.com>
10930
10931 PR c++/4122
10932 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10933 lost primary.
10934
10935 * class.c (build_vtbl_initializer): Check for a lost primary
10936 before calculating the vtable entry to throw away.
10937
10938 2002-01-02 Jason Merrill <jason@redhat.com>
10939
10940 * semantics.c (expand_body): Call outlining_inline_function when
10941 emitting an inline function out of line.
10942
10943 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10944
10945 PR c++/5116, c++/764 reversion
10946 * call.c (build_new_op): Revert the instantiations. They are
10947 incorrect.
10948
10949 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10950
10951 PR c++/5089
10952 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10953
10954 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10955
10956 PR c++/3716
10957 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10958 (tsubst, case POINTER_TYPE): Handle pmfs here.
10959 (tsubst, case OFFSET_TYPE): Check it is not an offset to
10960 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10961
10962 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10963
10964 PR c++/35
10965 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10966 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10967 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10968 PARM_DECL.
10969 (tsubst_template_parms): Break up loop statements.
10970 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10971 parm PARM_DECLs don't get promoted.
10972
10973 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10974
10975 PR c++/5123
10976 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10977 (build_x_function_call): Cope with a COMPONENT_REF containing a
10978 TEMPLATE_ID_EXPR.
10979
10980 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10981
10982 PR c++/5213
10983 * pt.c (convert_template_argument): Be more careful determining
10984 when RECORD_TYPE templates are or are not templates.
10985
10986 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10987
10988 PR c++/775
10989 * cp-tree.h (handle_class_head): Adjust prototype.
10990 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10991 parameters. Use for all class heads.
10992 * parse.y (named_class_head_sans_basetype, named_class_head,
10993 named_complex_class_head_sans_basetype,
10994 named_class_head_sans_basetype_defn,
10995 unnamed_class_head): Remove.
10996 (class_head, class_head_apparent_template): Recognize class heads
10997 (class_head_decl, class_head_defn): New reductions. Process class
10998 heads.
10999 (structsp): Adjust class definition and class declaration
11000 reductions.
11001 (maybe_base_class_list): Give diagnostic on empty list.
11002
11003 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11004
11005 PR c++/4379
11006 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
11007 single non-static member.
11008 (unary_complex_lvalue): If it cannot be a pointer to member, don't
11009 make it so. Check it is not pointer to reference.
11010
11011 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11012
11013 PR c++/5132
11014 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
11015 are processing a template decl.
11016
11017 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11018
11019 PR c++/5116, c++/764
11020 * call.c (build_new_op): Make sure template class operands are
11021 instantiated. Simplify arglist construction.
11022
11023 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11024
11025 * call.c (build_user_type_conversion_1): Use my_friendly_assert
11026 rather than if ... abort.
11027 * cvt.c (convert_to_reference): Likewise.
11028 * semantics.c (setup_vtbl_ptr): Likewise.
11029 * pt.c (lookup_template_class): Comment typo.
11030
11031 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11032
11033 PR c++/5125
11034 * pt.c (push_template_decl_real): Make sure DECL has
11035 DECL_LANG_SPECIFIC.
11036
11037 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11038
11039 PR c++/335
11040 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
11041 for non-reference fields.
11042 * typeck.c (require_complete_type): Use resolve_offset_ref).
11043
11044 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
11045
11046 PR c++/196
11047 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
11048
11049 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
11050
11051 PR c++/160
11052 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
11053 up. Don't stabilize_references when initializing a reference.
11054
11055 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11056
11057 * decl2.c (lang_f_options): Const-ify.
11058
11059 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
11060
11061 * config-lang.in (diff_excludes): Remove.
11062
11063 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
11064
11065 PR c++/90
11066 * typeck.c (build_function_call_real): Use original function
11067 expression for errors.
11068
11069 2001-12-18 Jason Merrill <jason@redhat.com>
11070
11071 PR c++/3242
11072 * class.c (add_method): Do compare 'this' quals when trying to match a
11073 used function. Don't defer to another used function.
11074
11075 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11076
11077 * pt.c (instantiate_clone): Remove, fold into ...
11078 (instantiate_template): ... here. Simplify by removing mutual
11079 recursion.
11080 * typeck2.c (build_m_component_ref): Don't cv qualify the function
11081 pointed to by a pointer to function.
11082 * class.c (delete_duplicate_fields_1): Typo.
11083
11084 2001-12-18 Jason Merrill <jason@redhat.com>
11085
11086 C++ ABI change: destroy value arguments in caller.
11087 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
11088 create an extra binding level for the parameters.
11089 * decl.c (store_parm_decls): Don't do parameter cleanups.
11090
11091 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11092
11093 * call.c (build_new_method_call): Use '%#V'.
11094 * error.c (cv_to_string): Use V parameter to determine padding.
11095
11096 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
11097
11098 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
11099 spellings in messages.
11100
11101 2001-12-17 Zack Weinberg <zack@codesourcery.com>
11102
11103 * cp-tree.h: Delete #defines for cp_error, cp_warning,
11104 cp_pedwarn, and cp_compiler_error.
11105 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
11106 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
11107 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
11108 typeck2.c: Change calls to the above macros to use their
11109 language-independent equivalents: error, warning, pedwarn, and
11110 internal_error respectively.
11111
11112 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
11113
11114 * decl2.c (finish_file): Remove back_end_hook.
11115
11116 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
11117
11118 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11119 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11120 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11121
11122 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
11123
11124 * lang-options.h: Use American spelling in messages.
11125
11126 2001-12-13 Jason Merrill <jason@redhat.com>
11127
11128 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11129
11130 Use cleanups to run base and member destructors.
11131 * init.c (push_base_cleanups): New function, split out from...
11132 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
11133 * decl.c (finish_destructor_body): Move vbase destruction code to
11134 push_base_cleanups.
11135 (begin_function_body, finish_function_body): New fns.
11136 (finish_function): Move [cd]tor handling and call_poplevel to
11137 finish_function_body.
11138 (pushdecl): Skip the new level.
11139 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11140 (setup_vtbl_ptr): Call push_base_cleanups.
11141 * method.c (synthesize_method): Call {begin,end}_function_body.
11142 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11143 * cp-tree.h: Declare new fns.
11144 * parse.y (function_body, .begin_function_body): New nonterminals.
11145 (fndef, pending_inline, function_try_block): Use function_body.
11146 (ctor_initializer_opt, function_try_block): No longer has a value.
11147 (base_init): Remove .set_base_init token.
11148 (.set_base_init, compstmt_or_error): Remove.
11149 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11150
11151 * optimize.c (maybe_clone_body): Fix parameter updating.
11152
11153 2001-12-12 Jason Merrill <jason@redhat.com>
11154
11155 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11156 * semantics.c (genrtl_start_function): Don't pass
11157 parms_have_cleanups or push an extra binding level.
11158 (genrtl_finish_function): Lose cleanup_label cruft.
11159
11160 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11161 (ctor_label): Remove.
11162 * semantics.c (finish_return_stmt): Lose ctor_label support.
11163 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11164 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11165 dtor_label.
11166
11167 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11168 check for [cd]tors.
11169 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11170
11171 * decl.c (finish_function): Check VMS_TARGET, not VMS.
11172
11173 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11174 (end_cleanup_fn): And poplevel.
11175
11176 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11177 if we're in a template.
11178
11179 2001-12-12 Jakub Jelinek <jakub@redhat.com>
11180
11181 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11182 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11183 THIS_NAME_P): Delete.
11184 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11185 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11186 with internal naming scheme.
11187 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11188
11189 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
11190
11191 * decl.c (grokdeclarator): Deprecated implicit typename use.
11192
11193 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
11194
11195 PR g++/51
11196 * parse.y (frob_specs): Indicate it is a language linkage which
11197 contained the extern.
11198 * decl.c (grokdeclarator): Allow extern language linkage with
11199 other specifiers.
11200
11201 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
11202
11203 PR g++/72
11204 * decl.c (add_binding): Don't reject duplicate typedefs involving
11205 template parameters.
11206
11207 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
11208
11209 * parse.y, semantics.c: Similarly.
11210
11211 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
11212
11213 PR g++/87
11214 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11215 (copy_args_p): Rename to ...
11216 (copy_fn_p): ... here.
11217 (grok_special_member_properties): New function.
11218 (grok_op_properties): Lose VIRTUALP parameter.
11219 (copy_assignment_arg_p): Remove.
11220 * call.c (build_over_call): Use copy_fn_p.
11221 * decl.c (grokfndecl): Reformat. Adjust call to
11222 grok_op_properties.
11223 (copy_args_p): Rename to ...
11224 (copy_fn_p): ... here. Reject template functions. Check for pass
11225 by value.
11226 (grok_special_member_properties): Remember special functions.
11227 (grok_ctor_properties): Don't remember them here, just check.
11228 (grok_op_properties): Likewise.
11229 (start_method): Call grok_special_member_properties.
11230 * decl2.c (grokfield): Likewise.
11231 (copy_assignment_arg_p): Remove.
11232 (grok_function_init): Don't remember abstract assignment here.
11233 * pt.c (instantiate_class_template): Call
11234 grok_special_member_properties.
11235 (tsubst_decl): Adjust grok_op_properties call.
11236
11237 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
11238
11239 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11240 RID_TYPES_COMPATIBLE_P.
11241
11242 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11243
11244 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11245 call to build_aggr_init.
11246 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11247
11248 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
11249
11250 * parse.y: Replace uses of the string non-terminal with STRING.
11251 Don't perform string concatentaion here.
11252 (string): Remove non-terminal.
11253 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11254
11255 2001-12-05 Jason Merrill <jason@redhat.com>
11256
11257 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11258 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11259 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11260 * pt.c (push_tinst_level): No longer static.
11261 * cp-tree.h: Declare them.
11262
11263 * init.c (resolve_offset_ref): Don't check access for the base
11264 conversion to access a FIELD_DECL.
11265
11266 * cp-tree.h (TYPE_REFFN_P): New macro.
11267 * decl.c (bad_specifiers): Check it, too.
11268
11269 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11270 on the __*_type_info type if we haven't seen a definition.
11271
11272 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
11273
11274 * decl.c: Include c-common.h.
11275 (shadow_warning): Move to c-common.c.
11276
11277 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11278
11279 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11280
11281 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11282
11283 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11284
11285 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11286
11287 PR g++/164
11288 * init.c (sort_base_init): Allow binfos to be directly specified.
11289 * method.c (do_build_copy_constructor): Explicitly convert to the
11290 base instance.
11291 (do_build_assign_ref): Likewise.
11292
11293 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
11294
11295 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11296 declaration and initialization.
11297
11298 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
11299
11300 * typeck2.c: Remove leading capital from diagnostic messages, as
11301 per GNU coding standards.
11302
11303 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
11304
11305 PR c++/3394
11306 * decl.c (xref_basetypes): Handle attributes between
11307 'class' and name.
11308
11309 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
11310
11311 PR g++/3381
11312 * parse.y (named_complex_class_head_sans_basetype): Add new
11313 reduction.
11314 * Make-lang.in (parse.c): Adjust expected conflict count.
11315
11316 2001-12-03 Jason Merrill <jason@redhat.com>
11317
11318 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11319 immediate binfos for our virtual bases.
11320
11321 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
11322
11323 * call.c (build_java_interface_fn_ref): Similarly.
11324 * except.c (is_admissible_throw_operand): Similarly.
11325 * init.c (build_java_class_ref): Similarly.
11326 * xref.c (open_xref_file): Similarly.
11327
11328 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
11329
11330 * class.c (finish_struct): Remove trailing periods from messages.
11331 * decl.c (check_tag_decl): Similarly.
11332 * lex.c (cxx_set_yydebug): Similarly.
11333 * typeck2.c (friendly_abort): Similarly.
11334
11335 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11336
11337 PR c++/3048
11338 * cp-tree.h (ovl_member): Remove.
11339 * decl2.c (merge_functions): Handle extern "C" functions
11340 specially.
11341 * tree.c (ovl_member): Remove.
11342
11343 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11344
11345 PR c++/4842
11346 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11347 FUNCTION_DECL, as input.
11348 (mark_overriders): Remove.
11349 (warn_hidden): Rework for the new ABI.
11350
11351 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11352
11353 PR c++/3471
11354 * call.c (convert_like_real): Do not build additional temporaries
11355 for rvalues of class type.
11356
11357 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
11358
11359 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11360 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11361 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11362 (DERIVED_FROM_P): Likewise.
11363 (enum base_access): Renumber, add ba_quiet bit mask.
11364 (get_binfo): Remove.
11365 (get_base_distance): Remove.
11366 (binfo_value): Remove.
11367 (ACCESSIBLY_DERIVED_FROM_P): Remove.
11368 * call.c (standard_conversion): Use lookup_base.
11369 * class.c (strictly_overrides): Likewise.
11370 (layout_virtual_bases): Likewise.
11371 (warn_about_ambiguous_direct_bases): Likewise.
11372 (is_base_of_enclosing_class): Likewise.
11373 (add_vcall_offset_vtbl_entries_1): Likewise.
11374 * cvt.c (build_up_reference): Adjust comment.
11375 * init.c (build_member_call): Reformat.
11376 * search.c (get_binfo): Remove.
11377 (get_base_distance_recursive): Remove.
11378 (get_base_distance): Remove.
11379 (lookup_base_r): Tweak.
11380 (lookup_base): Add ba_quiet control. Complete the types here.
11381 (covariant_return_p): Use lookup_base.
11382 * tree.c (binfo_value): Remove.
11383 (maybe_dummy_object): Use lookup_base.
11384 * typeck.c (build_static_cast): Use lookup_base.
11385 (get_delta_difference): Likewise.
11386 * typeck2.c (binfo_or_else): Use lookup_base.
11387 (build_scoped_ref): Add back error_mark_check.
11388 (build_m_component_ref): Use lookup_base.
11389
11390 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
11391
11392 * Make-lang.in (c++.generated-manpages): New dummy target.
11393
11394 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11395
11396 * Make-lang.in (cp-lang.o): Depends on c-common.h.
11397 * cp-lang.c (c-common.h): Include.
11398 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11399 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11400 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11401
11402 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
11403
11404 * decl2.c (c_language): Move to c-common.c.
11405 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11406 functions.
11407 (cxx_init): Update.
11408
11409 2001-11-26 Jason Merrill <jason@redhat.com>
11410
11411 * call.c (joust): Remove COND_EXPR hack.
11412
11413 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
11414
11415 * search.c (lookup_base_r): Declare bk in variable declaration
11416 space.
11417
11418 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
11419
11420 PR g++/3145
11421 * class.c (build_vbase_pointer): Remove.
11422 (build_vbase_path): Remove.
11423 (build_base_path): New function.
11424 * cp-tree.h (base_access, base_kind): New enumerations.
11425 (build_base_path): Declare.
11426 (convert_pointer_to_real): Remove.
11427 (convert_pointer_to): Remove.
11428 (lookup_base): Declare.
11429 (convert_pointer_to_vbase): Remove.
11430 * call.c (build_scoped_method_call): Use lookup_base &
11431 build_base_path instead of convert_pointer_to_real,
11432 get_base_distance & get_binfo.
11433 (build_over_call): Likewise.
11434 * cvt.c (cp_convert_to_pointer): Likewise.
11435 (convert_to_pointer_force): Likewise.
11436 (build_up_reference): Likewise.
11437 (convert_pointer_to_real): Remove.
11438 (convert_pointer_to): Remove.
11439 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11440 instead of convert_pointer_to_vbase & build_vbase_path.
11441 (emit_base_init): Use build_base_path instead of
11442 convert_pointer_to_real.
11443 (expand_virtual_init): Lose unrequired conversions.
11444 (resolve_offset_ref): Use lookup_base and build_base_path
11445 instead of convert_pointer_to.
11446 * rtti.c (build_dynamic_cast_1): Use lookup_base &
11447 build_base_path instead of get_base_distance & build_vbase_path.
11448 * search.c (get_vbase_1): Remove.
11449 (get_vbase): Remove.
11450 (convert_pointer_to_vbase): Remove.
11451 (lookup_base_r): New function.
11452 (lookup_base): New function.
11453 * typeck.c (require_complete_type): Use lookup_base &
11454 build_base_path instead of convert_pointer_to.
11455 (build_component_ref): Likewise.
11456 (build_x_function_call): Likewise.
11457 (get_member_function_from_ptrfunc): Likewise.
11458 (build_component_addr): Likewise.
11459 * typeck2.c (build_scoped_ref): Likewise.
11460
11461 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11462
11463 * cp-tree.h (CP_TYPE_QUALS): Removed.
11464 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11465 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11466 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11467 * dump.c (cp_dump_tree): Use void* dump_info argument to match
11468 lang-hooks prototype.
11469 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11470 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11471 CP_TYPE_QUALS changed to cp_type_quals.
11472 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11473 (CXX_C_OBJS): Remove c-dump.o.
11474
11475 2001-11-21 Mark Mitchell <mark@codesourcery.com>
11476
11477 PR c++/3637
11478 * pt.c (lookup_template_class): Ensure that all specializations
11479 are registered on the list corresponding to the most general
11480 template.
11481
11482 2001-11-20 Mark Mitchell <mark@codesourcery.com>
11483
11484 * call.c (non_reference): Add documentation.
11485 (convert_class_to_reference): Do not strip reference types
11486 from conversion operators.
11487 (maybe_handle_ref_bind): Simplify.
11488 (compare_ics): Correct handling of references.
11489
11490 2001-11-19 John Wilkinson <johnw@research.att.com>
11491
11492 * dump.c (dump_op): New function.
11493 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
11494 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11495 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11496
11497 2001-11-19 Mark Mitchell <mark@codesourcery.com>
11498
11499 PR4629
11500 * semantics.c (finish_sizeof): Make sure that expression created
11501 while processing a template do not have a type.
11502 (finish_alignof): Likewise.
11503 * typeck.c (c_sizeof): Likewise.
11504 (expr_sizeof): Likewise.
11505
11506 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
11507
11508 * lex.c (cxx_finish): Call c_common_finish.
11509 (finish_parse): Remove.
11510
11511 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11512
11513 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11514 when displaying error message about missing array bounds.
11515
11516 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11517
11518 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11519 CONST_CAST_EXPR.
11520 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11521
11522 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
11523
11524 * cp-tree.h (print_class_statistics): Restore.
11525
11526 2001-11-15 Jason Merrill <jason@redhat.com>
11527
11528 * method.c (use_thunk): Don't emit debugging information for thunks.
11529
11530 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11531 * decl.c (make_typename_type): Handle getting a class template.
11532 * search.c (lookup_field_r): A class template is good enough for
11533 want_type.
11534
11535 * call.c (convert_like_real): Only use cp_convert for the bad part.
11536 (standard_conversion): Also allow bad int->enum.
11537 * typeck.c (ptr_reasonably_similar): Also allow functions to
11538 interconvert. Pointers to same-size integers are reasonably
11539 similar.
11540
11541 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11542 give it void type.
11543
11544 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
11545
11546 PR g++/3154
11547 * init.c (sort_base_init): Remove unreachable code.
11548 (expand_member_init): Adjust comment to reflect reality. Simplify
11549 and remove unreachable code.
11550
11551 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
11552
11553 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11554 (cxx_init): Update prototype.
11555 * decl.c (init_decl_processing): Rename. Move null node init
11556 to its creation time.
11557 * lex.c (cxx_init_options): Update.
11558 (cxx_init): Combine with old init_parse; also call
11559 cxx_init_decl_processing.
11560
11561 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
11562
11563 * decl.c (check_initializer): Try to complete the type of an
11564 array element before checking whether it's complete. Don't
11565 complain about arrays with complete element types but an
11566 unknown size.
11567 (cp_finish_decl): Build the hierarchical constructor before
11568 calling maybe_deduce_size_from_array_init.
11569
11570 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
11571
11572 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11573
11574 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
11575
11576 PR g++/4206
11577 * parse.y (already_scoped_stmt): Remove.
11578 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11579
11580 2001-11-12 H.J. Lu <hjl@gnu.org>
11581
11582 * cvt.c (ocp_convert): Don't warn the address of a weak
11583 function is always `true'.
11584
11585 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11586
11587 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11588 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11589 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11590 * cp-tree.h (print_class_statistics): Remove.
11591 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11592 cxx_print_identifier, cxx_set_yydebug): New.
11593 * lex.c (set_yydebug): Rename c_set_yydebug.
11594 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11595 lang_print_xnode): Rename.
11596 * tree.c (print_lang_statistics): Rename.
11597
11598 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11599
11600 * class.c (dump_array): Fix format specifier warning.
11601
11602 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11603
11604 * cp-lang.c (LANG_HOOKS_NAME): Override.
11605 (struct lang_hooks): Constify.
11606 * lex.c (cxx_init_options): Update.
11607 (lang_identify): Remove.
11608 * parse.y (language_string): Remove.
11609
11610 2001-11-08 Andreas Franck <afranck@gmx.de>
11611
11612 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11613 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11614 suggested by autoconf.
11615 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11616 (c++.install-common): Use the transformed target alias names.
11617
11618 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11619
11620 * Make-lang.in: Update.
11621 * cp-lang.c: Include langhooks-def.h.
11622
11623 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11624
11625 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11626
11627 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11628
11629 * lex.c (copy_lang_type): Add static prototype.
11630
11631 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11632
11633 * pt.c (unify): Handle SCOPE_REF.
11634
11635 2001-11-01 Jakub Jelinek <jakub@redhat.com>
11636
11637 * tree.c (cp_copy_res_decl_for_inlining): Adjust
11638 DECL_ABSTRACT_ORIGIN for the return variable.
11639
11640 2001-10-31 Zack Weinberg <zack@codesourcery.com>
11641
11642 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11643
11644 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
11645
11646 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11647 semantics.c, spew.c: Fix spelling errors.
11648
11649 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11650
11651 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11652
11653 2001-10-25 Zack Weinberg <zack@codesourcery.com>
11654
11655 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11656 pop_everything.
11657
11658 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11659
11660 * cp-lang.c (cxx_get_alias_set): New function.
11661 Point LANG_HOOKS_GET_ALIAS_SET to it.
11662
11663 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11664
11665 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11666 * cp-tree.h (make_unbound_class_template): Prototype new function.
11667 * decl.c (make_unbound_class_template): New function.
11668 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11669 * error.c (dump_type): Likewise.
11670 * mangle.c (write_type): Likewise.
11671 * parse.y (template_parm): Likewise.
11672 (template_argument): Use make_unbound_class_template.
11673 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11674 (tsubst): Likewise.
11675 (tsubst_copy): Likewise.
11676 (unify): Likewise.
11677 * tree.c (walk_tree): Likewise.
11678 * typeck.c (comptypes): Likewise.
11679
11680 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11681
11682 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11683 extra calls into fewer ones.
11684
11685 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
11686
11687 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11688 Warn when merging inline with attribute noinline.
11689 (start_decl, start_function): Warn if inline and attribute
11690 noinline appear in the same declaration.
11691
11692 2001-10-16 H.J. Lu <hjl@gnu.org>
11693
11694 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11695 for tree checking disabled.
11696
11697 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
11698
11699 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11700 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11701
11702 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11703
11704 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11705 (unify): Only handle MINUS_EXPR specially if the above flag is set
11706 and the subtracted constant is 1. Clear the flag on recursive calls.
11707 Set it when unifying the maximum value in an INTEGER_TYPE's range.
11708
11709 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11710
11711 * decl.c (bad_specifiers): Don't allow exception specifications
11712 on any typedefs.
11713
11714 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
11715
11716 * cp/lex.c (init_cp_pragma): Similarly.
11717
11718 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11719
11720 * pt.c (lookup_template_class): Build complete template arguments
11721 for BOUND_TEMPLATE_TEMPLATE_PARM.
11722
11723 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11724
11725 * cp-tree.h (TYPE_BINFO): Update comment.
11726 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11727 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11728 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11729 (copy_type): Prototype new function.
11730 * lex.c (copy_lang_decl): Gather tree node statistics.
11731 (copy_lang_type): New function.
11732 (copy_type): Likewise.
11733 (cp_make_lang_type): Create lang_type for
11734 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
11735 and BOUND_TEMPLATE_TEMPLATE_PARM.
11736 * pt.c (tsubst): Use copy_type instead of copy_node.
11737 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11738
11739 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11740
11741 * pt.c (determine_specialization): Ignore functions without
11742 DECL_TEMPLATE_INFO.
11743
11744 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
11745
11746 PR g++/4476
11747 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11748
11749 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
11750
11751 * typeck2.c (store_init_value): Don't re-digest a bracketed
11752 initializer.
11753
11754 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11755 ANON_AGGR_TYPE_P.
11756
11757 2001-10-11 Richard Henderson <rth@redhat.com>
11758
11759 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11760 of an asm statement.
11761 (build_vtbl_ref_1): Split out from build_vtbl_ref.
11762 (build_vfn_ref): Use it to handle vtable descriptors before
11763 calling build_vtable_entry_ref.
11764 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11765
11766 2001-10-10 Richard Henderson <rth@redhat.com>
11767
11768 * parse.y (asm_operand): Allow named operands.
11769 * semantics.c (finish_asm_stmt): Tweek for changed location
11770 of the operand constraint.
11771
11772 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
11773
11774 * call.c (standard_conversion): Add bad conversion between
11775 integers and pointers.
11776 (convert_like_real): Don't use convert_for_initialization for bad
11777 conversions; complain here and use cp_convert.
11778 (build_over_call): Don't handle bad conversions specially.
11779 (perform_implicit_conversion): Allow bad conversions.
11780 (can_convert_arg_bad): New fn.
11781 * cp-tree.h: Declare it.
11782 * typeck.c (convert_for_assignment): Use it.
11783 (ptr_reasonably_similar): Any target type is similar to void.
11784
11785 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
11786
11787 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11788 (cp/cp-lang.o): New rule.
11789 * cp-tree.h: Declare hooks.
11790 * tree.c: Make hooks non-static.
11791 (init_tree): Don't initialize hooks here.
11792 * lex.c: Likewise. Move definition of lang_hooks to...
11793 * cp-lang.c: ... new file.
11794
11795 2001-10-08 Richard Henderson <rth@redhat.com>
11796
11797 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11798 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11799
11800 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11801
11802 * class.c (build_vtable_entry_ref): Const-ify.
11803 * decl.c (predefined_identifier,
11804 initialize_predefined_identifiers): Likewise.
11805 * init.c (build_new_1): Likewise.
11806 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11807 Likewise.
11808
11809 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
11810
11811 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11812 (INSNS_PER_STMT): Likewise.
11813 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11814 (copy_body, initialize_inlined_parameters): Likewise.
11815 (declare_return_variable, inlinable_function_p): Likewise.
11816 (expand_call_inline, expand_calls_inline): Likewise.
11817 (optimize_inline_calls, clone_body): Likewise.
11818 * tree.c (walk_tree): Moved to ../tree-inline.c.
11819 (walk_tree_without_duplicates): Likewise.
11820 (copy_tree_r, remap_save_expr): Likewise.
11821
11822 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
11823
11824 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11825 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11826 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11827 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11828 (flag_inline_trees): Moved declaration to ../tree-inline.h.
11829 (walk_tree): Moved declaration to ../tree-inline.h.
11830 (walk_tree_without_duplicates, copy_tree_r): Likewise.
11831 (remap_save_expr): Likewise.
11832 * decl.c: Include tree-inline.h.
11833 (lang_mark_tree): Don't mark inlined_fns.
11834 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11835 * optimize.c: Include tree-inline.h.
11836 (optimize_inline_calls): Move declaration to ../tree.h, as
11837 non-static.
11838 (remap_decl): Use language-independent constructs and hooks.
11839 (remap_block, copy_body_r, declare_return_variable): Likewise.
11840 (inlinable_function_p): Likewise. Don't test for
11841 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11842 no longer language-specific.
11843 (optimize_inline_calls): Likewise. Make it non-static. Moved
11844 call of dump_function to...
11845 (optimize_function): Here...
11846 (clone_body): New function, extracted from...
11847 (maybe_clone_body): ... here. Build decl_map locally and pass
11848 it on to clone_body.
11849 * pt.c, semantics.c: Include tree-inline.h.
11850 * tree.c: Likewise.
11851 (cp_walk_subtrees): New language-specific hook for tree inlining.
11852 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11853 cp_is_overload_p, cp_auto_var_in_fn_p,
11854 cp_copy_res_decl_for_inlining): Likewise.
11855 (walk_tree): Move language-specific constructs into...
11856 (cp_walk_subtrees): this new function.
11857 (copy_tree_r): Use language-independent constructs and hooks.
11858 (init_tree): Initialize tree inlining hooks.
11859 (remap_save_expr): Adjust prototype so that the declaration
11860 does not require the definition of splay_tree.
11861
11862 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
11863
11864 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11865 to build the declaration instead of the declaration itself.
11866
11867 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
11868
11869 * decl2.c (cxx_decode_option): Add 'else'.
11870
11871 * spew.c (end_input): No longer static.
11872 * cp-tree.h: Declare it.
11873 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11874
11875 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11876
11877 * call.c (build_over_call), typeck.c (build_function_call_real):
11878 Pass type attributes to check_function_format rather than name or
11879 assembler name. Don't require there to be a name or assembler
11880 name to check formats.
11881
11882 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11883
11884 * decl.c (init_decl_processing): Don't call
11885 init_function_format_info. Initialize lang_attribute_table
11886 earlier.
11887 (builtin_function): Call decl_attributes.
11888 (insert_default_attributes): New.
11889
11890 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
11891
11892 * decl.c (grokdeclarator): Copy array typedef handling from C
11893 frontend.
11894
11895 * decl.c (grokdeclarator): Copy too-large array handling from C
11896 frontend.
11897
11898 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
11899
11900 * config-lang.in (target_libs): Added target-gperf, so that we
11901 don't try to build it if C++ is disabled.
11902
11903 2001-09-23 Zack Weinberg <zack@codesourcery.com>
11904
11905 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11906 (cp/errfn.o): Delete rule.
11907 (cp/error.o): Depend on flags.h.
11908 * errfn.c: Delete file.
11909 * cp-tree.h: Declare warn_deprecated. Remove definitions of
11910 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11911 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11912 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11913 internal_error respectively. Make cp_deprecated into a macro.
11914 Don't define cp_printer typedef or declare cp_printers.
11915 * error.c: Include flags.h.
11916 Delete: struct tree_formatting_info, print_function_argument_list,
11917 print_declaration, print_expression, print_function_declaration,
11918 print_function_parameter, print_type_id, print_cv_qualifier_seq,
11919 print_type_specifier_seq, print_simple_type_specifier,
11920 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11921 print_parameter_declaration_clause, print_exception_specification,
11922 print_nested_name_specifier, and definition of cp_printers.
11923 (locate_error): New function.
11924 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11925 rewritten in terms of locate_error and diagnostic.c.
11926 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11927 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
11928 (init_error): Adjust to match.
11929
11930 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11931
11932 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11933
11934 2001-09-21 Richard Henderson <rth@redhat.com>
11935
11936 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11937 (build_vtbl_initializer): Likewise.
11938 (build_vfn_ref): New.
11939 * cp-tree.h: Declare it.
11940 * call.c (build_over_call): Use it.
11941 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11942 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11943
11944 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
11945
11946 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11947
11948 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
11949
11950 Table-driven attributes.
11951 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11952 * decl2.c (cplus_decl_attributes): Only take one attributes
11953 parameter.
11954 * cp-tree.c (cplus_decl_attributes): Update prototype.
11955 * class.c (finish_struct), decl.c (start_decl, start_function),
11956 decl2.c (grokfield), friend.c (do_friend), parse.y
11957 (parse_bitfield): Update calls to cplus_decl_attributes.
11958 * decl.c (grokdeclarator): Take a pointer to a single ordinary
11959 attribute list.
11960 * decl.h (grokdeclarator): Update prototype.
11961 * decl2.c (grokfield): Take a single ordinary attribute list.
11962 * friend.c (do_friend): Likewise.
11963 * decl.c (shadow_tag, groktypename, start_decl,
11964 start_handler_parms, grokdeclarator, grokparms, start_function,
11965 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11966 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11967 (process_template_parm, do_decl_instantiation): Pass single
11968 ordinary attribute lists around.
11969 * decl.c (grokdeclarator): Correct handling of nested attributes.
11970 Revert the patch
11971 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
11972 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11973 not the left.
11974 .
11975 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11976 (cp_attribute_table): Declare.
11977 * decl.c (valid_lang_attribute): Don't define.
11978 (lang_attribute_table): Define.
11979 (init_decl_processing): Initialize lang_attribute_table instead of
11980 valid_lang_attribute.
11981 * tree.c (cp_valid_lang_attribute): Remove.
11982 (handle_java_interface_attribute, handle_com_interface_attribute,
11983 handle_init_priority_attribute): New functions.
11984 (cp_attribute_table): New array.
11985 * decl2.c (import_export_class): Don't use
11986 targetm.valid_type_attribute.
11987
11988 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11989
11990 * Make-lang.in (cp/error.o): Depend on real.h
11991 * error.c: #include "real.h"
11992
11993 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11994
11995 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11996 xmalloc/strcpy/strcat.
11997
11998 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11999
12000 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
12001 Const-ification.
12002 * pt.c (tsubst_decl): Likewise.
12003
12004 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12005
12006 * decl2.c (lang_f_options): Const-ification.
12007 * lex.c (cplus_tree_code_name): Likewise.
12008 * spew.c (yyerror): Likewise.
12009
12010 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12011
12012 PR c++/3986
12013 * class.c (force_canonical_binfo_r): Check & move an indirect
12014 primary base first.
12015 (force_canonical_binfo): Check that it's not already
12016 canonical.
12017 (mark_primary_virtual_base): Remove BINFO parameter.
12018 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
12019
12020 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12021
12022 Remove TYPE_NONCOPIED_PARTS.
12023 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
12024 CLASSTYPE_PURE_VIRTUALS.
12025 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
12026 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
12027 (layout_class_type): Don't call fixup_inline_methods here ...
12028 (finish_struct_1): ... call it here.
12029
12030 2001-09-04 Mark Mitchell <mark@codesourcery.com>
12031
12032 * decl.c (duplicate_decls): Remove code deadling with
12033 DECL_SAVED_INSNS.
12034 * decl2.c (finish_file): Likewise.
12035 * pt.c (instantiate_decl): Likewise.
12036 * semantics.c (expand_body): Don't defer local functions if
12037 they wouldn't be deferred for some other reason. Don't
12038 generate RTL for functions that will not be emitted.
12039 (genrtl_start_function): Remove code deadling with
12040 DECL_SAVED_INSNS.
12041 (genrtl_finish_function): Likewise.
12042
12043 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
12044
12045 PR c++/4203
12046 * call.c (build_over_call): Do not optimize any empty base
12047 construction.
12048
12049 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12050
12051 * error.c (dump_template_decl): Output template parameters
12052 together with their specifiers.
12053 Output `class' prefix for template template parameter.
12054 (dump_decl): Fix formatting.
12055
12056 2001-08-30 Kurt Garloff <garloff@suse.de>
12057
12058 * optimize.c (inlinable_function_p): Allow only smaller single
12059 functions. Halve inline limit after reaching recursive limit.
12060
12061 2001-08-30 Joern Rennecke <amylaar@redhat.com>
12062 Jason Merrill <jason_merrill@redhat.com>
12063
12064 * class.c (build_vtable_entry_ref): Subtract in char*, not
12065 ptrdiff_t.
12066
12067 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
12068
12069 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
12070 (build_cplus_array_type): Use cp_build_qualified_type, not
12071 TYPE_MAIN_VARIANT, to get an unqualified version.
12072
12073 * decl2.c (grok_alignof): Lose.
12074 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
12075 * typeck.c (c_alignof): Lose.
12076 * semantics.c (finish_sizeof, finish_alignof): New.
12077 * parse.y: Use them.
12078 * cp-tree.h: Declare them.
12079
12080 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
12081
12082 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
12083 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
12084 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
12085
12086 2001-08-19 Jakub Jelinek <jakub@redhat.com>
12087
12088 * typeck2.c (add_exception_specifier): Only require complete type if
12089 not in processing template declaration.
12090
12091 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12092
12093 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
12094 GNU_xref_start_scope and GNU_xref_end_scope.
12095
12096 * tree.c (TYPE_HASH): Moved to ../tree.h.
12097
12098 2001-08-16 Mark Mitchell <mark@codesourcery.com>
12099
12100 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
12101 on COMPOUND_EXPRs.
12102
12103 2001-08-14 Richard Henderson <rth@redhat.com>
12104
12105 * class.c, cp-tree.h (build_vfn_ref): Remove.
12106 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
12107
12108 2001-08-13 Mark Mitchell <mark@codesourcery.com>
12109
12110 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12111 empty class assignment as having side-effects to avoid
12112 spurious warnings.
12113
12114 2001-08-13 Zack Weinberg <zackw@panix.com>
12115
12116 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12117 * except.c: Include libfuncs.h.
12118
12119 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12120
12121 * decl.c (grokdeclarator): Clarify diagnostic message.
12122
12123 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12124
12125 * decl2.c (do_nonmember_using_decl): Replace using directive
12126 with using declaration in the error message.
12127
12128 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12129
12130 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12131 criterion to avoid rebuilding expression tree instead of
12132 processing_template_decl.
12133
12134 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12135
12136 Support named return value optimization for inlines, too.
12137 * decl.c (finish_function): Nullify returns here.
12138 * semantics.c (genrtl_start_function): Not here.
12139 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12140 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
12141 Also nullify the CLEANUP_STMT for the nrv.
12142 * cp-tree.h: Declare it.
12143 * optimize.c (declare_return_variable): Replace the nrv with the
12144 return variable.
12145 * typeck.c (check_return_expr): Be more flexible on alignment check.
12146 Ignore cv-quals when checking for a matching type.
12147
12148 2001-08-09 Richard Henderson <rth@redhat.com>
12149
12150 * decl2.c (finish_objects): Use target hooks instead of
12151 assemble_constructor and assemble_destructor.
12152
12153 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
12154
12155 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12156
12157 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
12158
12159 PR c++/3820
12160 Stop using TYPE_NONCOPIED_PARTS.
12161 * call.c (build_over_call): Be careful when copy constructing
12162 or assigning to an empty class.
12163 * class.c (check_bases_and_members): It has a
12164 COMPLEX_ASSIGN_REF if it has a vptr.
12165 (layout_class_type): Don't add empty class padding to
12166 TYPE_NONCOPIED_PARTS.
12167 (finish_struct_1): Don't add the VFIELD either.
12168 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12169 initialization.
12170
12171 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12172
12173 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12174
12175 2001-08-06 Richard Henderson <rth@redhat.com>
12176
12177 * decl2.c (finish_objects): Pass a symbol_ref and priority to
12178 assemble_{constructor,destructor}. Remove priority handling.
12179
12180 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12181
12182 Don't allow template-id in using-declaration.
12183 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12184 (do_class_using_decl): Likewise.
12185
12186 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12187
12188 * cp/spew.c (read_token): No need to pop buffers.
12189
12190 2001-08-02 Stan Shebs <shebs@apple.com>
12191
12192 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12193 (fnaddr_from_vtable_entry): Remove decl.
12194 * method.c (use_thunk): Update comment.
12195
12196 2001-08-01 Andrew Cagney <ac131313@redhat.com>
12197
12198 * repo.c (get_base_filename): Change return value to const char
12199 pointer.
12200
12201 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
12202
12203 Kill -fhonor-std.
12204 * NEWS: Document.
12205 * cp-tree.h (flag_honor_std): Remove.
12206 (CPTI_FAKE_STD): Remove.
12207 (std_node): Remove comment about it being NULL.
12208 (fake_std_node): Remove.
12209 * decl.c (in_fake_std): Remove.
12210 (walk_namespaces_r): Remove fake_std_node check.
12211 (push_namespace): Remove in_fake_std code.
12212 (pop_namespace): Likewise.
12213 (lookup_name_real): Remove fake_std_node check.
12214 (init_decl_processing): Always create std_node. Always add
12215 std:: things there.
12216 (builtin_function): Always put non '_' fns in std.
12217 * decl2.c (flag_honor_std): Remove.
12218 (lang_f_options): Remove honor-std.
12219 (unsupported_options): Add honor-std.
12220 (set_decl_namespace): Remove fake_std_node check.
12221 (validate_nonmember_using_decl): Likewise.
12222 (do_using_directive): Likewise.
12223 (handle_class_head): Likewise.
12224 * dump.c (cp_dump_tree): Likewise.
12225 * except.c (init_exception_processing): Adjust.
12226 * init.c (build_member_call): Remove fake_std_node check.
12227 (build_offset_ref): Likewise.
12228 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12229 * rtti.c (init_rtti_processing): Adjust.
12230
12231 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
12232
12233 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12234 operand while calling cp_tree_equal.
12235
12236 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12237
12238 The 3.0 ABI no longer has vbase pointer fields.
12239 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12240 FORMAT_VBASE_NAME): Remove.
12241 * method.c (do_build_copy_constructor): Adjust.
12242 (do_build_assign_ref): Adjust.
12243 * search.c (lookup_field_r): Adjust.
12244 * typeck.c (build_component_ref): Adjust.
12245
12246 The 3.0 ABI always has a vtable pointer at the start of every
12247 polymorphic class.
12248 * rtti.c (build_headof_sub): Remove.
12249 (build_headof): Adjust.
12250 (get_tinfo_decl_dynamic): No need to check flag_rtti
12251 here. Adjust.
12252 (create_real_tinfo_var): Explain why we need a hidden name.
12253
12254 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12255
12256 PR c++/3631
12257 * class.c (update_vtable_entry_for_fn): The fixed adjustment
12258 of a virtual thunk should be from declaring base.
12259
12260 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12261
12262 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12263 the shared virtual base, so preserving inheritance graph order.
12264
12265 2001-07-30 Andreas Jaeger <aj@suse.de>
12266
12267 * decl2.c: Remove unused var global_temp_name_counter.
12268
12269 2001-07-28 Richard Henderson <rth@redhat.com>
12270
12271 * method.c (pending_inlines): Remove.
12272
12273 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12274
12275 * class.c (mark_primary_virtual_base): Don't adjust base
12276 offsets here.
12277 (dfs_unshared_virtual_bases): Adjust them here.
12278 (mark_primary_bases): Explain why we adjust at the end.
12279
12280 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12281
12282 * class.c (finish_struct_1): When copying the primary base's
12283 VFIELD, make sure we find it is at offset zero.
12284
12285 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12286
12287 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12288 tsubst_expr for default template arguments.
12289
12290 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12291
12292 PR c++/3621
12293 * spew.c (yylex): Only copy the token's lineno, if it is
12294 nonzero.
12295
12296 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12297
12298 PR c++/3624
12299 * call.c (resolve_args): Simplify, call
12300 convert_from_reference.
12301 (build_new_op): Resolve and convert from reference ARG1
12302 earlier. Adjust ARG2 & ARG3 resolve and conversion.
12303
12304 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12305
12306 * decl.c (last_function_parm_tags): Remove.
12307 (current_function_parm_tags): Remove.
12308 (init_decl_processing): Adjust.
12309 (start_function): Adjust.
12310 (store_parm_decls): Adjust.
12311
12312 PR c++/3152
12313 * decl.c (grokdeclarator): Detect when a function typedef is
12314 declaring a function, and create last_function_parms correctly.
12315
12316 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
12317
12318 * call.c (joust): Only prefer a non-builtin candidate to a builtin
12319 one if they have the same signature.
12320
12321 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
12322 it rather than toplevel_bindings_p. Give it a mangled name if static.
12323 (convert_to_reference): Adjust.
12324 * decl2.c (get_temp_name): Lose.
12325 * mangle.c (mangle_ref_init_variable): New fn.
12326 (mangle_guard_variable): Strip the ref-init header.
12327 * cp-tree.h: Adjust.
12328 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12329 initializer.
12330 (grok_reference_init): Always use DECL_INITIAL.
12331
12332 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12333
12334 PR c++/3416
12335 * call.c (build_conditional_expr): Recheck args after
12336 conversions.
12337 * cp-tree.h (build_conditional_expr): Move to correct file.
12338 * typeck.c (decay_conversion): Diagnose any unknown types
12339 reaching here.
12340 (build_binary_op): Don't do initial decay or default
12341 conversions on overloaded functions.
12342 (build_static_cast): Don't do a decay conversion here.
12343
12344 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12345
12346 PR c++/3543
12347 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12348 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12349
12350 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12351
12352 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12353 (create_vtbl_ptr): ... here.
12354
12355 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12356
12357 * class.c (build_vbase_offset_vbtl_entries): Look for
12358 non-primary base of which we are a sub vtable.
12359
12360 2001-07-24 Phil Edwards <pme@sources.redhat.com>
12361
12362 * semantics.c (finish_this_expr): Remove unused code.
12363
12364 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
12365
12366 Simplify rtti, now we've only one ABI.
12367 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12368 CPTI_TINFO_VAR_ID.
12369 (tinfo_decl_id, tinfo_var_id): Remove.
12370 (get_typeid_1): Remove.
12371 * rtti.c
12372 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12373 (typeid_ok_p): New function.
12374 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12375 (get_tinfo_decl): Remove old abi documentation.
12376 (tinfo_from_decl): Remove.
12377 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12378 (get_typeid_1): Remove.
12379 (get_base_offset): Remove.
12380 (synthesize_tinfo_var): Absorb get_base_offset.
12381 (create_real_tinfo_var): Don't use tinfo_decl_id.
12382
12383 2001-07-23 Graham Stott <grahams@redhat.com>
12384
12385 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12386 variable has_two_argument_delete_p.
12387
12388 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
12389
12390 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12391 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12392 (CPTI_INDEX_IDENTIFIER): Remove.
12393 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12394 (delta2_identifier): Remove.
12395 (index_identifier): Remove.
12396 (pfn_or_delta2_identifier): Remove.
12397 (flag_vtable_thunks): Remove.
12398 (VTABLE_DELTA2_NAME): Remove.
12399 (VTABLE_INDEX_NAME): Remove.
12400 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12401 (vfunc_ptr_type_node): Adjust.
12402 (VTABLE_NAME_PREFIX): Adjust.
12403 (build_vfn_ref): Lose first parameter.
12404 (fixup_all_virtual_upcast_offsets): Remove.
12405 * decl.c (initialize_predefined_identifiers): Remove
12406 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12407 (init_decl_processing): Remove no-vtable-thunk code.
12408 * decl2.c (flag_vtable_thunks): Remove.
12409 (mark_vtable_entries): Remove no-vtable-thunk code.
12410 * error.c (dump_decl): Remove no-vtable-thunk code.
12411 (dump_expr): Adjust ptr to member function code.
12412 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12413 code.
12414 * rtti.c (build_headof): Remove no-vtable-thunk code.
12415 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12416 * search.c (get_base_distance): Remove expand_upcast_fixups case.
12417 (virtual_context) Remove.
12418 (expand_upcast_fixups): Remove.
12419 (fixup_virtual_upcast_offsets): Remove.
12420 (fixup_all_virtual_upcast_offsets): Remove.
12421 * typeck.c (get_member_function_from_ptrfunc): Remove
12422 no-vtable-thunk code.
12423 * call.c (build_over_call): Adjust call to build_vfn_ref.
12424 * class.c (build_vfn_ref): Lose first parameter. Remove
12425 no-vtable-thunk code.
12426 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12427 (build_vtable_entry): Remove no-vtable-thunk code.
12428
12429 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
12430
12431 Remove old-abi remnants. Remove comments about old abi
12432 behavior. Remove references to 'new-abi' in comments.
12433 * cp-tree.h: Adjust comments.
12434 (vbase_offsets_in_vtable_p): Delete.
12435 (vcall_offsets_in_vtable_p): Delete.
12436 (vptrs_present_everywhere_p): Delete.
12437 (all_overridden_vfuns_in_vtables_p): Delete.
12438 (merge_primary_and_secondary_vtables_p): Delete.
12439 (TYPE_CONTAINS_VPTR_P): Adjust.
12440 (VTT_NAME_PREFIX): Remove.
12441 (CTOR_VTBL_NAME_PREFIX): Remove.
12442 (init_vbase_pointers): Remove.
12443 * class.c: Adjust coments.
12444 (build_vbase_pointer_fields): Delete.
12445 (build_vbase_pointer): Remove old-abi code.
12446 (build_secondary_vtable): Likewise.
12447 (modify_all_vtables): Likewise.
12448 (create_vtable_ptr): Likewise.
12449 (layout_class_type): Likewise.
12450 (finish_struct_1): Likewise.
12451 (finish_vtbls): Likewise.
12452 (dfs_finish_vtbls): Delete.
12453 (build_vbase_offset_vtbl_entries): Remove old-abi code.
12454 * cvt.c: Adjust comments.
12455 * decl.c: Adjust comments.
12456 * decl2.c: Adjust comments.
12457 * init.c: Adjust comments.
12458 (construct_virtual_bases): Remove old-abi code.
12459 * lang-specs.h: Remove -fno-new-abi.
12460 * mangle.c: Adjust comments.
12461 * rtti.c: Adjust comments.
12462 (get_base_offset): Remove old-abi-code.
12463 * search.c: Adjust comments.
12464 (dfs_init_vbase_pointers): Remove.
12465 (dfs_vtable_path_unmark): Remove.
12466 (init_vbase_pointers): Remove.
12467 * semantics.c: Adjust comments.
12468 (emit_associated_thunks): Remove old-abi code.
12469 * typeck.c: Adjust comments.
12470
12471 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
12472
12473 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12474 params.h.
12475
12476 2001-07-19 Mark Mitchell <mark@codesourcery.com>
12477
12478 * class.c (finish_struct_anon): Forbid nested classes.
12479
12480 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12481
12482 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12483 * optimize.c: Include debug.h.
12484 (maybe_clone_body): Use debug hook.
12485 * semantics.c: Include debug.h.
12486 (expand_body): Use debug hook.
12487
12488 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12489
12490 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12491
12492 2001-07-18 Mark Mitchell <mark@codesourcery.com>
12493
12494 * class.c (type_requires_array_cookie): New function.
12495 (check_methods): Don't try to figure out whether the type needs a
12496 cookie here.
12497 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12498 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12499 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12500 * pt.c (instantiate_class_template): Don't set
12501 TYPE_VEC_DELETE_TAKES_SIZE.
12502 * NEWS: Document ABI changes from GCC 3.0.
12503
12504 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
12505 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12506
12507 * NEWS (Changes in GCC 3.0): Fix typo.
12508
12509 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
12510
12511 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12512 which attributes are to be attached, and a flags argument. Update
12513 call to decl_attributes.
12514 (grokfield): Update call to decl_attributes.
12515 * class.c (finish_struct): Update call to cplus_decl_attributes.
12516 * cp-tree.h (cplus_decl_attributes): Update prototype.
12517 * decl.c (start_decl, grokdeclarator, start_function): Update
12518 calls to decl_attributes and cplus_decl_attributes.
12519 * friend.c (do_friend): Update call to cplus_decl_attributes.
12520 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12521
12522 2001-07-12 Mark Mitchell <mark@codesourcery.com>
12523
12524 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12525 for `register' variables with an asm-specification.
12526
12527 2001-07-11 Mark Mitchell <mark@codesourcery.com>
12528
12529 * semantics.c (finish_asm_stmt): Mark the output operands
12530 to an asm addressable, if necessary.
12531
12532 2001-07-11 Ben Elliston <bje@redhat.com>
12533
12534 * Revert this change -- there is a subtle bug.
12535
12536 PR c++/80
12537 * decl.c (finish_enum): New "attributes" argument; pass it to
12538 cplus_decl_attributes. Use a narrower type if the enum is packed.
12539 * cp-tree.h (finish_enum): Adjust prototype.
12540 * parse.y (enum_head): New non-terminal.
12541 (structsp): Use it. Enums now may be preceded or followed by
12542 optional attributes -- pass their chained tree to finish_enum().
12543 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12544
12545 2001-07-10 Mark Mitchell <mark@codesourcery.com>
12546
12547 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12548 variables.
12549
12550 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
12551
12552 * semantics.c (cp_expand_stmt): Fix for null
12553 current_function_return_value.
12554
12555 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
12556
12557 * call.c (build_op_delete_call): Initialize fn.
12558 (convert_like_real): Delete conditional.
12559 (joust): Initialize *w and *l.
12560 * class.c: Add prototype for binfo_ctor_vtable.
12561 (get_primary_binfo): Initialize result.
12562 * init.c (build_java_class_ref): Initialize name.
12563
12564 2001-07-09 Erik Rozendaal <dlr@acm.org>
12565
12566 * typeck.c (unary_complex_lvalue): Do not duplicate the
12567 argument to modify, pre-, or post-increment when used as an
12568 lvalue and when the argument has side-effects.
12569
12570 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12571
12572 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12573 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
12574 cplus_decl_attributes even if attrs is NULL.
12575 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12576
12577 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12578
12579 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12580 calls to decl_attributes.
12581
12582 2001-07-06 Ira Ruben <ira@apple.com>
12583
12584 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12585 be DECL_TEMPLATE_RESULT.
12586
12587 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12588
12589 * cp-tree.h (copy_template_template_parm): Rename to ...
12590 (bind_template_template_parm): ... here.
12591 * tree.c (copy_template_template_parm): Rename to ...
12592 (bind_template_template_parm): ... here. Remove the case when
12593 NEWARGS is NULL_TREE.
12594 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12595 BOUND_TEMPLATE_TEMPLATE_PARM.
12596 * pt.c (lookup_template_class): Adjust.
12597
12598 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
12599
12600 * cvt.c (convert_lvalue): New fn.
12601 * cp-tree.h: Declare it.
12602 * method.c (do_build_assign_ref): Use it.
12603 (do_build_copy_constructor): Convert parm to base types
12604 before calling base constructors.
12605
12606 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12607 DECL_USER_ALIGN. Check flag_elide_constructors instead of
12608 optimize.
12609 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12610
12611 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
12612
12613 * optimize.c (optimize_inline_calls): New function, broken out
12614 of ...
12615 (optimize_function): ... here. Call it. Don't inline if it is
12616 a thunk.
12617 (dump_function): Print name of dump flag causing this dump.
12618 * semantics.c (expand_body): Move thunk inline check to
12619 optimize_function.
12620
12621 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
12622
12623 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12624 (comptypes): Use target.comp_type_attributes.
12625
12626 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
12627
12628 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12629
12630 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12631
12632 * error.c (lang_print_error_function): Add a `diagnostic_context *'
12633 parameter. Tweak.
12634
12635 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12636
12637 * decl2.c (import_export_class): Update.
12638
12639 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12640
12641 * error.c (init_error): Adjust settings.
12642
12643 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12644
12645 * error.c (init_error): Adjust settings.
12646
12647 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
12648
12649 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12650 return pointers to data members by reference rather than by value.
12651
12652 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
12653
12654 Implement the Named Return Value optimization.
12655 * cp-tree.h (struct cp_language_function): Add x_return_value.
12656 (current_function_return_value): Now a macro.
12657 * decl.c: Don't define it.
12658 (define_label, finish_case_label): Don't clear it.
12659 (init_decl_processing): Don't register it with GC.
12660 * semantics.c (genrtl_finish_function): Don't check it for
12661 no_return_label. Copy the RTL from the return value to
12662 current_function_return_value and walk, calling...
12663 (nullify_returns_r): ...this new fn.
12664 * typeck.c (check_return_expr): Set current_function_return_value.
12665
12666 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
12667
12668 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12669 sharing a ctor vtable with. Merge code for cases 1 and 2.
12670 (binfo_ctor_vtable): New fn.
12671 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12672
12673 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
12674
12675 * class.c (dfs_find_final_overrider): Fix logic.
12676
12677 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12678 virtual thunk instead of non-virtual.
12679 (get_matching_virtual): Uncomment.
12680
12681 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12682 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
12683 PARM, not ARG.
12684
12685 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
12686
12687 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12688 we've not emerged from the hierarchy of RTTI_BINFO on reaching
12689 a non-virtual base.
12690
12691 2001-06-13 Mark Mitchell <mark@codesourcery.com>
12692
12693 * NEWS: Update release number.
12694
12695 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12696
12697 PR c++/3130, c++/3131, c++/3132
12698 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12699 * class.c (force_canonical_binfo_r): Move
12700 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12701 virtual bases unless they're primary and what they're primary
12702 too has been moved.
12703 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12704 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12705 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12706 derived binfo.
12707 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12708 (layout_nonempty_base_or_field): Add most derived type
12709 parameter. Adjust.
12710 (layout_empty_base): Likewise.
12711 (build_base_field): Likewise.
12712 (build_base_fields): Likewise.
12713 (propagate_binfo_offsets): Add most derived type
12714 parameter. Skip non canonical virtual bases too.
12715 (dfs_set_offset_for_unshared_vbases): Don't skip primary
12716 bases. Do skip canonical bases.
12717 (layout_virtual_bases): Adjust.
12718 (layout_class_type): Adjust.
12719 (dfs_get_primary_binfo): Build list of virtual primary base
12720 candidates.
12721 (get_primary_binfo): Check that the shared virtual primary
12722 base candidate was found first.
12723 (accumulate_vtbl_inits): Don't do anything for non-vptr
12724 containing binfos. For case 1 primary virtual bases, keep
12725 checking that we've not emerged from the hierarchy of RTTI_BINFO.
12726
12727 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12728
12729 PR c++/3089
12730 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12731 hierarchy looking for primary bases for a ctor
12732 vtable. Recursively call oneself, if we meet our primary via
12733 this route and haven't met it yet via inheritance graph order.
12734
12735 2001-06-11 Mark Mitchell <mark@codesourcery.com>
12736
12737 * lang-options.h: Emit documentation for -fno-honor-std, not
12738 -fhonor-std.
12739
12740 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
12741
12742 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12743 Don't clobber delta.
12744 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12745
12746 2001-06-10 Mark Mitchell <mark@codesourcery.com>
12747 Gabriel Dos Reis <gdr@codesourcery.com>
12748
12749 * Make-lang.in (cp/call.o): Depend on diagnostic.h
12750 (cp/typeck.o): Depend on diagnostic.h
12751 (cp/typeck2.o): Depend on diagnostic.h
12752 (cp/repo.o): Depend on dignostic.h
12753 * typeck.c: #include diagnostic.h
12754 (convert_for_initialization): Remove extern declaration for
12755 warningcount and errorcount.
12756
12757 * call.c: #include diagnostic.h
12758 (convert_like_real): Remove extern declaration for warnincount and
12759 errorcount.
12760
12761 * repo.c: #include diagnostic.h
12762 * typeck2.c: #include diagnostic.h
12763
12764 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12765
12766 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12767 in previous change.
12768
12769 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12770
12771 PR c++/2929
12772 * friend.c (do_friend): Use push_decl_namespace for classes at
12773 namespace scope.
12774
12775 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12776 Jason Merrill <jason_merrill@redhat.com>
12777
12778 PR c++/3061
12779 * class.c (build_secondary_vtable): Use assert, rather than an error
12780 message.
12781 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12782 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12783 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12784 Don't set BINFO_VTABLE for a primary virtual base.
12785
12786 2001-06-07 Mark Mitchell <mark@codesourcery.com>
12787
12788 * decl.c (duplicate_decls): Update source position information
12789 when a template function is defined.
12790
12791 2001-06-07 Phil Edwards <pme@sources.redhat.com>
12792
12793 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
12794
12795 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
12796
12797 PR c++/2914
12798 * decl.c (pushtag): Don't push into a complete type's scope.
12799
12800 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
12801
12802 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12803 (struct lang_decl_flags): Lose generate_with_vtable_p.
12804 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12805 * class.c (copy_virtuals): Adjust.
12806 * decl2.c (mark_vtable_entries): Adjust.
12807 * method.c (make_thunk, build_vtable_entry): Adjust.
12808 * class.c (update_vtable_entry_for_fn): Only look as far as the
12809 first defining class.
12810 (build_vtbl_initializer): Put nothing in the slot for a function only
12811 defined in a lost primary virtual base.
12812 (add_vcall_offset_vtbl_entries_1): Use the same code for
12813 the lost primary case and the normal case.
12814 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12815 (get_vfield_offset, get_derived_offset): Lose.
12816 (dfs_find_final_overrider): Use look_for_overrides_here.
12817 (get_matching_virtual): New fn.
12818 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12819 not BV_VCALL_INDEX.
12820 * search.c (look_for_overrides_here): Split out from...
12821 (look_for_overrides_r): Here.
12822
12823 * class.c (find_final_overrider): Return error_mark_node on error.
12824
12825 * decl2.c (key_method): #if 0 accidental change.
12826
12827 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
12828
12829 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12830 (build_over_call): Likewise.
12831 * decl.c (grokparms): Likewise.
12832 * pt.c (tsubst_decl): Likewise.
12833 * typeck.c (convert_arguments): Likewise.
12834
12835 2001-06-05 Mark Mitchell <mark@codesourcery.com>
12836
12837 * semantics.c (begin_class_definition): Robustify.
12838
12839 * pt.c (instantiate_decl): Tell the repository code about the
12840 clones, not the cloned functions.
12841 * repo.c (repo_template_used): Explicitly instantiate the cloned
12842 function, not the clones.
12843
12844 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12845
12846 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12847 ICS_BAD_FLAG on created conversion.
12848 (compare_ics): Break out rank.
12849
12850 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12851
12852 * decl.c (xref_tag): Remove extraneous %s on dependent name
12853 lookup warning.
12854
12855 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12856
12857 * class.c (layout_vtable_decl): Fix off by one error on
12858 build_index_type.
12859 (build_vtt): Likewise.
12860 (build_ctor_vtbl_group): Likewise.
12861
12862 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12863
12864 * class.c (maybe_indent_hierarchy): New function.
12865 (dump_class_hierarchy_r): Add flags. Dump extra binfo
12866 information, if enabled. Use maybe_indent_hierarchy. Adjust
12867 output format.
12868 (dump_class_hierarchy): Adjust prototype. Adjust output format.
12869 (dump_array, dump_vtable, dump_vtt): New functions.
12870 (finish_struct_1): Adjust hierarchy dumping.
12871 (initialize_vtable): Call dump_vtable.
12872 (build_vtt): Call dump_vtt.
12873 (build_ctor_vtbl_group): Call dump_vtable.
12874 * decl2.c (flag_dump_class_layout): Remove.
12875 (cxx_decode_option): Remove dump translation unit
12876 and dump class hierarchy check. Call dump_switch_p.
12877 (finish_file): Adjust dumping.
12878 (dump.c): Only dump base classes if not TDF_SLIM.
12879 Only dump namespace members if not TDF_SLIM.
12880 * optimize.c (dump_function): New function.
12881 (optimize_function): Call dump_function.
12882 * semantics.c (expand_body): Use dump_enabled_p.
12883
12884 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
12885
12886 PR g++/2936
12887 Part missed from first commit
12888 * decl2.c (finish_anon_union): Copy context.
12889
12890 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
12891
12892 PR g++/2936
12893 * optimize.c (remap_decl): Remap anonymous aggregate members too.
12894
12895 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
12896
12897 PR g++/2823
12898 * semantics.c (expand_body): Don't optimize thunks.
12899
12900 2001-05-25 Sam TH <sam@uchicago.edu>
12901
12902 * cp-tree.h lex.h: Fix header include guards.
12903
12904 2001-05-25 Mark Mitchell <mark@codesourcery.com>
12905
12906 * decl.c (init_decl_processing): Tweak.
12907
12908 2001-05-24 Mark Mitchell <mark@codesourcery.com>
12909
12910 * decl.c (duplicate_decls): Tidy.
12911 (init_decl_processing): Always set flag_no_builtin.
12912
12913 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
12914
12915 PR c++/2184
12916 * decl2.c (do_local_using_decl): Push the decls, even in a
12917 template.
12918
12919 2001-05-22 Mark Mitchell <mark@codesourcery.com>
12920
12921 * optimize.c (initialize_inlined_parameters): Don't set
12922 TREE_READONLY for a VAR_DECL taking the place of an inlined
12923 PARM_DECL.
12924
12925 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
12926
12927 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12928 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12929 attribute.
12930
12931 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
12932
12933 * parse.y: Refer to compound literals as such, not as
12934 constructor-expressions.
12935
12936 2001-05-21 Mark Mitchell <mark@codesourcery.com>
12937
12938 * call.c (build_op_delete_call): Ignore exception-specifications
12939 when looking for matching delete operators.
12940 * init.c (build_new_1): Compute whether or not the allocation
12941 function used is a placement allocation function or not, and
12942 communicate this information to build_op_delete_call.
12943
12944 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
12945
12946 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
12947 (build_vtbl_ref): Adjust.
12948 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12949 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12950 Re-add vtable-gc.
12951 (unsupported_options): Correspondingly.
12952
12953 * decl2.c (maybe_make_one_only): Check flag_weak, not
12954 supports_one_only().
12955
12956 * cp-tree.def (START_CATCH_STMT): Lose.
12957 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
12958 * tree.c (cp_statement_code_p): Don't case it.
12959 * semantics.c (cp_expand_stmt): Likewise.
12960 * cp-tree.h (START_CATCH_TYPE): Lose.
12961 (HANDLER_TYPE): New.
12962 * except.c (expand_start_catch_block): Don't start any blocks.
12963 Return the type.
12964 (expand_end_catch_block): Don't end any blocks.
12965 * parse.y (handler): Don't pass anything from finish_handler_parms
12966 to finish_handler.
12967 * pt.c (tsubst_expr): Likewise.
12968 * semantics.c (begin_handler): Call note_level_for_catch here.
12969 (finish_handler_parms): Don't return anything.
12970 (genrtl_catch_block, begin_catch_block): Lose.
12971 (genrtl_handler): Call expand_start_catch here.
12972
12973 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
12974
12975 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12976 (get_vtable_decl, build_vtt): Not here.
12977
12978 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
12979
12980 PR c++/2781
12981 * optimize.c (update_cloned_parm): Copy addressability and other
12982 flags.
12983
12984 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12985
12986 * pt.c (determine_specialization): Ignore artificial functions.
12987
12988 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
12989
12990 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12991 (C_RID_CODE): Remove.
12992 * lex.c (cxx_init_options): Call set_identifier_size. Update.
12993 (init_parse): Don't do it here.
12994
12995 2001-05-18 Diego Novillo <dnovillo@redhat.com>
12996
12997 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12998 function declaration to avoid stripping the symbol's attributes.
12999
13000 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
13001
13002 * decl.c (pushdecl): Adjust error string.
13003 (xref_tag): Adjust friend class injection warning. Remove the
13004 inherited name from the class shadowed scope.
13005
13006 2001-05-17 Mark Mitchell <mark@codesourcery.com>
13007
13008 * except.c (cp_protect_cleanup_actions): New function.
13009 (init_exception_processing): Don't set protect_cleanup_actions
13010 here. Do set lang_protect_cleanup_actions.
13011
13012 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13013
13014 * spew.c (read_token): Call yyerror on all unexpected tokens.
13015
13016 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13017
13018 * init.c (member_init_ok_or_else): Take a tree rather than
13019 string for name.
13020 (expand_member_init): Adjust.
13021
13022 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
13023
13024 * decl.c (duplicate_decls): Suppress warning about duplicate
13025 decls if the first decl is a friend.
13026
13027 2001-05-12 Zack Weinberg <zackw@stanford.edu>
13028
13029 * except.c (choose_personality_routine): Export. Add
13030 explanatory comment. Take an enum languages, not a boolean.
13031 (initialize_handler_parm): Adjust to match.
13032 * cp-tree.h: Prototype choose_personality_routine.
13033 * lex.c (handle_pragma_java_exceptions): New function.
13034 (init_cp_pragma): Register #pragma GCC java_exceptions.
13035
13036 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
13037
13038 * method.c (build_mangled_C99_name): Remove unused prototype.
13039
13040 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
13041
13042 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
13043 * typeck.c (get_member_function_from_ptrfunc,
13044 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
13045 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
13046
13047 Reverted Geoff Keating's 2001-05-03's patch.
13048
13049 2001-05-11 Ira Ruben <ira@apple.com>
13050
13051 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
13052
13053 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
13054
13055 * cp-tree.h (finish_label_expr, lookup_label): Delete.
13056 * parse.y: Update for '&&'; don't issue warning here.
13057 * semantics.c (finish_label_expr): Delete.
13058
13059 2001-05-07 Mark Mitchell <mark@codesourcery.com>
13060
13061 * splay-tree.h (splay_tree_max): New function.
13062 (splay_tree_min): Likewise.
13063
13064 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
13065
13066 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
13067 (pfn_vflag_identifier): Define.
13068 Update comment about layout of pointer functions.
13069 (build_ptrmemfunc1): Update prototype.
13070 (expand_ptrmemfunc_cst): Update prototype.
13071 * decl.c (initialize_predefined_identifiers): Initialize
13072 pfn_vflag_identifier.
13073 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
13074 an extra field to the type.
13075 * expr.c (cplus_expand_constant): Pass 'flag' between
13076 expand_ptrmemfunc_cst and build_ptrmemfunc1.
13077 * typeck.c (get_member_function_from_ptrfunc): When
13078 FUNCTION_BOUNDARY < 16, look at additional field to determine
13079 if a pointer-to-member is a real pointer or a vtable offset.
13080 (build_ptrmemfunc1): Add new parameter to contain extra field.
13081 (build_ptrmemfunc): Pass the extra field around.
13082 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
13083 (pfn_from_ptrmemfunc): Ignore the extra field.
13084
13085 2001-05-03 Mark Mitchell <mark@codesourcery.com>
13086
13087 * cp-tree.h (flag_inline_trees): Update documentation.
13088 * decl.c (init_decl_processing): Adjust handling of
13089 flag_inline_functions and flag_inline_trees to support -O3.
13090 (grokfndecl): Set DECL_INLINE on all functions if that's what
13091 the user requested.
13092 (save_function_data): Clear DECL_INLINE in
13093 current_function_cannot_inline is non-NULL.
13094 * decl2.c (flag_inline_trees): Update documentation.
13095
13096 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
13097
13098 * dump.c (cp_dump_tree, USING_STMT case): New case.
13099 * tree.c (cp_statement_code_p): Add USING_STMT.
13100 * decl2.c (do_using_directive): Add the using directive statement.
13101
13102 * tree.c (walk_tree): Reformat an if block.
13103
13104 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13105
13106 * decl.c (compute_array_index_type): Don't try to do anything with
13107 the indices when processing a template.
13108
13109 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13110
13111 * call.c: NULL_PTR -> NULL.
13112 * class.c: Likewise.
13113 * cvt.c: Likewise.
13114 * decl.c: Likewise.
13115 * decl2.c: Likewise.
13116 * except.c: Likewise.
13117 * init.c: Likewise.
13118 * rtti.c: Likewise.
13119 * search.c: Likewise.
13120 * tree.c: Likewise.
13121 * typeck.c: Likewise.
13122 * typeck2.c: Likewise.
13123
13124 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13125
13126 * decl2.c (do_using_directive): Revert previous patch.
13127
13128 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13129
13130 * cp-tree.def (USING_STMT): New statement node.
13131 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13132 * decl2.c (do_using_directive): Add USING_STMT to statement
13133 tree. Don't emit errors when processing template decl.
13134 * pt.c (tsubst_expr, USING_STMT case): New case.
13135 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13136
13137 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13138
13139 * call.c (build_new_op): Convert args from reference here.
13140 (build_conditional_expr): Don't convert here.
13141
13142 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13143
13144 * spew.c (last_token_id): New static variable.
13145 (read_token): Set it here.
13146 (yyerror): Use it here.
13147
13148 2001-04-30 Richard Henderson <rth@redhat.com>
13149
13150 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13151 * decl.c: Likewise.
13152
13153 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13154
13155 * gxxint.texi: Remove.
13156 * Make-lang.in: Remove all traces of gxxint.texi.
13157
13158 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
13159
13160 * decl2.c (start_static_initialization_or_destruction): Correct
13161 logic to handle the -fno-use-cxa-atexit case.
13162
13163 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13164
13165 * optimize.c (update_cloned_parm): New function.
13166 (maybe_clone_body): Use it. Update the `this' parameter too.
13167
13168 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
13169
13170 * decl2.c (unsupported_options): Add new-abi.
13171 * lang-options.h: Remove no longer supported options.
13172
13173 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13174
13175 * except.c (can_convert_eh): Don't check template parms,
13176 typename types etc.
13177
13178 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13179
13180 * optimize.c (maybe_clone_body): Copy parameter names and locations.
13181
13182 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13183
13184 * cp-tree.h (adjust_clone_args): Prototype new function.
13185 * class.c (adjust_clone_args): New function.
13186 * decl.c (start_function): Call it for in charge ctors.
13187
13188 2001-04-26 Mark Mitchell <mark@codesourcery.com>
13189
13190 * method.c (use_thunk): Make sure that thunks really are emitted
13191 when requested.
13192
13193 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
13194
13195 * mangle.c (write_chars): New macro.
13196 (hwint_to_ascii): New function
13197 (write_number): Use it.
13198 (write_integer_cst): Deal with really big numbers.
13199
13200 2001-04-25 Mark Mitchell <mark@codesourcery.com>
13201
13202 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13203 the clone.
13204
13205 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
13206
13207 * decl.c (grokdeclarator): Set context of namespace scope
13208 TYPE_DECLS.
13209
13210 2001-04-24 Zack Weinberg <zackw@stanford.edu>
13211
13212 * cp/optimize.c: Include hashtab.h.
13213 (struct inline_data): Add tree_pruner.
13214 (expand_call_inline, expand_calls_inline): Use it when calling
13215 walk_tree.
13216 (optimize_function): Initialize and free tree_pruner.
13217
13218 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13219
13220 Lazy __FUNCTION__ generation.
13221 * cp-tree.def (FUNCTION_NAME): Remove.
13222 * cp-tree.h (function_name_declared_p): Remove.
13223 (cp_fname_init): Prototype.
13224 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13225 don't call declare_function_name. Call start_fname_decls.
13226 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13227 clobber the line number.
13228 (cp_fname_init): New function.
13229 (start_function): Call start_fname_decls.
13230 (finish_function): Call finish_fname_decls.
13231 * lex.c (reswords): Add slots for __FUNCTION__ et al.
13232 (rid_to_yy): Add mappings for __FUNCTION__ et al.
13233 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13234 * parse.y (VAR_FUNC_NAME): New token.
13235 (primary): Add VAR_FUNC_NAME.
13236 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13237 generation.
13238 (tsubst, FUNCTION_NAME case): Remove.
13239 (tsubst_copy, FUNCTION_NAME case): Remove.
13240 (tsubst_expr, DECL_STMT case): Be careful with a
13241 DECL_PRETTY_FUNCTION_P.
13242 (instantiate_decl): Remove function_name_declared_p.
13243 * semantics.c (begin_compound_statement): Don't call
13244 declare_function_name here.
13245 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13246 (finish_translation_unit): Call finish_fname_decls.
13247 (expand_body): Remove function_name_declared_p.
13248 * typeck2.c (digest_init): Allow any ERROR_MARK.
13249
13250 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13251
13252 * pt.c (tsubst_decl): Use VOID_TYPE_P.
13253 * semantics.c: Fix some typos.
13254
13255 2001-04-23 Phil Edwards <pme@sources.redhat.com>
13256
13257 * cp/decl2.c (flag_honor_std): Always initialize to 1.
13258
13259 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13260
13261 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13262
13263 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
13264
13265 * except.c (build_throw): Wrap the initialization of the exception
13266 object in a MUST_NOT_THROW_EXPR.
13267 (do_free_exception): #if 0.
13268
13269 2001-04-20 Mark Mitchell <mark@codesourcery.com>
13270
13271 * cp-tree.h (finish_enum): Change prototype.
13272 * decl.c (finish_enum): Reorganize.
13273 * parse.y (structsp): Adjust calls to finish_enum.
13274
13275 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13276
13277 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13278 't' case.
13279
13280 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13281
13282 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13283 (layout_empty_base): Return at end flag.
13284 (build_base_field): Likewise.
13285 (build_base_fields): Likewise.
13286 (layout_virtual_bases): Don't add 1 to eoc value.
13287 (end_of_class): Use full size for empty bases.
13288 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13289 empty bases. Don't add 1 to eoc value. Only add trailing padding
13290 if we're an empty class with no empty bases.
13291 (dump_class_hierarchy): Dump size and alignment.
13292
13293 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13294
13295 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13296 ICS_BAD_FLAG.
13297
13298 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13299
13300 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13301 is found, look first if name does not match the structure name.
13302
13303 2001-04-19 Mark Mitchell <mark@codesourcery.com>
13304
13305 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13306 set.
13307 (SET_DECL_LANGUAGE): New macro.
13308 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13309 (pushdecl): Likewise.
13310 (build_library_fn_1): Likewise.
13311 (build_cp_library_fn): Likewise.
13312 (grokfndecl): Likewise.
13313 (grokvardecl): Mark `extern "C"' variables as having C linkage.
13314 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13315 * lex.c (retrofit_lang_decl): Likewise.
13316 * mangle.c (mangle_decl_string): Don't mangle the names of
13317 variables declared with C language linkage.
13318 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13319
13320 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
13321
13322 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13323 flag_access_control from uninitialized storage.
13324
13325 2001-04-15 Mark Mitchell <mark@codesourcery.com>
13326
13327 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13328 * mangle.c (write_pointer_to_member_type): Fix mangling of
13329 pointers to cv-qualified member function types.
13330
13331 * init.c (build_delete): Create a SAVE_EXPR for the address if
13332 we're going to use it more than once.
13333
13334 2001-04-13 Mark Mitchell <mark@codesourcery.com>
13335
13336 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13337 (expand_ptremfunc_cst): Change prototype.
13338 (delta2_from_ptrmemfunc): Remove.
13339 * expr.c (cplus_expand_constant): Adjust call to
13340 expand_ptrmemfunc_cst.
13341 * typeck.c (build_ptrmemfunc1): Simplify.
13342 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13343 results in a constant.
13344 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13345 (delta2_from_ptrmemfunc): Remove.
13346 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13347
13348 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
13349
13350 * cp-tree.h (decl_namespace_list): New macro.
13351 (struct saved_scope): Add decl_ns_list.
13352 * decl.c (mark_saved_scope): Mark it.
13353 * decl2.c: Lose static decl_namespace_list.
13354 (init_decl2): Don't save it.
13355
13356 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13357
13358 * cp-tree.h (warn_return_type, yylex): Delete redundant
13359 declarations.
13360
13361 * decl.c (current_class_depth, global_namespace): Likewise.
13362
13363 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13364
13365 * repo.c (flag_use_repository): Likewise.
13366
13367 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13368
13369 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13370 set_block, pushdecl, getdecls, gettags, init_decl_processing,
13371 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13372 lvalue_or_else, print_lang_statistics, comp_target_types,
13373 unsigned_type, signed_type, signed_or_unsigned_type,
13374 build_function_call, mark_addressable, incomplete_type_error):
13375 Delete redundant declarations.
13376
13377 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
13378
13379 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13380 (TYPE_ANONYMOUS_P): New macro.
13381 (TAGGED_TYPE_P): New macro.
13382 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13383 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13384 * tree.c (no_linkage_helper): Likewise.
13385 * semantics.c (begin_class_definition): Likewise.
13386 * pt.c (convert_template_argument): Likewise.
13387 * lex.c (check_for_missing_semicolon): Likewise.
13388
13389 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13390
13391 * class.c (dfs_unshared_virtual_bases): New function.
13392 (mark_primary_bases): Call it.
13393 (check_bases): Ignore virtual bases when determining
13394 nearly-emptiness.
13395
13396 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13397
13398 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13399
13400 2001-04-11 Mark Mitchell <mark@codesourcery.com>
13401
13402 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13403 cloned function to the clone.
13404
13405 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13406
13407 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13408
13409 * semantics.c: Include expr.h.
13410
13411 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
13412
13413 * method.c (implicitly_declare_fn): Commonize code for copy ctor
13414 and assignment op. Set TREE_USED for parameter.
13415
13416 2001-04-10 Mark Mitchell <mark@codesourcery.com>
13417
13418 * class.c (find_final_overrider_data): Add `candidates'.
13419 (dfs_find_final_overrider): Don't issue error messages
13420 prematurely.
13421 (find_final_overrider): Issue error messages here.
13422 (build_base_field): Don't warn about amgibuous direct bases here.
13423 (warn_about_ambiguous_direct_bases): New function.
13424 (layout_class_type): Use it.
13425
13426 2001-04-10 Richard Henderson <rth@redhat.com>
13427
13428 * typeck.c (build_array_ref): Push the array reference inside
13429 COMPOUND_EXPR and COND_EXPR.
13430
13431 2001-04-05 Mark Mitchell <mark@codesourcery.com>
13432
13433 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13434 * decl.c (duplicate_decls): Adjust accordingly.
13435 (maybe_commonize_var): Likewise.
13436 (grokfndecl): Likewise.
13437 (start_function): Likewise.
13438 (start_method): Likewise.
13439 * decl2.c (key_method): Likewise.
13440 (import_export_decl): Likewise.
13441 * method.c (implicitly_declare_fn): Likewise.
13442 * optimize.c (maybe_clone_body): Likewise.
13443
13444 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
13445
13446 * lang-specs.h: Add __DEPRECATED.
13447
13448 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
13449
13450 * search.c (get_dynamic_cast_base_type): When building a new
13451 constant, set its type to ssizetype.
13452
13453 2001-04-04 Jakub Jelinek <jakub@redhat.com>
13454
13455 * optimize.c (expand_call_inline): Only add newly inlined statements
13456 into inlined_stmts.
13457
13458 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13459
13460 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13461 (OPERATOR_FORMAT): Likewise.
13462 (OPERATOR_TYPENAME_FORMAT): Likewise.
13463 * operators.def: Remove old name-mangling information.
13464 * decl.c (grok_op_properties): Adjust accordingly.
13465 * lex.c (init_operators): Likewise.
13466 * rtti.c (get_tinfo_decl): Issue error messages about types that
13467 have variable size.
13468
13469 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13470
13471 * decl2.c (import_export_decl): Don't call import_export_class
13472 when processing an inline member function.
13473 * semantics.c (expand_body): Call import_export_decl before
13474 emitting inline functions.
13475
13476 2001-03-28 Richard Henderson <rth@redhat.com>
13477
13478 IA-64 ABI Exception Handling:
13479 * cp-tree.def (EH_SPEC_BLOCK): New.
13480 (MUST_NOT_THROW_EXPR): New.
13481 * cp-tree.h: Update changed function declarations.
13482 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13483 (CPTI_CALL_UNEXPECTED): New.
13484 (struct cp_language_function): Rename x_eh_spec_try_block
13485 to x_eh_spec_block.
13486 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13487 * decl.c (current_binding_level): If no current function
13488 bindings, revert to scope_chain.
13489 (initialize_predefined_identifiers): Remove __cp_push_exception.
13490 (store_parm_decls): Use begin_eh_spec_block.
13491 (finish_function): Use finish_eh_spec_block.
13492 (mark_lang_function): Update for name changes.
13493 * decl2.c (finish_file): No mark_all_runtime_matches.
13494 * dump.c (cp_dump_tree): Handle new tree codes.
13495 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13496 * except.c (catch_language_init, catch_language): Remove.
13497 (init_exception_processing): Don't set language code.
13498 Initialize call_unexpected_node, protect_cleanup_actions,
13499 eh_personality_libfunc, lang_eh_runtime_type.
13500 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13501 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13502 (prepare_eh_type): Split out type canonicalizations ...
13503 (build_eh_type_type): ... from here.
13504 (build_eh_type_type_ref): Remove.
13505 (mark_all_runtime_matches): Remove.
13506 (build_exc_ptr): New.
13507 (do_begin_catch, do_end_catch): New.
13508 (do_pop_exception): Remove.
13509 (build_terminate_handler): Remove.
13510 (choose_personality_routine): Split out language choice from ...
13511 (initialize_handler_parm): ... here.
13512 Use MUST_NOT_THROW_EXPR.
13513 (expand_start_catch_block): Use do_begin_catch. Simplify Java
13514 exception object handling.
13515 (expand_start_eh_spec, expand_end_eh_spec): Remove.
13516 (expand_exception_blocks, alloc_eh_object): Remove.
13517 (begin_eh_spec_block, finish_eh_spec_block): New.
13518 (do_allocate_exception, do_free_exception): New.
13519 (expand_throw): Merge into ...
13520 (build_throw): ... here. Update for abi.
13521 * expr.c (cplus_expand_expr): No expand_internal_throw.
13522 Handle MUST_NOT_THROW_EXPR.
13523 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13524 * semantics.c (*) Update for except.h name changes.
13525 (genrtl_try_block): No protect_with_terminate.
13526 (genrtl_eh_spec_block): New.
13527 (genrtl_handler): Don't emit the goto here.
13528 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13529 (genrtl_finish_function): Don't expand_exception_blocks.
13530 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13531
13532 2001-03-28 Richard Henderson <rth@redhat.com>
13533
13534 * decl.c (struct named_label_list): Rename eh_region to
13535 in_try_scope, add in_catch_scope.
13536 (struct binding_level): Rename eh_region to is_try_scope,
13537 add is_catch_scope.
13538 (note_level_for_try): Rename from note_level_for_eh.
13539 (note_level_for_catch): New.
13540 (poplevel): Copy both is_try_scope and is_catch_scope to
13541 the named_label_list struct.
13542 (check_previous_goto_1): Don't check for catch block via
13543 DECL_ARTIFICIAL; use in_try_scope instead.
13544 (check_goto): Likewise.
13545 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13546 * except.c (expand_start_catch_block): Call note_level_for_catch.
13547 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13548
13549 2001-03-27 Richard Henderson <rth@redhat.com>
13550
13551 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13552 exceptions_via_longjmp.
13553
13554 2001-03-27 Phil Edwards <pme@sources.redhat.com>
13555
13556 * pt.c (check_default_tmpl_args): Make error messages clearer.
13557
13558 2001-03-26 Phil Edwards <pme@sources.redhat.com>
13559
13560 * error.c: Also undefine 'A' macro used for cp_printers definition.
13561
13562 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13563
13564 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13565
13566 2001-03-26 Mike Yang <yang@research.att.com>
13567 Mark Mitchell <mark@codesourcery.com>
13568
13569 * dump.c (dump_access): New function.
13570 (cp_dump_tree): Use it. Dump basetype information for class
13571 types.
13572
13573 2001-03-26 Mark Mitchell <mark@codesourcery.com>
13574
13575 * Makefile.in (optimize.o): Depend on params.h.
13576 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13577 (init_decl_processing): Set flag_no_inline when doing
13578 inlining-on-trees.
13579 * optimize.c: Include params.h.
13580 (struct inline_data): Improve documentation of FNS. Add
13581 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13582 (INSNS_PER_STMT): New macro.
13583 (remap_block): Use CLONING_P.
13584 (inlinable_function_p): Don't inline big functions.
13585 (expand_call_inline): Keep track of how much inlining we've done.
13586 (optimize_function): Set FIRST_INLINED_FN.
13587 (maybe_clone_body): Set CLONING_P.
13588 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13589 tree nodes.
13590 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13591 rest_of_compilation. Clear DECL_RTL for local variables
13592 afterwards.
13593 (clear_decl_rtl): New function.
13594
13595 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
13596
13597 Implement DR 209
13598 * cp-tree.h (skip_type_access_control,
13599 reset_type_access_control): Prototype.
13600 * decl.c (grokdeclarator): Access of friends is not checked.
13601 * parse.y (component_decl_list): Reset type access control.
13602 * semantics.c (decl_type_access_control): Clear
13603 current_type_lookups.
13604 (save_type_access_control): Don't save if not deferring.
13605 (skip_type_access_control, reset_type_access_control): New
13606 functions.
13607 (begin_class_definition): Do type access control for basetypes.
13608 Start deferred access control.
13609 (finish_class_definition): Resume immediate access control if
13610 this is a local class.
13611
13612 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13613
13614 * class.c (add_method): Use memcpy/memmove, not bcopy.
13615
13616 * decl.c (duplicate_decls): Likewise.
13617
13618 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13619
13620 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13621 not `_'.
13622
13623 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13624
13625 * decl.c (local_names): Define.
13626 (push_local_name): New.
13627 (grok_reference_init): Return init if initializing static reference
13628 variable with non-constant instead of emitting it.
13629 Move expand_static_init call to cp_finish_decl.
13630 (layout_var_decl): Call push_local_name.
13631 (maybe_commonize_var): Allow inlining functions even if they have
13632 static local variables, use comdat_linkage for them if flag_weak.
13633 (check_initializer): Call obscure_complex_init if
13634 grok_reference_init returned nonzero.
13635 (save_function_data): Clear x_local_names.
13636 (pop_cp_function_context): Free x_local_names.
13637 (mark_inlined_fns): Remove.
13638 (mark_lang_function): Mark x_local_names.
13639 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13640 Mark inlined_fns as tree, remove call to mark_inlined_fns.
13641 * class.c (alter_access): Ensure DECL_ACCESS is never set if
13642 DECL_DISCRIMINATOR_P.
13643 * cp-tree.h (cp_language_function): Add x_local_names.
13644 (lang_decl_flags): Add discriminator into u2.
13645 (lang_decl_inlined_fns): Remove.
13646 (lang_decl): inlined_fns is now a TREE_VEC.
13647 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13648 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13649 TREE_VEC, not a custom structure.
13650 (optimize_function): Likewise.
13651 * mangle.c (discriminator_for_local_entity): Discriminate among
13652 VAR_DECL local entities.
13653 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13654 is not valid.
13655
13656 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
13657
13658 Add support for Java interface method calls.
13659 * cp-tree.h (struct lang_type): Add java_interface flag.
13660 (TYPE_JAVA_INTERFACE): New macro.
13661 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13662 by setting TYPE_JAVA_INTERFACE.
13663 * call.c (java_iface_lookup_fn): New static.
13664 (build_over_call): If calling a method declared in a
13665 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13666 expression which resolves the function address.
13667 (build_java_interface_fn_ref): New function.
13668
13669 2001-03-22 Richard Henderson <rth@redhat.com>
13670
13671 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13672 * except.c: Don't include it.
13673
13674 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13675 based on an idea from Joe Buck <jbuck@synopsys.com>
13676
13677 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13678 New nonterminals.
13679 (data_def, component_decl): Add reductions to bad_decl.
13680
13681 2001-03-22 Jakub Jelinek <jakub@redhat.com>
13682
13683 * method.c (do_build_assign_ref): Don't use build_modify_expr for
13684 anonymous aggregates, since they don't have assignment operator
13685 method.
13686 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13687 assignment operators for anonymous structure fields.
13688
13689 2001-03-21 Jason Merrill <jason@redhat.com>
13690
13691 * pt.c (instantiate_decl): Abort if we see a member constant
13692 instantiation that doesn't already have its initializer.
13693 Downgrade explicit instantiation without definition to pedwarn.
13694
13695 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13696 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13697 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13698
13699 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13700 (pending_vtables): Remove.
13701 * decl2.c (pending_vtables): Remove.
13702 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13703 CLASSTYPE_VTABLE_NEEDS_WRITING.
13704 (import_export_class): Likewise.
13705 (init_decl2): Don't mark pending_vtables.
13706 * lex.c (handle_pragma_vtable): Just sorry.
13707 * pt.c (instantiate_class_template): Don't mess with
13708 CLASSTYPE_VTABLE_NEEDS_WRITING.
13709 (mark_class_instantiated): Likewise.
13710 * ptree.c (print_lang_type): Don't print it.
13711 * semantics.c (begin_class_definition): Don't set it.
13712
13713 * pt.c (template_tail): Replace with last_pending_template.
13714 (maybe_templates, maybe_template_tail): Remove.
13715 (add_pending_template): Adjust.
13716 (instantiate_pending_templates): Adjust.
13717
13718 * cp-tree.h (struct saved_scope): Remove lang_stack field.
13719 (current_lang_stack): Remove.
13720 * decl.c (maybe_push_to_top_level): Don't initialize it.
13721 (duplicate_decls): Use current_lang_depth.
13722 (xref_basetypes): Likewise.
13723 * class.c (current_lang_depth): New fn.
13724 (push_lang_context): Use more varray functionality.
13725 (pop_lang_context): Likewise.
13726
13727 * error.c (GLOBAL_THING): Always use '__'.
13728
13729 2001-03-21 Mark Mitchell <mark@codesourcery.com>
13730
13731 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13732
13733 * mangle.c (mangle_decl_string): Mangle the names of overloaded
13734 operators, even when they have `extern "C"' linkage.
13735
13736 2001-03-19 Mark Mitchell <mark@codesourcery.com>
13737
13738 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13739 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13740 where it's not necessary.
13741 (add_method): Remove optimization involving comparison of
13742 DECL_ASSEMBLER_NAME.
13743 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13744 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13745 where it's not necessary.
13746 (check_methods): Likewise.
13747 (build_clone): Likewise.
13748 (built_vtt): Likewise.
13749 * cp-tree.h (DECL_NEEDED_P): Likewise.
13750 * decl.c (pushtag): Likewise.
13751 (duplicate_decls): Likewise.
13752 (pushdecl): Likewise.
13753 (builtin_function): Likewise.
13754 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13755 (build_cp_library_fn): Likewise.
13756 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13757 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13758 where it's not necessary.
13759 (make_rtl_for_nonlocal_decl): Likewise.
13760 (cp_finish_decl): Likewise.
13761 (grokfndecl): Likewise.
13762 (grokvardecl): Likewise.
13763 (grokdeclarator): Likewise.
13764 (start_function): Likewise.
13765 (cp_missing_return_ok_p): Likewise.
13766 * decl2.c (grokclassfn): Likewise.
13767 (check_classfn): Likewise.
13768 (finish_static_data_member_decl): Likewise.
13769 (grokfield): Likewise.
13770 * error.c (GLOBAL_IORD_P): Remove.
13771 (dump_global_iord): Improve output.
13772 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13773 * except.c (nothrow_libfn_p): Summarily reject any function not in
13774 namespace-scope.
13775 * init.c (build_java_class_ref): Don't explicitly set
13776 DECL_ASSEMBLER_NAME after calling mangle_decl.
13777 * mangle.c (mangle_decl_string): Handle extern "C" functions.
13778 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13779 * method.c (set_mangled_name_for_decl): Don't explicitly set
13780 DECL_ASSEMBLER_NAME after calling mangle_decl.
13781 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13782 IDENTIFIER_GLOBAL_VALUE for the thunk.
13783 * pt.c (set_mangled_name_for_template_decl): Remove.
13784 (check_explicit_specialization): Don't use it.
13785 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13786 (tsubst_friend_function): Likewise.
13787 (tsubst_decl): Likewise.
13788 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13789 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13790 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13791 where it's not necessary.
13792 (tinfo_base_init): Likewise.
13793 (create_real_tinfo_var): Likewise.
13794 * search.c (looup_field_1): Likewise.
13795 * semantics.c (finish_named_return_value): Likewise.
13796 * tree.c (init_tree): Set lang_set_decl_assembler_name.
13797
13798 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
13799
13800 Correct semantics restrictions checking in throw-expression.
13801 * except.c (is_admissible_throw_operand): New function.
13802 (build_throw): Use it.
13803
13804 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13805
13806 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13807 and its ilk.
13808
13809 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13810
13811 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13812 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13813 * decl.c (duplicate_decls): Likewise.
13814 (builtin_function): Likewise.
13815 (build_library_fn): Likewise.
13816 (build_cp_library_fn): Likewise.
13817 (check_initializer): Likewise.
13818 (cp_finish_decl): Likewise.
13819 * decl2.c (grokfield): Likewise.
13820 (grok_function_init): Remove #if 0'd code.
13821 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13822 * friend.c (do_friend): Likewise.
13823 * init.c (get_temp_regvar): Likewise.
13824 * method.c (make_thunk): Likewise.
13825 * pt.c (tsubst_friend_function): Likewise.
13826 (tsubst_decl): Likewise.
13827 (regenerate_decl_from_template): Likewise.
13828 * semantics.c (genrtl_named_return_value): Likewise.
13829 (expand_body): Likewise.
13830 (genrtl_finish_function): Likewise.
13831 * tree.c (cp_tree_equal): Likewise.
13832
13833 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
13834
13835 * call.c (convert_like_real): Add extra semantics to INNER
13836 parameter. Don't convert to temporary if a user conversion
13837 gives us an lvalue that we're about to bind to a reference.
13838 Set INNER to indicate pending reference binding on recursive
13839 calls.
13840
13841 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13842
13843 * cp/lex.c: Delete duplicate pending_lang_change.
13844
13845 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13846
13847 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13848 Similarly.
13849 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13850 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13851
13852 2001-03-09 Zack Weinberg <zackw@stanford.edu>
13853
13854 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13855
13856 2001-03-08 Stan Shebs <shebs@apple.com>
13857
13858 * cp-tree.h (set_identifier_local_value): Remove unused decl.
13859
13860 2001-03-06 Zack Weinberg <zackw@stanford.edu>
13861
13862 * spew.c: Remove references to CPP_OSTRING.
13863
13864 2001-03-06 Andrew Haley <aph@redhat.com>
13865
13866 * typeck.c (convert_arguments): Check that we have an fndecl.
13867
13868 2001-03-05 Andrew Haley <aph@redhat.com>
13869
13870 * typeck.c (convert_arguments): Don't do ellipsis conversion for
13871 __built_in_constant_p.
13872
13873 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13874
13875 * typeck.c (build_static_cast): Allow enum to enum conversions
13876 as per DR 128.
13877
13878 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13879
13880 * class.c (check_field_decls): Pointers to member do not a
13881 non-pod struct make, as per DR 148.
13882
13883 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13884
13885 * call.c (joust): cp_pedwarn when using gnu extension concerning
13886 worst conversion sequences.
13887
13888 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13889
13890 * decl.c: Replace all uses of 'boolean' with 'bool'.
13891
13892 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13893
13894 * lang-specs.h: Add zero initializer for cpp_spec field to
13895 all array elements that need one. Don't put an #ifdef inside
13896 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13897 use it.
13898
13899 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13900
13901 Implement using decls inside template functions.
13902 * decl2.c (validate_nonmember_using_decl): Don't special case
13903 fake_std_node in the global namespace. Don't reject early when
13904 processing a template.
13905 (do_local_using_decl): Add to statement tree. Don't do further
13906 processing when building a template.
13907 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13908
13909 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13910
13911 * decl2.c (do_nonmember_using_decl): Don't complain if we find
13912 same function. Do complain about ambiguating extern "C"
13913 declarations.
13914
13915 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
13916
13917 Remove floating point and complex type template constant parms.
13918 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13919 COMPLEX_TYPE extensions.
13920 (invalid_nontype_parm_type_p): Likewise.
13921
13922 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
13923
13924 * except.c (call_eh_info): Revert "match_function"'s type.
13925
13926 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
13927
13928 Fix ctor vtable vcall offsets.
13929 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13930 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13931 (get_matching_base): Remove.
13932 (get_original_base): New function.
13933 (build_vtbl_initializer): Initialize vid.rtti_binfo.
13934 Use a virtual thunk for a ctor vtable with an index
13935 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13936 primary base within a constructor vtable. Only set
13937 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13938 when primary base has been lost.
13939 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13940
13941 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
13942
13943 * call.c (joust): Ensure more_specialized()'s argument length
13944 parameter has correct value for constructors.
13945
13946 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
13947
13948 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13949
13950 * decl.c (mark_inlined_fns): Prototype.
13951
13952 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13953
13954 * spew.c (yylex): Correct handling of friends.
13955
13956 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13957
13958 * mangle.c (write_encoding): Pass write_function_type the
13959 FUNCTION_DECL for the function being encoded.
13960 (write_function_type): Pass it along to write_bare_function_type.
13961 (write_bare_function_type): Pass it along to write_method_parms.
13962 (write_method_parms): Don't mangle the compiler-generated
13963 parameters to a constructor or destructor.
13964
13965 2001-02-22 Andreas Jaeger <aj@suse.de>
13966
13967 * optimize.c: Include toplev.h for
13968 note_deferral_of_defined_inline_function prototype.
13969
13970 2001-02-22 Jakub Jelinek <jakub@redhat.com>
13971
13972 * cp-tree.h (struct lang_decl_inlined_fns): New.
13973 (struct lang_decls): Add inlined_fns.
13974 (DECL_INLINED_FNS): New macro.
13975 * optimize.c (struct inline_data): Add inlined_fns.
13976 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13977 (inlinable_function_p): Likewise, fix typo in comment,
13978 function is not inlinable if it already inlined function currently
13979 being optimized.
13980 (expand_call_inline): Add fn to inlined_fns if necessary.
13981 (optimize_function): Initialize inlined_fns.
13982 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13983 * decl.c (mark_inlined_fns): New function.
13984 (lang_mark_tree): Call it.
13985
13986 2001-02-21 Jason Merrill <jason@redhat.com>
13987
13988 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13989 (DECL_UNINLINABLE): Move to middle-end.
13990
13991 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13992 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13993 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13994 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13995 parms and outer BLOCK. note_deferral_of_defined_inline_function.
13996
13997 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13998 second parm of op=.
13999
14000 2001-02-19 Mark Mitchell <mark@codesourcery.com>
14001
14002 * decl2.c (set_decl_namespace): Allow explicit instantiations in
14003 any namespace.
14004
14005 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14006
14007 * optimize.c (expand_call_inline): Don't walk subtrees of type
14008 nodes.
14009
14010 2001-02-18 Mark Mitchell <mark@codesourcery.com>
14011
14012 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
14013 for a destructor.
14014
14015 2001-02-18 Jason Merrill <jason@redhat.com>
14016
14017 Do put the VTT parameter in DECL_ARGUMENTS.
14018 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
14019 (current_vtt_parm): New macro.
14020 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
14021 (DECL_HAS_VTT_PARM_P): New macro.
14022 (DECL_VTT_PARM): Remove.
14023 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
14024 * decl.c (duplicate_decls): Only copy the operator code if
14025 appropriate.
14026 (start_function): Set current_vtt_parm.
14027 (lang_mark_tree): Don't mark vtt_parm.
14028 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
14029 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
14030 * class.c (build_clone): Maybe remove the VTT parm.
14031 * optimize.c (maybe_clone_body): Set up the VTT parm.
14032 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
14033 * call.c (build_over_call): Just allow the VTT arg.
14034 * method.c (make_thunk): Don't set DECL_VTT_PARM.
14035 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
14036 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
14037 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
14038 * error.c (dump_function_decl): Likewise.
14039 * call.c (build_user_type_conversion_1, convert_like_real): Abort
14040 if we try to call a constructor with in-charge or VTT parms.
14041 * method.c (skip_artificial_parms_for): New fn.
14042 * call.c (add_function_candidate, build_over_call): Call it.
14043 * call.c (build_new_method_call): Use current_vtt_parm.
14044 * init.c (expand_virtual_init): Likewise.
14045 * class.c (same_signature_p): No longer static.
14046 * cp-tree.h: Declare it.
14047 * search.c (look_for_overrides_r): Use it.
14048
14049 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14050
14051 * cp-tree.h (new_abi_rtti_p): Remove.
14052 (name_mangling_version): Likewise.
14053 (flag_do_squangling): Likewise.
14054 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
14055 * decl.c (grokfndecl): Likewise.
14056 * decl2.c (name_mangling_version): Remove.
14057 (flag_do_squangling): Likewise.
14058 (lang_f_options): Remove `squangle'.
14059 (unsupported_options): Add `squangle'.
14060 (cxx_decode_option): Issue a warning about uses of
14061 -fname-mangling-version.
14062 (finish_file): Remove old ABI support.
14063 * pt.c (check_explicit_specialization): Likewise.
14064 (tsubst_decl): Likewise.
14065 * rtti.c (init_rtti_processing): Likewise.
14066 (build_headof): Likewise.
14067 (get_tinfo_decl_dynamic): Likewise.
14068 (tinfo_from_decl): Likewise.
14069 (build_dynamic_cast_1): Likewise.
14070 (synthesize_tinfo_var): Likewise.
14071 * init.c (build_new): Allow enumeration types for the array-bounds
14072 in a direct-new-declarator.
14073
14074 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
14075
14076 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
14077 TREE_PROTECTED from the template being specialized.
14078
14079 2001-02-17 Jason Merrill <jason@redhat.com>
14080
14081 * decl2.c (build_artificial_parm): Set TREE_READONLY.
14082
14083 * decl.c (bad_specifiers): Allow throw specs on things with
14084 pointer-to-function or -member-function type.
14085 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
14086 a pmf.
14087
14088 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14089
14090 * call.c (check_dtor_name): Handle template names correctly.
14091
14092 2001-02-16 Jason Merrill <jason@redhat.com>
14093
14094 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
14095 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
14096 * optimize.c (maybe_clone_body): Don't substitute it.
14097 * call.c (build_new_method_call): Check in_chrg instead.
14098 * init.c (expand_virtual_init): Likewise.
14099
14100 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
14101
14102 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
14103 class-type introduces at least a type-name.
14104
14105 2001-02-16 Jakub Jelinek <jakub@redhat.com>
14106
14107 * call.c (convert_like_real): Create a temporary for non-lvalue.
14108
14109 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
14110
14111 * cp-tree.h: Fix typos in comments.
14112
14113 2001-02-16 Jason Merrill <jason@redhat.com>
14114
14115 * optimize.c (remap_block): If we're compiling a clone, pass the
14116 new block to insert_block.
14117
14118 2001-02-16 Mark Mitchell <mark@codesourcery.com>
14119
14120 * semantics.c (finish_asm_stmt): Robustify.
14121
14122 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14123
14124 * pt.c (push_template_decl_real): Don't remangle the name of a
14125 class template.
14126
14127 2001-02-15 Jim Meyering <meyering@lucent.com>
14128
14129 * Make-lang.in (c++.install-common): Depend on installdirs.
14130 (c++.install-info): Likewise.
14131 (c++.install-man): Likewise.
14132
14133 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14134
14135 * typeck2.c (build_m_component_ref): Robustify.
14136
14137 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
14138
14139 * friend.c (do_friend): Don't take the nested [template] class
14140 into account when deciding whether to warn about the friend
14141 function not referring to a template function.
14142
14143 2001-02-14 Jakub Jelinek <jakub@redhat.com>
14144
14145 * typeck.c (build_unary_op): Clarify error message.
14146
14147 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
14148
14149 * parse.y (component_constructor_declarator): allow optional
14150 parentheses around constructor class name.
14151
14152 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14153
14154 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14155 section.
14156 * init.c (emit_base_init): Remove incorrect comment about
14157 virtual bases.
14158 * method.c (make_thunk): Fix comment alignment.
14159
14160 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14161
14162 Kill remnants of this is variable.
14163 * cp-tree.h (flag_this_is_variable): Remove.
14164 * decl2.c (flag_this_is_variable): Remove.
14165 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14166 (build_vbase_path): The path is non-static, even in a cdtor.
14167 (resolves_to_fixed_type_p): Add additional return value.
14168 * search.c (init_vbase_pointers): Adjust.
14169 * tree.c (lvalue_p_1): Adjust.
14170 * typeck.c (mark_addressable): Adjust.
14171
14172 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14173
14174 * pt.c (unify): Don't check cv quals of array types.
14175
14176 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14177
14178 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14179 check whether we already have the type.
14180
14181 2001-02-13 Mark Mitchell <mark@codesourcery.com>
14182
14183 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14184 * call.c (build_op_delete_call): Simplify to remove duplicate
14185 code.
14186 * class.c (clone_function_decl): Don't build the deleting variant
14187 of a non-virtual destructor.
14188 * decl.c (finish_destructor_body): Don't call delete if this is a
14189 non-virtual destructor.
14190 * init.c (build_delete): Explicitly call `operator delete' when
14191 deleting an object with a non-virtual destructor.
14192
14193 2001-02-13 Jason Merrill <jason@redhat.com>
14194
14195 * lang-specs.h: Add more __EXCEPTIONS.
14196
14197 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14198
14199 * typeck2.c (process_init_constructor): Check
14200 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14201
14202 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14203
14204 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14205 Remove spurious information in comment. Allow further
14206 adjustments of REFERENCE_TYPE args.
14207
14208 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14209
14210 * errfn.c (cp_deprecated): Tweak diagnostic text.
14211 * parse.y (new_initializer): Deprecate initializer lists
14212 extension.
14213
14214 2001-02-12 Mark Mitchell <mark@codesourcery.com>
14215
14216 Remove old ABI support.
14217
14218 2001-02-11 Mark Mitchell <mark@codesourcery.com>
14219
14220 * decl2.c (flag_vtable_thunks): Always set it to 1.
14221 (flag_new_abi): Likewise.
14222 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14223
14224 * Makefile.in (g++spec.o): Fix typo.
14225
14226 2001-02-09 Jason Merrill <jason@redhat.com>
14227
14228 * lang-specs.h: Restore definition of __EXCEPTIONS.
14229
14230 2001-02-08 Jason Merrill <jason@redhat.com>
14231
14232 * search.c (shared_member_p): New function.
14233 (lookup_field_r): Use it.
14234 * cp-tree.h (SHARED_MEMBER_P): Remove.
14235
14236 * method.c (process_overload_item): Handle template-dependent array
14237 bounds.
14238 * pt.c (type_unification_real): If we end up with undeduced nontype
14239 parms, try again.
14240
14241 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14242 types.
14243
14244 * typeck2.c (friendly_abort): Don't say anything if we have
14245 earlier errors or sorries.
14246
14247 * decl.c (check_tag_decl): Notice attempts to redefine bool and
14248 wchar_t. Ignore if in_system_header.
14249
14250 * decl.c (maybe_push_cleanup_level): New fn...
14251 (start_decl_1): ...split out from here.
14252 * cvt.c (build_up_reference): Use it.
14253 * cp-tree.h: Declare it.
14254
14255 2001-02-07 Mark Mitchell <mark@codesourcery.com>
14256
14257 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14258 spec.
14259
14260 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
14261
14262 * pt.c (lookup_template_class): Make sure it's a primary
14263 template or template_template_parm when called from the parser.
14264 (instantiate_template_class): Add assertion.
14265
14266 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
14267
14268 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14269 from error_mark_node.
14270
14271 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
14272
14273 Fix specification and implementation bugs in V3 ABI
14274 construction vtables.
14275 * cp-tree.h (flag_dump_class_layout): New flag.
14276 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14277 (BINFO_LOST_PRIMARY_P): New flag.
14278 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14279 (BINFO_PRIMARY_MARKED_P): Rename to ...
14280 (BINFO_PRIMARY_P): ... here.
14281 (binfo_via_virtual): New prototype.
14282 * decl2.c (flag_dump_class_layout): New flag.
14283 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14284 use `=' as a file name separator.
14285 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14286 bases.
14287 (build_vtbl_address): If this is a virtual primary base, then
14288 get the vtbl of what it is ultimately primary for.
14289 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14290 for BINFO_PRIMARY_P.
14291 (dfs_skip_nonprimary_vbases_markedp): Likewise.
14292 (get_shared_vbase_if_not_primary): Likewise.
14293 (dfs_get_pure_virtuals): Likewise.
14294 (expand_upcast_fixups): Likewise.
14295 (fixup_virtual_upcast_offsets): Likewise.
14296 (dfs_find_vbase_instance): Likewise.
14297 (find_vbase_instance): Likewise.
14298 (binfo_from_vbase): Adjust comment to reflect reality.
14299 (binfo_via_virtual): New function.
14300 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14301 for binfo walking during VTT construction.
14302 (dfs_mark_primary_bases): Remove.
14303 (force_canonical_binfo_r): New function.
14304 (force_canonical_binfo): New function.
14305 (mark_primary_virtual_base): New function.
14306 (mark_primary_bases): Walk in inheritance graph order, use
14307 mark_primary_virtual_base.
14308 (determine_primary_base): Use some more intermediate variables.
14309 (dfs_find_final_overrider): Don't check for overriding along a
14310 virtual path.
14311 (dfs_modify_vtables): Walk into primary virtual bases too.
14312 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14313 (build_base_fields): Likewise.
14314 (dfs_set_offset_for_unshared_vbases): Likewise.
14315 (layout_virtual_bases): Likewise.
14316 (end_of_class): Likewise.
14317 (finish_struct_1): Call dump_class_hierarchy, if requested.
14318 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14319 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14320 (dump_class_hierarchy): Add file parameter. Append to file, if
14321 required.
14322 (finish_vtbls): Adjust accumulate_vtbl_inits call.
14323 Use canonical base for virtual bases.
14324 (build_vtt): Add more comments. Adjust build_vtt_inits call.
14325 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14326 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14327 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14328 virtual VTTs.
14329 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14330 from DATA. We want virtual primary bases and all bases via virtual.
14331 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14332 virtual base when not a construction vtable.
14333 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14334 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14335 Use canonical bases when processing virtual bases.
14336 (accumulate_vtbl_inits): We're interested in any base via a
14337 virtual path.
14338 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14339 within a construction vtable, determine what is being overridden.
14340 (build_vtbl_initializer): Add more comments
14341 (add_vcall_offset_vtbl_entries_1): Adjust comment.
14342 (build_rtti_vtbl_entries): Check if the base has lost its
14343 primary.
14344
14345 2001-02-05 Mark Mitchell <mark@codesourcery.com>
14346
14347 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14348
14349 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14350
14351 * decl.c (pushdecl): Call abort instead of fatal.
14352 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14353 * init.c (build_new_1): Likewise.
14354 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14355 * decl.c (build_typename_type): hash_table_init now returns void.
14356 decl.c (init_decl_processing): Make an error non-fatal.
14357
14358 2001-02-04 Mark Mitchell <mark@codesourcery.com>
14359
14360 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14361 Document.
14362 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14363 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14364 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14365 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14366 * decl.c (maybe_commonize_var): Use the new name-mangling where
14367 appropriate.
14368 * decl2.c (comdat_linkage): Enhance comments. Make all
14369 compiler-generated things static, if COMDAT is not available.
14370 (get_tinfo_decl): Do not make typeinfo objects that belong in the
14371 library COMDAT.
14372 (tinfo_base_init): Use the correct mangled name for typeinfo
14373 strings, and push them into the global scope.
14374 (typeinfo_in_lib_p): New function.
14375 (synthesize_tinfo_var): Use it.
14376 (create_real_tinfo_var): Likewise.
14377
14378 2001-02-03 Jakub Jelinek <jakub@redhat.com>
14379
14380 * decl.c (push_class_binding): Use context_for_name_lookup instead
14381 of CP_DECL_CONTEXT.
14382 * search.c (context_for_name_lookup): Remove static. Check for NULL
14383 context in the loop.
14384 * cp-tree.h (context_for_name_lookup): Add prototype.
14385
14386 2001-02-02 Jakub Jelinek <jakub@redhat.com>
14387
14388 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14389 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14390 Remove.
14391 * call.c (convert_class_to_reference, build_user_type_conversion_1,
14392 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14393
14394 2001-02-02 Mark Mitchell <mark@codesourcery.com>
14395
14396 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14397 of macros used when compiling g++spec.c.
14398 * g++spec.c (lang_specific_driver): Link with the shared
14399 libgcc by default.
14400
14401 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
14402
14403 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14404 make_reference_declarator, make_call_declarator), method.c
14405 (implicitly_declare_fn), parse.y (namespace_using_decl,
14406 notype_unqualified_id, expr_or_declarator, new_type_id,
14407 after_type_declarator, direct_after_type_declarator,
14408 notype_declarator, complex_notype_declarator,
14409 complex_direct_notype_declarator, qualified_id,
14410 notype_qualified_id, overqualified_id, direct_new_declarator,
14411 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14412 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14413 instead of build_parse_node.
14414
14415 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14416
14417 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14418 (minus_one_node): Moved to top level gcc directory. Renamed
14419 to integer_minus_one_node.
14420
14421 * init.c (init_init_processing): Don't set minus_one_node.
14422 (build_vec_init): Use integer_minus_one_node.
14423
14424 * rtti.c (get_tinfo_decl_dynamic): Likewise.
14425
14426 2001-01-28 Jakub Jelinek <jakub@redhat.com>
14427
14428 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14429 identical and they would be replaced with constant, remove
14430 MODIFY_EXPR from the tree.
14431
14432 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14433
14434 * Make-lang.in: Remove all dependencies on defaults.h.
14435 * call.c: Don't include defaults.h.
14436 * decl.c: Likewise.
14437 * decl2.c: Likewise.
14438 * except.c: Likewise.
14439 * pt.c: Likewise.
14440 * rtti.c: Likewise.
14441 * tree.c: Likewise.
14442 * typeck.c: Likewise.
14443
14444 2001-01-25 Jakub Jelinek <jakub@redhat.com>
14445
14446 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14447 operators even in "C" linkage.
14448 * method.c (set_mangled_name_for_decl): Likewise.
14449 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14450 overloaded operators in "C" linkage.
14451
14452 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14453
14454 * pt.c (tsubst_decl): Remove IN_DECL parameter.
14455 (tsubst_arg_types): Check parameter is not void.
14456 (tsubst): Adjust tsubst_decl call.
14457
14458 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14459
14460 * call.c (add_builtin_candidate): Quote std properly, from
14461 previous change.
14462
14463 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14464
14465 * pt.c (check_explicit_specialization): Clone constructors and
14466 destructors.
14467
14468 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14469
14470 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14471 indicates anything special about template depth. Make sure we
14472 only count the user visible template classes.
14473
14474 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14475
14476 * call.c (build_conv): Typo in comment.
14477 (add_builtin_candidate): Add more explanation.
14478 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14479 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14480 when we have enumeral types.
14481 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14482 candidates for relops and eqops.
14483 (joust): Simplify control flow. Allow a non-template user
14484 function to hide a builtin.
14485
14486 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
14487
14488 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14489 (more_specialized): Add deduction parameter.
14490 * call.c (joust): Adjust more_specialized call.
14491 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14492 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14493 (get_bindings_order): Remove.
14494 (get_bindings_real): Add DEDUCE parameter.
14495 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14496 REFERENCE_TYPE jig for DEDUCE_ORDER.
14497 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14498 maybe_adjust_types_for_deduction.
14499 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14500 directly.
14501 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14502 (check_cv_quals_for_unify): Use new unify qualifier flags.
14503 (unify): Clear new unify qualifier flags.
14504 (get_bindings_real): Add DEDUCE parameter.
14505 (get_bindings): Adjust call to get_bindings_real.
14506 (get_bindings_overload): Likewise.
14507 (most_specialized_instantiation): Adjust call to
14508 more_specialized.
14509
14510 2001-01-19 Jason Merrill <jason@redhat.com>
14511
14512 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14513
14514 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14515 -fnew-abi.
14516
14517 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
14518
14519 * decl2.c (arg_assoc_class): Fix double iteration logic.
14520
14521 2001-01-19 Jason Merrill <jason@redhat.com>
14522
14523 * init.c (build_delete): Always call convert_force to strip cv-quals.
14524
14525 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14526 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14527 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14528
14529 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14530
14531 * search.c (get_vbase_1): Count only virtual bases.
14532
14533 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14534
14535 * class.c (duplicate_tag_error): Robustify flag clearing.
14536
14537 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14538
14539 * cp-tree.h (lookup_template_class): Add complain parm.
14540 * decl.c (lookup_namespace_name): Adjust call to
14541 lookup_template_class.
14542 (make_typename_type): Likewise.
14543 * semantics.c (finish_template_type): Likewise.
14544 * pt.c (lookup_template_class): Add complain parm. Adjust.
14545 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14546 (tsubst): Likewise.
14547
14548 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14549
14550 * pt.c (copy_default_args_to_explicit_spec): Preserve
14551 object's CV quals. Reorganize.
14552
14553 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14554
14555 * typeck.c (build_modify_expr): Say `initialization' for
14556 INIT_EXPRs.
14557 * init.c (build_default_init): Convert to enumeral type, if
14558 needed.
14559
14560 2001-01-18 Jakub Jelinek <jakub@redhat.com>
14561
14562 * parse.y (nomods_initdcl0): Properly set things up for
14563 initdcl0_innards.
14564
14565 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14566
14567 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14568 (type_unification_real): Set it.
14569 (unify): Use it.
14570
14571 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14572
14573 * decl.c (finish_destructor_body): Convert to vbase pointer here.
14574
14575 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14576
14577 * semantics.c (begin_class_definition): Check we're not inside a
14578 template parm list.
14579
14580 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14581
14582 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14583 BASELINK_P.
14584
14585 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14586
14587 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14588 * call.c (build_over_call): Add comment.
14589
14590 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14591
14592 * cvt.c (ocp_convert): Handle vector type conversion
14593 * typeck2.c (digest_init): Handle vector type initializations
14594
14595 2001-01-16 Phil Edwards <pme@sources.redhat.com>
14596
14597 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
14598 was given.
14599
14600 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14601
14602 * pt.c (check_nontype_parm): Rename to ...
14603 (invalid_nontype_parm_type_p): ... here.
14604 (process_template_parm): Adjust.
14605 (convert_template_argument): Adjust.
14606
14607 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14608
14609 * pt.c (check_nontype_parm): New function.
14610 (process_template_parm): Use it.
14611 (convert_template_argument): Use it.
14612 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14613 member.
14614
14615 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
14616
14617 * tree.c: Add defaults.h
14618 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14619 * Make-lang.in (cp/tree.o): Add defaults.h.
14620
14621 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14622
14623 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14624
14625 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14626
14627 * g++.1: Change to be ".so man1/gcc.1".
14628
14629 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14630
14631 * Make-lang.in (c++.info, c++.install-info): Build and install g++
14632 internals info.
14633 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14634 ($(srcdir)/cp/g++int.info): New target.
14635 * gxxint.texi: Add info directory entry. Use @@ in email address.
14636 * .cvsignore: Update.
14637
14638 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14639
14640 * typeck.c (build_c_cast): Do template processing earlier.
14641 Always pedwarn on array casts.
14642
14643 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14644
14645 * friend.c (make_friend_class): Make sure a templated class is
14646 actually a template.
14647
14648 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14649
14650 * decl2.c (get_guard): Set linkage from guarded decl.
14651
14652 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14653
14654 * call.c (convert_default_arg): Check for unprocessed
14655 DEFAULT_ARG.
14656 * cp-tree.h (replace_defarg): Move to spew.c.
14657 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14658 spew.c, which is where they really are.
14659 (done_pending_defargs): Declare.
14660 (unprocessed_defarg_fn): Declare.
14661 * decl.c (replace_defarg): Move to spew.c
14662 * parse.y (structsp): Call done_pending_defargs.
14663 * spew.c (defarg_fns): Rearrange list structure.
14664 (defarg_fnsdone): New static variable.
14665 (defarg_depfns): New static variable.
14666 (init_spew): Adjust.
14667 (add_defarg_fn): Store the type in TREE_TYPE.
14668 (do_pending_defargs): Detect and deal with ordering constraints
14669 and circularity.
14670 (done_pending_defargs): New function.
14671 (unprocessed_defarg_fn): New function.
14672 (replace_defarg): Moved from decl.c. Robustify. Don't save
14673 if circularity detected.
14674
14675 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14676
14677 * pt.c (unify): Check array has a domain, before checking
14678 whether it is variable sized.
14679
14680 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14681
14682 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14683 parameters with pointers to arrays of unknown bound.
14684
14685 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14686
14687 * parse.y (template_parm_header, template_spec_header): New
14688 reductions. Split out from ...
14689 (template_header): ... here. Use them.
14690 (template_template_parm): Use template_parm_header.
14691 * semantics.c (finish_template_template_parm): Add assert.
14692
14693 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14694
14695 * mangle.c (write_builtin_type): Fix thinko.
14696
14697 * pt.c (copy_default_args_to_explicit_spec_1): New function.
14698 (copy_default_args_to_explicit_spec): Likewise.
14699 (check_explicit_specialization): Use it.
14700
14701 * class.c (finish_struct_1): Remove last argument in call to
14702 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14703 * decl.c (builtin_function): Likewise.
14704 (build_cp_library_fn): Likewise.
14705 (check_initializer): Likewise.
14706 (make_rtl_for_nonlocal_decl): Likewise.
14707 (cp_finish_decl): Likewise.
14708 (start_function): Likewise.
14709 * decl2.c (finish_anon_union): Likewise.
14710 * friend.c (do_friend): Likewise.
14711 * init.c (build_java_class_ref): Likewise.
14712 * method.c (make_thunk): Likewise.
14713 * pt.c (tsubst_friend_function): Likewise.
14714 * semantics.c (expand_body): Likewise.
14715
14716 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14717
14718 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14719 looking at DECL_CLONED_FUNCTION for non-functions.
14720
14721 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14722
14723 * error.c (dump_template_parameter): Use parm to determine how
14724 to print default value.
14725
14726 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14727
14728 * class.c (duplicate_tag_error): Clear more flags.
14729
14730 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14731
14732 * call.c (build_new_method_call): Use binfo_for_vbase.
14733
14734 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
14735
14736 * cp-tree.h (flag_cond_mismatch): Don't declare.
14737 * decl2.c (flag_cond_mismatch): Don't define.
14738 (lang_f_options): Remove cond-mismatch.
14739 (unsupported_options): Add cond-mismatch.
14740
14741 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
14742
14743 * class.c (handle_using_decl): Reject using of constructor name
14744 of sourcing class. Allow injecting of a method with same name as
14745 nested class. Fixup error messages.
14746
14747 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
14748
14749 * decl2.c (lang_decode_option): Handle -Wformat=2.
14750
14751 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14752
14753 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14754 initialized_in_class.
14755 (DECL_DEFINED_IN_CLASS_P): Rename to ...
14756 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14757 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14758 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14759 * pt.c (check_default_tmpl_args): Adjust for
14760 DECL_INITIALIZED_IN_CLASS_P.
14761 (instantiate_class_template): Likewise.
14762 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14763
14764 * class.c (finish_struct): Constify saved_filename.
14765
14766 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14767
14768 * class.c (duplicate_tag_error): Adjust diagnostic.
14769 (finish_struct): Locally set location to start of struct.
14770 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14771
14772 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14773
14774 * decl.c (struct binding_level): Adjust class_shadowed comments
14775 to reflect reality.
14776 (push_class_level_binding): Adjust comments to reflect reality.
14777 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14778 Don't set TREE_VALUE on the class_shadowed list.
14779
14780 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14781
14782 * decl2.c (acceptable_java_type): Allow references too.
14783 * init.c (build_java_class_ref): When using the new ABI, search
14784 `class$' and have it mangled with `mangle_decl.'
14785 * mangle.c (write_java_integer_type_codes): New function.
14786 (write_builtin_type): Detect and mangle Java integer and real
14787 types.
14788
14789 2001-01-07 Mark Mitchell <mark@codesourcery.com>
14790
14791 * decl2.c (grokfield): Don't accept `asm' specifiers for
14792 non-static data members.
14793
14794 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14795
14796 * expr.c (cplus_expand_expr): Don't reset `target'.
14797
14798 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
14799
14800 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14801
14802 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14803
14804 * parse.y (template_datadef): Check for error_mark_node.
14805
14806 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14807
14808 * cp-tree.def (DEFAULT_ARG): Make `x' class.
14809
14810 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
14811
14812 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14813 (record_builtin_type): Make non-static.
14814 (flag_short_double): Don't declare.
14815 (init_decl_processing): Remove the creation of many tree nodes now
14816 in c_common_nodes_and_builtins.
14817 (build_void_list_node): New function.
14818 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14819 * cp-tree.h (flag_short_wchar): Don't declare.
14820
14821 2001-01-04 Mark Mitchell <mark@codesourcery.com>
14822
14823 * call.c (build_conv): Don't use build1 for USER_CONV.
14824 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14825
14826 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
14827
14828 * lex.c (lang_init): Call c_common_lang_init.
14829
14830 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14831
14832 * search.c (lookup_fnfields_here): Remove.
14833 (look_for_overrides_r): Use lookup_fnfields_1.
14834 Ignore functions from using declarations.
14835
14836 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14837
14838 Implement exceptions specifiers for implicit member functions.
14839 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14840 * method.c (synthesize_exception_spec): New function.
14841 (locate_dtor, locate_ctor, locate_copy): New functions.
14842 (implicitly_declare_fn): Generate the exception spec too.
14843 * search.c (check_final_overrider): Check artificial functions
14844 too.
14845 * typeck2.c (merge_exception_specifiers): New function.
14846
14847 2001-01-03 Jason Merrill <jason@redhat.com>
14848
14849 * init.c (build_default_init): New fn.
14850 (perform_member_init): Split out from here.
14851 (build_new_1): Use it. Simplify initialization logic.
14852 (build_vec_init): Take an array, rather than a pointer and maxindex.
14853 Speed up simple initializations. Don't clean up if we're assigning.
14854 * cp-tree.h: Adjust.
14855 * decl2.c (do_static_initialization): Remove TREE_VEC case.
14856 * parse.y (new_initializer): Return void_zero_node for ().
14857 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14858 * typeck2.c (digest_init): Only complain about user-written
14859 CONSTRUCTORs.
14860
14861 2000-12-22 Mike Stump <mrs@wrs.com>
14862
14863 * decl2.c: (max_tinst_depth): Increase to 50.
14864
14865 2001-01-02 Mark Mitchell <mark@codesourcery.com>
14866
14867 * class.c (invalidate_class_lookup_cache): Zero the
14868 previous_class_values.
14869 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14870 TREE_INT_CST_HIGH.
14871 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14872 * decl.c (free_bindings): New variable.
14873 (push_binding): Don't create a new binding if we have one on the
14874 free list.
14875 (pop_binding): Put old bindings on the free list.
14876 (init_decl_processing): Use size_int, not build_int_2.
14877 Register free_bindings as a GC root.
14878 (cp_make_fname_decl): Use size_int, not build_int_2.
14879 (push_inline_template_parms_recursive): Likewise.
14880 (end_template_parm_list): Likewise.
14881 (for_each_template_parm): Do not use walk_tree_without_duplicates.
14882 (tsubst_template_parms): Use size_int, not build_int_2.
14883 (tsubst): Likewise.
14884 * rtti.c (get_vmi_pseudo_type_info): Likewise.
14885
14886 2001-01-02 Richard Henderson <rth@redhat.com>
14887
14888 * parse.y (asm): Set ASM_INPUT_P.
14889
14890 2001-01-02 Jason Merrill <jason@redhat.com>
14891
14892 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14893 for v3 ABI.
14894
14895 * typeck.c (cp_truthvalue_conversion): New fn.
14896 * cvt.c (ocp_convert): Use it.
14897
14898 * cp-tree.h: Lose c-common.c decls.
14899
14900 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14901 * cvt.c (convert_to_void): Use type_unknown_p.
14902
14903 * typeck.c (strip_all_pointer_quals): Also strip quals from
14904 pointer-to-member types.
14905
14906 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
14907 parse.y as C.
14908
14909 * call.c (build_new_method_call): Do evaluate the object parameter
14910 when accessing a static member.
14911 * typeck.c (build_component_ref): Likewise.
14912
14913 2001-01-02 Andreas Jaeger <aj@suse.de>
14914
14915 * decl.c (cp_missing_noreturn_ok_p): New.
14916 (init_decl_processing): Set lang_missing_noreturn_ok_p.
14917
14918 2000-12-29 Jakub Jelinek <jakub@redhat.com>
14919
14920 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14921
14922 2000-12-29 Mark Mitchell <mark@codesourcery.com>
14923
14924 * class.c (pushclass): Remove #if 0'd code.
14925 * cp-tree.h (overload_template_name): Remove.
14926 * decl.c (store_bindings): Simplify.
14927 (pop_from_top_level): Likewise.
14928 * pt.c (overload_template_name): Remove.
14929 (instantiate_decl): Don't call push_to_top_level if it's not
14930 needed.
14931
14932 2000-12-28 Mark Mitchell <mark@codesourcery.com>
14933
14934 * pt.c (register_local_specialization): Don't return a value.
14935 (lookup_template_class): Use move-to-front heuristic when looking
14936 up template instantiations.
14937 (instantiate_decl): Only push_to_top_level when we're actually
14938 going to instantiate the template.
14939
14940 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
14941
14942 * search.c (binfo_for_vtable): Return least derived class, not
14943 most. Handle secondary vtables.
14944
14945 2000-12-22 Jason Merrill <jason@redhat.com>
14946
14947 * pt.c (more_specialized): Don't optimize len==0.
14948 (fn_type_unification): If we're adding the return type, increase len.
14949
14950 * typeck.c (build_binary_op): Fix pmf comparison logic.
14951
14952 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14953 DECL_STATIC_FUNCTION_P.
14954
14955 * semantics.c (genrtl_finish_function): Don't try to jump to
14956 return_label unless it exists.
14957
14958 In partial ordering for a call, ignore parms for which we don't have
14959 a real argument.
14960 * call.c (joust): Pass len to more_specialized.
14961 (add_template_candidate_real): Strip 'this', pass len.
14962 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
14963 (get_bindings_order): New fn. Pass len down.
14964 (get_bindings_real): Strip 'this', pass len.
14965 (fn_type_unification): Likewise.
14966 (type_unification_real): Succeed after checking 'len' args.
14967 (most_specialized_instantiation): Lose explicit_args parm.
14968 * class.c (resolve_address_of_overloaded_function): Strip 'this',
14969 pass len.
14970
14971 2000-12-21 Jason Merrill <jason@redhat.com>
14972
14973 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14974 DECL_TEMPLATE_RESULT.
14975
14976 * search.c (lookup_field_r): Call lookup_fnfields_1, not
14977 lookup_fnfields_here.
14978
14979 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14980
14981 * call.c (build_object_call): Also allow conversions that return
14982 reference to pointer to function.
14983 (add_conv_candidate): Handle totype being ref to ptr to fn.
14984 (build_field_call): Also allow members of type reference to function.
14985 Lose support for calling pointer to METHOD_TYPE fields.
14986
14987 * error.c (dump_expr): Handle *_CAST_EXPR.
14988
14989 * typeck2.c (build_scoped_ref): Always convert to the naming class.
14990
14991 * tree.c (break_out_cleanups): Lose.
14992 * cp-tree.h: Remove prototype.
14993 * typeck.c (build_component_ref): Don't break_out_cleanups.
14994 (build_compound_expr): Likewise.
14995 * semantics.c (finish_expr_stmt): Likewise.
14996
14997 2000-12-20 Richard Henderson <rth@redhat.com>
14998
14999 * cp-tree.h: Update declarations.
15000 * decl.c (finish_case_label): Return the new stmt node.
15001 * semantics.c (finish_goto_stmt): Likewise.
15002 (finish_expr_stmt, finish_return_stmt): Likewise.
15003 (finish_break_stmt, finish_continue_stmt): Likewise.
15004 (finish_asm_stmt): Likewise.
15005 * parse.y (already_scoped_stmt): Set STMT_LINENO.
15006 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
15007 (simple_if, simple_stmt): Return the new stmt node.
15008 (save_lineno): New.
15009
15010 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
15011
15012 * cp-tree.h: Don't declare warn_long_long.
15013
15014 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15015
15016 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
15017 IS_AGGR_TYPE.
15018
15019 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15020
15021 * pt.c (unify): Handle when both ARG and PARM are
15022 BOUND_TEMPLATE_TEMPLATE_PARM.
15023
15024 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15025
15026 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
15027 DECL_TEMPLATE_PARM_P.
15028
15029 2000-12-15 Jason Merrill <jason@redhat.com>
15030
15031 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
15032
15033 * init.c (build_new_1): Don't strip quals from type.
15034
15035 * decl.c (pushdecl): Don't check for linkage on a non-decl.
15036
15037 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
15038
15039 * call.c (build_new_function_call): Lose space before paren in
15040 error message.
15041 (build_new_method_call): Likewise.
15042
15043 * typeck2.c (build_m_component_ref): Propagate quals from datum.
15044
15045 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15046
15047 * pt.c (check_explicit_specialization): Propagate default
15048 function arguments to explicit specializations.
15049
15050 2000-12-13 DJ Delorie <dj@redhat.com>
15051
15052 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
15053 and <? operators.
15054
15055 2000-12-08 Jason Merrill <jason@redhat.com>
15056
15057 * error.c (dump_function_name): Don't let the user see __comp_ctor.
15058
15059 Clean up copy-initialization in overloading code.
15060 * call.c (build_user_type_conversion_1): Die if we are asked to
15061 convert to the same or a base type.
15062 (implicit_conversion): Avoid doing so. Lose reference binding code.
15063 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
15064 direct-initialization. Also do direct-init part of copy-init.
15065 (build_user_type_conversion): Don't provide context to convert_like.
15066 * cvt.c (ocp_convert): build_user_type_conversion will now provide
15067 the constructor call for copy-init.
15068
15069 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
15070 instantiation of a member template.
15071 (do_decl_instantiation): Not here.
15072
15073 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15074
15075 * class.c (check_field_decls): Don't special case anonymous
15076 fields in error messages.
15077 (note_name_declared_in_class): Use %D on diagnostic.
15078
15079 * tree.c (pod_type_p): Use strip_array_types.
15080 (cp_valid_lang_attribute): Likewise.
15081 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
15082 multiple evaluations.
15083 (cp_has_mutable_p): Use strip_array_types.
15084
15085 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15086
15087 * cp-tree.h (sufficient_parms_p): Declare new function.
15088 * call.c (sufficient_parms_p): New function, broken out of ...
15089 (add_function_candidate): ... here. Use it.
15090 (add_conv_candidate): Use it.
15091 * decl.c (grok_ctor_properties): Use it.
15092
15093 2000-12-07 Jakub Jelinek <jakub@redhat.com>
15094
15095 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
15096
15097 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
15098
15099 * decl2.c (lang_decode_option): Handle -Wformat-security.
15100
15101 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15102
15103 * pt.c (verify_class_unification): New function.
15104 (get_class_bindings): Use it.
15105 (try_class_unification): Tidy.
15106 (unify): Handle when argument of a template-id is not
15107 template parameter dependent.
15108 (template_args_equal): Handle when TREE_CODE's do not match.
15109
15110 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
15111
15112 * lang-specs.h (c++): When invoking the stand-alone preprocessor
15113 for -save-temps, pass all relevant -Defines to it, and then don't
15114 pass them to cc1plus.
15115
15116 2000-12-05 Will Cohen <wcohen@redhat.com>
15117
15118 * decl.c (finish_case_label): Cleared
15119 more_cleanups_ok in surrounding function scopes.
15120 (define_label): Likewise.
15121
15122 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15123
15124 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15125 (get_matching_virtual): Remove.
15126 (look_for_overrides): Declare new function.
15127 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15128 DECL_VINDEX here.
15129 * class.c (check_for_override): Move base class iteration code
15130 to look_for_overrides.
15131 * search.c (next_baselink): Remove.
15132 (get_virtuals_named_this): Remove.
15133 (get_virtual_destructor): Remove.
15134 (tree_has_any_destructors_p): Remove.
15135 (struct gvnt_info): Remove.
15136 (check_final_overrider): Remove `virtual' from error messages.
15137 (get_matching_virtuals): Remove. Move functionality to ...
15138 (look_for_overrides): ... here, and ...
15139 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15140 to be overriding.
15141
15142 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15143
15144 * typeck.c (get_delta_difference): If via a virtual base,
15145 return zero.
15146 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15147 adjustment.
15148
15149 2000-12-04 Richard Henderson <rth@redhat.com>
15150
15151 * error.c (dump_tree): Use output_add_string not OB_PUTS.
15152
15153 2000-12-04 Jason Merrill <jason@redhat.com>
15154
15155 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15156 (write_builtin_type): Pass intSI_type_node and the like through
15157 type_for_mode.
15158 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15159 Pass intSI_type_node and the like through type_for_mode.
15160 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15161 * pt.c (tsubst, unify): Likewise.
15162 * tree.c (walk_tree): Likewise.
15163 * error.c (dump_type): Likewise.
15164 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15165
15166 * Make-lang.in: Tweak top comment for emacs.
15167 (cp/TAGS): Restore.
15168
15169 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15170
15171 * class.c (clone_function_decl): Robustify.
15172
15173 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
15174
15175 * decl.c (store_bindings): Only search in the non modified
15176 old_bindings for duplicates.
15177
15178 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
15179
15180 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15181 TYPE_POLYMORPHIC_P.
15182
15183 * typeck.c (build_static_cast): Remove unused variable.
15184
15185 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15186
15187 * pt.c: Fix typo in comment.
15188
15189 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15190
15191 * decl2.c (warn_format): Remove definition.
15192 (lang_decode_option): Handle -Wformat-nonliteral,
15193 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
15194
15195 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15196
15197 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15198 (init_decl_processing): Don't create string_type_node,
15199 const_string_type_node, wint_type_node, intmax_type_node,
15200 uintmax_type_node, default_function_type, ptrdiff_type_node and
15201 unsigned_ptrdiff_type_node. Adjust position of call to
15202 c_common_nodes_and_builtins.
15203 (identifier_global_value): New function.
15204
15205 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
15206
15207 * call.c (standard_conversion): Reject pointer to member
15208 conversions from ambiguous, inaccessible or virtual bases.
15209 * typeck.c (build_static_cast): Don't check pointers to members
15210 specially.
15211
15212 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15213
15214 * method.c (do_build_copy_constructor): Preserve cv
15215 qualifications when accessing source object members.
15216 (do_build_assign_ref): Likewise. Remove separate diagnostics for
15217 unnamed fields.
15218
15219 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15220
15221 * method.c (do_build_assign_ref): Construct appropriately
15222 CV-qualified base reference. Don't allow const casts in base
15223 conversion.
15224
15225 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15226
15227 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15228 incomplete return type.
15229
15230 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15231
15232 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15233 * semantics.c (finish_base_specifier): Accept a _TYPE not a
15234 _DECL.
15235
15236 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15237
15238 * spew.c (yyerror): Cope if yylval.ttype is NULL.
15239
15240 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15241
15242 * decl.c (grokdeclarator): Diagnose undefined template contexts.
15243
15244 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15245
15246 * decl.c (grokdeclarator): Do type access control on friend
15247 class.
15248
15249 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15250
15251 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15252 bison parser ickiness.
15253 * pt.c (tsubst_friend_function): Enter namespace scope when
15254 tsubsting the function name.
15255 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15256
15257 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15258
15259 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15260 * cvt.c (cp_convert_to_pointer): Add force parameter.
15261 Allow conversions via virtual base if forced.
15262 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15263 (ocp_convert): Likewise.
15264 * search.c (binfo_from_vbase): Return the virtual base's binfo.
15265 * typeck.c (get_delta_difference): Adjust handling of virtual
15266 bases.
15267
15268 2000-11-26 Mark Mitchell <mark@codesourcery.com>
15269
15270 * tree.c (struct list_hash): Remove.
15271 (list_hash_table): Make it be an htab.
15272 (struct list_proxy): New type.
15273 (list_hash_eq): New function.
15274 (list_hash_pieces): Renamed from ...
15275 (list_hash): ... this.
15276 (list_hash_lookup): Remove.
15277 (list_hash_add): Remove.
15278 (hash_tree_cons): Use the generic hashtable.
15279 (mark_list_hash): Remove.
15280 (init_tree): Create the hashtable.
15281
15282 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
15283
15284 * method.c (build_mangled_C9x_name): Rename to
15285 build_mangled_C99_name. Change C9X references in comments to
15286 refer to C99.
15287
15288 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15289
15290 * parse.y (unary_expr): Move VA_ARG from here ...
15291 (primary): ... to here.
15292
15293 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15294
15295 * semantics.c (finish_id_expr): If type is error_mark, return
15296 error_mark.
15297
15298 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
15299
15300 * pt.c (lookup_template_class): Simplify loop exit constructs.
15301 Cope when there is no partial instantiation of a template
15302 template member.
15303
15304 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
15305
15306 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15307
15308 2000-11-22 Mark Mitchell <mark@codesourcery.com>
15309
15310 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15311 prefix.
15312
15313 * pt.c (do_decl_instantiate): Explicitly clone constructors and
15314 destructors that haven't already been cloned.
15315
15316 2000-11-20 Richard Henderson <rth@redhat.com>
15317
15318 * parse.y (yyparse_1): Rename the parser entry point.
15319
15320 2000-11-20 Alex Samuel <samuel@codesourcery.com>
15321
15322 * mangle.c (write_name): Use <unscoped-name> for names directly in
15323 function scope.
15324 (write_unscoped_name): Accept names directly in function scope.
15325
15326 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
15327
15328 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15329 * parse.y (extdef): Add EXPORT reduction.
15330 * spew.c (yylex): Don't skip export here.
15331
15332 2000-11-19 Mark Mitchell <mark@codesourcery.com>
15333
15334 * decl.c (init_decl_processing): Correct name of pure virtual
15335 function under the new ABI.
15336 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15337 (throw_bad_typeid): Likewise for bad typeid function.
15338
15339 2000-11-18 Mark Mitchell <mark@codesourcery.com>
15340
15341 * decl.c (grokparms): Don't even function types of `void' type,
15342 either.
15343 * mangle.c (write_type): Don't crash when confronted with the
15344 error_mark_node.
15345
15346 * decl.c (grokparms): Don't create parameters of `void' type.
15347
15348 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
15349
15350 * lex.c (mark_impl_file_chain): Delete.
15351 (init_parse): Remove call to ggc_add_string_root. No need to
15352 ggc_strdup a string constant. Do not add impl_file_chain to GC
15353 roots.
15354 (handle_pragma_implementation): No need to ggc_strdup main_filename.
15355
15356 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15357
15358 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15359
15360 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15361
15362 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15363 * decl.c (grokdeclarator): Don't reject void parms here.
15364 (require_complete_types_for_parms): Simplify, use
15365 complete_type_or_else.
15366 (grokparms): Remove bitrot. Remove funcdef parm.
15367 Deal with ellipsis parm lists here.
15368 * semantics.c (finish_parmlist): Don't append void_list_node
15369 here. Set PARMLIST_ELLIPSIS_P.
15370
15371 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15372
15373 * typeck2.c (incomplete_type_error): Reorganize to avoid
15374 excessive diagnostics.
15375
15376 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
15377
15378 * lex.c (struct impl_files, internal_filename): Constify a char *.
15379
15380 2000-11-16 Mark Mitchell <mark@codesourcery.com>
15381
15382 * mangle.c (write_special_name_constructor): Don't generate
15383 assembler junk when confronted with an old-style constructor.
15384 (write_special_name_destructor): Likewise.
15385 (mangle_decl_string): Do it here instead.
15386
15387 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
15388
15389 * call.c (op_error): Make error messages clearer.
15390
15391 2000-11-15 Mark Mitchell <mark@codesourcery.com>
15392
15393 * decl.c (wrapup_globals_for_namespace): Don't mark things
15394 TREE_ASM_WRITTEN when they're not.
15395
15396 2000-11-15 Jason Merrill <jason@redhat.com>
15397
15398 * typeck2.c (friendly_abort): Uncount the error before handing
15399 off to fancy_abort.
15400
15401 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
15402
15403 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15404
15405 2000-11-14 Mark Mitchell <mark@codesourcery.com>
15406
15407 * class.c (build_vtbl_initializer): Fix typo in comment.
15408 * typeck.c (expr_sizeof): Don't crash on errors.
15409
15410 2000-11-14 Jim Wilson <wilson@redhat.com>
15411
15412 * lang-specs.h: Add %2 after %(cc1_options).
15413
15414 2000-11-14 Richard Henderson <rth@redhat.com>
15415
15416 * typeck.c (c_sizeof): Be strict about casting result value
15417 back to c_size_type_node.
15418 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15419
15420 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
15421
15422 * typeck.c (build_unary_op): Use boolean_increment from
15423 c-common.c, moving the relevant code there.
15424
15425 2000-11-11 Jason Merrill <jason@redhat.com>
15426
15427 * typeck.c (mark_addressable): Don't call put_var_into_stack.
15428
15429 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15430 in inlines.
15431
15432 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15433
15434 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15435 * lex.c (copy_lang_decl): Likewise.
15436
15437 2000-11-09 Mark Mitchell <mark@codesourcery.com>
15438
15439 * dump.c (cp_dump_tree): Don't dump function bodies here.
15440
15441 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15442 (dump.o): Update dependency list.
15443 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15444 (flag_dump_translation_unit): Likewise.
15445 (CP_TYPE_QUALS): Adjust definition.
15446 (DECL_C_BIT_FIELD): Remove.
15447 (SET_DECL_C_BIT_FIELD): Likewise.
15448 (CLEAR_DECL_C_BIT_FIELD): Likewise.
15449 (add_maybe_template): Likewise.
15450 (strip_array_types): Likewise.
15451 (dump_node_to_file): Likewise.
15452 (cp_dump_tree): New function.
15453 * decl.c (init_decl_processing): Set lang_dump_tree.
15454 * decl2.c (flag_dump_translation_unit): Remove.
15455 * dump.c: Move most of it to ../c-dump.c.
15456 (cp_dump_tree): New function.
15457 * pt.c (add_maybe_template): Remove.
15458 * typeck.c (strip_array_types): Likewise.
15459
15460 2000-11-07 Eric Christopher <echristo@redhat.com>
15461
15462 * decl.c (init_decl_processing): Change definition of
15463 __wchar_t to wchar_t. Remove artificial declaration of
15464 wchar_t.
15465 * lex.c: Change instances of __wchar_t to wchar_t.
15466
15467 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
15468
15469 * lex.c (do_identifier): Don't lookup_name for operators.
15470 * parse.y (operator): Save looking_for_typename.
15471 (unoperator): Restore it.
15472 * spew.c (frob_opname): Use nth_token for lookahead.
15473
15474 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
15475
15476 * decl.c (grok_op_properties): Always use coerce_new_type and
15477 coerce_delete_type.
15478 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15479 exception specification. Tidy up.
15480 (coerce_delete_type): Preserve exception specification. Tidy up.
15481
15482 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
15483
15484 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15485 (push_binding_level), error.c (cp_tree_printer), pt.c
15486 (process_partial_specialization, tsubst_template_arg_vector),
15487 search.c (lookup_member): Use memset () instead of bzero ().
15488
15489 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
15490
15491 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15492
15493 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
15494
15495 * Make-lang.in (c++.distdir): Remove.
15496
15497 2000-11-04 Mark Mitchell <mark@codesourcery.com>
15498
15499 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15500 declarations from different namespaces to be combined.
15501
15502 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
15503
15504 * decl.c: Include tm_p.h.
15505
15506 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
15507
15508 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15509
15510 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
15511
15512 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15513 (build_overload_value), repo.c (open_repo_file), xref.c
15514 (open_xref_file): Use strchr () and strrchr () instead of index ()
15515 and rindex ().
15516
15517 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
15518
15519 * call.c (build_over_call): Call fold on the CALL_EXPR.
15520
15521 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
15522
15523 * error.c (dump_template_decl): Separate template hearders with
15524 space not comma.
15525
15526 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
15527
15528 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
15529 TS_* flags with corresponding TFF_*. Adjust prototypes of
15530 functions (which used to take a tree_string_flags) to take an int.
15531
15532 * cp-tree.h (enum tree_string_flags): Remove
15533 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15534 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15535 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15536 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15537 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15538 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15539 (type_as_string, decl_as_string, expr_as_string,
15540 context_as_string): Adjust prototype.
15541
15542 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15543 instead of TS_PLAIN.
15544
15545 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15546 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15547 plain `0'.
15548
15549 2000-10-30 Mark Mitchell <mark@codesourcery.com>
15550
15551 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15552 (linkage_kind): New enumeration.
15553 (decl_linkage): New function.
15554 * decl2.c (comdat_linkage): Extend comment.
15555 * error.c (dump_function_decl): Print the arguments used to
15556 instantiate a template, even when not printing the type of the
15557 function.
15558 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15559 not TREE_PUBLIC, to test for external linkage.
15560 * tree.c (decl_linkage): New function.
15561
15562 2000-10-28 Mark Mitchell <mark@codesourcery.com>
15563
15564 * pt.c (instantiate_decl): Always instantiate static data members
15565 initialized in-class.
15566
15567 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
15568
15569 * Make-lang.in: Move all build rules here from Makefile.in,
15570 adapt to new context. Wrap all rules that change the current
15571 directory in parentheses. Expunge all references to $(P).
15572 When one command depends on another and they're run all at
15573 once, use && to separate them, not ;. Add OUTPUT_OPTION to
15574 all object-file generation rules. Delete obsolete variables.
15575
15576 * Makefile.in: Delete.
15577 * config-lang.in: Delete outputs= line.
15578
15579 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
15580
15581 * error.c (dump_function_decl): Print no space between
15582 `ptr-operator' the `type-specifier' of the return type.
15583 (dump_type_prefix): Make sure we put space at the appropriate
15584 place.
15585
15586 2000-10-23 Jason Merrill <jason@redhat.com>
15587
15588 * call.c (equal_functions): Also call decls_match for extern "C" fns.
15589
15590 2000-10-22 Jason Merrill <jason@redhat.com>
15591
15592 * call.c (build_conditional_expr): Use ocp_convert to force
15593 rvalue conversion.
15594
15595 2000-10-22 Mark Mitchell <mark@codesourcery.com>
15596
15597 * call.c (standard_conversion): Use RVALUE_CONVs for all
15598 expressions that satisfy lvalue_p, not just those that satisfy
15599 real_lvalue_p.
15600
15601 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15602
15603 * typeck.c (c_sizeof): Return an expression of `size_t' type,
15604 not one with TYPE_IS_SIZETYPE set.
15605 (dubious_conversion_warnings): Remove special-case code.
15606
15607 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
15608
15609 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15610 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15611 (dump_type_prefix): Print vector-of-int as 'int vector'.
15612 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15613 * tree.c (walk_tree): Handle VECTOR_TYPE.
15614
15615 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15616
15617 2000-10-21 Jason Merrill <jason@redhat.com>
15618
15619 * parse.y (operator): Set got_object from got_scope.
15620 Set looking_for_typename.
15621 * decl.c (lookup_name_real): Clear val after setting from_obj.
15622 Reorganize diagnostic.
15623
15624 2000-10-20 Jason Merrill <jason@redhat.com>
15625
15626 * tree.c (walk_tree): Don't walk into default args.
15627
15628 * error.c (dump_expr): Use host_integerp.
15629
15630 2000-10-20 David Edelsohn <edelsohn@gnu.org>
15631
15632 * typeck2.c (abstract_virtuals_error): Use "because" instead of
15633 "since" in error message.
15634
15635 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15636
15637 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15638
15639 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
15640
15641 * decl.c (revert_static_member_fn): Fixed typo.
15642
15643 2000-10-19 Mark Mitchell <mark@codesourcery.com>
15644
15645 * class.c (subobject_offset_fn): New type.
15646 (dfs_record_base_offsets): Remove.
15647 (record_base_offsets): Likewise.
15648 (dfs_search_base_offsets): Likewise.
15649 (record_subobject_offset): New function.
15650 (check_subobject_offset): Likewise.
15651 (walk_subobject_offsets): Likewise.
15652 (record_subobject_offsets): Likewise.
15653 (layout_conflict_p): Reimplement.
15654 (layout_nonempty_base_or_field): Correct handling of type
15655 conflicts during layout.
15656 (layout_empty_base): Likewise.
15657 (build_base_field): Adjust to handle new representation of empty
15658 base offset table.
15659 (build_base_fields): Likewise.
15660 (layout_virtual_bases): Likewise.
15661 (splay_tree_compare_integer_csts): New function.
15662 (layout_class_type): Use a splay_tree, rather than a varray, to
15663 represent the offsets of empty bases.
15664
15665 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15666 * decl.c (select_decl): Don't return declarations that are
15667 DECL_ANTICIPATED.
15668
15669 2000-10-18 Mark Mitchell <mark@codesourcery.com>
15670
15671 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15672 (fake_std_node): New macro.
15673 * decl.c (in_std): Rename to ...
15674 (in_fake_std): ... this.
15675 (flag_no_builtin): Remove.
15676 (flag_no_nonansi_builtin): Likewise.
15677 (walk_namespaces_r): Use fake_std_node.
15678 (push_namespace): Use std_identifier.
15679 (pop_namespace): Use in_fake_std.
15680 (lookup_name_real): Use fake_std_node.
15681 (init_decl_processing): When -fhonor-std, create the `std'
15682 namespace. Don't create a dummy fake_std_node in that case.
15683 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
15684 (builtin_function): Put builtins whose names don't begin
15685 with `_' in the std namespace.
15686 * decl2.c (flag_no_builtin): Remove.
15687 (flag_no_nonansi_builtin): Likewise.
15688 (set_decl_namespace): Use fake_std_node.
15689 (validate_nonmember_using_decl): Likewise.
15690 (do_using_directive): Likewise.
15691 (handle_class_head): Likewise.
15692 * dump.c (dequeue_and_dump): Likewise.
15693 * except.c (init_exception_processing): Use std_identifier.
15694 * init.c (build_member_call): Use fake_std_node.
15695 * rtti.c (init_rtti_processing): Use std_identifier.
15696
15697 2000-10-17 Mark Mitchell <mark@codesourcery.com>
15698
15699 * cp-tree.h (back_end_hook): Remove declaration.
15700 * decl2.c (back_end_hook): Remove definition.
15701
15702 * dump.c (dequeue_and_dump): Dump TREE_USED.
15703
15704 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
15705
15706 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15707
15708 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15709
15710 * decl.c (WINT_TYPE): Define.
15711 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15712 c_size_type_node, signed_size_type_node and wint_type_node.
15713
15714 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15715
15716 * decl2.c (warn_missing_format_attribute): New variable.
15717 (lang_decode_option): Decode -Wmissing-format-attribute.
15718
15719 2000-10-16 Mark Mitchell <mark@codesourcery.com>
15720
15721 * typeck.c (qualify_type): Remove.
15722 (composite_pointer_type): Fix handling of conversions to `cv void*'.
15723
15724 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15725
15726 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15727
15728 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15729
15730 * Makefile.in (parse.c, parse.h): Create atomically.
15731
15732 2000-10-12 Mark Mitchell <mark@codesourcery.com>
15733
15734 * class.c (current_obstack): Remove.
15735 * decl.c (ggc_p): Remove.
15736 (start_decl): Don't use decl_tree_cons.
15737 (grokdeclarator): Don't use build_decl_list.
15738 (start_function): Don't use decl_tree_cons.
15739 (finish_function): Don't mess with obstacks.
15740 * decl2.c (grok_x_components): Don't use build_decl_list.
15741 * lex.c (make_call_declarator): Don't call decl_tree_cons.
15742 (implicitly_declare_fn): Don't call build_decl_list.
15743 * parse.y (frob_specs): Don't call build_decl_list or
15744 decl_tree_cons.
15745 (expr_or_declarator_intern): Don't call decl_tree_cons.
15746 (primary): Don't call build_decl_list.
15747 (fcast_or_absdcl): Likewise.
15748 (typed_declspecs): Don't call decl_tree_cons.
15749 (reserved_declspecs): Don't call build_decl_list.
15750 (declmods): Likewise.
15751 (reserved_typespecquals): Likewise.
15752 (aggr): Likewise.
15753 (new_type_id): Likewise.
15754 (cv_qualifiers): Likewise.
15755 (after_type_declarator_intern): Likewise.
15756 (notype_declarator_intern): Likewise.
15757 (absdcl_intern): Likewise.
15758 (named_parm): Likewise.
15759 * pt.c (most_specialized_class): Likewise.
15760 * repo.c (temporary_obstack): Make it a structure, not a pointer.
15761 (init_repo): Initialize it.
15762 * search.c (current_obstack): Remove.
15763 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15764
15765 2000-10-09 Richard Henderson <rth@cygnus.com>
15766
15767 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15768 (c++ language support bits for libgcc): Remove.
15769 (c++.clean): Remove cplib2.txt cleanup.
15770 * config-lang.in (headers, lib2funcs): Remove.
15771
15772 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15773 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15774 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15775 * inc/new.h, inc/typeinfo: Remove files.
15776
15777 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
15778
15779 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15780 defined.
15781 (init_decl_processing): Initialize intmax_type_node and
15782 uintmax_type_node.
15783
15784 2000-10-06 Richard Henderson <rth@cygnus.com>
15785
15786 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15787 (original_result_rtx): Remove.
15788 * decl.c (save_function_data): Don't clear x_result_rtx.
15789 (mark_lang_function): Don't mark it either.
15790 * expr.c (fixup_result_decl): Remove.
15791 * semantics.c (genrtl_named_return_value): Frob the return decl
15792 before calling emit_local_var.
15793 (genrtl_finish_function): Don't call fixup_result_decl.
15794 Always emit the jump to return_label.
15795
15796 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
15797
15798 * pt.c (lookup_template_class): Set current access for enum.
15799 (tsubst_enum): Set file & line for enum decl.
15800
15801 * spew.c (yylex): Remove unused variable.
15802
15803 2000-10-05 Richard Henderson <rth@cygnus.com>
15804
15805 * semantics.c (genrtl_finish_function): Don't init or check
15806 can_reach_end; remove noreturn and return value checks.
15807
15808 2000-10-05 Tom Tromey <tromey@cygnus.com>
15809
15810 * init.c (build_java_class_ref): Use `build_static_name' with a
15811 suffix, not a prefix, to build the class object's name.
15812
15813 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15814
15815 * cp-tree.h (access_kind): Fix comment typo.
15816 * decl2.c (grokfield): Fix diagnostic typo.
15817 * semantics.c (finish_template_type): Fix comment typo.
15818 (finish_qualified_object_call_expr): Likewise.
15819
15820 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15821
15822 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15823 tsubsting fails.
15824
15825 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15826
15827 * spew.c (frob_id): New static function.
15828 (frob_opname): Use it.
15829 (yylex): Use it.
15830
15831 2000-10-01 Mark Mitchell <mark@codesourcery.com>
15832
15833 * decl.c (lang_mark_false_label_stack): Remove.
15834 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15835
15836 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
15837
15838 * gxxint.texi: Use @email for formatting email addresses.
15839
15840 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
15841
15842 * error.c: Remove direct obstack manipulation. Replace with
15843 output_buffer-based formatting. Adjust calls to removed macros.
15844 (obstack_chunk_alloc, obstack_chunk_free): Remove.
15845 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15846 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15847
15848 2000-09-24 Mark Mitchell <mark@codesourcery.com>
15849
15850 * ir.texi: Move to ../c-tree.texi.
15851
15852 2000-09-20 Jason Merrill <jason@redhat.com>
15853
15854 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15855
15856 2000-09-21 Andreas Jaeger <aj@suse.de>
15857
15858 * errfn.c: Move declaration of cp_printer and cp_printers to ...
15859 * cp-tree.h: ... here.
15860
15861 * error.c: Remove declaration of cp_printer.
15862
15863 2000-09-20 Mark Mitchell <mark@codesourcery.com>
15864
15865 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15866
15867 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
15868
15869 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15870 users.
15871
15872 2000-09-18 Mark Mitchell <mark@codesourcery.com>
15873
15874 * decl.c (start_function): Robustify.
15875
15876 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15877
15878 * cp-tree.h (check_function_format): Accept a `status' parameter.
15879
15880 * call.c, typeck.c: Updates calls to `check_function_format'.
15881
15882 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
15883
15884 * decl2.c (handle_class_head): Always push some scope even
15885 in the error case.
15886
15887 2000-09-16 Mark Mitchell <mark@codesourcery.com>
15888
15889 * cp-tree.h (struct cp_language_function): Remove
15890 x_scope_stmt_stack and name_declared.
15891 (current_scope_stmt_stack): Remove.
15892 (function_name_declared_p): New macro.
15893 (struct lang_decl_flags): Use c_lang_decl as a base class.
15894 (context): Remove.
15895 (struct lang_decl): Replace saved_tree with context.
15896 (DECL_FRIEND_CONTEXT): Adjust accordingly.
15897 (SET_DECL_FRIEND_CONTEXT): Likewise.
15898 (DECL_VIRTUAL_CONTEXT): Likewise.
15899 (DECL_SAVED_TREE): Remove.
15900 (C_DECLARED_LABEL_FLAG): Likewise.
15901 (cplus_expand_expr_stmt): Don't declare.
15902 (add_decl_stmt): Likewise.
15903 (add_scope_stmt): Likewise.
15904 * decl.c (mark_stmt_tree): Remove.
15905 (case_compare): Likewise.
15906 (finish_case_label): Use c_add_case_label.
15907 (init_decl_processing): Set more language-specific hooks.
15908 (build_enumerator): Fix typo in comment.
15909 (cplus_expand_expr_stmt): Remove.
15910 (mark_lang_function): Use mark_c_language_function.
15911 (lang_mark_tree): Use c_mark_lang_decl.
15912 * decl2.c: Change order of inclusion.
15913 * except.c: Likewise.
15914 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
15915 back on c_expand_expr.
15916 * friend.c: Include expr.h.
15917 * init.c: Change order of inclusion.
15918 * Makefile.in: Update dependencies.
15919 * lex.h (free_lang_decl_chain): Remove.
15920 * optimize.c (maybe_clone_body): Use function_name_declared_p.
15921 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15922 it doesn't exist.
15923 (instantiate_decl): Use function_name_declared_p.
15924 * semantics.c (lang_expand_expr_stmt): Remove.
15925 (set_current_function_name_declared): Likewise.
15926 (current_function_name_declared): Likewise.
15927 (begin_compound_stmt): Use function_name_declared_p.
15928 (add_decl_stmt): Remove.
15929 (setup_vtbl_ptr): Use function_name_declared_p.
15930 (add_scope_stmt): Remove.
15931 (current_scope_stmt_stack): New function.
15932 (cp_expand_stmt): Don't handle SCOPE_STMTs.
15933 (expand_body): Use function_name_declared_p.
15934 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15935 * typeck.c: Change order of includes.
15936 (convert_sequence): Remove.
15937
15938 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
15939
15940 * lex.c (reswords): Add _Complex.
15941
15942 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15943
15944 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15945
15946 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
15947
15948 * init.c (begin_init_stmts): Don't use // comments.
15949
15950 2000-09-12 Jason Merrill <jason@redhat.com>
15951
15952 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15953 all non-extern arrays.
15954
15955 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15956 typenames, too. Downgrade complaint to pedwarn.
15957 (xref_tag): Warn about surprising behavior of 'friend struct T'.
15958 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15959 'class This::Inherited'.
15960
15961 2000-09-12 Mark Mitchell <mark@codesourcery.com>
15962
15963 * decl.c (finish_case_label): Given the LABEL_DECL a
15964 DECL_CONTEXT.
15965
15966 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
15967
15968 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15969 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15970 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15971 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15972 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15973 New macros.
15974 (sorry_for_unsupported_tree, print_scope_operator,
15975 print_left_paren, print_right_paren, print_left_bracket,
15976 print_right_bracket, print_whitespace): Likewise.
15977 (aggr_variety): Rename to class_key_or_enum.
15978 (print_type): Rename to print_type_id.
15979 (print_type_specifier_seq, print_simple_type_specifier,
15980 print_elaborated_type_specifier,
15981 print_rest_of_abstract_declarator,
15982 print_parameter_declaration_clause, print_exception_specification,
15983 print_nested_name_specifier, print_template_id,
15984 typedef_original_name, print_template_argument_list_start,
15985 print_template_argument_list_end): New functions.
15986
15987 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
15988
15989 * ir.texi: Add more documentation.
15990
15991 2000-09-11 Mark Mitchell <mark@codesourcery.com>
15992
15993 * cp-tree.h (struct saved_scope): Remove x_function_parms.
15994 (current_function_parms): Don't define.
15995 (struct cp_language_function): Remove parms_stored.
15996 (current_function_just_assigned_this): Don't define.
15997 (current_function_parms_stored): Likewise.
15998 (static_ctors): Declare.
15999 (static_dtors): Likewise.
16000 (SF_EXPAND): Don't define.
16001 (expand_start_early_try_stmts): Remove declaration.
16002 (store_parm_decls): Likewise.
16003 * decl.c (static_ctors): Don't declare.
16004 (static_dtors): Likewise.
16005 (struct binding_level): Remove this_block.
16006 (poplevel): Remove dead code.
16007 (set_block): Likewise.
16008 (mark_binding_level): Don't mark this_block.
16009 (mark_saved_scope): Don't mark x_function_parms.
16010 (init_decl_processing): Don't add current_function_parms as a GC
16011 root.
16012 (check_function_type): Change prototype.
16013 (start_function): Remove RTL-generation code.
16014 (expand_start_early_try_stmts): Remove.
16015 (store_parm_decls): Give it internal linkage. Remove
16016 RTL-generation code.
16017 (finish_function): Remove RTL-generation code.
16018 * decl2.c (static_ctors): Fix formatting.
16019 (static_dtors): Likewise.
16020 * method.c (use_thunk): Don't call store_parm_decls.
16021 (synthesize_method): Likewise.
16022 * optimize.c (maybe_clone_body): Likewise.
16023 * parse.y (fn.def2): Likewise.
16024 (.set_base_init): Likewise.
16025 (nodecls): Likewise.
16026 * pt.c (instantiate_decl): Likewise.
16027 * rtti.c (synthesize_tinfo_fn): Likewise.
16028 * semantics.c (genrtl_try_block): Simplify.
16029 (expand_body): Use genrtl_start_function and
16030 genrtl_finish_function.
16031 (genrtl_start_function): New function.
16032 (genrtl_finish_function): Likewise.
16033
16034 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16035
16036 * error.c (cp_tree_printer, case 'P'): Append break.
16037
16038 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16039
16040 * cp-tree.h (frob_opname): Declare.
16041 * parse.y (saved_scopes): New static variable.
16042 (cp_parse_init): Adjust.
16043 (do_id): If lastiddecl is NULL, do do_identifier.
16044 (operator): Save scope information.
16045 (unoperator): New reduction. Restore scope information.
16046 (operator_name): Append unoperator. Call frob_opname.
16047 * spew.c (frob_opname): Define.
16048
16049 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
16050
16051 * decl.c, rtti.c: Include defaults.h if not already included.
16052 Don't define the *_TYPE_SIZE macros.
16053
16054 2000-09-09 Mark Mitchell <mark@codesourcery.com>
16055
16056 * cp-tree.h (push_switch): Change prototype.
16057 (check_cp_case_value): Remove declaration.
16058 (decl_constant_value): Likewise.
16059 * decl.c (struct cp_switch): Add switch_stmt and cases.
16060 (case_compare): New function.
16061 (push_switch): Set switch_stmt. Initialize cases.
16062 (pop_switch): Clean up cases.
16063 (define_case_label): Rename to ...
16064 (finish_case_label): ... this. Do semantic analysis for case
16065 labels here.
16066 (start_function): Correct comment.
16067 * decl2.c (check_cp_case_value): Remove.
16068 * expr.c (do_case): Remove.
16069 * pt.c (tsubst_expr): Adjust call to finish_case_label.
16070 * semantics.c (genrtl_do_poplevel): Remove declaration.
16071 (RECHAIN_STMTS): Remove.
16072 (finish_break_stmt): Use build_break_stmt.
16073 (finish_continue_stmt): Use build_continue_stmt.
16074 (finish_switch_cond): Adjust condition here, rater than in
16075 c_expand_start_case.
16076 (finish_case_label): Remove.
16077 * typeck.c (c_expand_return): Remove.
16078 (c_expand_start_case): Likewise.
16079
16080 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
16081
16082 * ir.texi: Document type nodes.
16083
16084 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16085
16086 * cp-tree.h (init_cp_semantics): Declare.
16087 (genrtl_try_block): Don't declare.
16088 (genrtl_handler): Likewise.
16089 (genrtl_catch_block): Likewise.
16090 (genrtl_ctor_stmt): Likewise.
16091 (genrtl_subobject): Likewise.
16092 (genrtl_do_poplevel): Likewise.
16093 (genrtl_named_return_value): Likewise.
16094 * lex.c (init_parse): Call init_cp_semantics.
16095 * semantics.c (genrtl_try_block): Give it internal linkage.
16096 (genrtl_handler): Likewise.
16097 (genrtl_catch_block): Likewise.
16098 (genrtl_ctor_stmt): Likewise.
16099 (genrtl_subobject): Likewise.
16100 (genrtl_do_poplevel): Likewise.
16101 (genrtl_named_return_value): Likewise.
16102 (lang_expand_stmt): Rename to ...
16103 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
16104 (init_cp_semantics): Define.
16105
16106 * decl.c (initialize_local_var): Remove RTL-generating code.
16107 * semantics.c (genrtl_try_block): Fix formatting.
16108
16109 Move statement-tree facilities from C++ to C front-end.
16110 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16111 (void_zero_node): Remove.
16112 (stmt_tree): Likewise.
16113 (scope_chain): Adjust.
16114 (language_function): Rename to cp_language_function.
16115 (cp_function_chain): Adjust.
16116 (current_stmt_tree): Remove.
16117 (last_tree): Likewise.
16118 (last_expr_type): Likewise.
16119 (struct lang_decl): Adjust.
16120 (STMT_IS_FULL_EXPR_P): Remove.
16121 (add_tree): Remove.
16122 (begin_stmt_tree): Likewise.
16123 (finish_stmt_tree): Likewise.
16124 (walk_tree_fn): Likewise.
16125 (walk_stmt_tree): Likewise.
16126 * class.c (finish_struct): Replace use of add_tree with add_stmt.
16127 * decl.c (mark_stmt_tree): Adjust type.
16128 (init_decl_processing): Don't build void_zero_node.
16129 (initialize_local_var): Adjust usage of current_stmt_tree.
16130 (finish_enum): Use add_stmt, not add_tree.
16131 (save_function_data): Adjust use of language_function.
16132 (finish_constructor_body): Use add_stmt, not add_tree.
16133 (finish_destructor_body): Likewise.
16134 (push_cp_function_context): Adjust use of language_function.
16135 (pop_cp_function_context): Likewise.
16136 (mark_lang_function): Likewise.
16137 (mark_cp_function_context): Likewise.
16138 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16139 (build_vec_init): Likewise.
16140 * semantics.c (SET_LAST_STMT): Remove.
16141 (RECHAIN_STMTS): Don't use it.
16142 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16143 (current_stmt_tree): Define.
16144 (add_tree): Remove.
16145 (finish_goto_stmt): Use add_stmt, not add_tree.
16146 (finish_expr_stmt): Likewise.
16147 (begin_if_stmt): Likewise.
16148 (finish_then_clause): Likewise.
16149 (begin_while_stmt): Likewise.
16150 (begin_do_stmt): Likewise.
16151 (finish_return_stmt): Likewise.
16152 (begin_for_stmt): Likewise.
16153 (finish_break_stmt): Likewise.
16154 (finish_continue_stmt): Likewise.
16155 (begin_switch_stmt): Likewise.
16156 (finish_case_label): Likewise.
16157 (begin_try_block): Likewise.
16158 (begin_function_try_block): Likewise.
16159 (begin_handler): Likewise.
16160 (begin_catch_block): Likewise.
16161 (begin_compound_stmt): Likewise.
16162 (begin_asm_stmt): Likewise.
16163 (finish_asm_stmt): Likewise.
16164 (finish_label_stmt): Likewise.
16165 (add_decl_stmt): Likewise.
16166 (finish_subobject): Likewise.
16167 (finish_decl_cleanup): Likewise.
16168 (finish_named_return_value): Likewise.
16169 (setup_vtbl_ptr): Likewise.
16170 (add_scope_stmt): Likewise.
16171 (finish_stmt_expr): Likewise.
16172 (prune_unused_decls): Remove.
16173 (begin_stmt_tree): Likewise.
16174 (finish_stmt_tree): Likewise.
16175 (prep_stmt): Adjust use of current_stmt_tree.
16176 (lang_expand_stmt): Likewise.
16177 * tree.c (statement_code_p): Remove.
16178 (cp_statement_code_p): New function.
16179 (walk_stmt_tree): Remove.
16180 (init_tree): Set lang_statement_code_p.
16181
16182 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
16183
16184 Integrated preprocessor.
16185
16186 * Make-lang.in, Makefile.in: Remove all references to input.c,
16187 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
16188 * gxx.gperf, hash.h, input.c: Delete.
16189 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16190 initialized properly.
16191
16192 * class.c (fixup_pending_inline): Take a tree, not a
16193 struct pending_inline *. All callers changed.
16194 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16195 RID_PROTECTED entries in ridpointers[] array here.
16196 * decl.c (duplicate_decls): Do not refer to struct
16197 pending_inline.
16198 (record_builtin_type, init_decl_processing): Use RID_MAX not
16199 CP_RID_MAX.
16200 (grokdeclarator): Use C_IS_RESERVED_WORD.
16201 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16202 cpplib.
16203 (grok_x_components): Do not inspect pending_inlines chain.
16204
16205 * cp-tree.h (struct lang_identifier): Add rid_code entry.
16206 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16207 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16208 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16209 TIME_IDENTIFIER_FILEINFO): Kill.
16210 Update prototypes.
16211 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
16212 single 32-bit word.
16213 * parse.y: Call do_pending_inlines unconditionally.
16214 reinit_parse_for_method is now snarf_method. fn.defpen is no
16215 longer necessary. Remove unnecessary <itype> annotation on
16216 SCOPE. Do not refer to end_of_file or struct pending_inline.
16217 * semantics.c (begin_inline_definitions): Call
16218 do_pending_inlines unconditionally.
16219
16220 * lex.c: Remove all code now shared with C front end.
16221 Initialize cpplib properly if USE_CPPLIB. Put reserved words
16222 into the get_identifier table. Rewrite pragma handling to
16223 work with the registry. Move code to save tokens for later
16224 processing to spew.c.
16225
16226 * spew.c: Rewrite everything in terms of token streams instead
16227 of text. Move routines here from lex.c / input.c as
16228 appropriate. GC-mark trees hanging off the pending inlines
16229 chain.
16230
16231 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16232
16233 * NEWS: Mention that the named return value extension has been
16234 deprecated.
16235 * cp-tree.h (original_result_rtx): Define.
16236 (TREE_REFERENCE_EXPR): Remove.
16237 (DECL_VPARENT): Likewise.
16238 (pushdecl_nonclass_level): Likewise.
16239 (store_return_init): Likewise.
16240 (reinit_lang_specific): Likewise.
16241 (genrtl_named_return_value): Change prototype.
16242 * decl.c (original_result_rtx): Remove.
16243 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16244 Do not generate RTL for local variables here.
16245 (store_return_init): Remove.
16246 * semantics.c (genrtl_named_return_value): Simplify. Fold in
16247 store_return_init.
16248 (finish_named_return_value): Adjust accordingly. Warn that this
16249 extension is deprecated.
16250 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16251
16252 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16253
16254 * pt.c (type_unification_real): Replace switch with if.
16255 (unify): Tsubst non-type parms before comparing.
16256
16257 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16258
16259 * error.c (dump_typename): New function, broken out of ...
16260 (dump_type): ... here. Use it.
16261 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16262
16263 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16264
16265 * init.c (build_offset_ref): Deal with namespace scoped
16266 TEMPLATE_ID_EXPRs.
16267
16268 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16269
16270 * class.c (resolve_address_of_overloaded_function): Add
16271 explanation message.
16272 * decl.c (define_case_label): Reformat explanation.
16273 * decl2.c (finish_static_data_member_decl): Likewise.
16274 (grokfield): Likewise.
16275 * friend.c (do_friend): Likewise.
16276
16277 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
16278
16279 * tree.c (walk_tree): Expose tail recursion.
16280 (walk_stmt_tree): New function.
16281 * cp-tree.h: Prototype walk_stmt_tree.
16282 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16283 the BLOCKs directly. If a BLOCK has no variables after
16284 pruning, discard it.
16285 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
16286 restore the line number.
16287
16288 2000-09-05 Mark Mitchell <mark@codesourcery.com>
16289
16290 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16291 (pt.o): Remove dependency on HTAB_H.
16292 * cp-tree.h: Include hashtab.h.
16293 (walk_tree): Change prototype.
16294 (walk_tree_without_duplicates): New function.
16295 * decl.c (check_default_argument): Use it.
16296 * optimize.c (remap_decl): Adjust calls to walk_tree.
16297 (copy_body): Likewise.
16298 (expand_calls_inline): Likewise.
16299 (calls_setjmp_p): Use walk_tree_without_duplicates.
16300 * pt.c: Don't include hashtab.h.
16301 (for_each_template_parm): Use walk_tree_without_duplicates.
16302 * semantics.c (finish-stmt_tree): Likewise.
16303 (expand_body): Likewise.
16304 * tree.c (walk_tree): Add additional parameter.
16305 (walk_tree_without_duplicates): New function.
16306 (count_trees): Use it.
16307 (verify_stmt_tree): Adjust call to walk_tree.
16308 (find_tree): Use walk_tree_without_duplicates.
16309 (no_linkage_check): Likewise.
16310 (break_out_target_exprs): Adjust call to walk_tree.
16311 (cp_unsave): Likewise.
16312
16313 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16314
16315 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16316 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16317 * cp-tree.h (TYPE_BINFO): Adjust comment.
16318 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16319 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16320 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16321 (TYPE_TEMPLATE_INFO): Likewise.
16322 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16323 * class.c (push_nested_class): Likewise.
16324 * decl.c (lookup_name_real): Likewise.
16325 (grokdeclarator): Likewise.
16326 (grok_op_properties): Likewise.
16327 (xref_tag): Likewise.
16328 (xref_basetypes): Likewise.
16329 * decl2.c (constructor_name_full): Likewise.
16330 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16331 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16332 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16333 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16334 (dump_type_suffix): Likewise.
16335 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16336 instead.
16337 (get_aggr_from_typedef): Likewise.
16338 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16339 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16340 (write_template_parm): Likewise.
16341 (write_template_template_parm): Check tree code instead of
16342 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16343 * method.c (build_overload_nested_name): Add
16344 BOUND_TEMPLATE_TEMPLATE_PARM.
16345 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16346 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16347 * pt.c (convert_template_argument): Check tree code instead of
16348 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16349 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16350 (for_each_template_parm): Adjust comment.
16351 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
16352 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16353 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
16354 template_args_equal to compare template template parameter cases.
16355 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16356 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16357 instead.
16358 * tree.c (copy_template_template_parm): Decide whether to create
16359 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16360 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16361 (copy_tree_r): Likewise.
16362 * typeck.c (comptypes): Likewise. Check tree code instead of
16363 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16364
16365 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
16366
16367 * decl.c (finish_function): Move the code for handling functions
16368 marked with the constructor and destructor attributes inside the
16369 expand_p block.
16370
16371 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16372
16373 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16374
16375 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16376
16377 * pt.c (lookup_template_class): Remove abort.
16378 * tree.c (get_type_decl): Allow error_mark_node.
16379
16380 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16381
16382 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16383 TEMPLATE_ID_EXPRs.
16384
16385 2000-09-03 Mark Mitchell <mark@codesourcery.com>
16386
16387 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16388 new ABI mangling.
16389
16390 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16391
16392 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16393 union tag mismatch error reporting.
16394
16395 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16396
16397 * call.c (build_scoped_method_call): Check it is not a namespace.
16398
16399 2000-08-30 Jason Merrill <jason@redhat.com>
16400
16401 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16402
16403 * tree.c (bot_manip): Check TREE_CONSTANT rather than
16404 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
16405 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16406
16407 * decl.c (start_function): Always call make_function_rtl.
16408
16409 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16410
16411 * semantics.c (prune_unused_decls): New function.
16412 (finish_stmt_tree): Call it via walk_tree.
16413
16414 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16415
16416 * class.c (build_secondary_vtable): Constify a char *.
16417 * decl.c (init_decl_processing): Initialize function_id_node,
16418 pretty_function_id_node, and func_id_node.
16419 * input.c (struct input_source): Constify 'str'.
16420 (feed_input): Constify first argument.
16421 * mangle.c (write_identifier): Constify argument.
16422 * pt.c (mangle_class_name_for_template): Constify argument.
16423
16424 2000-08-29 Mark Mitchell <mark@codesourcery.com>
16425
16426 * typeck.c (mark_addressable): Remove code that pokes around in
16427 RTL.
16428
16429 2000-08-28 Jason Merrill <jason@redhat.com>
16430
16431 * lex.c (file_name_nondirectory): Move to toplev.c.
16432
16433 * cp-tree.h (LOCAL_CLASS_P): New macro.
16434 * class.c (finish_struct_1): Use it.
16435
16436 2000-08-27 Alex Samuel <samuel@codesourcery.com>
16437
16438 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16439 (write_encoding): Pass another argument to write_name.
16440 (write_name): Add ignore_local_scope parameter. Fix handling of
16441 local names.
16442 (write_nested_name): Use write_unqualified_name.
16443 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
16444 (write_template_prefix): Use write_unqualified_name.
16445 (write_component): Remove.
16446 (write_local_name): Add parameter. Use direct local entity to
16447 discriminator calculation.
16448 (write_class_enum_type): Pass another argument to write_name.
16449 (write_template_template_arg): Likewise.
16450 (make_guard_variable): Likewise.
16451
16452 2000-08-27 Jason Merrill <jason@redhat.com>
16453
16454 * decl.c (pushdecl): Matching decls for local externs are found in
16455 the current level. Propagate linkage information from previous
16456 declarations.
16457
16458 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
16459
16460 * ir.texi (Expressions): Fix typo.
16461
16462 2000-08-25 Greg McGary <greg@mcgary.org>
16463
16464 * tree.c (init_tree): Use ARRAY_SIZE.
16465
16466 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16467
16468 * error.c (cp_tree_printer): Rework.
16469
16470 2000-08-25 Mark Mitchell <mark@codesourcery.com>
16471
16472 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16473 dyn-string.o.
16474 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16475 (cp-demangle.o): Remove target.
16476 (dyn-string.o): Likewise.
16477
16478 * decl.c (grokfndecl): Require that `main' return an `int'.
16479 * mangle.c (write_encoding): Don't mangle return types for
16480 conversion functions.
16481
16482 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16483
16484 * error.c (tree_formatting_info): New data type.
16485 (tree_being_formatted): New macro.
16486 (tree_formatting_flags): Likewise.
16487 (put_whitespace): Likewise.
16488 (print_tree_identifier): Likewise.
16489 (print_identifier): Likewise.
16490 (cp_tree_printer, print_function_argument_list, print_declaration,
16491 print_expression, print_function_declaration,
16492 print_function_parameter, print_type, print_cv_qualifier): New
16493 functions.
16494 (init_error): Initialize lang_printer.
16495
16496 2000-08-24 Jason Merrill <jason@redhat.com>
16497
16498 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16499 adjustment necessary.
16500
16501 2000-08-24 Greg McGary <greg@mcgary.org>
16502
16503 * cp-tree.h (MAIN_NAME_P): Remove macro.
16504
16505 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
16506
16507 * error.c (print_instantiation_context): Don't forget to flush the
16508 buffer.
16509
16510 2000-08-23 Jason Merrill <jason@redhat.com>
16511
16512 * typeck.c (build_ptrmemfunc): Save the input pmf.
16513
16514 * method.c (process_modifiers): Use same_type_p.
16515
16516 2000-08-23 Mark Mitchell <mark@codesourcery.com>
16517
16518 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16519 * mangle.c (write_function_type): Change prototype.
16520 (write_encoding): Don't mangle return types for
16521 constructors or destructors.
16522 (write_type): Adjust call to write_function_type.
16523 * pt.c (instantiate_template): Instantiate alternate entry points
16524 when instantiating the main function.
16525
16526 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16527
16528 * error.c (cp_print_error_function): Don't use embedded '\n' in
16529 output_printf.
16530
16531 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16532
16533 * decl.c (init_decl_processing): Remove bogus initialization.
16534 * error.c (lang_print_error_function): Restore here.
16535 (init_error): Initialize print_error_function.
16536
16537 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16538
16539 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16540
16541 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
16542
16543 * Makefile.in (error.o): Depends on diagnostic.h
16544
16545 * cp-tree.h (problematic_instantiation_changed,
16546 record_last_problematic_instantiation, current_instantiation,
16547 print_instantiation_context): Declare.
16548 (maybe_print_template_context): Remove.
16549
16550 * decl.c (init_decl_processing): Set print_error_function to NULL.
16551 (lang_print_error_function): Remove, since we're using a new
16552 machinery.
16553
16554 * error.c: #include diagnostic.h
16555 (function_category): New function.
16556 (cp_diagnostic_starter): Likewise.
16557 (cp_diagnostic_finalizer): Likewise.
16558 (cp_print_error_function): Likewise.
16559 (maybe_print_instantiation_context): Likewise.
16560 (print_instantiation_full_context): Likewise.
16561 (print_instantiation_partial_context): Likewise.
16562 (print_instantiation_context): Define.
16563 (init_error): Initialize diagnostic pager and finalizer.
16564
16565 * pt.c (problematic_instantiation_changed): Define.
16566 (record_last_problematic_instantiation): Likewise.
16567 (current_instantiation): Likewise.
16568 (maybe_print_template_context): Remove.
16569 (print_template_context): Likewise.
16570 (current_tinst_level): Make static to reflect Brendan Kehoe's
16571 change of 1995-04-13.
16572 (push_tinst_level): Call print_instantiation_context.
16573
16574 2000-08-21 Nix <nix@esperi.demon.co.uk>
16575
16576 * lang-specs.h: Do not process -o or run the assembler if
16577 -fsyntax-only.
16578
16579 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
16580
16581 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16582 variables.
16583 * decl2.c (lang_decode_option): Disable gettext attributes for
16584 -ansi.
16585
16586 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
16587
16588 * lex.c (lang_init_options): Default diagnostic message maximum
16589 length to 80, when line-wrapping.
16590
16591 2000-08-20 Mark Mitchell <mark@codesourcery.com>
16592
16593 * class.c (build_vtbl_initializer): Clear the entire
16594 vtbl_init_data. Start keeping track of the functions for which we
16595 have created vcall offsets here.
16596 (dfs_build_vcall_offset_vtbl_entries): Remove.
16597 (build_vcall_offset_vtbl_entries): Reimplement.
16598 (add_vcall_offset_vtbl_entries_r): New function.
16599 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
16600 computing when vcall offsets are necessary.
16601
16602 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16603
16604 * decl.c (member_function_or_else): Use cp_error ... %T.
16605 (grokdeclarator): Likewise.
16606 (start_method): Likewise.
16607 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16608
16609 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16610
16611 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16612 TYPE_DECLs.
16613
16614 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16615
16616 * cp-tree.h (PTRMEM_OK_P): New macro.
16617 (itf_ptrmem_ok): New enumeration value.
16618 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16619 argument. Diagnose implicit pointer to member.
16620 (instantiate_type): Don't diagnose implicit pointer to member
16621 here. Pass itf_ptrmem_ok if ok. Adjust calls to
16622 resolve_address_of_overloaded_function.
16623 * init.c (build_offset_ref): Set PTRMEM_OK_P.
16624 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16625 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16626 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16627 (build_unary_op): Deal with single non-static member in
16628 microsoft-land.
16629
16630 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16631
16632 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16633
16634 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16635
16636 * cp-tree.h (enum_name_string): Remove prototype.
16637 (report_case_error): Remove prototype.
16638 * cp/typeck2.c (enum_name_string): Remove.
16639 (report_case_error): Remove.
16640 * error.c (dump_expr): Deal with enum values directly.
16641 Correctly negate integer constant.
16642
16643 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16644
16645 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16646 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16647 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16648 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16649 (__cxa_vec_new): Use __cxa_vec_new2.
16650 (__cxa_vec_delete): Use __cxa_vec_delete2.
16651
16652 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16653
16654 * vec.cc (__cxa_vec_new): Set "C" linkage.
16655 (__cxa_vec_ctor): Likewise.
16656 (__cxa_vec_cctor): Likewise.
16657 (__cxa_vec_dtor): Likewise.
16658 (__cxa_vec_delete): Likewise.
16659 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16660 (__cxa_vec_ctor): Likewise.
16661 (__cxa_vec_cctor): Likewise.
16662 (__cxa_vec_dtor): Likewise.
16663 (__cxa_vec_delete): Likewise.
16664
16665 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16666
16667 * class.c (instantiate_type): Reinstate local variable
16668 deleted in previous change.
16669
16670 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16671 itf_no_attributes.
16672
16673 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16674
16675 * cp-tree.h (instantiate_type_flags): New enumeration.
16676 (instantiate_type): Change parameter.
16677 * class.c (instantiate_type): Adjust prototype. Adjust.
16678 * call.c (standard_conversion): Adjust instantiate_type call.
16679 (reference_binding): Likewise.
16680 (build_op_delete_call): Likewise.
16681 (convert_like_real): Likewise.
16682 * cvt.c (cp_convert_to_pointer): Likewise.
16683 (convert_to_reference): Likewise.
16684 * pt.c (convert_nontype_argument): Likewise.
16685 * typeck.c (build_binary_op): Likewise.
16686 (build_ptrmemfunc): Likewise.
16687 (convert_for_assignment): Likewise.
16688
16689 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16690
16691 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16692 (current_aggr): Define.
16693 * decl.c (grokdeclarator): Make sure a friend class is an
16694 elaborated type specifier.
16695 * parse.y (current_aggr): Remove static definition.
16696 (cp_parse_init): Adjust.
16697 (structsp): Clear and restore current_aggr.
16698 (component_decl_list): Clear current_aggr.
16699
16700 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16701 aggregate tag on the typename's context.
16702
16703 * pt.c (tsubst_friend_class): Return error_mark_node, if
16704 parms becomes NULL.
16705 (instantiate_class_template): Ignore error_mark_node friend types.
16706
16707 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
16708
16709 * cvt.c (warn_ref_binding): New static function, broken out of ...
16710 (convert_to_reference): ... here. Use it.
16711
16712 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16713
16714 * parse.y (template_arg): Add rule for template qualified with
16715 global scope.
16716
16717 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16718
16719 * decl2.c (add_function): Reorganize.
16720 (arg_assoc): Do not consider function template decls.
16721
16722 2000-08-11 Jason Merrill <jason@redhat.com>
16723
16724 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16725 looking inside.
16726
16727 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16728
16729 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16730 (lookup_nested_tag): Likewise.
16731
16732 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16733 can be produced.
16734
16735 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16736
16737 * parse.y (named_complex_class_head_sans_basetype): Remove
16738 always true if.
16739
16740 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16741
16742 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16743 explicit TEMPLATE_ID_EXPR args.
16744 (build_expr_from_tree, case CALL_EXPR): Likewise.
16745
16746 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16747
16748 * decl.c (check_tag_decl): Diagnose typename's which don't
16749 declare anything.
16750
16751 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
16752
16753 * init.c (build_aggr_init): Reject bogus array initializers
16754 early.
16755
16756 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16757
16758 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16759 runtime.
16760 * cp/tinfo.cc (__dynamic_cast): Likewise.
16761 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16762
16763 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16764
16765 * cvt.c (convert_to_pointer_force): Fix error message when
16766 attempting to cast from ambiguous base.
16767
16768 2000-08-08 Jason Merrill <jason@redhat.com>
16769
16770 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16771 (tsubst_template_arg_vector): Likewise.
16772
16773 * decl2.c (build_anon_union_vars): Choose the largest field; don't
16774 assume that one will be as large as the union.
16775
16776 2000-08-07 Kazu Hirata <kazu@hxi.com>
16777
16778 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16779 * decl.c (pop_labels): Likewise.
16780
16781 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
16782
16783 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16784 specifications.
16785 (__pointer_to_member_type_info): Likewise.
16786 (__base_class_info): Likewise.
16787 (__class_type_info): Likewise.
16788 (__si_class_type_info): Likewise.
16789 (__vmi_class_type_info): Likewise.
16790 * tinfo.cc (__si_class_type_info::__do_find_public_src):
16791 Changed member names to match specifications.
16792 (__vmi_class_type_info::__do_find_public_src): Likewise.
16793 (__si_class_type_info::__do_dyncast): Likewise.
16794 (__vmi_class_type_info::__do_dyncast): Likewise.
16795 (__si_class_type_info::__do_upcast): Likewise.
16796 (__vmi_class_type_info::__do_upcast): Likewise.
16797 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16798 (__pbase_type_info::__pointer_catch): Likewise.
16799 (__pointer_type_info::__pointer_catch): Likewise.
16800 (__pointer_to_member_type_info::__pointer_catch): Likewise.
16801
16802 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
16803
16804 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16805 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16806 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16807
16808 2000-08-04 Mark Mitchell <mark@codesourcery.com>
16809
16810 * cp-tree.h (add_method): Change prototype.
16811 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
16812 Don't double the size of the method vector in the error case.
16813 (handle_using_decl): Adjust call to add_method.
16814 (add_implicitly_declared_members): Likewise.
16815 (clone_function_decl): Likewise.
16816 * decl2.c (check_classfn): Likewise.
16817 * semantics.c (finish_member_declaration): Likewise.
16818
16819 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
16820
16821 * decl.c (flag_isoc94): New variable.
16822
16823 2000-08-02 Jason Merrill <jason@redhat.com>
16824
16825 * pt.c (do_type_instantiation): Add complain parm; don't complain
16826 if called recursively.
16827 * cp-tree.h, parse.y: Adjust.
16828
16829 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
16830
16831 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16832 -Wno-strict-prototypes.
16833
16834 * g++spec.c: Adjust type of second argument to
16835 lang_specific_driver, and update code as necessary.
16836
16837 * cp-tree.h: Don't prototype min_precision here.
16838 (my_friendly_assert): Cast expression to void.
16839 * semantics.c (do_poplevel): Initialize scope_stmts.
16840
16841 2000-08-02 Mark Mitchell <mark@codesourcery.com>
16842
16843 * cp-tree.h (DECL_NEEDED_P): Tweak.
16844
16845 2000-07-28 Jason Merrill <jason@redhat.com>
16846
16847 * lang-specs.h: Use %i in rule for .ii files.
16848
16849 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
16850
16851 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16852
16853 2000-07-30 Mark Mitchell <mark@codesourcery.com>
16854
16855 Allow indirect primary bases.
16856 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
16857 primary_base.
16858 (CLASSTYPE_VFIELD_PARENT): Remove.
16859 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16860 (BINFO_PRIMARY_BINFO): Remove.
16861 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16862 (BINFO_VBASE_PRIMARY_P): Likewise.
16863 (BINFO_PRIMARY_BASE_OF): New macro.
16864 (BINFO_INDIRECT_PRIMARY_P): Likewise.
16865 (get_primary_binfo): New function.
16866 * decl.c (lang_mark_tree): Make lang_type::primary_base.
16867 * class.c (vcall_offset_data_s): Rename to ...
16868 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
16869 and add ctor_vtbl_p.
16870 (get_derived_offset): Use get_primary_binfo.
16871 (dfs_mark_primary_bases): Adjust handling of virtual primary
16872 bases.
16873 (mark_primary_bases): Likewise.
16874 (set_primary_base): Take a binfo, not an integer, as a
16875 representation of the primary base.
16876 (indirect_primary_base_p): Remove.
16877 (determine_primary_base): Adjust for indirect primary bases.
16878 (dfs_find_final_overrider): Fix typo in coment.
16879 (update_vtable_entry_for_fn): Use get_primary_binfo.
16880 (layout_nonempty_base_or_field): Tweak.
16881 (build_base_fields): Adjust for new primary base semantics.
16882 (dfs_propagate_binfo_offsets): Remove.
16883 (propagate_binfo_offsets): Rewrite.
16884 (dfs_set_offset_for_shared_vbases): Remove.
16885 (layout_virtual_bases): Don't use it.
16886 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16887 ABI.
16888 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16889 CLASSTYPE_VFIELD_PARENT.
16890 (dfs_get_primary_binfo): New function.
16891 (get_primary_binfo): Likewise.
16892 (dump_class_hierarchy_r): Tweak printing of primary bases.
16893 (build_vtbl_initializer): Fix typo in comments. Use
16894 vtbl_init_data.
16895 (build_vcall_and_vbase_vtbl_entries): Likewise.
16896 (build_vbaes_offset_vtbl_entries): Likewise.
16897 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16898 BV_VCALL_INDEX to handle indirect primary bases.
16899 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16900 (build_rtti_vtbl_entries): Likewise.
16901 * search.c (get_shared_vbase_if_not_primary): Tweak.
16902 (find_vbase_instance): Likewise.
16903 (binfo_for_vtable): Simplify.
16904 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16905 (make_binfo): Make it have 11 entries.
16906
16907 2000-07-30 Alex Samuel <samuel@codesourcery.com>
16908
16909 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16910 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16911 ascertaining primaryness.
16912 (G): Remove template_args.
16913 (decl_is_template_id): New function.
16914 (write_encoding): Use decl_is_template_id.
16915 (write_name): Likewise. Handle type_decls. Get main variant of
16916 type decls.
16917 (write_nested_name): Likewise.
16918 (write_prefix): Likewise.
16919 (write_template_prefix): Likewise.
16920 (write_special_name_constructor): Remove defunct production from
16921 comment.
16922 (write_bare_function_type): Remove comment about absent parameter.
16923 (write_template_template_arg): Add missing grammar production to
16924 comment.
16925
16926 2000-07-27 Jason Merrill <jason@redhat.com>
16927
16928 * decl.c (duplicate_decls): If common_type produces a non-typedef
16929 type for a typedef, just use the old type.
16930
16931 2000-07-27 Mark Mitchell <mark@codesourcery.com>
16932
16933 * cp-tree.h (function_depth): Declare.
16934 (verify_stmt_tree): Likewise.
16935 (find_tree): Likewise.
16936 * decl.c (function_depth): Give it external linkage.
16937 * optimize.c (optimize_function): Increment and decrement it.
16938 * tree.c (verify_stmt_tree_r): New function.
16939 (verify_stmt_tree): Likewise.
16940 (find_tree_r): Likewise.
16941 (find_tree): Likewise.
16942
16943 2000-07-27 Jason Merrill <jason@redhat.com>
16944
16945 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16946 TYPE_PTRMEMFUNC_P.
16947 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16948
16949 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16950
16951 * decl.c (start_cleanup_fn): Mark the function as `inline'.
16952 * decl2.c (get_guard): Call cp_finish_decl, not
16953 rest_of_decl_compilation, for local guards.
16954 * lex.c (do_identifier): Remove unused variable.
16955
16956 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
16957
16958 * parse.y: Add missing ';'.
16959
16960 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16961
16962 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16963 of `extern "C++"'.
16964
16965 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16966
16967 Kill strict_prototype. Backwards compatibility only for
16968 non NO_IMPLICIT_EXTERN_C systems.
16969 * cp-tree.h (flag_strict_prototype): Remove.
16970 (strict_prototype): Remove.
16971 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16972 * decl.c (maybe_push_to_top_level): Adjust.
16973 (pop_from_top_level): Adjust.
16974 (decls_match): Only allow sloppy parm matching for ancient
16975 system headers.
16976 (init_decl_processing): Adjust.
16977 (grokdeclarator): Adjust.
16978 * decl2.c (flag_strict_prototype): Remove.
16979 (strict_prototype): Remove.
16980 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16981 (lang_f_options): Remove "strict-prototype".
16982 (unsupported-options): Add "strict-prototype".
16983 * lex.c (do_identifier): Adjust.
16984 (do_scoped_id): Adjust.
16985 * parse.y (empty_parms): Adjust.
16986 * class.c (push_lang_context): Adjust.
16987 (pop_lang_context): Adjust.
16988 * typeck.c (comp_target_parms): Adjust.
16989
16990 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16991
16992 * decl.c (poplevel): Deal with anonymous variables at for scope.
16993 (maybe_inject_for_scope_var): Likewise.
16994
16995 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
16996
16997 * decl.c: Remove all signal handling code, now done in toplev.c.
16998
16999 2000-07-23 Mark Mitchell <mark@codesourcery.com>
17000
17001 * decl.c (make_rtl_for_nonlocal_decl): Rework.
17002
17003 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
17004 correctly.
17005
17006 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
17007
17008 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
17009 Define my_friendly_assert and my_friendly_abort as macros
17010 which may call friendly_abort. Prototype friendly abort, not
17011 my_friendly_abort or my_friendly_assert.
17012 * decl.c (signal_catch): Report the signal caught in the error
17013 message. Call fatal directly.
17014 * typeck2.c (ack, my_friendly_assert): Delete.
17015 (my_friendly_abort): Rename to friendly_abort. Expect file,
17016 line, and function parameters. Report the abort code, then
17017 call fancy_abort. Do not mask an abort if errors have
17018 already occurred.
17019
17020 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
17021
17022 * typeck.c (comp_target_parms): Remove obsolete parameter.
17023 (comp_target_types): Adjust.
17024
17025 2000-07-17 Jason Merrill <jason@redhat.com>
17026
17027 * typeck.c (mark_addressable): Never set TREE_USED.
17028 * call.c (build_call): Don't abort on calls to library functions
17029 that have been declared normally.
17030
17031 * typeck.c (build_binary_op): Fix grammar in warning.
17032
17033 * exception.cc (__eh_free): Fix prototype.
17034
17035 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
17036
17037 * decl.c (pushdecl): Handle seeing an OVERLOAD in
17038 IDENTIFIER_NAMESPACE_VALUE.
17039
17040 2000-07-16 Mark Mitchell <mark@codesourcery.com>
17041
17042 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
17043 * method.c (use_thunk): Correct handling of vcall offsets.
17044
17045 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
17046
17047 * .cvsignore: parse.h and parse.c have no cp- prefix.
17048
17049 2000-07-13 Mark Mitchell <mark@codesourcery.com>
17050
17051 * .cvsignore: New file.
17052
17053 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
17054
17055 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
17056
17057 2000-07-12 Mark Mitchell <mark@codesourcery.com>
17058
17059 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
17060 * parse.c: Remove.
17061 * parse.h: Likewise.
17062
17063 2000-07-11 Mark Mitchell <mark@codesourcery.com>
17064
17065 * class.c (layout_class_type): Add pointers to virtual bases after
17066 base classes under the old ABI.
17067
17068 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
17069
17070 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
17071 (finish_continue_stmt): Likewise.
17072 (begin_for_stmt): Remove call to note_level_for_for.
17073 (finish_goto_stmt): Change call from build_min_nt
17074 to build_stmt.
17075 (finish_expr_stmt): Likewise.
17076 (begin_if_stmt): Likewise.
17077 (begin_while_stmt): Likewise.
17078 (finish_while_stmt): Likewise.
17079 (finish_return_stmt): Likewise.
17080 (begin_for_stmt): Likewise.
17081 (finish_for_stmt): Likewise.
17082 (finish_break_stmt): Likewise.
17083 (begin_switch_stmt): Likewise.
17084 (finish_case_label): Likewise.
17085 (genrtl_try_block): Likewise.
17086 (begin_try_block): Likewise.
17087 (begin_handler): Likewise.
17088 (begin_compound_stmt): Likewise.
17089 (finish_asm_stmt): Likewise.
17090 (finish_label_stmt): Likewise.
17091 (add_decl_stmt): Likewise.
17092 (finish_subobject): Likewise.
17093 (finish_decl_cleanup): Likewise.
17094 (finish_named_return_value): Likewise.
17095 (setup_vtbl_ptr): Likewise.
17096 (add_scope_stmt): Likewise.
17097 * decl.c (finish_constructor_body): Likewise.
17098 (finish_destructor_body): Likewise.
17099 * optimize.c (copy_body_r): Likewise.
17100 (initialize_inlined_parameters): Likewise.
17101 (declare_return_variable): Likewise.
17102 (expand_call_inline): Likewise.
17103
17104 2000-07-10 Jakub Jelinek <jakub@redhat.com>
17105
17106 * semantics.c (expand_body): Sync interface information
17107 at the end of function body expansion.
17108
17109 2000-07-09 Jason Merrill <jason@redhat.com>
17110
17111 * init.c (build_new_1): Bail early if the call to new fails.
17112
17113 * decl.c (compute_array_index_type): Check specifically for
17114 an INTEGER_CST, not just TREE_CONSTANT.
17115
17116 * decl.c (duplicate_decls): Don't call duplicate_decls on
17117 the DECL_TEMPLATE_RESULT.
17118 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17119 codes.
17120
17121 * error.c (dump_template_bindings): Don't crash if we had an
17122 invalid argument list.
17123
17124 * typeck.c (c_expand_start_case): Do narrowing here.
17125 * semantics.c (finish_switch_cond): Not here.
17126
17127 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
17128
17129 * parse.y (asm_clobbers): Do string concatenation.
17130
17131 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17132
17133 * decl.c (pushtag): Don't put local classes in template functions
17134 on the local_classes list.
17135
17136 2000-07-04 Scott Snyder <snyder@fnal.gov>
17137
17138 * decl2.c (get_guard): Add missing return for old ABI local
17139 variable case.
17140
17141 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17142
17143 * cp-tree.h (char_type_p): New function.
17144 * decl.c (init_decl_processing): Don't initialize
17145 signed_wchar_type_node or unsigned_wchar_type_node.
17146 (complete_array_type): Handle brace-enclosed string-constants.
17147 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17148 * tree.c (char_type_p): New function.
17149 * typeck2.c (digest_init): Use char_type_p.
17150
17151 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17152
17153 * pt.c (tsubst): Don't layout type, if it's error_mark.
17154
17155 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17156
17157 * pt.c (instantiate_pending_templates): Reset template level.
17158
17159 2000-07-05 Jason Merrill <jason@redhat.com>
17160
17161 * call.c (joust): Don't complain about `operator char *()' beating
17162 `operator const char *() const'.
17163
17164 2000-07-04 scott snyder <snyder@fnal.gov>
17165 Jason Merrill <jason@redhat.com>
17166
17167 * repo.c (repo_get_id): Handle the case where a class with virtual
17168 bases has a null TYPE_BINFO_VTABLE.
17169
17170 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
17171 Jason Merrill <jason@redhat.com>
17172
17173 * parse.y (member_init): Just pass in the type.
17174 * init.c (expand_member_init): Handle getting a type.
17175
17176 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17177 Jason Merrill <jason@redhat.com>
17178
17179 * decl.c (finish_function): Warn if a function has no return
17180 statement.
17181 Suggested by Andrew Koenig.
17182 * typeck.c (check_return_expr): Do set current_function_returns_value
17183 if we got an error_mark_node.
17184
17185 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17186
17187 * decl2.c (push_decl_namespace): Push the original namespace.
17188
17189 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17190
17191 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17192 * semantics.c (begin_class_definition): Clear it.
17193
17194 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
17195
17196 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17197 (genrtl_expr_stmt): Likewise.
17198 (genrtl_decl_stmt): Likewise.
17199 (genrtl_if_stmt): Likewise.
17200 (genrtl_while_stmt): Likewise.
17201 (genrtl_do_stmt): Likewise.
17202 (genrtl_return_stmt): Likewise.
17203 (genrtl_for_stmt): Likewise.
17204 (genrtl_break_stmt): Likewise.
17205 (genrtl_continue_stmt): Likewise.
17206 (genrtl_scope_stmt): Likewise.
17207 (genrtl_switch_stmt): Likewise.
17208 (genrtl_case_label): Likewise.
17209 (genrtl_begin_compound_stmt): Likewise.
17210 (genrtl_finish_compound_stmt): Likewise.
17211 (genrtl_compound_stmt): Likewise.
17212 (genrtl_asm_stmt): Likewise.
17213
17214 * init.c (begin_init_stmts): Remove call to
17215 genrtl_begin_compound_stmt.
17216 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17217
17218 * semantics.c (lang_expand_stmt): Changed call to
17219 genrtl_compound_stmt to ignore return value.
17220
17221 2000-07-02 Mark Mitchell <mark@codesourcery.com>
17222
17223 * mangle.c (canonicalize_for_substitution): Return the canonical
17224 variant of a type.
17225
17226 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17227 TYPE_DECL.
17228 * typeck.c (commonparms): Remove obstack manipulations.
17229
17230 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
17231
17232 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17233
17234 * Makefile.in (OBJS): Added ../c-semantics.o.
17235 (OBJDEPS): Likewise.
17236
17237 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17238 ../c-common.h.
17239 (struct stmt_tree): Added comment.
17240 (current_function_name_declared): Removed.
17241 (stmts_are_full_exprs_p): Likewise.
17242 (genrtl_do_pushlevel): Likewise.
17243 (genrtl_clear_out_block): Likewise.
17244 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17245 (DECL_ANON_UNION_ELEMS): Likewise.
17246 (emit_local_var): Likewise.
17247 (make_rtl_for_local_static): Likewise.
17248 (do_case): Likewise.
17249 (expand_stmt): Likewise.
17250 (genrtl_decl_cleanup): Likewise.
17251 (c_expand_asm_operands): Likewise.
17252 (c_expand_return): Likewise.
17253 (c_expand_start_case): Likewise.
17254
17255 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17256 (emit_local_var): Likewise.
17257 (initialize_local_var): Change reference to
17258 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17259 Change reference to stmts_are_full_exprs_p to
17260 current_stmt_tree->stmts_are_full_exprs_p.
17261 (push_cp_function_context): Likewise.
17262
17263 * expect.c (expand_throw): Change reference to
17264 stmts_are_full_exprs_p.
17265
17266 * init.c (build_aggr_init): Change reference to
17267 stmts_are_full_exprs_p.
17268 (build_vec_init): Likewise.
17269
17270 * optimize.c (maybe_clone_body): Change reference to
17271 current_function_name_declared to
17272 cp_function_chain->name_declared.
17273
17274 * pt.c (instantiate_decl): Change reference to
17275 current_function_name_declared to
17276 cp_function_chain->name_declared.
17277
17278 * semantics.c (expand_cond): Moved declaration to c-common.h.
17279 (genrtl_do_pushlevel): Moved to c-semantics.c.
17280 (genrtl_clear_out_block): Likewise.
17281 (genrtl_goto_stmt): Likewise.
17282 (genrtl_expr_stmt): Likewise.
17283 (genrtl_decl_stmt): Likewise.
17284 (gerntl_if_stmt): Likewise.
17285 (genrtl_while_stmt): Likewise.
17286 (genrtl_do_stmt): Likewise.
17287 (genrtl_return_stmt): Likewise.
17288 (genrtl_for_stmt): Likewise.
17289 (genrtl_break_stmt): Likewise.
17290 (genrtl_continue_stmt): Likewise.
17291 (genrtl_scope_stmt): Likewise.
17292 (genrtl_switch_stmt): Likewise.
17293 (genrtl_case_label): Likewise.
17294 (genrtl_begin_compound_stmt): Likewise.
17295 (genrtl_finish_compound_stmt): Likewise.
17296 (genrtl_compound_stmt): Likewise.
17297 (genrtl_asm_stmt): Likewise.
17298 (genrtl_decl_cleanup): Likewise.
17299 (expand_cond): Likewise.
17300 (expand_stmt): Renamed to ...
17301 (lang_expand_stmt): ... this.
17302 (lang_expand_expr_stmt): Initialize.
17303 (set_current_function_name_declared): Likewise.
17304 (stmts_are_full_exprs_p): Likewise.
17305 (current_function_name_declared): Likewise.
17306 (anon_aggr_type_p): Likewise.
17307 (do_poplevel): Change reference to
17308 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17309 Change reference to stmts_are_full_exprs_p to
17310 current_stmt_tree->stmts_are_full_exprs_p.
17311 (add_tree): Likewise.
17312 (finish_expr_stmt): Likewise.
17313 (prep_stmt): Likewise.
17314 (lang_expand_stmt): Likewise.
17315 (begin_compound_stmt): Change reference to
17316 current_function_name_declared to
17317 cp_function_chain->name_declared and call to
17318 current_function_name_declared().
17319 (setup_vtbl_ptr): Likewise.
17320 (genrtl_do_poplevel): Removed.
17321
17322 2000-06-30 Jason Merrill <jason@redhat.com>
17323
17324 * init.c (init_init_processing): Go back to aligning like
17325 double_type_node for old ABI.
17326 (get_cookie_size): Make cookie larger if we get a type that needs
17327 more alignment.
17328 (build_vec_delete): Call it.
17329
17330 * typeck.c (qualify_type_recursive): New fn.
17331 (composite_pointer_type): Use it.
17332 (build_binary_op): Use composite_pointer_type.
17333
17334 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
17335 Jason Merrill <jason@redhat.com>
17336
17337 * typeck.c (check_return_expr): Don't complain about returning
17338 NULL from operator new if -fcheck-new.
17339 * cp-tree.h: Declare flag_check_new here.
17340 * init.c: Not here.
17341
17342 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17343
17344 * mangle.c (find_substitution): Use same_type_p.
17345 (write_encoding): Don't check for substitutions.
17346
17347 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17348
17349 * parse.y (expr_no_comma_rangle): New non-terminal.
17350 (template_parm): Use it for default parameter case.
17351 (template_arg): Use it.
17352 (expr_no_commas): Remove commented out undefined extensions.
17353 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17354 * parse.h, parse.c: Rebuilt.
17355
17356 2000-06-30 Mark Mitchell <mark@codesourcery.com>
17357
17358 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17359 (finish_asm_stmt): Do it here, instead.
17360
17361 * cp-tree.h (ridpointers): Don't declare.
17362 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17363 (record_builtin_java_type): Likewise.
17364 (init_decl_processing): Likewise.
17365 * lex.c: Move inclusion of lex.h.
17366 (ridpointers): Don't define.
17367 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
17368 RID_MAX.
17369 * lex.h (enum rid): Rename to ...
17370 (enum cp_rid): ... this.
17371 (ridpointers): Don't declare.
17372 * parse.y: Move inclusion of lex.h.
17373 * parse.c: Regenerated.
17374 * spew.c: Move inclusion of lex.h.
17375
17376 * cp-tree.h (struct language_function): Remove temp_name_counter.
17377 (temp_name_counter): Remove.
17378 (get_temp_name): Change prototype.
17379 (get_guard): New function.
17380 (get_guard_cond): Likewise.
17381 (set_guard): Likewise.
17382 * cvt.c (build_up_reference): Adjust call to get_temp_name.
17383 * decl.c (expand_static_init): Use get_guard and friends to
17384 implement guard variables.
17385 * decl2.c (get_temp_name): Assume that the variables created are
17386 always static.
17387 (get_sentry): Rename to ...
17388 (get_guard): ... this. Implement new ABI guard variables.
17389 (get_guard_bits): New function.
17390 (get_guard_cond): Likewise.
17391 (set_guard): Likewise.
17392 (start_static_initialization_or_destruction): Use them.
17393 (do_static_initialization): Replace sentry with guard throughout.
17394 (do_static_destruction): Likewise.
17395 * init.c (create_temporary_var): Add comment.
17396
17397 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17398
17399 * mangle.c (find_substitution): Use same_type_p.
17400 (write_encoding): Don't check for substitutions.
17401
17402 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17403
17404 * parse.y (expr_no_comma_rangle): New non-terminal.
17405 (template_parm): Use it for default parameter case.
17406 (template_arg): Use it.
17407 (expr_no_commas): Remove commented out undefined extensions.
17408 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17409 * parse.h, parse.c: Rebuilt.
17410
17411 2000-06-29 Mark Mitchell <mark@codesourcery.com>
17412
17413 * cp-tree.h (flag_const_strings): Remove.
17414 (warn_parentheses): Likewise.
17415 (warn_format): Likewise.
17416 (common_type): Likewise.
17417 (default_conversion): Likewise.
17418 (build_binary_op): Likewise.
17419 (cp_build_binary_op): New macro.
17420 * call.c (build_new_op): Use cp_build_binary_op instead of
17421 build_binary_op.
17422 * class.c (build_vtable_entry_ref): Likewise.
17423 * decl.c (expand_static_init): Likewise.
17424 (compute_array_index_type): Likewise.
17425 (build_enumerator): Likewise.
17426 * decl2.c (delete_sanity): Likewise.
17427 (start_static_initialization_or_destruction): Likewise.
17428 * error.c (dump_type_suffix): Likewise.
17429 * init.c (resolve_offset_ref): Likewise.
17430 (build_new): Likewise.
17431 (build_new_1): Likewise.
17432 (build_vec_delete_1): Likewise.
17433 (build_vec_init): Likewise.
17434 (build_delete): Likewise.
17435 * rtti.c (synthesize_tinfo_fn): Likewise.
17436 (synthesize_tinfo_var): Likewise.
17437 * search.c (expand_upcast_fixups): Likewise.
17438 (fixup_all_virtual_upcast_offsets): Likewise.
17439 * typeck.c (build_array_ref): Likewise.
17440 (get_member_function_from_ptrfunc): Likewise.
17441 (build_binary_op): Add parameter.
17442 (pointer_int_sum): Use cp_build_binary_op.
17443 (pointer_diff): Likewise.
17444 (build_modify_expr): Likewise.
17445 (get_delta_difference): Likewise.
17446 (build_ptrmemfunc): Likewise.
17447
17448 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
17449
17450 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17451 * decl.c (create_implicit_typedef): Adjust.
17452 * decl2.c (build_artificial_parm): Adjust.
17453 * method.c (implicitly_declare_fn): Adjust.
17454 * pt.c (push_inline_template_parms_recursive): Adjust.
17455 (process_template_parm): Adjust.
17456 (overloaded_template_name): Adjust.
17457 * semantics.c (finish_template_template_parm): Adjust.
17458
17459 2000-06-28 Mark Mitchell <mark@codesourcery.com>
17460
17461 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17462 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17463 where to emit thunks.
17464 (build_vtt): Adjust call to build_vtt_inits.
17465 (build_vtt_inits): Add parameter to indicate whether or not
17466 sub-VTTs for virtual bases should be included. Adjust handling of
17467 construction vtables.
17468 (get_matching_base): New function.
17469 (dfs_build_vtt_inits): Rename to ...
17470 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17471 construction vtables.
17472 (dfs_fixup_binfo_vtbls): Likewise.
17473 (build_ctor_vtbl_groups): Build construction vtables for virtual
17474 bases, too.
17475 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17476 to build construction vtbls.
17477 (dfs_accumulate_vtbl_inits): Adjust handling of
17478 construction vtables.
17479
17480 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17481 types correctly.
17482
17483 2000-06-27 Mark Mitchell <mark@codesourcery.com>
17484
17485 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17486
17487 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17488
17489 * search.c (hides): Remove.
17490 (is_subobject_of_p): Add most_derived parameter. Use
17491 CANONICAL_BINFO.
17492 (lookup_field_queue_p): Adjust.
17493 (lookup_field_r): Adjust.
17494
17495 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17496
17497 * decl2.c (handle_class_head): Bash typedefs to the type's main
17498 decl.
17499
17500 2000-06-25 Mark Mitchell <mark@codesourcery.com>
17501
17502 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17503 (begin_global_stmt_expr): ... this.
17504 (genrtl_finish_stmt_expr): Rename to ...
17505 (finish_global_stmt_expr): ... this.
17506 * init.c (begin_init_stmts): Adjust calls.
17507 (finish_init_stmts): Likewise.
17508 * semantics.c (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
17513 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17514
17515 * search.c (lookup_member): Fix typo in comment.
17516
17517 2000-06-24 Jason Merrill <jason@redhat.com>
17518
17519 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17520 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17521
17522 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17523
17524 * parse.y (complex_direct_notype_declarator): Support global_scope.
17525 * Makefile.in: Adjust conflict count.
17526
17527 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17528
17529 * parse.y (template_arg): Convert TEMPLATE_DECL
17530 that is a template template parameter to
17531 TEMPLATE_TEMPLATE_PARM here.
17532
17533 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17534 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17535 (copy_template_template_parm): Adjust prototype.
17536 * decl.c (grokdeclarator): Remove dead code.
17537 * pt.c (process_template_parm): Tidy.
17538 (lookup_template_class): Construct nodes in
17539 copy_template_template_parm.
17540 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17541 lookup_template_class. Use TYPE_TI_TEMPLATE.
17542 * tree.c (copy_template_template_parm): Add NEWARGS
17543 parameter.
17544 (mapcar): Adjust call to copy_template_template_parm.
17545 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17546 * method.c (build_template_template_parm_names): Change error
17547 code to avoid compilation warning.
17548
17549 * gxxint.texi: Document template template parameter
17550 name mangling.
17551
17552 2000-06-21 Alex Samuel <samuel@codesourcery.com>
17553
17554 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17555 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17556 (cp-demangle.o): New rule.
17557 (dyn-string.o): Likewise.
17558 * inc/cxxabi.h (__cxa_demangle): New declaration.
17559
17560 2000-06-22 Mark Mitchell <mark@codesourcery.com>
17561
17562 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17563 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17564 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
17565 a tree, not an int.
17566 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17567 (make_thunk): Change prototype.
17568 (emit_thunk): Rename to use_thunk.
17569 (mangle_thunk): Change prototype.
17570 * class.c (get_derived_offset): Simplify.
17571 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17572 BV_GENERATE_THUNK_WITH_VTABLE_P.
17573 (build_primary_vtable): Simplify.
17574 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17575 (dfs_find_base): Remove.
17576 (update_vtable_entry_for_fn): Correct bug in finding the base
17577 where a virtual function was first declared. Figure out whether
17578 or not to emit a vcall-thunk with the vtables in which it appears.
17579 Correct logic for deciding whether to use an ordinary thunk, or a
17580 vcall thunk.
17581 (finish_struct_1): Remove unnecssary code.
17582 (build_vtbl_initializer): Use ssize_int for the running counter of
17583 negative indices.
17584 (build_vtbl_initializer): Only use vcall thunks where necessary.
17585 Mark thunks as needing to be emitted with their vtables, or not.
17586 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17587 indices. Use size_binop.
17588 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17589 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
17590 size_binop.
17591 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17592 (build_vtable_entry): Mark thunks as needing to be emitted with
17593 their vtables, or not.
17594 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17595 * decl2.c (mark_vtable_entries): Use use_thunk instead of
17596 emit_thunk.
17597 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
17598 information.
17599 * error.c (dump_expr): Use BV_FN.
17600 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17601 not an int.
17602 * method.c (make_thunk): Likewise.
17603 (emit_thunk): Rename to use_thunk. Allow callers to decide
17604 whether or not to actually emit the thunk. Adjust for changes in
17605 representation of vcall offsets.
17606 * search.c (dfs_get_pure_virtuals): Use BV_FN.
17607 * semantics.c (emit_associated_thunks): New function.
17608 (expand_body): Use it.
17609 * ir.texi: Adjust decriptions of thunks.
17610
17611 2000-06-22 Jason Merrill <jason@redhat.com>
17612
17613 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17614 (tsubst_friend_function): Copy it here.
17615
17616 * decl.c (grok_op_properties): Fix typo.
17617
17618 * decl2.c (delete_sanity): Clarify warning, avoid failure on
17619 deleting void*.
17620
17621 * pt.c (check_explicit_specialization): Clarify error.
17622
17623 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17624 an old OVERLOAD when we're declaring a non-function.
17625 (pushdecl, destroy_local_var): Check for error_mark_node.
17626 (warn_extern_redeclared_static): Also bail early if
17627 we're a CONST_DECL.
17628 (push_overloaded_decl): Ignore an old error_mark_node.
17629
17630 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
17631
17632 * call.c (build_x_va_arg): Check if in a template decl.
17633 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17634
17635 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17636
17637 * class.c (push_lang_context): TYPE_NAME gets you to the Java
17638 types DECLs.
17639 * decl.c (check_goto): Computed gotos assumed OK.
17640
17641 2000-06-20 Jason Merrill <jason@redhat.com>
17642
17643 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17644 for which we don't need to look for instantiations.
17645
17646 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
17647
17648 * parse.y (program): Always call finish_translation_unit.
17649 * parse.c, parse.h: Rebuilt.
17650
17651 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
17652
17653 * method.c: Don't include hard-reg-set.h.
17654
17655 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17656
17657 * rtti.c (get_base_offset): Cope when vbase field is in a base.
17658
17659 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17660
17661 * call.c (build_conditional_expr): Use VOID_TYPE_P.
17662 * cvt.c (cp_convert_to_pointer): Likewise.
17663 (convert_to_void): Likewise.
17664 * error.c (dump_expr): Likewise.
17665 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17666 * init.c (build_delete): Likewise.
17667 * method.c (emit_thunk): Likewise.
17668 * optmize.c (declare_return_variable): Likewise.
17669 * rtti.c (get_tinfo_decl_dynamic): Likewise.
17670 (get_typeid): Likewise.
17671 (build_dynamic_cast_1): Likewise.
17672 * typeck.c (composite_pointer_type): Likewise.
17673 (common_type): Likewise.
17674 (build_indirect_ref): Likewise.
17675 (build_binary_op): Likewise.
17676 (build_x_compound_expr): Likewise.
17677 (check_return_expr): Likewise.
17678 * typeck2.c (add_exception_specifier): Likewise.
17679
17680 * mangle.c (write_method_parms): Use direct comparison for end
17681 of parmlist.
17682
17683 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
17684
17685 * cp-tree.h (genrtl_try_block): Declare function.
17686 (genrtl_handler): Likewise.
17687 (genrtl_catch_block): Likewise.
17688 (genrtl_ctor_stmt): Likewise.
17689 (genrtl_subobject): Likewise.
17690 (genrtl_decl_cleanup): Likewise.
17691 (genrtl_do_poplevel): Likewise.
17692 (genrtl_do_pushlevel): Likewise.
17693 (genrtl_clear_out_block): Likewise.
17694 (genrtl_goto_stmt): Likewise.
17695 (genrtl_expr_stmt): Likewise.
17696 (genrtl_decl_stmt): Likewise.
17697 (genrtl_if_stmt): Likewise.
17698 (genrtl_while_stmt): Likewise.
17699 (genrtl_do_stmt): Likewise.
17700 (genrtl_return_stmt): Likewise.
17701 (genrtl_for_stmt): Likewise.
17702 (genrtl_break_stmt): Likewise.
17703 (genrtl_continue_stmt): Likewise.
17704 (genrtl_scope_stmt): Likewise.
17705 (genrtl_switch_stmt): Likewise.
17706 (genrtl_case_label): Likewise.
17707 (genrtl_begin_compound_stmt): Likewise.
17708 (genrtl_finish_compound_stmt): Likewise.
17709 (genrtl_compound_stmt): Likewise.
17710 (genrtl_asm_stmt): Likewise.
17711 (genrtl_named_return_value): Likewise.
17712 (genrtl_begin_stmt_expr): Likewise.
17713 (genrtl_finish_stmt_expr): Likewise.
17714 (finish_for_stmt): Removed first argument.
17715 (finish_switch_stmt): Likewise.
17716
17717 * semantics.c (genrtl_try_block): Define function.
17718 (genrtl_handler): Likewise.
17719 (genrtl_catch_block): Likewise.
17720 (genrtl_ctor_stmt): Likewise.
17721 (genrtl_subobject): Likewise.
17722 (genrtl_decl_cleanup): Likewise.
17723 (genrtl_do_poplevel): Likewise.
17724 (genrtl_do_pushlevel): Likewise.
17725 (genrtl_clear_out_block): Likewise.
17726 (genrtl_goto_stmt): Likewise.
17727 (genrtl_expr_stmt): Likewise.
17728 (genrtl_decl_stmt): Likewise.
17729 (genrtl_if_stmt): Likewise.
17730 (genrtl_while_stmt): Likewise.
17731 (genrtl_do_stmt): Likewise.
17732 (genrtl_return_stmt): Likewise.
17733 (genrtl_for_stmt): Likewise.
17734 (genrtl_break_stmt): Likewise.
17735 (genrtl_continue_stmt): Likewise.
17736 (genrtl_scope_stmt): Likewise.
17737 (genrtl_switch_stmt): Likewise.
17738 (genrtl_case_label): Likewise.
17739 (genrtl_begin_compound_stmt): Likewise.
17740 (genrtl_finish_compound_stmt): Likewise.
17741 (genrtl_compound_stmt): Likewise.
17742 (genrtl_asm_stmt): Likewise.
17743 (genrtl_named_return_value): Likewise.
17744 (genrtl_begin_stmt_expr): Likewise.
17745 (genrtl_finish_stmt_expr): Likewise.
17746 (finish_for_stmt): Removed first argument and generate rtl
17747 specific code.
17748 (finish_switch_stmt): Likewise.
17749 (do_poplevel): Removed generate rtl specific code.
17750 (do_pushlevel): Likewise.
17751 (add_tree): Likewise.
17752 (finish_goto_stmt): Likewise.
17753 (finish_expr_stmt): Likewise.
17754 (begin_if_stmt): Likewise.
17755 (finish_if_stmt_cond): Likewise.
17756 (finish_then_clause): Likewise.
17757 (begin_else_clause): Likewise.
17758 (finish_else_clause): Likewise.
17759 (finish_if_stmt): Likewise.
17760 (clear_out_block): Likewise.
17761 (begin_while_stmt): Likewise.
17762 (finish_while_stmt_cond): Likewise.
17763 (finish_while_stmt): Likewise.
17764 (begin_do_stmt): Likewise.
17765 (finish_do_body): Likewise.
17766 (finish_do_stmt): Likewise.
17767 (finish_return_stmt): Likewise.
17768 (begin_for_stmt): Likewise.
17769 (finish_for_init_stmt): Likewise.
17770 (finish_for_cond): Likewise.
17771 (finish_for_expr): Likewise.
17772 (finish_break_stmt): Likewise.
17773 (finish_continue_stmt): Likewise.
17774 (begin_switch_stmt): Likewise.
17775 (finish_switch_cond): Likewise.
17776 (finish_case_label): Likewise.
17777 (begin_try_block): Likewise.
17778 (begin_function_try_block): Likewise.
17779 (finish_try_block): Likewise.
17780 (finish_cleanup_try_block): Likewise.
17781 (finish_cleanup): Likewise.
17782 (finish_function_try_block): Likewise.
17783 (finish_handler_sequence): Likewise.
17784 (finish_function_handler_sequence): Likewise.
17785 (begin_handler): Likewise.
17786 (finish_handler_parms): Likewise.
17787 (begin_catch_block): Likewise.
17788 (finish_handler): Likewise.
17789 (begin_compound_stmt): Likewise.
17790 (finish_compound_stmt): Likewise.
17791 (finish_asm_stmt): Likewise.
17792 (finish_label_stmt): Likewise.
17793 (finish_label_decl): Likewise.
17794 (finish_subobject): Likewise.
17795 (finish_decl_cleanup): Likewise.
17796 (finish_named_return_value): Likewise.
17797 (begin_stmt_expr): Likewise.
17798 (finish_stmt_expr): Likewise.
17799
17800 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17801 to call genrtl_expr_stmt when appropriate.
17802
17803 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17804 begin_compound_expr to call genrtl_begin_stmt_expr and
17805 genrtl_begin_compound_expr when appropriate.
17806 (finish_init_stmts): Changed calls to finish_compound_expr and
17807 finish_stmt_expr to call genrtl_finish_compound_expr and
17808 genrtl_finish_stmt_expr when appropriate.
17809 (expand_default_init): Changed call to finish_expr_stmt to call
17810 genrtl_expr_stmt when appropriate.
17811 (build_vec_init): Likewise.
17812
17813 * parse.y (simple_stmt): Removed first argument from call to
17814 finish_for_stmt. Removed first argument from call to
17815 finish_switch_stmt.
17816
17817 * parse.c: Regenerated.
17818
17819 * pt.c (tsubst_expr): Removed first argument from call to
17820 finish_for_stmt. Removed first argument from call to
17821 finish_switch_stmt.
17822
17823 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
17824
17825 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17826 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17827
17828 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17829 (cplus_tree_code_length[]): Likewise.
17830 (cplus_tree_code_name[]): Likewise.
17831 (init_parse): Added call to add_c_tree_codes. Changed
17832 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17833
17834 2000-06-16 Mark Mitchell <mark@codesourcery.com>
17835
17836 * cp-tree.h (finish_mem_initializers): Declare.
17837 (count_trees): Likewise.
17838 * parse.y (base_init): Use finish_mem_initializers.
17839 * semantics.c (finish_mem_initializers): New function.
17840
17841 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
17842 the number of trees.
17843 (n_trees): Remove.
17844 (count_trees): Don't use it.
17845
17846 2000-06-15 Jason Merrill <jason@redhat.com>
17847
17848 * tree.c (count_trees): New debugging function.
17849
17850 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17851 * init.c (build_member_call): Pull out the name of a DECL.
17852
17853 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17854 * semantics.c (expand_body): Push to TV_INTEGRATION here.
17855 * optimize.c (optimize_function): Not here.
17856 * pt.c (instantiate_decl): Push to TV_PARSE.
17857
17858 2000-06-15 Mark Mitchell <mark@codesourcery.com>
17859
17860 * cp-tree.h (struct language_function): Remove x_base_init_list
17861 and x_member_init_list.
17862 (current_base_init_list): Remove.
17863 (current_member_init_list): Likewise.
17864 (setup_vtbl_ptr): Change prototype.
17865 (emit_base_init): Likewise.
17866 (expand_member_init): Likewise.
17867 (reinit_parse_for_function): Remove.
17868 * decl.c (save_function_data): Don't clear x_base_init_list and
17869 x_member_init_list.
17870 (mark_language_function): Don't mark them.
17871 * init.c (perform_member_init): Tweak comment.
17872 (sort_member_init): Take the list of initializers as an argument.
17873 (sort_base_init): Likewise.
17874 (emit_base_init): Likewise.
17875 (expand_member_init): Return the initializer. Don't use global
17876 variables.
17877 * lex.c (reinit_parse_for_function): Remove.
17878 * method.c (build_template_parm_names): Correct substitution.
17879 (do_build_copy_constructor): Don't use current_member_init_list
17880 and current_base_init_list.
17881 (synthesize_method): Likewise.
17882 * parse.y (base_init): Split mem-initializers into
17883 base-initializers and field-initializers.
17884 (member_init_list): Build up the list here.
17885 (member_init): Return the initializer.
17886 (fn.depfn): Don't use reinit_parse_for_function.
17887 * parse.c: Regenerated.
17888 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17889 ERROR_MARK.
17890 (tsubst_expr): Don't use current_member_init_list
17891 and current_base_init_list.
17892 (tsubst_expr_values): Rename to ...
17893 (tsubst_initializer_list): ... this. Use convert_from_reference.
17894 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17895 and current_base_init_list.
17896 (begin_function_definition): Don't call reinit_parse_for_function.
17897
17898 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17899
17900 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17901 correctly.
17902
17903 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17904
17905 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
17906
17907 * cp-tree.h (IF_COND): Move to c-common.h.
17908 (THEN_CLAUSE): Likewise.
17909 (ELSE_CLAUSE): Likewise.
17910 (WHILE_COND): Likewise.
17911 (WHILE_BODY): Likewise.
17912 (DO_COND): Likewise.
17913 (DO_BODY): Likewise.
17914 (RETURN_EXPR): Likewise.
17915 (EXPR_STMT_EXPR): Likewise.
17916 (FOR_INIT_STMT): Likewise.
17917 (FOR_COND): Likewise.
17918 (FOR_EXPR): Likewise.
17919 (FOR_BODY): Likewise.
17920 (SWITCH_COND): Likewise.
17921 (SWITCH_BODY): Likewise.
17922 (CASE_LOW): Likewise.
17923 (CASE_HIGH): Likewise.
17924 (GOTO_DESTINATION): Likewise.
17925 (COMPOUND_BODY): Likewise.
17926 (ASM_CV_QUAL): Likewise.
17927 (ASM_STRING): Likewise.
17928 (ASM_OUTPUTS): Likewise.
17929 (ASM_INPUTS): Likewise.
17930 (ASM_CLOBBERS): Likewise.
17931 (DECL_STMT_DECL): Likewise.
17932 (STMT_EXPR_STMT): Likewise.
17933 (LABEL_STMT_LABEL): Likewise.
17934 (SCOPE_BEGIN_P): Likewise.
17935 (SCOPE_END_P): Likewise.
17936 (SCOPE_STMT_BLOCK): Likewise.
17937 (SCOPE_NULLIFIED_P): Likewise.
17938 (SCOPE_NO_CLEANUPS_P): Likewise.
17939 (SCOPE_PARTIAL_P): Likewise.
17940 (ASM_VOLATILE_P): Likewise.
17941 (STMT_LINENO): Likewise.
17942 (STMT_LINENO_FOR_FN_P): Likewise.
17943
17944 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17945 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17946 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17947 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17948 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17949
17950 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17951
17952 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17953 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17954
17955 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17956 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17957 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17958
17959 2000-06-14 Mark Mitchell <mark@codesourcery.com>
17960
17961 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17962 * class.c (dfs_find_final_overrider): Set it appropriately.
17963 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17964 avoid unneeded secondary vptrs.
17965
17966 2000-06-13 Jakub Jelinek <jakub@redhat.com>
17967
17968 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17969 (check_bitfield_decl, check_field_decl): Likewise.
17970 (build_vtbl_or_vbase_field, build_base_field): Likewise.
17971 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17972 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17973 (xfer_tag, finish_enum): Likewise.
17974 * decl2.c (finish_builtin_type): Likewise.
17975 * init.c (init_init_processing): Likewise.
17976 * pt.c (instantiate_class_template): Likewise.
17977 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17978 * cp-tree.h (struct lang_type): Add user_align member.
17979 (CLASSTYPE_USER_ALIGN): Define.
17980
17981 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
17982
17983 * Make-lang.in (c++.install-common): Install g++-cross in
17984 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17985 $(target_alias)-g++ and $(target_alias)-c++.
17986
17987 2000-06-12 Mark Mitchell <mark@codesourcery.com>
17988
17989 * class.c (vcall_offset_data_s): Add last_init and fns.
17990 (overrides): Rename to same_signature_p.
17991 (dfs_find_final_overrider): Adjust accordingly.
17992 (mark_overriders): Likewise.
17993 (warn_hidden): Likewise.
17994 (build_vtbl_initializer): Reorganize machinery for building things
17995 at negative offsets.
17996 (build_vcall_and_vbase_vtbl_entries): Likewise.
17997 (build_vbase_offset_vtbl_entries): Likewise.
17998 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17999 offset entries. Do not create two entries for functions with the
18000 same signature.
18001 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
18002 (build_rtti_vtbl_entries): Reorganize machinery for building things
18003 at negative offsets.
18004
18005 * optimize.c (expand_call_inline): Don't recurse into the code
18006 used to initialize the parameters more than once.
18007
18008 2000-06-11 Mark Mitchell <mark@codesourcery.com>
18009
18010 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
18011 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
18012 (find_substitution): Only use the `Sa' substitution for
18013 std::allocator, not instantiations of it.
18014 (write_template_prefix): Move comment. Only use a TREE_LIST to
18015 represent substitutions for a member template.
18016 (write_array_type): Mangle array dimensions correctly.
18017 * optimize.c (maybe_clone_body): Copy more information from the
18018 cloned function.
18019 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
18020 on the regenerated declaration.
18021
18022 2000-06-11 Chip Salzenberg <chip@valinux.com>
18023 Mark Mitchell <mark@codesourcery.com>
18024
18025 * class.c (build_vtable): Clarify comment.
18026 (build_ctor_vtbl_group): Pass the most derived type to
18027 build_vtable.
18028
18029 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18030
18031 * decl2.c (compare_options): Don't needlessly cast away const-ness.
18032
18033 2000-06-10 Mark Mitchell <mark@codesourcery.com>
18034
18035 * decl.c (add_binding): Handle duplicate declarations of external
18036 variables.
18037
18038 2000-06-09 Chip Salzenberg <chip@valinux.com>
18039 Mark Mitchell <mark@codesourcery.com>
18040
18041 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
18042 argument.
18043 (write_signed_number): New macro.
18044 (write_unsigned_number): Likewise.
18045 (write_source_name): Use them.
18046 (write_number): Handle signed and unsigned values.
18047 (write_integer_cst): Use tree_int_cst_sgn, and use
18048 write_unsigned_number or write_signed_number as appropriate.
18049 (write_discriminator): Use write_unsigned_number or
18050 write_signed_number as appropriate.
18051 (write_template_arg_literal): Likewise.
18052 (write_array_type): Use tree_low_cst.
18053 (write_template_parm): Use write_unsigned_number or
18054 write_signed_number as appropriate.
18055 (write_substitution): Adjust call to write_number.
18056 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
18057 (write_expression): Handle non-type template arguments of
18058 reference type correctly.
18059 (mangle_thunk): Use write_signed_number.
18060
18061 2000-06-09 Chip Salzenberg <chip@valinux.com>
18062
18063 * mangle.c (find_substition): Don't mangle objects with typename
18064 substitutions (e.g. "cin" as "Si").
18065
18066 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
18067
18068 * call.c (add_candidate): Use ggc_alloc_cleared.
18069 * decl.c (lookup_label): Likewise.
18070 * lex.c (retrofit_lang_decl): Likewise.
18071
18072 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
18073
18074 * semantics.c (expand_body): Push to TV_EXPAND.
18075 * optimize.c (optimize_function): Push to TV_INTEGRATION.
18076 * decl.c (start_function): Always call announce_function.
18077
18078 * tinfo2.cc: Just declare abort.
18079
18080 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
18081
18082 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
18083 whenever @ is a symbolic name.
18084
18085 2000-06-08 Jakub Jelinek <jakub@redhat.com>
18086
18087 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
18088
18089 2000-06-07 Mark Mitchell <mark@codesourcery.com>
18090
18091 * decl.c (pushdecl): Look up functions by DECL_NAME, not
18092 DECL_ASSEMBLER_NAME.
18093
18094 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18095
18096 * decl2.c (c_language): Define.
18097
18098 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
18099
18100 * lex.c (lang_init_options): Tweak.
18101
18102 * decl2.c: Remove #inclusion of diagnostic.h
18103 (lang_decode_option): Move diagnostic formatting options to
18104 toplevel.
18105
18106 * lang-options.h: Remove documentation for diagnostic options.
18107
18108 * Makefile.in (lex.o): Depends upon diagnostic.h
18109
18110 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18111
18112 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18113 the same DECL_RESULT, it's not a redefinition.
18114 * pt.c (tsubst_decl): Remove code to handle illegal
18115 specializations.
18116
18117 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
18118
18119 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18120
18121 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
18122
18123 * search.c (maybe_suppress_debug_info): Don't check
18124 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18125
18126 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18127 here if extern_p.
18128
18129 Remember instantiation context in deferred instantiations.
18130 * cp-tree.h (struct tinst_level): Remove.
18131 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18132 * pt.c (current_tinst_level): Now a tree.
18133 (print_template_context, push_tinst_level, pop_tinst_level,
18134 tinst_for_decl): Adjust.
18135 (reopen_tinst_level): New fn.
18136 (init_pt): Register current_tinst_level as a root.
18137 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18138 of the pending templates list.
18139 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
18140 * lex.c (extract_interface_info): Adjust.
18141 * decl2.c (warn_if_unknown_interface): Adjust.
18142
18143 2000-06-05 Mark Mitchell <mark@codesourcery.com>
18144
18145 * class.c (indirect_primary_base_p): New function.
18146 (determine_primary_base): Use it.
18147
18148 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
18149
18150 Update new-abi dynamic cast algorithm.
18151 * tinfo.cc (__class_type_info::__dyncast_result): Add
18152 whole_details. Adjust constructor.
18153 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18154 Avoid unnecessary searching.
18155 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18156
18157 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18158
18159 * decl.c (init_decl_processing): Don't call record_component_aliases.
18160 * tree.c (build_cplus_array_type_1): Likewise.
18161
18162 2000-06-04 Mark Mitchell <mark@codesourcery.com>
18163
18164 * ir.texi: Correct typo.
18165 * mangle.c (write_expression): Handle non-type template arguments
18166 with reference type.
18167 * method.c (build_overload_value): Likewise.
18168 * pt.c (convert_nontype_argument): Explicitly represent conversion
18169 to a reference with an ADDR_EXPR.
18170 (unify): Always unify arguments in left-to-right order.
18171
18172 2000-06-03 Alex Samuel <samuel@codesourcery.com>
18173 Mark Mitchell <mark@codesourcery.com>
18174
18175 * Make-lang.in (CXX_SRCS): Add mangle.c.
18176 * Makefile.in (CXX_OBJS): Add mangle.o.
18177 (mangle.o): New rule.
18178
18179 * class.c (local_classes): New variable.
18180 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18181 (get_vtt_name): Use mangle_vtt_name for new ABI.
18182 (init_class_processing): Initialize local_classes.
18183 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18184 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18185 (std_identifier): New macro.
18186 (DECL_VOLATILE_MEMFUNC_P): New macro.
18187 (DECL_NAMESPACE_STD_P): Likewise.
18188 (local_classes): Declare.
18189 (get_mostly_instantiated_function_type): Declare.
18190 (init_mangle): Declare.
18191 (mangle_decl): Likewise.
18192 (mangle_type_string): Likewise.
18193 (mangle_type): Likewise.
18194 (mangle_typeinfo_for_type): Likewise.
18195 (mangle_typeinfo_string_for_type): Likewise.
18196 (mangle_vtbl_for_type): Likewise.
18197 (mangle_vtt_for_type): Likewise.
18198 (mangle_ctor_vtbl_for_type): Likewise.
18199 (mangle_thunk): Likewise.
18200 (mangle_conv_op_name_for_type): Likewise.
18201 (mangle_guard_variable): Likewise.
18202 * decl.c (pushtag): Keep track of local classes.
18203 (initialize_predefined_identifiers): Initialize std_identifier.
18204 (init_decl_processing): Use std_identifier.
18205 (start_decl): Don't treat instantiations as specializations.
18206 (grokdeclarator): Likewise.
18207 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
18208 name for fully-instantiated templates.
18209 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18210 destructors with the new ABI.
18211 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18212 (grokfield): Use mangle_type for new ABI.
18213 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18214 (get_sentry): Use mangle_guard_variable for new ABI.
18215 (start_static_initialization_or_destruction): Likewise.
18216 * expr.c (extract_aggr_init): Remove.
18217 (extract_scalar_init): Likewise.
18218 (extract_init): Remove #if 0'd code.
18219 * mangle.c: New function.
18220 * method.c (build_mangled_name): Assert not flag_new_abi.
18221 (build_static_name): Likewise.
18222 (build_decl_overload_real): Likewise.
18223 (build_typename_overload): Likewise.
18224 (build_overload_with_type): Likewise.
18225 (build_overload_name): Likewise.
18226 (get_ctor_vtbl_name): Likewise.
18227 (start_squangling): Likewise.
18228 (get_id_2): Likewise.
18229 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18230 (init_method): Call init_mangle for new ABI.
18231 (make_thunk): Call mangle_thunk for new ABI.
18232 * operators.def: Correct new ABI manglings for the `%' operator.
18233 Add `::' operator.
18234 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18235 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18236 (lookup_template_class): Call mangle_decl for new ABI.
18237 (get_mostly_instantiated_function_type): New function.
18238 (set_mangled_name_for_template_decl): Use it.
18239 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18240 the new ABI. Use mangle_conv_op_name_for_type for instantiated
18241 conversion op names.
18242 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18243 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18244 (tinfo_base_init): Likewise. Mangle typeinfo string name with
18245 mangle_typeinfo_string_for_type.
18246
18247 2000-06-03 Mark Mitchell <mark@codesourcery.com>
18248
18249 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18250 (INNERMOST_TEMPLATE_ARGS): New macro.
18251 (innermost_args): Remove.
18252 (get_innermost_template_args): New function.
18253 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18254 * error.c (dump_function_decl): Be caution when using
18255 most_general_template.
18256 * method.c (build_template_parm_names): Use
18257 INNERMOST_TEMPLATE_ARGS.
18258 * pt.c (add_to_template_args): Tidy comment
18259 (get_innermost_template_args): New function.
18260 (check_explicit_specialization): Clear DECL_INITIAL for a new
18261 specialization.
18262 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18263 Tidy.
18264 (push_template_decl): Always register specializations of the most
18265 general template.
18266 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18267 (coerce_template_parms): Likewise.
18268 (lookup_template_class): Likewise.
18269 (innermost_args): Remove.
18270 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18271 (tsubst_decl): Handle tricky specializations. Use
18272 get_innermost_template_args.
18273 (instantiate_template): Simplify handling of partial
18274 instantiations.
18275 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18276 (most_general_template): Reimplement, in a more straightforward
18277 manner.
18278 (regenerate_decl_from_template): Tweak formatting. Use
18279 TMPL_ARGS_DEPTH for clarity.
18280 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18281
18282 * dump.c (dequeue_and_dump): Dump information about thunks.
18283
18284 2000-06-01 Richard Henderson <rth@cygnus.com>
18285
18286 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18287
18288 2000-06-01 Richard Henderson <rth@cygnus.com>
18289
18290 * decl2.c (unsupported_options): Fix typo, make const.
18291 (lang_decode_option): Fix bsearch argument order.
18292
18293 2000-06-01 Mark Mitchell <mark@codesourcery.com>
18294
18295 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18296 on FIELD_DECLs.
18297
18298 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18299
18300 * cp-tree.h (c_get_alias_set): Deleted.
18301 * Makefile.in (decl.o): Include ../expr.h.
18302 * decl.c (expr.h): Include.
18303 (init_decl_processing): Call record_component_aliases for arrays.
18304 (grokdeclarator): Likewise.
18305 Set TREE_ADDRESSABLE for fields that aren't bitfields.
18306 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18307
18308 2000-05-31 Mark Mitchell <mark@codesourcery.com>
18309
18310 Remove guiding declaration support.
18311 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18312 (flag_guiding_decls): Remove.
18313 * call.c (build_user_type_conversion_1): Remove support for
18314 guiding decls.
18315 (build_new_function_call): Likewise.
18316 (build_new_op): Likewise.
18317 (build_new_method_call): Likewise.
18318 * decl.c (start_function): Likewise.
18319 * friend.c (is_friend): Likewise.
18320 (do_friend): Likewise.
18321 * decl2.c ((flag_dump_translation_unit): Make it const.
18322 (flag_guiding_decls): Remove.
18323 (unsupported_options): New variable
18324 (compare_options): New function.
18325 (lang_decode_option): Use them.
18326
18327 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18328
18329 * method.c (mangle_expression): Adjust test for legal expression
18330 operators.
18331
18332 * pt.c (instantiate_decl): Save and restore the local
18333 specializations list.
18334
18335 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
18336
18337 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18338
18339 2000-05-30 Mark Mitchell <mark@codesourcery.com>
18340
18341 * call.c (add_template_candidate_real): Handle member template
18342 constructors for classes with virtual bases.
18343 (build_user_type_conversion_1): Use in_charge_arg_for_name.
18344 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18345
18346 * ir.texi: Update thunk documentation.
18347
18348 * call.c (joust): Fix handling of overloaded builtin operators.
18349
18350 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
18351
18352 * cp-tree.h (DECL_ANTICIPATED): New macro.
18353 Document new use of DECL_LANG_FLAG_7.
18354 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18355 in the user namespace.
18356 * lex.c (do_identifier): If the identifier's declaration has
18357 DECL_ANTICIPATED on, it has not yet been declared. But do not
18358 replace it with an ordinary implicit declaration.
18359
18360 * tinfo2.cc: Include stdlib.h.
18361
18362 2000-05-29 Mark Mitchell <mark@codesourcery.com>
18363
18364 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18365 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18366 CLASSTYPE_ALIGN.
18367
18368 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
18369
18370 * decl2.c (lang_decode_option): Use skip_leading_substring instead
18371 of plain strncmp.
18372
18373 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
18374
18375 * operators.def (<?): Duplicated, should have been...
18376 (>?): this. Fixed.
18377
18378 2000-05-27 Alex Samuel <samuel@codesourcery.com>
18379 Mark Mitchell <mark@codesourcery.com>
18380
18381 * cp-tree.h (ansi_opname): Make it a macro.
18382 (ansi_assopname): Likewise.
18383 (struct lang_decl_flags): Add assignment_operator_p.
18384 (struct lang_decl): Add operator_code.
18385 (DECL_VTT_PARM): Adjust.
18386 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18387 overloaded operator.
18388 (SET_OVERLOADED_OPERATOR_CODE): New macro.
18389 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18390 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18391 (opname_tab): Remove.
18392 (assignop_tab): Likewise.
18393 (operator_name_info_t): New type.
18394 (operator_name_info): New variable.
18395 (assignment_operator_name_info): Likewise.
18396 (build_cp_library_fn): Remove declaration.
18397 (push_cp_library_fn): Likewise.
18398 (operator_name_string): Likewise.
18399 (build_decl_overload): Likewise.
18400 * call.c (print_z_candidates): Simplify.
18401 (build_object_call): Adjust usage of ansi_opname. Use
18402 DECL_OVERLOADED_OPERATOR_P.
18403 (op_error): Adjust operator name lookup.
18404 (build_conditional_expr): Adjust usage of ansi_opname.
18405 (build_new_op): Likewise.
18406 (build_op_delete_call): Likewise.
18407 (build_over_call): Likewise.
18408 (joust): Use DECL_OVERLOADED_OPERATOR_P.
18409 * decl.c (duplicate_decls): Copy operator_code.
18410 (init_decl_processing): Adjust parameters to push_cp_library_fn.
18411 (builtin_function): Adjust parameters to build_library_fn_1.
18412 (build_library_fn_1): Accept an overloaded operator code.
18413 (build_library_fn): Pass ERROR_MARK.
18414 (build_cp_library_fn): Accept an overloaded operator code.
18415 (push_cp_library_fn): Likewise.
18416 (grokfndecl): Tweak.
18417 (grokdeclarator): Simplify code to compute names of overloaded
18418 operators. Adjust use of ansi_opname.
18419 (ambi_op_p): Work on tree_codes, not identifiers.
18420 (unary_op_p): Likewise.
18421 (grok_op_properties): Likewise.
18422 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18423 (lang_mark_tree): Don't try to mark the operator_code.
18424 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18425 * error.c (dump_decl): Remove special handling for operator
18426 names.
18427 (dump_function_name): Likewise.
18428 (dump_expr): Adjust name lookup of operators.
18429 (op_to_string): Simplify.
18430 (assop_to_string): Likewise.
18431 * init.c (build_new_1): Adjust use of ansi_opname.
18432 * lex.c (opname_tab): Remove.
18433 (assignop_tab): Likewise.
18434 (ansi_opname): Likewise.
18435 (ansi_assopname): Likewise.
18436 (operator_name_string): Likewise.
18437 (reinit_lang_specific): Likewise.
18438 (operator_name_info): New variable.
18439 (assignment_operator_name_info): Likewise.
18440 (init_operators): New function.
18441 (init_parse): Use it.
18442 (do_identifier): Adjust use of ansi_opname.
18443 * method.c (mangle_expression): Don't use ansi_opname for
18444 mangling.
18445 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18446 (build_decl_overload): Remove.
18447 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18448 (do_build_assign_ref): Adjust use of ansi_opname.
18449 (synthesize_method): Likewise.
18450 (implicitly_declare_fn): Likewise.
18451 * operators.def: New file.
18452 * parse.y (operator): Adjust use of ansi_opname.
18453 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18454 (set_mangled_name_for_template_decl): Don't play games with
18455 current_namespace.
18456 (special_function_p): Adjust use of ansi_opname.
18457 * typeck.c (check_return_expr): Likewise.
18458 * Make-lang.in (cc1plus): Depend on operators.def.
18459 * Makefile.in (lex.o): Likewise.
18460 (decl.o): Likewise.
18461
18462 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
18463
18464 * Make-lang.in (cplib2.ready): Eradicate.
18465
18466 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18467
18468 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18469 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18470 (built_min, cp_tree_equal): Likewise.
18471
18472 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18473
18474 * class.c (layout_nonempty_base_or_field): Replace
18475 `record_layout_info' with `record_layout_info_s'.
18476
18477 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
18478
18479 Fix goto checking.
18480 * cp-tree.h (struct language_function): x_named_labels is now
18481 a struct named_label_list*.
18482 * decl.c (struct named_label_use_list): Renamed from...
18483 (struct named_label_list): ...this. New struct.
18484 (push_binding_level): Don't set eh_region.
18485 (note_level_for_eh): New fn.
18486 (pop_label): Take label and old value directly.
18487 (pop_labels): Adjust for new named_labels format.
18488 (lookup_label): Likewise.
18489 (poplevel): Note characteristics of a binding level containing a
18490 named label. Mess with named label lists earlier.
18491 (mark_named_label_lists): New fn.
18492 (mark_lang_function): Call it.
18493 (use_label): New fn, split out from...
18494 (make_label_decl): ...here. Don't call it.
18495 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18496 check_previous_gotos): New fns, split out from...
18497 (define_label): ...here.
18498 (check_switch_goto): New fn.
18499 (define_case_label): Call it.
18500 (check_goto): New fn.
18501 * semantics.c (finish_goto_stmt): Call it and use_label.
18502 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18503 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18504
18505 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18506
18507 * class.c (build_vtable_entry_ref): Correct usage of
18508 get_vtbl_decl_for_binfo.
18509
18510 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18511 * method.c (implicitly_declare_fn): Not here.
18512
18513 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
18514
18515 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18516 (CPTI_PTMD_DESC_TYPE): ... here.
18517 (ptmd_desc_type_node): Rename to ...
18518 (ptm_desc_type_node): ... here.
18519 * decl.c: Likewise.
18520 * rtti.c (ptmd_initializer): Rename to ...
18521 (ptm_initializer): ... here.
18522 (sythesize_tinfo_var): Adjust. Deal with pointer to member
18523 function.
18524 (create_tinfo_types): Adjust.
18525
18526 2000-05-25 Mark Mitchell <mark@codesourcery.com>
18527
18528 Finish implementation of VTTs.
18529 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18530 CPTI_VTT_PARM_IDENTIFIER.
18531 (vtt_parm_identifier): New macro.
18532 (vtt_parm_type): Likewise.
18533 (BINFO_SUBVTT_INDEX): Likewise.
18534 (BINFO_VPTR_INDEX): Likewise.
18535 (struct lang_decl): Add vtt_parm.
18536 (DECL_VTT_PARM): New macro.
18537 (DECL_USE_VTT_PARM): Likewise.
18538 (DECL_NEEDS_VTT_PARM_P): Likewise.
18539 (get_vtt_name): Declare.
18540 (build_artificial_parm): Likewise.
18541 (fixup_all_virtual_upcast_offsets): Likewise.
18542 (expand_indirect_vtbls_init): Remove.
18543 * call.c (build_new_method_call): Pass the vtt to subobject
18544 constructors and destructors.
18545 * class.c (get_vtt_name): Give it external linkage.
18546 (build_clone): Handle the magic VTT parameters for clones.
18547 (clone_function_decl): Fix typo in comment.
18548 (build_vtt): Keep track of the indices in the VTTs where various
18549 entities are stored.
18550 (build_vtt_inits): Likewise.
18551 (dfs_build_vtt_inits): Likewise.
18552 (build_ctor_vtbl_group): Tweak type of construction vtables.
18553 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18554 primary bases, when building construction vtables.
18555 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18556 (initialize_predefined_identifiers): Add vtt_parm_identifier.
18557 (init_decl_processing): Initialize vtt_parm_type.
18558 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18559 (lang_mark_tree): Make vtt_parm.
18560 * decl2.c (build_artificial_parm): New function.
18561 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
18562 (grokclassfn): Use build_artificial_parm.
18563 * init.c (initialize_vtbl_ptrs): Call
18564 fixup_all_virtual_upcast_offsets directly.
18565 (perform_member_init): Use the complete subobject destructor for
18566 member cleanups.
18567 (build_vtbl_address): New function.
18568 (expand_virtual_init): Handle VTTs.
18569 * optimize (maybe_clone_body): Likewise.
18570 * search.c (fixup_all_virtual_upcast_offsets): Give it external
18571 linkage.
18572 (expand_indirect_vtbls_init): Remove.
18573 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18574 * tree.c (make_binfo): Make them bigger.
18575
18576 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18577
18578 * inc/cxxabi.h (__pbase_type_info): Define, based on
18579 __pointer_type_info.
18580 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18581 (__pointer_to_member_type_info): Likewise.
18582 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18583 (__pointer_to_member_type_info::__is_pointer_p): Remove.
18584 (__pointer_type_info::__do_catch): Rename to ...
18585 (__pbase_type_info::__do_catch): ... here. Adjust.
18586 (__pbase_type_info::__pointer_catch): Implement.
18587 (__pointer_type_info::__pointer_catch): Adjust.
18588 (__pointer_to_member_type_info::__pointer_catch): Adjust.
18589
18590 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18591
18592 * tinfo.h (__user_type_info::contained_virtual_p): New
18593 predicate.
18594 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18595 shaped hierarchy.
18596 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18597 diamond shaped hierarchy. Add early out for mixed diamond and
18598 duplicate shaped hierarchy.
18599
18600 2000-05-24 Mark Mitchell <mark@codesourcery.com>
18601
18602 * cp-tree.h (build_delete): Change prototype.
18603 (build_vec_delete): Likewise.
18604 * call.c (build_scoped_method_call): Use special_function_kind
18605 values to indicate the kind of destruction to be done.
18606 (build_method_call): Likewise.
18607 * decl.c (finish_destructor_body): Likewise.
18608 (maybe_build_cleanup_1): Likewise. Rename to ...
18609 (maybe_build_cleanup): ... this.
18610 * decl2.c (delete_sanity): Use special_function_kind
18611 values to indicate the kind of destruction to be done.
18612 (build_cleanup): Likewise.
18613 * init.c (perform_member_init): Likewise.
18614 (build_vec_delete_1): Likewise.
18615 (build_dtor_call): Simplify.
18616 (build_delete): Use special_function_kind
18617 values to indicate the kind of destruction to be done.
18618 (build_vbase_delete): Likewise.
18619 (build_vec_delete): Likewise.
18620
18621 * init.c (sort_member_init): Fix typo in error message generation
18622 code.
18623
18624 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
18625
18626 * semantics.c (begin_class_definition): make the packed
18627 attribute be sensitive to the "-fpack-struct" command line flag
18628
18629 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
18630
18631 Update new-abi upcast algorithm.
18632 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18633 prototype and meaning of return value.
18634 (__si_class_type_info::__do_upcast): Likewise.
18635 (__vmi_class_type_info::__do_upcast): Likewise.
18636 * tinfo.cc (__class_type_info::__upcast_result): Replace
18637 whole2dst with part2dst. Adjust ctor.
18638 (__class_type_info::__do_upcast): Adjust call of worker function.
18639 (__class_type_info::__do_upcast): Adjust.
18640 (__si_class_type_info::__do_upcast): Adjust. Use parent's
18641 __do_upcast.
18642 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18643 virtual base in diamond hierarchy bug.
18644
18645 2000-05-23 Mark Mitchell <mark@codesourcery.com>
18646
18647 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18648 and bitfield to tinfo_fn_p.
18649 (DECL_TINFO_FN_P): Adjust.
18650 (SET_DECL_TINFO_FN_P): Likewise.
18651 (DECL_MUTABLE_P): Likewise.
18652 (DECL_C_BIT_FIELD): Likewise.
18653 (SET_DECL_C_BIT_FIELD): Likewise.
18654 (CLEAR_DECL_C_BIT_FIELD): Likewise.
18655 (DECL_UNINLINABLE): Likewise.
18656 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18657 (handle_using_decl): Remove assertion.
18658 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18659 to build FIELD_DECLs.
18660 (build_base_field): Likewise.
18661 (layout_class_type): Likewise.
18662 * decl.c (init_decl_processing): Likewise.
18663 (build_ptrmemfunc_type): Likewise.
18664 (grokdeclarator): Likewise.
18665 * decl2.c (grok_x_components): Likewise.
18666 * except.c (call_eh_info): Likewise.
18667 * init.c (init_init_processing): Likewise.
18668 * rtti.c (expand_class_desc): Likewise.
18669 (create_pseudo_type_info): Likewise.
18670 (get_vmi_pseudo_type_info): Likewise.
18671 (create_tinfo_types): Likewise.
18672 * ptree.c (print_lang_decl): Adjust.
18673 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18674 before checking DECL_MUTABLE_P.
18675
18676 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18677 parameters for template functions.
18678 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18679 destructors as well as constructors.
18680
18681 2000-05-22 Mark Mitchell <mark@codesourcery.com>
18682
18683 * class.c (build_ctor_vtbl_group): Set inits.
18684 * optimize.c (maybe_clone_body): Set DECL_INLINE and
18685 DECL_THIS_INLINE appropriately for clones.
18686
18687 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18688 (DECL_CONV_FN_P): Simplify.
18689 (DECL_OPERATOR): Remove.
18690 (language_to_string): Declare.
18691 * decl.c (duplicate_decls): Fix typo in comment.
18692 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18693 (grok_op_properties): Use DECL_CONV_FN_P instead of
18694 IDENTIFIER_TYPENAME_P.
18695 * dump.c (dequeue_and_dump): Dump the language linkage of
18696 declarations.
18697 * error.c (language_to_string): Give it external linkage.
18698 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18699 (implicitly_declare_fn): Set DECL_LANGUAGE.
18700 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18701 IDENTIFIER_TYPENAME_P.
18702 (tsubst_decl): Likewise.
18703 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18704 * semantics.c (finish_member_declaration): Don't mark members of
18705 classes declared in an extern "C" region as extern "C".
18706
18707 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18708
18709 * decl2.c (qualified_lookup_using_namespace): Look through
18710 namespace aliases.
18711
18712 * decl.c (push_using_decl): Return the old decl on namespace level.
18713
18714 2000-05-21 Mark Mitchell <mark@codesourcery.com>
18715
18716 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18717 (VTT_NAME_PREFIX): New macro.
18718 (CTOR_VTBL_NAME_PREFIX): Likewise.
18719 (get_ctor_vtbl_name): New function.
18720 * class.c (get_vtable_name): Simplify.
18721 (get_vtt_name): New function.
18722 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18723 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18724 when a virtual base becomes primary.
18725 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
18726 VTTs.
18727 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18728 additional parameters.
18729 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18730 (initialize_array): New function.
18731 (build_vtt): Likewise.
18732 (build_vtt_inits): Likewise.
18733 (dfs_build_vtt_inits): Likewise.
18734 (dfs_fixup_binfo_vtbls): Likewise.
18735 (build_ctor_vtbl_group): Likewise.
18736 (initialize_vtable): Use initialize_array.
18737 (accumulate_vtbl_inits): Reimplement to handle construction
18738 vtables.
18739 (dfs_accumulate_vtbl_inits): Likewise.
18740 (bulid_vtbl_initializer): Adjust parameter name.
18741 * method.c (build_typename_overload): Remove #if 0'd code.
18742 (get_ctor_vtbl_name): New function.
18743 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18744 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18745
18746 * cp-tree.h (struct lang_type): Remove search_slot.
18747 (CLASSTYPE_SEARCH_SLOT): Remove.
18748 (emit_base_init): Change prototype.
18749 (initialize_vtbl_ptrs): Likewise.
18750 (expand_indirect_vtbls_init): Likewise.
18751 (clear_search_slots): Remove.
18752 * decl.c (lang_mark_tree): Don't mark search_slot.
18753 * init.c (initialize_vtbl_ptrs): Simplify.
18754 (emit_base_init): Likewise.
18755 * search.c (struct vbase_info): Document decl_ptr.
18756 (convert_pointer_to_single_level): Remove.
18757 (dfs_find_vbases): Remove.
18758 (dfs_init_base_pointers): Simplify.
18759 (dfs_clear_vbase_slots): Remove.
18760 (dfs_vtable_path_unmark): New function.
18761 (init_vbase_pointers): Simplify.
18762 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18763 (expand_indirect_vtbls_init): Simplify. Don't call
18764 mark_all_temps_used.
18765 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18766 initialize_vtbl_ptrs.
18767
18768 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
18769
18770 * except.c: Add static prototypes.
18771
18772 2000-05-20 H.J. Lu <hjl@gnu.org>
18773
18774 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18775
18776 2000-05-19 Mark Mitchell <mark@codesourcery.com>
18777
18778 Don't create a separate copy of virtual bases for the
18779 CLASSTYPE_VBASECLASSES list.
18780 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18781 (BINFO_FOR_VBASE): Remove.
18782 (CANONICAL_BINFO): Adjust.
18783 (binfo_for_vbase): New function.
18784 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18785 instead of BINFO_FOR_VBASE.
18786 (build_vbase_pointer): Likewise.
18787 (build_secondary_vtable): Likewise.
18788 (dfs_mark_primary_bases): Likewise.
18789 (mark_primary_bases): Likewise.
18790 (layout_nonempty_base_or_field): Likewise.
18791 (dfs_set_offset_for_shared_vbases): Likewise.
18792 (dfs_set_offset_for_unshared_vbases): Likewise.
18793 (layout_virtual_bases): Likewise. Adjust for changes to the
18794 CLASSTYPE_VBASECLASSES list.
18795 (dump_class_hierarchy_r): Use binfo_for_vbase
18796 instead of BINFO_FOR_VBASE.
18797 (dump_class_hierarchy): Likewise.
18798 (finish_vtbls): Likewise.
18799 (build_vtbl_initializer): Adjust for changes to the
18800 CLASSTYPE_VBASECLASSES list.
18801 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18802 * decl.c (finish_destructor_body): Adjust for changes to the
18803 CLASSTYPE_VBASECLASSES list.
18804 * init.c (sort_base_init): Use binfo_for_vbase.
18805 (construct_virtual_bases): Adjust for changes to the
18806 CLASSTYPE_VBASECLASSES list.
18807 (expand_member_init): Use binfo_for_vbase.
18808 (build_vbase_delete): Adjust for changes to the
18809 CLASSTYPE_VBASECLASSES list.
18810 * method.c (do_build_copy_constructor): Likewise.
18811 * rtti.c (get_base_offset): Use binfo_for_vbase.
18812 (expand_class_desc): Remove #if 0'd code.
18813 * search.c (struct vbase_info): Remove vbase_types.
18814 (get_base_distance): Use binfo_for_vbase.
18815 (lookup_field_queue_p): Use CANONICAL_BINFO.
18816 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18817 (get_pure_virtuals): Adjust for changes to the
18818 CLASSTYPE_VBASECLASSES list.
18819 (dfs_find_vbases): Use binfo_for_vbase.
18820 (dfs_init_vbase_pointers): Likewise.
18821 (init_vbase_pointers): Don't initialize vi.vbase_types.
18822 (virtual_context): Use binfo_for_vbase.
18823 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18824 CLASSTYPE_VBASECLASSES list.
18825 (expand_indirect_vtbls_init): Simplify.
18826 (dfs_get_vbase_types): Don't replicate virtual bases.
18827 (find_vbase_instance): Use binfo_for_vbase.
18828 (binfo_for_vbase): New function.
18829 * typeck.c (get_delta_difference): Use binfo_for_vbase.
18830
18831 2000-05-17 Mark Mitchell <mark@codesourcery.com>
18832
18833 * decl2.c (finish_anon_union): Generalize error messages to handle
18834 anonymous structures.
18835 * init.c (perform_member_init): Remove `name' parameter.
18836 (build_field_list): New function.
18837 (sort_member_init): Handle anonymous union initialization order
18838 correctly. Check for multiple initializations of the same union.
18839 (emit_base_init): Don't look up fields by name here.
18840 (expand_member_init): Record the result of name lookup for future
18841 reference.
18842 * typeck.c (build_component_ref): Fix formatting.
18843
18844 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
18845
18846 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18847 * typeck.c (build_x_compound_expr): Replace warn_unused with
18848 warn_unused_value.
18849
18850 * decl2.c (lang_decode_option): Update -Wall unused flags by
18851 calling set_Wunused.
18852
18853 2000-05-16 Mark Mitchell <mark@codesourcery.com>
18854
18855 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18856 * init.c (dfs_vtable_path_unmark): Remove.
18857 * search.c (marked_new_vtable_p): Likewise.
18858 (unmarked_new_vtable_p): Likewise.
18859 (dfs_search_slot_nonempty_p): Likewise.
18860 (dfs_mark): Likewise.
18861 (dfs_vtable_path_unmark): Likewise.
18862 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18863 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18864 (dfs_init_vbase_pointers): Remove special-case new ABI code.
18865 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18866 (init_vbase_pointers): Simplify.
18867 (expand_indirect_vtbls_init): Likewise.
18868
18869 * class.c (copy_virtuals): New function.
18870 (build_primary_table): Use it.
18871 (build_secondary_vtable): Likewise.
18872 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18873 indicate that no vcall offset is required.
18874 (add_virtual_function): Likewise.
18875 (modify_all_vtables): Likewise.
18876 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18877 (dfs_accumulate_vtbl_inits): Likewise.
18878 (build_vtbl_initializer): Make changes to handle construction
18879 vtables.
18880 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18881 (build_rtti_vtbl_entries): Likewise.
18882 (build_vtable_entries): Handle a NULL vcall_index.
18883
18884 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
18885
18886 * decl2.c (lang_decode_option): Fix thinko.
18887
18888 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
18889
18890 * except.c (check_handlers): New fn.
18891 * cp-tree.h: Declare it.
18892 * semantics.c (finish_handler_sequence): Call it.
18893 (finish_function_handler_sequence): Likewise.
18894 (finish_handler_parms): Set TREE_TYPE on the handler.
18895 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18896 * search.c (get_base_distance_recursive): If protect>1, ignore
18897 special access.
18898 (get_base_distance): Don't reduce watch_access.
18899
18900 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
18901
18902 * lex.c: #include diagnostic.h.
18903 (lang_init_options): Set default prefixing rules.
18904
18905 * lang-options.h: Add -fdiagnostics-show-location=.
18906
18907 * decl2.c: #include diagnostic.h.
18908 (lang_decode_option): Handle -fdiagnostics-show-location=.
18909
18910 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
18911
18912 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18913 * vec.cc: Revert my 2000-05-07 change.
18914
18915 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
18916
18917 * class.c (check_field_decls): Complain about non-static data
18918 members with same name as class in class with constructor.
18919
18920 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
18921
18922 * decl.c (grokdeclarator): Allow non-static data members with
18923 same name as class.
18924
18925 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
18926
18927 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18928 and pending_inline.filename. Update prototypes.
18929 * decl.c (define_label): Constify filename parameter.
18930 * decl2.c (warn_if_unknown_interface): Constify local char *.
18931 * input.c Constify input_source.filename. Don't declare
18932 input_filename or lineno. Constify filename parameter to feed_input.
18933 * lex.c (init_parse): Constify parameter and return value.
18934 (cp_pragma_interface, cp_pragma_implementation): Constify
18935 filename argument.
18936 (reinit_parse_for_method, reinit_parse_for_block,
18937 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18938 Constify local char *.
18939 * pt.c: Don't declare lineno or input_filename.
18940 (print_template_context, tsubst_friend_function, tsubst_decl,
18941 tsubst, instantiate_decl): Constify local char *.
18942 * semantics.c (expand_body): Constify local char *.
18943 * tree.c (build_srcloc): Constify filename parameter.
18944 * typeck.c (c_expand_asm_operands): Constify filename
18945 parameter.
18946
18947 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
18948
18949 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18950 offsetof expansion.
18951
18952 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
18953
18954 * inc/cxxabi.h: Fix typos in comment.
18955 (__base_class_info::__offset): Use a static_cast.
18956
18957 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
18958
18959 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18960 of std::size_t and std::ptrdiff_t respectively.
18961 * tinfo.cc: Likewise.
18962 * vec.cc: Likewise.
18963
18964 2000-05-06 Richard Henderson <rth@cygnus.com>
18965
18966 * typeck.c (build_c_cast): Don't warn integer->pointer size
18967 mismatch for constants.
18968
18969 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
18970
18971 * rtti.c (ptmd_initializer): Set non-public, if class is
18972 incomplete.
18973
18974 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18975 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18976 __cxa_vec_delete): Likewise.
18977 * tinfo.cc (__dynamic_cast): Likewise.
18978 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18979 __cxa_vec_delete): Likewise.
18980
18981 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18982
18983 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18984 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18985 (lang_decl_flags): Add vcall_offset.
18986 (THUNK_VCALL_OFFSET): Use it.
18987 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18988 * method.c (make_thunk): Create the lang_decl here, not in
18989 emit_thunk.
18990 (emit_thunk): Make generic thunks into ordinary functions once
18991 they have been fed to expand_body.
18992 * semantics.c (expand_body): Set current_function_is_thunk here.
18993
18994 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18995
18996 * class.c (update_vtable_entry_for_fn): Prototype.
18997
18998 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18999 and `tmpl'.
19000
19001 * search.c (dfs_build_inheritance_graph_order): Prototype.
19002
19003 2000-05-04 Mark Mitchell <mark@codesourcery.com>
19004
19005 * cp-tree.h (special_function_kind): Add various kinds of
19006 destructors.
19007 (special_function_p): New function.
19008 * class.c (overrides): Don't let one kind of destructor override
19009 another.
19010 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
19011 whether or not to instantiate a template.
19012 * tree.c (special_function_p): Define.
19013
19014 2000-05-03 Mark Mitchell <mark@codesourcery.com>
19015
19016 * cp-tree.def (THUNK_DECL): Remove.
19017 * cp-tree.h (DECL_THUNK_P): New macro.
19018 (DECL_NON_THUNK_FUNCTION_P): Likewise.
19019 (DECL_EXTERN_C_FUNCTION_P): Likewise.
19020 (SET_DECL_THUNK_P): Likewise.
19021 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
19022 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
19023 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
19024 * decl.c (decls_match): Use DECL_EXTERN_C_P.
19025 (duplicate_decls): Likewise.
19026 (pushdecl): Likewise. Adjust thunk handling.
19027 (grokfndecl): Use DECL_EXTERN_C_P.
19028 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
19029 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
19030 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
19031 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
19032 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
19033 DECL_NO_STATIC_CHAIN.
19034 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
19035 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
19036 * search.c (covariant_return_p): Remove THUNK_DECL handling.
19037 * ir.texi: Update.
19038
19039 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19040
19041 * tree.c (walk_tree): Set lineno.
19042
19043 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19044
19045 * exception.cc: Update license notice.
19046 * new.cc: Likewise.
19047 * new1.cc: Likewise.
19048 * new2.cc: Likewise.
19049 * tinfo.cc: Likewise.
19050 * tinfo2.cc: Likewise.
19051 * vec.cc: Likewise.
19052 * inc/cxxabi.h: Likewise.
19053 * inc/exception: Likewise.
19054 * inc/new: Likewise.
19055 * inc/new.h: Likewise.
19056 * inc/typeinfo: Likewise.
19057
19058 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19059
19060 * tree.c (build_target_expr_with_type): If we already have a
19061 TARGET_EXPR, just return it.
19062
19063 * optimize.c (initialize_inlined_parameters): Don't generate an
19064 EXPR_STMT if we can just use DECL_INITIAL.
19065 * decl.c (emit_local_var): Only make the initialization a
19066 full-expression if stmts_are_full_exprs_p.
19067
19068 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19069
19070 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
19071 macro.
19072 * call.c (standard_conversion): Use it.
19073 (direct_reference_binding): Likewise.
19074 (build_over_call): Likewise.
19075 (is_properly_derived_from): Likewise.
19076 (compare_ics): Likewise.
19077 * class.c (resolves_to_fixed_type_p): Likewise.
19078 * optimize.c (declare_return_variable): Likewise.
19079 * pt.c (is_specialization_of): Likewise.
19080 (unify): Likewise.
19081 * typeck.c (comp_target_parms): Likeiwse.
19082 (build_static_cast): Likewise.
19083 (build_reinterpret_cast): Likewise.
19084 (build_const_cast): Likewise.
19085 (comp_ptr_ttypes_real): Likewise.
19086 (comp_ptr_ttypes_const): Likewise.
19087 * typeck2.c (process_init_constructor): Likewise.
19088
19089 2000-04-30 Scott Snyder <snyder@fnal.gov>
19090
19091 * decl.c (finish_destructor_body): Use the base destructor when
19092 destroying virtual bases.
19093
19094 2000-04-30 Mark Mitchell <mark@codesourcery.com>
19095
19096 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
19097 STMT_EXPRs.
19098 * optimize.c (struct inline_data): Add target_exprs field.
19099 (declare_return_variable): When a function returns an aggregate,
19100 use the variable declared in the TARGET_EXPR as the remapped
19101 DECL_RESULT.
19102 (expand_call_inline): Update the pending target_exprs stack.
19103 (optimize_function): Initialize the stack.
19104
19105 * decl2.c (finish_file): Fix typo in comment.
19106
19107 * method.c (emit_thunk): Don't try to return a `void' value.
19108
19109 * optimize.c (initialize_inlined_parameters): If the parameter is
19110 addressable, we need to make a new VAR_DECL, even if the
19111 initializer is constant.
19112
19113 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
19114
19115 * decl.c (grok_op_properties): Add an extra check of argtypes.
19116
19117 2000-04-27 Mark Mitchell <mark@codesourcery.com>
19118
19119 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19120 variables.
19121 (initialize_inlined_parameters): Try to avoid creating new
19122 VAR_DECLs.
19123
19124 2000-04-27 Alex Samuel <samuel@codesourcery.com>
19125
19126 * lex.c (my_get_run_time): Remove.
19127 (init_filename_times): Use get_run_time instead of my_get_run_time.
19128 (check_newline): Likewise.
19129 (dump_time_statistics): Likewise.
19130 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19131 of computing elapsed time explicitly.
19132
19133 2000-04-26 Mark Mitchell <mark@codesourcery.com>
19134
19135 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19136 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19137 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19138 before calling decl_constant_value.
19139 * class.c (check_bitfield_decl): Likewise.
19140 * cvt.c (ocp_convert): Likewise.
19141 (convert): Likewise.
19142 * decl.c (compute_array_index_type): Likewise.
19143 (build_enumerator): Likewise.
19144 * decl2.c (check_cp_case_value): Likewise.
19145 * pt.c (convert_nontype_argument): Likewise.
19146 (tsubst): Likewise.
19147 * typeck.c (decay_conversion): Likewise.
19148 (build_compound_expr): Likewise.
19149 (build_reinterpret_cast): Likewise.
19150 (build_c_cast): Likewise.
19151 (convert_for_assignment): Likewise.
19152
19153 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
19154
19155 * decl.c (finish_function): Don't play games with DECL_INLINE.
19156
19157 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
19158
19159 * ir.texi: Correct typo.
19160
19161 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19162
19163 * decl.c (grokdeclarator): Reject VLAs as members.
19164
19165 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
19166
19167 * call.c (standard_conversion): Accept conversion between
19168 COMPLEX_TYPEs.
19169
19170 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19171
19172 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
19173
19174 * decl2.c (finish_file): Remove double setup for accounting
19175 compile time.
19176
19177 2000-04-24 Robert Lipe <robertlipe@usa.net>
19178
19179 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19180
19181 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
19182
19183 * new.cc (set_new_handler): Needs to be in std::.
19184
19185 2000-04-23 Mark Mitchell <mark@codesourcery.com>
19186
19187 * cp-tree.h (lang_decl): Remove pretty_function_p.
19188 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19189 language-specific node.
19190 * decl.c (cp_make_fname_decl): Use build_decl, not
19191 build_lang_decl, to build the variables.
19192 (grokvardecl): Don't call build_lang_decl for local variables in
19193 templates.
19194 (grokdeclarator): Don't call build_lang_decl for local type
19195 declarations in templates.
19196 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19197 zero'd memory, rather than calling memset.
19198 * pt.c: Include hashtab.h.
19199 (local_specializations): New variable.
19200 (retrieve_local_specialization): Use it.
19201 (register_local_specialization): Likewise.
19202 (tsubst_decl): Don't assume local variables have
19203 DECL_LANG_SPECIFIC.
19204 (instantiate_decl): Set up local_specializations.
19205 * Makefile.in (HTAB_H): New variable.
19206
19207 2000-04-23 Richard Henderson <rth@cygnus.com>
19208
19209 * typeck.c (c_expand_asm_operands): Restore the original
19210 contents of the output list.
19211
19212 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
19213
19214 * ir.texi: Document complex number representation.
19215
19216 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
19217
19218 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19219 (target_incomplete_p): New function.
19220 (tinfo_base_init): Create comdat NTBS name variable.
19221 (ptr_initializer): Add non_public parameter. Calculate it.
19222 (ptmd_initializer): Likewise.
19223 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19224 (create_real_tinfo_var): Add non_public parameter. Use it.
19225 Push proxy into global namespace.
19226 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19227 New enumeration.
19228 * inc/typeinfo (type_info::before, type_info::operator==):
19229 Compare __name addresses.
19230
19231 * tinfo2.cc: Remove new-abi builtins comment.
19232
19233 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
19234
19235 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19236
19237 * call.c (joust): Exit early if we get the same function, too.
19238
19239 * decl2.c (key_method): Return NULL_TREE for template classes.
19240 (import_export_class): Don't need to check for template classes.
19241
19242 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
19243
19244 * lex.c: Remove references to cccp.c.
19245
19246 2000-04-18 Mark Mitchell <mark@codesourcery.com>
19247
19248 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19249 volatile_memfunc. Add destructor_attr. Adjust dummy.
19250 (DECL_DESTRUCTOR_P): Use destructor_attr.
19251 (DECL_CONST_MEMFUNC_P): Reimplement.
19252 (DECL_VOLATILE_MEMFUNC_P): Remove.
19253 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19254 (overrides): Use DECL_DESTRUCTOR_P.
19255 (check_for_override): Likewise.
19256 * decl.c (start_function): Likewise.
19257 * decl2.c (grokfclassfn): Likewise.
19258 (check_classfn): Likewise.
19259 (grok_function_init): Likewise.
19260
19261 2000-04-17 Mark Mitchell <mark@codesourcery.com>
19262
19263 * decl2.c (grokfield): Issue error on illegal data member
19264 declaration.
19265
19266 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
19267
19268 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19269
19270 2000-04-16 Mark Mitchell <mark@codesourcery.com>
19271
19272 * class.c (build_vtable_entry): Don't build thunks for type-info
19273 functions.
19274
19275 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
19276
19277 * decl.c (decls_match): Allow a redeclaration of a builtin to
19278 specify args while the builtin did not.
19279
19280 2000-04-15 Mark Mitchell <mark@codesourcery.com>
19281
19282 * cp-tree.def (THUNK_DECL): Add to documentation.
19283 * cp-tree.h (flag_huge_objects): Declare.
19284 * class.c (modify_vtable_entry): Tidy.
19285 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19286 Calculate delta appropriately for the new ABI.
19287 (dfs_modify_vtables): Use it.
19288 (modify_all_vtables): Fix thinko in code to add overriding copies
19289 of functions to primary vtables.
19290 (build_clone): Fix typo in comment.
19291 (clone_function_decl): Correct order of destructors in vtable.
19292 (build_vbase_offset_vtbl_entries): Adjust comment.
19293 (dfs_vcall_offset_queue_p): Remove.
19294 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19295 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19296 (build_vtable_entry): Correct check for pure virtual functions.
19297 Don't declare flag_huge_objects.
19298 * decl.c (flag_huge_objects): Remove declaration.
19299 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19300 Use int_size_in_bytes.
19301 (emit_thunk): Handle vcall offset thunks.
19302
19303 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19304
19305 * decl2.c (parse_time, varconst_time): Delete declarations.
19306 (finish_file): Delete LINENO declaration.
19307 START_TIME and THIS_TIME now long.
19308
19309 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
19310
19311 * class.c (build_base_field): Reformat comment.
19312
19313 * inc/cxxabi.h (stddef.h): Comment inclusion.
19314 (__base_class_info::__offset): Comment shift.
19315
19316 2000-04-12 Mark Mitchell <mark@codesourcery.com>
19317
19318 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19319 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19320 (cp_push_exception_identifier): New macro.
19321 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19322 (DECL_BASE_DESTRUCTOR_P): Likewise.
19323 (DECL_DELETING_DESTRUCTOR_P): Likewise.
19324 (get_vtbl_decl_for_binfo): Fix formatting.
19325 (in_charge_arg_for_name): New macro.
19326 (maybe_build_cleanup_and_delete): Remove declaration.
19327 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19328 (in_charge_arg_for_name): New function.
19329 (build_new_method_call): Use it. Handle cloned destructors.
19330 (build_clone): Don't make the base constructor virtual.
19331 Automatically defer generated functions.
19332 (clone_function_decl): Handle destructors, too.
19333 (clone_constructors_and_destructors): Likewise.
19334 (create_vtable_ptr): Don't create a vtable entry for a cloned
19335 function.
19336 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19337 (initialize_predefined_identifiers): Update appropriately.
19338 (finish_destructor_body): Simplify.
19339 (maybe_build_cleanup_and_delete): Remove.
19340 * except.c (expand_throw): Handle new-ABI destructors.
19341 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19342 (build_dtor_call): New function.
19343 (build_delete): Use it. Simplify.
19344 * optimize.c (maybe_clone_body): Handle destructors.
19345 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19346
19347 * exception.cc (cleanup_fn): New typedef.
19348 (CALL_CLEANUP): New macro.
19349 (cp_eh_info): Use them.
19350 (__cp_push_exception): Likewise.
19351 (__cp_pop_exception): Likewise.
19352
19353 2000-04-11 Mark Mitchell <mark@codesourcery.com>
19354
19355 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19356 (complete_dtor_identifier): New macro.
19357 (CLASSTYPE_FIRST_CONVERSION): Remove.
19358 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19359 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19360 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19361 (CLASSTYPE_CONSTRUCTORS): Likewise.
19362 (CLASSTYPE_DESTRUCTORS): Likewise.
19363 (lang_decl): Add cloned_function.
19364 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19365 (DECL_BASE_CONSTRUCTOR_P): Likewise.
19366 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19367 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19368 (DECL_CLONED_FUNCTION_P): Likewise.
19369 (DECL_CLONED_FUNCTION): Likewise.
19370 (clone_function_decl): Declare.
19371 (maybe_clone_body): Likewise.
19372 * call.c (build_user_type_conversion_1): Call complete object
19373 constructors in the new ABI.
19374 (build_new_method_call): Don't add in-charge parameters under the
19375 new ABI.
19376 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19377 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19378 CLASSTYPE_DESTRUCTOR_SLOT.
19379 (build_clone): New function.
19380 (clone_function_decl): Likewise.
19381 (clone_constructors_and_destructors): Likewise.
19382 (check_bases_and_members): Use it.
19383 * decl.c (iniitialize_predefined_identifiers): Initialize
19384 complete_dtor_identifier.
19385 (finish_function): Don't add extra code to a clone.
19386 (lang_mark_tree): Mark cloned_function.
19387 * decl2.c (mark_used): Don't bother trying to instantiate things
19388 we synthesized.
19389 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19390 * method.c (set_mangled_name_for_decl): Don't treat clones as
19391 constructors.
19392 (synthesize_method): Sythesize cloned functions, not the clones.
19393 * optimize.c (inline_data): Update comment on ret_label.
19394 (remap_block): Don't assume DECL_INITIAL exists.
19395 (copy_body_r): Allow ret_label to be NULL.
19396 (maybe_clone_body): Define.
19397 * pt.c (tsubst_decl): Handle clones.
19398 (instantiate_clone): New function.
19399 (instantiate_template): Use it.
19400 (set_mangled_name_for_template_decl): Don't treat clones as
19401 constructors.
19402 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19403 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19404 * semantics.c (expand_body): Clone function bodies as necessary.
19405
19406 * optimize.c (remap_decl): Avoid sharing structure for arrays
19407 whose size is only known at run-time.
19408 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19409
19410 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19411 to has_in_charge_parm_p.
19412 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19413 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19414 (DECL_COPY_CONSTRUCTOR_P): New macro.
19415 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19416 (build_user_type_conversion_1): Likewise.
19417 (convert_like_real): Likewise.
19418 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
19419 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19420 (copy_args_p): Likewise.
19421 (grok_ctor_properties): Likewise.
19422 (start_function): Likewise.
19423 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
19424 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19425 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19426 * method.c (do_build_copy_constructor): Use
19427 DECL_HAS_IN_CHARGE_PARM_P.
19428 (synthesize_method): Likewise.
19429 * pt.c (instantiate_template): Remove goto.
19430 * tree.c (build_cplus_method_type): Remove mention of obstacks in
19431 comment.
19432
19433 * cp-tre.h (finish_function): Change prototype.
19434 * decl.c (end_cleanup_fn): Adjust caller.
19435 (finish_function): Take only one parameter.
19436 * decl2.c (finish_objects): Adjust caller.
19437 (finish_static_storage_duration_function): Likewise.
19438 * method.c (emit_thunk): Likewise.
19439 * parse.y: Likewise.
19440 * parse.c: Regenerated.
19441 * pt.c (instantiate_decl): Likewise.
19442 * rtti.c (synthesize_tinfo_fn): Likewise.
19443 * semantics.c (expand_body): Likewise.
19444
19445 * cp-tree.h (copy_decl): New function.
19446 * class.c (finish_struct_1): Use it.
19447 * lex.c (copy_decl): Define it.
19448 * pt.c (tsubst_decl): Likewise.
19449 * tree.c (copy_template_template_parm): Likewise.
19450
19451 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19452 has_nonpublic_assign_ref.
19453 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19454 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19455 * class.c (finish_struct_methods): Don't set
19456 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19457 (interface_only): Don't declare.
19458 (interface_unknown): Likewise.
19459
19460 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19461
19462 * tree.h (HAVE_TEMPLATES): Remove definition.
19463 * lang-options.h (-fthis-is-variable): Remove documentation.
19464
19465 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
19466
19467 * class.c (instantiate_type): Handle object-relative template-id.
19468
19469 * semantics.c (finish_expr_stmt): Call convert_to_void here.
19470 * decl.c (cplus_expand_expr_stmt): Not here.
19471
19472 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19473 Initialize exprtype earlier.
19474
19475 * parse.y (fn.def1): Check for defining types in return types.
19476
19477 * decl.c (check_tag_decl): Notice extra fundamental types.
19478 Diagnose empty decls in classes, too.
19479
19480 * decl.c (grokdeclarator): Don't override an anonymous name if no
19481 declarator was given.
19482
19483 * cvt.c (convert_to_void): Call resolve_offset_ref.
19484
19485 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19486
19487 * decl2.c (decl_namespace): Handle getting a type.
19488
19489 * typeck.c (build_c_cast): Re-enable warning for cast between
19490 pointer and integer of different size.
19491
19492 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
19493
19494 * inc/cxxabi.h (__pointer_type_info): Add restrict and
19495 incomplete flags.
19496 (__pointer_type_info::__pointer_catch): New virtual function.
19497 (__pointer_to_member_type_info): Derive from
19498 __pointer_type_info. Adjust.
19499 (__pointer_to_member_type_info::__do_catch): Remove.
19500 (__pointer_to_member_type_info::__is_pointer_p): Declare.
19501 (__pointer_to_member_type_info::__pointer_catch): Declare.
19502 * rtti.c (qualifier_flags): Add restrict flag.
19503 (ptmd_initializer): Reorder members.
19504 (create_tinfo_types): Expand comments. Reorder
19505 ptmd_desc_type_node members.
19506 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19507 Implement.
19508 (__pointer_type_info::__do_catch): Move specific code into
19509 __pointer_catch. Call it.
19510 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19511 specific catch checking. Fix void conversion check.
19512 (__pointer_to_member_type_info::__do_catch): Remove.
19513 (__pointer_to_member_type_info::__pointer_catch): Implement.
19514
19515 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19516
19517 * lex.c (init_parse): Remove traces of classof and headof.
19518 * decl2.c (flag_operator_names): Default to 1.
19519 (lang_decode_option): Do not set it for -ansi.
19520
19521 2000-04-09 Mark Mitchell <mark@codesourcery.com>
19522
19523 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19524 (DECL_MAIN_VARIANT): Remove.
19525 * decl.c (duplicate_decls): Don't set it.
19526 (start_function): Likewise.
19527 (lang_mark_tree): Don't mark it.
19528 * decl2.c (defer_fn): Don't use it.
19529 * lex.c (retrofit_lang_decl): Don't set it.
19530 * pt.c (tsubst_decl): Likewise.
19531 * ptree.c (print_lang_decl): Don't print it.
19532 * typeck.c (mark_addressable): Don't use it.
19533
19534 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19535
19536 * vec.cc: Include <new> and <exception>.
19537 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19538 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19539 terminate.
19540 (__cxa_vec_delete): Catch dtor exceptions.
19541
19542 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19543
19544 Prepend __ to implementation defined names.
19545 * inc/typeinfo (type_info): Rename _name to __name.
19546 (type_info::type_info): Rename parameter.
19547 (type_info::operator==, type_info::operator!=,
19548 type_info::before): Likewise.
19549 (type_info::is_pointer_p, type_info::is_function_p,
19550 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19551 parameters.
19552 * inc/cxxabi.h
19553 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19554 (__pointer_type_info::__pointer_type_info): Likewise.
19555 (__pointer_type_info::is_pointer_p,
19556 __pointer_type_info::do_catch): Prepend __. Rename parameters.
19557 (__array_type_info::__array_type_info): Rename parameters.
19558 (__function_type_info::__function_type_info): Likewise.
19559 (__function_type_info::is_function_p): Prepend __.
19560 (__enum_type_info::__enum_type_info): Rename parameters.
19561 (__pointer_to_member_type_info::__pointer_to_member_type_info):
19562 Likewise.
19563 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19564 parameters.
19565 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19566 (__class_type_info::__class_type_info): Rename parameters.
19567 (__class_type_info::sub_kind): Prepend __. Adjust member names.
19568 (__class_type_info::upcast_result,
19569 __class_type_info::dyncast_result): Prepend __. Move definition
19570 into tinfo.cc.
19571 (__class_type_info::do_upcast, __class_type_info::do_catch,
19572 __class_type_info::find_public_src,
19573 __class_type_info::do_dyncast,
19574 __class_type_info::do_find_public_src): Prepend __. Rename
19575 parameters.
19576 (__si_class_type_info::__si_class_type_info): Rename parameters.
19577 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19578 __si_class_type_info::do_find_public_src): Prepent __. Rename
19579 parameters.
19580 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19581 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19582 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19583 parameters.
19584 (__dynamic_cast): Rename parameters.
19585 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19586 type_info::do_catch, type_info::do_upcast): Prepend __.
19587 (contained_p, public_p, virtual_p, contained_public_p,
19588 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19589 (__class_type_info::do_catch,
19590 __class_type_info::do_upcast): Prepend __. Adjust.
19591 (__class_type_info::__upcast_result,
19592 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19593 Adjust.
19594 (__class_type_info::find_public_src): Prepend __. Adjust.
19595 (__class_type_info::do_find_public_src,
19596 __si_class_type_info::do_find_public_src,
19597 __vmi_class_type_info::do_find_public_src): Likewise.
19598 (__class_type_info::do_dyncast,
19599 __si_class_type_info::do_dyncast,
19600 __vmi_class_type_info::do_dyncast): Likewise.
19601 (__class_type_info::do_upcast,
19602 __si_class_type_info::do_upcast,
19603 __vmi_class_type_info::do_upcast): Likewise.
19604 (__dynamic_cast): Adjust.
19605 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19606 (__function_type_info::is_function_p): Likewise.
19607 (__pointer_type_info::do_catch): Likewise. Adjust.
19608 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19609 (__throw_type_match_rtti_2): Adjust.
19610 (__is_pointer): Adjust.
19611
19612 2000-04-08 Mark Mitchell <mark@codesourcery.com>
19613
19614 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19615 (complete_ctor_identifier): New macro.
19616 (special_function_kind): Add sfk_copy_constructor and
19617 sfk_assignment_operator.
19618 (LOOKUP_HAS_IN_CHARGE): Remove.
19619 (cons_up_default_function): Rename to ...
19620 (implicitly_declare_fn): ... this.
19621 * call.c (build_new_method_call): Add in-charge parameters for
19622 constructors here.
19623 * class.c (add_implicitly_declared_members): Change parameter name
19624 from cant_have_assignment to cant_have_const_assignment.
19625 Replace calls to cons_up_default_function to implicitly_declare_fn.
19626 * cvt.c (ocp_convert): Use complete_ctor_identifier.
19627 * decl.c (initialize_predefined_identifiers): Initialize it.
19628 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19629 complex expression.
19630 * init.c (expand_default_init): Don't calculate the in-charge
19631 parameter here.
19632 (build_new_1): Likewise.
19633 * lex.c (cons_up_default_function): Move to method.c.
19634 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19635 (implicitly_declare_fn): New function.
19636 * typeck.c (build_static_cast): Use complete_ctor_identifier.
19637 (build_modify_expr): Likewise.
19638 * typeck2.c (build_functional_cast): Likewise.
19639
19640 Under the new ABI, constructors don't return `this'.
19641 * cp-tree.h (warn_reorder): Declare.
19642 (special_function_kind): New enum.
19643 (global_base_init_list): Remove declaration.
19644 (emit_base_init): Don't return a value.
19645 (check_base_init): Don't declare.
19646 (is_aggr_typedef): Likewise.
19647 * decl.c (check_special_function_return_type): New function.
19648 (return_types): Remove.
19649 (grokdeclarator): Use check_special_function_return_type.
19650 (start_function): Don't initialize ctor_label under the new ABI.
19651 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19652 * init.c (begin_init_stmts): Move to top of file.
19653 (finish_init_stmts): Likewise.
19654 (warn_reorder): Don't declare.
19655 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
19656 value.
19657 (check_base_init): Remove.
19658 (is_aggr_typedef): Likewise.
19659 (build_new_1): Don't use the return value of a constructor.
19660 * semantics.c (setup_vtbl_ptr): Don't use the return value
19661 of emit_base_init.
19662 * typeck.c (check_return_expr): Don't magically convert return
19663 statements into `return this' in constructors under the new ABI.
19664
19665 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19666 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19667 (base_ctor_identifier): New macro.
19668 (base_dtor_identifier): Likewise.
19669 (deleting_dtor_identifier): Likewise.
19670 * decl.c: Don't include obstack.h.
19671 (obstack_chunk_alloc): Don't define.
19672 (obstack_chunk_free): Likewise.
19673 (struct predefined_identifier): New type.
19674 (initialize_predefined_identifiers): New function.
19675 (init_decl_processing): Use it.
19676 (debug_temp_inits): Remove.
19677 (start_method): Don't call preserve_data.
19678 (hack_incomplete_structures): Update comment.
19679 * init.c (init_init_processing): Don't initialize
19680 nelts_identifier.
19681 (build_offset_rf): Remove dead code.
19682 (build_delete): Use CLASSTYPE_N_BASECLASSES.
19683 * search.c (init_search_processing): Don't initialize
19684 vptr_identifier.
19685
19686 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19687
19688 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19689 some sign_compare warnings.
19690
19691 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19692
19693 Rename abi::__vmi_class_type_info members.
19694 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19695 base_list, detail_masks members to vmi_flags, vmi_base_count,
19696 vmi_bases and vmi_flags_masks respectively.
19697 (__vmi_class_type_info::vmi_flags_masks): Rename
19698 details_unknown_mask to flags_unknown_mask.
19699 * tinfo.cc (__class_type_info::do_upcast): Adjust.
19700 (__vmi_class_type_info::do_find_public_src): Adjust.
19701 (__vmi_class_type_info::do_dyncast): Adjust.
19702 (__vmi_class_type_info::do_upcast): Adjust.
19703
19704 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19705
19706 * tinfo.cc (convert_to_base): New function.
19707 (get_vbase_offset): Remove. Move into convert_to_base.
19708 (__vmi_class_type_info::do_find_public_src): Adjust.
19709 (__vmi_class_type_info::do_dyncast): Adjust.
19710 (__vmi_class_type_info::do_upcast): Adjust.
19711
19712 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
19713
19714 * tinfo.cc (operator=): Use __builtin_strcmp.
19715 * tinfo2.cc (before): Likewise.
19716
19717 2000-04-06 Mark Mitchell <mark@codesourcery.com>
19718
19719 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19720 (DECL_SAVED_INLINE): Rename to ...
19721 (DECL_DEFERRED_FN): ... this.
19722 (in_function_p): Remove declaration.
19723 (mark_inline_for_output): Rename to ...
19724 (defer_fn): ... this.
19725 * decl.c (finish_function): Adjust call to mark_inline_for_output.
19726 (in_function_p): Remove definition.
19727 * decl2.c (saved_inlines): Rename to ...
19728 (deferred_fns): ... this.
19729 (saved_inlines_used): Rename to ...
19730 (deferred_fns_used): ... this.
19731 (mark_inline_for_output): Rename to ...
19732 (defer_fn): ... this.
19733 (finish_file): Adjust accordingly.
19734 (init_decl2): Likewise.
19735 * lex.c (cons_up_default_function): Likewise.
19736 * pt.c (mark_decl_instantiated): Likewise.
19737 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19738 circumstances.
19739 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19740 * semantics.c (expand_body): Defer more functions.
19741
19742 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19743
19744 * vec.cc: New file.
19745 * Make-lang.in (CXX_LIB2FUNCS): Add it.
19746 (vec.o): Build it.
19747 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19748 __cxa_vec_delete): Declare.
19749
19750 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19751
19752 * rtti.c (dfs_class_hint_mark): New static function.
19753 (dfs_class_hint_unmark): New static function.
19754 (class_hint_flags): Use them.
19755
19756 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
19757
19758 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19759
19760 2000-04-05 Mark Mitchell <mark@codesourcery.com>
19761
19762 * cp-tree.h (instantiate_decl): Change prototype.
19763 * decl2.c (mark_used): Adjust call.
19764 * optimize.c (inlinable_function_p): Adjust handling of templates.
19765 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19766 (do_type_instantiation): Likewise.
19767 (instantiate_decl): Defer more templates.
19768 (instantiate_pending_templates): Adjust logic to handle inline
19769 friend functions.
19770
19771 * Makefile.in (GGC_H): New variable. Use it throughout in place
19772 of ggc.h.
19773
19774 * call.c: Don't include obstack.h. Include ggc.h.
19775 (obstack_chunk_alloc): Don't define.
19776 (obstack_chunk_free): Likewise.
19777 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19778 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19779 (pop_switch): Free it.
19780
19781 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19782
19783 * dump.c (dequeue_and_dump): Don't try to print the bit_position
19784 if we don't have a DECL_FIELD_OFFSET.
19785
19786 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
19787
19788 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19789 special_function_p.
19790
19791 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19792
19793 * cfns.gperf (hash, libc_name_p): Prototype.
19794
19795 * rtti.c (build_dynamic_cast_1): Constification.
19796
19797 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19798
19799 * semantics.c (deferred_type_access_control): Prototype.
19800
19801 2000-04-04 Mark Mitchell <mark@codesourcery.com>
19802
19803 Correct many new ABI issues regarding vbase and vcall offset
19804 layout.
19805 * cp-tree.h (BINFO_VTABLE): Document.
19806 (struct lang_type): Tweak formatting.
19807 (BINFO_PRIMARY_BINFO): Add to documentation.
19808 (CLASSTYPE_VSIZE): Fix typo in comment.
19809 (CLASSTYPE_VBASECLASSES): Update documentation.
19810 (BINFO_VBASE_MARKED): Remove.
19811 (SET_BINFO_VBASE_MARKED): Likewise.
19812 (CLEAR_BINFO_VBASE_MARKED): Likewise.
19813 (BINFO_FIELDS_MARKED): Remove.
19814 (SET_BINFO_FIELDS_MARKED): Likewise.
19815 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19816 (enum access_kind): New enumeration.
19817 (num_extra_vtbl_entries): Remove declaration.
19818 (size_extra_vtbl_entries): Likewise.
19819 (get_vtbl_decl_for_binfo): New function.
19820 (dfs_vbase_unmark): Remove declaration.
19821 (mark_primary_bases): Likewise.
19822 * class.c (SAME_FN): Remove.
19823 (struct vcall_offset_data_s): Move definition.
19824 (build_vbase_pointer): Use `build', not `build_binary_op', to
19825 access the vbase pointer under the new ABI.
19826 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19827 (build_primary_vtable): Likewise.
19828 (dfs_mark_primary_bases): Move here from search.c.
19829 (mark_primary_bases): Likewise.
19830 (determine_primary_bases): Under the new ABI, don't make a base
19831 class a primary base just because we don't yet have any virtual
19832 functions.
19833 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19834 (num_vfun_entries): Remove.
19835 (dfs_count_virtuals): Likewise.
19836 (num_extra_vtbl_entries): Likewise.
19837 (size_extra_vtbl_entries): Likewise.
19838 (layout_virtual_bases): Iterate in inheritance graph order under
19839 the new ABI.
19840 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19841 indicate that a vfield is present.
19842 (init_class_processing): Initialize access_public_node, etc., from
19843 ak_public, etc.
19844 (get_vtbl_decl_for_binfo): New function.
19845 (dump_class_hierarchy_r): Likewise.
19846 (dump_class_hierarchy): Use it.
19847 (finish_vtbls): Build the vtbls in inheritance graph order.
19848 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19849 (initialize_vtable): Use get_vtbl_decl_for_binfo.
19850 (accumulate_vtbl_inits): Add comments explaining why a pre-order
19851 walk is required.
19852 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19853 where the vptr points, even for primary vtables.
19854 (build_vtbl_initializer): Adjust handling of vbase and vcall
19855 offsets.
19856 (build_vcall_and_vbase_vtable_entries): New function.
19857 (dfs_build_vbase_offset_vtbl_entries): Remove.
19858 (build_vbase_offset_vtbl_entries): Reimplement.
19859 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19860 were already handled in a primary base class vtable.
19861 (build_vcall_offset_vtbl_entries): Adjust.
19862 (build_rtti_vtbl_entries): Adjust.
19863 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19864 * init.c (expand_virtual_init): Simplify.
19865 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19866 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19867 * search.c (BINFO_ACCESS): New macro.
19868 (SET_BINFO_ACCESS): Likewise.
19869 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19870 (access_in_type): Likewise.
19871 (dfs_accessible_p): Likewise.
19872 (protected_accessible_p): Likewise.
19873 (lookup_fnfields_1): Adjust documentation.
19874 (dfs_mark_primary_bases): Move to class.c
19875 (mark_primary_bases): Likewise.
19876 (dfs_vbase_unmark): Remove.
19877 (virtual_context): Use BINFO_FOR_VBASE.
19878 (dfs_get_vbase_types): Simplify.
19879 (dfs_build_inheritance_graph_order): New function.
19880 (get_vbase_types): Use it.
19881 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19882
19883 * tinfo.cc (get_vbase_offset): New function.
19884 (__vmi_class_type_info::do_find_public_src): Use it.
19885 (__vmi_class_type_info::do_dyncast): Likewise.
19886 (__vmi_class_type_info::do_upcast): Likewise.
19887
19888 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
19889
19890 * lang-specs.h: Pass -fno-show-column to the preprocessor.
19891
19892 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
19893
19894 * rtti.c (class_hint_flags): Rename flags.
19895 (class_initializer): Remove flags.
19896 (synthesize_tinfo_var): Combine offset and flags. Add flags
19897 for __vmi_class_type_info.
19898 (create_tinfo_types): Remove flags from __class_type_info and
19899 __si_class_type_info. Merge flags and offset from
19900 base_class_type_info.
19901 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19902 (__base_class_info::is_virtual_p): Adjust.
19903 (__base_class_info::is_public_p): Adjust.
19904 (__base_class_info::offset): New accessor.
19905 (__class_type_info::details): Remove member.
19906 (__class_type_info::__class_type_info): Lose details.
19907 (__class_type_info::detail_masks): Remove.
19908 (__si_class_type_info::__si_class_type_info): Lose details.
19909 (__vmi_class_type_info::details): New member.
19910 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19911 (__vmi_class_type_info::detail_masks): New member.
19912 * tinfo.cc (__class_type_info::do_upcast): Initialize result
19913 with unknown_details_mask.
19914 (__vmi_class_type_info::do_find_public_src): Adjust
19915 (__vmi_class_type_info::do_dyncast): Adjust.
19916 (__vmi_class_type_info::do_upcast): Set result details, if
19917 needed. Adjust.
19918 (__dynamic_cast): Temporarily #if out optimization.
19919
19920 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
19921
19922 * rtti.c (get_tinfo_decl): Mark used.
19923 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19924 mark as dealt with, if we output it.
19925
19926 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19927
19928 * class.c: Reorganize to put virtual function table initialization
19929 machinery at the end of the file.
19930
19931 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
19932
19933 * class.c (finish_struct): Use bitsize_zero_node.
19934 * pt.c (instantiate_class_template): Likewise.
19935
19936 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19937
19938 Put RTTI entries at negative offsets in new ABI.
19939 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19940 vbase offset at index -3, not -1.
19941 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19942 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19943 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19944 (build_rtti_vtbl_entries): New function.
19945 (set_rtti_entry): Remove.
19946 (build_primary_vtable): Don't use it.
19947 (build_secondary_vtable): Likewise.
19948 (start_vtable): Remove.
19949 (first_vfun_index): New function.
19950 (set_vindex): Likewise.
19951 (add_virtual_function): Don't call start_vtable. Do call
19952 set_vindex.
19953 (set_primary_base): Rename parameter.
19954 (determine_primary_base): Likewise.
19955 (num_vfun_entries): Don't use skip_rtti_stuff.
19956 (num_extra_vtbl_entries): Include RTTI information.
19957 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19958 (skip_rtti_stuff): Remove.
19959 (dfs_modify_vtables): Don't use it.
19960 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
19961 (layout_nonempty_base_or_field): Update size handling.
19962 (create_vtable_ptr): Tweak.
19963 (layout_class_type): Adjust parameter names.
19964 (finish_struct_1): Simplify.
19965 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19966 (skip_rtti_stuff): Remove.
19967 (first_vfun_index): New function.
19968 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19969 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19970 (marked_vtable_pathp): Declare.
19971 (unmarked_vtable_pathp): Likewise.
19972 * error.c (dump_expr): Use first_vfun_index to calculate vtable
19973 offsets.
19974 * rtti.c (build_headof): Look for RTTI at negative offsets.
19975 (get_tinfo_decl_dynamic): Likewise.
19976 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19977 here.
19978 (create_pseudo_type_info): Do it here instead. Adjust so that
19979 vptr points at first virtual function.
19980 * search.c (marked_vtable_pathp): Make it global.
19981 (unmarked_vtable_pathp): Likewise.
19982 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19983 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19984 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19985 (get_pure_virtuals): Likewise.
19986 (expand_upcast_fixups): Likewise.
19987 * tree.c (debug_binfo): Likewise.
19988 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19989 negative offset.
19990
19991 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19992
19993 * class.c (check_field_decl): Fix typo.
19994 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19995 (check_methods): Likewise.
19996 (check_field_decls): Likewise.
19997 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19998 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19999 Use DECL_RESULT_FLD, not DECL_RESULT.
20000 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
20001 * lex.c (identifier_type): Likewise.
20002 * pt.c (determine_specialization, lookup_template_class): Likewise.
20003 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
20004 (resolve_overloaded_unification, more_specialized): Likewise.
20005 * semantics.c (finish_member_declaration): Likewise.
20006 * typeck.c (build_x_function_call): Likewise.
20007
20008 2000-03-26 Mark Mitchell <mark@codesourcery.com>
20009
20010 * class.c (layout_empty_base): Handle empty bases with non-byte
20011 alignment.
20012 (build_base_field): Likewise.
20013 (layout_virtual_bases): Likewise.
20014
20015 * class.c (finish_struct_1): Fix typo in this change:
20016
20017 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20018
20019 2000-03-25 Mark Mitchell <mark@codesourcery.com>
20020
20021 * decl.c (grokdeclarator): Count partial specializations when
20022 keeping track of how many template classes have been seen.
20023
20024 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
20025
20026 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20027
20028 * class.c (build_vbase_pointer_fields): layout_field now place_field.
20029 (get_vfield_offset): Use byte_position.
20030 (set_rtti_entry): Set OFFSET to ssizetype zero.
20031 (get_binfo_offset_as_int): Deleted.
20032 (dfs_record_base_offsets): Use tree_low_cst.
20033 (dfs_search_base_offsets): Likewise.
20034 (layout_nonempty_base_or_field): Reflect changes in RLI format
20035 and call byte_position.
20036 (layout_empty_base): Convert offset to ssizetype.
20037 (build_base_field): use rli_size_unit_so_far.
20038 (dfs_propagate_binfo_offsets): Do computation in proper type.
20039 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
20040 (layout_class_type): Reflect changes in RLI names and fields.
20041 (finish_struct_1): Set DECL_FIELD_OFFSET.
20042 * dump.c (dequeue_and_dump): Call bit_position.
20043 * expr.c (cplus_expand_constant): Use byte_position.
20044 * rtti.c (expand_class_desc): Use bitsize_one_node.
20045 * typeck.c (build_component_addr): Use byte_position and don't
20046 special case for zero offset.
20047
20048 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
20049
20050 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
20051
20052 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
20053 tinfo object.
20054 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
20055 vtable.
20056
20057 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20058
20059 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
20060 DECL_P macros.
20061 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
20062 make_typename_type, check_initializer, cp_finish_decl,
20063 xref_tag): Likewise.
20064 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
20065 decl_namespace, arg_assoc_template_arg, arg_assoc,
20066 validate_nonmember_using_decl, do_class_using_decl): Likewise.
20067 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
20068 args_to_string): Likewise.
20069 * friend.c (is_friend): Likewise.
20070 * lex.c (note_got_semicolon, note_list_got_semicolon,
20071 is_global): Likewise.
20072 * method.c (build_overload_nested_name, build_overload_value,
20073 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
20074 * parse.y (typename_sub, typename_sub1): Likewise.
20075 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
20076 process_partial_specialization, convert_template_argument,
20077 template_args_equal, add_pending_template, lookup_template_class,
20078 for_each_template_parm_r, maybe_fold_nontype_arg,
20079 tsubst, instantiate_template, type_unification_real, unify,
20080 instantiate_pending_templates, set_mangled_name_for_template_decl):
20081 Likewise.
20082 * repo.c (repo_get_id, repo_template_used): Likewise.
20083 * search.c (lookup_field_1): Likewise.
20084 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
20085 * xref.c (classname): Likewise.
20086
20087 2000-03-22 Mark Mitchell <mark@codesourcery.com>
20088
20089 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
20090 (CANONICAL_BINFO): New macro.
20091 (BINFO_NEW_VTABLE_MARKED): Use it.
20092 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
20093 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
20094 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
20095 not TREE_TYPE.
20096 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20097 (build_secondary_vtable): Likewise.
20098 (dfs_finish_vtbls): Likewise.
20099 (dfs_accumulate_vtbl_inits): Likewise.
20100 (accumulate_vtbl_inits): New function.
20101 (finish_vtbls): Make sure that virtual bases come after
20102 non-virtual bases in the vtable group.
20103 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
20104 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20105 * search.c (struct vbase_info): Move definition.
20106 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20107 (unmarked_new_vtable_p): Likewise.
20108 (dfs_mark_vtable_path): Remove.
20109 (dfs_mark_new_vtable): Remove.
20110 (dfs_unmark_new_vtable): Likewise.
20111 (dfs_clear_search_slot): Likewise.
20112 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20113 (dfs_clear_vbase_slots): Likewise.
20114 (init_vbase_pointers): LIkewise.
20115
20116 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
20117
20118 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20119 SIZETYPE to a non-SIZETYPE.
20120
20121 2000-03-21 Mark Mitchell <mark@codesourcery.com>
20122
20123 * class.c (layout_virtual_bases): Adjust names in conditionally
20124 compiled code.
20125
20126 * class.c (record_base_offsets): New function.
20127 (layout_conflict_p): Likewise.
20128 (layout_nonempty_base_or_field): Use it.
20129 (layout_empty_base): New function.
20130 (build_base_field): Use it.
20131 (build_base_fields): Update comment.
20132 (layout_virtual_bases): Fold in a little code form
20133 layout_basetypes. Use layout_empty_base.
20134 (layout_basetypes): Remove.
20135 (end_of_class): New function.
20136 (layout_class_type): Use it. Adjust.
20137
20138 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20139 (fntype_p): Remove.
20140 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20141 comment.
20142 (dfs_skip_nonprimary_vbases_markedp): Likewise.
20143 * typeck.c (fntype_p): Remove.
20144
20145 * cp-tree.h (TI_SPEC_INFO): Remove.
20146 (CLASSTYPE_TI_SPEC_INFO): Likewise.
20147 * pt.c (process_partial_specialization): Likewise.
20148
20149 * class.c (build_base_field): Fix thinko in computation of binfo
20150 offsets.
20151
20152 * tree.c (mark_local_for_remap_p): Mark variables declared in
20153 TARGET_EXPRs as well.
20154
20155 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20156
20157 * typeck.c (require_complete_type, complete_type,
20158 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20159 build_array_ref, convert_arguments, pointer_diff,
20160 build_x_unary_op, build_unary_op, build_c_cast,
20161 build_modify_expr): Use COMPLETE_TYPE_P etc.
20162 * call.c (is_complete, convert_like_real,
20163 build_new_method_call): Likewise.
20164 * class.c (build_vbase_pointer_fields, check_bases,
20165 build_base_field, finish_struct_1, pushclass): Likewise.
20166 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20167 * decl.c (maybe_process_template_type_declaration, pushtag,
20168 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20169 layout_var_decl, check_initializer, cp_finish_decl,
20170 grokdeclarator, require_complete_types_for_parms,
20171 grok_op_properties, xref_tag, xref_basetypes,
20172 check_function_type): Likewise.
20173 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20174 * friend.c (do_friend): Likewise.
20175 * init.c (build_offset_ref): Likewise.
20176 * parse.y (structsp): Likewise.
20177 * pt.c (maybe_process_partial_specialization,
20178 tsubst_friend_function, instantiate_class_template, tsubst,
20179 do_type_instantiation, instantiate_pending_templates): Likewise.
20180 * repo.c (repo_get_id): Likewise.
20181 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20182 synthesize_tinfo_var, emit_support_tinfos): Likewise.
20183 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20184 * semantics.c (begin_class_definition): Likewise.
20185 * tree.c (build_cplus_method_type): Likewise.
20186 * typeck2.c (digest_init, build_functional_cast,
20187 add_exception_specifier): Likewise.
20188 * parse.h, parse.c: Regenerated.
20189
20190 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20191
20192 * inc/cxxabi.h: New header file. Define new-abi entry points.
20193 (__pointer_type_info::target): Rename member to ...
20194 (__pointer_type_info::type): ... here.
20195 (__base_class_info::type): Rename member to ...
20196 (__base_class_info::base): ... here.
20197 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20198 * cp-tree.h (CPTI_ABI): New global tree enumeration.
20199 (abi_node): New global tree node.
20200 * decl.c (abi_node): Document.
20201 (init_decl_processing): Initialize abi_node.
20202 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20203 (get_vmi_pseudo_type_info): Likewise.
20204 (create_tinfo_types): Likewise.
20205 (emit_support_tinfos): Likewise.
20206 * tinfo.h (cxxabi.h): Include for new-abi.
20207 Move rtti class definitions to new header file.
20208 * tinfo.cc (abi): Use the namespace.
20209 (std): Move new abi rtti classes from here ...
20210 (__cxxabiv1): ... to here.
20211 * tinfo2.cc (cxxabi.h): Include for new-abi.
20212 Move rtti class definitions to new header file.
20213 (std): Move new abi rtti classes from here ...
20214 (__cxxabiv1): ... to here.
20215 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20216 namespace.
20217
20218 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20219 Jason Merrill <jason@casey.cygnus.com>
20220
20221 * method.c (build_overload_int): Use host_integerp.
20222
20223 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20224
20225 * init.c (build_offset_ref): Handle the case of a templated member
20226 function.
20227
20228 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20229
20230 * except.c (expand_exception_blocks): Clear catch_clauses_last.
20231
20232 2000-03-18 Mark Mitchell <mark@codesourcery.com>
20233
20234 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20235 * class.c (check_bitfield_decl): Turn illegal bitfields into
20236 non-bitfields.
20237 (dfs_propagate_binfo_offsets): Adjust for new size_binop
20238 semantics.
20239 (dfs_offset_for_unshared_vbases): Likewise.
20240 * cvt.c (cp_convert_to_pointer): Convert NULL to a
20241 pointer-to-member correctly under the new ABI.
20242 * expr.c (cplus_expand_constant): Don't use cp_convert when
20243 turning an offset into a pointer-to-member.
20244 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20245 when dereferencing them under the new ABI.
20246 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20247 of pointers-to-members under the new ABI.
20248
20249 * class.c (check_bitfield_decl): Remove restriction on really long
20250 bitfields.
20251 (layout_class_type): Implement new ABI handling of bitfields
20252 longer than their types.
20253
20254 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20255
20256 * parse.y (extdefs): Call ggc_collect.
20257 * parse.c: Regenerated.
20258
20259 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
20260
20261 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20262 (note_name_declared_in_class): Use OVL_CURRENT to get at a
20263 potential overload.
20264
20265 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20266
20267 * class.c (build_vbase_path): Use integer_zerop.
20268 (build_vtable_entry): Use tree_low_cst.
20269 (get_vfield_offset): Use bit_position.
20270 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20271 Use tree_low_cst.
20272 (check_bitfield_decl): Set DECL_SIZE using convert.
20273 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20274 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20275 Use tree_low_cst.
20276 (finish_struct_1): Use bit_position.
20277 (dump_class_hierarchy): Use tree_low_cst.
20278 * cp-tree.h (min_precision): Add declaration.
20279 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20280 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20281 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20282 * expr.c (cplus_expand_constant): Use bit_position.
20283 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20284 * rtti.c (get_base_offset): Use bit_position.
20285 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20286 host_integerp, and tree_low_cst.
20287 (pointer_int_sum): Use integer_zerop.
20288 (build_component_addr): Use bit_position.
20289
20290 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
20291
20292 * typeck.c (require_complete_type): Don't assume size_zero_node.
20293 (complete_type_or_else): Likewise.
20294
20295 2000-03-16 Steven Grady <grady@digitaldeck.com>
20296 Jason Merrill <jason@casey.cygnus.com>
20297
20298 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20299
20300 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
20301
20302 * decl2.c (grokfield): Bail out if type is error_mark_node.
20303
20304 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20305
20306 * tinfo2.cc (__ptr_to_member_data): Rename to ...
20307 (__pointer_to_member_data): ... here. Adjust.
20308 * rtti.c (create_tinfo_types): Adjust.
20309
20310 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20311
20312 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20313 * decl.c (ref_desc_type_node): Undocument.
20314 * rtti.c (ptr_ref_initializer): Rename to ...
20315 (ptr_initializer): ... here. Adjust comments.
20316 (ptmd_initializer): Fix comment thinko.
20317 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20318 (create_tinfo_types): Remove ref_desc_type_node init.
20319 * tinfo2.cc (__reference_type_info): Remove.
20320
20321 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20322
20323 * decl.c (cp_finish_decl): Remove obsolete comment.
20324
20325 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20326
20327 2000-03-14 Mark Mitchell <mark@codesourcery.com>
20328
20329 * cp-tree.h: Tweak documentation.
20330 * class.c (build_vbase_pointer_fields): Layout the fields, too.
20331 (avoid_overlap): Remove.
20332 (get_binfo_offset_as_int): New function.
20333 (dfs_serach_base_offsets): Likewise.
20334 (layout_nonempty_base_or_field): Likewise.
20335 (build_base_field): Layout fields here. Avoid placing two objects
20336 of the same type at the same address, under the new ABI.
20337 (build_base_fields): Adjust accordingly.
20338 (create_vtable_ptr): Return the new field, but don't attach it to
20339 TYPE_FIELDS.
20340 (remove_base_field): Remove.
20341 (remove_base_fields): Remove.
20342 (layout_basetypes): Adjust accordingly.
20343 (layout_class_type): Call layout_field for each field, rather than
20344 just making a wholesale call to layout_type.
20345
20346 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
20347
20348 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20349
20350 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
20351
20352 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20353
20354 * except.c (dtor_nothrow): New fn.
20355 (do_pop_exception): Use it. Take type parm.
20356 (push_eh_cleanup): Take type parm.
20357 (expand_start_catch_block): Pass it.
20358 (build_eh_type_type_ref): Accept null type.
20359
20360 2000-03-12 Mark Mitchell <mark@codesourcery.com>
20361
20362 * cp-tree.h (revert_static_member_fn): Change prototype.
20363 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20364 (grok_op_properties): Likewise.
20365 (start_function): Likewise.
20366 (revert_static_member_fn): Simplify.
20367 * pt.c (check_explicit_specialization): Adjust call to
20368 revert_static_member_fn.
20369
20370 2000-03-11 Mark Mitchell <mark@codesourcery.com>
20371
20372 * cp-tree.h (scope_kind): New type.
20373 (tmpl_spec_kind): Likewise.
20374 (declare_pseudo_global_level): Remove.
20375 (pseudo_global_level_p): Rename to template_parm_scope_p.
20376 (pushlevel): Remove declaration.
20377 (begin_scope): New function.
20378 (finish_scope): Likewise.
20379 (current_tmpl_spec_kind): Likewise.
20380 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20381 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
20382 Add template_spec_p.
20383 (toplevel_bindings_p): Adjust.
20384 (declare_pseudo_global_level): Remove.
20385 (pseudo_global_level_p): Rename to template_parm_scope_p.
20386 (current_tmpl_spec_kind): New function.
20387 (begin_scope): Likewise.
20388 (finish_scope): Likewise.
20389 (maybe_push_to_top_level): Adjust.
20390 (maybe_process_template_type_declaration): Likewise.
20391 (pushtag): Likewise.
20392 (pushdecl_nonclass_level): Likewise.
20393 (lookup_tag): Likewise.
20394 (grokfndecl): Handle member template specializations. Share
20395 constructor and non-constructor code.
20396 * decl2.c (check_classfn): Handle member template specializations.
20397 * pt.c (begin_template_parm_list): Use begin_scope.
20398 (begin_specialization): Likewise.
20399 (end_specialization): Likewise.
20400 (check_explicit_specialization): Use current_tmpl_spec_kind.
20401 Handle member template specializations.
20402 (end_template_decl): Use finish_scope. Remove call to
20403 get_pending_sizes.
20404 (push_template_decl_real): Remove bogus error message.
20405 (tsubst_decl): Fix typo in code contained in comment.
20406 (instantiate_template): Handle member template specializations.
20407 (most_general_template): Likewise.
20408
20409 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
20410
20411 * lex.c (whitespace_cr): Compress consecutive calls to warning().
20412 (do_identifier): Ditto for error().
20413
20414 * pt.c (convert_nontype_argument): Ditto for cp_error().
20415 (convert_template_argument): Ditto for cp_pedwarn().
20416
20417 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
20418
20419 * exception.cc (__check_null_eh_spec): New fn.
20420 * except.c (expand_end_eh_spec): Call it if the spec is throw().
20421
20422 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20423
20424 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20425 * except.c (expand_end_eh_spec): Add the return type.
20426 * rtti.c (throw_bad_cast): Add the parmtypes.
20427 (throw_bad_typeid): Likewise.
20428
20429 * semantics.c (expand_stmt): Only leave out rtl for unused
20430 artificials, and set DECL_IGNORED_P on them as well.
20431 * decl.c (wrapup_globals_for_namespace): Likewise.
20432
20433 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
20434
20435 * decl.c (maybe_commonize_var): Skip all artificial decls.
20436 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20437
20438 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20439
20440 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20441 * cp-tree.h: Declare flag_enforce_eh_specs.
20442 * decl.c (store_parm_decls, finish_function): Check it.
20443
20444 C library functions don't throw.
20445 * Makefile.in (cfns.h): New target.
20446 (except.o): Depend on it.
20447 * Make-lang.in (cc1plus): Depend on cfns.gperf.
20448 * cfns.gperf: New file.
20449 * cfns.h: Generated.
20450 * except.c: Include it.
20451 (nothrow_libfn_p): New fn.
20452 * decl.c (grokfndecl): Use it.
20453 * cp-tree.h: Declare it.
20454
20455 * decl.c (push_overloaded_decl_1, auto_function,
20456 define_function): Lose.
20457 (build_library_fn_1): New static fn.
20458 (builtin_function): Use it.
20459 (get_atexit_node): Use build_library_fn_ptr.
20460 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20461 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20462 push_void_library_fn, push_throw_library_fn): New fns.
20463 * cp-tree.h: Declare them.
20464 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20465 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20466 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20467 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20468 * rtti.c (build_runtime_decl): Lose.
20469 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20470 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20471 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20472
20473 * call.c (build_call): Remove result_type parm.
20474 Call mark_used on unused artificial fns.
20475 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20476
20477 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
20478
20479 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20480 appropriate.
20481 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20482 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20483 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20484 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20485 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20486 expand_generic_desc): Likewise.
20487
20488 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20489
20490 * exception.cc (__cp_pop_exception): Cleanup the original object.
20491
20492 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20493
20494 * decl.c (grok_op_properties): Merge conversion to void warning
20495 with other silly op warnings.
20496
20497 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
20498
20499 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20500 array CONSTRUCTOR elements. Don't use expr_tree_cons.
20501
20502 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20503
20504 * decl.c (cp_make_fname_decl): New function.
20505 (wrapup_globals_for_namespace): Don't emit unused static vars.
20506 (init_decl_processing): Remove comment about use of
20507 array_domain_type. Set make_fname_decl.
20508 (cp_finish_decl): Remove __FUNCTION__ nadgering.
20509 * semantics.c (begin_compound_stmt): Remove
20510 current_function_name_declared flagging.
20511 (expand_stmt): Don't emit unused local statics.
20512 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20513 specially.
20514
20515 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20516
20517 * typeck.c (convert_for_assignment): Don't look at array
20518 initializer.
20519 * call.c (convert_like_real): Likewise.
20520
20521 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
20522
20523 Add initial support for '\uNNNN' specifier.
20524 * lex.c (read_ucs): New fn.
20525 (readescape, skip_white_space): Call it.
20526 (is_extended_char, is_extended_char_1): New fns.
20527 (utf8_extend_token): New fn, #if 0'd out.
20528 (real_yylex): Treat extended chars like letters.
20529
20530 * search.c (note_debug_info_needed): Walk the bases even if we
20531 weren't deferring the type itself.
20532
20533 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20534
20535 * decl2.c (finish_objects): Constify a char*.
20536
20537 * method.c (emit_thunk): Likewise.
20538
20539 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
20540
20541 * typeck.c (dubious_conversion_warnings): Look through
20542 REFERENCE_TYPE.
20543
20544 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20545
20546 * class.c (dfs_modify_vtables): I is now unsigned.
20547 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20548 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20549 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20550 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20551 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20552 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20553 Call integer_all_onesp.
20554 * typeck2.c (process_init_constructor): Use compare_tree_int.
20555
20556 * lang-specs.h (as): Don't call if -syntax-only.
20557
20558 2000-03-06 Mark Mitchell <mark@codesourcery.com>
20559
20560 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20561 RTL_EXPR_HAS_NO_SCOPE after all.
20562
20563 2000-03-05 Mark Mitchell <mark@codesourcery.com>
20564
20565 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20566 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
20567 RTL_EXPR_HAS_NO_SCOPE.
20568
20569 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20570 later.
20571
20572 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20573
20574 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
20575
20576 * call.c (convert_like): Macrofy.
20577 (convert_like_with_context): New macro.
20578 (convert_like_real): Renamed from convert_like. Add calling
20579 context parameters, for diagnostics. Add recursive flag. Call
20580 dubious_conversion_warnings for outer conversion.
20581 (build_user_type_conversion): Use convert_like_with_context.
20582 (build_over_call): Likewise. Don't warn about dubious
20583 conversions here. Adjust convert_default_arg calls.
20584 (convert_default_arg): Add context parameters for diagnostics.
20585 Pass through to convert_like_with_context.
20586 * cp-tree.h (convert_default_arg): Add context parameters.
20587 (dubious_conversion_warnings): Prototype new function.
20588 * typeck.c (convert_arguments): Adjust convert_default_arg call.
20589 (dubious_conversion_warnings): New function, broken
20590 out of convert_for_assignment.
20591 (convert_for_assignment): Adjust.
20592
20593 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
20594
20595 * decl2.c (key_method): Break out from...
20596 (import_export_vtable, import_export_class): ...here.
20597
20598 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20599 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20600
20601 * search.c (note_debug_info_needed, dfs_debug_mark,
20602 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
20603 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20604
20605 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
20606
20607 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20608 typos.
20609
20610 2000-03-02 Mark Mitchell <mark@codesourcery.com>
20611
20612 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20613 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20614 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20615 (lang_type): Split gets_new into has_new and has_array_new.
20616 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20617 (TYPE_GETS_NEW): Split into ...
20618 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20619 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20620 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20621 (build_op_new_call): Don't declare.
20622 (build_new_1): Likewise.
20623 * call.c (build_op_new_call): Remove.
20624 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20625 instead of TYPE_NEEDS_DESTRUCTOR.
20626 (finish_struct_bits): Likewise.
20627 (add_implicitly_declared_members): Likewise.
20628 (check_field_decl): Likewise.
20629 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20630 correctly under the new ABI.
20631 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20632 instead of TYPE_NEEDS_DESTRUCTOR.
20633 (initialize_local_var): Likewise.
20634 (destroy_local_var): Likewise.
20635 (cp_finish_decl): Likewise.
20636 (register_dtor_fn): Likewise.
20637 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20638 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
20639 TYPE_VEC_DELETE_TAKES_SIZE here.
20640 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20641 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20642 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20643 (finish_destructor_body): Likewise.
20644 (maybe_build_cleanup_1): Likewise.
20645 * decl2.c (do_static_destruction): Likewise.
20646 * init.c (build_new_1): Make it static.
20647 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20648 (expand_cleanup_for_base): Likewise.
20649 (get_cookie_size): New function.
20650 (build_new_1): Handle array-new cookies correctly under the new
20651 ABI.
20652 (build_vec_delete_1): Likewise.
20653 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20654 (build_delete): Likewise.
20655 (build_vec_delete): Handle array-new cookies correctly under the new
20656 ABI.
20657 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20658 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20659 TYPE_HAS_ARRAY_NEW_OPERATOR.
20660 * ptree.c (print_lang_type): Check them.
20661 * search.c (context_for_name_lookup): Fix typo in comment.
20662 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20663 * tree.c (break_out_cleanups): Likewise.
20664 (build_cplus_array_test_1): Likewise.
20665 (cp_build_qualified_type_real): Likewise.
20666 * typeck.c (complete_type): Likewise.
20667
20668 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20669 the command-line, not the end.
20670
20671 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
20672
20673 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20674
20675 2000-03-02 Tom Tromey <tromey@cygnus.com>
20676
20677 * cp-tree.h (build_java_class_ref): Declare.
20678 * init.c (build_java_class_ref): No longer static.
20679 * except.c (expand_throw): Generate a Java-style `throw' if the
20680 thrown object is a "Java" object.
20681 (initialize_handler_parm): Generate a Java-style lookup of
20682 exception info if the caught object is a "Java" object.
20683 (catch_language, catch_language_init): New globals.
20684 (decl_is_java_type): New function.
20685 (expand_start_catch_block): Don't call push_eh_info() or
20686 push_eh_cleanup() when handling a Java-style "catch". Pass Java
20687 class reference to build_catch_block.
20688
20689 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20690
20691 * typeck.c (comptypes): Treat sizetype like its language equivalent.
20692
20693 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
20694
20695 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20696 to merge reference/pointer code and fix incorrect warnings.
20697
20698 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
20699
20700 * search.c (protected_accessible_p): Use context_for_name_lookup.
20701
20702 * init.c (construct_virtual_bases): Fix thinko.
20703 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20704
20705 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
20706
20707 * decl.c (current_function_decl): Move to toplev.c.
20708
20709 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
20710
20711 * pt.c (fn_type_unification): Unify return type, whenever
20712 provided.
20713 (get_bindings_real): Only pass return type when necessary.
20714 Remove explicit return type check.
20715 * class.c (resolve_address_of_overloaded_function): Pass desired
20716 return type to fn_type_unification.
20717
20718 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20719
20720 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20721 DECL_FIELD_SIZE.
20722 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20723 DECL_FIELD_SIZE.
20724 * rtti.c (expand_class_desc): Likewise.
20725 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20726 (THUNK_VCALL_OFFSET): Likewise.
20727 (THUNK_DELTA): Reflect changes in ../tree.h.
20728
20729 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
20730
20731 * search.c (protected_accessible_p): Also allow the access if
20732 the member is public in DERIVED. Lose TYPE parm.
20733 (friend_accessible_p): Lose TYPE parm.
20734 (accessible_p): Adjust.
20735
20736 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20737
20738 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20739 on things that are not sizes; ssize_binop deleted.
20740 Call size_diffop when appropriate.
20741 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20742 (build_primary_vtable, build_secondary_vtable): Likewise.
20743 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20744 Variable I is HOST_WIDE_INT.
20745 (get_vfield_offset): Pass proper types to size_binop.
20746 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20747 (finish_struct_1): Likewise.
20748 (skip_rtti_stuff): Arg N is now pointer to signed.
20749 (layout_class_type): Use size_zero_node.
20750 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20751 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20752 * decl.c (complete_arry_type): Pass proper types to size_binop.
20753 (xref_basetypes): BINFO_OFFSET is sizetype.
20754 * error.c (dump_expr): Don't use size_binop non-sizes.
20755 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20756 * init.c (construct_virtual_bases): Fix type error.
20757 (build_vec_delete_1): Pass proper type to size_binop and don't
20758 fold result.
20759 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20760 * rtti.c (get_base_offset): Pass proper type to size_binop.
20761 * search.c (dfs_find_vbases): Fix type error.
20762 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20763 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20764 * tree.c (debug_binfo): Variable N is signed.
20765 Use HOST_WIDE_INT_PRINT_DEC.
20766 * typeck.c (comptypes): sizetype is same as equivalent integer type.
20767 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20768 size_one_node and size_zero_node.
20769 (c_alignof): Use size_one_node.
20770 (build_component_addr): Pass proper types to size_binop.
20771 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20772
20773 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
20774
20775 Implement class scope using-declarations for functions.
20776 * class.c (handle_using_decl): Call add_method for used functions.
20777 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20778 (add_method): Used functions are hidden by local functions.
20779 (check_bases_and_members): Handle using-decls before finalizing
20780 CLASSTYPE_METHOD_VEC.
20781 * call.c (add_function_candidate): Add ctype parm; if nonzero,
20782 override the type of 'this' accordingly.
20783 (add_template_candidate, add_template_candidate_real): Add ctype parm.
20784 (convert_class_to_reference, build_user_type_conversion_1,
20785 build_new_function_call, build_object_call, build_new_op,
20786 build_new_method_call): Pass ctype parm.
20787
20788 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20789 the baselink.
20790 * call.c (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, build_op_delete_call): Don't get basetype_path
20793 from a baselink.
20794 * typeck.c (build_component_ref): Likewise.
20795 * init.c (build_offset_ref): Likewise.
20796 (resolve_offset_ref): Don't call enforce_access.
20797 Call build_scoped_ref.
20798 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
20799 would cause an error or if -pedantic.
20800 * class.c (alter_access): Lose binfo parm.
20801
20802 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20803
20804 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20805 types.
20806
20807 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
20808
20809 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20810 pseudo_type_info creation into the std namespace
20811
20812 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20813
20814 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20815 (import_export_class): Remove declaration.
20816 * decl2.c (import_export_class): Make it static.
20817 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20818 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20819 EXPR_WITH_FILE_LOCATION.
20820 * lex.c (check_newline): Tweak filename/lineno setting.
20821 * semantics.c (begin_while_stmt): Fix typo in comment.
20822
20823 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20824
20825 * lang-options.h (-fmessage-length=): Add missing option.
20826
20827 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20828
20829 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
20830
20831 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20832
20833 2000-02-25 Jim Wilson <wilson@cygnus.com>
20834
20835 * optimize.c (expand_call_inline): Emit the return label before
20836 evaluating the return value.
20837
20838 2000-02-24 Mark Mitchell <mark@codesourcery.com>
20839
20840 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20841 than duplicating functionality here.
20842 * optimize.c: Include input.h.
20843 (expand_call_inline): Use push_srcloc and pop_srcloc.
20844 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20845 * parse.c: Regenerated.
20846 * Makefile.in (lex.o): Depend on input.h.
20847 (optimize.o): Likewise.
20848
20849 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
20850
20851 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20852 function type, rather than ICE.
20853
20854 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
20855
20856 * decl.c (grokdeclarator): Call decl_type_access_control.
20857 * parse.y (parse_end_decl): Don't call decl_type_access_control if
20858 decl is null.
20859
20860 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
20861
20862 * decl.c (decls_match): Remove obsolete static member nadgering.
20863
20864 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20865
20866 * decl.c (grokdeclarator): Change ANSI to ISO.
20867 * lex.c (consume_string, readescape, do_identifier): Likewise.
20868 (parse_float, real_yylex): Likewise.
20869 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20870 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20871 new_type_id, maybe_label_decls, simple_stmt,
20872 for.init.statement): Likewise.
20873 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20874 * semantics.c (finish_named_return_value): Likewise.
20875 * parse.c: Regenerate.
20876
20877 2000-02-21 Mark Mitchell <mark@codesourcery.com>
20878
20879 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20880 (CPTI_CLASS_STAR_TYPE): Remove.
20881 (vtable_index_type): Likewise.
20882 (class_star_type_node): Remove.
20883 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20884 (build_binary_op_nodefault): Remove.
20885 * call.c (build_new_op): Use build_binary_op instead of
20886 build_binary_op_nodefault.
20887 * decl.c (init_decl_processing): Remove class_star_type_node
20888 initialization. Make delta_type_node ptrdiff_type_node under the
20889 new ABI. Initialize vtable_index_type.
20890 (build_ptrmemfunc_type): Build different structures for the new
20891 ABI.
20892 (build_enumerator): Use build_binary_op instead of
20893 build_binary_op_nodefault.
20894 * method.c (build_overload_value): Mangle pointers-to-members
20895 appropriately under the new ABI.
20896 * typeck.c (build_array_ref): Use build_binary_op instead of
20897 build_binary_op_nodefault.
20898 (get_member_function_from_ptrfunc): Adjust for the new ABI.
20899 (build_binary_op_nodefault): Rename to ...
20900 (build_binary_op): ... this. Remove old version. Adjust for
20901 pointer-to-member comparisons under the new ABI.
20902 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
20903 (build_ptrmemfunc): Adjust for the new ABI.
20904 (expand_ptrmemfunc_cst): Likewise.
20905 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20906 (pfn_from_ptrmemfunc): Adjust for the new ABI.
20907
20908 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
20909
20910 * call.c (build_object_call): Compress consecutive calls to
20911 cp_error.
20912 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20913 (build_op_delete_call): Adjust message formatting.
20914
20915 * class.c (check_bases): Compress consecutive calls to
20916 cp_pedwarn.
20917 (finish_struct_anon): Say 'ISO C++'.
20918
20919 * decl.c (start_decl): Same here.
20920 (grok_reference_init): Likewise.
20921 (grokfndecl): Correct message formatting.
20922 (grokfndecl): Improve diagnostic.
20923 (check_static_variable_definition): Likewise. Say 'ISO C++'
20924 (compute_array_index_type): Say 'ISO C++'
20925 (create_array_type_for_decl): Compress consecutive calls to
20926 cp_error.
20927 (grokdeclarator): Say 'ISO C++'
20928 (grok_op_properties): Likewise.
20929
20930 * decl2.c (delete_sanity): Clairify diagnostic.
20931 (check_member_template): Same here.
20932 (grok_function_init): Use consistent terminology.
20933
20934 * expr.c (do_case): Say 'ISO C++'
20935
20936 * friend.c (do_friend): Compress consecutive calls to warning.
20937
20938 2000-02-20 Mark Mitchell <mark@codesourcery.com>
20939
20940 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20941 * class.c (build_secondary_vtable): Reorganize. Don't create a
20942 new vtable under the new ABI.
20943 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20944 computing the size.
20945 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20946 the initializing elements.
20947 (initialize_vtable): New function.
20948 (dfs_finish_vtbls): Use it.
20949 (dfs_accumulate_vtbl_inits): New function.
20950 (finish_vtbls): Merge primary and secondary vtables under the new
20951 ABI.
20952 (finish_struct_1): Remove redundant call to layout_vtable_decl.
20953 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20954 aren't VAR_DECLs.
20955
20956 * class.c (build_vtable): New function, split out from ...
20957 (get_vtable_decl): ... here, and ...
20958 (build_secondary_vtable): ... here.
20959
20960 * pt.c (tsubst_decl): Fix formatting.
20961
20962 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20963
20964 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20965 (avoid_overlap, build_base_field): Likewise.
20966 (build_base_field, build_base_fields, is_empty_class):
20967 Test DECL_SIZE with integer_zero.
20968 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20969 * cp-tree.h (struct lang_type): New field size_unit.
20970 (CLASSTYPE_SIZE_UNIT): New macro.
20971 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20972 (cp_finish_decl): Delete -Wlarger-than processing.
20973 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20974 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20975 * tree.c (make_binfo): binfo vector is one entry longer.
20976 (walk_tree): Walk DECL_SIZE_UNIT.
20977
20978 2000-02-19 Mark Mitchell <mark@codesourcery.com>
20979
20980 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20981 comment.
20982 (build_vtable_entry): Don't assume all vtable entries are
20983 functions.
20984 (build_vtbl_initializer): Adjust accordingly.
20985 (get_vtable_decl): Fix formatting.
20986
20987 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
20988
20989 * semantics.c (deferred_type_access_control): Walk the entire
20990 type_lookups list.
20991 (save_type_access_control): Rename from
20992 initial_deferred_type_access_control. Just remember the value.
20993 (decl_type_access_control): New fn.
20994 (begin_function_definition): Use deferred_type_access_control, after
20995 we've started the function. Set type_lookups to error_mark_node.
20996 * parse.y (frob_specs, fn.def1): Adjust.
20997 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20998 (parse_end_decl, parse_bitfield0, parse_method): New fns.
20999 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
21000 (after_type_component_declarator0): Likewise.
21001 (after_type_component_declarator): Likewise.
21002 (notype_component_declarator): Likewise.
21003 * cp-tree.h: Adjust.
21004
21005 * decl.c (redeclaration_error_message): Allow redeclaration of
21006 namespace-scope decls.
21007
21008 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
21009
21010 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
21011
21012 2000-02-17 Mark Mitchell <mark@codesourcery.com>
21013
21014 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
21015 * decl2.c (grokclassfn): Likewise.
21016
21017 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
21018
21019 * decl2.c (lang_decode_option): Don't set default message length
21020 here.
21021 * lex.c (lang_init_options): Set it here.
21022
21023 2000-02-16 Mark Mitchell <mark@codesourcery.com>
21024
21025 Make DECL_CONTEXT mean the class in which a member function was
21026 declared, even for a virtual function.
21027 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
21028 (DECL_FRIEND_CONTEXT): New macro.
21029 (DECL_REAL_CONTEXT): Remove.
21030 (SET_DECL_FRIEND_CONTEXT): Likewise.
21031 (DECL_VIRTUAL_CONTEXT): Adjust.
21032 (DECL_CLASS_SCOPE_P): Use TYPE_P.
21033 (add_friends): Remove.
21034 (hack_decl_function_context): Likewise.
21035 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
21036 CP_DECL_CONTEXT.
21037 (build_over_call): Fix indentation. Use DECL_CONTEXT
21038 instead of DECL_CLASS_CONTEXT.
21039 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
21040 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21041 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21042 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
21043 (build_base_field): Likewise.
21044 (finish_struct_1): Likewise.
21045 (build_self_reference): Likewise.
21046 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
21047 DECL_REAL_CONTEXT.
21048 (pushtag): Use decl_function_context, not
21049 hack_decl_function_context.
21050 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21051 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
21052 (pushdecl): Remove bogus code.
21053 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
21054 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21055 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21056 Use decl_function_context, nothack_decl_function_context.
21057 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
21058 (grokdeclarator): Likewise. Use decl_function_context, not
21059 hack_decl_function_context.
21060 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
21061 (start_function): Use DECL_FRIEND_CONTEXT, not
21062 DECL_CLASS_CONTEXT. Use decl_function_context, not
21063 hack_decl_function_context.
21064 (finish_function): Use decl_function_context, not
21065 hack_decl_function_context.
21066 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
21067 DECL_CLASS_CONTEXT.
21068 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
21069 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
21070 (grokfield): Likewise.
21071 (finish_builtin_type): Likewise.
21072 (finish_vtable_vardec): Use decl_function_context, not
21073 hack_decl_function_context.
21074 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21075 (start_static_initialization_or_destruction): Likewise.
21076 (finish_static_initialization_or_destruction): Likewise.
21077 (mark_used): Adjust logic for deciding when to synthesize methods.
21078 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
21079 DECL_REAL_CONTEXT.
21080 * error.c (dump_function_decl): Use DECL_CONTEXT, not
21081 DECL_CLASS_CONTEXT.
21082 * friend.c (is_friend): Likewise.
21083 (add_friends): Remove.
21084 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
21085 * lex.c (begin_definition_of_inclass_inline): Use
21086 decl_function_context, not hack_decl_function_context.
21087 (process_next_inline): Likewise.
21088 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21089 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
21090 DECL_CLASSS_CONTEXT.
21091 (hack_identifier): Likewise.
21092 (synthesize_method): Use decl_function_context, not
21093 hack_decl_function_context.
21094 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
21095 DECL_REAL_CONTEXT.
21096 (is_member_template): Use decl_function_context, not
21097 hack_decl_function_context. Use DECL_CONTEXT, not
21098 DECL_CLASS_CONTEXT.
21099 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
21100 DECL_CLASS_CONTEXT.
21101 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
21102 DECL_REAL_CONTEXT.
21103 (push_template_decl_real): Likewise.
21104 (instantiate_class_template): Don't call add_friends.
21105 (tsubst_default_argument): Use DECL_CONTEXT, not
21106 DECL_REAL_CONTEXT.
21107 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21108 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21109 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
21110 DECL_CLASS_CONTEXT.
21111 * repo.c (repo_inline_used): Likewise.
21112 * search.c (current_scope): Adjust for new _CONTEXT macros.
21113 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21114 DECL_REAL_CONTEXT.
21115 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21116 (lookup_fnfields_here):Likewise.
21117 (check_final_overrider): Likewise.
21118 (init_vbase_pointers): Likewise.
21119 (virtual_context): Likewise.
21120 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21121 (expand_body): Use decl_function_context, not
21122 hack_decl_function_context.
21123 * tree.c (hack_decl_function_context): Remove.
21124 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21125 DECL_CLASS_CONTEXT.
21126 * typeck2.c (error_not_base_type): Likewise.
21127
21128 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
21129
21130 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21131
21132 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21133
21134 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21135
21136 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
21137
21138 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21139
21140 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
21141
21142 * decl2.c (lang_decode_option): Enable automatic line wrapping.
21143
21144 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
21145
21146 * parse.y (frob_specs): Split out...
21147 (parse_decl): From here.
21148 (fn.def2): Call initial_deferred_type_access_control.
21149 (after_type_component_declarator0): Call frob_specs.
21150 (notype_component_declarator0): Likewise.
21151 * search.c (friend_accessible_p): Nested classes are friends of their
21152 enclosing classes.
21153
21154 2000-02-10 Mark Mitchell <mark@codesourcery.com>
21155
21156 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21157 used to create an implicit temporary.
21158
21159 * class.c (dfs_modify_vtables): Tweak calculation of functions to
21160 override.
21161
21162 2000-02-08 Nathan Sidwell <nathan@acm.org>
21163
21164 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21165 strip array element qualifiers too.
21166
21167 2000-02-07 Mark Mitchell <mark@codesourcery.com>
21168
21169 * decl.c (store_parm_decls): Don't build cleanups for parameters
21170 while processing_template_decl.
21171
21172 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
21173
21174 * cp-tree.h (struct saved_scope): Add incomplete field.
21175 (namespace_scope_incomplete): New macro.
21176 * decl.c (pushdecl): Use it.
21177 (hack_incomplete_structures): Use it. See through artificial
21178 binding levels.
21179 (mark_saved_scope): Mark it.
21180
21181 Implement access control for nested types.
21182 * search.c (type_access_control): New fn.
21183 (accessible_p): Now we do perform access control for types.
21184 * semantics.c (deferred_type_access_control): New fn.
21185 (initial_deferred_type_access_control): New fn.
21186 (begin_function_definition): Call it. Add lookups parm.
21187 * decl.c (struct binding_level): Add this_class field.
21188 (pushlevel_class): Set it.
21189 (mark_binding_level): Mark it.
21190 (lookup_name_real): Use it. Call type_access_control.
21191 (mark_saved_scope): Mark lookups field.
21192 * cp-tree.h (flagged_type_tree): Add lookups field.
21193 (struct saved_scope): Add lookups field.
21194 (type_lookups): New macro.
21195 * parse.y (declmods): Now <ftype>.
21196 (parse_decl): Add lookups parm. Call
21197 initial_deferred_type_access_control.
21198 (lang_extdef): Clear type_lookups.
21199 (typed_declspecs, declmods, typespec): Set lookups field.
21200 (initdcl): Call deferred_type_access_control.
21201 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21202 component_decl_1, named_parm): Adjust.
21203 * friend.c (is_friend): Nested classes are friends of their
21204 enclosing classes.
21205
21206 * class.c (currently_open_derived_class): New fn.
21207 * method.c (hack_identifier): Use it.
21208
21209 * lex.c (do_identifier): Remove obsolete code.
21210
21211 * parse.y (typed_typespecs): Propagate new_type_flag properly.
21212
21213 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
21214
21215 * tinfo.h: Remove apostrophes from C++ comment (xgettext
21216 thinks this file is plain C).
21217
21218 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21219
21220 * Makefile.in (call.o): Depend on $(EXPR_H).
21221
21222 * call.c: Include "expr.h".
21223
21224 * class.c (dump_class_hierarchy): Add prototype.
21225
21226 * search.c (dfs_get_pure_virtuals): Likewise.
21227
21228 2000-02-1 Ulrich Drepper <drepper@redhat.com>
21229
21230 * parse.y (simple_stmt): Allow :: token in asm parameter list.
21231 * parse.c: Rebuilt.
21232
21233 2000-01-31 Jim Wilson <wilson@cygnus.com>
21234
21235 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21236 Store it in DECL_FCONTEXT.
21237 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21238
21239 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
21240
21241 * tinfo.h (old abi): #include "tconfig.h".
21242 * tinfo.cc (convert_to_base): Move into old abi section.
21243
21244 2000-01-31 Mark Mitchell <mark@codesourcery.com>
21245
21246 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21247 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21248 (BINFO_PRIMARY_BINFO): New macro.
21249 (BF_DELTA): Rename to ...
21250 (BV_DELTA): ... this.
21251 (BF_VCALL_INDEX): Rename to ...
21252 (BV_VCALL_INDEX): ... this.
21253 (BF_FN): Rename to ...
21254 (BV_FN): ... this.
21255 * class.c (build_vbase_path): Adjust for changes to reverse_path.
21256 (set_rtti_entry): Rename BF_ macros to BV_ variants.
21257 (modify_vtable_entry): Simplify.
21258 (add_virtual_function): Rename BF_ macros to BV_ variants.
21259 (build_vtable_initializer): Likewise.
21260 (get_class_offset_1): Remove.
21261 (dfs_get_class_offset): Likewise.
21262 (get_class_offset): Likewise.
21263 (dfs_find_final_overrider): New function.
21264 (find_final_overrider): Likewise.
21265 (modify_one_vtable): Remove.
21266 (dfs_find_base): New function.
21267 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
21268 find_final_overrider.
21269 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
21270 virtuals.
21271 (dfs_fixup_vtable_deltas): Remove.
21272 (override_one_vtable): Remove.
21273 (merge_overrides): Likewise.
21274 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21275 unreal chilren of virtual bases.
21276 (finish_struct_1): Don't use merge_overrides. Don't use
21277 dfs_fixup_vtable_deltas.
21278 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21279 BINFOs.
21280
21281 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21282 Jason Merrill <jason@yorick.cygnus.com>
21283
21284 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21285
21286 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
21287
21288 * exception.cc (__throw_bad_typeid): Add missing std::.
21289
21290 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21291
21292 * cp-tree.h (make_thunk): PROTO -> PARAMS.
21293
21294 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
21295
21296 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21297
21298 Runtime support for new-abi rtti.
21299 * inc/typeinfo (type_info::operator!=): Define in class.
21300 (type_info::before, type_info::name, type_info::operator==,
21301 type_info::operator!=): Define new ABI implementations.
21302 (type_info::is_pointer_p, type_info::is_function_p): Declare
21303 new virtual functions.
21304 (type_info::do_catch, type_info::do_upcast): Likewise.
21305
21306 * tinfo.h (__base_class_info): Define new class.
21307 (__class_type_info): Likewise.
21308 (__si_class_type_info): Likewise.
21309 (__vmi_class_type_info): Likewise.
21310 (__dynamic_cast): Prototype.
21311
21312 * tinfo.cc: Conditionalize old and new rtti mechanisms.
21313 (type_info::is_pointer_p): Define new function.
21314 (type_info::is_function_p): Likewise.
21315 (type_info::do_catch): Likewise.
21316 (type_info::do_upcast): Likewise.
21317 (vtable_prefix): New structure for vtable access.
21318 (adjust_pointer): Define new template function.
21319 (contained_p, public_p, virtual_p, contained_public_p,
21320 contained_nonpublic_p, contained_nonvirtual_p): Define new
21321 functions.
21322 (nonvirtual_base_type): New local variable.
21323 (__class_type_info::~__class_type_info): Define.
21324 (__si_class_type_info::~__si_class_type_info): Likewise.
21325 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21326 (__class_type_info::do_catch): Define new function.
21327 (__class_type_info::do_upcast): Likewise.
21328 (__class_type_info::find_public_src): Likewise.
21329 (__class_type_info::do_find_public_src): Likewise.
21330 (__si_class_type_info::do_find_public_src): Likewise.
21331 (__vmi_class_type_info::do_find_public_src): Likewise.
21332 (__class_type_info::do_dyncast): Likewise.
21333 (__si_class_type_info::do_dyncast): Likewise.
21334 (__vmi_class_type_info::do_dyncast): Likewise.
21335 (__class_type_info::do_upcast): Likewise.
21336 (__si_class_type_info::do_upcast): Likewise.
21337 (__vmi_class_type_info::do_upcast): Likewise.
21338 (__dynamic_cast): Likewise.
21339
21340 * tinfo2.cc (__fundamental_type_info): Define new class.
21341 (__pointer_type_info): Likewise.
21342 (__reference_type_info): Likewise.
21343 (__array_type_info): Likewise.
21344 (__function_type_info): Likewise.
21345 (__enum_type_info): Likewise.
21346 (__ptr_to_member_type_info): Likewise.
21347 (__fundamental_type_info::~__fundamental_type_info): Define.
21348 (__pointer_type_info::~__pointer_type_info): Likewise.
21349 (__reference_type_info::~__reference_type_info): Likewise.
21350 (__array_type_info::~__array_type_info): Likewise.
21351 (__function_type_info::~__function_type_info): Likewise.
21352 (__enum_type_info::~__enum_type_info): Likewise.
21353 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21354 (__pointer_type_info::do_catch): Define new function.
21355 (__ptr_to_member_type_info::do_catch): Define new function.
21356
21357 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21358 (__is_pointer): Likewise.
21359
21360 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21361
21362 2000-01-30 Mark Mitchell <mark@codesourcery.com>
21363
21364 * cp/class.c (build_vtable): Rename to build_primary_vtable.
21365 (prepare_fresh_vtable): Rename to build_secondary_vtable.
21366 (make_new_vtable): New function.
21367 (modify_vtable_entry): Handle generation of new vtables correctly.
21368 (modify_one_vtable): Remove unused parameter.
21369 (dfs_fixup_vtable_deltas): Likewise.
21370 (override_one_vtable): Use build_secondary_vtable.
21371 (finish_struct_1): Use build_primary_vtable and
21372 build_secondary_vtable.
21373
21374 2000-01-28 Ulrich Drepper <drepper@redhat.com>
21375
21376 * cp/decl.c: Adjust variable names, comments, help strings.
21377
21378 2000-01-29 Nathan Sidwell <nathan@acm.org>
21379
21380 * new2.cc (operator delete[]): Use operator delete, don't assume
21381 implementation.
21382
21383 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
21384
21385 * class.c (build_vtbl_initializer): Add argument to
21386 build_vtable_entry call.
21387
21388 2000-01-27 Mark Mitchell <mark@codesourcery.com>
21389
21390 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21391 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21392 (BF_DELTA): New macro.
21393 (BF_VCALL_INDEX): Likewise.
21394 (BF_FN): Likewise.
21395 (THUNK_VCALL_OFFSET): Likewise.
21396 (make_thunk): Change prototype.
21397 * class.c (build_vtable_entry): Integrate
21398 build_vtable_entry_for_fn. Handle vcall indices.
21399 (build_vtable_entry_for_fn): Remove.
21400 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
21401 BF_VCALL_INDEX, BF_FN.
21402 (modify_vtable_entry): Integrate common code from
21403 modify_one_vtable and dfs_fixup_vtable_deltas.
21404 (add_virtual_function): Set BF_VCALL_INDEX.
21405 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
21406 and BF_FN.
21407 (modify_one_vtable): Simplify.
21408 (dfs_fixup_vtable_deltas): Likewise.
21409 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21410 * method.c (make_thunk): Handle vcall indices.
21411
21412 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
21413
21414 Compiler side new abi rtti (not enabled).
21415 * cp-tree.h (new_abi_rtti_p): New macro.
21416 (emit_support_tinfos): Prototype new function.
21417 (tinfo_decl_p): Likewise.
21418 (emit_tinfo_decl): Likwise.
21419 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21420 macros.
21421 (doing_runtime): New local static.
21422 (init_rtti_processing): Add new-abi initializer.
21423 (get_tinfo_decl): Add new-abi logic.
21424 (tinfo_from_decl): Likewise.
21425 (build_dynamic_cast_1): Likewise.
21426 (qualifier_flags): New static function.
21427 (tinfo_base_init): Likewise.
21428 (generic_initializer): Likewise.
21429 (ptr_ref_initializer): Likewise.
21430 (ptmd_initializer): Likewise.
21431 (class_hint_flags): Likewise.
21432 (class_initializer): Likewise.
21433 (synthesize_tinfo_var): Likewise.
21434 (create_real_tinfo_var): Likewise.
21435 (create_pseudo_type_info): Likewise.
21436 (get_vmi_pseudo_type_info): Likewise.
21437 (create_tinfo_types): Likewise.
21438 (emit_support_tinfos): New global function.
21439 (tinfo_decl_p): New global predicate.
21440 (emit_tinfo_decl): New global function.
21441 * class.c (set_rtti_entry): Generalize for old and new rtti.
21442 (build_vtbl_initializer): Likewise.
21443 * decl2.c (finish_file): Likewise.
21444
21445 2000-01-27 Jim Wilson <wilson@cygnus.com>
21446
21447 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21448 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21449
21450 2000-01-27 Mike Stump <mrs@wrs.com>
21451
21452 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21453 for scopes.
21454
21455 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
21456
21457 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21458
21459 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
21460
21461 * optimize.c (calls_setjmp_r): Supply new argument
21462 to special_function_p.
21463
21464 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21465
21466 * call.c: PROTO -> PARAMS.
21467 * class.c: Likewise.
21468 * cp-tree.h: Likewise.
21469 * cvt.c: Likewise.
21470 * decl.c: Likewise.
21471 * decl.h: Likewise.
21472 * decl2.c: Likewise.
21473 * dump.c: Likewise.
21474 * errfn.c: Likewise.
21475 * error.c: Likewise.
21476 * except.c: Likewise.
21477 * expr.c: Likewise.
21478 * init.c: Likewise.
21479 * input.c: Likewise.
21480 * lex.c: Likewise.
21481 * lex.h: Likewise.
21482 * method.c: Likewise.
21483 * optimize.c: Likewise.
21484 * parse.y: Likewise.
21485 * pt.c: Likewise.
21486 * repo.c: Likewise.
21487 * rtti.c: Likewise.
21488 * search.c: Likewise.
21489 * semantics.c: Likewise.
21490 * spew.c: Likewise.
21491 * tree.c: Likewise.
21492 * typeck.c: Likewise.
21493 * typeck2.c: Likewise.
21494 * xref.c: Likewise.
21495
21496 2000-01-25 Richard Henderson <rth@cygnus.com>
21497
21498 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21499
21500 2000-01-25 Mark Mitchell <mark@codesourcery.com>
21501
21502 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21503 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21504 (struct vcall_offset_data_s): New type.
21505 (dfs_vcall_offset_queue_p): New function.
21506 (dfs_build_vcall_offset_vtbl_entries): Likewise.
21507 (build_vcall_offset_vtbl_entries): Likewise.
21508 (layout_vtable_decl): Likewise.
21509 (num_vfun_entries): Likewise.
21510 (num_extra_vtbl_entries): Add the entries for vcall offsets.
21511 (build_vtbl_initializer): Likewise.
21512 (dfs_finish_vtabls): Use layout_vtable_decl.
21513 (modify_one_vtables): Always duplicate vtables under the new ABI.
21514 (finish_struct_1): Use layout_vtable_decl.
21515
21516 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21517
21518 * decl.c (member_function_or_else): Change third arg from a format
21519 specifier to an `enum overload_flags'. Callers changed.
21520
21521 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
21522
21523 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21524 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21525 build_const_cast, get_delta_difference, check_return_expr): Avoid
21526 ANSI string concatenation usage.
21527
21528 2000-01-24 Mark Mitchell <mark@codesourcery.com>
21529
21530 * class.c (layout_class_type): Put the fields required to make a
21531 class non-empty at the end, not the beginning, of the TYPE_FIELDs
21532 list.
21533
21534 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
21535
21536 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21537 template.
21538
21539 * decl2.c (mark_used): Do instantiate inlines that have been
21540 explicitly instantiated.
21541
21542 2000-01-24 Richard Henderson <rth@cygnus.com>
21543
21544 * call.c (build_over_call): Use expand_tree_builtin.
21545 * typeck.c (build_function_call_real): Likewise.
21546 (build_binary_op_nodefault): Handle unordered compares.
21547
21548 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21549
21550 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21551 cp_tree_index values.
21552 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21553 New global node #defines for them.
21554 * rtti.c (call_void_fn): Replace with ...
21555 (build_runtime_decl): ... new static function.
21556 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21557 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21558 (build_dynamic_cast_1): Always produce correctly typed result.
21559 Explicitly produce type_info addresses. Use dynamic_cast_node.
21560 * exception.cc (__throw_bad_cast): Return `void *'.
21561 (__throw_bad_typeid): Return `const type_info &'.
21562
21563 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21564
21565 * cp-tree.h (get_vtable_decl): Prototype new function.
21566 * class.c (get_vtable_decl): New function. Broken out from ...
21567 (build_vtable): ... here. Use it.
21568 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21569 by get_vtable_decl.
21570
21571 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21572
21573 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21574 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21575 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21576 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21577 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21578 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21579 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21580 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21581 (CPTI_TINFO_VAR_ID): New enumeration.
21582 (__tp_desc_type_node, __access_mode_type_node,
21583 __bltn_desc_type_node, __user_desc_type_node,
21584 __class_desc_type_node, __ptr_desc_type_node,
21585 __attr_desc_type_node, __func_desc_type_node,
21586 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21587 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21588 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21589 enum_desc_type_node, class_desc_type_node,
21590 si_class_desc_type_node, vmi_class_desc_type_node,
21591 ptmd_desc_type_node, base_desc_type_node): New #defines.
21592 (tinfo_fn_id, tinfo_fn_type): Rename to ...
21593 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21594 (tinfo_var_id): New enumeration.
21595 (DECL_TINFO_FN_P): Augment comment.
21596 * decl.c (cp_global_trees): Adjust documentation.
21597 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21598 tinfo_decl_type and tinfo_var_id.
21599 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21600 (build_typeid): Remove unused variable.
21601 (get_tinfo_var): Use tinfo_var_id.
21602 (tinfo_name): New static function.
21603 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21604 (tinfo_from_decl): Likewise.
21605 (get_base_offset): New static function, broken out of
21606 expand_class_desc.
21607 (expand_si_desc): Use tinfo_name.
21608 (expand_class_desc): Likewise. Lose local static variable.
21609 Use base_desc_type_node. Use get_base_offset.
21610 (expand_ptr_desc): Use tinfo_name.
21611 (expand_attr_desc): Likewise.
21612 (expand_generic_desc): Likewise.
21613
21614 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21615 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21616
21617 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21618
21619 * cp-tree.h (__eprintf): Remove declaration.
21620 * tree.c (__eprintf): Remove definition.
21621
21622 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
21623 Mark Mitchell <mark@codesourcery.com>
21624
21625 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21626 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21627
21628 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
21629
21630 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21631
21632 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21633
21634 * cp-tree.h (register_dtor_fn): New function.
21635 * decl.c (destroy_local_static): Rename to ...
21636 (register_dtor_fn): ... this. Give it external linkage.
21637 (expand_static_init): Use it.
21638 * decl2.c (do_static_initialization): Likewise, if using
21639 __cxa_atexit.
21640 (do_static_destruction): Check that __cxa_atexit is not in use.
21641 (finish_file): Don't call do_static_destruction if using
21642 __cxa_atexit.
21643
21644 * typeck.c (convert_arguments): Restore two-message error
21645 reporting.
21646
21647 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
21648
21649 Remap dynamic cast hint values to be consistent across ABIs.
21650 * search.c (dynamic_cast_base_recurse): Remap generated value.
21651 (get_dynamic_cast_base_type): Adjust documentation.
21652 * tinfo.h (__user_type_info::dyncast): Likewise.
21653 (__user_type_info::find_public_subobj): Remap BOFF meaning.
21654 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21655 (__class_type_info::do_dyncast): Likewise.
21656 (__class_type_info::do_find_public_subobj): Likewise.
21657 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21658
21659 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21660
21661 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21662
21663 * typeck2.c (incomplete_type_error): Restore previous
21664 cp_error and cp_error_at call sequence.
21665
21666 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
21667
21668 * class.c (dump_class_hierarchy): Make format agree with argument;
21669 cast pointer to unsigned long and print with %lx.
21670
21671 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21672
21673 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21674
21675 * typeck.c (composite_pointer_type, common_type,
21676 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21677 build_function_call_real, convert_arguments,
21678 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21679 build_unary_op, mark_addressable, build_compound_expr,
21680 build_static_cast, build_reinterpret_cast, build_const_cast,
21681 build_c_cast, build_modify_expr, get_delta_difference,
21682 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21683 'ISO C++'. Fusion consecutive calls to diagnostic message routines
21684 into a single one.
21685 * typeck2.c (readonly_error, abstract_virtuals_error,
21686 process_init_constructor, check_for_new_type): Likewise.
21687
21688 2000-01-19 Mark Mitchell <mark@codesourcery.com>
21689
21690 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21691 VAR_DECLs.
21692
21693 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
21694
21695 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21696 (build_x_typeid): Likewise.
21697 (get_tinfo_fn): Likewise.
21698 (get_tinfo_fn_unused): Rename to ...
21699 (get_tinfo_decl): ... here.
21700 * rtti.c (build_headof): Replace logic error with assertion.
21701 (get_tinfo_fn_dynamic): Rename to ...
21702 (get_tinfo_decl_dynamic): ... here. Make static. Use
21703 complete_type_or_else.
21704 (build_x_typeid): Move into ...
21705 (build_typeid): ... here. Adjust call to
21706 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21707 throw_bad_typeid expression.
21708 (get_tinfo_fn_unused): Rename to ...
21709 (get_tinfo_decl): ... here. Adjust comment.
21710 (get_tinfo_fn): Delete.
21711 (tinfo_from_decl): New static function.
21712 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21713 (get_typeid): Use complete_type_or_else.
21714 (build_dynamic_cast_1): Adjust calls to
21715 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21716 * parse.y (primary): Adjust call to build_typeid.
21717 * except.c (build_eh_type_type_ref): Adjust call to
21718 get_tinfo_decl. Mark as used.
21719 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21720 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21721 * parse.c: Regenerated.
21722
21723 2000-01-17 Mark Mitchell <mark@codesourcery.com>
21724
21725 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
21726 calling convention.
21727 (resolves_to_fixed_type_p): Document calling convention.
21728 * rtti.c (build_x_typeid): Initialize NONNULL.
21729
21730 * cp-tree.h (build_shared_int_cst): New function.
21731 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21732 * class.c (modify_vtable_entry): Likewise.
21733 (add_virtual_function): Split out code to generated shared
21734 INTEGER_CSTs to build_share_int_cst.
21735 (modify_all_vtables): Handle all the overridden functions here.
21736 Add overridden functions from non-primary virtual bases to the
21737 primary vtable.
21738 (finish_struct_1): Adjust call to modify_all_vtables. Add
21739 overridden functions from non-primary bases to the vtable.
21740 * tree.c (build_shared_int_cst): New function.
21741
21742 * cp-tree.h (scratchalloc): Remove.
21743 (build_scratch_list): Likewise.
21744 * call.c (convert_class_to_reference): Replace build_scratch_list
21745 and build_expr_list with build_tree_list.
21746 (add_candidate): Replace scratchalloc with expralloc. Note memory
21747 leak.
21748 (build_user_type_conversion_1): Replace build_scratch_list
21749 and build_expr_list with build_tree_list.
21750 (build_new_op): Likewise.
21751 (build_op_delete_call): Likewise.
21752 (convert_like): Likewise.
21753 * cvt.c (ocp_convert): Likewise.
21754 * decl.c (start_decl): Likewise.
21755 (start_function): Likewise.
21756 (finish_destructor_body): Likewise.
21757 (maybe_build_cleanup_1): Likewise.
21758 * decl2.c (reparse_decl_as_expr): Likewise.
21759 * init.c (perform_member_init): Likewise.
21760 (expand_cleanup_for_base): Likewise.
21761 (build_builtin_delete_call): Likewise.
21762 (build_new_1): Likewise.
21763 (build_delete): Likewise.
21764 * method.c (do_build_assign_ref): Likewise.
21765 * parse.y (already_scoped_stmt): Likewise.
21766 (nontrivial_exprlist): Likewise.
21767 (net_initializer): Likewise.
21768 (initlist): Likewise.
21769 * parse.c: Regenerated.
21770 * rtti.c (build_x_typeid): Likewise.
21771 (build_dynamic_cast_1): Likewise.
21772 * typeck.c (build_x_compound_expr): Likewise.
21773 (build_static_cast): Likewise.
21774 (build_modify_expr): Likewise.
21775
21776 * cp-tree.h (DECL_VINDEX): Add documentation.
21777 * class.c (build_vtable_entry): Likewise.
21778 (start_vtable): Add comment.
21779 (add_virtual_function): Replace pending_hard_virtuals with
21780 overridden_virtuals and pending_virtuals with new_virtuals.
21781 Replace redundant assignments with assertions.
21782 (check_for_override): Add comment.
21783 (check_bases_and_members): Replace pending_hard_virtuals with
21784 overridden_virtuals and pending_virtuals with new_virtuals.
21785 (create_vtbl_ptr): Likewise.
21786 (layout_class_type): Likewise.
21787 (finish_struct_1): Likewise. Add comments.
21788
21789 2000-01-16 Mark Mitchell <mark@codesourcery.com>
21790
21791 * class.c (finish_struct_1): Replace redundant code with
21792 assertions.
21793
21794 * cp-tree.h (flag_new_abi): Move.
21795 (flag_use_cxa_atexit): Likewise.
21796 (flag_honor_std): Likewise.
21797 (flag_rtti): Likewise.
21798 (vbase_offsets_in_vtable_p): Define.
21799 (vptrs_present_everywhere_p): Likewise.
21800 (TYPE_CONTAINS_VPTR_P): Likewise.
21801 (dfs_walk_real): Declare.
21802 * class.c (build_vbase_pointer_fields): Check
21803 vbase_offsets_in_vtable_p.
21804 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21805 BINFO_VPTR_FIELD.
21806 (build_vbase_offset_vtbl_entries): Simplify.
21807 (build_vbase_offset_vtbl_entries): Adjust.
21808 (build_vbase_pointer): Add ability to look up vbase offsets in
21809 vtable.
21810 (start_vtable): New function.
21811 (add_virtual_function): Use it.
21812 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21813 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21814 (build_vtbl_initializer): Take the type of the complete object as
21815 input. Use it to correctly calculate vbase offsets.
21816 (dfs_finish_vtbls): Pass the complete type to
21817 build_vtbl_initializer.
21818 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21819 (create_vtable_ptr): Create a vtable even if there are no
21820 new virtual functions, under the new ABI.
21821 (finish_struct_1): Likewise.
21822 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21823 * decl.c (exapnd_static_init): Remove call to
21824 preserve_initializer.
21825 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21826 vtables.
21827 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21828 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21829 (construct_virtual_bases): Don't initialize virtual base pointers
21830 under the new ABI.
21831 (build_aggr_init): Clean up comment.
21832 (expand_aggr_init_1): Likewise.
21833 * rtti.c (expand_class_desc): Store the virtual function table
21834 index where the vbase offset lives in the offset field.
21835 * search.c (dfs_walk_real): Make it global.
21836 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21837 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21838
21839 * tinfo.h (USItype): Make it signed under the new ABI.
21840 * tinfo.cc (convert_to_base): New function. Encapsulate base
21841 conversion logic here.
21842 (__class_type_info::do_upcast): Use it.
21843 (__class_type_info::do_dyncast): Likewise.
21844 (__class_type_info::do_find_public_subobj): Likewise.
21845
21846 * init.c (construct_virtual_bases): Don't look up the addresses of
21847 virtual bases at run-time.
21848
21849 * class.c (build_vbase_pointer): Relocate.
21850 (build_vbase_pointer_fields): Likewise.
21851 (dfs_build_vbase_offset_vtbl_entries): Likewise.
21852 (build_vbase_offset_vtbl_entries): Likewise.
21853
21854 * decl.c (init_decl_processing): Complain if -fnew-abi
21855 -fno-vtable-thunks is used.
21856
21857 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21858 flag_new_abi.
21859
21860 2000-01-15 Mark Mitchell <mark@codesourcery.com>
21861
21862 * cp-tree.h (num_extra_vtbl_entries): New function.
21863 (size_extra_vtbl_entries): Likewise.
21864 (dfs_vtable_path_unmark): Likewise.
21865 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21866 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21867 * class.c (num_extra_vtbl_entries): New function.
21868 (size_extra_vtbl_entries): Likewise.
21869 (dfs_build_vbase_offset_vtbl_entries): New function.
21870 (build_vbase_offset_vtbl_entries): Likewise.
21871 (build_vtbl_initializer): Use it.
21872 (finish_struct_1): Adjust vtable sizes (using
21873 num_extra_vtbl_entries).
21874 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21875 THUNK_DECL is non-NULL before expanding it.
21876 * init.c (expand_virtual_init): Adjust the vtable pointer by
21877 size_extra_vtbl_entries before storing it.
21878 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21879 Handle TREE_LIST parameters here, not in the dfs_* functions.
21880 (dfs_unmarked_real_bases_queue_p): Adjust.
21881 (dfs_marked_real_bases_queue_p): Likewise.
21882 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21883 (dfs_vtable_path_marked_real_bases_queue_p): New function.
21884 (dfs_vtable_path_unmark): Likewise.
21885
21886 2000-01-14 Mark Mitchell <mark@codesourcery.com>
21887
21888 * optimize.c (copy_body_r): Clear the operand three of a
21889 TARGET_EXPR when copying it.
21890
21891 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21892
21893 * method.c (build_decl_overload_real): Check whether we are in ::
21894 before returning __builtin_new/delete.
21895
21896 2000-01-13 Mark Mitchell <mark@codesourcery.com>
21897
21898 * pt.c (tsubst_friend_function): Improve comment.
21899 (instantiate_decl): Avoid crashing when a "nested" function is
21900 instantiated from the top level.
21901
21902 * dump.c (dqeueue_and_dump): Dump
21903 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21904
21905 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21906
21907 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21908
21909 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
21910
21911 * g++spec.c (lang_specific_driver): Add -fnew-abi if
21912 ENABLE_NEW_GXX_ABI defined.
21913 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21914 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21915 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21916
21917 2000-01-12 Mark Mitchell <mark@codesourcery.com>
21918
21919 * decl.c (start_cleanup_fn): Call pushdecl.
21920
21921 * call.c (convert_class_to_reference): Fix typos.
21922 (build_conditional_expr): Handle errors gracefully.
21923 * class.c (push_nested_class): Likewise.
21924 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21925 (DECL_THIS_EXTERN): Use it.
21926 (DECL_THIS_STATIC): Likewise.
21927 * cvt.c (convert_to_void): Handle errors gracefully.
21928 (build_expr_type_conversion): Likewise.
21929 * decl.c (maybe_push_decl): Likewise.
21930 (start_decl_1): Likewise.
21931 (require_complete_types_for_parms): Likewise.
21932 * parse.y (structsp): Likewise.
21933 (base_class): Likewise.
21934 * parse.c: Regenerated.
21935 * pt.c (finish_member_template_decl): Likewise.
21936 * typeck.c (decay_conversion): Likewise.
21937
21938 * cp-tree.h (dfs_skip_vbases): New function.
21939 (find_vbase_instance): Likewise.
21940 * class.c (determine_primary_base): Allow a nearly empty base to
21941 serve as a primary base class under the new ABI.
21942 (get_class_offset_1): Rename to ...
21943 (dfs_get_class_offset): ... this. Simplify. Don't issue error
21944 messages here.
21945 (get_class_offset): Use it. Issue error messages here.
21946 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21947 find the right copies of virtual bases.
21948 (fixup_vtable_deltas1): Rename to ...
21949 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
21950 bases as primary bases.
21951 (fixup_vtable_deltas): Remove.
21952 (override_one_vtable): Handle virtual bases as primary bases.
21953 (merge_overrides): Likewise.
21954 (finish_struct_1): Likewise.
21955 (dump_class_hierarchy): Dump primary-ness of bases as well.
21956 * search.c (mark_primary_bases): Use a pre-order traversal to
21957 handle primary virtual bases.
21958 (dfs_skip_vbases): New fiunction.
21959 (expand_upcast_fixups): Adjust to handle primary virtual bases.
21960 (fixup_virtual_upcast_offsets): Likewise.
21961 (fixup_all_virtual_upcast_offsets): Likewise.
21962 (dfs_find_vbase_instances): New function.
21963 (find_vbase_instance): Likewise.
21964
21965 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
21966
21967 * lex.c (DIR_SEPARATOR): Delete macro.
21968
21969 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
21970
21971 * decl2.c (lang_decode_option): Handle automatic line wrapping
21972 option.
21973
21974 2000-01-11 Mark Mitchell <mark@codesourcery.com>
21975
21976 * friend.c (do_friend): Don't resolve scopes when processing
21977 template declarations, even if the qualifying scope doesn't
21978 involve template parameters.
21979
21980 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
21981
21982 * class.c (dfs_modify_vtables_queue_p): Remove.
21983 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21984 and dfs_marked_real_bases_queue_p instead of
21985 dfs_modify_vtables_queue_p.
21986
21987 * class.c (build_vbase_path): Simplify.
21988 (dfs_propagate_binfo_offsets): New function.
21989 (propagate_binfo_offsets): Use it.
21990 (remove_base_field): Simplify.
21991 (dfs_set_offset_for_vbases): Remove.
21992 (dfs_set_offset_for_shared_vbases): New function.
21993 (dfs_set_offset_for_unshared_vbases): Likewise.
21994 (layout_virtual_bases): Use them.
21995 (layout_basetypes): Don't call propagate_binfo_offsets.
21996 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21997 for the vbases.
21998
21999 * class.c (build_base_field): New function, split out from ...
22000 (build_base_fields): ... here. Use it. Allocate primary bases
22001 first, under the new ABI.
22002 (get_vtable_entry): Remove.
22003 (remove_base_field): New function, split out from ...
22004 (remove_base_fields): ... here. Adjust since primary bases come
22005 first under the new ABI.
22006
22007 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
22008 (initialize_vtbl_ptrs): New function.
22009 (expand_indirect_vtbls_init): Change prototype.
22010 (convert_pointer_to_vbase): Declare.
22011 * init.c (expand_direct_vtbls_init): Remove.
22012 (dfs_initialize_vtbl_ptrs): New function.
22013 (initialize_vtbl_ptrs): Likewise.
22014 (emit_base_init): Use initialize_vtbl_ptrs.
22015 * search.c (convert_pointer_to_vbase): Make it global.
22016 (expand_indirect_vtbls_init): Remove vtable initialization code.
22017 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
22018
22019 * class.c (dfs_finish_vtbls): New function.
22020 (finish_vtbls): Use it.
22021 (dump_class_hierarchy): New function.
22022
22023 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
22024 (BINFO_VBASE_PRIMARY_P): New macro.
22025 (BINFO_VIRTUALS): Add to documentation.
22026 (SET_BINFO_PRIMARY_MARKED_P): Remove.
22027 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22028 (dfs_mark_primary_bases_queue_p): Likewise.
22029 (dfs_unmarked_real_bases_queue_p): New function.
22030 (dfs_marked_real_bases_queue_p): Likewise.
22031 * search.c (dfs_mark_primary_bases): Adjust.
22032 (mark_primary_bases): Likewise.
22033 (get_shared_vbase_if_not_primary): New function.
22034 (dfs_unmarked_real_bases_queue_p): Likewise.
22035 (dfs_marked_real_bases_queue_p): Likewise.
22036 (dfs_get_pure_virtuals): Simplify.
22037 (get_pure_virtuals): Likewise.
22038
22039 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22040
22041 * lex.c: Include tm_p.h.
22042
22043 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
22044
22045 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
22046
22047 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
22048
22049 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
22050 * pt.c (instantiate_decl): Defer comdat templates that might not be
22051 needed.
22052
22053 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
22054 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
22055 (finish_file): Likewise.
22056
22057 * decl2.c (import_export_class): Undo 12/14 change.
22058
22059 * error.c (dump_decl): operator new, not operatornew.
22060
22061 * class.c (field_decl_cmp): A nontype is "greater" than a type.
22062 * search.c (lookup_field_1): Look for the last field with the
22063 desired name.
22064
22065 2000-01-05 Nathan Sidwell <nathan@acm.org>
22066
22067 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
22068 FUNCTION_DECL.
22069
22070 2000-01-05 Nathan Sidwell <nathan@acm.org>
22071
22072 * typeck.c (build_static_cast): Don't strip target qualifiers
22073 when casting from a class.
22074
22075 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22076
22077 * class.c (warn_hidden): Initialize variable `fndecl'.
22078
22079 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
22080
22081 * decl.c (flag_isoc9x): New variable to be able to use code in
22082 c-common.c. For now always zero.
22083
22084 2000-01-03 Mark Mitchell <mark@codesourcery.com>
22085
22086 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
22087 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
22088 or unshare_base_binfos for virtual bases here.
22089 * search.c (dfs_get_vbase_types): Do it here.
22090 (get_vbase_types): Adjust.
22091
22092 2000-01-02 Mark Mitchell <mark@codesourcery.com>
22093
22094 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
22095 (BINFO_PRIMARY_MARKED_P): Use flag 5.
22096 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22097 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22098 (unmark_primary_bases): Remove declaration.
22099 (unmarkedp): Declare.
22100 (dfs_vbase_unmark): Likewise.
22101 * class.c (determine_primary_base): Return immediately if there
22102 are no base classes. Call mark_primary_bases here.
22103 (modify_all_direct_vtables): Remove.
22104 (modify_all_indirect_vtables): Remove.
22105 (dfs_modify_vtables_queue_p): New function.
22106 (dfs_modify_vtables): New function.
22107 (modify_all_vtables): Use them.
22108 (build_base_fields): Build FIELD_DECLs for primary virtual base
22109 classes.
22110 (create_vtable_ptr): Don't call determine_primary_base here.
22111 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22112 (dfs_set_offset_for_vbases): ... this.
22113 (layout_virtual_bases): Use it.
22114 (layout_class_type): Call determine_primary_base here.
22115 * search.c (unmarkedp): Make it global.
22116 (shared_marked_p): Simplify.
22117 (shared_unmarked_p): Likewise.
22118 (dfs_primary_bases_queue_p): Remove.
22119 (dfs_unmark_primary_bases): Likewise.
22120 (unmark_primary_bases): Likewise.
22121 (mark_primary_bases): Simplify.
22122 (get_pure_virtuals): Don't call mark_primary_bases here.
22123 (dfs_vbase_unmark): New function.
22124 (get_vbase_types): Simplify.
22125
22126 * class.c (struct base_info): Remove.
22127 (determine_primary_base): Take has_virtual_p rather than a
22128 base_info as input. Don't calculate max_has_virtual.
22129 (finish_struct_bits): Remove max_has_virtual argument.
22130 (create_vtable_ptr): Remove max_has_virtual_p argument.
22131 (layout_virtual_bases): Remove max argument.
22132 (layout_basetypes): Likewise.
22133 (layout_class_type): Remove max_has_virtual_p argument.
22134 (finish_struct_1): Remove max_has_virtual.
22135
22136 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22137 (layout_basetypes): Remove.
22138 * class.c (propagate_binfo_offsets): Moved here from tree.c.
22139 Update to handle primary virtual bases.
22140 (remove_base_fields): New function, split out from
22141 layout_basetypes.
22142 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22143 (layout_virtual_bases): New function, split out from
22144 layout_basetypes. Update to handle primary virtual bases.
22145 (layout_basetypes): Moved here from tree.c. Use
22146 remove_base_fields and layout_virtual_bases.
22147 * search.c (dfs_mark_primary_bases_queue_p): New function.
22148 (mark_primary_bases): Use it.
22149 * tree.c (CEIL): Remove.
22150 (propagate_binfo_offsets): Remove.
22151 (layout_basetypes): Remove.
22152
22153 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22154
22155 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22156 (BINFO_PRIMARY_MARKED_P): New macro.
22157 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22158 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22159 (mark_primary_bases): New function.
22160 (unmark_primary_bases): Likewise.
22161 * search.c (get_abstract_virtuals_1): Remove.
22162 (dfs_mark_primary_bases): New function.
22163 (mark_primary_bases): Likewise.
22164 (dfs_unmark_primary_bases): Likewise.
22165 (unmark_primary_bases): Likewise.
22166 (dfs_get_pure_virtuals): Likewise.
22167
22168 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22169
22170 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22171 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22172 (modify_one_vtable): Adjust.
22173 (fixup_vtable_deltas1): Likewise.
22174 (override_one_vtable): Likewise.
22175 * search.c (get_abstract_virtuals_1): Likewise.
22176 (get_pure_virtuals): Likewise.
22177 (expand_upcast_fixups): Likewise.
22178 * tree.c (debug_binfo): Likewise.
22179
22180 * class.c (build_vtable): Don't return a value. Don't rebuild
22181 vtables for bases that have already been handled.
22182 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22183 already been handled.
22184 (modify_one_vtable): Adjust accordingly.
22185 (fixup_vtable_deltas1): Likewise.
22186 (finish_struct_1): Likewise.
22187
22188 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
22189
22190 * call.c (build_new_method_call): Also check destructors.