init.c (build_new_1): Deal with an OVERLOAD set when looking up for _Jv_AllocObject.
[gcc.git] / gcc / cp / ChangeLog
1 2003-12-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2
3 * init.c (build_new_1): Deal with an OVERLOAD set when
4 looking up for _Jv_AllocObject.
5 * except.c (build_throw): Likewise for _Jv_Throw.
6
7 2003-12-08 Jason Merrill <jason@redhat.com>
8
9 PR c++/11971
10 * tree.c (build_local_temp): Split out from build_cplus_new.
11 (force_target_expr): New fn.
12 * call.c (call_builtin_trap): Call it. Take a type parm.
13 (convert_arg_to_ellipsis): Pass it.
14 (build_x_va_arg): Use call_builtin_trap.
15
16 PR c++/11929
17 * call.c (magic_varargs_p): New fn.
18 (build_over_call): Do no ellipsis conversions for arguments to
19 functions with magic varargs.
20
21 * name-lookup.c, init.c, except.c: Revert Giovanni's patch from
22 yesterday.
23
24 Give the anonymous namespace a null DECL_NAME.
25 * cp-tree.h: Don't declare anonymous_namespace_name.
26 * decl.c: Don't define it.
27 * dump.c (cp_dump_tree): Don't check for it.
28 * cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise.
29 * error.c (dump_decl): Likewise.
30 * name-lookup.c: Define it here.
31 (push_namespace): Put it in DECL_ASSEMBLER_NAME instead.
32 * mangle.c (write_unqualified_name): Adjust.
33
34 2003-12-07 Giovanni Bajo <giovannibajo@gcc.gnu.org>
35
36 PR c++/2294
37 * name-lookup.c (push_overloaded_decl): Always construct an
38 OVERLOAD unless the declaration is a built-in.
39 (set_namespace_binding): While binding OVERLOADs with only one
40 declaration, we still need to call supplement_binding.
41 * init.c (build_new_1): Deal with an OVERLOAD set when
42 looking up for _Jv_AllocObject.
43 * except.c (build_throw): Likewise for _Jv_Throw.
44
45 2003-12-06 Mark Mitchell <mark@codesourcery.com>
46
47 PR c++/13323
48 * class.c (same_signature_p): Handle conversion operators
49 correctly.
50 (check_for_override): Likewise.
51
52 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
53
54 * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
55 (c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
56 (c++.uninstall): Likewise.
57
58 2003-12-05 Danny Smith <dannysmith@gcc.gnu.org>
59 Mark Mitchell <mark@codesourcery.com>
60
61 PR c++/13305
62 * parser.c (cp_parser_elaborated_type_specifier): Accept
63 attributes.
64
65 2003-12-05 Mark Mitchell <mark@codesourcery.com>
66
67 PR c++/13314
68 * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
69 calls.
70 (cp_parser_class_head): Likewise.
71
72 2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
73
74 PR c++/13166
75 * parser.c (cp_parser_late_parsing_default_args): Make sure the
76 context is a class before calling push_nested_class and
77 pop_nested_class.
78
79 2003-12-03 James E Wilson <wilson@specifixinc.com>
80
81 * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
82 support.
83
84 2003-12-03 Mark Mitchell <mark@codesourcery.com>
85
86 PR c++/9127
87 * cp-tree.h (at_namespace_scope_p): New function.
88 * parser.c (cp_parser_class_head): Handle invalid explicit
89 specializations.
90 * search.c (at_namespace_scope_p): New function.
91
92 PR c++/13179
93 * semantics.c (finish_handler_parms): Do not call eh_type_info for
94 types used in templates.
95
96 PR c++/10771
97 * parser.c (cp_parser_check_for_invalid_template_id): New
98 function.
99 (cp_parser_simple_type_specifier): Use it.
100 (cp_parser_elaborated_type_specifier): Likewise.
101 (cp_parser_class_head): Likewise.
102
103 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
104
105 PR c++/10126
106 * pt.c (convert_nontype_argument): Handle default conversions
107 while converting a pointer to member function.
108
109 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
110
111 PR c++/12573
112 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
113 looking into them recursively.
114
115 2003-12-02 Richard Henderson <rth@redhat.com>
116
117 * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
118 * parser.c (struct cp_token): Likewise.
119 (struct cp_parser_token_tree_map_node): Likewise.
120 * lex.c (struct resword): Move const after ENUM_BITFIELD.
121
122 2003-11-30 Mark Mitchell <mark@codesourcery.com>
123
124 PR c++/9849
125 * parser.c (cp_lexer_prev_token): New function.
126 (cp_parser_skip_to_closing_parenthesis): Add consume_paren
127 parameter.
128 (cp_parser_nested_name_specifier_opt): Add is_declaration
129 parameter.
130 (cp_parser_nested_name_specifier): Likewise.
131 (cp_parser_class_or_namespace_name): Likewise.
132 (cp_parser_class_name): Likewise.
133 (cp_parser_template_id): Likewise.
134 (cp_parser_template_name): Likewise.
135 (cp_parser_id_expression): Adjust calls to
136 cp_parser_nested_name_specifier_op, cp_parser_template_id,
137 cp_parser_class_name.
138 (cp_parser_unqualified_id): Likewise.
139 (cp_parser_postfix_expression): Likewise.
140 (cp_parser_pseudo_destructor_name): Likewise.
141 (cp_parser_cast_expression): Likewise.
142 (cp_parser_mem_initializer_id): Likewise.
143 (cp_parser_simple_type_specifier): Likewise.
144 (cp_parser_type_name): Likewise.
145 (cp_parser_elaborated_type_specifier): Likewise.
146 (cp_parser_qualified_namespace_specifier): Likewise.
147 (cp_parser_using_declaration): Likewise.
148 (cp_parser_using_directive): Likewise.
149 (cp_parser_ptr_operator): Likewise.
150 (cp_parser_declarator_id): Likewise.
151 (cp_parser_class_head): Likewise.
152 (cp_parser_base_specifier): Likewise.
153 (cp_parser_constructor_declarator_p): Likewise.
154 (cp_parser_direct_declarator): Fix typo in comment.
155 (cp_parser_parenthesized_expression_list): Adjust call to
156 cp_parser_skip_to_closing_parenthesis.
157 (cp_parser_selection_statement): Likewise.
158
159 2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
160
161 PR c++/12924
162 * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
163 with OVERLOAD and DECL nodes as the first operand.
164
165 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
166
167 * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
168
169 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
170
171 PR c++/5369
172 * friend.c (is_friend): Handle member function of a class
173 template as template friend.
174 (do_friend): Likewise.
175 * decl2.c (check_classfn): Add template_header_p parameter.
176 * decl.c (start_decl): Adjust check_classfn call.
177 (grokfndecl): Likewise.
178 * pt.c (is_specialization_of_friend): New function.
179 (uses_template_parms_level): Likewise.
180 (push_template_decl_real): Use uses_template_parms_level.
181 (tsubst_friend_function): Adjust check_classfn call.
182 * cp-tree.h (check_classfn): Adjust declaration.
183 (uses_template_parms_level): Add declaration.
184 (is_specialization_of_friend): Likewise.
185
186 2003-11-21 Mark Mitchell <mark@codesourcery.com>
187
188 PR c++/12515
189 * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
190 operator.
191
192 2003-11-21 Jan Hubicka <jh@suse.cz>
193
194 * parser.c (cp_parser_postfix_expression): Initialize 's' to
195 NULL_TREE.
196
197 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
198
199 * Make-lang.in (c++.extraclean): Delete.
200
201 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
202
203 * Make-lang.in (check-g++, lang_checks): Add.
204
205 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
206
207 PR c++/12932
208 * class.c (currently_open_derived_class): Check if
209 current_class_type is NULL_TREE.
210 * semantics.c (finish_call_expr): Check if
211 currently_open_derived_class returns NULL_TREE.
212 * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
213 parameter.
214
215 2003-11-17 Jason Merrill <jason@redhat.com>
216
217 * init.c (build_new_1): Preevaluate placement args.
218 * call.c (build_op_delete_call): Don't expose placement args to
219 overload resolution.
220
221 2003-11-16 Jason Merrill <jason@redhat.com>
222
223 * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
224 and TAGS files that include them for each front end.
225
226 2003-11-15 Bernardo Innocenti <bernie@develer.com>
227
228 PR c++/2294
229 * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
230 build failure on libjava.
231
232 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
233
234 PR c++/2294
235 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
236 unless the declaration is a built-in.
237 (set_namespace_binding): While binding OVERLOADs with only one
238 declaration, we still need to call supplement_binding.
239
240 2003-11-14 Mark Mitchell <mark@codesourcery.com>
241
242 PR c++/12762
243 * parser.c (cp_parser_enclosed_template_argument_list): New
244 function.
245 (cp_parser_template_id): Use it.
246 (cp_parser_simple_type_specifier): Recognize invalid template
247 syntax.
248
249 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
250
251 PR c++/2094
252 * pt.c (unify): Add support for PTRMEM_CST and
253 FIELD_DECL unification.
254
255 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
256
257 * decl.c (grokfndecl): Change OK to type tree.
258
259 2003-11-12 Mark Mitchell <mark@codesourcery.com>
260
261 * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
262 CONSTRUCTOR.
263
264 * decl.c (cp_make_fname_decl): When creating a top-level
265 __FUNCTION__-like symbol, do register it with pushdecl.
266
267 * decl.c (finish_case_label): Do not check that we are within a
268 switch statement here.
269 * parser.c (struct cp_parser): Add in_iteration_statement_p and
270 in_switch_statement_p.
271 (cp_parser_new): Initialize them.
272 (cp_parser_labeled_statement): Check validity of case labels
273 here.
274 (cp_parser_selection_statement): Set in_switch_statement_p.
275 (cp_parser_iteration_statement): Set in_iteration_statement_p.
276 (cp_parser_jump_statement): Check validity of break/continue
277 statements here.
278
279 PR c++/12735
280 * cp-tree.h (duplicate_decls): Return a tree.
281 * decl.c (duplicate_decls): Clarify documentation. Return
282 error_mark_node to indicate a failed redeclaration.
283 * friend.c (do_friend): Handle that case.
284 * name-lookup.c (pushdecl): Likewise.
285
286 2003-11-11 Jason Merrill <jason@redhat.com>
287
288 * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
289 * name-lookup.c (parse_using_directive): New fn.
290 (is_associated_namespace): New fn.
291 (arg_assoc_namespace): Also check associated namespaces.
292 * name-lookup.h: Declare new fns.
293 * pt.c (maybe_process_partial_specialization): Allow
294 specialization in associated namespace.
295 * parser.c (cp_parser_using_directive): Accept attributes. Use
296 parse_using_directive.
297
298 2003-11-10 Richard Henderson <rth@redhat.com>
299
300 * cvt.c (convert_to_void): Use void_zero_node after overload failure.
301
302 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
303
304 PR c++/12832
305 * name-lookup.c (supplement_binding): Gracefully handle names
306 used at non-class scope prior declaration.
307
308 2003-11-06 Matt Austern <austern@apple.com>
309
310 * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
311 * method.c (use_thunk): give thunk same visibility as function.
312 * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
313
314 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
315
316 PR c++/11616
317 * pt.c (instantiate_pending_templates): Save and restore
318 input_location.
319
320 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
321
322 PR c++/2019
323 * friend.c (add_friend): Don't display previous declaration in
324 case of duplicate friend warning.
325
326 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
327
328 PR c++/9810
329 * call.c (build_over_call): Check access using primary template
330 if FN is a member function template.
331
332 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
333
334 PR c++/12796
335 * class.c (handle_using_decl): Set input_location before calling
336 error_not_base_type.
337
338 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
339
340 PR c++/10371
341 * semantics.c (finish_non_static_data_member): Handle when
342 both processing_template_decl and qualifying_scope are true.
343
344 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
345
346 PR c++/11076
347 * class.c (handle_using_decl): Swap arguments of error_not_base_type.
348 * parser.c (cp_parser_direct_declarator): Only resolve typename for
349 namespace scope declarations.
350
351 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
352
353 PR c++/12698, c++/12699, c++/12700, c++/12566
354 * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
355 (debug_class, debug_thunks): New.
356 * class.c (dump_class_hierarchy_1): New break out from ...
357 (dump_class_hierarchy): ... here.
358 (dump_thunk, debug_thunks, debug_class): New.
359 (update_vtable_entry_for_fn): Add ssizetype casts. Correct
360 continued search for primary binfo via virtual.
361 (build_vtbl_initializer): Follow covariant thunk alias.
362 * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
363 (finish_thunk): Look for an alias of the covariant thunk and point
364 to it.
365 (use_thunk): We should never use an alias.
366 * semantics.c (emit_associated_thunks): Do not emit aliases.
367
368 PR c++/12566
369 * cp-tree.h (cp_fname_init): Add TYPE pointer param.
370 * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
371 create an ad-hoc ERROR_MARK.
372 (cp_make_fname_decl): Adjust.
373 * pt.c (tsubst_expr): Adjust.
374
375 2003-10-23 Jason Merrill <jason@redhat.com>
376
377 PR c++/12726
378 * tree.c (build_target_expr_with_type): Don't call force_rvalue
379 for CONSTRUCTORs.
380
381 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
382
383 * call.c: Fix comment formatting.
384 * class.c: Likewise.
385 * cxx-pretty-print.c: Likewise.
386 * init.c: Likewise.
387 * parser.c: Likewise.
388 * pt.c: Likewise.
389 * semantics.c: Likewise.
390 * tree.c: Likewise.
391 * typeck.c: Likewise.
392 * typeck2.c: Likewise.
393
394 2003-10-21 Mark Mitchell <mark@codesourcery.com>
395
396 PR c++/11962
397 * typeck.c (build_x_conditional_expr): Handle missing middle
398 operands in templates.
399 * mangle.c (write_expression): Issue errors about attempts to
400 mangle a non-existant middle operator to the ?: operator.
401
402 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
403 * decl.c (cp_finish_decl): Remove clause intended for asm directives
404 in struct or class fields: this code is never executed.
405
406 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
407
408 * decl.c (start_decl): Exit if push_template_decl returns
409 error_mark_node.
410
411 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
412
413 * ChangeLog: Fix typos.
414 * call.c: Fix comment typos.
415 * class.c: Likewise.
416 * cp-tree.h: Likewise.
417 * cvt.c: Likewise.
418 * cxx-pretty-print.c: Likewise.
419 * decl.c: Likewise.
420 * decl2.c: Likewise.
421 * init.c: Likewise.
422 * mangle.c: Likewise.
423 * name-lookup.c: Likewise.
424 * parser.c: Likewise.
425 * search.c: Likewise.
426 * semantics.c: Likewise.
427 * tree.c: Likewise.
428 * typeck.c: Likewise.
429
430 2003-10-20 Jan Hubicka <jh@suse.cz>
431
432 * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
433 the expansion.
434
435 2003-10-20 Mark Mitchell <mark@codesourcery.com>
436
437 * Make-lang.in (c++.install-info): Remove.
438
439 2003-10-20 Jason Merrill <jason@redhat.com>
440
441 * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
442 field.
443
444 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
445
446 PR c++/9781, c++/10583, c++/11862
447 * decl.c (cp_finish_decl): Exit immediately if decl is an
448 error_mark_node.
449 * pt.c (push_template_decl_real): Return error_mark_node for
450 invalid template declaration of variable.
451
452 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
453
454 PR c++/12495
455 * pt.c (lookup_template_class): Handle when current_class_type
456 is a local class.
457
458 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
459
460 PR c++/2513
461 * decl.c (make_typename_type): Use dependent_type_p.
462 (make_unbound_class_template): Likewise.
463 * pt.c (instantiate_class_template): Increment
464 processing_template_decl during substitution of template friend
465 function. Preincrement processing_template_decl rather than
466 postincrement.
467 (get_mostly_instantiated_function_type): Increment
468 processing_template_decl during partial substitution of function
469 type.
470
471 2003-10-15 Jan Hubicka <jh@suse.cz>
472
473 PR c++/12574
474 * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
475
476 2003-10-14 Jason Merrill <jason@redhat.com>
477
478 PR c++/11878
479 * tree.c (build_target_expr_with_type): Call force_rvalue for
480 classes with non-trivial copy ctors.
481
482 PR c++/11063
483 * typeck.c (build_modify_expr): Call convert rather than abort.
484
485 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
486
487 Breack out decl.c (3/n)
488 * name-lookup.c: Include flags.h
489 (lookup_name_current_level): Make static.
490 (add_decl_to_level): Likewise.
491 (push_local_binding): Likewise.
492 (push_overloaded_decl): Likewise.
493 (lookup_using_namespace): Likewise.
494 (qualified_lookup_using_namespace): Likewise.
495 (lookup_type_current_level): Likewise.
496 (unqualified_namespace_lookup): Likewise.
497 (namespace_ancestor): Likewise.
498 (push_using_directive): Likewise.
499 * decl.c (pushdecl): Move to name-lookup.c.
500 (pushdecl_top_level_1): Likewise.
501 (pushdecl_top_level): Likewise.
502 (pushdecl_top_level_and_finish): Likewise.
503 (maybe_push_decl): Likewise.
504 (push_using_decl): Likewise.
505 (push_overloaded_decl): Likewise.
506 (make_anon_name): Likewise.
507 (anon_cnt): Likewise.
508 (clear_anon_tags): Likewise.
509 (maybe_inject_for_scope_var): Likewise.
510 (check_for_out_of_scope_variable): Likewise.
511 * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
512 * decl.c (warn_extern_redeclared_static): Export.
513 * cp-tree.h (warn_extern_redeclared_static): Declare.
514
515 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
516
517 * Make-lang.in: Replace uses of $(target_alias) with
518 $(target_noncanonical).
519
520 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
521
522 * ChangeLog: Add PR number to patch for PR c++/12370.
523
524 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
525
526 * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
527 (binding_for_name): Likewise.
528 (cxx_binding_clear): Move to name-lookup.c.
529 * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
530 (binding_for_name): Likewise.
531 * decl2.c (is_ancestor): Move to name-lookup.c
532 (namespace_ancestor): Likewise.
533 (add_using_namespace): Likewise.
534 (ambiguous_decl): Likewise.
535 (lookup_using_namespace): Likewise.
536 (qualified_lookup_using_namespace): Likewise.
537 (set_decl_namespace): Likewise.
538 (decl_namespace): Likewise.
539 (current_decl_namespace): Likewise.
540 (push_decl_namespace): Likewise.
541 (pop_decl_namespace): Likewise.
542 (push_scope): Likewise.
543 (pop_scope): Likewise.
544 (struct arg_lookup): Likewise.
545 (arg_assoc): Likewise.
546 (arg_assoc_args): Likewise.
547 (arg_assoc_type): Likewise.
548 (add_function): Likewise.
549 (arg_assoc_namespace): Likewise.
550 (arg_assoc_class): Likewise.
551 (arg_assoc_template_arg): Likewise.
552 (do_namespace_alias): Likewise.
553 (validate_nonmember_using_decl): Likewise.
554 (do_nonmember_using_decl): Likewise.
555 (do_toplevel_using_decl): Likewise.
556 (do_local_using_decl): Likewise.
557 (do_class_using_decl): Likewise.
558 (do_using_directive): Likewise.
559 (constructor_name_full): Likewise.
560 (constructor_name): Likewise.
561 (constructor_name_p): Likewise.
562
563 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
564
565 Break out decl.c (2/n)
566 * name-lookup.c: Include diagnostic.h
567 (cxx_binding_free): Make static.
568 (cxx_binding_make): Likewise.
569 (binding_table_new): Likewise
570 (binding_table_free): Likewise.
571 (binding_table_insert): Likewise.
572 (binding_table_find_anon_type): Likewise.
573 (binding_table_reverse_maybe_remap): Likewise.
574 (supplement_binding): Likewise.
575 * name-lookup.h (global_scope_name): Declare extern.
576 (global_type_node): Likewise.
577 (cxx_binding_free): Don't export.
578 (cxx_binding_make): Likewise.
579 (binding_table_new): Likewise.
580 (binding_table_free): Likewise.
581 (binding_table_insert): Likewise.
582 (binding_table_find_anon_type): Likewise.
583 (binding_table_reverse_maybe_remap): Likewise.
584 * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
585 * decl.c (lookup_namespace_name): Move to name-lookup.c
586 (select_decl): Likewise.
587 (unqualified_namespace_lookup): Likewise.
588 (lookup_qualified_name): Likewise.
589 (lookup_name_real): Likewise.
590 (lookup_name_nonclass): Likewise.
591 (lookup_function_nonclass): Likewise.
592 (lookup_name): Likewise.
593 (lookup_name_current_level): Likewise.
594 (lookup_type_current_level): Likewise.
595 (lookup_flags): Likewise.
596 (qualify_lookup): Likewise.
597 (lookup_tag): Likewise.
598 (lookup_tag_reverse): Likewise.
599 (getdecls): Likewise.
600 (storedecls): Remove.
601 (cxx_remember_type_decls): Move to name-lookup.c.
602 (global_bindings_p): Likewise.
603 (innermost_nonclass_level): Likewise.
604 (toplevel_bindings_p): Likewise.
605 (namespace_bindings_p): Likewise.
606 (kept_level_p): Likewise.
607 (innermost_scope_kind): Likewise.
608 (template_parm_scope_p): Likewise.
609 (push_binding): Likewise.
610 (push_local_binding): Likewise.
611 (add_decl_to_level): Likewise. Make extern.
612 (push_class_binding): Move to name-lookup.c.
613 (resume_level): Likewise. Rename to resume_scope.
614 (begin_scope): Move to name-lookup.c.
615 (indent): Likewise.
616 (binding_depth): Likewise.
617 (is_class_level): Likewise.
618 (cxx_scope_descriptor): Likewise.
619 (cxx_scope_debug): Likewise.
620 (namespace_scope_ht_size): Likewise.
621 (leave_scope): Likewise.
622 (pushlevel_class): Likewise.
623 (poplevel_class): Likewise.
624 (clear_identifier_class_values): Likewise.
625 (pushdecl_with_scope): Likewise.
626 (pushdecl_namespace_level): Likewise.
627 (pushdecl_class_level): Likewise.
628 (push_class_level_binding): Likewise.
629 (push_using_directive): Likewise.
630 (identifier_global_value): Likewise.
631 (keep_next_level_flag): Likewise.
632 (keep_next_level): Likewise.
633 (free_binding_level): Likewise.
634 (set_class_shadows): Likewise.
635 (maybe_push_cleanup_level): Likewise.
636 (cp_namespace_decls): Likewise.
637 (bt_print_entry): Likewise.
638 (print_binding_level): Likewise.
639 (print_other_binding_stack): Likewise.
640 (print_binding_stack): Likewise.
641 (push_namespace): Likewise.
642 (pop_namespace): Likewise.
643 (push_nested_namespace): Likewise.
644 (pop_nested_namespace): Likewise.
645 (cxx_saved_binding_make): Likewise.
646 (struct cxx_saved_binding_make): Likewise.
647 (store_bindings): Likewise.
648 (maybe_push_to_top_level): Likewise.
649 (push_to_top_level): Likewise.
650 (pop_from_top_level): Likewise.
651 (identifier_type_value): Likewise.
652 (set_identifier_type_value): Likewise.
653 (set_identifier_type_value_with_scope): Likewise.
654 (pop_everything): Likewise.
655 (pushtag): Likewise.
656 (follow_tag_typedef): Likewise.
657 (maybe_process_template_type_declaration): Likewise.
658 (pop_binding): Likewise.
659 * cp-tree.h: Move corresponding declarations to name-lookup.h
660
661 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
662
663 * cvt.c (ocp_convert): Move warning to C common code.
664
665 2003-10-09 Jason Merrill <jason@redhat.com>
666
667 PR c++/6392
668 * tree.c (build_cplus_array_type): Handle all quals the same.
669 (cp_build_qualified_type_real): Look through arrays first.
670
671 * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
672 (build_target_expr_with_type): Likewise.
673
674 * pt.c (instantiate_class_template): Sanity check that our
675 enclosing class has been instantiated.
676
677 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
678
679 * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
680 * error.c (dump_function_decl): Use it to skip the dump of the
681 arguments.
682 (dump_expr): When dumping a declaration found within an
683 expression, always set TFF_NO_FUNCTION_ARGUMENTS
684 in the flags.
685
686 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
687
688 PR c++/11097
689 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
690 USING_DECL.
691
692 2003-10-06 Mark Mitchell <mark@codesourcery.com>
693
694 PR c++/10147
695 * call.c (initialize_reference): Tweak error message.
696 * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
697 pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
698 * cxx-pretty-print.c (pp_cxx_id_expression): Always display
699 qualified entities using qualified names.
700
701 PR c++/12337
702 * init.c (build_new_1): Make sure that the expression returned is
703 not an lvalue.
704
705 PR c++/12344, c++/12236, c++/8656
706 * decl.c (start_function): Do not ignore attributes embedded in a
707 function declarator.
708
709 2003-10-06 Mark Mitchell <mark@codesourcery.com>
710
711 * Make-lang.in (c++.info): Remove.
712 (c++.dvi): Remove.
713 (c++.generated-manpages): Replace with ...
714 (generated-manpages): ... this.
715
716 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
717
718 * decl.c (struct cp_binding_level): Move to name-lookup.h
719 (current_binding_level): Likewise.
720 (class_binding_level): Likewise.
721 * cp-tree.h (enum scope_kind): Likewise.
722
723 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
724
725 * name-lookup.c (binding_entry_free): Nullify name and type
726 fields.
727
728 2003-10-02 Mark Mitchell <mark@codesourcery.com>
729
730 PR c++/12486
731 * typeck.c (finish_class_member_access_expr): Issue diagnostic
732 on erroneous use of qualified name.
733
734 2003-09-30 Richard Henderson <rth@redhat.com>
735
736 PR c++/12370
737 * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
738
739 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
740
741 * g++spec.c: Convert to ISO C90 prototypes.
742 * parser.c: Likewise.
743
744 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
745
746 * decl.c (pop_binding): Don't mess with nullifying binding->scope
747 here.
748 * name-lookup.c: Re-format.
749 (cxx_binding_free): Nullify binding->scope.
750
751 2003-09-29 Jan Hubicka <jh@suse.cz>
752
753 PR C++/12047
754 * except.c (build_eh_type_type): Call mark_used on the type.
755
756 2003-09-28 Richard Henderson <rth@redhat.com>
757
758 * typeck.c (c_expand_asm_operands): Take location_t, instead of
759 individual file and line.
760
761 2003-09-28 Andreas Jaeger <aj@suse.de>
762
763 * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
764 definition.
765 * init.c (push_base_cleanups): Likewise.
766 * decl2.c (finish_file): Likewise.
767 * mangle.c (init_mangle): Likewise.
768 (dump_substitution_candidates): Likewise.
769 * search.c: Likewise.
770
771 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
772
773 * name-lookup.h (get_global_value_if_present): New function.
774 (is_typename_at_global_scope): Likewise.
775 * except.c (do_begin_catch): Use get_global_value_if_present.
776 (do_end_catch): Likewise.
777 (do_allocate_exception): Likewise.
778 (do_free_exception): Likewise.
779 (build_throw): Likewise.
780 * parser.c (cp_parser_member_declaration): Likewise.
781 * rtti.c (throw_bad_cast): Likewise.
782 (throw_bad_typeid): Likewise.
783 * decl.c (check_tag_decl): Use is_typename_at_global_scope.
784 (grokdeclarator): Likewise.
785 * cp-tree.h (global_namespace): Move to name-lookup.h
786 * call.c (call_builtin_trap): Tidy.
787
788 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
789
790 PR c++/11415
791 * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
792 error message when parser->scope is global_namespace.
793
794 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
795
796 * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
797 macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
798
799 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
800
801 * decl.c (pop_binding_level, suspend_binding_level,
802 find_class_binding_level): Merge into leave_scope. Remove.
803 (leave_scope): New function.
804 (poplevel): Update.
805 (poplevel_class): Likewise.
806 (pop_namespace): Likewise.
807
808 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
809
810 PR c++/5655
811 * parser.c (cp_parser_check_access_in_redeclaration): New function.
812 (cp_parser_member_declaration): Use it.
813 (cp_parser_template_declaration_after_export): Likewise.
814
815 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
816
817 * cp-tree.h (scope_kind): Add new enumerator.
818 (keep_next_level): Change parameter type to bool.
819 (begin_scope): Change prototype.
820 (pushlevel): Remove declaration.
821 * decl.c (push_binding_level): Fold in begin_scope. Remove.
822 (struct cp_binding_level): Remove tag_tranparent field. Make keep
823 of bitsize one.
824 (keep_next_level_flag): Make a bool.
825 (cxx_scope_descriptor): Update scope names table
826 (make_cxx_scope): Fold in begin_scope. Remove..
827 (namespace_scope_ht_size): New function.
828 (begin_scope): Change prototype. Return a scope. Tidy.
829 (kept_level_p): Update.
830 (pushlevel): Remove.
831 (maybe_push_cleanup_level): Simplify.
832 (poplevel): Update for sk_cleanup and keep change.
833 (print_binding_level): Likewise.
834 (initial_push_namespace_scope): Fold in begin_scope. Remove.
835 (push_namespace): Update.
836 (pushtag): Likewise.
837 (lookup_tag): Likewise.
838 (lookup_name_current_level): Likewise.
839 (lookup_type_current_level): Likewise.
840 (cxx_init_decl_processing): Likewise.
841 (start_function): Likewise.
842 (begin_function_body): Likewise.
843 (start_method): Likewise.
844 * pt.c (push_inline_template_parms_recursive): Likewise.
845 (begin_template_parm_list): Likewise.
846 (begin_specialization): Likewise.
847 * semantics.c (do_pushlevel): Likewise.
848 (begin_compound_stmt): Likewise.
849 (begin_stmt_expr): Likewise.
850
851 2003-09-21 Richard Henderson <rth@redhat.com>
852
853 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
854 method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
855
856 2003-09-21 Richard Henderson <rth@redhat.com>
857
858 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
859 method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
860 DECL_SOURCE_LOCATION rename and change to const.
861
862 2003-09-20 Richard Henderson <rth@redhat.com>
863
864 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
865
866 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
867
868 PR c++/157
869 * parser.c (cp_parser_direct_declarator): Clear
870 parser->num_template_parameter_lists when parsing function
871 parameters.
872 (cp_parser_constructor_declarator_p): Likewise.
873
874 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
875
876 PR c++/495
877 * pt.c (tsubst_friend_class): Only use innermost template
878 arguments for the injected friend class template.
879
880 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
881
882 PR c++/12332
883 * pt.c (instantiate_class_template): Increment
884 processing_template_decl around the tsubst of a template member
885 function.
886
887 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
888
889 * decl.c (cxx_scope_descriptor): Fix thinko.
890 (struct cp_binding_level): Adjust type of binding_depth field.
891
892 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
893
894 PR c++/12320
895 * call.c (type_passed_as): Check for incomplete type.
896 (convert_for_arg_passing): Likewise.
897
898 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
899
900 PR c++/9848
901 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
902 here.
903 * semantics.c (expand_body): Set it here on the remaining clones.
904
905 2003-09-18 Roger Sayle <roger@eyesopen.com>
906
907 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
908 * class.c (instantiate_type): Remove FFS_EXPR case.
909
910 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
911
912 * ChangeLog: Fix recent commit.
913
914 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
915
916 * ChangeLog: Add PR number to patch for PR c++/12316.
917
918 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
919
920 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
921 "C" types.
922 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
923
924 2003-09-17 Richard Henderson <rth@redhat.com>
925
926 * semantics.c (expand_body): Don't save/restore input_location.
927
928 2003-09-17 Mark Mitchell <mark@codesourcery.com>
929
930 PR c++/12266
931 * cp-tree.h (tsubst_flags_t): Add tf_conv.
932 * class.c (standard_conversion): Pass tf_conv to
933 instantiate_type.
934 (resolve_address_of_overloaded_function): Do not call mark_used
935 when just checking conversions.
936
937 PR debug/12066
938 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
939 * cp-tree.h (cxx_builtin_type_decls): Declare.
940 * decl.c (builtin_type_decls): New variables.
941 (cxx_builtin_type_decls): New function.
942 (record_builtin_type): Add to builtin_type_decls.
943
944 2003-09-17 Richard Henderson <rth@redhat.com>
945
946 PR c++/12316
947 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
948
949 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
950
951 PR c++/7939
952 * typeck.c (comptypes): Don't ICE when its first argument is
953 error_mark_node.
954 (compparms): Reverse the arguments of same_type_p.
955
956 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
957
958 PR c++/12184
959 * typeck.c (convert_arguments): Return error_mark_node for an
960 incomplete parameter. Make error message more informative.
961
962 2003-09-12 Mark Mitchell <mark@codesourcery.com>
963
964 PR c++/3907
965 * class.c (maybe_note_name_used_in_class): Refine test for whether
966 or not we are in a class scope.
967
968 * cp-tree.h (language_function): Remove x_expanding_p.
969 (expanding_p): Remove.
970 (doing_semantic_analysis_p): Remove.
971 (scope_kind): Add sk_function_parms, sk_class,
972 sk_namespace.
973 (innermost_scope_kind): New method.
974 * call.c (cxx_type_promotes_to): Use type_decays_to.
975 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
976 (LANG_HOOKS_POPLEVEL): Likewise.
977 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
978 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
979 is_catch_scope. Add kind and explicit_spec_p.
980 (cxx_scope_descriptor): Use a lookup table.
981 (find_class_binding_level): Use "kind" field in binding_level, not
982 the various flags.
983 (pop_binding_level): Likewise.
984 (innermost_nonclass_level): Likewise.
985 (toplevel_bindings_p): Likewise.
986 (namespace_bindings_p): Likewise.
987 (template_parm_scope_p): Likewise.
988 (innermost_scope_kind): New method.
989 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
990 the various flags.
991 (pushlevel): Remove check for doing_semantic_analysis_p.
992 (begin_scope): Simplify.
993 (add_decl_to_level): Use "kind" field in binding_level, not
994 the various flags.
995 (push_local_binding): Likewise.
996 (pop_label): Remove check for doing_semantic_analysis_p.
997 (poplevel): Use "kind" field in binding_level, not
998 the various flags.
999 (set_block): Remove check for doing_semantic_analysis_p.
1000 (pushlevel_class): Use "kind" field in binding_level, not
1001 the various flags.
1002 (poplevel_class): Likewise.
1003 (initial_push_namespace_scope): Likewise.
1004 (maybe_push_to_top_level): Likewise.
1005 (set_identifier_type_value_with_scope): Likewise.
1006 (pop_everything): Likewise.
1007 (maybe_process_template_type_declaration): Likewise.
1008 (pushtag): Likewise.
1009 (pushdecl): Likewise.
1010 (pushdecl_with_scope): Likewise.
1011 (check_previous_goto_1): Likewise.
1012 (define_label): Likewise.
1013 (finish_case_label): Likewise.
1014 (lookup_tag): Likewise.
1015 (unqualified_namespace_lookup): Likewise.
1016 (lookup_name_real): Likewise.
1017 (lookup_name_current_level): Likewise.
1018 (lookup_type_current_level): Likewise.
1019 (record_builtin_type): Likewise.
1020 (cp_make_fname_decl): Likewise.
1021 (maybe_inject_for_scope_var): Likewise.
1022 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
1023 (start_function): Use begin_scope, not pushlevel.
1024 (finish_function): Use "kind" field in binding_level, not
1025 the various flags.
1026 (start_method): Use begin_scope, not pushlevel.
1027 (make_label_decl): Do not check expanding_p.
1028 (save_function-data): Do not set expanding_p.
1029 (cxx_push_function_context): Do not clear expanding_p.
1030 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
1031
1032 2003-09-14 Mark Mitchell <mark@codesourcery.com>
1033
1034 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
1035 an bit-field whose width exceeds that of its type.
1036
1037 2003-09-14 Geoffrey Keating <geoffk@apple.com>
1038
1039 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
1040
1041 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
1042
1043 * ChangeLog: Follow spelling conventions.
1044 * parser.c: Likewise.
1045
1046 2003-09-13 Richard Henderson <rth@redhat.com>
1047
1048 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
1049 during relaxation loop.
1050
1051 2003-09-11 David Edelsohn <edelsohn@gnu.org>
1052
1053 * decl2.c (var_finalized_p): Swap arms of conditional.
1054
1055 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
1056
1057 PR c++/11788
1058 * typeck.c (build_address): If it is a function, mark it used.
1059 (build_unary_op): Do not lose object's side-effects when taking
1060 address of static member function.
1061 * class.c (resolve_address_of_overloaded_function): Use
1062 tsubst_flags_t parameter. Only expect overload sets. Adjust.
1063 (instantiate_type): Adjust flags passing. Do not lose object's
1064 side-effects when taking address of static member function.
1065
1066 2003-09-11 Richard Henderson <rth@redhat.com>
1067
1068 * semantics.c (expand_or_defer_fn): Update for new
1069 cgraph_finalize_function argument.
1070
1071 2003-09-10 Richard Henderson <rth@redhat.com>
1072
1073 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
1074
1075 2003-09-10 Jan Hubicka <jh@suse.cz>
1076
1077 * decl2.c (var_finalized_p): New.
1078 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
1079
1080 2003-09-10 Richard Henderson <rth@redhat.com>
1081
1082 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
1083 mark_member_pointers.
1084 (lower_function): Remove.
1085 * cp-tree.h: Update to match.
1086 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
1087 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
1088
1089 2003-09-09 Richard Henderson <rth@redhat.com>
1090
1091 * semantics.c (expand_or_defer_fn): Update call to
1092 cgraph_finalize_function.
1093
1094 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1095 always.
1096
1097 * decl2.c (finish_file): Avoid out-of-bounds array reference
1098 during memmove.
1099
1100 2003-09-09 Richard Henderson <rth@redhat.com>
1101
1102 * decl2.c (mark_member_pointers): Rename from
1103 mark_member_pointers_and_eh_handlers and don't check eh handlers.
1104
1105 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
1106
1107 PR bootstrap/12168
1108 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1109
1110 2003-09-08 Mark Mitchell <mark@codesourcery.com>
1111
1112 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1113 c_register_builtin_type.
1114
1115 PR c++/11786
1116 * decl2.c (add_function): Do not complain about seeing the same
1117 non-function twice.
1118 * semantics.c (perform_koenig_lookup): Improve documentation.
1119
1120 PR c++/5296
1121 * pt.c (try_one_overload): Add addr_p parameter.
1122 (resolve_overloaded_unification): Pass it.
1123
1124 2003-09-08 Richard Henderson <rth@redhat.com>
1125
1126 * optimize.c (maybe_clone_body): Inc/dec function_depth.
1127
1128 2003-09-08 Richard Henderson <rth@redhat.com>
1129
1130 * decl.c (finish_function): Clear current_function_decl.
1131 * decl2.c (mark_used): Don't push/pop gc context.
1132 * optimize.c (optimize_function): Likewise.
1133 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1134 * pt.c (instantiate_decl): Inc/dec function_depth instead.
1135 * semantics.c (expand_body): Update for tree_rest_of_compilation
1136 nested argument.
1137
1138 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
1139
1140 PR c++/11762
1141 * error.c (dump_decl): Handle namespace-alias-definition.
1142 * decl.c (warn_extern_redeclared_static): There is no point in
1143 checking changes in storage class specifier for a namespace
1144 declaration.
1145 (duplicate_decls): Tidy diagnostic message.
1146 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1147 (pp_cxx_right_brace): Likewise.
1148 (pp_cxx_original_namespace_definition): New function.
1149 (pp_cxx_namespace_alias_definition): Likewise.
1150 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
1151
1152 2003-09-07 Jan Hubicka <jh@suse.cz>
1153
1154 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1155 Avoid re-emitting variables in unit-at-a-time mode.
1156
1157 2003-09-06 Mark Mitchell <mark@codesourcery.com>
1158
1159 PR c++/11867
1160 * call.c (standard_conversion): Improve comments.
1161 (perform_direct_initialization): Make sure we return an expression
1162 of the correct type.
1163 * typeck.c (build_static_cast): Check for ambiguity and
1164 accessibility when performing conversions.
1165
1166 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
1167
1168 * cp-tree.h (add_binding): Remove declaration.
1169 * name-lookup.h (supplement_binding): Declare.
1170 * decl.c (add_binding): Move to name-lookup.c.
1171 (push_local_binding): Adjust.
1172 (push_class_binding): Likewise.
1173 (set_identifier_type_value_with_scope): Likewise.
1174 * name-lookup.c (supplement_binding): Rename from add_binding.
1175 Return a bool. Improve documentation.
1176 (set_namespace_binding): Adjust.
1177 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1178
1179 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1180
1181 PR c++/11794
1182 * class.c (pushclass): Push dependent using decls for nested
1183 classes of templates too.
1184
1185 2003-09-06 Roger Sayle <roger@eyesopen.com>
1186
1187 PR c++/11409
1188 * class.c (resolve_address_of_overloaded_function): When building
1189 list of matching non-template function decls, ignore anticipated
1190 declarations of undeclared or shadowed GCC builtins.
1191
1192 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
1193
1194 PR c++/11595
1195 * decl.c (define_label): Remove unreachable timevar pop.
1196 Always return the decl, even if the definition is invalid.
1197
1198 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1199
1200 PR c++/12167
1201 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1202 unparsed functions queue.
1203
1204 2003-09-05 Mark Mitchell <mark@codesourcery.com>
1205
1206 PR c++/12163
1207 * call.c (perform_direct_initialization): Correct logic for
1208 direct-initialization of a class type.
1209
1210 PR c++/12146
1211 * pt.c (lookup_template_function): Robustify.
1212
1213 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
1214
1215 PR c++/11922
1216 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1217 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1218 is_type_p to lookup_qualified_name.
1219
1220 * semantics.c (finish_call_expr): Refactor some code.
1221
1222 PR c++/12037
1223 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1224 (build_min_non_dep): Declare.
1225 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1226 (build_min_non_dep): New.
1227 * cvt.c (convert_to_void): Don't explicitly copy
1228 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1229 * call.c (build_new_method_call): Use build_min_non_dep.
1230 * decl2.c (grok_array_decl): Likewise.
1231 (build_offset_ref_call_from_tree): Likewise.
1232 * typeck.c (finish_class_member_access_expr,
1233 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1234 build_x_conditional_expr, build_x_compound_expr): Likewise.
1235 (build_static_cast, build_reinterpret_cast,
1236 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1237 * typeck2.c (build_x_arrow): Use build_min_non_dep.
1238 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1239 template.
1240 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1241 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1242 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1243
1244 2003-09-04 Richard Henderson <rth@redhat.com>
1245
1246 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1247 change in cgraph_mark_needed_node arguments.
1248
1249 2003-09-02 Geoffrey Keating <geoffk@apple.com>
1250
1251 PR 12161
1252 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1253 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1254
1255 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
1256
1257 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1258 (expr_sizeof): Replace with ...
1259 (cxx_sizeof_or_alignof_expr): ... here.
1260 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1261 * parser.c (cp_parser_unary_expression): Commonize alignof and
1262 sizeof handling.
1263 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1264 substitution.
1265 * semantics.c (finish_sizeof, finish_alignof): Remove.
1266 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1267 becomes bool. Set TREE_READONLY.
1268 (expr_sizeof): Replace with ...
1269 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1270
1271 2003-09-04 Mark Mitchell <mark@codesourcery.com>
1272
1273 Remove cast-as-lvalue extension.
1274 * call.c (build_conditional_expr): Correct formatting.
1275 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1276 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1277 * cp-tree.h (non_cast_lvalue_p): Remove.
1278 (real_non_cast_lvalue_p): Remove.
1279 (non_cast_lvalue_or_else): Remove.
1280 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1281 (real_lvalue_p): Adjust call to lvalue_p_1.
1282 (non_cast_lvalue_p): Remove.
1283 (non_cast_lvalue_or_else): Remove.
1284 (lvalue_p): Adjust call to lvalue_p_1.
1285 (lvalue_or_else): Simplify.
1286 * typeck.c (build_unary_op): Use lvalue_or_else, not
1287 non_cast_lvalue_or_else.
1288 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1289
1290 2003-09-03 DJ Delorie <dj@redhat.com>
1291
1292 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1293
1294 2003-09-03 Mark Mitchell <mark@codesourcery.com>
1295
1296 PR c++/12053
1297 * class.c (include_empty_classes): Correct logic for ABI version 1.
1298
1299 2003-09-03 Richard Henderson <rth@redhat.com>
1300
1301 * optimize.c (optimize_function): Push/pop ggc context around
1302 the call to optimize_inline_calls.
1303
1304 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
1305
1306 PR c++/11553
1307 * parser.c (cp_parser_decl_specifier_seq): Add check for a
1308 duplicate friend decl-specifier.
1309
1310 2003-09-02 Mark Mitchell <mark@codesourcery.com>
1311
1312 PR c++/11847
1313 * pt.c (convert_nontype_argument): Correct representation of
1314 REFERENCE_TYPE expressions.
1315
1316 PR c++/11808
1317 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1318 (finish_call_expr): Change prototype.
1319 * parser.c (cp_parser_postfix_expression): Adjust call to
1320 finish_call_expr.
1321 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1322 * semantics.c (finish_call_expr): Add koenig_p parameter.
1323
1324 2003-09-01 Mark Mitchell <mark@codesourcery.com>
1325
1326 PR c++/12114
1327 * cp-tree.h (initialize_reference): Change prototype.
1328 * call.c (initialize_reference): Add cleanup parameter.
1329 * decl.c (grok_reference_init): Likewise.
1330 (check_initializer): Likewise.
1331 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1332 (duplicate_decls): When replacing an anticipated builtin, do not
1333 honor TREE_NOTHROW.
1334 * typeck.c (convert_for_initialization): Correct call to
1335 initialize_reference.
1336
1337 PR c++/11972
1338 * pt.c (dependent_type_p_r): Pass only the innermost template
1339 arguments to any_dependent_template_arguments_p.
1340
1341 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
1342
1343 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1344 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1345 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1346 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1347 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1348
1349 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1350
1351 PR c++/12093
1352 * pt.c (build_non_dependent_expr): Do not build a
1353 NON_DEPENDENT_EXPR for a STRING_CST.
1354
1355 PR c++/11928
1356 * search.c (add_conversions): Avoid adding two conversion
1357 operators for the same type.
1358
1359 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1360
1361 PR c++/6196
1362 * pt.c (tsubst_copy_and_build): Correct handling of
1363 address-of-label extension.
1364 * semantics.c (finish_goto_stmt): The address of a label must go
1365 through the lvalue-to-rvalue conversion.
1366
1367 2003-08-29 Richard Henderson <rth@redhat.com>
1368 Jason Merrill <jason@redhat.com>
1369
1370 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1371 (LANG_HOOKS_RTL_EXPAND_STMT): New.
1372 * cp-tree.h (cxx_expand_function_start): Declare.
1373 * decl.c (start_function): Use allocate_struct_function.
1374 Move stmts_are_full_exprs_p assertion from expand_body.
1375 Do not free_after_parsing or free_after_compilation.
1376 (cxx_push_function_context): Move code to set struct function
1377 data from genrtl_start_function.
1378 * optimize.c (optimize_function): Don't inc/dec function_depth.
1379 * semantics.c (expand_body): Use tree_rest_of_compilation.
1380 (cxx_expand_function_start): Rename from genrtl_start_function,
1381 omit bits done by tree_rest_of_compilation.
1382 (genrtl_finish_function): Remove.
1383 (clear_decl_rtl): Move to ../tree-optimize.c.
1384
1385 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1386
1387 PR c++/11811
1388 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1389 function.
1390 * cxx-pretty-print.h: Declare.
1391 * error.c (dump_template_parameter): Use it.
1392 (dump_type): Likewise.
1393
1394 2003-08-28 Mark Mitchell <mark@codesourcery.com>
1395
1396 * init.c (decl_constant_value): Deal with COND_EXPR specially.
1397 * call.c (build_conditional_expr): Revert previous patch.
1398
1399 PR optimization/5079
1400 * call.c (build_conditional_expr): Use decl_constant_value to
1401 simplify the arguments.
1402
1403 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
1404
1405 * parser.c (struct cp_token): Use enum bitfields.
1406 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1407 512B allocation unit.
1408 (cp_parser_token_tree_map_node): Use enum bitfields.
1409
1410 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
1411
1412 PR c++/11871
1413 * decl.c (push_class_level_binding): Correct old_decl value from
1414 my 2003-07-29 reorganization.
1415
1416 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1417 (build_new_method_call): Add goto finish.
1418 * semantics.c (simplify_aggr_init_exprs_r): Don't set
1419 TREE_SIDE_EFFECTS on a call.
1420
1421 2003-08-25 Richard Henderson <rth@redhat.com>
1422
1423 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1424
1425 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1426
1427 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1428 (cxx_pretty_printer): Adjust base type.
1429 (pp_cxx_function_specifier): Declare.
1430 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1431 (pp_cxx_left_paren): Likewise.
1432 (pp_cxx_right_paren): Likewise.
1433 (pp_cxx_dot): Likewise.
1434 (pp_cxx_arrow): Likewise.
1435 (pp_cxx_semicolon): Likewise.
1436 (pp_cxx_identifier): Likewise.
1437 (pp_cxx_cv_qualifier_seq): Likewise.
1438 (pp_cxx_storage_class_specifier): Likewise.
1439 (pp_cxx_expression_list): Likewise.
1440 (pp_cxx_space_for_pointer_operator): Likewise.
1441 (pp_cxx_init_declarator): Likewise.
1442 (pp_cxx_call_argument_list): Likewise.
1443 (pp_cxx_nonconsecutive_character): Tidy.
1444 (pp_cxx_conversion_function_id): New function.
1445 (pp_cxx_template_id): Likewise.
1446 (pp_cxx_template_keyword_if_needed): Likewise.
1447 (pp_cxx_nested_name_specifier): Likewise.
1448 (pp_cxx_unqualified_id): Tidy
1449 (pp_cxx_qualified_id): Handle more nodes.
1450 (pp_cxx_primary_expression): Tidy.
1451 (pp_cxx_postfix_expression): Likewise.
1452 (pp_cxx_new_expression): Tidy.
1453 (pp_cxx_delete_expression): Likewise.
1454 (pp_cxx_cast_expression): New function.
1455 (pp_cxx_pm_expression): Tidy.
1456 (pp_cxx_conditional_expression): Likewise.
1457 (pp_cxx_assignment_operator): New function.
1458 (pp_cxx_assignment_expression): Tidy.
1459 (pp_cxx_expression): New function.
1460 (pp_cxx_function_specifier): Likewise.
1461 (pp_cxx_decl_specifier_seq): Likewise.
1462 (pp_cxx_simple_type_specifier): Tidy.
1463 (pp_cxx_type_specifier_seq): Likewise.
1464 (pp_cxx_ptr_operator): New function.
1465 (pp_cxx_implicit_parameter_type): Likewise.
1466 (pp_cxx_parameter_declaration): Tidy.
1467 (pp_cxx_parameter_declaration_clause): New function.
1468 (pp_cxx_exception_specification): Likewise.
1469 (pp_cxx_direct_declarator): Tidy.
1470 (pp_cxx_declarator): Likewise.
1471 (pp_cxx_ctor_initializer): New function.
1472 (pp_cxx_function_definition): Likewise.
1473 (pp_cxx_abstract_declarator): Tidy.
1474 (pp_cxx_direct_abstract_declarator): Likewise.
1475 (pp_cxx_type_id): Likewise.
1476 (pp_cxx_exception_declaration): New function.
1477 (pp_cxx_statement): Likewise.
1478 (pp_cxx_simple_declaration): Likewise.
1479 (pp_cxx_template_parameter_list): Likewise.
1480 (pp_cxx_template_parameter): Likewise.
1481 (pp_cxx_template_declaration): Likewise.
1482 (pp_cxx_explicit_specialization): Likewise.
1483 (pp_cxx_explicit_instantiation): Likewise.
1484 (pp_cxx_declaration): Tidy.
1485 (pp_cxx_pretty_printer_init): Initialize more fields.
1486
1487 2003-08-25 Mark Mitchell <mark@codesourcery.com>
1488
1489 PR c++/8795
1490 * cp-tree.h (build_cplus_method_type): Remove.
1491 * call.c (standard_conversion): Use build_method_type_directly
1492 instead of build_cplus_method_type.
1493 * class.c (build_clone): Likewise.
1494 (adjust_clone_args): Likewise.
1495 * decl.c (build_ptrmem_type): Likewise.
1496 (grokdeclarator): Likewise.
1497 (check_function_type): Likewise.
1498 * decl2.c (grok_method_quals): Likewise.
1499 (maybe_retrofit_in_chrg): Likewise.
1500 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1501 (tsubst_function_type): Likewise.
1502 (tsubst): Likewise.
1503 * tree.c (build_cplus_method_type): Remove.
1504 * typeck.c (merge_types): Use build_method_type_directly.
1505
1506 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1507
1508 PR c++/3765
1509 * search.c (dfs_access_in_type): Fix typo in comment.
1510 (dfs_accessible_queue_p): Likewise.
1511 (dfs_accessible_p): Only terminate when a friend is found.
1512 (accessible_p): Return immediately if access_in_type allows
1513 access.
1514
1515 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1516
1517 PR c++/641, c++/11876
1518 * friend.c (add_friend): Add complain parameter.
1519 (make_friend_class): Likewise.
1520 (do_friend): Adjust add_friend call.
1521 * decl.c (grokdeclarator): Adjust make_friend_class call.
1522 * parser.c (cp_parser_member_declaration): Likewise.
1523 (cp_parser_template_declaration_after_export): Likewise.
1524 * pt.c (instantiate_class_template): Adjust make_friend_class
1525 and add_friend call.
1526 * cp-tree.h (make_friend_class): Adjust declaration.
1527 (add_friend): Likewise.
1528
1529 2003-08-21 Jason Merrill <jason@redhat.com>
1530
1531 PR c++/11283
1532 * call.c (build_conditional_expr): Ignore cv-qual differences for
1533 non-class types.
1534
1535 2003-08-21 Mark Mitchell <mark@codesourcery.com>
1536
1537 PR c++/11551
1538 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1539 (cp_parser_primary_expression): Adjust call to
1540 cp_parser_id_expression.
1541 (cp_parser_unqualified_id): Complain about the use of
1542 typedef-names in a destructor declarator.
1543 (cp_parser_postfix_expression): Adjust call to
1544 cp_parser_id_expression.
1545 (cp_parser_type_parameter): Likewise.
1546 (cp_parser_template_argument): Likewise.
1547 (cp_parser_declarator_id): Likewise.
1548
1549 PR c++/11919
1550 * call.c (standard_conversion): Use same_type_p, not pointer
1551 equality, to compare types.
1552
1553 PR c++/10762
1554 * parser.c (cp_parser_using_declaration): Check for invalid uses
1555 of template-ids here...
1556 * decl2.c (do_class_using_decl): ... rather than here.
1557
1558 2003-08-20 Mark Mitchell <mark@codesourcery.com>
1559
1560 PR c++/11834
1561 * pt.c (more_specialized): Bump processing_template_decl.
1562
1563 2003-08-21 Jason Merrill <jason@redhat.com>
1564
1565 PR c++/11614
1566 * decl.c (grokdeclarator): Recognize a flexible array based on the
1567 type, not the form of the declarator.
1568
1569 2003-08-20 Jason Merrill <jason@redhat.com>
1570
1571 * semantics.c (simplify_aggr_init_expr): Split out from
1572 simplify_aggr_init_exprs_r. Convert slot address to match
1573 the return type.
1574 * cp-tree.h: Declare it.
1575 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1576 DECL_NAME of a user variable.
1577
1578 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
1579
1580 PR c++/11945
1581 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1582 COMPOUND_EXPR.
1583 * semantics.c (finish_expr_stmt): Always convert to void.
1584 * typeck.c (build_x_compound_exp): Always convert to void.
1585
1586 2003-08-19 Mark Mitchell <mark@codesourcery.com>
1587
1588 PR c++/11684
1589 * cp-tree.h (grok_op_properties): Change prototype.
1590 * decl.c (grok_op_properties): Add complain parameter.
1591 (grokfndecl): Pass it.
1592 * pt.c (tsubst_decl): Adjust accordingly.
1593
1594 PR c++/10926
1595 * decl.c (start_method): Return immediately if push_template_decl
1596 does not like the declaration.
1597 * pt.c (push_template_decl_real): Disallow member template
1598 destructors.
1599
1600 PR c++/11036
1601 * cp-tree.h (add_binding): Add prototype.
1602 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1603 (maybe_warn_about_overly_private_class): Use
1604 CLASSTYPE_DESTRUCTORS.
1605 (pushclass): Adjust call to set_identifier_type_value.
1606 * decl.c (add_binding): Give it external linkage.
1607 (push_local_binding): Adjust call to add_binding.
1608 (push_class_binding): Likewise.
1609 (set_identifier_type_value_with_scope): Change prototype. Use
1610 add_binding for global bindings.
1611 (set_identifier_type_value): Adjust accordingly.
1612 (pushtag): Likewise.
1613 (pushdecl): Use set_identifier_type_value, not
1614 set_identifier_type_value_with_scope.
1615 (pushdecl_namespace_level): Adjust calls to
1616 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1617 (pushdecl_class_level): Likewise.
1618 (lookup_tag): Use select_decl.
1619 (select_decl): Improve comment.
1620 (record_builtin_type): Do not call pushdecl.
1621 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1622 (cp_finish_decl): Adjust call to set_identifier_type_value.
1623 (check_elaborated_type_specifier): Improve checks for invalid uses
1624 of typedefs.
1625 (xref_tag): Adjust call to check_elaborated_type_specifier.
1626 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1627 * name-lookup.c (set_namespace_binding): Use add_binding.
1628 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1629 rather than an IDENTIFIER_NODE, to represent built-in types, if
1630 requested by the caller.
1631 (cp_parser_postfix_expression): Adjust call.
1632 (cp_parser_type_specifier): Likewise.
1633 (cp_parser_elaborated_type_specifier): Adjust call to
1634 check_elaborated_type_specifier.
1635 * typeck2.c (build_functional_cast): Do not perform name lookups.
1636
1637 PR c++/10717
1638 * decl.c (expand_static_init): Remove unnecessary code.
1639
1640 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
1641
1642 PR c++/10538, PR c/5582
1643 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1644
1645 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1646
1647 PR c++/11174
1648 * init.c (build_offset_ref): Perform access checking for
1649 pointer to member correctly.
1650
1651 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
1652
1653 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1654
1655 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
1656
1657 PR c++/11957
1658 * cp-tree.h (finish_stmt_expr): Add bool parameter.
1659 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1660 adjust the stmt_expr here.
1661 (build_vec_init): Use finish_stmt_expr_expr, convert result to
1662 array type.
1663 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1664 call.
1665 * pt.c (tsubst_copy): Likewise.
1666 * semantics.c (finish_stmt_expr): Add parameter.
1667
1668 * pt.c (instantiate_class_template): Push to class's scope before
1669 tsubsting base.
1670
1671 2003-08-17 Jan Hubicka <jh@suse.cz>
1672
1673 PR C++/11702
1674 * semantics.c (finish_id_expression): Mark all functions as used.
1675
1676 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
1677
1678 PR c++/11512
1679 * cvt.c (convert_to_void): Indicate which side of conditional has
1680 no effects, and rhs of comma operator. Test for no sideeffect
1681 expressions here and always build a convert expr.
1682 * init.c (expand_default_init): Convert the init to void.
1683 * typeck.c (build_x_compound_expr): Do not check for side effects
1684 here.
1685 (build_compound_expr): Do not convert lhs when building a
1686 template.
1687
1688 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1689
1690 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1691 * decl2.c (build_offset_ref_call_from_tree): Use
1692 build_non_dependent_expr.
1693 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1694 * pt.c (build_non_dependent_expr): Set operand.
1695
1696 2003-08-14 Jan Hubicka <jh@suse.cz>
1697
1698 * decl2.c (mark_member_pointers): Rename to...
1699 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1700 (lower_function): Update call.
1701 * except.c (eh_type_info): Break out from ...
1702 (build_eh_type): ... here; tinfo is already used.
1703 (finish_eh_spec_block): Mark tinfos as used.
1704 * semantics.c (finish_handler_params): Mark tinfo as used.
1705 * cp-tree.h (eh_type_info): Declare.
1706
1707 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1708
1709 * pt.c (instantiate_class_template): Set location before
1710 substuting bases.
1711
1712 * decl.c (make_typename_type): Use my_friendly_assert.
1713 * pt.c (tsubst_aggr_type): Rearrange context substitution.
1714
1715 2003-08-14 Jan Hubicka <jh@suse.cz>
1716
1717 * method.c (use_thunk): Expand body directly.
1718
1719 2003-08-12 Mark Mitchell <mark@codesourcery.com>
1720
1721 PR c++/11703
1722 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1723 determine whether or not to promote types.
1724 (convert_for_arg_passing): Likewise.
1725 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1726 templates.
1727 * pt.c (tsubst_decl): Do not expect it to be set.
1728
1729 PR c++/9512
1730 PR c++/10923
1731 * cp-tree.h (check_elaborated_type_specifier): Declare.
1732 (handle_class_head): Remove.
1733 (note_got_semicolon): Likewise.
1734 (note_list_got_semicolon): Likewise.
1735 (finish_class_definition): Likewise.
1736 * decl.c (check_elaborated_type_specifier): Make it public.
1737 Robustify.
1738 (handle_class_head): Remove.
1739 * parser.c (cp_parser_elaborated_type_specifier): Use
1740 check_elaborated_type_specifier.
1741 (cp_parser_class_specifier): Do not call finish_class_definition.
1742 (cp_parser_class_head): Or handle_class_head. Check for
1743 over-qualified names.
1744 * semantics.c (finish_class_definition): Remove.
1745
1746 * parser.c (cp_parser_check_for_definition_in_return_type): New
1747 function.
1748 (cp_parser_simple_declaration): Adjust call to
1749 cp_parser_init_declarator.
1750 (cp_parser_decl_specifier_seq): Change type of
1751 declares_class_or_enum parameter.
1752 (cp_parser_explicit_instantiation): Adjust accordingly.
1753 (cp_parser_type_specifier): Change type of
1754 declares_class_or_enum parameter.
1755 (cp_parser_init_declarator): Add declares_class_or_enum
1756 parameter.
1757 (cp_parser_parameter_declaration): Adjust call to
1758 cp_parser_decl_specifier_seq.
1759 (cp_parser_function_definition): Likewise.
1760 (cp_parser_member_declaration): Likewise.
1761 (cp_parser_single_declaration): Likewise.
1762
1763 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1764 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1765 (TYPE_OVERLOADS_CALL_EXPR): Remove.
1766 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1767 (TYPE_OVERLOADS_ARROW): Likewise.
1768 (CLASSTYPE_GOT_SEMICOLON): Likewise.
1769 * class.c (check_bases): Do not set them.
1770 (finish_struct_1): Likewise.
1771 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1772 (build_ptrmemfunc_type): Likewise.
1773 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1774 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1775 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1776 * lex.c (note_got_semicolon): Remove.
1777 (note_list_got_semicolon): Likewise.
1778 * parser.c (cp_parser_simple_declaration): Do not call
1779 note_list_got_semicolon.
1780 * pt.c (list_eq): Remove.
1781 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1782 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1783 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1784 * ptree.c (cxx_print_type): Do not print them.
1785 * semantics.c (finish_member_class_template): Do not call
1786 note_list_got_semicolon.
1787
1788 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
1789
1790 * call.c (standard_conversion): Opaque pointers interconvert.
1791
1792 * testsuite/g++.dg/other/opaque-3.C: New.
1793
1794 2003-08-11 Mark Mitchell <mark@codesourcery.com>
1795
1796 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1797 types correctly.
1798
1799 2003-08-10 Mark Mitchell <mark@codesourcery.com>
1800
1801 PR c++/11789
1802 * cp-tree.h (get_vbase): Remove.
1803 (get_vbase_types): Remove.
1804 * init.c (expand_member_init): Correct logic for looking up base
1805 classes.
1806
1807 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1808
1809 * error.c (dump_expr): Tidy.
1810 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1811 (pp_cxx_begin_template_argument_list): Likewise.
1812 (pp_cxx_end_template_argument_list): Likewise.
1813 (is_destructor_name): Likewise.
1814 (pp_cxx_unqualified_id): Likewise.
1815 (pp_cxx_qualified_id): Likewise.
1816 (pp_cxx_id_expression): Likewise.
1817 (pp_cxx_new_expression): Likewise.
1818 (pp_cxx_delete_expression): Likewise.
1819 (pp_cxx_pm_expression): Likewise.
1820 (pp_cxx_type_specifier): Rework.
1821 (pp_cxx_type_id): Likewise.
1822 (pp_cxx_primary_expression): Likewise.
1823 (pp_cxx_postfix_expression): Likewise.
1824 (pp_cxx_unary_expression): Likewise.
1825 (pp_cxx_multiplicative_expression): Likewise.
1826 (pp_cxx_conditional_expression): Likewise.
1827 (pp_cxx_assignment_expression): Likewise.
1828 (pp_cxx_pretty_printer_init): Tidy.
1829
1830 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
1831
1832 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1833 NODE is always a TREE_VEC of nonzero size.
1834 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1835 * decl2.c (arg_assoc): Template args will be a vec.
1836 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1837 dump_template_argument_list.
1838 (dump_template_parms): Args will be a vec.
1839 * parser.c (cp_parser_template_argument_list): Produce a
1840 vector, not a list.
1841 * pt.c (coerce_template_parms): Args are always vectors.
1842 (mangle_class_name_for_template): Likewise.
1843 (lookup_template_function): Likewise.
1844 (lookup_template_class): Likewise.
1845 (tsubst_template_args): Likewise.
1846 (tsubst_baselink): Use tsubst_template_args.
1847 (tsubst_qualified_id): Likewise.
1848 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1849 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1850 (any_dependent_template_args_p): Args are always vectors.
1851 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1852
1853 PR c++/11670
1854 * call.c (convert_like_real): Add rvalue binding error message.
1855 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1856 really a cast.
1857
1858 PR c++/10530
1859 * pt.c (dependent_type_p_r): A dependent template-id is a class
1860 type with dependent template arguments, or a bound template
1861 template parameter.
1862 (type_dependent_expression_p): A template function decl cannot
1863 have a dependent context.
1864
1865 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1866
1867 PR c++/5767
1868 * parser.c (cp_parser_class_name): Return immediately when scope
1869 is error_mark_node.
1870
1871 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
1872
1873 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1874
1875 * cp/call.c (standard_conversion): Support opaque types.
1876 Include target.h.
1877 (strip_top_quals): Use cp_build_qualified_type instead of
1878 TYPE_MAIN_VARIANT.
1879
1880 * cp/typeck.c (convert_for_assignment): Support opaque types.
1881
1882 * testsuite/g++.dg/other/opaque-1.C: New.
1883
1884 * testsuite/g++.dg/other/opaque-2.C: New.
1885
1886 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
1887
1888 * decl.c (grokparms): Use cp_build_qualified_type instead
1889 TYPE_MAIN_VARIANT.
1890
1891 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1892
1893 * cxx-pretty-print.h: New file.
1894 * cxx-pretty-print.c: Likewise.
1895 * error.c (scratch_pretty_printer): Change type.
1896 (init_error): Tidy.
1897 (dump_aggr_type): Likewise.
1898 (dump_global_iord): Likewise.
1899 (dump_expr): Likewise.
1900 (dump_char): Remove.
1901 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1902 (cxx_initialize_diagnostics): New function.
1903 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1904 (CXX_PRETTY_PRINT_H): New variable.
1905 (cp/cxx-pretty-print.o): New rule.
1906 (cp/cp-lang.o): Update dependence.
1907 (cp/error.o): Likewise.
1908
1909 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1910
1911 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1912 (DECL_DECLARED_INLINE_P): Remove.
1913 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1914 if decl is a FUNCTION_DECL. This never made sense, but now it is
1915 required to avoid a tree check failure.
1916 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1917 * optimize.c (maybe_clone_body): Likewise.
1918
1919 2003-08-04 Roger Sayle <roger@eyesopen.com>
1920
1921 * decl.c (cxx_insert_default_attributes): Delete.
1922 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1923 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1924
1925 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
1926
1927 PR c++/11704
1928 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1929 unknown type.
1930
1931 PR c++/11766
1932 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1933 member functions.
1934
1935 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1936
1937 PR c++/9447
1938 * cp-tree.def (USING_DECL): Document its type.
1939 * class.c (pushclass): If we're entering a template, push any
1940 dependent using decls it has.
1941 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1942 a dependent scope.
1943 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1944 (tsubst): Remove USING_DECL checks.
1945 (type_dependent_expression_p): Remove USING_DECL case.
1946 * semantics.c (finish_member_declaration): A USING_DECL's type
1947 indicates whether it is dependent.
1948
1949 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1950
1951 * cp-tree.h (pushclass): Remove unneeded parameter.
1952 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1953 (push_nested_class): Adjust pushclass call.
1954 * pt.c (instantiate_class_template): Likewise.
1955 * semantics.c (begin_class_definition): Likewise.
1956
1957 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
1958
1959 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1960
1961 2003-08-01 Mark Mitchell <mark@codesourcery.com>
1962
1963 PR c++/11697
1964 * decl.c (decls_match): Don't ignore the types of template
1965 classes.
1966
1967 PR c++/11744
1968 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1969
1970 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1971
1972 PR c++/8442, c++/8806
1973 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1974 preferred.
1975 (check_elaborated_type_specifier): Add allow_template_p
1976 parameter. Check tag mismatch and class template.
1977 (xref_tag): Add template_header_p parameter. Add assertion
1978 that name is an IDENTIFIER_NODE. Remove implicit typename
1979 warning. Simplify lookup process if globalize is true.
1980 (cxx_init_decl_processing): Adjust call to xref_tag.
1981 (xref_tag_from_type): Likewise.
1982 * decl2.c (handle_class_head): Likewise.
1983 * parser.c (cp_parser_elaborated_type_specifier,
1984 cp_parser_class_head): Likewise.
1985 * rtti.c (init_rtti_processing, build_dynamic_cast1,
1986 tinfo_base_init, emit_support_tinfos): Likewise.
1987 * class.c (is_base_of_enclosing_class): Remove.
1988 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1989 template template argument.
1990 * cp-tree.h (xref_tag): Adjust declaration.
1991 (is_base_of_enclosing_class): Remove.
1992 * NEWS: Document template template argument change.
1993
1994 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
1995
1996 * parser.c (cp_parser_init_declarator,
1997 cp_paser_member_declaration): Reformat.
1998 * pt.c (lookup_template_class, type_unification_real, unify,
1999 type_dependent_expression_p): Reformat.
2000
2001 PR c++/11295
2002 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
2003 tf_stmt_expr_body.
2004 (finish_stmt_expr_expr): Declare.
2005 * parser.c (cp_parser_primary_expression): Tell
2006 cp_parser_compount_statement that it is a statement expression.
2007 (cp_parser_statement, cp_parser_labeled_statement,
2008 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
2009 in_statement_expr_p parameter.
2010 (cp_parser_expression_statement): Likewise. Call
2011 finish_stmt_expr_expr for final expression of a statement
2012 expression.
2013 (cp_parser_for_init_statement,
2014 cp_parser_implicitly_scoped_statement,
2015 cp_parser_already_scoped_statement, cp_parser_function_definition,
2016 cp_parser_try_block, cp_parser_handled): Adjust.
2017 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
2018 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
2019 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
2020 * semantics.c (finish_expr_stmt): Do not deal with statement
2021 expressions.
2022 (begin_stmt_expr): Clear last_expr_type.
2023 (finish_stmt_expr_expr): New.
2024 (finish_stmt_expr): Process the value expression.
2025
2026 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
2027 compound expr inside the target's initializer.
2028
2029 PR c++/11525
2030 * parser.c (cp_parser_primary_expression): Do not set
2031 non-constant-p merely because it is a dependent scope.
2032
2033 PR c++/9447
2034 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
2035 * semantics.c (finish_expr_stmt): Do not convert to void in a
2036 template.
2037
2038 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
2039
2040 * pt.c (coerce_template_parms): Refactor.
2041 (fn_type_unification): Increment processing_template_decl when
2042 tsubsting an incomplete set of explicit args.
2043
2044 PR c++/11347
2045 * pt.c (instantiate_class_template): Increment
2046 processing_template_decl around the tsubst of a template member
2047 class.
2048 (tsubst_qualified_id): Assert we do not have a dependent scope.
2049
2050 * pt.c (coerce_template_template_parms, lookup_template_class,
2051 can_complete_type_without_circularity, instantiate_class_template,
2052 tsubst_decl, unify): Reformat.
2053
2054 2003-07-31 Jan Hubicka <jh@suse.cz>
2055
2056 * decl2.c (maybe_make_one_only): Use mark_referenced.
2057 * method.c (use_thunk): Likewsie.
2058
2059 2003-07-30 Jan Hubicka <jh@suse.cz>
2060
2061 * class.c (build_vtable_entry_ref): Kill.
2062 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
2063 (build_vfn_ref): Do not call build_vtable_entry_ref.
2064 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
2065 * cp-tree.h (prepare_assemble_variable): Kill.
2066 * cp-decl.c (prepare_assemble_variable): Kill.
2067
2068 2003-07-29 Geoffrey Keating <geoffk@apple.com>
2069
2070 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
2071 of setting valid_pch by hand.
2072
2073 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2074
2075 * decl.c (finish_enum): Initialize underlying_type.
2076
2077 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
2078
2079 PR c++/9447
2080 * decl.c (add_binding): Add bval local variable.
2081 (push_class_level_binding): Likewise. Allow a USING_DECL to be
2082 pushed.
2083 * decl2.c (do_class_using_decl): The type of a using decl is
2084 unknown.
2085 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
2086 function call lookup code.
2087 * pt.c (tsubst): A USING_DECL will have unknown type.
2088 (tsubst_copy_and_build): Allow a using decl.
2089 (type_dependent_expression_p): A USING_DECL will make it
2090 dependent.
2091 * semantics.c (finish_member_declaration): Push a dependent using
2092 declaration.
2093
2094 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2095
2096 PR c++/11530
2097 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2098 * semantics.c (finish_id_expression): Call mark_used for all
2099 declarations.
2100
2101 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2102
2103 PR c++/11667
2104 * call.c (standard_conversion): Allow all integral->enumeral
2105 conversions, after marking them as bad.
2106 * decl.c (finish_enum): Make sure that all enumerators are
2107 properly converted to the underlying type.
2108 (build_enumerator): Set DECL_CONTEXT for namespace-scope
2109 enumeration types.
2110 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2111 (tsubst_enum): Tidy.
2112
2113 * Make-lang.in (typeck.o): Depend on convert.h.
2114 (class.o): Likewise.
2115 (rtti.o): Likewise.
2116 * call.c: Include convert.h.
2117 (convert_arg_to_ellipsis): Use convert_to_real.
2118 * class.c: Include convert.h.
2119 (build_base_path): Use convert_to_integer.
2120 * rtti.c: Include convert.h.
2121 (build_headof): Use convert_to_integer.
2122 * typeck.c: Include convert.h.
2123 (decay_conversion): Use convert_to_integer.
2124 (build_unary_op): Use build_nop.
2125 (get_delta_difference): Use convert_to_integer.
2126 (build_ptrmemfunc): Avoid unnecessary conversions.
2127
2128 2003-07-28 Jan Hubicka <jh@suse.cz>
2129
2130 * decl2.c (mark_member_pointers): Verify that member pointer points to
2131 the function.
2132
2133 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
2134
2135 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2136 (finish_compound_stmt): Remove no scope arg.
2137 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2138 end_compound_stmt calls.
2139 (expand_static_init, begin_destructor_body, begin_function_body,
2140 finish_function_body): Likewise.
2141 * decl2.c (start_objects, finish_objects,
2142 start_static_storage_duration_function,
2143 finish_static_storage_duration_function): Likewise.
2144 * init.c (begin_init_stmts, finish_init_stmts,
2145 construct_virtual_base, build_vec_init): Likewise.
2146 * method.c (do_build_assign_ref, synthesize_method): Likewise.
2147 * parser.c (cp_parser_compound_statement,
2148 cp_parser_implicitly_scoped_statement,
2149 cp_parser_already_scoped_statement): Likewise.
2150 * pt.c (tsubst_expr): Likewise.
2151 * semantics.c (begin_compound_stmt): No scope arg is a bool.
2152 (finish_compound_stmt): Remove no scope arg.
2153
2154 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2155 always dyadic.
2156
2157 2003-07-27 Mark Mitchell <mark@codesourcery.com>
2158
2159 * call.c (standard_conversion): Tweak handling of
2160 pointer-to-member types.
2161 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2162 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2163 pointer-to-data member types.
2164
2165 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
2166
2167 * parser.c (cp_parser_type_parameter): Reformat.
2168 (cp_parser_parameter_declaration): Deprecate default args where
2169 not allowed.
2170
2171 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
2172
2173 * cfns.h: Rebuilt.
2174
2175 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2176 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2177 * init.c (begin_init_stmts): Make static. Return is_global
2178 value. Always call begin_stmt_expr.
2179 (finish_init_stmts): Make static. Add is_global parm. Always
2180 building a stmt tree.
2181 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2182 (build_vec_init): Likewise. Always building a stmt tree.
2183 (expand_default_init): Always building a stmt tree.
2184 (get_temp_regvar): Likewise.
2185 * semantics.c (begin_global_stmt_expr,
2186 finish_global_stmt_expr): Remove.
2187
2188 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2189
2190 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2191 (build_x_compound_expr_from_list): Declare.
2192 * typeck.c (build_x_compound_expr_from_list): New.
2193 (build_x_compound_expr): Adjust.
2194 (build_compound_expr): Remove unreachable code. Take two
2195 parameters, adjust.
2196 * decl.c (grok_reference_init): Use
2197 build_x_compound_expr_from_list.
2198 (expand_static_init): Adjust build_compound_expr call.
2199 (cxx_maybe_build_cleanup): Likewise.
2200 * init.c (perform_member_init): Use
2201 build_x_compound_expr_from_list.
2202 (build_new_1): Likewise.
2203 (build_vec_delete): Adjust build_compound_expr calls.
2204 (build_vbase_delete): Likewise.
2205 * typeck2.c (store_init_value): Use
2206 build_x_compound_expr_from_list.
2207 (build_functional_cast): Likewise.
2208
2209 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2210
2211 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2212 * decl.c (make_typename_type): Pass it.
2213 * pt.c (lookup_template_class): Use it.
2214 (resolve_typename_type): Pass it.
2215 * semantics.c (finish_template_type): Pass it.
2216
2217 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2218
2219 PR c++/11617
2220 * cp-tree.h (qualified_name_lookup_error): Declare.
2221 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2222 errors.
2223 (tsubst_expr) <DECL_STMT case>: Likewise.
2224 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2225 * semantics.c (qualified_name_lookup_error): New, broken out of ...
2226 (finish_id_expression): ... here. Use it.
2227
2228 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
2229
2230 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2231
2232 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2233
2234 PR c++/11596
2235 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2236 (tsubst_template_arg): New.
2237 (tsubst_template_arg_vector): Rename to ...
2238 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2239 tsubst_template_arg.
2240 (coerce_template_parms): Use tsubst_template_arg for default
2241 value.
2242 (tsubst_template_parms): Likewise.
2243 (tsubst_aggr_type): Adjust.
2244 (tsubst_decl): Likewise.
2245 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2246 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2247
2248 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2249
2250 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2251 * error.c: Use the new pretty-printer framework.
2252
2253 2003-07-24 Per Bothner <pbothner@apple.com>
2254
2255 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2256 which causes errors messages to incorrectly mention included files.
2257
2258 2003-07-24 Mark Mitchell <mark@codesourcery.com>
2259
2260 * cp-tree.h (convert_to_base_statically): Declare.
2261 * call.c (build_special_member_call): Convert INSTANCE to the base
2262 type.
2263 * class.c (convert_to_base_statically): New method.
2264 * init.c (construct_virtual_base): Use it.
2265 * method.c (do_build_assign_ref): Fix typo in comment.
2266
2267 2003-07-24 Jason Merrill <jason@redhat.com>
2268
2269 * decl.c: Just set truthvalue_* to boolean_*.
2270
2271 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
2272
2273 * decl.c (reshape_init): Remove unreachable code.
2274
2275 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2276
2277 PR c++/11513
2278 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2279
2280 2003-07-23 Mark Mitchell <mark@codesourcery.com>
2281
2282 PR c++/11645
2283 * cp-tree.h (accessible_base_p): Declare.
2284 * call.c (build_over_call): Use it.
2285 * search.c (accessible_base_p): New function, split out from ...
2286 (lookup_base): ... here.
2287
2288 PR c++/11517
2289 * call.c (build_conditional_expr): Use perform_implicit_conversion
2290 and error_operand_p. Robustify.
2291 * typeck.c (build_unary_op): Use perform_implicit_conversion.
2292
2293 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
2294
2295 PR c++/10953
2296 * parser.c (cp_parser_nested_name_specifier): Reset scope on
2297 failure.
2298 (cp_parser_elaborated_type_specifier): Likewise.
2299
2300 2003-07-22 Mark Mitchell <mark@codesourcery.com>
2301
2302 Eliminate use of POINTER_TYPE for pointers-to-members.
2303 * call.c (standard_conversion): Rework pointer-to-member handling.
2304 Add comments.
2305 (add_builtin_candidate): Likewise.
2306 (resolve_scoped_fn_name): Remove.
2307 (build_conditional_expr): Rework pointer-to-member handling.
2308 (compare_ics): Likewise.
2309 * class.c (check_field_decls): Use TYPE_PTR_P.
2310 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2311 handling.
2312 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2313 (TYPE_PTRMEM_P): Add comment.
2314 (TYPE_PTR_P): Simplify.
2315 (TYPE_PTROB_P): Correct definition.
2316 (TYPE_PTR_TO_MEMBER_P): New macro.
2317 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2318 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2319 (resolved_scoped_fn_name): Remove declaration.
2320 (build_offset_ref): Change prototype.
2321 (resolve_offset_ref): Remove.
2322 (comp_target_types): Remove.
2323 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2324 handling.
2325 (convert_to_reference): Use can_convert.
2326 (ocp_convert): Improve error handling. Rework pointer-to-member
2327 handling.
2328 (perform_qualification_conversions): Rework pointer-to-member
2329 handling.
2330 * decl.c (build_ptrmem_type): Handle functions too.
2331 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2332 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2333 (grokparms): Remove OFFSET_TYPE error message.
2334 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2335 * error.c (dump_type_prefix): Likewise.
2336 * expr.c (cplus_expand_constant): Use build_nop.
2337 * init.c (build_offset_ref): Add address_p parameter. Fold in
2338 necessary bits from resolve_offset_ref.
2339 (resolve_offset_ref): Remove.
2340 * parser.c (cp_parser_postfix_expression): Remove special case
2341 code for OFFSET_TYPE.
2342 * pt.c (convert_nontype_argument): Rework pointer-to-member
2343 handling.
2344 (convert_template_argument): Likewise.
2345 (unify): Likewise.
2346 (invalid_nontype_parm_type_p): Likewise.
2347 (dependent_type_p_r): Likewise.
2348 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2349 (target_incomplete_p_): Rework pointer-to-member
2350 handling.
2351 (get_pseudo_ti_init): Likewise.
2352 (get_pseudo_ti_desc): Likewise.
2353 * semantics.c (finish_qualified_id_expr): Adjust call to
2354 build_offset_ref. Remove use of resolve_offset_ref.
2355 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2356 * typeck.c (target_type): Use TYPE_PTRMEM_P.
2357 (type_unknown_p): Remove obsolete code about the time before
2358 non-dependent expressions were handled correctly.
2359 (qualify_type_recursive): Remove.
2360 (composite_pointer_type_r): New function.
2361 (composite_pointer_type): Use it.
2362 (merge_types): Remove dead comments.
2363 (comp_cv_target_types): Remove.
2364 (comp_target_types): Likewise.
2365 (comp_target_parms): Likewise.
2366 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2367 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2368 (build_binary_op): Do not use of comp_target_types.
2369 (pointer_diff): Remove OFFSET_TYPE case.
2370 (build_unary_op): Adjust pointer-to-member handling.
2371 (unary_complex_lvalue): Likewise.
2372 (check_for_casting_away_constness): Add description parameter.
2373 (build_static_cast): Pass it.
2374 (build_reinterpret_cast): Use check_for_casting_away_constness.
2375 (build_const_cast): Adjust pointer-to-member handling.
2376 (build_c_cast): Likewise.
2377 (convert_for_assignment): Remove OFFSET_TYPE error message.
2378 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2379 (comp_ptr_ttypes_reinterpret): Remove.
2380 (casts_away_constness_r): Adjust pointer-to-member handling.
2381 (casts_away_constness): Liekwise.
2382 (strip_all_pointer_quals): Remove.
2383 * typeck2.c (digest_init): Adjust pointer-to-member handling.
2384 (build_m_component_ref): Likewise.
2385
2386 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
2387
2388 * lex.c (unqualified_fn_lookup_error): Mention that the error
2389 message needs to be kept in synch with the manual.
2390
2391 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2392
2393 PR c++/11614
2394 * decl.c (grokdeclarator): An array member is only a flexible
2395 array member if the field itself is the array.
2396
2397 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2398
2399 PR c++/10793
2400 * decl.c (xref_basetypes): Handle error_mark_node.
2401
2402 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2403
2404 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2405 * tree.c (lvalue_p_1): Set it.
2406 * class.c (check_field): Don't allow non-packed non-POD fields to
2407 be packed.
2408 * call.c (reference_binding): Need a temporary for all bitfield
2409 and packed fields.
2410 (convert_like_real): Check it is ok to make a temporary here.
2411
2412 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
2413
2414 * cp-tree.h (hack_identifier): Remove.
2415 * method.c (hack_identifier): Remove.
2416 * semantics.c (finish_id_expression): Expand hack_identifier
2417 here. Simplify.
2418
2419 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2420
2421 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2422 semantics.c typeck.c: Remove unnecessary casts.
2423
2424 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2425
2426 * cp-tree.h (hack_identifier): Remove.
2427 * method.c (hack_identifier): Remove.
2428 * semantics.c (finish_id_expression): Expand hack_identifier
2429 here. Simplify.
2430
2431 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2432
2433 * cp-tree.h (finish_non_static_data_member): Add object param.
2434 * method.c (hack_identifier): Adjust.
2435 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2436 again for a FIELD_DECL.
2437 * semantics.c (finish_non_static_data_member): Add object
2438 parameter. Always save the DECL in the COMPONENT_REF.
2439 * call.c (resolve_scoped_fn_name): Adjust.
2440
2441 2003-07-17 Zack Weinberg <zack@codesourcery.com>
2442
2443 * pt.c (get_bindings): Make definition consistent with
2444 forward declaration.
2445
2446 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2447
2448 PR c++/7809
2449 * friend.c (add_friend): Check access for member functions
2450 and templates.
2451
2452 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2453
2454 PR c++/10668
2455 * typeck.c (build_class_member_access_expr): Improve diagnostic.
2456
2457 2003-07-16 Mark Mitchell <mark@codesourcery.com>
2458
2459 PR c++/11547
2460 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2461 macro.
2462 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2463 * decl.c (duplicate_decls): Merge
2464 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2465 * parser.c (cp_parser_postfix_expression): Adjust call to
2466 cp_parser_initializer_list and
2467 cp_parser_parenthesized_expression_list.
2468 (cp_parser_parenthesized_expression_list): Add non_constant_p.
2469 (cp_parser_new_placement): Adjust call to
2470 cp_parser_parenthesized_expression_list.
2471 (cp_parser_direct_new_declarator): Likewise.
2472 (cp_parser_conditional_expression): Remove.
2473 (cp_parser_constant_expression): Parse an assignment-expression,
2474 not a conditional-expression.
2475 (cp_parser_simple_declaration): Resolve expression/declaration
2476 ambiguity more quickly.
2477 (cp_parser_mem_initializer): Adjust call to
2478 cp_parser_parenthesized_expression_list.
2479 (cp_parser_init_declarator): Keep track of whether or not the
2480 initializer is a constant-expression.
2481 (cp_parser_initializer): Add non_constant_p parameter.
2482 (cp_parser_initializer_clause): Likewise.
2483 (cp_parser_initializer_list): Likewise.
2484 (cp_parser_attribute_list): Adjust call to
2485 cp_parser_parenthesized_expression_list.
2486 (cp_parser_functional_cast): Likewise.
2487 * pt.c (tsubst_decl): Copy
2488 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2489 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2490 * semantics.c (finish_id_expression): Use
2491 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2492
2493 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
2494
2495 * lang-options.h: Remove.
2496
2497 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
2498
2499 PR c/10962
2500 * class.c (field_decl_cmp): Remove.
2501 (resort_field_decl_cmp): Remove.
2502 (resort_sorted_fields): Remove.
2503 (add_fields_to_vec): Rename to ...
2504 (add_fields_to_record_type): this.
2505 (finish_struct_1): Change to be using
2506 sorted_fields_type's fields.
2507 * cp-tree.h (lang_decl): In lang_decl_u3
2508 change sorted_fields to be a pointer to
2509 sorted_fields_type.
2510 (resort_sorted_fields): Remove prototype.
2511 * search.c (lookup_field_1): Change to be using
2512 sorted_fields_type's fields.
2513
2514 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2515
2516 PR c++/5421
2517 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2518 is a member of other class.
2519 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2520 is a specialization of function template.
2521
2522 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2523
2524 PR c++/10903
2525 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2526 Improve.
2527
2528 2003-07-15 Mark Mitchell <mark@codesourcery.com>
2529
2530 * cp-tree.def (LOOKUP_EXPR): Remove.
2531 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2532 (LOOKUP_EXPR_GLOBAL): Remove.
2533 (get_bindings): Remove.
2534 (is_aggr_type_2): Remove.
2535 * call.c (resolved_scoped_fn_name): Remove support for
2536 LOOKUP_EXPR.
2537 * decl.c (grokfndecl): Likewise.
2538 (grokdeclarator): Likewise.
2539 * error.c (dump_decl): Likewise.
2540 (dump_expr): Likewise.
2541 * friend.c (do_friend): Likewise.
2542 * init.c (build_offset_ref): Likewise.
2543 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
2544 LOOKUP_EXPRs
2545 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2546 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2547 test.
2548 * pt.c (get_bindings): Give it internal linkage.
2549 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2550 (lookup_template_function): Likewise.
2551 (for_each_tempalte_parm_r): Likewise.
2552 (tsubst_decl): Likewise.
2553 (tsubst_qualified_id): Handle template template parameters.
2554 (tsubst_copy): Remove support for LOOKUP_EXPR.
2555 (tsubst_copy_and_build): Likewise.
2556 (most_general_template): Likewise.
2557 (value_dependent_expression_p): Likewise.
2558 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2559 always dependent.
2560 * semantics.c (perform_koenig_lookup): Do not create
2561 IDENTIFIER_NODEs.
2562 (finish_fname): Likewise.
2563 (finish_id_expression): Likewise.
2564 * tree.c (is_aggr_type_2): Remove.
2565
2566 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2567
2568 PR c++/11531
2569 * typeck.c (check_return_expr): Fix thinko in diagnostic.
2570
2571 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2572
2573 PR c++/10108
2574 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2575 error_mark_node.
2576
2577 2003-07-14 Mark Mitchell <mark@codesourcery.com>
2578
2579 PR c++/11509
2580 * pt.c (dependent_scope_ref_p): New function.
2581 (value_dependent_expression_p): Use it.
2582 (type_dependent_expression_p): Likewise.
2583
2584 * pt.c (tsubst_friend_function): Use reregister_specialization.
2585
2586 PR c++/7019
2587 * cp-tree.h (lookup_qualified_name): Adjust prototype.
2588 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
2589 call to is_aggr_type.
2590 * parser.c (cp_parser_lookup_name): Adjust call to
2591 lookup_qualified_name.
2592 * pt.c (tsubst_qualified_id): Likewise.
2593 (tsubst_copy_and_build): Likewise.
2594 * semantics.c (finish_qualified_id_expr): Deal with erroneous
2595 expressions.
2596
2597 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2598
2599 PR c++/11510
2600 * call.c (op_error): Properly format REALPART_EXPR and
2601 IMAGPART_EXPR.
2602 * error.c (dump_expr): Likewise.
2603
2604 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2605
2606 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2607
2608 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2609
2610 PR c++/5293
2611 * call.c (initialize_reference): Improve diagnostic.
2612
2613 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2614
2615 PR c++/11154
2616 * pt.c (more_specialized_class): Add full_args parameter.
2617 (most_specialized_class): Adjust calls to more_specialized_class.
2618 * cp-tree.h (more_specialized_class): Adjust declaration.
2619
2620 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
2621
2622 * lex.c (enum tree_node_kind): Delete.
2623
2624 2003-07-13 Mark Mitchell <mark@codesourcery.com>
2625
2626 PR c++/11503
2627 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2628 (SET_DECL_SELF_REFERENCE_P): Likewise.
2629 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2630 * pt.c (tsubst_decl): Copy it.
2631 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2632
2633 * pt.c (reregister_specialization): Fix thinko in previous change.
2634
2635 * cp-tree.h (cp_id_kind): New type.
2636 (unqualified_name_lookup_error): Change prototype.
2637 (unqualified_fn_lookup_error): New function.
2638 (do_identifier): Remove.
2639 (do_scoped_id): Likewise.
2640 (tsubst_copy_and_build): Change prototype.
2641 (reregister_specialization): New function.
2642 (perform_koenig_lookup): Likewise.
2643 (finish_id_expression): Likewise.
2644 * call.c (build_method_call): Adjust call to
2645 unqualified_name_lookup_error.
2646 * decl.c (duplicate_decls): Use reregister_specialization.
2647 * lex.c (is_global): Remove.
2648 (unqualified_name_lookup_error): Return a value.
2649 (do_identifier): Remove.
2650 (do_scoped_id): Likewise.
2651 (identifier_typedecl_value): Remove.
2652 (unqualified_fn_lookup_error): New function.
2653 * parser.c (cp_parser_id_kind): Remove.
2654 (cp_parser_non_constant_id_expression): Remove.
2655 (cp_parser_primary_expression): Use finish_id_expression.
2656 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2657 cp_parser_id_kind.
2658 (cp_parser_postfix_expression): Use perform_koenig_lookup.
2659 (cp_parser_template_argument): Use cp_id_kind.
2660 (cp_parser_fold_non_dependent_expr): Adjust call to
2661 tsubst_copy_and_build.
2662 * pt.c (unregister_specialization): Rename to ...
2663 (reregister_specialization): This.
2664 (tsubst_friend_function): Use it.
2665 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2666 (tsubst_qualified_id): Likewise.
2667 (tsubst_expr): Likewise.
2668 (tsubst_copy_and_build): Add function_p parameter. Use
2669 finish_id_expression. Introduce RECUR macro.
2670 (tsubst_non_call_postfix_expression): New function.
2671 (regenerate_decl_from_template): Use reregister_specialization.
2672 * semantics.c (perform_koenig_lookup): New function.
2673 (finish_id_expression): Likewise.
2674
2675 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2676
2677 * pt.c (push_access_scope_real): Remove.
2678 (push_access_scope): Move code from push_access_scope_real.
2679 (pop_access_scope): Don't check for TEMPLATE_DECL.
2680 (instantiate_template): Defer access checking during template
2681 substitution.
2682 (regenerate_decl_from_template): Tidy.
2683
2684 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
2685
2686 PR c++/11437
2687 * operators.def: Add definitions for __imag__, __real__.
2688
2689 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
2690
2691 PR c++/11050
2692 * parser.c (cp_parser_expression_list): Rename to ...
2693 (cp_parser_parenthesized_expression_list): ... here. Add attribute
2694 parameter, parse the surounding parentheses.
2695 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2696 parameters. Return int.
2697 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2698 (cp_parser_postfix_expression): Adjust function call parsing.
2699 (cp_parser_new_placement): Adjust.
2700 (cp_parser_new_initializer): Likewise.
2701 (cp_parser_cast_expression): Likewise.
2702 (cp_parser_selection_statement): Likewise.
2703 (cp_parser_mem_initializer): Likewise.
2704 (cp_parser_asm_definition): Likewise.
2705 (cp_parser_init_declarator): Likewise.
2706 (cp_parser_declarator): Make
2707 cdtor_or_conv_p an int ptr.
2708 (cp_parser_direct_declarator): Likewise. Check for a parameter
2709 list on cdtors & conv functions.
2710 (cp_parser_initializer): Adjust.
2711 (cp_parser_member_declaration): Adjust.
2712 (cp_parser_attribute_list): Move code into
2713 cp_parser_parens_expression_list.
2714 (cp_parser_functional_cast): Adjust.
2715 * pt.c (type_dependent_expression_p): Erroneous expressions are
2716 non-dependent.
2717
2718 2003-07-11 Geoffrey Keating <geoffk@apple.com>
2719
2720 * decl.c (cp_finish_decl): Handle 'used' attribute.
2721
2722 * cp-lang.c (c_reset_state): New dummy routine.
2723 * cp-tree.h (finish_file): Move prototype to c-common.h.
2724 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2725
2726 2003-07-11 Mark Mitchell <mark@codesourcery.com>
2727
2728 PR c++/8327
2729 * pt.c (tsubst_qualified_id): Implement suggested resolution for
2730 Core Issue 2.
2731 (type_dependent_expression_p): Likewise.
2732
2733 2003-07-10 Mark Mitchell <mark@codesourcery.com>
2734
2735 * typeck.c (build_binary_op): Do not warn about signed
2736 vs. unsigned comparisons in the bodies of templates.
2737
2738 PR c++/9411
2739 * parser.c (cp_parser_postfix_expression): Check dependency of
2740 functions.
2741
2742 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2743
2744 PR c++/10032
2745 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2746 still errors.
2747
2748 PR c++/10527
2749 * error.c (decl_to_string): Do not print default argument
2750 expressions.
2751
2752 * cp-tree.h (break_out_calls): Remove declaration.
2753 * tree.c (break_out_calls): Remove.
2754 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2755
2756 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
2757
2758 PR c++ 9483
2759 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2760 * decl2.c (constructor_name_p): Avoid repeated constructor_name
2761 calls.
2762 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2763
2764 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2765
2766 * typeck.c (build_x_unary_op): Take note of the fact that
2767 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2768 trees.
2769
2770 * parser.c (cp_parser_primary_expression): Preserve the form of
2771 qualified expressions in templates, even if they are not
2772 dependent.
2773 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2774 (tsubst_qualified_id): Likewise.
2775 * search.c (accessible_p): Treat everything in the body of a
2776 template as accessible.
2777
2778 2003-07-08 Mark Mitchell <mark@codesourcery.com>
2779
2780 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2781 * cp-tree.h (build_call_from_tree): Remove.
2782 (build_member_call): Likewise.
2783 (dependent_template_arg_p): Remove.
2784 (any_dependent_template_arguments_p): New function.
2785 (dependent_template_id_p): Likewise.
2786 (any_type_dependent_arguments_p): Likewise.
2787 (build_non_dependent_expr): Likewise.
2788 (build_non_dependent_args): Likewise.
2789 (build_x_compound_expr): Adjust prototype.
2790 * call.c (build_new_method_call): Handle non-dependent expressions
2791 correctly.
2792 * decl2.c (grok_array_decl): Likewise.
2793 (build_offset_ref_call_from_tree): Likewise.
2794 (build_call_from_tree): Remove.
2795 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2796 (dump_expr): Likewise.
2797 * init.c (build_member_call): Remove.
2798 * mangle.c (write_expression): Update handling for template-ids.
2799 * parser.c (cp_parser_primary_expression): Use
2800 any_dependent_template_arguments_p. Update constant-expression
2801 handling.
2802 (cp_parser_postfix_expression): Use
2803 any_type_dependent_arguments_p. Simplify call processing.
2804 (cp_parser_unary_expression): Simplify.
2805 (cp_parser_expression): Adjust for changes to
2806 build_x_compound_expr.
2807 (cp_parser_template_argument): Implement standard-conforming
2808 parsing of non-type template arguments.
2809 (cp_parser_direct_declarator): Use
2810 cp_parser_fold_non_dependent_expr.
2811 (cp_parser_fold_non_dependent_expr): New function.
2812 (cp_parser_next_token_ends_template_argument_p): Likewise.
2813 * pt.c (convert_template_argument): Do not call
2814 maybe_fold_nontype_arg.
2815 (tsubst_baselink): Likewise.
2816 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
2817 processing work correctly for non-dependent expressions. Adjust
2818 handling of COMPOUND_EXPR. Simplify call processing.
2819 (value_dependent_expression_p): Deal with functional casts and
2820 sizeof/alignof correctly.
2821 (type_dependent_expression_p): Handle overloaded functions.
2822 (any_type_dependent_arguments_p): New function.
2823 (any_dependent_template_arguments_p): Likewise.
2824 (dependent_template_p): Treat SCOPE_REFs as dependent.
2825 (dependent_template_id_p): Simplify.
2826 (build_non_dependent_expr): New function.
2827 (build_non_dependent_args): Likewise.
2828 * semantics.c (finish_stmt_expr): Don't make dependent
2829 statement-expresions have void type.
2830 (finish_call_expr): Handle non-dependent expressions
2831 correctly.
2832 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2833 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2834 type size_t, even in templates.
2835 (expr_sizeof): Likewise.
2836 (finish_class_member_access_expr): Handle non-dependent expressions
2837 correctly.
2838 (build_x_indirect_ref): Likewise.
2839 (build_x_binary_op): Likewise.
2840 (build_x_unary_op): Likewise.
2841 (build_x_conditional_expr): Likewise.
2842 (build_x_compound_expr): Likewise.
2843 * typeck2.c (build_x_arrow): Likewise.
2844
2845 2003-07-09 Jan Hubicka <jh@suse.cz>
2846
2847 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2848 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2849 (start_function): Use DECL_ESTIMATED_INSNS.
2850 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2851
2852 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2853 unit-at-a-time
2854
2855 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2856
2857 PR c++/11030
2858 * pt.c (instantiate_class_template): Don't call xref_tag to
2859 inject name when the friend class is a specialization.
2860
2861 2003-07-07 Mark Mitchell <mark@codesourcery.com>
2862
2863 * cp-tree.h (build_scoped_method_call): Remove.
2864 (lookup_qualified_name): Remove parameter.
2865 (tsubst_copy_and_build): Declare.
2866 (finish_qualified_object_call_expr): Remove.
2867 (check_accessibility_of_qualified_id): New function.
2868 (finish_qualified_id_expr): Likewise.
2869 (non_reference): Likewise.
2870 (build_expr_from-tree): Remove.
2871 * call.c (non_reference): Remove.
2872 (build_scoped_method_call): Likewise.
2873 (build_method_call): Use error_operand_p. Assert that we are not
2874 processing a template.
2875 (standard_conversion): Use non_reference.
2876 * class.c (build_vtbl_entry_ref): Likewise.
2877 (build_vtbl_ref_1): Likewise.
2878 * cvt.c (build_expr_type_conversion): Use non_reference.
2879 * decl.c (lookup_qualified_name): Remove flags parameter.
2880 (grok_op_properties): Use non_reference.
2881 * decl2.c (grok_array_decl): Likewise.
2882 (build_expr_from_tree): Remove.
2883 (build_offset_ref_call_from_tree): Update comment.
2884 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2885 * except.c (prepare_eh_types): Use non_reference.
2886 (can_convert_eh): Likewise.
2887 * init.c (build_dtor_call): Avoid using build_method_call.
2888 * mangle.c (write_template_param): Remove misleading comment.
2889 * method.c (locate_copy): Use non_reference.
2890 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2891 (cp_parser_primary_expression): Do not create SCOPE_REFs is
2892 non-dependent contexts.
2893 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2894 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2895 build_expr_from_tree.
2896 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2897 Use check_accessibility_of_qualified_id.
2898 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2899 build_expr_from_tree.
2900 (tsubst_baselink): New function.
2901 (tsubst_qualified_id): Likewise.
2902 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
2903 (tsubst_expr): Adjust call to lookup_qualified_name.
2904 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
2905 handling of CALL_EXPRs.
2906 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2907 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2908 * search.c (check_final_overrider): Likewise.
2909 * semantics.c (check_accessibility_of_qualified_id): New function.
2910 (finish_qualified_object_call_expr): Remove.
2911 * typeck.c (target_type): Use non_reference.
2912 (cxx_sizeof_or_alignof_type): Likewise.
2913 (dubious_conversion_warnings): Likewise.
2914 (convert_for_initialization): Likewise.
2915 (non_reference): New function.
2916
2917 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2918
2919 * decl.c (print_binding_level, print_other_binding_stack,
2920 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2921 stdio calls.
2922 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2923
2924 2003-07-07 Andreas Jaeger <aj@suse.de>
2925
2926 * friend.c: Convert to ISO C90 prototypes.
2927
2928 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2929 language.
2930 * cfns.h: Regenerate.
2931
2932 * typeck.c: Convert remaining prototypes to ISO C90.
2933 * search.c: Likewise.
2934
2935 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2936 * semantics.c (expand_or_defer_fn): Likewise
2937 * mangle.c (discriminator_for_string_literal): Likewise.
2938 * g++spec.c (lang_specific_driver): Likewise.
2939
2940 * search.c (lookup_base_r): Remove unused variable.
2941
2942 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
2943
2944 * semantics.c: (genrtl_try_block) Adjust emit_line_note
2945 calls.
2946
2947 2003-07-07 Andreas Jaeger <aj@suse.de>
2948
2949 * search.c (lookup_base_r): Remove unused variable.
2950
2951 2003-07-06 Michael Chastain <mec@shout.net>
2952
2953 PR debug/10055
2954 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2955 assigning to input_filename directly.
2956
2957 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
2958
2959 * call.c: Fix comment formatting.
2960 * class.c: Likewise.
2961 * cp-tree.h: Likewise.
2962 * decl.c: Likewise.
2963 * decl2.c: Likewise.
2964 * error.c: Likewise.
2965 * method.c: Likewise.
2966 * name-lookup.c: Likewise.
2967 * parser.c: Likewise.
2968 * pt.c: Likewise.
2969 * rtti.c: Likewise.
2970 * search.c: Likewise.
2971 * typeck.c: Likewise.
2972
2973 2003-07-06 Mark Mitchell <mark@codesourcery.com>
2974
2975 PR c++/11345
2976 * search.c (lookup_base_r): Remove is_non_public and
2977 within_current_scope parameters. Remove other dead code.
2978 (lookup_base): Adjust call to lookup_base_r.
2979 (adjust_result_of_qualified_name_lookup): Improve comment.
2980 * semantics.c (finish_call_expr): Use maybe_dummy_object.
2981
2982 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
2983
2984 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2985 LANG_HOOKS_MISSING_ARGUMENT): Override.
2986
2987 2003-07-05 Mark Mitchell <mark@codesourcery.com>
2988
2989 PR c++/11431
2990 * typeck.c (build_static_cast): Check for reference conversions
2991 earlier.
2992
2993 2003-07-04 Mark Mitchell <mark@codesourcery.com>
2994
2995 * cp-tree.h (perform_integral_promotions): Declare.
2996 * call.c (build_addr_func): Use decay_conversion.
2997 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
2998 (convert_for_arg_passing): Use perform_integral_promotions.
2999 * cvt.c (build_expr_type_conversion): Use decay_conversion.
3000 (type_promotes_to): Do not return a cv-qualified type.
3001 * decl.c (grok_reference_init): Fix formatting.
3002 (get_atexit_node): Use decay_conversion.
3003 (build_enumerator): Use perform_integral_promotions.
3004 * init.c (build_vec_init): Use decay_conversion.
3005 * semantics.c (finish_expr_stmt): Likewise.
3006 (finish_switch_cond): Use perform_integral_promotions.
3007 * typeck.c (default_conversion): Likewise.
3008 (perform_integral_promotions): New function.
3009 (build_indirect_ref): Use decay_conversion.
3010 (build_array_ref): Use perform_integral_promotions.
3011 (convert_arguments): Use decay_conversion.
3012 (build_unary_op): Use perform_integral_promotions.
3013 (build_c_cast): Use decay_conversion.
3014 (build_modify_expr): Likewise.
3015 (convert_for_initialization): Likewise.
3016 * typeck2.c (build_x_arrow): Likewise.
3017
3018 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
3019
3020 * call.c: Fix comment typos.
3021 * class.c: Likewise.
3022 * cp-tree.h: Likewise.
3023 * cvt.c: Likewise.
3024 * decl2.c: Likewise.
3025 * decl.c: Likewise.
3026 * init.c: Likewise.
3027 * mangle.c: Likewise.
3028 * parser.c: Likewise.
3029 * pt.c: Likewise.
3030 * search.c: Likewise.
3031 * semantics.c: Likewise.
3032 * tree.c: Likewise.
3033 * typeck.c: Likewise.
3034
3035 2003-07-04 Zack Weinberg <zack@codesourcery.com>
3036
3037 * parser.c (cp_lexer_read_token): No need to handle string
3038 constant concatenation.
3039
3040 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3041
3042 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
3043 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
3044 ATTRIBUTE_GCC_CXXDIAG.
3045
3046 2003-07-03 Mark Mitchell <mark@codesourcery.com>
3047
3048 * call.c (build_addr_func): Handle bound pointers-to-members.
3049 (build_method_call): Do not call resolve_offset_ref.
3050 (implicit_conversion): Likewise.
3051 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
3052 resolve_offset_ref.
3053 (resolve_args): Do not call resolve_offset_ref.
3054 (build_conditional_expr): Likewise.
3055 (build_new_method_call): Likewise.
3056 * cp-tree.def (OFFSET_REF): Update documentation.
3057 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
3058 pointers to members to pointers.
3059 (ocp_convert): Do not call resolve_offset_ref.
3060 (convert_to_void): Likewise.
3061 (build_expr_type_conversion): Likewise.
3062 * decl2.c (delete_sanity): Likewise.
3063 * init.c (resolve_offset_ref): Simplify greatly.
3064 (build_vec_delete): Do not call resolve_offset_ref.
3065 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
3066 if appropriate.
3067 (cp_parser_unary_expression): Use
3068 cp_parser_simple_cast_expression.
3069 (cp_parser_delete_expression): Likewise.
3070 (cp_parser_cast_expression): Likewise.
3071 (cp_parser_pm_expression): Use cp_parser_binary_op.
3072 (cp_parser_simple_cast_expression): New function.
3073 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
3074 * semantics.c (finish_increment_expr): Likewise.
3075 (finish_typeof): Likewise.
3076 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
3077 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
3078 (decay_conversion): Do not call resolve_offset_ref.
3079 (finish_class_member_access_expr): Likewise.
3080 (convert_arguments): Likewise.
3081 (build_x_binary_op): Handle DOTSTAR_EXPR.
3082 (condition_conversion): Do not call resolve_offset_ref.
3083 (unary_complex_lvalue): Likewise.
3084 (build_static_cast): Likewise.
3085 (build_reinterpret_cast): Likewise.
3086 (build_const_cast): Likewise.
3087 (build_c_cast): Likewise.
3088 (build_modify_expr): Likewise.
3089 (convert_for_assignment): Likewise.
3090 (convert_for_initialization): Likewise.
3091 * typeck2.c (build_x_arrow): Likewise.
3092 (build_m_component_ref): Simplify.
3093
3094 * call.c (build_scoped_method_call): Use convert_to_void.
3095 (build_method_call): Likewise.
3096 * class.c (check_field_decls): Remove dead code.
3097 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3098 * decl2.c (grok_array_decl): Remove dead code.
3099 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3100 as pointer-to-member representation.
3101 * init.c (build_offset_ref): Tidy.
3102 (build_vec_delete_1): Use convert_to_void.
3103 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3104 as pointer-to-member representation.
3105
3106 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
3107
3108 PR c++/9162
3109 * decl.c (grokdeclarator): Return friend decls, not
3110 void_type_node.
3111 * decl2.c (grokfield): Alter friend decl check.
3112 * parser.c (struct cp_parser): Document default_arg chain on
3113 unparsed_functions_queue.
3114 (cp_parser_save_default_args): New.
3115 (cp_parser_init_declarator, cp_parser_function_definition,
3116 cp_parser_member_declaration): Call it.
3117 (cp_parser_class_specifier): Remove unused variable. Alter
3118 processing of unparsed_functions_queue.
3119
3120 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3121
3122 * class.c (add_method, check_field_decl): Fix format specifier.
3123 * decl.c (duplicate_decls, pushdecl, check_goto,
3124 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3125 start_enum): Likewise.
3126 * decl2.c (ambiguous_decl): Likewise.
3127 * pt.c (redeclare_class_template): Likewise.
3128
3129 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
3130
3131 PR c++/10219
3132 * pt.c (type_unification_real): Don't unify exprs of error type.
3133 * tree.c (error_type): Don't die on error_type.
3134
3135 PR c++/9779
3136 * decl2.c (arg_assoc_class): Don't die on NULL type.
3137 * typeck.c (type_unknown_p): Don't die on untyped expressions.
3138
3139 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3140
3141 PR c++/6949
3142 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3143 classes.
3144
3145 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3146
3147 * error.c (locate_error): %P takes an `int', not a `tree'.
3148
3149 2003-07-02 Jan Hubicka <jh@suse.cz>
3150
3151 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3152 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3153 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3154 massaging.
3155
3156 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3157 (expand_or_defer_fn): Declare.
3158 (lower_function): Declare.
3159 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3160 * decl2.c: Include cgraph.h and varpool.h
3161 (maybe_emit_vtables): Make explicit instantations as needed.
3162 (mark_member_pointers, lower_function): New functions.
3163 (finish_file): Do unit-at-a-time.
3164 * method.c (synthesize_method): Use expand_or_defer_fn.
3165 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3166 * parser.c (cp_parser_function_definition_after_decl): Use
3167 expand_or_defer_fn.
3168 * pt.c (instantiate_decl): Likewise.
3169 * semantics.c: Include cgraph.h
3170 (expand_or_defer_fn): Break out from ...
3171 (expand_body): ... here; deal with unit-at-a-time.
3172 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3173 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3174
3175 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3176
3177 * call.c (resolve_scoped_fn_name): Return error_mark_node for
3178 erroneous cases.
3179
3180 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3181
3182 PR c++/11149
3183 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3184 is a class type.
3185
3186 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
3187
3188 PR c++/8046
3189 * error.c (dump_decl): Handle BIT_NOT_EXPR as
3190 pseudo destructor calls.
3191
3192 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3193
3194 * cp-tree.h (define_label): Replace filename and lineno
3195 arguments with a location_t.
3196 * decl.c (pop_label): Adjust define_label call.
3197 (define_label): Replace filename and lineno arguments with a
3198 location_t.
3199 * semantics.c (finish_label): Adjust define_label call.
3200
3201 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3202
3203 PR c++/9559
3204 * decl2.c (grokfield): Do not build NOP_EXPRs around the
3205 error_mark_node.
3206
3207 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
3208
3209 * Make-lang.in: Update.
3210 * cp-lang.c (c_language): Define.
3211 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3212 * cp-tree.h (cxx_init_options): Remove.
3213 * lex.c: Don't include diagnostic.h.
3214 (cxx_init_options): Remove.
3215
3216 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3217
3218 PR c++/4933
3219 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3220 tree generated within a template. Use dump_expr to dump an
3221 expression sizeof.
3222
3223 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3224
3225 * mangle.c (write_expression): Exit gracefully when trying to
3226 mangle a CALL_EXPR.
3227
3228 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3229
3230 PR c++/10750
3231 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3232 (value- or type-) dependent expression as DECL_INITIAL is a
3233 valid constant-expression (at parser time).
3234
3235 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3236
3237 PR c++/11106
3238 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3239 USING_DECL, instead of print_tree_identifier.
3240
3241 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3242
3243 * cp-tree.h (language_to_string): Adjust declaration.
3244 * dump.c (cp_dump_tree): Adjust usage.
3245 * error.c (dump_char): Use output_formatted_scalar. Tidy.
3246 (parm_to_string): Lose unused parameter. Tidy.
3247 (expr_to_string): Likewise.
3248 (code_to_string): Likewise.
3249 (language_to_string): Likewise.
3250 (op_to_string): Likewise.
3251 (assop_to_string): Likewise.
3252 (digit_buffer): Remove.
3253 (dump_type): Format builtin vector type as __vector__.
3254
3255 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3256
3257 * error.c (print_integer): Remove.
3258 (dump_type_suffix): Adjust.
3259 (dump_expr): Likewise.
3260
3261 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3262
3263 * error.c (print_instantiation_partial_context): Take a
3264 location_t.
3265 (print_instantiation_full_context): Adjust.
3266 (print_instantiation_context): Adjust.
3267
3268 * cp-tree.h (cp_line_of, cp_file_of): Remove.
3269 * error.c (cp_line_of, cp_file_of): Merge into ...
3270 (location_of): ... here. Make static, return a location_t.
3271 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3272
3273 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3274
3275 PR c++/10784
3276 * call.c (joust): Move warn_conversion check outwards.
3277
3278 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3279
3280 * decl.c (build_typename_type)
3281 * mangle.c (write_template_template_arg)
3282 * parser.c (cp_parser_scope_through_which_access_occurs)
3283 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3284 * repo.c (get_base_filename)
3285 * semantics.c (maybe_convert_cond):
3286 Mark the definition static, matching the forward declaration.
3287
3288 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3289
3290 PR c++/10468
3291 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3292
3293 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3294
3295 PR c++/10796
3296 * decl.c (finish_enum): Implement DR377.
3297
3298 * decl.c (cp_finish_decl): Don't make variables with reference
3299 type readonly while they are being initialized.
3300
3301 2003-06-26 Mark Mitchell <mark@codesourcery.com>
3302
3303 PR c++/11332
3304 * typeck.c (build_static_cast): Avoid returning expressions with
3305 reference type.
3306
3307 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
3308
3309 * call.c (build_op_delete_call): Use strip_array_call. Correct
3310 error message to say 'delete' or 'delete[]'.
3311
3312 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
3313
3314 PR c++/8266
3315 * pt.c (check_explicit_specialization): When looking up a
3316 template function from an identifier outside class-scope, bind
3317 it to CP_DECL_CONTEXT.
3318
3319 2003-06-25 Mark Mitchell <mark@codesourcery.com>
3320
3321 PR c++/10990
3322 * search.c (lookup_base_r): Rely on accessible_p, rather than
3323 trying to emulate that logic here.
3324
3325 PR c++/10931
3326 * call.c (convert_like): Pass issue_conversion_warnings.
3327 (convert_like_with_context): Likewise.
3328 (convert_like_real): Add issue_conversion_warnings parameter.
3329 (perform_direct_initialization_if_possible): New function.
3330 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3331 * typeck.c (check_for_casting_away_constness): New function.
3332 (build_static_cast): Rewrite.
3333
3334 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
3335
3336 * call.c (enforce_access): Assert we get a binfo.
3337 (build_op_delete_call): Pass a binfo to
3338 perform_or_defer_access_check.
3339 * class.c (alter_access): Likewise.
3340 * decl.c (make_typename_type): Likewise.
3341 (make_unbound_class_template): Likewise.
3342 * lex.c (do_identifier): Likewise.
3343 * method.c (hack_identifier): Likewise.
3344 * parser.c (cp_parser_lookup_name): Likewise.
3345 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3346 test.
3347 * semantics.c (finish_non_static_data_member): Likewise.
3348 (perform_or_defer_access_check): Expect a binfo.
3349 * typeck.c (comptypes): Expect types.
3350
3351 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3352 * friend.c (make_friend_class): Likewise.
3353 * pt.c (check_default_tmpl_args): Likewise.
3354 (lookup_template_class): Likewise.
3355
3356 2003-06-24 Jan Hubicka <jh@suse.cz>
3357
3358 * method.c (thunk_labelno): Move outside ifdef block to make garbage
3359 collector happy.
3360
3361 2003-06-24 Jan Hubicka <jh@suse.cz>
3362
3363 * class.c (build_vtable): Make vtables.
3364 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3365 * decl2.c (output_vtable_inherit): Rename to ...
3366 (prepare_assemble_variable): ... this one; change interface.
3367 (maybe_emit_vtables): Do not call output_vtable_inherit.
3368 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3369 * cp-tree.h (prepare_assemble_variable): New.
3370
3371 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
3372
3373 * method.c: add prototype for make_alias_for_thunk.
3374 (thunk_labelno, make_alias_for_thunk): only define
3375 if ASM_OUTPUT_DEF is defined.
3376
3377 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3378
3379 * method.c (thunk_labelno): New variable.
3380 (make_alias_for_thunk): New function.
3381 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
3382 into the same section as the function it is calling.
3383 Include gt-cp-method.h.
3384 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3385 (cp/method.o): Depend on gt-cp-method.h.
3386 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3387
3388 2003-06-23 Jan Hubicka <jh@suse.cz>
3389
3390 * decl.c (register_dtor_fn): Mark cleanup as used.
3391 * decl2.c (mark_vtable_entries): Skip nops.
3392 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3393 (build_dynamic_cast_1): Likewise.
3394 (tinfo_base_init): Likewise.
3395 (emit_tinfo_decl): Likewise.
3396
3397 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3398
3399 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3400 to it.
3401
3402 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3403
3404 PR c++/10784
3405 * call.c (joust): Warn about choosing conversion sequence only if
3406 -Wconversion.
3407
3408 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3409
3410 PR c++/10864
3411 * call.c (op_error): Tidy.
3412 * error.c (dump_expr): Properly format 'T()' when T is an
3413 aggregate type.
3414
3415 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3416
3417 PR c++/10915
3418 * decl.c (grok_op_properties): Warn possible confusing conversion
3419 only if -Wconversion.
3420
3421 2003-06-20 Mark Mitchell <mark@codesourcery.com>
3422
3423 PR c++/10749
3424 * parser.c (cp_parser_class_head): See through dependent names
3425 when parsing a class-head.
3426
3427 PR c++/10845
3428 * pt.c (try_class_unification): Correct handling of member class
3429 templates.
3430
3431 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3432
3433 * semantics.c (genrtl_finish_function): Adjust
3434 expand_function_end call.
3435
3436 2003-06-19 Mark Mitchell <mark@codesourcery.com>
3437
3438 PR c++/10939
3439 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3440 functions.
3441 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3442
3443 PR c++/9649
3444 * cp-tree.h (pushdecl_class_level): Change prototype.
3445 (push_class_level_binding): Likewise.
3446 * decl.c (add_binding): Reject duplicate static data members.
3447 (pushdecl_class_level): Return a value indicating whether or not
3448 the binding was valid.
3449 (push_class_level_binding): Likewise.
3450 * semantics.c (finish_member_declaration): Don't keep invalid
3451 declarations.
3452
3453 PR c++/11041
3454 * call.c (initialize_reference): Do not use cp_finish_decl to emit
3455 temporary variables.
3456 * cp-tree.h (static_aggregates): Declare.
3457 (pushdecl_top_level_and_finish): Likewise.
3458 * decl.c (pushdecl_top_level_1): New function.
3459 (pushdecl_top_level): Use it.
3460 (pushdecl_top_level_and_finish): New function.
3461 (initialize_local_var): Remove redundant code.
3462 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
3463 building_stmt_tree.
3464 * decl.h (static_aggregates): Remove.
3465 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3466 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3467 (tinfo_base_init): Likewise.
3468
3469 2003-06-19 Matt Austern <austern@apple.com>
3470
3471 PR c++/11228
3472 * init.c (build_zero_init): Assert that number of array elements
3473 is an integer constant.
3474 (build_default_init) Don't use build_zero_init for arrays with
3475 variable number of elements.
3476
3477 2003-06-19 Andreas Jaeger <aj@suse.de>
3478
3479 * cp-tree.h: Remove duplicated declarations.
3480
3481 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
3482
3483 * pt.c: Convert to ISO C.
3484 * semantics.c: Convert to ISO C.
3485
3486 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3487
3488 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3489 at_least_as_qualified_p, more_qualified_p): Return bool.
3490 * typeck.c: ANSIFY function definitions.
3491 (comp_array_types): Take redeclaration bool parameter.
3492 (comptypes): Rearrange STRICT handling.
3493 (at_least_as_qualified_p, more_qualified_p,
3494 comp_cv_qualification): Cache cv quals.
3495 (compparms): Rearrange loop.
3496
3497 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3498
3499 * cp-tree.h (COMPARE_RELAXED): Rename to ...
3500 (COMPARE_DERIVED): ... here. Adjust comment.
3501 (resolve_typename_type_in_current_instantiation): Remove.
3502 (cp_tree_equal, comptypes): Return a bool.
3503 * cvt.c (convert_to_reference): Adjust comptypes call.
3504 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3505 (resolve_typename_type_in_current_instantiation): Remove.
3506 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3507 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3508 calls. Refactor code.
3509 * typeck.c (comp_array_types): Return bool. Lose callback.
3510 parameter. Adjust cp_tree_equal calls.
3511 (comptypes): Return bool. Adjust strict handling. Remove relaxed
3512 enumeration and java type handling. Deal with typename types here.
3513 Adjust recursive and cp_tree_equals calls. Adjust base and derived
3514 checking.
3515 (comp_target_types): Remove unreachable code. Adjust
3516 same_or_base_type_p calls.
3517 (ptr_reasonably_similar): Adjust base and derived check.
3518
3519 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3520 unused calculation.
3521 (check_return_expr): Adjust error messages.
3522 * cp-tree.def (SCOPE_REF): Correct comment.
3523
3524 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3525
3526 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3527 string again.
3528
3529 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3530
3531 * optimize.c (dump_function): Form complete flag name by
3532 prefixing 'fdump-' to string returned by dump_flag_name().
3533
3534 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3535
3536 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3537 string.
3538
3539 2003-06-17 Jason Merrill <jason@redhat.com>
3540
3541 PR c++/10929
3542 * decl.c (grokfndecl): Don't mark a function inline for
3543 -finline-functions if it isn't defined.
3544
3545 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3546
3547 PR c++/10712
3548 * class.c (handle_using_decl): Robustify.
3549
3550 PR c++/11105
3551 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3552 * mangle.c (struct globals): Remove internal_mangling_p.
3553 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3554 (write_template_parm): Don't write out the level number.
3555 (conv_type_names): New variable.
3556 (hash_type): New function.
3557 (compare_type): Likewise.
3558 (mangle_conv_op_name_for_type): Don't try to mangle conversion
3559 operator names.
3560 * search.c (lookup_conversion_operator): New function.
3561 (lookup_fnfields_1): Use it.
3562
3563 2003-06-17 Andreas Jaeger <aj@suse.de>
3564
3565 * except.c: Remove duplicate declaration of push_eh_cleanup.
3566
3567 * call.c: Remove extra declaration of inhibit_warnings.
3568
3569 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3570
3571 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
3572 * mangle.c: Convert to ISO C.
3573
3574 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3575
3576 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3577 macro.
3578
3579 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3580
3581 * tree.c: Convert to ISO C.
3582
3583 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
3584
3585 * cp-tree.h: Follow spelling conventions.
3586 * mangle.c: Likewise.
3587 * method.c: Likewise.
3588 * parser.c: Likewise.
3589
3590 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3591
3592 * decl.c (start_function): Adjust init_function_start call.
3593 * method.c (use_thunk): Likewise.
3594 * semantics.c (genrtl_start_function): Likewise.
3595
3596 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3597
3598 * Make-lang.in: Remove c-options.o.
3599
3600 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
3601
3602 * lex.c: Convert to ISO C.
3603
3604 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
3605 * init.c: removes use of PARAMS macro. Use ISO style function
3606 declarations. (Not copyright-significant change.)
3607
3608 * rtti.c: Remove PARAMS.
3609
3610 * typeck2.c: Convert to ISO C.
3611
3612 2003-06-12 Mark Mitchell <mark@codesourcery.com>
3613
3614 PR c++/10635
3615 * typeck.c (build_c_cast): Check that the destination type is
3616 complete.
3617
3618 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3619
3620 PR c++/10432
3621 * cp-tree.h (finish_declarator): Remove.
3622 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3623 erroneous declarations.
3624 * semantics.c (finish_declarator): Remove.
3625
3626 2003-06-11 Roger Sayle <roger@eyesopen.com>
3627
3628 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3629 global static constructor/destructor if it will be empty, i.e.
3630 either doesn't call any ctors/dtors or only calls pure or const
3631 ctors/dtors.
3632
3633 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3634
3635 * mangle.c (tm_p.h): Include it.
3636 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3637
3638 PR c++/11131
3639 * tree.c (cp_cannot_inline_fn): Check for "inline" before
3640 instantiation.
3641
3642 2003-06-10 Jason Merrill <jason@redhat.com>
3643
3644 PR c++/10968
3645 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3646
3647 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
3648
3649 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3650 (start_cleanup_cnt): New.
3651
3652 2003-06-10 Mark Mitchell <mark@codesourcery.com>
3653
3654 PR c++/11131
3655 * cp-tree.h (template_for_substitution): Declare.
3656 * decl2.c (mark_used): Use it when figuring out whether or not a
3657 function is inline.
3658 * pt.c (template_for_substitution): Give it external linkage.
3659 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3660 possible.
3661
3662 2003-06-09 Zack Weinberg <zack@codesourcery.com>
3663
3664 PR 8861
3665 * mangle.c (write_real_cst): New function. Implement
3666 ABI-compliant mangling of floating-point literals when
3667 -fabi-version>=2; provide backward compatibility with 3.3 when
3668 -fabi-version=1 (with warning). Clarify commentary.
3669 (write_template_arg_literal): Use write_real_cst.
3670
3671 2003-06-07 Andreas Jaeger <aj@suse.de>
3672
3673 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3674
3675 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3676
3677 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3678 (LANG_HOOKS_HANDLE_OPTION): Override.
3679 * cp-tree.h (cxx_init_options): Update.
3680 * lex.c (cxx_init_options): Update.
3681
3682 2003-06-05 Jan Hubicka <jh@suse.cz>
3683
3684 * Make-lang.in: Add support for stageprofile and stagefeedback
3685
3686 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
3687
3688 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3689
3690 2003-06-04 Andreas Jaeger <aj@suse.de>
3691
3692 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3693
3694 2003-06-03 Jason Merrill <jason@redhat.com>
3695
3696 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3697
3698 * cp/decl.c (reshape_init): Handle vectors.
3699
3700 * testsuite/g++.dg/init/array10.C: New.
3701
3702 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3703
3704 PR c++/10940
3705 * pt.c (check_explicit_specialization): Check for 'static'
3706 earlier.
3707
3708 2003-05-31 Diego Novillo <dnovillo@redhat.com>
3709
3710 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3711 the operand of a CONSTRUCTOR node.
3712
3713 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3714
3715 * decl.c (cp_binding_level::this_entity): Rename from this_class.
3716 (cxx_scope_descriptor): New function.
3717 (cxx_scope_debug): Likewise.
3718 (push_binding_level): Use it.
3719 (pop_binding_level): Likewise.
3720 (suspend_binding_level): Likewise.
3721 (resume_binding_level): Likewise.
3722 (pushlevel_class): Adjust use of this_class.
3723 (pushtag): Likewise.
3724 (lookup_name_real): Likewise.
3725 (global_scope_name): New variable.
3726 (initialize_predefined_identifiers): Initialize it.
3727 (push_namespace): Use it.
3728 (make_cxx_scope): New function.
3729 (pushlevel): Use it.
3730 (pushlevel_class): Likewise.
3731 (push_binding_level): Simplify. Loose the last two arguments.
3732 (make_binding_level): Remove.
3733 (initial_push__namespace_scope): New function.
3734 (push_namespace): Use it. Simplify.
3735 (cxx_init_decl_processing): Likewise.
3736 (declare_namespace_level): Remove.
3737
3738 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3739
3740 PR c++/10956
3741 * pt.c (instantiate_decl): Don't use full template arguments if
3742 we are dealing with specializations.
3743
3744 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3745
3746 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3747 (binding_depth): Unconditionally define.
3748 (is_class_level): Likewise.
3749 (indent): Likewise. Take an indenting parameter.
3750 (push_binding_level): Remove conditional definittion.
3751 (pop_binding_level): Likewise.
3752 (suspend_binding_level): Likewise.
3753 (resume_binding_level): Likewise.
3754 (pushlevel): Likewise.
3755 (pushlevel_class): Likewise.
3756 (poplevel_class): Likewise.
3757 (pop_everything): Likewise.
3758
3759 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3760
3761 * name-lookup.h (global_scope_p): New macro.
3762 * decl.c (pop_binding_level): Use it. Don't refer directly to
3763 global_binding_level.
3764 (suspend_binding_level): Likewise.
3765 (global_bindings_p): Likewise.
3766 (print_other_binding_stack): Likewise.
3767 (print_binding_stack): Likewise.
3768 (maybe_push_to_top_level): Likewise.
3769 (pushdecl_namespace_level): Likewise.
3770 (cxx_init_decl_processing): Likewise.
3771 (start_decl): Likewise.
3772 (cp_finish_decl): Likewise.
3773 (start_function): Likewise.
3774 (global_binding_level): Remove.
3775
3776 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3777
3778 * parser.c (cp_parser_explicit_instantiation): Restore old
3779 access before template instantiation.
3780
3781 2003-05-23 Geoffrey Keating <geoffk@apple.com>
3782
3783 * lang-specs.h: Use -o to specify preprocessor's output file.
3784 Make -no-integrated-cpp work when building PCH files.
3785
3786 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3787
3788 PR c++/10682
3789 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3790 check for implicitly created typedef to an enum.
3791
3792 2003-05-21 Jason Merrill <jason@redhat.com>
3793
3794 * init.c (build_vec_delete): Copy the address into a temporary
3795 variable before calling build_vec_delete_1.
3796 * decl2.c (delete_sanity): Don't call stabilize_reference.
3797
3798 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
3799
3800 * pt.c (register_specialization): Update the decl's location,
3801 if necessary.
3802 (check_explicit_specialization): Likewise.
3803
3804 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3805
3806 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3807
3808 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
3809
3810 PR c++/9738
3811 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3812 if the old decl had instantiated DECL_RTL.
3813 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3814
3815 2003-05-19 Matt Austern <austern@apple.com>
3816
3817 * lang-options.h: Document -Wno-invalid-offsetof
3818 * typeck.c (build_class_member_access_expr): Don't complain about
3819 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3820
3821 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3822
3823 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3824 (binding_entry_make): Make entry->chain NULL after getting an entry.
3825 fix the spelling of chain in a comment.
3826 (binding_table_free): speed up by having temporary variable.
3827 (binding_table_new): set table->chain to be NULL after allocating
3828 a table.
3829 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3830 binding->previous to NULL after getting an binding for speed.
3831
3832 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3833
3834 * cp-tree.h (struct lang_type_class): Replace data member tags
3835 with hash-table nested_udts.
3836 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3837 * class.c (unreverse_member_declarations): Don't touch
3838 CLASSTYPE_TAGS.
3839 (pushclass): Use cxx_remember_type_decls.
3840 * decl.c (struct cp_binding_level): Replace data member tags with
3841 hash-table type_decls.
3842 (pop_binding_level): Handle level->type_decls.
3843 (kept_level_p): Adjust.
3844 (poplevel): Remove unused local variable.
3845 (bt_print_entry): New function.
3846 (print_binding_level): Use it.
3847 (push_namespace): Build current_binding_level->type_decls.
3848 (maybe_process_template_type_declaration): Adjust.
3849 (pushtag): Likewise.
3850 (clear_anon_tags): Use binding_table_remove_anonymous_types.
3851 (gettags): Remove.
3852 (cxx_remember_type_decls): Rename from storetags. Adjust.
3853 (lookup_tag): Use binding_table_find_anon_type. Tidy.
3854 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3855 (cxx_init_decl_processing): Build global_binding_level->type_decls.
3856 (store_parm_decls): Remove pointless code.
3857 * name-lookup.c (free_binding_entry): New variable.
3858 (ENTRY_INDEX): New macro.
3859 (struct binding_table_s): New datatype.
3860 (binding_entry_make): New function.
3861 (binding_entry_free): Likewise.
3862 (binding_table_construct): Likewise.
3863 (binding_table_free): Likewise.
3864 (binding_table_new): Likewise.
3865 (binding_table_expand): Likewise.
3866 (binding_table_insert): Likewise.
3867 (binding_table_find): Likewise.
3868 (binding_table_find_anon_type): Likewise.
3869 (binding_table_reverse_maybe_remap): Likewise.
3870 (binding_table_remove_anonymous_types): Likewise.
3871 (binding_table_foreach): Likewise.
3872 * name-lookup.h (binding_table): New type.
3873 (binding_entry): Likewise.
3874 (bt_foreach_proc): Likewise.
3875 (struct binding_entry_s): New datatype.
3876 (SCOPE_DEFAULT_HT_SIZE): New macro.
3877 (CLASS_SCOPE_HT_SIZE): Likewise.
3878 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3879 (NAMESPACE_STD_HT_SIZE): Likewise.
3880 (GLOBAL_SCOPE_HT_SIZE): Likewise.
3881 (binding_table_new): Declare.
3882 (binding_table_free): Likewise.
3883 (binding_table_insert): Likewise.
3884 (binding_table_find_anon_type): Likewise.
3885 (binding_table_reverse_maybe_remap): Likewise.
3886 (binding_table_remove_anonymous_types): Likewise.
3887 (binding_table_foreach): Likewise.
3888 (binding_table_find): Likewise.
3889 (cxx_remember_type_decls): Likewise.
3890 * pt.c (bt_instantiate_type_proc): New function.
3891 (do_type_instantiation): Use it.
3892 * search.c (lookup_field_r): Use binding_table_find.
3893
3894 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3895
3896 * semantics.c (perform_deferred_access_checks): Don't discard
3897 checked access.
3898
3899 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3900
3901 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3902 libiberty VA_ macros, always use stdarg.
3903 * rtti.c (create_pseudo_type_info): Likewise.
3904 * tree.c (build_min_nt, build_min): Likewise.
3905
3906 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3907
3908 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3909 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3910 collapse multiple function calls into one.
3911 * tree.c (debug_binfo): Likewise.
3912
3913 2003-05-15 Jason Merrill <jason@redhat.com>
3914
3915 PR c++/5388
3916 * call.c (conditional_conversion): Don't consider implicit
3917 conversions if T2 is a base of T1.
3918 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3919 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3920
3921 * parser.c (cp_parser_primary_expression): Convert a static data
3922 member from reference.
3923
3924 2003-05-15 Mark Mitchell <mark@codesourcery.com>
3925
3926 * call.c (build_op_delete_call): Avoid creating unnecessary types.
3927 * class.c (instantiate_type): Remove tests for tf_no_attributes.
3928 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3929 (COMPARE_NO_ATTRIBUTES): Remove.
3930 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3931
3932 PR c++/8385
3933 * semantics.c (finish_typeof): Refine type-dependency check.
3934
3935 2003-05-13 Jason Merrill <jason@redhat.com>
3936
3937 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3938 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3939
3940 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3941
3942 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3943
3944 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3945
3946 PR c++/10230, c++/10481
3947 * semantics.c (finish_non_static_data_member): Handle when the
3948 non-static member is not from a base of the current class type.
3949
3950 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3951
3952 PR c++/10552
3953 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3954 template and has dependent context.
3955
3956 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3957
3958 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3959
3960 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3961
3962 PR c++/9252
3963 * cp-tree.h (saved_scope): Remove check_access field.
3964 (tsubst_flags_t): Remove tf_parsing.
3965 * decl.c (maybe_push_to_top_level): Don't initialize
3966 scope_chain->check_access.
3967 (make_typename_type, make_unbound_class_template): Don't use
3968 tf_parsing.
3969 (register_dtor_fn): Use push/pop_deferring_access_checks
3970 instead of scope_chain->check_access.
3971 * method.c (use_thunk): Likewise.
3972 * parser.c (cp_parser_explicit_instantiation
3973 (cp_parser_constructor_declarator_p): Don't call
3974 push/pop_deferring_access_checks here.
3975 (cp_parser_template_argument, cp_parser_class_name): Don't use
3976 tf_parsing.
3977 (yyparse): Check flag_access_control.
3978 * pt.c (instantiate_class_template): Call
3979 push/pop_deferring_access_checks.
3980 * semantics.c (push_deferring_access_checks): Propagate
3981 dk_no_check.
3982 (perform_or_defer_access_check): Make sure basetype_path is
3983 a type before comparison.
3984 * call.c (build_op_delete_call, build_over_call): Use
3985 perform_or_defer_access_check.
3986 * class.c (alter_access): Likewise.
3987 * init.c (build_offset_ref): Likewise.
3988 * lex.c (do_identifier): Likewise.
3989 * method.c (hack_identifier): Likewise.
3990 * search.c (lookup_member): Likewise.
3991 * semantics.c (finish_non_static_data_member): Likewise.
3992 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3993 instead of flag_access_control.
3994
3995 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3996
3997 PR c++/9554
3998 * parser.c (cp_parser_class_name): Remove check_access parameter.
3999 All caller adjusted. Update declaration.
4000 (cp_parser_lookup_name): Likewise.
4001 * semantics.c (push_deferring_access_checks): Change parameter type
4002 to enum deferring_kind. All caller adjusted.
4003 (resume_deferring_access_checks): Adjust to use new enum.
4004 (stop_deferring_access_checks): Likewise.
4005 (perform_or_defer_access_check): Likewise.
4006 * cp-tree.h (deferring_kind): New enum.
4007 (deferred_access): Adjust field type.
4008 (push_deferring_access_checks): Update declaration.
4009
4010 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4011
4012 PR c++/10555, c++/10576
4013 * pt.c (lookup_template_class): Handle class template with
4014 multiple levels of parameters when one of the levels contain
4015 errors.
4016
4017 2003-05-08 Jason Merrill <jason@redhat.com>
4018
4019 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
4020 expression. Undo some of the recent reorg.
4021
4022 2003-05-07 Richard Henderson <rth@redhat.com>
4023
4024 PR c++/10570
4025 * cfns.gperf: Comment out POSIX thread cancellation points,
4026 plus abort and raise.
4027 * cfns.h: Regenerate.
4028
4029 2003-05-07 Jason Merrill <jason@redhat.com>
4030
4031 * call.c (build_conditional_expr): Don't assume that the folded
4032 expression has result_type.
4033
4034 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4035
4036 * typeck.c (build_unary_op): Deal with const qualifier in
4037 invalid pointer-to-member earlier.
4038
4039 2003-05-05 Jason Merrill <jason@redhat.com>
4040
4041 PR c++/9537
4042 * call.c (conditional_conversion): Build an RVALUE_CONV if
4043 we're just changing the cv-quals.
4044 (build_conditional_expr): Don't call convert to change
4045 cv-quals.
4046
4047 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4048
4049 PR c++/10496
4050 * typeck.c (build_unary_op): Don't output const qualifier when
4051 output invalid pointer-to-member diagnostics.
4052
4053 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4054
4055 * decl.c: Fix typos.
4056
4057 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4058
4059 PR c++/4494
4060 * decl.c (start_function): Use same_type_p to check return type
4061 of main.
4062
4063 2003-05-03 Zack Weinberg <zack@codesourcery.com>
4064
4065 PR c/10604
4066 * cp/typeck.c (build_x_compound_expr): No need to check
4067 extra_warnings as well as warn_unused_value.
4068
4069 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4070
4071 PR c++/9364, c++/10553, c++/10586
4072 * decl.c (make_typename_type): Don't crash on illegal code.
4073
4074 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
4075
4076 * class.c (finish_struct): Use location_t and input_location
4077 directly.
4078 * decl.c (make_label_decl): Likewise.
4079 (use_label): Likewise.
4080 * decl2.c (warn_if_unknown_interface): Likewise.
4081 (start_static_initialization_or_destruction): Likewise.
4082 (generate_ctor_or_dtor_function): Likewise.
4083 (finish_file): Likewise.
4084 * error.c (print_instantiation_full_context): Likewise.
4085 * init.c (create_temporary_var): Likewise.
4086 * method.c (synthesize_method): Likewise.
4087 * parser.c (cp_token): Likewise.
4088 (cp_lexer_set_source_position_from_token): Likewise.
4089 (cp_lexer_get_preprocessor_token): Likewise.
4090 (cp_parser_statement): Likewise.
4091 * pt.c (tsubst_friend_function): Likewise.
4092 (instantiate_class_template): Likewise.
4093 (tsubst_decl): Likewise.
4094 (tsubst): Likewise.
4095 (instantiate_decl): Likewise.
4096 * semantics.c (begin_class_definition): Likewise.
4097 (expand_body): Likewise.
4098
4099 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
4100
4101 * class.c (finish_struct): Rename lineno to input_line.
4102 * decl.c (push_binding_level, pop_binding_level,
4103 suspend_binding_level, resume_binding_level, make_label_decl,
4104 use_label, start_function): Likewise.
4105 * decl2.c (warn_if_unknown_interface,
4106 start_static_initialization_or_destruction,
4107 generate_ctor_or_dtor_function, finish_file): Likewise.
4108 * error.c (cp_line_of, print_instantiation_full_context,
4109 print_instantiation_context): Likewise.
4110 * except.c (check_handlers_1, check_handlers): Likewise.
4111 * init.c (create_temporary_var): Likewise.
4112 * method.c (use_thunk, synthesize_method): Likewise.
4113 * parser.c (cp_lexer_set_source_position_from_token,
4114 cp_lexer_get_preprocessor_token): Likewise.
4115 * pt.c (push_tinst_level, pop_tinst_level,
4116 tsubst_friend_function, instantiate_class_template, tsubst_decl,
4117 tsubst, tsubst_expr, instantiate_decl): Likewise.
4118 * semantics.c (genrtl_try_block, finish_label_stmt,
4119 begin_class_definition, expand_body,
4120 genrtl_finish_function): Likewise.
4121 * tree.c (build_min_nt, build_min): Likewise.
4122
4123 2003-05-01 Mark Mitchell <mark@codesourcery.com>
4124
4125 * decl2.c (comdat_linkage): Don't externalize explicit
4126 instantiations.
4127
4128 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4129
4130 PR c++/10554
4131 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4132 is not NULL.
4133
4134 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
4135
4136 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
4137 (struct lang_identifier): ... to here.
4138 (LANG_ID_FIELD): Remove.
4139 (SET_LANG_ID): Remove.
4140 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4141 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4142 (IDENTIFIER_IMPLICIT_DECL): Likewise.
4143 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4144 (IDENTIFIER_ERROR_LOCUS): Likewise.
4145 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4146
4147 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4148
4149 PR c++/8772
4150 * pt.c (convert_template_argument): Correct diagnostic.
4151
4152 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4153
4154 PR c++/9432, c++/9528
4155 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4156
4157 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
4158
4159 * decl.c (check_previous_goto_1): Adjust prototype.
4160 (check_previous_goto): Adjust use.
4161 (check_switch_goto): Likewise.
4162 (use_label): Adjust.
4163 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4164 (struct named_label_use_list): Use location_t datatype.
4165
4166 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4167
4168 PR c++/10551
4169 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4170 that have not yet been written out.
4171
4172 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4173
4174 PR c++/10549
4175 * class.c (layout_class_type): Mark overlong bitfields as having
4176 the maximum size permitted by their type, after layout.
4177
4178 PR c++/10527
4179 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4180
4181 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4182
4183 * call.c (build_operator_new_call): Fix typo.
4184 * lang-options.h: Likewise.
4185
4186 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4187
4188 PR c++/10515
4189 * cp-tree.h (lookup_field_1): Declare it.
4190 * search.c (lookup_field_1): Make it public.
4191 * decl.c (reshape_init): Handle designated initializers.
4192
4193 * decl.c (maybe_commonize_var): Further tweak support for systems
4194 without weak symbols.
4195
4196 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4197
4198 * decl.c (maybe_commonize_var): Fix thinko in last patch.
4199
4200 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4201
4202 PR c++/10506
4203 * method.c (use_thunk): Decrement immediate_size_expand.
4204
4205 PR c++/10503
4206 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4207 (DECL_MAYBE_TEMPLATE): Remove.
4208 * class.c (fixed_type_or_null): Avoid infinite recursion.
4209
4210 * decl.c (maybe_commonize_var): Make the code match the comments.
4211 * pt.c (instantiate_decl): Move call to import_export_decl.
4212
4213 2003-04-26 Mark Mitchell <mark@codesourcery.com>
4214
4215 * decl2.c (finish_file): Fix merge botch.
4216
4217 2003-04-25 Mark Mitchell <mark@codesourcery.com>
4218
4219 * decl2.c (finish_file): Don't call import_export_decl for
4220 functions that are not defined.
4221 (handle_class_head): Robustify.
4222 * pt.c (instantiate_decl): Do not call cp_finish_decl for
4223 variables that are not defined.
4224
4225 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
4226
4227 * call.c (print_z_candidates): Fix off by one error.
4228
4229 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
4230
4231 PR c++/10337
4232 * call.c (joust): Don't warn about conversion ops that are exact
4233 or cv-conversions. Rearrange to avoid multiple type comparisons.
4234
4235 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4236
4237 PR c++/10471
4238 * call.c (build_cxx_call): Robustify.
4239
4240 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
4241
4242 * Make-lang.in (lex.o): Remove mbchar.h.
4243 * lex.c (MULTIBYTE_CHARS): Lose.
4244 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4245 in c-lex.c.
4246
4247 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4248
4249 PR c++/9847
4250 * cp-tree.h (duplicate_tag_error): Remove.
4251 * class.c (duplicate_tag_error): Remove.
4252 * semantics.c (begin_class_definition): Return immediately for a
4253 duplicate class definition.
4254
4255 PR c++/10451
4256 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4257
4258 2003-04-22 Mark Mitchell <mark@codesourcery.com>
4259
4260 PR c++/10446
4261 * search.c (lookup_fnfields_1): Handle empty slots in the method
4262 vector.
4263
4264 PR c++/10428
4265 * decl.c (check_elaborated_type_specifier): New function, split
4266 out from ...
4267 (xref_tag): ... here. Use the new function in more places.
4268
4269 * rtti.c (throw_bad_typeid): Use build_cxx_call.
4270
4271 2003-04-21 Mark Mitchell <mark@codesourcery.com>
4272
4273 * call.c (build_over_call): Use build_cxx_call.
4274 (build_cxx_call): New method, split out of build_over_call.
4275 * cp-tree.h (language_function): Add can_throw.
4276 (build_cxx_call): Declare it.
4277 * decl.c (finish_function): If a function does not contain any
4278 calls to functions that can throw an exception, indicate that
4279 fact.
4280 * decl2.c (mark_used): Do not defer the instantiation of
4281 functions, if the current function does not throw.
4282 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4283 * pt.c (instantiate_decl): Make sure import_export_decl is called
4284 before emitting things.
4285 * rtti.c (throw_bad_cast): Use build_cxx_call.
4286 (build_dynamic_cast_1): Likewise.
4287 * typeck.c (build_function_call): Likewise.
4288
4289 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
4290
4291 PR c++/9881
4292 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4293 expressions. Reverts my 2002-08-08 patch.
4294
4295 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4296 cheaper early exit.
4297
4298 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4299
4300 * cp/decl2.c (start_static_storage_duration_function): Take count
4301 arg, don't check if it wraps round.
4302 (generate_ctor_or_dtor_function): Add locus arg, use it.
4303 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4304 locus.
4305 (finish_file): Set line numbers to past EOF for synthesized
4306 functions.
4307
4308 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4309
4310 PR c++/10405
4311 * search.c (lookup_field_1): Final scan goes backwards for
4312 types, forwards for non-types.
4313
4314 2003-04-17 Roger Sayle <roger@eyesopen.com>
4315
4316 PR c/10375
4317 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4318 "nothrow" function attributes.
4319
4320 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4321
4322 PR c++/10347
4323 * pt.c (type_dependent_expression_p): Handle array new.
4324
4325 2003-04-15 Mark Mitchell <mark@codesourcery.com>
4326
4327 PR c++/10381
4328 * parser.c (cp_parser_primary_expression): Reorganize logic for
4329 dealing with name lookup failures.
4330
4331 2003-04-15 Jason Merrill <jason@redhat.com>
4332
4333 * decl2.c (mark_used): Don't instantiate anything if
4334 skip_evaluation.
4335
4336 2003-04-14 Ziemowit Laski <zlaski@apple.com>
4337
4338 * tree.c (build_cplus_array_type_1): Do not call
4339 uses_template_parms() on a NULL index_type.
4340
4341 2003-04-13 Roger Sayle <roger@eyesopen.com>
4342
4343 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4344
4345 2003-04-12 Mark Mitchell <mark@codesourcery.com>
4346
4347 PR c++/10300
4348 * init.c (build_new_1): Reorganize.
4349
4350 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4351
4352 * class.c (initialize_array)
4353 * decl.c (reshape_init)
4354 * decl2.c (build_expr_from_tree)
4355 * init.c (build_zero_init)
4356 * pt.c (tsubst_copy, tsubst_copy_and_build)
4357 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4358 (ptm_initializer, class_initializer, get_pseudo_ti_init)
4359 * semantics.c (finish_compound_literal)
4360 * typeck.c (build_ptrmemfunc1)
4361 * typeck2.c (store_init_value, process_init_constructor)
4362 (build_functional_cast): Use build_constructor.
4363
4364 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4365
4366 * call.c (print_z_candidates): Use gcc_gettext_width, not
4367 strlen, to determine how much padding to use.
4368
4369 2003-04-10 Zack Weinberg <zack@codesourcery.com>
4370
4371 * decl.c: Update all calls to shadow_warning.
4372
4373 2003-04-10 Mark Mitchell <mark@codesourcery.com>
4374
4375 * class.c (layout_class_type): Correct handling for overlong
4376 bit-fields whose width is the same as an integer type.
4377
4378 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4379
4380 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4381 * cp-lang.c (cp_tree_size): New function.
4382 (LANG_HOOKS_TREE_SIZE): Override.
4383
4384 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4385 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4386 (union lang_tree_node): Remove common and srcloc members.
4387 (build_srcloc_here): Don't prototype.
4388 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4389 * pt.c (pending_templates): Correct comment.
4390 * tree.c (build_srcloc, build_srcloc_here): Kill.
4391
4392 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4393
4394 * call.c: Include intl.h.
4395 (print_z_candidate): Always use inform; get rid of errfn
4396 argument. Reorganize so that all the strings get picked up
4397 by xgettext. Note obligation of caller to pass first argument
4398 through gettext.
4399 (print_z_candidates): Update to match. Indent second and
4400 successive candidates by strlen() of translated message.
4401 (joust): Restructure ambiguous-conversion pedwarn so that
4402 translators see a complete sentence. Update calls to
4403 print_z_candidate.
4404
4405 * Make-lang.in (cp/call.o): Update dependencies.
4406
4407 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4408
4409 * decl.c (set_current_binding_level): Delete, revert last change.
4410 (current_binding_level): Modify to allow it as as lvalue.
4411
4412 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4413
4414 * name-lookup.c (find_binding): Pass appropriate pointer type to
4415 POP_TIMEVAR_AND_RETURN.
4416
4417 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4418
4419 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4420 * cp-tree.h: Don't insist on having GNUC.
4421
4422 2003-04-03 Jason Merrill <jason@redhat.com>
4423
4424 * cvt.c (ocp_convert): Only abort if we try to convert an object
4425 of TREE_ADDRESSABLE type.
4426
4427 * class.c (build_vtable): Set DECL_ALIGN here.
4428 (get_vtable_decl): Not here.
4429 (layout_vtable_decl): Or here.
4430 (create_vtable_ptr): Or here.
4431 (layout_class_type): Or here.
4432 (check_bitfield_decl): Don't mess with field alignment.
4433
4434 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4435
4436 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4437 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4438 * rtti.c (dfs_class_hint_mark): Likewise.
4439
4440 * decl.c (push_local_name, push_class_level_binding,
4441 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4442 functions returning void.
4443 * decl2.c (add_using_namespace): Likewise.
4444
4445 * decl.c (print_binding_level, print_other_binding_stack,
4446 print_binding_stack): Cast argument of %p specifier to void*.
4447 * ptree.c (cxx_print_decl): Likewise.
4448
4449 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4450 VAR_FUNCTION_OR_PARM_DECL_CHECK,
4451 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4452 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4453 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4454
4455 * decl.c (set_current_binding_level): New macro. Use throughout
4456 when setting the current binding level.
4457
4458 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4459 in enum.
4460 * method.c (mangling_flags): Likewise.
4461
4462 * cp-tree.h (lang_type_header): Add __extension__ and use
4463 CHAR_BITFIELD for members.
4464
4465 2003-04-02 Geoffrey Keating <geoffk@apple.com>
4466
4467 PR other/9274
4468 * mangle.c: Include gt-cp-mangle.h.
4469 (subst_identifiers): Mark with GTY.
4470 * config-lang.in (gtfiles): Add cp/mangle.c.
4471 * Make-lang.in: (gt-cp-mangle.h): New rule.
4472 (cp/mangle.o): Depends on gt-cp-mangle.h.
4473
4474 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
4475
4476 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4477 after \$(srcdir)/cp/name-lookup.h.
4478 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4479 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
4480 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4481 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4482
4483 2003-03-31 Jason Merrill <jason@redhat.com>
4484
4485 PR java/10145
4486 * class.c (check_field_decl): Don't set DECL_ALIGN.
4487
4488 2003-03-30 Mark Mitchell <mark@codesourcery.com>
4489
4490 PR c++/7647
4491 * decl.c (grokdeclarator): Tidy, slightly.
4492 * search.c (lookup_field_1): Add want_type parameter.
4493 (lookup_field_r): Adjust call to lookup_field_1.
4494
4495 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4496
4497 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4498
4499 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4500
4501 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
4502 prototype.
4503 (cxx_scope_find_binding_for_name): Likewise.
4504 * decl.c (find_binding: Move to name-lookup.c.
4505 (binding_for_name): Likewise.
4506 (cxx_scope_find_binding_for_name): Likewise.
4507 (BINDING_LEVEL): Remove.
4508 (push_binding): Tidy.
4509 (push_class_binding): Likewise.
4510 (pop_binding): Likewise.
4511 (poplevel): Likewise.
4512 (poplevel_class): Likewise.
4513 (set_identifier_type_value_with_scope): Likewise.
4514 (push_overloaded_decl): Likewise.
4515 (lookup_tag): Likewise.
4516 (unqualified_namespace_lookup): Likewise.
4517 (lookup_name_current_level): Likewise.
4518 (maybe_inject_for_scope_var): Likewise.
4519 (namespace_binding): Move to name-lookup.c.
4520 (set_namespace_binding): Likewise.
4521 * decl2.c (lookup_using_namespace): Tidy.
4522 (qualified_lookup_using_namespace): Likewise.
4523 (do_toplevel_using_decl): Likewise.
4524 * name-lookup.c: Include "timevar.h"
4525 * name-lookup.h (cxx_scope): Declare.
4526 (struct cxx_binding): Lose member "has_level". Adjust "scope"
4527 member declaration.
4528 (BINDING_SCOPE): Adjust definition.
4529 (BINDING_HAS_LEVEL_P): Remove.
4530
4531 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4532
4533 * name-lookup.c: New file.
4534 * name-lookup.h: Likewise..
4535 * decl.c (push_binding): Adjust use cxx_binding_make.
4536 (free_bindings): Move to name-lookup.c
4537 (pop_binding): Use cxx_binding_free.
4538 (binding_for_name): Tidy.
4539 * cp-tree.h: Include "name-lookup.h"
4540 (cxx_binding_make): Move to name-lookup.h
4541 (cxx_binding_clear): Likewise.
4542 (struct cxx_binding): Likewise.
4543 (LOCAL_BINDING_P): Likewise.
4544 (INHERITED_VALUE_BINDING_P): Likewise.
4545 (BINDING_SCOPE): Likewise.
4546 (BINDING_HAS_LEVEL_P): Likewise.
4547 (BINDING_VALUE): Likewise.
4548 (BINDING_TYPE): Likewise.
4549 * config-lang.in (gtfiles): Add cp/name-lookup.h
4550 * Make-lang.in (cp/name-lookup.o): New rule.
4551 (CXX_OBJS): Add cp/name-lookup.o
4552 (CXX_TREE_H): Add cp/name-lookup.h
4553
4554 2003-03-28 Jason Merrill <jason@redhat.com>
4555
4556 PR c++/10245
4557 * cvt.c (force_rvalue): New fn.
4558 * call.c (build_conditional_expr): Use it.
4559 * cp-tree.h: Declare it.
4560
4561 2003-03-28 Mike Stump <mrs@apple.com>
4562
4563 * error.c (dump_expr): Add 0x to printed hex numbers to make
4564 output match source code better.
4565
4566 2003-03-28 Mark Mitchell <mark@codesourcery.com>
4567
4568 PR c++/10218
4569 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4570 definitions.
4571
4572 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4573 non-existant ssdf_decls array.
4574 (finish_file): Call generator_ctor_or_dtor_function when there are
4575 static constructors or destructors and no other static
4576 initializations.
4577
4578 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
4579
4580 PR c++/10047
4581 * decl2.c (finish_file): Don't warn about explicitly instantiated
4582 inline decls.
4583
4584 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4585
4586 PR c++/10224
4587 * pt.c (lookup_template_class): Only check instantiated args if
4588 they do not contain template parameters.
4589
4590 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4591
4592 PR c++/10158
4593 * parser.c (cp_parser_function_definition): Set
4594 DECL_INITIALIZED_IN_CLASS for members.
4595 * pt.c (instantiate_decl): Only reduce the template args for
4596 friends that are not defined in class.
4597
4598 2003-03-25 Jason Merrill <jason@redhat.com>
4599
4600 * call.c (print_z_candidate): Change name of first arg to msgid.
4601 (joust): Add comment for translators.
4602
4603 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4604
4605 PR c++/9898, PR c++/383, DR 322
4606 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4607 through reference types on both PARM and ARG.
4608
4609 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4610
4611 PR c++/10119
4612 * error.c (dump_expr) <BASELINK>: Use dump_expr.
4613 * pt.c (maybe_fold_nontype_args): New function.
4614 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4615 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4616 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4617 maybe_fold_nontype_args.
4618
4619 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4620
4621 PR c++/10026
4622 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4623
4624 2003-03-23 Mark Mitchell <mark@codesourcery.com>
4625
4626 PR c++/7086
4627 * typeck.c (cxx_mark_addressable): Adjust call to
4628 gen_mem_addressof or put_var_into_stack.
4629
4630 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
4631
4632 PR c++/9978, c++/9708
4633 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4634 * call.c (add_template_candidate_real): Adjust
4635 instantiate_template call.
4636 * class.c (resolve_address_of_overloaded_function): Likewise.
4637 * decl.c (build_enumerator): Set TREE_CONSTANT.
4638 * pt.c (check_instantiated_args): New.
4639 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4640 TREE_READONLY.
4641 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4642 (reduce_template_parm_level): Likewise.
4643 (process_template_parm): Likewise.
4644 (check_explicit_specialization): Adjust instantiate_template call.
4645 (convert_template_argument): Don't check non-type argument here.
4646 (lookup_template_class): Check them here.
4647 (tsubst_friend_function): Adjust instantiate_template call.
4648 (instantiate_template): Add tsubst_flags parameter, use it. Check
4649 instantiated args.
4650
4651 2003-03-21 Zack Weinberg <zack@codesourcery.com>
4652
4653 * decl.c: Update calls to shadow_warning.
4654
4655 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
4656
4657 PR c++/9898
4658 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4659 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4660
4661 2003-03-20 Mark Mitchell <mark@codesourcery.com>
4662
4663 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4664 friends.
4665 * cp/pt.c (instantiate_class_template): Fix formatting.
4666
4667 2003-03-14 Matt Austern <austern@apple.com>
4668
4669 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4670 (unemitted_tinfo_decl_p): Remove.
4671 (emit_tinfo_decl): Change declaration to remove unused parameter.
4672 * decl2.c (finish_file): Change tinfo emission to loop through
4673 unemitted_tinfo_decls array instead of looping through all decls.
4674 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4675 unused second parameter.
4676 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4677 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4678 (emit_tinfo_decl): remove unused second parameter, add assertion
4679 that decl hasn't already been emitted.
4680
4681 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
4682
4683 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4684 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4685 return statements.
4686
4687 2003-03-19 Jason Merrill <jason@redhat.com>
4688
4689 PR c++/8316, c++/9315, c++/10136
4690 * call.c (print_z_candidate): Split out from...
4691 (print_z_candidiates): ...here.
4692 (joust): Use it.
4693
4694 2003-03-17 Roger Sayle <roger@eyesopen.com>
4695
4696 PR c++/10031
4697 * decl.c (duplicate_decls): Use the new type when prototyping
4698 anticipated decls, even when the types match. This defines the
4699 exception list for the built-in function.
4700
4701 2003-03-17 Jason Merrill <jason@redhat.com>
4702
4703 PR c++/10091
4704 * typeck.c (build_class_member_access_expr): Compare
4705 TYPE_MAIN_VARIANTs.
4706
4707 2003-03-17 Mark Mitchell <mark@codesourcery.com>
4708
4709 PR c++/9639
4710 * parser.c (cp_parser_declarator_id): Clear parser->scope.
4711
4712 2003-03-16 Jason Merrill <jason@redhat.com>
4713
4714 PR c++/9993
4715 * decl.c (finish_function): Only allow the NRVO to use variables
4716 declared at function scope.
4717
4718 2003-03-17 Andreas Jaeger <aj@suse.de>
4719
4720 * Make-lang.in (cp/TAGS): Remove.
4721
4722 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
4723
4724 PR c++/9629
4725 * cp-tree.h (struct language_function): Add in_base_initializer.
4726 (in_base_initializer): define it.
4727 (expand_member_init): Remove INIT param.
4728 * init.c (expand_member_init): Remove INIT param, return the member.
4729 (emit_mem_initializers): Set in_base_initializer.
4730 * class.c (build_base_path): Check in_base_initializer.
4731 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4732 * pt.c (tsubst_initializer_list): Likewise.
4733
4734 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
4735
4736 * decl.c (binding_for_name): Fix initialization thinko.
4737
4738 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4739
4740 Compile-time improvement: 2/n.
4741 * cp-tree.h (struct cxx_binding): New datatype;
4742 (struct lang_identifier): Use it.
4743 (LOCAL_BINDING_P): Adjust definition.
4744 (INHERITED_VALUE_BINDING_P): Likewise.
4745 (BINDING_SCOPE): Likewise.
4746 (BINDING_HAS_LEVEL_P): Likewise.
4747 (BINDING_VALUE): Likewise.
4748 (BINDING_TYPE): Likewise.
4749 (IDENTIFIER_VALUE): Likewise.
4750 (struct tree_binding): Remove.
4751 (TS_CP_BINDING): Likewise.
4752 ((union lang_tree_node): Remove field "binding".
4753 (cxx_binding_clear): New macro.
4754 (binding_for_name): Adjust return type.
4755 (qualified_lookup_using_namespace): Adjust prototype.
4756 (lookup_using_namespace): Adjust prototype.
4757 (cxx_scope_find_binding_for_name): Declare.
4758 * cp-tree.def: Remove CPLUS_BINDING definition.
4759 * decl.c (push_binding): Adjust local variable type.
4760 (add_binding): Likewise.
4761 (push_class_binding): Likewise.
4762 (pop_binding): Likewise.
4763 (poplevel): Likewise.
4764 (poplevel_class): Likewise.
4765 (free_bindings): Adjust type.
4766 (find_binding): Adjust return type, add a third parameter. Remove
4767 non-useful assertion now that we use static typing.
4768 (cxx_scope_find_binding_for_name): New function.
4769 (binding_for_name): Use it. Adjust local variable type. Simplify.
4770 (namespace_binding): Simplify.
4771 (set_namespace_binding): Likewise.
4772 (set_identifier_type_value_with_scope): Adjust local variable type.
4773 (lookup_tag): Don't type-abuse of local variable 'old'.
4774 (lookup_namespace_name): Likewise. Allocate binding on stack.
4775 (select_decl): Adjust prototype.
4776 (unqualified_namespace_lookup): Allocate binding on stack.
4777 Don't type-abuse of local variable 'val'.
4778 (lookup_name_real): Likewise.
4779 (maybe_inject_for_scope_var): Adjust local variable type.
4780 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4781 (namespace_binding): Adjust logic, simplify.
4782 (BINDING_LEVEL): Adjust definition.
4783 (push_class_level_binding): Adjust local variable type.
4784 (struct cxx_saved_binding): Adjust field 'binding' type.
4785 * decl2.c (ambiguous_decl): Adjust prototype.
4786 (lookup_using_namespace): Adjust local variable type.
4787 (qualified_lookup_using_namespace): Catch type error and correct
4788 ensueing logic error.
4789 (do_nonmember_using_decl): Adjust local variable type. Allocate
4790 temporary cxx_binding on stack.
4791 (do_toplevel_using_decl): Adjust local variable type.
4792 * ptree.c (cxx_print_cxx_binding): New function.
4793 (cxx_print_identifier): Use it.
4794 (cxx_print_xnode): Delete CPLUS_BINDING case label.
4795
4796 2003-03-15 Roger Sayle <roger@eyesopen.com>
4797
4798 * tree.c (count_functions): Fix whitespace.
4799
4800 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
4801
4802 * Make-lang.in: Update.
4803
4804 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4805
4806 PR c++/6440
4807 * pt.c (maybe_process_partial_specialization): Handle
4808 member class template when enclosing class template is
4809 explicit specialized.
4810 (most_general_template): Stop looking when DECL is already
4811 specialized.
4812
4813 2003-03-13 Jason Merrill <jason@redhat.com>
4814
4815 PR c++/9420
4816 * search.c (lookup_conversions): Call complete_type here.
4817 * call.c (implicit_conversion): Not here.
4818
4819 2003-03-13 Mark Mitchell <mark@codesourcery.com>
4820
4821 * decl2.c (do_nonmember_using_decl): Correct handling of
4822 simultaneous type/non-type bindings.
4823
4824 * call.c (initialize_reference): Remove bogus assertion.
4825 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4826
4827 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
4828
4829 PR c++/7050
4830 * expr.c (cxx_expand_expr): Return const0_rtx for throw
4831 expressions.
4832
4833 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4834
4835 PR c++/9474
4836 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4837 to merge old and new declarations.
4838
4839 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4840
4841 * g++.1: Remove.
4842 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4843 (cp/g++.1): Build it from scratch in the build tree.
4844 (c++.install-man): Depend on it. Install it from the build tree.
4845 (c++.mostlyclean): Clean it.
4846
4847 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4848
4849 PR c++/9474
4850 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4851 to merge old and new declarations.
4852
4853 PR c++/9924
4854 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4855
4856 2003-03-11 Jason Merrill <jason@redhat.com>
4857
4858 PR c++/9820
4859 * search.c (lookup_member): Fix handling of functions in a class
4860 being defined.
4861
4862 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4863
4864 PR c++/8700
4865 * call.c (convert_class_to_reference): Adjust usage of
4866 splice_viable.
4867 (any_viable): Remove.
4868 (splice_viable): Combine with any_viable.
4869 (print_z_candidates): Avoid printing duplicates.
4870 (build_user_type_conversion_1): Adjust usage of splice_viable.
4871 (build_new_function_call): Likewise.
4872 (build_operator_new_call): Likewise.
4873 (build_object_call): Likewise.
4874 (build_conditional_expr): Likewise.
4875 (build_new_op): Likewise.
4876 (build_new_method_call): Likewise.
4877 (joust): Remove spurious comment.
4878 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4879 * decl2.c (arg_assoc_class): Simplify.
4880 * friend.c (add_friend): Likewise.
4881
4882 2003-03-11 Jason Merrill <jason@redhat.com>
4883
4884 PR c++/8660
4885 * decl2.c (check_classfn): A member template only matches a
4886 member template.
4887
4888 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
4889
4890 * Make-lang.in (CXX_C_OBJS): Update.
4891 * lang-specs.h: Don't define __GNUG__ here.
4892
4893 2003-03-10 Mark Mitchell <mark@codesourcery.com>
4894
4895 * call.c (perform_overload_resolution): New function.
4896 (build_new_function_call): Use it.
4897 (build_operator_new_call): Likewise.
4898 (add_candidates): Add explicit_targs and template_only parameters.
4899 (build_new_op): Adjust accordingly.
4900 * cp-tree.h (build_operator_new_call): New function.
4901 (build_function_call_real): Remove.
4902 (build_function_call_maybe): Likewise.
4903 * init.c (build_new_1): Use build_operator_new_call.
4904 * typeck.c (build_function_call_real): Rename to ...
4905 (build_function_call): ... this.
4906
4907 2003-03-10 Devang Patel <dpatel@apple.com>
4908
4909 PR c++/9394
4910 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4911
4912 2003-03-10 Jason Merrill <jason@redhat.com>
4913
4914 PR c++/9798
4915 * decl.c (push_using_directive): Push before recursing.
4916
4917 PR c++/9868, c++/9524
4918 * call.c (resolve_scoped_fn_name): Handle the case of a function
4919 pointer member.
4920
4921 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4922 argument in the pointer-to-member case.
4923
4924 2003-03-09 Mark Mitchell <mark@codesourcery.com>
4925
4926 PR c++/9373
4927 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4928 pointers to member functions.
4929
4930 PR c++/8534
4931 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4932 in pointer-to-member-function types.
4933
4934 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4935
4936 * expr.c (cplus_expand_constant): Use C90 prototype style.
4937 (cxx_expand_expr): Likewise.
4938
4939 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4940
4941 PR c++/9970
4942 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4943 functions.
4944
4945 2003-03-08 Geoffrey Keating <geoffk@apple.com>
4946
4947 * lang-specs.h (c++-header): Change .pch to .gch.
4948
4949 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
4950
4951 * cp-tree.h (cxx_init): Update prototype.
4952 * lex.c (cxx_init): Similarly.
4953
4954 2003-03-08 Mark Mitchell <mark@codesourcery.com>
4955
4956 PR c++/9823
4957 * cp-tree.h (begin_mem_initializers): Remove.
4958 * parser.c (cp_parser_mem_initializer_list): Inline it here.
4959 Do not call finish_mem_initializers if not in a constructor.
4960 (cp_parser_class_head): Fix typo in error message.
4961 * semantics.c (begin_mem_initializers): Remove.
4962 * testsuite/g++.dg/parser/constructor1.C: New test.
4963
4964 PR c++/9809
4965 * call.c (add_function_candidate): Skip builtin fuctions that have
4966 not yet been declared.
4967
4968 PR c++/9982
4969 * init.c (build_new_1): Correct logic for determining whether or
4970 not to use an array cookie.
4971
4972 PR c++/9524
4973 * parser.c (cp_parser_postfix_expression): Call
4974 finish_non_static_data_member, even when processing_template_decl.
4975
4976 PR c++/9912
4977 * cp-tree.h (is_ancestor): New function.
4978 (handle_class_head): Change prototype.
4979 * decl2.c (is_namespace_ancestor): Rename to ...
4980 (namespace_anecestor): ... this.
4981 (set_decl_namespace): Adjust accordingly.
4982 (handle_class_head): Remove unnecessary parameters.
4983 * parser.c (cp_parser_class_head): Check that
4984 nested-name-specifiers are used appropriately.
4985
4986 2003-03-07 Mark Mitchell <mark@codesourcery.com>
4987
4988 * call.c (reference_binding): Remove REF_IS_VAR parameter.
4989 (implicit_conversion): Adjust call to reference_binding.
4990 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4991 (initialize_reference): Adjust handling for references bound to
4992 rvalues.
4993 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4994 prototype.
4995 (real_non_cast_lvalue_p): New method.
4996 * cvt.c (build_up_reference): Adjust use of
4997 make_temporary_var_for_ref_to_temp.
4998 * tree.c (real_non_cast_lvalue_p): New method.
4999
5000 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
5001
5002 * except.c (init_exception_processing): Use C90 prototype style.
5003 (cp_protect_cleanup_actions): Likewise.
5004 (prepare_eh_type): Likewise.
5005 (build_eh_type_type): Likewise.
5006 (build_exc_ptr): Likewise.
5007 (do_begin_catch): Likewise.
5008 (dtor_nothrow): Likewise.
5009 (do_end_catch): Likewise.
5010 (push_eh_cleanup): Likewise.
5011 (decl_is_java_type): Likewise.
5012 (choose_personality_routine): Likewise.
5013 (initialize_handler_parm): Likewise.
5014 (expand_start_catch_block): Likewise.
5015 (expand_end_catch_block): Likewise.
5016 (begin_eh_spec_block): Likewise.
5017 (finish_eh_spec_block): Likewise.
5018 (do_allocate_exception): Likewise.
5019 (do_free_exception): Likewise.
5020 (wrap_cleanups_r): Likewise.
5021 (stabilize_throw_expr): Likewise.
5022 (build_throw): Likewise.
5023 (complete_ptr_ref_or_void_ptr_p): Likewise.
5024 (is_admissible_throw_operand): Likewise.
5025 (nothrow_libfn_p): Likewise.
5026 (can_convert_eh): Likewise.
5027 (check_handlers_1): Likewise.
5028 (check_handlers): Likewise.
5029
5030 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5031
5032 * call.c (merge_conversion_sequences): New function.
5033 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
5034 (convert_class_to_reference): Correct handling of second
5035 standard conversion sequence in a user-defined conversion
5036 sequence.
5037 (build_user_type_conversion_1): Use merge_conversion_sequences.
5038 * cp-tree.def: Add comments for CONV nodes.
5039 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
5040
5041 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
5042
5043 * error.c (init_error): Use C90 prototype style.
5044 (dump_scope): Likewise.
5045 (dump_qualifiers): Likewise.
5046 (dump_template_argument): Likewise.
5047 (dump_template_argument_list): Likewise.
5048 (dump_template_parameter): Likewise.
5049 (dump_template_bindings): Likewise.
5050 (dump_type): Likewise.
5051 (dump_typename): Likewise.
5052 (class_key_or_enum): Likewise.
5053 (dump_aggr_type): Likewise.
5054 (dump_type_prefix): Likewise.
5055 (dump_type_suffix): Likewise.
5056 (dump_global_iord): Likewise.
5057 (dump_simple_decl): Likewise.
5058 (dump_decl): Likewise.
5059 (dump_template_decl): Likewise.
5060 (dump_function_decl): Likewise.
5061 (dump_parameters): Likewise.
5062 (dump_exception_spec): Likewise.
5063 (dump_function_name): Likewise.
5064 (dump_template_parms): Likewise.
5065 (dump_char): Likewise.
5066 (dump_expr_list): Likewise.
5067 (dump_expr): Likewise.
5068 (dump_binary_op): Likewise.
5069 (dump_unary_op): Likewise.
5070 (type_as_string): Likewise.
5071 (expr_as_string): Likewise.
5072 (decl_as_string): Likewise.
5073 (context_as_string): Likewise.
5074 (lang_decl_name): Likewise.
5075 (cp_file_of): Likewise.
5076 (cp_line_of): Likewise.
5077 (decl_to_string): Likewise.
5078 (expr_to_string): Likewise.
5079 (fndecl_to_string): Likewise.
5080 (code_to_string): Likewise.
5081 (language_to_string): Likewise.
5082 (parm_to_string): Likewise.
5083 (op_to_string): Likewise.
5084 (type_to_string): Likewise.
5085 (assop_to_string): Likewise.
5086 (args_to_string): Likewise.
5087 (cv_to_string): Likewise.
5088 (cxx_print_error_function): Likewise.
5089 (cp_diagnostic_starter): Likewise.
5090 (cp_diagnostic_finalizer): Likewise.
5091 (cp_print_error_function): Likewise.
5092 (function_category): Likewise.
5093 (print_instantiation_full_context): Likewise.
5094 (print_instantiation_partial_context): Likewise.
5095 (maybe_print_instantiation_context): Likewise.
5096 (print_instantiation_context): Likewise.
5097 (cp_printer): Likewise.
5098 (print_integer): Likewise.
5099 (print_non_consecutive_character): Likewise.
5100 (locate_error): Likewise.
5101
5102 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5103
5104 PR c++/9965
5105 * call.c (reference_binding): Add ref_is_var parameter.
5106 (implicit_conversion): Adjust call to reference_binding.
5107 (initialize_reference): Likewise.
5108
5109 PR c++/9400
5110 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5111 PARM_DECLs.
5112
5113 PR c++/9791
5114 * class.c (get_basefndecls): Use lookup_fnfields_1.
5115
5116 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5117
5118 PR c++/9188
5119 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5120 in error message.
5121 (cp_parser_single_declaration): Likewise.
5122
5123 2003-03-05 Jason Merrill <jason@redhat.com>
5124
5125 PR c++/9440
5126 * call.c (build_conditional_expr): Use convert rather than an
5127 explicit NOP_EXPR.
5128
5129 2003-03-02 Matt Austern <austern@apple.com>
5130
5131 * decl.c (cp_binding_level): Add static_decls varray member.
5132 (add_decl_to_level): Add static/inline namespace scope
5133 declarations to static_decls array.
5134 (wrapup_global_for_namespace): Pass static_decls only, instead of
5135 all decls, to wrapup_global_declarations/check_global_declarations.
5136 (push_namespace): Initialize static_decls for ordinary namespaces.
5137 (cxx_init_decl_processing): Initialize static_decls for global
5138 namespace.
5139
5140 2003-03-05 Mark Mitchell <mark@codesourcery.com>
5141
5142 * class.c (end_of_class): Correct thinko.
5143
5144 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
5145
5146 * config-lang.in: Replace ${libstdcxx_version} by its value.
5147
5148 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5149
5150 * cp-tree.h (cxx_saved_binding): Declare.
5151 (struct saved_scope): Adjust type of field 'old_binding'.
5152 * decl.c (cxx_saved_binding_make): New macro.
5153 (struct cxx_saved_binding): Define.
5154 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
5155 C++ bindings.
5156 (maybe_push_to_top_level): Adjust local variable type.
5157 (pop_from_top_level): Likewise.
5158
5159 2003-03-04 Tom Tromey <tromey@redhat.com>
5160
5161 * Make-lang.in (c++.tags): New target.
5162
5163 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
5164
5165 * Make-lang.in: Update.
5166
5167 2003-03-03 Jason Merrill <jason@redhat.com>
5168
5169 * decl.c (finish_enum): Do set the type in a template. Simplify.
5170 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5171
5172 2003-03-03 Mark Mitchell <mark@codesourcery.com>
5173
5174 PR c++/9878
5175 * call.c (convert_class_to_reference): Correct conversion
5176 sequences.
5177 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5178 (implicit_conversion): Adjust call to reference_binding.
5179 (add_candidate): Change type of candidates parameter.
5180 (add_function_candidate): Likewise.
5181 (add_conv_candidate): Likewise.
5182 (build_builtin_candidate): Likewise.
5183 (add_builtin_candidate): Likewise.
5184 (add_builtin_candidates): Likewise.
5185 (add_template_candidate_real): Likewise.
5186 (add_template_candidate): Likewise.
5187 (add_template_conv_candidate): Likewise.
5188 (build_user_type_conversion_1): Adjust accordingly.
5189 (build_object_call): Likewise.
5190 (build_conditional_expr): Likewise.
5191 (add_candidates): Likewise.
5192 (build_new_op): Likewise.
5193 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
5194 (build_new_method_call): Adjust calls to add_function_candidate.
5195 (make_temporary_var_for_ref_to_temp): New function.
5196 (initialize_reference): Add decl parameter.
5197 * class.c (build_rtti_vtbl_entries): Use build_address and
5198 build_nop.
5199 * cp-tree.h (initialize_reference): Change prototype.
5200 (make_temporary_var_for_ref_to_temp): New function.
5201 (build_type_conversion): Change prototype.
5202 (build_address): New function.
5203 (build_nop): Likewise.
5204 * cvt.c (cp_convert_to_pointer): Adjust call to
5205 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
5206 Use build_nop.
5207 (convert_to_pointer_force): Use build_nop.
5208 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5209 (convert_to_reference): Adjust call to build_type_conversion.
5210 (ocp_convert): Likewise.
5211 (build_type_conversion): Remove for_sure parameter.
5212 * decl.c (grok_reference_init): Use initialize_reference.
5213 * typeck.c (build_address): New function.
5214 (build_nop): Likewise.
5215 (build_unary_op): Use them.
5216 (build_ptrmemfunc): Tidy slightly.
5217 (convert_for_initialization): Adjust call to
5218 initialize_reference.
5219 * typeck2.c (store_init_value): Remove #if 0'd code.
5220
5221 2003-03-03 Jason Merrill <jason@redhat.com>
5222
5223 * decl.c (start_function): Clear DECL_NUM_STMTS.
5224
5225 * class.c (get_vtable_decl): Use vtbl_type_node.
5226 (build_primary_vtable): Check for it.
5227
5228 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
5229
5230 * decl.c (check_initializer): Check for vector_opaque_p.
5231
5232 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
5233
5234 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5235 invoke an external cpp during compilation.
5236
5237 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5238
5239 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5240 that of warning().
5241 (start_decl): Likewise.
5242 (start_function): Likewise.
5243
5244 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
5245
5246 * Make-lang.in (CXX_C_OBJS): Update.
5247
5248 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5249
5250 PR c++/9892
5251 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5252 instantiating it.
5253
5254 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
5255
5256 * parser.c (cp_parser_init_declarator): Revert opaque
5257 vector_opaque_p change.
5258 Do not include target.h.
5259
5260 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5261
5262 PR c++/9879
5263 * cp-tree.h (build_zero_init): Add parameter.
5264 * decl.c (cp_finish_decl): Adjust call.
5265 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
5266 calls.
5267 (build_default_init): Add nelts parameter. Adjust calls to
5268 build_zero_init.
5269 (build_new_1): Adjust call to build_default_init.
5270 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5271
5272 2003-02-26 Devang Patel <dpatel@apple.com>
5273
5274 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5275 required. Postpone enum setting for template decls.
5276 (build_enumerator): Delay copying value node until finish_enum
5277 (). Remove #if 0'ed code.
5278 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5279 (tsubst_copy): Add check for enum type.
5280
5281 2003-02-25 Mark Mitchell <mark@codesourcery.com>
5282
5283 PR c++/9683
5284 * decl2.c (prune_vars_needing_no_initialization): Do not throw
5285 away initializations for DECL_EXTERNAL VAR_DECLs.
5286 (finish_file): Adjust accordingly.
5287 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5288
5289 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5290
5291 * decl.c (add_binding): Time TV_NAME_LOOKUP.
5292 (push_class_binding): Likewise.
5293 (set_namespace_binding): Likewise.
5294
5295 2003-02-24 Mark Mitchell <mark@codesourcery.com>
5296
5297 PR c++/9836
5298 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5299 specializations back to the main template.
5300 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5301 * pt.c (resolve_typename_type): Likewise.
5302
5303 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
5304
5305 PR c++/9778
5306 * pt.c (tsubst_copy_and_build): For a templated function inside a
5307 scope, process template arguments.
5308
5309 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5310
5311 PR c++/9602
5312 * typeck2.c (abstract_virtuals_error): Don't check when
5313 TYPE is still template parameter dependent.
5314
5315 2003-02-23 Mark Mitchell <mark@codesourcery.com>
5316
5317 PR c++/5333
5318 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5319 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5320 * pt.c (instantiate_class_template): Don't try to instantiate
5321 dependent types.
5322 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5323
5324 2003-02-21 Mark Mitchell <mark@codesourcery.com>
5325
5326 PR c++/9749
5327 * decl.c (grokdeclarator): Do not allow parameters with variably
5328 modified types.
5329
5330 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
5331
5332 * search.c (grow_bfs_bases): Remove. Fold into ...
5333 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5334 in previous patch.
5335
5336 2003-02-20 Mark Mitchell <mark@codesourcery.com>
5337
5338 PR c++/9729
5339 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5340 when the G++ 3.2 ABI prevents correct compilation.
5341
5342 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
5343
5344 Change base class access representation. Share virtual base
5345 binfos.
5346 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5347 call.
5348 * cp/class.c (build_base_path): Likewise.
5349 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5350 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5351 (make_new_vtable): Adjust.
5352 (force_canonical_binfo_r): Delete.
5353 (force_canonical_binfo): Delete.
5354 (mark_primary_virtual_base): Delete.
5355 (dfs_unshared_virtual_bases): Delete.
5356 (mark_primary_bases): Adjust.
5357 (maybe_warn_about_overly_private_class): Adjust.
5358 (dfs_base_derived_from): Delete.
5359 (base_derived_from): Follow the inheritance chain.
5360 (struct find_final_overrider_data): Add vpath member.
5361 (dfs_find_final_overrider): Adjust.
5362 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5363 (find_final_overrider): Adjust.
5364 (update_vtable_entry_for_fn): Adjust.
5365 (modify_all_vtables): Adjust.
5366 (walk_subobject_offsets): Adjust.
5367 (layout_nonempty_base_or_field): Adjust.
5368 (layout_empty_base): Remove last parameter. Adjust.
5369 (build_base_field): Adjust.
5370 (build_base_fields): Adjust.
5371 (propagate_binfo_offsets): Remove last parameter. Adjust.
5372 (dfs_set_offset_for_unshared_vbases): Delete.
5373 (layout_virtual_bases): Adjust.
5374 (finish_struct_1): Adjust.
5375 (init_class_processing): Don't init access nodes.
5376 (dfs_get_primary_binfo): Delete.
5377 (get_primary_binfo): Adjust.
5378 (dump_class_hierarchy_r): Remove most derived arg, add IGO
5379 parameter. Adjust.
5380 (dump_class_hierarchy): Adjust.
5381 (finish_vtbls): Adjust.
5382 (get_original_base): Delete.
5383 (build_vtt_inits): Adjust.
5384 (dfs_build_secondary_vptr_vtt_inits): Adjust.
5385 (dfs_ctor_vtable_bases_queue_p): Adjust.
5386 (build_ctor_vtbl_group): Adjust.
5387 (dfs_accumulate_vtbl_inits): Adjust.
5388 (build_vtbl_initializer): Adjust.
5389 (build_vbase_offset_vtbl_entries): Adjust.
5390 (add_vcall_offset_vtbl_entries_1): Adjust.
5391 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5392 (access_*_node): Remove.
5393 (CANONICAL_BINFO): Delete.
5394 (BINFO_UNSHARED_MARKED): Remove.
5395 (BINFO_MARKED): Set LANG_FLAG_0 directly.
5396 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5397 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5398 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5399 Delete.
5400 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5401 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5402 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5403 Delete.
5404 (BINFO_DEPENDENT_BASE_P): New.
5405 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5406 index.
5407 (markedp, unmarkedp): Adjust.
5408 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5409 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5410 find_vbase_instance, binfo_for_vbase): Delete.
5411 (copied_binfo, original_binfo): Declare.
5412 (finish_base_specifier): Add virtual_p arg.
5413 (unshare_base_binfos): Delete.
5414 (copy_base_binfos): Declare.
5415 (reverse_path): Delete.
5416 * cp/decl.c (xref_basetypes): Access and virtuality passed
5417 differently. Don't copy direct base binfos here. Call
5418 copy_base_binfos.
5419 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5420 (initialize_vtbl_ptrs): Adjust.
5421 (expand_member_init): Adjust.
5422 * cp/parser.c (cp_parser_base_specifier): Adjust.
5423 * cp/pt.c (instantiate_class_template): Adjust.
5424 (get_template_base_recursive): Adjust.
5425 * cp/rtti.c (get_pseudo_ti_init): Adjust.
5426 (get_pseudo_ti_desc): Adjust.
5427 * cp/tree.c (unshare_base_binfos): Rename to ...
5428 (copy_base_binfos): ... here, reimplement.
5429 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5430 (reverse_path): Remove.
5431 * cp/typeck.c (get_delta_difference): Adjust error messages.
5432 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5433 * cp/search.c (lookup_base_r): Adjust.
5434 (dynamic_cast_base_recurse): Adjust.
5435 (canonical_binfo): Remove.
5436 (dfs_canonical_queue): Remove.
5437 (dfs_assert_unmarked_p): Remove.
5438 (assert_canonical_unmarked): Remove.
5439 (shared_marked_p, shared_unmarked_p): Remove.
5440 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5441 (dfs_access_in_type): Adjust.
5442 (access_in_type): Adjust.
5443 (dfs_accessible_queue_p): Adjust.
5444 (dfs_accessible_p): Adjust.
5445 (is_subobject_of_p_1, is_subobject_of_p): Remove.
5446 (struct lookup_field_info): Remove from_dep_base_p field.
5447 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5448 (lookup_field_r): Remove dependent base code.
5449 (lookup_member): Likewise.
5450 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5451 (dfs_unmarked_real_bases_queue_p): Remove.
5452 (dfs_marked_real_bases_queue_p): Remove.
5453 (dfs_skip_vbases): Remove.
5454 (dfs_get_pure_virtuals): Adjust.
5455 (markedp, unmarkedp): Adjust.
5456 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5457 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5458 (dfs_unmark): Adjust.
5459 (dfs_get_vbase_types):Remove.
5460 (dfs_build_inheritance_graph_order): Remove.
5461 (get_vbase_types): Remove
5462 (dfs_find_vbase_instance): Remove.
5463 (find_vbase_instance): Remove.
5464 (dfs_debug_unmarkedp): Adjust.
5465 (dependent_base_p): Remove.
5466 (dfs_push_type_decls): Adjust.
5467 (dfs_push_decls): Adjust.
5468 (dfs_no_overlap_yet): Adjust.
5469 (copied_binfo): New function.
5470 (original_binfo): New function.
5471 (binfo_for_vbase): Remove.
5472
5473 2003-02-18 Zack Weinberg <zack@codesourcery.com>
5474
5475 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5476 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5477 vectors, for speed.
5478
5479 2003-02-18 Mark Mitchell <mark@codesourcery.com>
5480
5481 PR c++/9704
5482 * class.c (layout_class_type): In the 3.2 ABI, take into account
5483 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5484
5485 2003-02-18 Matt Austern <austern@apple.com>
5486
5487 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5488 nothing for C++.
5489 * cp/decl.c (wrapup_globals_for_namespace): Remove special
5490 handling of global namespace.
5491
5492 2003-02-18 Geoffrey Keating <geoffk@apple.com>
5493
5494 * cp-tree.h (rid_to_yy): Delete.
5495 (C_RID_YYCODE): Delete.
5496 (finish_file): Delete redundant declaration.
5497
5498 2003-02-18 Jason Merrill <jason@redhat.com>
5499
5500 PR c++/9623
5501 * decl.c (reshape_init): Don't mess with initializer labels.
5502
5503 PR c++/9485
5504 * parser.c (cp_parser_postfix_expression): Set idk properly for
5505 object->scope::member.
5506
5507 2003-02-18 Ben Elliston <bje@redhat.com>
5508
5509 PR other/7350
5510 * decl.c (duplicate_decls): Fix typo in comment.
5511
5512 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
5513
5514 PR debug/9717
5515 * class.c (build_base_field): Mark fields for base classes with
5516 DECL_IGNORED_P.
5517
5518 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5519
5520 PR c++/9457
5521 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5522 CONSTRUCTOR_ELTS only once.
5523
5524 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5525
5526 PR c++/9459
5527 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5528 (dump_type_suffix): Likewise.
5529
5530 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
5531
5532 * search.c: ANSIfy function declarations and definitions.
5533 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5534 * call.c (build_method_call, resolve_scoped_fn_name,
5535 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5536 calls.
5537 * class.c (handle_using_decl): Likewise.
5538 * decl.c (make_typename_type, make_unmound_class_template,
5539 start_decl, compute_array_index_type): Likewise.
5540 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5541 * init.c (expand_member_init, build_member_call): Likewise.
5542 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5543 resolve_typename_type): Likewise.
5544 * typeck.c (lookup_destructor, finish_class_member_access_exprm
5545 build_prememfunc_access_expr): Likewise.
5546
5547 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5548
5549 * decl2.c: Include "timevar.h".
5550 (namespace_ancestor): Time name lookup.
5551 (add_using_namespace): Likewise.
5552 (lookup_using_namespace): Likewise.
5553 (qualified_lookup_using_namespace): Likewise.
5554 (decl_namespace): Likewise.
5555 (lookup_arg_dependent): Likewise.
5556 * lex.c (do_identifier): Likewise.
5557 (do_scoped_id): Likewise.
5558 * pt.c (lookup_template_class): Likewise.
5559
5560 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
5561
5562 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5563
5564 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5565
5566 * decl.c: Include "timevar.h".
5567 (poplevel): Time name lookup.
5568 (find_binding): Likewise.
5569 (push_namespace): Likewise.
5570 (pop_nested_namespace): Likewise.
5571 (store_bindings): Likewise.
5572 (maybe_push_to_top_level): Likewise.
5573 (pop_from_top_level): Likewise.
5574 (push_local_name): Likewise.
5575 (pushtag): Likewise.
5576 (pushdecl): Likewise.
5577 (pushdecl_with_scope): Likewise.
5578 (pushdecl_namespace_level): Likewise.
5579 (pushdecl_top_level): Likewise.
5580 (pushdecl_class_level): Likewise.
5581 (push_class_level_binding): Likewise.
5582 (push_using_decl): Likewise.
5583 (push_using_directive): Likewise.
5584 (push_overloaded_decl): Likewise.
5585 (lookup_label): Likewise.
5586 (define_label): Likewise.
5587 (lookup_tag): Likewise.
5588 (lookup_tag_reverse): Likewise.
5589 (lookup_namespace_name): Likewise.
5590 (select_decl): Likewise.
5591 (unqualified_namespace_lookup): Likewise.
5592 (lookup_name_real): Likewise.
5593 (lookup_name_current_level): Likewise.
5594 (lookup_type_current_level): Likewise.
5595 (maybe_inject_for_scope_var): Likewise.
5596 (xref_tag): Likewise.
5597
5598 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5599
5600 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
5601
5602 * decl.c (build_enumerator): Remove unneeded test.
5603
5604 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
5605
5606 * cp-tree.h (struct lang_type_header): Make all fields unsigned
5607 char.
5608
5609 2003-02-03 Mark Mitchell <mark@codesourcery.com>
5610
5611 PR c++/7129
5612 * call.c (z_candidate): Add args.
5613 (convert_class_to_reference): Set it.
5614 (implicit_conversion): Tidy.
5615 (add_candidate): Add args parameter.
5616 (add_function_candidate): Adjust call to add_candidate.
5617 (add_conv_candidate): Likewise.
5618 (build_builtin_candidate): Likewise.
5619 (build_user_type_conversion_1): Eliminate wasteful tree_cons
5620 usage.
5621 (build_new_function_call): Likewise.
5622 (build_object_call): Likewise.
5623 (add_candidates): New function.
5624 (build_new_op): Use it.
5625 (covert_like_real): Adjust call to build_over_call.
5626 (build_over_call): Remove args parameter.
5627 * operators.def: Add <?= and >?=.
5628
5629 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
5630
5631 * typeck.c (build_indirect_ref): Don't check flag_volatile.
5632
5633 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5634
5635 PR c++/8849
5636 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5637
5638 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
5639
5640 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5641 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5642 (BINFO_LANG_ELTS): New #define.
5643 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5644
5645 2003-01-30 Geoffrey Keating <geoffk@apple.com>
5646
5647 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5648
5649 2003-01-30 Mark Mitchell <mark@codesourcery.com>
5650
5651 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5652 for class types.
5653 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5654 rather than TYPE_LANG_FLAG_0.
5655 (TYPE_BUILT_IN): Remove.
5656 (TYPE_DEPENDENT_P): New macro.
5657 (TYPE_DEPENDENT_P_VALID): Likewise.
5658 (lang_type_class): Add fields_readonly.
5659 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5660 * pt.c (dependent_type_p_r): New function, split out from ...
5661 (dependent_type_p): ... here. Memoize results.
5662 * search.c (dependent_base_p): Use dependent_type_p, not
5663 uses_template_parms.
5664 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5665 for class types.
5666
5667 2003-01-29 Mark Mitchell <mark@codesourcery.com>
5668
5669 * call.c (build_field_call): Use build_new_op, not build_opfncall.
5670 (prep_operand): New function.
5671 (build_new_op): Use it. Remove dead code.
5672 * class.c (pushclass): Change "modify" parameter type from int to
5673 bool.
5674 (currently_open_class): Use same_type_p, not pointer equality.
5675 (push_nested_class): Adjust calls to pushclass, remove modify
5676 parameter.
5677 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5678 (pushclass): Change prototype.
5679 (push_nested_class): Likewise.
5680 (grokoptypename): Remove.
5681 (build_opfncall): Remove.
5682 (value_dependent_expression_p): Declare.
5683 (resolve_typename_type): Likewise.
5684 (resolve_typename_type_in_current_instantiation): Likewise.
5685 (enter_scope_of): Remove.
5686 (tsubst): Remove.
5687 (tsubst_expr): Likewise.
5688 (tsubst_copy): Likewise.
5689 (tsubst_copy_and_build): Likewise.
5690 * decl.c (warn_about_implicit_typename_lookup): Remove.
5691 (finish_case_label): Return error_mark_node for erroneous labels.
5692 (start_decl): Adjust calls to push_nested_class.
5693 (grokfndecl): Call push_scope/pop_scope around call to
5694 duplicate_decls.
5695 (grokdeclarator): Do not call tsubst.
5696 (start_function): Adjust calls to push_nested_class.
5697 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5698 (check_classfn): Use push_scope/pop_scope around type comparisions.
5699 (grokoptypename): Remove.
5700 (push_sscope): Adjust call to push_nested_class.
5701 * error.c (dump_type): Show cv-qualification of typename types.
5702 * init.c (build_member_call): Use build_new_op, not
5703 build_opfncall.
5704 * method.c (build_opfncall): Remove.
5705 * parser.c (cp_parser): Add allow_non_constant_expression_p and
5706 non_constant_expression_p.
5707 (cp_parser_constant_expression): Adjust prototype.
5708 (cp_parser_resolve_typename_type): Remove.
5709 (cp_parser_non_constant_expression): New function.
5710 (cp_parser_non_constant_id_expression): Likewise.
5711 (cp_parser_new): Set allow_non_constant_expression_p and
5712 non_constant_expression_p.
5713 (cp_parser_primary_expression): Reject `this' and `va_arg' in
5714 constant-expressions. Note that dependent names aren't really
5715 constant.
5716 (cp_parser_postfix_expression): Reject conversions to non-integral
5717 types in constant-expressions. Neither are increments or
5718 decrements.
5719 (cp_parser_unary_expression): Reject increments and decrements in
5720 constant-expressions.
5721 (cp_parser_direct_new_declarator): Adjust call to
5722 cp_parser_constant_expression.
5723 (cp_parser_cast_expression): Reject conversions to non-integral
5724 types in constant-expressions.
5725 (cp_parser_assignment_expression): Rejects assignments in
5726 constant-expressions.
5727 (cp_parser_expression): Reject commas in constant-expressions.
5728 (cp_parser_labeled_statement): Adjust call to
5729 cp_parser_constant_expression.
5730 (cp_parser_direct_declarator): Simplify array bounds, even in
5731 templates, when they are non-dependent. Use
5732 resolve_typename_type, not cp_parser_resolve_typename_type.
5733 (cp_parser_class_head): Use resolve_typename_type, not
5734 cp_parser_resolve_typename_type.
5735 (cp_parser_member_declaration): Adjust call to
5736 cp_parser_constant_expression.
5737 (cp_parser_constant_initializer): Likewise.
5738 (cp_parser_constructor_declarator): Use resolve_typename_type, not
5739 cp_parser_resolve_typename_type.
5740 (cp_parser_late_parsing_default_args): Adjust call to
5741 push_nested_class.
5742 * pt.c (tsubst): Give it internal linkage.
5743 (tsubst_expr): Likewise.
5744 (tsubst_copy): Likewise.
5745 (tsubst_copy_and_build): Likewise.
5746 (push_access_scope_real): Likewise.
5747 (tsubst_friend_class): Likewise.
5748 (instantiate_class_template): Adjust call to pushclass.
5749 (value_dependent_expression_p): Give it external linkage.
5750 Robustify.
5751 (resolve_typename_type): New function.
5752 * semantics.c (finish_call_expr): Use build_new_op, not
5753 build_opfncall.
5754 (begin_constructor_declarator): Remove.
5755 (begin_class_definition): Adjust call to pushclass.
5756 (enter_scope_of): Remove.
5757 * typeck.c (comptypes): Resolve typename types as appropriate.
5758 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5759 (build_x_compound_expr): Likewise.
5760 (build_modify_expr): Likewise.
5761 (build_x_modify_expr): Likewise.
5762 * typeck2.c (build_x_arrow): Likewise.
5763
5764 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
5765
5766 * pt.c (last_pending_template) Declare GTY().
5767
5768 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5769
5770 PR c++/8591
5771 * parser.c (cp_parser_elaborated_type_specifier): Convert
5772 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5773 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5774
5775 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
5776
5777 PR c++/9437
5778 * pt.c (unify): Don't unify '*T' with 'U C::*'.
5779
5780 PR c++/3902
5781 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5782 inside a declarator.
5783
5784 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
5785
5786 * class.c (update_vtable_entry_for_fn): Add index parameter.
5787 Generate vcall thunk for covariant overriding from a virtual
5788 primary base.
5789 (dfs_modify_vtables): Adjust.
5790
5791 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
5792
5793 PR c++/9403
5794 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5795 template keyword.
5796 (cp_parser_base_specifier): Look for and consume a
5797 TEMPLATE keyword. Replace switch with array index.
5798
5799 PR c++/795
5800 * semantics.c (finish_non_static_data_member): Remember the
5801 field's type even in a template.
5802
5803 PR c++/9415
5804 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5805 already scoped.
5806
5807 PR c++/8545
5808 * parser.c (cp_parser_cast_expression): Be more tentative.
5809
5810 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5811
5812 * cp-tree.h (flagged_type_tree_s): Remove.
5813 (check_for_new_type): Likewise.
5814 * typeck2.c (check_for_new_type): Likewise.
5815
5816 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
5817
5818 * dump.c: ANSIfy function declarations and definitions.
5819
5820 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
5821
5822 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5823
5824 PR c++/9354
5825 * init.c (build_new): Set the type of the new-expression, even
5826 when processing_templte_decl.
5827
5828 PR c++/9216
5829 * parser.c (cp_parser_primary_expression): Improve error message
5830 for templates used in an expression context.
5831
5832 PR c++/8696
5833 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5834 parse when encountering "typedef".
5835
5836 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
5837
5838 * class.c, parser.c: ANSIfy function definitions and declarations.
5839
5840 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5841
5842 PR c++/9328
5843 * error.c (dump_decl): For an OVERLOAD, just print the name of the
5844 function; it doesn't make sense to try to print its type.
5845 * semantics.c (finish_typeof): Issue errors about invalid uses.
5846
5847 PR c++/9298
5848 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5849 function.
5850 (cp_parser_expression_statement): Use it.
5851 (cp_parser_explicit_instantiation): Likewise.
5852 * pt.c (do_decl_instantiation): Improve error handling logic.
5853
5854 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5855
5856 PR c++/9384
5857 * parser.c (cp_parser_using_declaration): Issue error messages
5858 about name resolution failures here.
5859
5860 PR c++/9388
5861 * class.c (currently_open_derived_class): Use dependent_type_p.
5862 * cp-tree.h (dependent_type_p): New function.
5863 (dependent_template_arg_p): Likewise.
5864 (dependent_template_p): Likewise.
5865 (type_dependent_expression_p): Likewise.
5866 * parser.c (cp_parser_dependent_type_p): Remove.
5867 (cp_parser_value_dependent_type_p): Likewise.
5868 (cp_parser_type_dependent_expression_p): Likewise.
5869 (cp_parser_dependent_template_arg_p): Likewise.
5870 (cp_parser_dependent_template_id_p): Likewise.
5871 (cp_parser_dependent_template_p): Likewise.
5872 (cp_parser_diagnose_invalid_type_name): Replace
5873 cp_parser_dependent_type_p with dependent_type_p, etc.
5874 (cp_parser_primary_expresion): Likewise.
5875 (cp_parser_nested_name_specifier_opt): Likewise.
5876 (cp_parser_postfix_expression): Likewise.
5877 (cp_parser_unary_expression): Likewise.
5878 (cp_parser_template_name): Likewise.
5879 (cp_parser_class_name): Likewise.
5880 (cp_parser_lookup_name): Likewise.
5881 * pt.c (dependent_type_p): New function.
5882 (value_dependent_expression_p): Likewise.
5883 (type_dependent_expression_p): Likewise.
5884 (dependent_template_arg_p): Likewise.
5885 (dependent_template_id_p): Likewise.
5886 (dependent_template_p): Likewise.
5887
5888 PR c++/9285
5889 PR c++/9294
5890 * parser.c (cp_parser_simple_declaration): Return quickly when
5891 encountering errors.
5892
5893 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5894
5895 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5896
5897 2003-01-17 Jason Merrill <jason@redhat.com>
5898
5899 PR c++/9167, c++/9358
5900 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5901
5902 2003-01-17 Jason Merrill <jason@redhat.com>
5903
5904 PR c++/9342
5905 * call.c (build_conditional_expr): Always do lvalue-rvalue
5906 conversion.
5907
5908 2003-01-17 Mark Mitchell <mark@codesourcery.com>
5909
5910 PR c++/9294
5911 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5912 * cp-tree.h (BASELINK_BINFO): Adjust.
5913 (BASELINK_FUNCTIONS): Likewise.
5914 (BASELINK_ACCESS_BINFO): Likewise.
5915 (tree_baselink): New structure.
5916 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5917 (lang_tree_node): Add baselink.
5918 * decl.c (cp_tree_node_structure): Add BASELINK case.
5919 * search.c (build_baselink): Adjust.
5920 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
5921 test from TREE_LIST case.
5922
5923 PR c++/9272
5924 * parser.c (cp_parser_constructor_declarator_p): Do not assume
5925 that a constructor cannot be declared outside of its own class.
5926
5927 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5928 be resolved, neither can the qualified name.
5929
5930 * rtti.c (get_pseudo_ti_desc): Fix thinko.
5931
5932 2003-01-16 Jason Merrill <jason@redhat.com>
5933
5934 PR c++/8564
5935 * init.c (build_vec_init): Re-add maxindex parm.
5936 (perform_member_init, build_aggr_init): Pass it.
5937 (build_new_1): Pass it. Use an incomplete array type for full_type.
5938 * typeck.c (build_modify_expr): Pass it.
5939 * cp-tree.h: Adjust.
5940
5941 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
5942
5943 * cp-tree.h (tsubst_copy_and_build): New declaration.
5944 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5945 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
5946 (tsubst_copy_and_build): New function.
5947
5948 2003-01-16 Mark Mitchell <mark@codesourcery.com>
5949
5950 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5951 (PARTIAL_INSTANTIATION_P): Remove.
5952 (IMPLICIT_TYPENAME_P): Likewise.
5953 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5954 (build_typename_type): Remove declaration.
5955 (parmlist_is_exprlist): Likewise.
5956 * decl.c (build_typename_type): Make it static, remove third
5957 parameter.
5958 (push_class_binding): Don't do implicit typename stuff.
5959 (make_typename_type): Likewise.
5960 (lookup_name_real): Likewise.
5961 (grokdeclarator): Don't try to convert declarations into
5962 initializations. Don't do implicit typename stuff.
5963 (parmlist_is_exprlist): Remove.
5964 (xref_basetypes): Simplify.
5965 * decl2.c (grokfield): Don't try to convert declarations into
5966 initializations.
5967 (build_anon_union_vars): Do this while processing templates, too.
5968 (finish_anon_union): Likewise.
5969 * error.c (dump_type): Remove implicit typename handling.
5970 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5971 (cp_parser_primary_expression): Correct handling of names not
5972 found by unqualified name lookup in templates.
5973 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5974 of types when possible.
5975 (cp_parser_simple_declaration): Complain intelligently about some
5976 invalid declarations.
5977 (cp_parser_member_declaration): Likewise.
5978 (cp_parser_constructor_declarator_p): Don't check when we're in a
5979 function scope.
5980 * pt.c (instantiate_class_template): Remove
5981 PARTIAL_INSTANTIATION_P gunk.
5982 * search.c (lookup_field_r): Don't build implicit typenames.
5983 (marked_pushdecls_p): Don't enter dependent base types.
5984 (unmarked_pushdecls_p): Likewise.
5985 * semantics.c (begin_class_definition): Remove implicit typename
5986 stuff.
5987
5988 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
5989
5990 PR c++/9212
5991 * parser.c (cp_parser_direct_declarator): If accepting either
5992 abstract or named, the name must be an unqualified-id.
5993
5994 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5995
5996 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5997
5998 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5999
6000 * decl2.c (check_classfn): Fix uninitialized warning.
6001 (build_anon_union_vars): Likewise.
6002 * pt.c (tsubst_copy): Likewise.
6003
6004 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
6005
6006 Further conform g++'s __vmi_class_type_info to the C++ ABI
6007 specification.
6008 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
6009 the specification.
6010 (class_hint_flags): Likewise.
6011
6012 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6013
6014 * config-lang.in: Add semantics.c to gtfiles.
6015 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
6016 (saved_scope): Likewise.
6017 (type_lookups): Remove.
6018 (deferred_access): New structure.
6019 (type_access_control): Remove.
6020 (save_type_access_control): Likewise.
6021 (reset_type_access_control): Likewise.
6022 (decl_type_access_control): Likewise.
6023 (push_deferring_access_checks): Declare.
6024 (resume_deferring_access_checks): Likewise.
6025 (stop_deferring_access_checks): Likewise.
6026 (pop_deferring_access_checks): Likewise.
6027 (get_deferred_access_checks): Likewise.
6028 (pop_to_parent_deferring_access_checks): Likewise.
6029 (perform_deferred_access_checks): Likewise.
6030 (perform_or_defer_access_check): Likewise.
6031 * decl.c (make_typename_type): Use perform_or_defer_access_check.
6032 (make_unbound_class_template): Likewise.
6033 (grokdeclarator): Don't call decl_type_access_control.
6034 * parser.c (cp_parser_context): Remove deferred_access_checks
6035 and deferring_access_checks_p fields.
6036 (cp_parser_context_new): Adjust.
6037 (cp_parser): Remove access_checks_lists.
6038 (cp_parser_defer_access_check): Remove.
6039 (cp_parser_start_deferring_access_checks): Remove.
6040 (cp_parser_stop_deferring_access_checks): Remove.
6041 (cp_parser_perform_deferred_access_checks): Remove.
6042 (cp_parser_nested_name_specifier_opt): Use new deferred access
6043 functions.
6044 (cp_parser_simple_declaration): Likewise.
6045 (cp_parser_template_id): Likewise.
6046 (cp_parser_function_definition): Likewise.
6047 (cp_parser_class_specifier): Likewise.
6048 (cp_parser_lookup_name): Likewise.
6049 (cp_parser_single_declaration): Likewise.
6050 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
6051 (cp_parser_parse_tentatively): Likewise.
6052 (cp_parser_parse_definitely): Likewise.
6053 (yyparse): Likewise.
6054 (cp_parser_init_declarator): Remove access_checks parameter.
6055 Use new deferred access functions.
6056 (cp_parser_function_definition_from_specifiers_and_declarator):
6057 Likewise.
6058 (cp_parser_class_head): Remove deferring_access_checks_p and
6059 saved_access_checks parameters. Use new deferred access functions.
6060 (cp_parser_member_specification_opt): Don't call
6061 reset_type_access_control.
6062 * search.c (type_access_control): Remove.
6063 * semantics.c: Include "gt-cp-semantics.h".
6064 (deferred_type_access_control): Remove.
6065 (deferred_access_stack): New variable.
6066 (deferred_access_free_list): Likewise.
6067 (push_deferring_access_checks): New function.
6068 (resume_deferring_access_checks): Likewise.
6069 (stop_deferring_access_checks): Likewise.
6070 (pop_deferring_access_checks): Likewise.
6071 (get_deferred_access_checks): Likewise.
6072 (pop_to_parent_deferring_access_checks): Likewise.
6073 (perform_deferred_access_checks): New function, adapted from
6074 cp_parser_perform_deferred_access_checks.
6075 (perform_or_defer_access_check): New function, adapted from
6076 cp_parser_defer_access_check.
6077 (current_type_lookups): Remove.
6078 (deferred_type_access_control): Likewise.
6079 (decl_type_access_control): Likewise.
6080 (save_type_access_control): Likewise.
6081 (reset_type_access_control): Likewise.
6082 (begin_function_definition): Adjust.
6083 (begin_class_definiton): Likewise.
6084
6085 2003-01-13 Jason Merrill <jason@redhat.com>
6086
6087 PR c++/8748
6088 * class.c (build_base_path): Take the address before calling save_expr.
6089
6090 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6091 all the ambiguous conversions are bad.
6092
6093 * class.c (maybe_warn_about_overly_private_class): Don't stop
6094 searching when we find a nonprivate method.
6095
6096 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6097
6098 2003-01-12 Mark Mitchell <mark@codesourcery.com>
6099
6100 * cp-tree.h (get_arglist_len_in_bytes): Remove.
6101
6102 PR c++/9264
6103 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6104 typeame types more robustly.
6105
6106 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
6107
6108 * parser.c: Fix comment typos.
6109
6110 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6111
6112 PR c++/9099
6113 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6114 an object_type which is not a class type.
6115
6116 2003-01-10 Geoffrey Keating <geoffk@apple.com>
6117
6118 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6119 (cp_parser_late_parsing_default_args): Likewise.
6120
6121 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
6122
6123 * cfns.gperf: ANSIfy function declarations.
6124 * cfns.h: Regenerate.
6125 * cp-tree.h: ANSIfy function declarations.
6126
6127 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6128
6129 * cp-tree.h (reparse_absdcl_as_expr): Remove.
6130 (reparse_absdcl_as_casts): Likewise.
6131 (reparse_decl_as_expr): Likewise.
6132 (finish_decl_parsing): Likewise.
6133 * decl2.c (reparse_absdcl_as_expr): Remove.
6134 (reparse_absdcl_as_casts): Likewise.
6135 (repase_decl_as_expr): Likewise.
6136 (finish_decl_parsing): Likewise.
6137
6138 PR c++/9128
6139 PR c++/9153
6140 PR c++/9171
6141 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6142 function.
6143 (cp_parser_nested_name_specifier_opt): Correct the
6144 check_dependency_p false.
6145 (cp_parser_postfix_expression): Fix formatting.
6146 (cp_parser_decl_specifier_seq): Avoid looking for constructor
6147 declarators when possible.
6148 (cp_parser_template_id): Avoid performing name-lookup when
6149 possible.
6150 (cp_parser_class_head): Do not count specializations when counting
6151 levels of templates.
6152 (cp_parser_constructor_declarator_p): Return immediately if
6153 there's no chance that the tokens form a constructor declarator.
6154 * rtti.c (throw_bad_typeid): Add comment. Do not return an
6155 expression with reference type.
6156 (get_tinfo_decl_dynamic): Do not return an expression with
6157 reference type.
6158 (build_typeid): Add comment. Do not return an expression with
6159 reference type.
6160 * typeck.c (build_class_member_access_expr): Improve handling of
6161 conditionals and comma-expressions as objects.
6162
6163 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6164
6165 * cfns.gperf: ANSIfy function declarations.
6166 * cfns.h: Regenerate.
6167 * cp-tree.h: ANSIfy function declarations.
6168 * parser.c: ANSIfy function declarations & definitions.
6169
6170 * decl.c (bad_specifiers): Fix parameter order error I introduced.
6171
6172 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6173
6174 Merge from pch-branch:
6175
6176 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6177
6178 Merge to tag pch-merge-20030102:
6179
6180 * semantics.c (finish_translation_unit): Don't call finish_file.
6181 * parser.c: Don't include ggc.h.
6182 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6183 read first token here. Don't allow PCH files after the first
6184 token is read.
6185 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6186 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6187 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6188 (cp_parser_late_parsing_for_member): Don't duplicate call to
6189 cp_lexer_set_source_position_from_token.
6190 (cp_parser_late_parsing_default_args): Likewise.
6191 (yyparse): Call finish_file after clearing the_parser.
6192
6193 2002-12-11 Geoffrey Keating <geoffk@apple.com>
6194
6195 * Make-lang.in: Remove $(GGC_H) from all dependencies.
6196 (CXX_TREE_H): Add $(GGC_H).
6197 * class.c: Don't include ggc.h.
6198 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6199 (method_name_cmp): Likewise.
6200 (resort_data): New variable.
6201 (resort_field_decl_cmp): New.
6202 (resort_method_name_cmp): New.
6203 (resort_sorted_fields): New.
6204 (resort_type_method_vec): New.
6205 (finish_struct_methods): Delete cast.
6206 (finish_struct_1): Delete cast.
6207 * cp-tree.h: Include ggc.h.
6208 (struct lang_type_class): Add reorder attribute to field `methods'.
6209 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6210 (resort_sorted_fields): New prototype.
6211 (resort_type_method_vec): New prototype.
6212 * call.c: Don't include ggc.h.
6213 * decl.c: Likewise.
6214 * decl2.c: Likewise.
6215 * init.c: Likewise.
6216 * lex.c: Likewise.
6217 * method.c: Likewise.
6218 * optimize.c: Likewise.
6219 * parse.y: Likewise.
6220 * pt.c: Likewise.
6221 * repo.c: Likewise.
6222 * search.c: Likewise.
6223 * semantics.c: Likewise.
6224 * spew.c: Likewise.
6225 * tree.c: Likewise.
6226
6227 * lang-specs.h: Remove comment.
6228
6229 2002-12-03 Geoffrey Keating <geoffk@apple.com>
6230
6231 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6232 (operator_name_info): Mark to be saved for PCH, specify size.
6233 (assignment_operator_name_info): Likewise.
6234
6235 2002-11-19 Geoffrey Keating <geoffk@apple.com>
6236
6237 * decl.c (anon_cnt): Mark to be saved for PCH.
6238
6239 2002-10-25 Geoffrey Keating <geoffk@apple.com>
6240
6241 * lex.c (init_reswords): Delete now-untrue comment.
6242 Allocate ridpointers using GGC.
6243
6244 2002-10-04 Geoffrey Keating <geoffk@apple.com>
6245
6246 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6247
6248 * g++spec.c (lang_specific_driver): Don't include standard
6249 libraries in `added'.
6250
6251 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
6252
6253 * decl2.c (finish_file): Call c_common_write_pch.
6254 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6255
6256 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
6257
6258 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6259 files when using g++.
6260 * lang-specs.h: Handle compiling C++ header files.
6261
6262 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6263
6264 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6265
6266 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6267
6268 * pt.c (push_access_scope_real): Call push_to_top_level for
6269 function in namespace scope.
6270 (pop_access_scope): Call pop_from_top_level for function in
6271 namespace scope.
6272
6273 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6274
6275 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6276
6277 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6278
6279 * Make-lang.in (c++.install-common, c++.install-man,
6280 c++.uninstall): Prepend $(DESTDIR) to destination paths in
6281 all (un)installation commands.
6282 (c++.install-common): Rewrite $(LN) commands to support
6283 DESTDIR with "ln" as well as with "ln -s".
6284
6285 2003-01-08 Jason Merrill <jason@redhat.com>
6286
6287 * parser.c (cp_parser_primary_expression): See through explicitly
6288 scoped ALIAS_DECLs, too.
6289
6290 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6291
6292 * decl.c: Remove some #if 0 code.
6293
6294 * decl.c: ANSIfy function declarations.
6295
6296 2003-01-07 Mark Mitchell <mark@codesourcery.com>
6297
6298 * parser.c (cp_parser_asm_definition): Correct handling of omitted
6299 operands.
6300
6301 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6302
6303 PR c++/9030
6304 * decl.c (make_typename_type): Check access only when tf_error.
6305 (make_unbound_class_template): Likewise.
6306 * pt.c (saved_access_scope): New variable.
6307 (push_access_scope_real): New function.
6308 (push_access_scope): Likewise.
6309 (pop_access_scope): Likewise.
6310 (tsubst_default_argument): Use them.
6311 (instantiate_template): Likewise.
6312 (regenerate_decl_from_template): Likewise.
6313 (instantiate_decl): Likewise.
6314 (get_mostly_instantiated_function_type): Likewise.
6315
6316 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
6317
6318 * tree.c: Delete bogus #if 0 code.
6319
6320 2003-01-07 Andreas Schwab <schwab@suse.de>
6321
6322 * class.c (layout_class_type): Don't use
6323 PCC_BITFIELD_TYPE_MATTERS if not defined.
6324
6325 2003-01-06 Mark Mitchell <mark@codesourcery.com>
6326
6327 PR c++/9165
6328 * decl2.c (build_cleanup): Mark the object as used.
6329
6330 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6331 (hash_local_specialization): New function.
6332 (register_local_specialization): Revert 2003-01-05 change.
6333 (instantiate_decl): Use hash_local_specialization when creating
6334 the local_specializations table.
6335
6336 * decl2.c (mark_used): Do not synthesize thunks.
6337
6338 * class.c (layout_class_type): Correct handling of unnamed
6339 bitfields wider than their types.
6340
6341 PR c++/9189
6342 * parser.c (cp_parser): Remove default_arg_types. Update
6343 documentation for unparsed_functions_queues.
6344 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6345 parameter.
6346 (cp_parser_new): Don't set parser->default_arg_types.
6347 (cp_parser_function_definition): Adjust usage of
6348 unparsed_funtions_queues.
6349 (cp_parser_class_specifier): Don't mess with
6350 parser->default_arg_types. Handle default argument processing in
6351 a separate phase from function body processing.
6352 (cp_parser_template_declaration_after_export): Adjust usage of
6353 unparsed_functions_queues.
6354 (cp_parser_late_parsing_for_member): Do not handle default
6355 arguments.
6356
6357 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
6358
6359 PR c++/9109
6360 * parser.c (cp_parser_declarator_kind): New enum.
6361 (cp_parser_declarator): Adjust.
6362 (cp_parser_direct_declarator): Adjust. Allow for either named or
6363 abstract declarator. Prefer abstract, if possible. Allow
6364 parenthesized function name.
6365 (cp_parser_condition): Adjust cp_parser_declarator call.
6366 (cp_parser_explicit_instantiation): Likewise.
6367 (cp_parser_init_declarator): Likewise.
6368 (cp_parser_type_id): Likewise.
6369 (cp_parser_function_definition): Likewise.
6370 (cp_parser_member_declaration): Likewise.
6371 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6372 the tentative parsing.
6373 (cp_parser_exception_declaration): Likewise.
6374
6375 2003-01-05 Mark Mitchell <mark@codesourcery.com>
6376
6377 * parser.c (cp_parser_template_parameter): Adjust call to
6378 cp_parser_parameter_declaration.
6379 (cp_parser_parameter_declaration_list): Likewise.
6380 (cp_parser_parameter_declaration): Replace
6381 greater_than_is_operator_p with template_parm_p parameter. Do not
6382 cache tokens for template default arguments.
6383
6384 * pt.c (retrieve_local_specialization): Use htab_find, not
6385 htab_find_with_hash.
6386 (register_local_specialization): Use htab_find_slot, not
6387 htab_find_slot_with_hash.
6388 (instantiate_decl): Pass a hash function to htab_create.
6389
6390 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6391
6392 * parser.c (cp_parser_binary_expression,
6393 cp_parser_multiplicative_expression,
6394 cp_parser_additive_expression, cp_parser_shift_expression,
6395 cp_parser_relational_expression, cp_parser_equality_expression,
6396 cp_parser_and_expression, cp_parser_exclusive_or_expression,
6397 cp_parser_inclusive_or_expression,
6398 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6399 cp_parser_binary_expression): Const-ify.
6400
6401 2003-01-04 Mark Mitchell <mark@codesourcery.com>
6402
6403 * method.c (use_thunk): Disable access control while building the
6404 body of the thunk.
6405
6406 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
6407
6408 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6409 front end.
6410
6411 2003-01-03 Matt Austern <austern@apple.com>
6412
6413 * cp-tree.h (struct lang_type_class): add field for key method
6414 (cp_global_trees): rename dynamic_classes to keyed_classes
6415 (key_method): add definition
6416 * class.c (finish_struct_1): compute class's key method, and add
6417 the class to keyed_classes list if there is no key method.
6418 * decl.c (finish_function): add class to keyed_classes list if we
6419 see a definition of the class's key method.
6420 * pt.c (instantiate_class_template): add template specialization
6421 of a dynamic class to keyed_classes list.
6422 * decl2.c (key_method): remove
6423 (finish_file): iterate only through keyed_classes list when
6424 deciding whether to emit vtables, remove class from its list after
6425 we do the emission.
6426
6427 2003-01-02 Jason Merrill <jason@redhat.com>
6428
6429 * call.c (build_conditional_expr): Stabilize lvalues properly.
6430 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6431 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6432 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6433
6434 * call.c (convert_like_real): Call decl_constant_value for an
6435 IDENTITY_CONV even if there are no more conversions.
6436
6437 * cvt.c (build_up_reference): Don't push unnamed temps.
6438
6439 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6440
6441 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6442 for a backend struct.
6443
6444 * except.c (wrap_cleanups_r, build_throw): Make
6445 MUST_NOT_THROW_EXPRs void.
6446 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6447
6448 * init.c (build_vec_delete_1): Pre-evaluate the base address.
6449
6450 * init.c (get_temp_regvar): Simplify logic.
6451
6452 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6453 our replacement is a decl.
6454
6455 * decl.c (cp_make_fname_decl): Push the decls inside the
6456 outermost scope.
6457
6458 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
6459
6460 PR c++/45, c++/3784
6461 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6462 the same too.
6463
6464 2003-01-03 Graham Stott <graham.stott@btinternet.com>
6465
6466 * parser.c (struct cp_parser): Add access_checks_lists field
6467 (cp_parser_simple_declaration): Use.
6468 (cp_parser_init_declarator): Likewise.
6469
6470 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6471
6472 * parser.c (cp_parser_declaration): Accept the __extension__
6473 keyword before the declaration.
6474
6475 PR c++/2843
6476 * parser.c (cp_parser_parameter_declaration): Allow attributes to
6477 appear after the declarator.
6478
6479 * call.c (build_new_method_call): Fix typo in message format
6480 string.
6481
6482 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6483
6484 * parser.c (cp_lexer_next_token_is): Declare it inline.
6485 (cp_lexer_set_source_position_from_token): Likewise.
6486 (cp_lexer_debugging_p): Likewise.
6487 (cp_parser_parsing_tentatively): Likewise.
6488 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6489 to the cp_lexer_peek_token.
6490
6491 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6492 expression.
6493
6494 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6495
6496 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6497 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6498 cp/repo.c: Fix copyright years.
6499
6500 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
6501
6502 * lex.c: Remove superfluous include of cpplib.h.
6503 (CONSTRAINT): Define without conditions.
6504 (init_cp_pragma): Use c_register_pragma.
6505
6506 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6507
6508 * .cvsignore: Remove.
6509
6510 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
6511
6512 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6513 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6514 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6515 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6516 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6517 copyright header.
6518 * lex.h: parse.y is dead, so don't mention it. Also replace the
6519 copyright header with the default GNU copyright header.
6520
6521 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6522
6523 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6524 (lookup_name_namespace_only): Likewise.
6525 (begin_only_namespace_names): Likewise.
6526 (end_only_namespace_names): Likewise.
6527 * decl.c (only_namespace_names): Remove.
6528 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6529 (lookup_name_real): Do not check only_namespace_names.
6530 (lookup_name_namespace_only): Remove.
6531 (begin_only_namespace_names): Likewise.
6532 (end_only_namespace_names): Likewise.
6533 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6534 nested-name-specifiers more gracefully.
6535 (cp_parser_class_or_namespace_name): Avoid looking up namespace
6536 names when they cannot possibly appear.
6537 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6538 (cp_parser_elaborated_type_specifier): Likewise.
6539 (cp_parser_namespace_name): Only look for namespace names.
6540 (cp_parser_lookup_name): Add is_namespace parameter.
6541 (cp_parser_lookup_name_simple): Adjust call to
6542 cp_parser_lookup_name.
6543
6544 * parser.c (cp_parser_dependent_type_p): Fix thinko.
6545
6546 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6547
6548 * .cvsignore: Update.
6549
6550 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
6551
6552 * class.c (modify_vtable_entry): Remove unused variable.
6553 (get_vcall_index): Always expect a non-thunk.
6554 (update_vtable_entry_for_fn): Combine covariant adjustments, when
6555 overriding a thunk. Pass get_vcall_index a non-thunk.
6556
6557 * decl2.c (finish_file): Mark undefined inlines as extern.
6558
6559 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6560
6561 * cp-tree.def (RETURN_INIT): Remove.
6562 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6563 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6564 (note_level_for_for): Remove.
6565 (note_level_for_try): Likewise.
6566 (note_level_for_catch): Likewise.
6567 (finish_named_return_value): Likewise.
6568 (do_pushlevel): Change prototype.
6569 (pending_lang_change): Remove.
6570 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6571 sk_for.
6572 (note_level_for_for): Remove.
6573 (note_level_for_try): Likewise.
6574 (note_level_for_catch): Likewise.
6575 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6576 * parser.c (cp_parser_context_free_list): Make it "deletable".
6577 (cp_parser_template_argument): Remove misleading comment.
6578 * pt.c (tsubst_expr): Remove RETURN_INIT code.
6579 * semantics.c (genrtl_named_return_value): Remove.
6580 (do_pushlevel): Take a scope kind as an argument.
6581 (begin_if_stmt): Adjust.
6582 (begin_while_stmt): Likewise.
6583 (begin_for_stmt): Likewise.
6584 (finish_for_init_stmt): Likewise.
6585 (begin_switch_stmt): Likewise.
6586 (begin_handler): Likewise.
6587 (begin_compound_stmt): Likewise.
6588 (finish_named_return_value): Remove.
6589 (cp_expand_stmt): Remove RETURN_INIT case.
6590 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6591
6592 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6593
6594 PR c++/9112
6595 * parser.c (cp_parser_direct_declarator): Handle erroneous
6596 parenthesized declarators correctly.
6597
6598 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6599
6600 * cp-tree.h (pending_lang_change): Declare.
6601
6602 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6603
6604 * parser.c (cp_parser_context_free_list): New variable.
6605 (cp_parser_context_new): Use it.
6606 (cp_parser_error): Check return code from
6607 cp_parser_simulate_error.
6608 (cp_parser_simulate_error): Return a value.
6609 (cp_parser_id_expression): Optimize common case.
6610 (cp_parser_class_name): Likewise.
6611 (cp_parser_class_specifier): Adjust call to
6612 cp_parser_late_parsing_default_args.
6613 (cp_parser_lookup_name): Optimize common case.
6614 (cp_parser_late_parsing_for_member): Adjust call to
6615 cp_parser_late_parsing_default_args.
6616 (cp_parser_late_parsing_default_args): Add scope parameter.
6617 (cp_parser_require): Avoid creating the error message unless it's
6618 needed.
6619 (cp_parser_parse_definitely): Place free'd contexts on the free
6620 list.
6621
6622 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6623
6624 2002-12-30 David Edelsohn <edelsohn@gnu.org>
6625
6626 * parser.c (cp_parser_parameter_declaration_clause): Treat system
6627 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6628
6629 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6630
6631 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6632 GCC, not GNU CC.
6633
6634 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6635
6636 * parse.y: Remove.
6637 * spew.c: Likewise.
6638 * Make-lang.in (gt-cp-spew.h): Remove.
6639 * cp-tree.h (do_pending_lang_change): Remove.
6640 (do_identifier): Change prototype.
6641 (finish_id_expr): Remove.
6642 * decl.c (lookup_name_real): Remove yylex variable.
6643 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6644 * lex.c (init_cpp_parse): Remove.
6645 (reduce_cmp): Likewise.
6646 (token_cmp): Likewise.
6647 (yychar): Likewise.
6648 (lastiddecl): Likewise.
6649 (token_count): Likewise.
6650 (reduce_count): Likewise.
6651 (yyhook): Likewise.
6652 (print_parse_statistics): Likewise.
6653 (do_pending_lang_change): Likewise.
6654 (do_identifier): Remove parsing parameter.
6655 * lex.h (lastiddecl): Remove.
6656 (looking_for_typename): Remove.
6657 (looking_for_template): Likewise.
6658 (pending_lang_change): Likewise.
6659 (yylex): Likewise.
6660 * semantics.c (finish_id_expr): Remove.
6661
6662 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6663 thread" correctly.
6664
6665 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6666
6667 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
6668 end, not the C front end.
6669
6670 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
6671
6672 * cp-tree.h (THUNK_TARGET): New macro.
6673 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6674 (finish_thunk): Remove offset parms.
6675 * class.c (find_final_overrider): Look through thunks.
6676 (get_vcall_index): Use THUNK_TARGET.
6677 (update_vtable_entry_for_fn): Look through thunks. Set covariant
6678 fixed offset here. Adjust finish_thunk call.
6679 (build_vtbl_initializer): Adjust finish_thunk calls.
6680 * mangle.c (mangle_call_offset): Remove superfluous if.
6681 (mangle_thunk): Adjust.
6682 * method.c (make_thunk): Adjust.
6683 (finish_thunk): Adjust.
6684 (thunk_adjust): Remove assert.
6685 (use_thunk): Use THUNK_TARGET
6686 * dump1.c (cp_dump_tree): Adjust thunk dumping.
6687
6688 PR c++/9054
6689 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6690 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6691
6692 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6693
6694 Remove traditional C constructs 4/n.
6695 * decl2.c (grok_method_quals, warn_if_unknown_interface,
6696 grok_x_components, cp_build_parm_decl, build_artificial_parm,
6697 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6698 delete_sanity, check_member_template, check_java_method,
6699 check_classfn, finish_static_data_member_decl, grokfield,
6700 grokbitfield, grokoptypename, grok_function_init,
6701 cplus_decl_attributes, constructor_name, defer_fn,
6702 build_anon_union_vars, finish_anon_union, coerce_new_type,
6703 coerce_delete_type, comdat_linkage, maybe_make_one_only,
6704 key_method, import_export_vtable, import_export_class,
6705 output_vtable_inherit, import_export_decl, import_export_tinfo,
6706 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6707 set_guard, start_objects, finish_objects,
6708 start_static_storage_duration_function,
6709 finish_static_storage_duration_function, get_priority_info,
6710 start_static_initialization_or_destruction,
6711 finish_static_initialization_or_destruction,
6712 do_static_initialization, do_static_destruction,
6713 prune_vars_needing_no_initialization, write_out_vars,
6714 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6715 add_using_namespace, merge_functions, ambiguous_decl,
6716 lookup_using_namespace, lookup_using_namespace,
6717 qualified_lookup_using_namespace, set_decl_namespace,
6718 decl_namespace, current_decl_namespace, push_decl_namespace,
6719 pop_decl_namespace, push_scope, pop_scope, add_function,
6720 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6721 lookup_arg_dependent, do_namespace_alias,
6722 validate_nonmember_using_decl, do_nonmember_using_decl,
6723 do_toplevel_using_decl, do_local_using_decl,
6724 do_class_using_decl, do_using_directive, check_default_args,
6725 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
6726 * parser.c (cp_parser_class_head): Use booleanss.
6727 * decl.c (walk_globals, walk_vtables): Likewise.
6728 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6729 walk_globals): Change return type from 'int' to 'bool'.
6730 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6731 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6732 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6733 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6734 qualifier_flags, tinfo_base_init, generic_initializer,
6735 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6736 dfs_class_hint_unmark, class_hint_flags, class_initializer,
6737 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6738 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6739 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6740 * repo.c (repo_compile_flags, repo_template_declared,
6741 repo_template_defined, repo_class_defined, repo_get_id,
6742 repo_template_used, repo_vtable_used, repo_inline_used,
6743 repo_tinfo_used, repo_template_instantiated, extract_string,
6744 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6745 finish_repo): Likewise.
6746 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6747 cxx_print_xnode): Likewise..
6748 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6749 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6750 * cxxfilt.c (demangle_it, print_demangler_list, usage,
6751 standard_symbol_characters, hp_symbol_characters, main, fatal):
6752 Likewise.
6753 (strip_underscore): Change type from 'int' to 'bool'.
6754 (main): Use boolean constants.
6755
6756 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6757
6758 Remove traditional C constructs 3/n.
6759 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6760 build_up_reference, warn_ref_binding, convert_to_reference,
6761 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6762 convert_to_void, convert, convert_force, build_type_conversion,
6763 build_expr_type_conversion, type_promotes_to,
6764 perform_qualification_conversions): Use C90 prototyping style.
6765 * decl2.c (grok_array_decl): Use boolean constant.
6766 (delete_sanity): Likewise.
6767 * typeck.c (build_unary_op): Likewise.
6768 * semantics.c (finish_switch_cond): Likewise.
6769 * parser.c (cp_parser_direct_new_declarator): Likewise.
6770 * init.c (build_new): Likewise.
6771
6772 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6773
6774 * Make-lang.in (po-generated): Remove parse.c.
6775 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
6776 ($(srcdir)/cp/parse.h): Remove target.
6777 ($(srcdir)/cp/parse.c): Likewise.
6778 (gt-cp-parse.h): Likewise.
6779 (gt-cp-parser.h): New target.
6780 (c++.distclean): Do not remove parse.output.
6781 (c++.maintainer-clean): Do not remove parse.c or parse.h.
6782 (cp/spew.o): Remove target.
6783 (cp/lex.o): Adjust dependencies.
6784 (cp/pt.o): Likewise.
6785 (cp/parse.o): Likewise.
6786 (cp/TAGS): Do not mention parse.c.
6787 (cp/parser.o): New target.
6788 * NEWS: Mention the new parser.
6789 * call.c (build_scoped_method_call): Simplify.
6790 (build_method_call): Likewise.
6791 (build_new_function_call): Adjust calls to add_function_candidate
6792 and add_template_candidate.
6793 (build_new_op): Improve handling of erroroneous operands.
6794 (convert_default_arg): Remove circular argument processing.
6795 (name_as_c_string): New function.
6796 (build_new_method_call): Use it.
6797 (perform_implicit_conversion): Use error_operand_p.
6798 * class.c (finish_struct_anon): Use constructor_name_p.
6799 (check_field_decls): Likewise.
6800 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6801 (resolve_address_of_overloaded_function): Likewise.
6802 (instantiate_type): Tweak pointer-to-member handling.
6803 (get_primary_binfo): Remove incorrect assertion.
6804 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6805 * cp-tree.h (DEFARG_TOKENS): New macro.
6806 (default_arg): New structure.
6807 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6808 (lang_tree_node): Add default_arg.
6809 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6810 (type_info_ref_type): New macro.
6811 (saved_scope): Make processing_explicit_instantiation a boolean.
6812 (check_access): New field.
6813 (unparsed_text): Remove.
6814 (language_function): Remove unparsed_inlines.
6815 (error_operand_p): New macro.
6816 (lang_decl): Adjust pending_inline_info.
6817 (DEFARG_POINTER): Remove.
6818 (tag_types): Add typenames.
6819 (lookup_ualified_name): Declare.
6820 (lookup_name_real): Likewise.
6821 (shadow_tag): Adjust prototype.
6822 (get_scope_of_declarator): Declare it.
6823 (process_next_inline): Remove it.
6824 (check_for_missing_semicolon): Likewise.
6825 (maybe_get_template_decl_from_type_decl): Declare it.
6826 (finish_label_stmt): Adjust prototype.
6827 (finish_non_static_data_meber): Declare it.
6828 (finish_pseudo_destructor_call_expr): Rename to ...
6829 (finish_pseudo_destructor_expr): ... this.
6830 (finish_compound_literal): Declare it.
6831 (begin_inline_definitions): Remove it.
6832 (init_spew): Remove.
6833 (peekyylex): Likewise.
6834 (arbitrate_lookup): Likewise.
6835 (frob_opname): Likewise.
6836 (maybe_snarf_defarg): Likewise.
6837 (add_defarg_fn): Likewise.
6838 (do_pending_defargs): Likewise.
6839 (done_pending_defargs): Likewise.
6840 (unprocessed_defarg_fn): Likewise.
6841 (replace_defarg): Likewise.
6842 (end_input): Likewise.
6843 (get_overloaded_fn): Likewise.
6844 * cvt.c (convert_to_reference): Improve error handling.
6845 * decl.c (lookup_name_real): Do not declare it static.
6846 (maybe_push_to_top_level): Set check_access.
6847 (identifier_type_value): Adjust call to lookup_name_real.
6848 (lookup_qualified_name): New method.
6849 (lookup_name_real): Remove special-case parsing code.
6850 (lookup_name-nonclass): Adjust call to lookup_name_real.
6851 (lookup_name_namespace_only): Likewise.
6852 (lookup_name): Likewise.
6853 (check_tag_decl): Return the type declared.
6854 (shadow_tag): Likewise.
6855 (register_dtor_fn): Tweak check_access.
6856 (grokfndecl): Use constructor_name_p.
6857 (get_scope_of_declarator): New function.
6858 (grokdeclarator): Obscure tweaks for slightly different declarator
6859 representations.
6860 (start_method): Return error_mark_node to indicate failure.
6861 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6862 * decl2.c (constructor_name_full): Simplify.
6863 (constructor_name): Use it.
6864 (build_expr_from_tree): Adjust for changes to do new parser.
6865 (push_scope): Improve robustness.
6866 (validate_nonmember_using_decl): Process declarations, not names.
6867 (do_class_using_decl): Likewise.
6868 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6869 here.
6870 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6871 * expr.c (cxx_expand_expr): Handle BASELINKs.
6872 * init.c (member_init_ok_or_else): Issue more errors.
6873 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6874 * lex.c: Do not include parse.h.
6875 (yypring): Do not declare.
6876 (yylval): Likewise.
6877 (make_reference_declarator): Remove error-generating code.
6878 (rid_to_yy): Remove.
6879 (cxx_init): Do not call init_spew.
6880 (yypring): Remove.
6881 (check_for_missing_semicolon): Remove.
6882 * lex.h (got_scope): Remove.
6883 (got_object): Remove.
6884 * method.c (hack_identifier): Use finish_non_static_data_member.
6885 (implicitly_declare_fn): Adjust use of constructor_name.
6886 * parser.c: New file.
6887 * pt.c (parse.h): Do not include it.
6888 (maybe_get_template_decl_from_template): Do not declare it.
6889 (finish_member_template_decl): Tweak.
6890 (begin_explicit_instantiation): Adjust for
6891 processing_explicit_instantiation being boolean.
6892 (end_explicit_instantiation): Likewise.
6893 (maybe_process_partial_specialization): Tighten specialization
6894 test.
6895 (retrieve_local_specialization): Adjust ue of hash table.
6896 (eq_local_specializations): New function.
6897 (register_local_specialization): Likewise.
6898 (push_template_decl_real): Remove unnecessary test.
6899 (maybe_get_template_decl_from_type_decl): Don't make it static.
6900 (for_each_template_parm_r): Handle TYPEOF_TYPE.
6901 (tsubst_copy): Use retrieive_local_specialization to handle
6902 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
6903 Handle COMPONENT_REFs with pseudo-destructor-expressions.
6904 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6905 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6906 (unify): Tweak handling of CONST_DECLs.
6907 (regenerate_decl_from_template): Use push_nested_class.
6908 (template_for_substitution): New funciton.
6909 (instantiate_decl): Use it. Register parameters as local
6910 specializations.
6911 * rtti.c (init_rtti_processing): Set type_info_ref_type.
6912 (build_typeid): Use it.
6913 (get_typeid): Likeise.
6914 * search.c (accessible_p): Use check_access, not
6915 flag_access_control.
6916 (adjust_result_of_qualified_name_lookup): Pay attention to the
6917 context_class.
6918 * semantics.c (finish_asm_stmt): Adjust error handling.
6919 (finish_label_stmt): Return the statement.
6920 (finish_non_static_data_member): New function.
6921 (finish_class_expr): Handle BASELINKs.
6922 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6923 (finish_object_call_expr): Simplify handling during templates.
6924 (finish_pseudo_destructor_call_expr): Rename to ...
6925 (finish_pseudo_dtor_expr): ... this.
6926 (finish_compound_literal): New function.
6927 (begin_inline_definitions): Remove.
6928 (finish_sizeof): Remove special template handling.
6929 * spew.c: Do not include parse.h.
6930 * tree.c (get_overloaded_fn): Remove.
6931 * typeck.c (build_class_member_access_expr): Handle
6932 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
6933 (lookup_destructor): New function.
6934 (finish_class_member_access_expr): Use it.
6935 (convert_arguments): Simplify.
6936 (build_unary_op): Handle BASELINKs.
6937
6938 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
6939
6940 PR c++/4803
6941 * decl2.c (mark_used): Defer inline functions.
6942 (finish_file): Merge deferred_fns loops. Check all used
6943 inline functions have a definition.
6944 * method.c (make_thunk): Thunks are not inline.
6945
6946 PR c++/5116, c++/764
6947 * call.c (build_new_op): Make sure template class operands are
6948 instantiated.
6949
6950 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
6951
6952 PR C++/7964
6953 * cp-tree.h (resolve_scoped_fn_name): Prototype.
6954 * call.c (resolve_scoped_fn_name): New function. Deal with
6955 more template expansion. Broken out of ...
6956 * parse.y (parse_finish_call_expr): ... here. Call it.
6957 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6958 resolve_scoped_fn_name and build_call_from_tree.
6959
6960 PR c++/9053
6961 * decl.c (duplicate_decls): Templates may be disambiguated by
6962 return type.
6963
6964 PR c++/8702
6965 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6966 conversion operators on failure.
6967
6968 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6969
6970 Remove traditional C constructs 2/n.
6971 * call.c (tourney, build_field_call, equal_functions, joust,
6972 compare_ics, build_over_call, build_java_interface_fn_ref,
6973 convert_like_real, op_error, build_object_call, resolve_args,
6974 build_vfield_ref, check_dtor_name, build_scoped_method_call,
6975 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6976 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6977 standard_conversion, reference_related_p,
6978 reference_compatible_p, convert_class_to_reference,
6979 direct_reference_binding, reference_binding,
6980 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6981 add_template_conv_candidate, any_viable, any_strictly_viable,
6982 build_this, splice_viable, print_z_candidates,
6983 build_user_type_conversion, build_new_function_call,
6984 conditional_conversion, build_conditional_expr, build_new_op,
6985 build_op_delete_call, enforce_access, call_builtin_trap,
6986 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6987 convert_default_arg, type_passed_as, convert_for_arg_passing,
6988 in_charge_arg_for_name, is_properly_derived_from,
6989 maybe_handle_implicit_object, maybe_handle_ref_bind,
6990 source_type, add_warning, can_convert, can_convert_arg,
6991 perform_implicit_conversion, can_convert_arg_bad,
6992 initialize_reference, add_conv_candidate,
6993 add_template_candidate_real, add_template_candidate): Ansify.
6994
6995 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
6996
6997 PR c++/8572
6998 * cp-tree.h (grokoptypename): Add SCOPE parameter.
6999 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
7000 if in a template scope.
7001 * parse.y (unoperator): Return the scope.
7002 (operator_name): Adjust grokoptypename call.
7003
7004 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7005
7006 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
7007 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
7008 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
7009
7010 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
7011
7012 * ChangeLog: Fix a typo.
7013 * class.c: Fix comment typos.
7014 * cp-tree.h: Likewise.
7015
7016 2002-12-18 Jason Merrill <jason@redhat.com>
7017
7018 Handle anonymous unions at the tree level.
7019 C++ ABI change: Mangle anonymous unions using the name of their
7020 first named field (by depth-first search). Should not cause
7021 binary compatibility problems, though, as the compiler previously
7022 didn't emit anything for affected unions.
7023 * cp-tree.def (ALIAS_DECL): New tree code.
7024 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
7025 first field, not the largest.
7026 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
7027 push the decl, and write it out at namespace scope.
7028 * decl.c (lookup_name_real): See through an ALIAS_DECL.
7029 (pushdecl): Add namespace bindings for ALIAS_DECLs.
7030 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
7031 of a decl which doesn't have one.
7032 * typeck.c (build_class_member_access_expr): Don't recurse if
7033 we already have the type we want.
7034
7035 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7036
7037 PR c++/8099
7038 * friend.c (make_friend_class): Allow partial specialization
7039 when declaration is not a template friend.
7040
7041 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7042
7043 PR c++/3663
7044 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
7045 TREE_PROTECTED to created decl nodes.
7046
7047 2002-12-18 Mark Mitchell <mark@codesourcery.com>
7048
7049 * class.c (build_base_field): Do not set DECL_PACKED on the
7050 FIELD_DECL.
7051
7052 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
7053
7054 * cp-tree.h (struct tree_srcloc): Use location_t.
7055 (SOURCE_LOCUS): New.
7056 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
7057
7058 2002-12-17 Jason Merrill <jason@redhat.com>
7059
7060 * decl.c (finish_function): Also complain about no return in
7061 templates.
7062 * semantics.c (finish_return_stmt): Also call check_return_expr in
7063 templates.
7064 * typeck.c (check_return_expr): In a template, just remember that we
7065 saw a return.
7066
7067 2002-12-16 Jason Merrill <jason@redhat.com>
7068
7069 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
7070 of the CALL_EXPR.
7071
7072 * semantics.c (do_pushlevel): Call pushlevel after adding the
7073 SCOPE_STMT.
7074 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
7075 * parse.y (function_body): Go back to using compstmt.
7076 * decl.c (pushdecl): Skip another level to get to the parms level.
7077
7078 * call.c (build_new_method_call): Use is_dummy_object to determine
7079 whether or not to evaluate the object parameter to a static member
7080 function.
7081
7082 2002-12-14 Jason Merrill <jason@redhat.com>
7083
7084 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
7085 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
7086 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
7087 don't bother with an AGGR_INIT_EXPR.
7088 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
7089 just generate a new decl normally. Take return slot parm.
7090 * cp-tree.h: Adjust prototype.
7091
7092 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
7093
7094 PR C++/8031
7095 * cvt.c (convert_to_pointer_force): Don't try comparing against
7096 erronous type.
7097
7098 2002-12-13 Geoffrey Keating <geoffk@apple.com>
7099
7100 * cp-tree.h: Have the multiple-include guards around
7101 the entire file.
7102
7103 2002-12-10 David Edelsohn <edelsohn@gnu.org>
7104
7105 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
7106 for SPEW_DEBUG.
7107 (snarf_method): Same.
7108 (snarf_defarg): Same.
7109
7110 2002-12-10 Mark Mitchell <mark@codesourcery.com>
7111
7112 PR c++/8372
7113 * pt.c (tsubst_copy): Handle destructor names more correctly.
7114
7115 2002-12-10 Matt Austern <austern@apple.com>
7116
7117 * cp-tree.h: get rid of needs_virtual_reinit bit.
7118
7119 2002-12-09 Mark Mitchell <mark@codesourcery.com>
7120
7121 * NEWS: Document removal of in-class initialization extension for
7122 static data members of non-arithmetic, non-enumeration type.
7123 * decl.c (check_static_variable_definition): Do not allow that
7124 extension.
7125 * decl2.c (grokfield): Do not call digest_init when processing
7126 templates.
7127
7128 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7129
7130 * error.c (dump_expr): Fix format specifier warning.
7131
7132 2002-12-04 Geoffrey Keating <geoffk@apple.com>
7133
7134 * class.c (finish_struct_1): Correct comment.
7135 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
7136
7137 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7138
7139 PR C++/8799
7140 * error.c (dump_expr): Don't ever try to dump a non-existent
7141 expression.
7142
7143 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
7144
7145 Implement covariant returns.
7146 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
7147 (struct lang_decl_flags): Add this_thunk_p flag.
7148 Rename vcall_offset to virtual_offset.
7149 (struct lang_decl): Rename delta to fixed_offset.
7150 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
7151 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
7152 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
7153 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
7154 (make_thunk): Add this_adjusting arg.
7155 (finish_thunk): Declare.
7156 (mangle_thunk): Add this_adjusting arg.
7157 * class.c (get_vcall_index): Use base function for lookup.
7158 (update_vtable_entry_for_fn): Generate covariant thunk.
7159 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
7160 (build_vtbl_initializer): Use base function for lookup.
7161 Finish covariant thunk here. Adjust thunk generation.
7162 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
7163 Adjust thunk dumping.
7164 * mangle.c (mangle_call_offset): New function.
7165 (mangle_thunk): Adjust for covariant thunks.
7166 * method.c (make_thunk): Adjust. Do not set name here.
7167 (finish_thunk): New function. Set name here.
7168 (use_thunk): Generate covariant thunks too.
7169 (thunk_adjust): New function.
7170 * search.c (covariant_return_p): Remove. Fold into ...
7171 (check_final_overrider): ... here. Simplify.
7172 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7173
7174 2002-12-03 Jason Merrill <jason@redhat.com>
7175
7176 PR c++/8674
7177 * call.c (build_over_call): Check specifically for TARGET_EXPR
7178 when eliding.
7179
7180 PR c++/8461, c++/8625
7181 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7182 (cp_convert_parm_for_inlining): Remove.
7183 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7184 Remove.
7185 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7186 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7187
7188 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7189 an ambiguous conversion.
7190
7191 2002-12-03 Mark Mitchell <mark@codesourcery.com>
7192
7193 PR c++/8688
7194 * decl.c (reshape_init): Handle erroneous initializers.
7195
7196 2002-12-02 Mark Mitchell <mark@codesourcery.com>
7197
7198 PR c++/8720
7199 * spew.c (remove_last_token): Make sure that last_chunk is set
7200 correctly.
7201
7202 PR c++/8615
7203 * error.c (dump_expr): Handle character constants with
7204 TREE_OVERFLOW set.
7205
7206 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7207
7208 DR 180
7209 * decl.c (grokdeclarator): Require class-key for all friend class.
7210 Output the correct type and context in the error message.
7211
7212 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7213
7214 PR c++/5919
7215 * pt.c (unify): Use variably_modified_type_p to test validity of
7216 template argument types.
7217
7218 PR c++/8727
7219 * cp-tree.h (lang_type_class): Add typeinfo_var.
7220 (CLASSTYPE_TYPEINFO_VAR): New macro.
7221 * rtti.c (get_tinfo_decl): Use it.
7222
7223 PR c++/8663
7224 * init.c (expand_member_init): Always get the main variant of a
7225 base class.
7226
7227 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7228
7229 PR c++/8332
7230 PR c++/8493
7231 * decl.c (cxx_init_decl_processing): Use size_type_node, not
7232 c_size_type_node.
7233 * decl2.c (coerce_new_type): Likewise.
7234 * except.c (do_allocate_exception): Likewise.
7235
7236 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7237
7238 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7239 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7240 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7241 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7242 typeck2.c: Include coretypes.h and tm.h.
7243 * Make-lang.in: Update dependencies.
7244
7245 2002-11-30 Mark Mitchell <mark@codesourcery.com>
7246
7247 PR c++/8227
7248 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7249 (check_initializer): Validate the type of the initialized
7250 variable, even if the initializer is absent.
7251 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7252
7253 PR c++/8214
7254 * typeck.c (convert_for_assignment): Do not use
7255 decl_constant_value on the operand.
7256
7257 PR c++/8511
7258 * pt.c (instantiate_decl): Handle template friends defined outside
7259 of the class correctly.
7260
7261 2002-11-29 Joe Buck <jbuck@synopsys.com>
7262
7263 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7264 anonymous structs.
7265
7266 2002-11-29 Mark Mitchell <mark@codesourcery.com>
7267
7268 * class.c (walk_subobject_offsets): Recur on binfos as well as on
7269 types.
7270 (layout_nonempty_base_or_field): Pass it a binfo when processing a
7271 base class.
7272 (layout_empty_base): Likewise.
7273 (build_base_field): Likewise.
7274
7275 2002-11-27 Mark Mitchell <mark@codesourcery.com>
7276
7277 * class.c (build_base_field): Make sure we get the canonical base
7278 when descending through primary bases.
7279
7280 2002-11-26 Geoffrey Keating <geoffk@apple.com>
7281
7282 * decl.c (check_initializer): Don't error on initialisation of
7283 a scalar with a brace-enclosed expression.
7284
7285 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
7286
7287 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7288 (template_parms_equal): Remove prototype.
7289 * typeck.c (buuld_indirect_ref): Reformat.
7290
7291 2002-11-25 Jason Merrill <jason@redhat.com>
7292
7293 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7294 and a DO_STMT.
7295
7296 2002-11-25 Mark Mitchell <mark@codesourcery.com>
7297
7298 * tree.c (cp_build_qualified_type_real): Correct handling of
7299 array types.
7300 * class.c (walk_subobject_offsets): Fix thinko.
7301 (build_base_field): Record offsets of empty bases in primary
7302 virtual bases.
7303 (layout_class_type): Record offsets of empty bases in fields.
7304
7305 * search.c (is_subobject_of_p_1): Fix thinko.
7306 (lookup_field_queue_p): Likewise.
7307
7308 2002-11-24 Mark Mitchell <mark@codesourcery.com>
7309
7310 * class.c (layout_class_type): Reuse tail padding when laying out
7311 virtual bases.
7312
7313 2002-11-22 Mark Mitchell <mark@codesourcery.com>
7314
7315 * rtti.c (qualifier_flags): Fix thinko.
7316
7317 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7318
7319 Remove traditional C constructs 1/n.
7320 * cp-tree.h (init_method, set_mangled_name_for_decl,
7321 build_opfncall, hack_identifier, make_thunk, use_thunk,
7322 synthesize_method, implicitly_declare_fn,
7323 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7324 maybe_clone_body): Remove use of PARAMS.
7325
7326 * method.c (do_build_assign_ref, do_build_copy_constructor,
7327 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7328 Likewise.
7329 (synthesize_method): Use 'bool' type and constants instead of
7330 'int'.
7331 (locate_copy): Likewise.
7332 (implicitly_declare_fn): Likewise.
7333
7334 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7335 Remove old-style declaration.
7336 (maybe_clone_body): Use 'bool' type and constants.
7337
7338 2002-11-21 Glen Nakamura <glen@imodulo.com>
7339
7340 PR c++/8342
7341 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7342 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7343 of the branches of a COND_EXPR.
7344
7345 2002-11-19 Mark Mitchell <mark@codesourcery.com>
7346
7347 * pt.c (for_each_template_parm): Free allocated memory.
7348 * search.c (is_subobject_of_p_1): New function.
7349 (is_subobject_of_p): Avoid walking virtual bases multiple times.
7350
7351 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7352
7353 * g++spec.c (lang_specific_spec_functions): New.
7354
7355 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
7356
7357 * ChangeLog: Follow spelling conventions.
7358 * class.c: Likewise.
7359 * decl2.c: Likewise.
7360
7361 2002-11-14 Zack Weinberg <zack@codesourcery.com>
7362
7363 * search.c (dfs_push_decls): Do not try to reorder elements
7364 3..n of method_vec if method_vec has only two elements.
7365 Reverse order of two tests to avoid accessing unallocated
7366 memory.
7367
7368 2002-11-14 Mark Mitchell <mark@codesourcery.com>
7369
7370 * class.c (dfs_find_final_overrider): Adjust so that the most
7371 derived object is a binfo, rather than a class type.
7372 (find_final_overrider): Likewise.
7373 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7374 (add_vcall_offset): Likewise.
7375
7376 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7377
7378 PR c++/8389
7379 * pt.c (instantiate_template): Push class scope for member
7380 functions.
7381 (get_mostly_instantiated_function_type): Likewise. Don't call
7382 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
7383 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7384 * mangle.c (write_encoding, write_unqualified_name): Adjust.
7385
7386 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7387
7388 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7389 vcall offfsets. Split out ...
7390 (add_vcall_offset): ... new function.
7391
7392 PR c++/8338
7393 * pt.c (for_each_template_parm): Add htab parameter.
7394 (process_partial_specialization): Adjust call.
7395 (push_template_decl_real): Likewise.
7396 (pair_fn_data): Add visited.
7397 (for_each_template_parm_r): Avoid walking duplicates more than
7398 once.
7399 (uses_template_parms): Adjust call to for_each_template_parm.
7400
7401 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7402
7403 * class.c (add_implicitly_declared_members): Put implicitly
7404 declared functions at the end of TYPE_METHODs when -fabi-version
7405 is at least 2.
7406
7407 2002-11-05 Geoffrey Keating <geoffk@apple.com>
7408
7409 * decl2.c (finish_file): Correct spelling.
7410
7411 2002-11-03 Mark Mitchell <mark@codesourcery.com>
7412
7413 * call.c (build_special_member_call): Do not try to lookup VTTs by
7414 name.
7415 * class.c (vtbl_init_data): Add generate_vcall_entries.
7416 (get_vtable_decl): Do not look up virtual tables by name.
7417 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7418 (set_primary_base): Do not set CLASSTYPE_RTTI.
7419 (determine_primary_base): Likewise.
7420 (get_matching_virtual): Remove.
7421 (get_vcall_index): New function.
7422 (update_vtable_entry_for_fn): Do not try to use virtual thunks
7423 when they are not required. Assign vcall indices at this point.
7424 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7425 Do update dynamic_classes.
7426 (build_vtt): Do not add VTTs to the symbol table.
7427 (build_ctor_vtbl_group): Likewise.
7428 (build_vtbl_initializer): Simplify handling of vcall indices.
7429 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7430 for the most derived class.
7431 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7432 the vtable.
7433 * cp-tree.h (dynamic_classes): New macro.
7434 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
7435 (CLASSTYPE_RTTI): Remove.
7436 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7437 (CLASSTYPE_VCALL_INDICES): New macro.
7438 (CLASSTYPE_VTABLES): Likewise.
7439 (BV_USE_VCALL_INDEX_P): Remove.
7440 (build_vtable_path): Remove.
7441 * decl2.c (finish_vtable_vardecl): Remove.
7442 (key_method): Remove #if 0'd code.
7443 (finish_vtable_vardecl): Rename to ...
7444 (maybe_emit_vtables): ... this.
7445 (finish_file): Use it.
7446 * search.c (look_for_overrides_here): Update comment.
7447
7448 2002-11-01 Zack Weinberg <zack@codesourcery.com>
7449
7450 PR c/7353 redux
7451 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7452
7453 2002-10-30 Jason Merrill <jason@redhat.com>
7454
7455 PR c++/8186
7456 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7457 * call.c (convert_for_arg_passing): Set it.
7458 * except.c (stabilize_throw_expr): Recurse for such an arg.
7459
7460 2002-10-31 Mark Mitchell <mark@codesourcery.com>
7461
7462 * cp-tree.h (lang_decl_flags): Remove init_priority.
7463 (lang_decl): Add delta.
7464 (GLOBAL_INIT_PRIORITY): Remove.
7465 (THUNK_DELTA): Revise definition.
7466 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7467 * dump.c (cp_dump_tree): Don't dump it.
7468
7469 2002-10-30 Mark Mitchell <mark@codesourcery.com>
7470
7471 PR c++/8160
7472 * typeck2.c (process_init_constructor): Call complete_array_type.
7473
7474 PR c++/8149
7475 * decl.c (make_typename_type): Issue errors about invalid results.
7476
7477 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7478
7479 Core issue 287, PR c++/7639
7480 * cp-tree.h (lang_type_class): Add decl_list field.
7481 (CLASSTYPE_DECL_LIST): New macro.
7482 (maybe_add_class_template_decl_list): Add declaration.
7483 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7484 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7485 (maybe_add_class_template_decl_list): New function.
7486 (add_implicitly_declared_members): Use it.
7487 * decl.c (maybe_process_template_type_declaration): Likewise.
7488 (pushtag): Likewise.
7489 * friend.c (add_friend): Likewise.
7490 (make_friend_class): Likewise.
7491 * semantics.c (finish_member_declaration): Likewise.
7492 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7493 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7494 to process members and friends in the order of declaration.
7495
7496 2002-10-29 Mark Mitchell <mark@codesourcery.com>
7497
7498 PR c++/8287
7499 * decl.c (finish_destructor_body): Create the label to jump to
7500 when returning from a destructor here.
7501 (finish_function_body): Rather than here.
7502
7503 2002-10-25 Zack Weinberg <zack@codesourcery.com>
7504
7505 PR c++/7266
7506 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7507 SCOPE_REF is not null before dereferencing it.
7508
7509 2002-10-25 Mark Mitchell <mark@codesourcery.com>
7510
7511 * call.c (build_over_call): Use DECL_CONTEXT, not
7512 DECL_VIRTUAL_CONTEXT.
7513 * class.c (modify_vtable_entry): Don't mess with
7514 DECL_VIRTUAL_CONTEXT.
7515 (set_vindex): Remove.
7516 (set_primary_base): Remove vfuns_p parameter.
7517 (determine_primary_base): Likewise.
7518 (modify_all_vtables): Likewise.
7519 (layout_class_type): Likewise. Adjust calls to other functions
7520 accordingly.
7521 (finish_struct_1): Adjust calls to modified functions. Set
7522 DECL_VINDEX here.
7523 * cp-tree.h (lang_type_class): Remove vsize.
7524 (CLASSTYPE_VSIZE): Remove.
7525 (lang_decl): Remove thunks.
7526 (DECL_THUNKS): Adjust.
7527 (DECL_VIRTUAL_CONTEXT): Remove.
7528 (duplicate_decls): Don't copy it.
7529 * pt.c (build_template_decl): Don't set it.
7530 (tsubst_decl): Likewise.
7531 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7532
7533 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7534 (build_vtable_entry): Remove.
7535 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7536 (lang_decl): Add thunks.
7537 (DECL_THUNKS): New macro.
7538 * decl.c (duplicate_decls): Copy it.
7539 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7540 * semantics.c (emit_associated_thunks): Simplify.
7541
7542 2002-10-24 David Edelsohn <edelsohn@gnu.org>
7543
7544 PR c++/7228
7545 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7546 lang_type structure exists before accessing field.
7547 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7548 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7549 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7550 * class.c (check_field_decls): Use new macros.
7551 * typeck2.c (process_init_constructor): Remove redundant check for
7552 existence of lang_type structure.
7553
7554 2002-10-24 Mark Mitchell <mark@codesourcery.com>
7555
7556 * class.c (end_of_base): New method.
7557 (end_of_class): Use it. Check indirect virtual bases.
7558
7559 * class.c (check_field_decls): Fix typo.
7560
7561 2002-10-23 Mark Mitchell <mark@codesourcery.com>
7562
7563 PR c++/8067
7564 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7565 related variables.
7566
7567 PR c++/7679
7568 * spew.c (next_token): Do not return an endless stream of
7569 END_OF_SAVED_INPUT tokens.
7570 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7571 the cached token stream.
7572 (snarf_defarg): Likewise.
7573
7574 2002-10-23 Zack Weinberg <zack@codesourcery.com>
7575
7576 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7577 variably_modified_type_p.
7578 * cp-tree.h: Remove prototype of variably_modified_type_p.
7579 * tree.c (variably_modified_type_p): Remove; now implemented
7580 in language-independent code.
7581
7582 2002-10-22 Mark Mitchell <mark@codesourcery.com>
7583
7584 PR c++/6579
7585 * spew.c (snarf_parenthesized_expression): New function.
7586 (snarf_block): Use it.
7587
7588 2002-10-22 Richard Henderson <rth@redhat.com>
7589
7590 * method.c (use_thunk): Always compute vcall_value; assert that
7591 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
7592 for vcall thunks as well.
7593
7594 2002-10-21 Mark Mitchell <mark@codesourcery.com>
7595
7596 * class.c (empty_base_at_nonzero_offset_p): New function.
7597 (layout_nonempty_base_or_field): Do not check for conflicts when
7598 laying out a virtual base using the GCC 3.2 ABI.
7599 (build_base_field): Correct checking for presence of empty classes
7600 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7601
7602 * class.c (include_empty_classes): Use normalize_rli.
7603 (layout_class_type): Likewise.
7604
7605 * decl.c (reshape_init): Tweak handling of character arrays.
7606
7607 PR c++/8218
7608 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7609 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7610 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7611 (check_field_decls): Likewise.
7612 (layout_class_type): Likewise.
7613 (finish_struct_1): Initialize it.
7614 (walk_subobject_offsets): Use it to prune searches.
7615
7616 2002-10-20 Mark Mitchell <mark@codesourcery.com>
7617
7618 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7619 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7620 TARGET_ASM_OUTPUT_MI_THUNK in comments.
7621
7622 2002-10-18 Zack Weinberg <zack@codesourcery.com>
7623
7624 * decl.c (start_decl): Point users of the old initialized-
7625 typedef extension at __typeof__.
7626
7627 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7628
7629 * Make-lang.in (method.o): Depend on TARGET_H.
7630 * method.c (target.h): Include it.
7631 (use_thunk): Use target hooks. Use vcall thunks, if available.
7632
7633 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7634
7635 * class.c (base_derived_from): Make sure return value is a bool.
7636
7637 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7638
7639 * class.c (find_final_overrider_data_s): Remove overriding_fn and
7640 overriding_base.
7641 (dfs_base_derived_from): New function.
7642 (base_derived_from): Likewise.
7643 (dfs_find_final_overrider): Use base_derived_from.
7644 (find_final_overrider): Adjust.
7645
7646 2002-10-18 Jason Merrill <jason@redhat.com>
7647
7648 PR c++/8080
7649 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7650 with condition decls in a template.
7651
7652 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
7653
7654 * class.c (add_method): Compare template parms too.
7655
7656 2002-10-17 Mark Mitchell <mark@codesourcery.com>
7657
7658 PR c++/7584
7659 * class.c (handle_using_decl): Allow the declaration used to be
7660 from an ambiguous base.
7661
7662 * pt.c (convert_template_argument): Revert this change:
7663 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7664 * pt.c (convert_template_argument): Do not fold non-type
7665 template rguments when inside a template.
7666
7667 * init.c (expand_default_init): Handle brace-enclosed initializers
7668 correctly.
7669
7670 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7671
7672 * mangle.c (write_expression): Correct handling of enumeration
7673 constants.
7674 (write_template_arg): Likewise.
7675 * pt.c (convert_template_argument): Do not fold non-type template
7676 arguments when inside a template.
7677
7678 PR c++/7478
7679 * cvt.c (convert_to_reference): Allow references as the incoming
7680 type.
7681
7682 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7683
7684 PR c++/7524
7685 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7686 build_qualified_type.
7687
7688 2002-10-15 Richard Henderson <rth@redhat.com>
7689
7690 * error.c (dump_expr): Use real_to_decimal directly, and with
7691 the new arguments.
7692
7693 2002-10-15 Mark Mitchell <mark@codesourcery.com>
7694
7695 * decl.c (reshape_init): Fix typo.
7696
7697 * cp-tree.h (operator_name_info_t): Add arity.
7698 * lex.c (init_operators): Initialize it.
7699 * mangle.c (write_conversion_operator_name): New function.
7700 (write_unqualified_name): Use it.
7701 (write_template_args): Accept template arguments as a TREE_LIST.
7702 (write_expression): Adjust handling of qualified names to match
7703 specification.
7704
7705 2002-10-15 Jason Merrill <jason@redhat.com>
7706
7707 * call.c (call_builtin_trap): New fn.
7708 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
7709 (build_call): Don't set current_function_returns_abnormally outside
7710 a function.
7711
7712 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7713
7714 * class.c (check_field_decls): Remove empty_p parameter. Instead,
7715 clear CLASSTYPE_EMPTY_P.
7716 (build_base_field): Likewise.
7717 (build_base_fields): Likewise.
7718 (check_bases_and_members): Likewise.
7719 (create_vtbl_ptr): Likewise.
7720 (layout_class_type): Likewise. Ensure that empty classes have
7721 size zero when used as base classes in the 3.2 ABI.
7722 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7723 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
7724 parameter.
7725 (is_empty_class): Correct definition when using post-3.2 ABI.
7726 * cp-tree.h (lang_type_class): Add empty_p.
7727 (CLASSTYPE_EMPTY_P): New macro.
7728
7729 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
7730
7731 * init.c (build_delete): Do not apply save_expr for arrays.
7732 (build_vec_delete): Likewise.
7733
7734 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7735
7736 * decl.c (layout_var_decl): Call layout_decl even for variables
7737 whose type is an array with unspecified bounds.
7738
7739 PR c++/7176
7740 * lex.c (do_identifier): Add another option for the parsing
7741 parameter.
7742 * parse.y (do_id): Use it.
7743
7744 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
7745
7746 PRs C++/6803, C++/7721 and C++/7803
7747 * decl.c (grokdeclarator): Gracefully handle template-name as
7748 decl-specifier.
7749
7750 2002-10-11 Jason Molenda <jmolenda@apple.com>
7751
7752 * init.c (build_field_list): Provide uses_unions_p with a default
7753 value.
7754
7755 2002-10-11 Mark Mitchell <mark@codesourcery.com>
7756
7757 PR c++/5661
7758 * cp-tree.h (variably_modified_type_p): New function.
7759 (grokdeclarator) Tighten check for variably modified types as
7760 fields.
7761 * pt.c (convert_template_argument): Do not allow variably modified
7762 types as template arguments.
7763 * tree.c (variably_modified_type_p): New function.
7764
7765 * NEWS: Document removal of "new X = ..." extension.
7766 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7767 brace-enclosed initializers.
7768 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7769 (initialize_local_var): Remove declaration.
7770 (expand_static_init): Likewise.
7771 * decl.c (next_initializable_field): New function.
7772 (reshape_init): Likewise.
7773 (check_initializer): Use them. Build dynamic initializer for
7774 aggregates here too.
7775 (initialize_local_var): Simplify, and incorporate cleanup
7776 insertion code as well.
7777 (destroy_local_var): Remove.
7778 (cp_finish_decl): Tidy.
7779 (expand_static_init): Fold checks for whether or not a variable
7780 needs initialization into this function. Simplify.
7781 * decl2.c (do_static_initialization): Simplify.
7782 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7783 be done for us automatically.
7784 (expand_default_init): Handle brace-enclosed initializers
7785 correctly.
7786 (expand_aggr_init_1): Remove RTL-generation code.
7787 (build_vec_init): Remove "new X = ..." support.
7788 * parse.y (new_initializer): Likewise.
7789 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7790 brace-enclosed initializer.
7791 (create_pseudo_type_info): Likewise.
7792 * typeck2.c (store_init_value): Don't try to handle digest_init
7793 being called more than once.
7794 (digest_init): Tidy handling of brace-enclosed initializers.
7795
7796 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7797
7798 * decl.c (typename_hash): Use htab_hash_pointer.
7799
7800 2002-10-10 Jim Wilson <wilson@redhat.com>
7801
7802 * decl.c (duplicate_decls): Don't call decl_attributes.
7803
7804 2002-10-09 Zack Weinberg <zack@codesourcery.com>
7805
7806 PR c/7353
7807 * decl.c (start_decl): Unconditionally issue error for
7808 'typedef foo = bar'.
7809 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7810 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7811
7812 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7813
7814 * decl2.c (prune_vtable_vardecl): Delete unused function.
7815
7816 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7817
7818 PR c++/7754
7819 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7820 procesing template functions.
7821 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7822 type. Call layout_decl.
7823 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7824
7825 2002-10-07 Richard Henderson <rth@redhat.com>
7826
7827 * decl2.c, pt.c: Revert c++/7754 fix.
7828
7829 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7830
7831 PR c++/7804
7832 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7833
7834 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7835
7836 PR c++/7931
7837 * pt.c (for_each_template_parm_r): Handle BASELINKs.
7838
7839 PR c++/7754
7840 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7841 procesing template functions.
7842 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7843 type. Call layout_decl.
7844 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7845
7846 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7847
7848 PR c++/8006
7849 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7850 template parameters.
7851 (globals): Add entity and need_abi_warning.
7852 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7853 CLASSTYPE_TEMPLATE_INFO.
7854 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7855 TYPE_TI_TEMPLATE.
7856 (write_prefix): Handle typename types correctly.
7857 (write_template_prefix): Handle template template parameters
7858 correctly.
7859 (start_mangling): Add entity parameter.
7860 (finish_mangling): Warn about names whose mangling will change.
7861 (mangle_decl_string): Adjust.
7862 (mangle_type_string): Likewise.
7863 (mangle_special_for_type): Likewise.
7864 (mangle_ctor_vtbl_for_type): Likewise.
7865 (mangle_thunk): Likewise.
7866 (mangle_guard_variable): Likewise.
7867 (mangle_ref_init_variable): Likewise.
7868
7869 2002-10-02 Mark Mitchell <mark@codesourcery.com>
7870
7871 PR c++/7188.
7872 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7873 * cp-tree.h (emit_base_init): Rename to ....
7874 (emit_mem_initializers): ... this.
7875 (expand_member_init): Change prototype.
7876 * init.c (perform_member_init): Compute explicit, rather than
7877 requiring it as a parameter.
7878 (sort_member_init): Rename to ...
7879 (sort_mem_initializers): ... this. Process bases and data members
7880 together.
7881 (sort_base_init): Remove.
7882 (emit_base_init): Rename to ...
7883 (emit_mem_initializers): ... this.
7884 (expand_aggr_vbase_init_1): Remove.
7885 (construct_virtual_bases): Rename to ...
7886 (construct_virtual_base): ... this.
7887 (expand_member_init): Rework handling of base initializers.
7888 * method.c (do_build_copy_constructor): Use
7889 finish_mem_initializers.
7890 * parse.y (member_init): Adjust calls to expand_member_init.
7891 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7892 (tsubst_initializer_list): Use expand_member_init.
7893 * semantics.c (finish_mem_intiailizers): Simplify.
7894
7895 2002-10-02 Matt Austern <austern@apple.com>
7896 * decl.c (walk_vtables_r): Fixed typo that caused result to
7897 never get a nonzero value.
7898
7899 2002-10-02 Roger Sayle <roger@eyesopen.com>
7900
7901 PR optimization/6627
7902 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7903 from here, and move it to tree.h.
7904 * decl.c (cxx_init_decl_processing): If storing the vbit
7905 in function pointers, ensure that force_align_functions_log
7906 is atleast one.
7907
7908 2002-10-02 Matt Austern <austern@apple.com>
7909
7910 * class.c (check_field_decls): Changed warning about const member
7911 variables so that it doesn't get issued for a class aggregate.
7912
7913 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7914
7915 * decl.c (cp_finish_decl): Make sure array types are laid out,
7916 even if the array bounds are unknown.
7917
7918 2002-10-01 Steve Ellcey <sje@cup.hp.com>
7919
7920 * class.c (build_vtbl_initializer): Change build_c_cast
7921 to build1.
7922
7923 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7924
7925 * decl.c (cp_finish_decl): Make sure array types are laid out,
7926 even if the array bounds are unknown.
7927
7928 * decl.c (cp_finish_decl): Correct check for dynamic
7929 initialization of thread-local storage.
7930
7931 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
7932
7933 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7934 overloaded.
7935
7936 2002-09-30 Steve Ellcey <sje@cup.hp.com>
7937
7938 * class.c (build_vtbl_initializer): Add cast.
7939 (add_vcall_offset_vtbl_entries_1):
7940 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7941
7942 2002-09-30 Mark Mitchell <mark@codesourcery.com>
7943
7944 * class.c (walk_subobject_offsets): Correct the calculation of
7945 offsets for virtual bases. Correct the counting of array
7946 elements.
7947 (layout_nonempty_base_or_field): Simplify. Correct the
7948 calculation of offsets to be propagated through the binfo
7949 hierarchy.
7950 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7951 Add the FIELD_DECL to TYPE_FIELDS.
7952 (build_base_fields): Adjust accordingly.
7953 (layout_virtual_bases): Use build_base_field.
7954 (end_of_class): Return a tree, not an integer.
7955 (warn_about_ambiguous_direct_bases): Rename to ...
7956 (warn_about_ambiguous_bases): ... this.
7957 (include_empty_classes): New function.
7958 (layout_class_type): Create an alternative version of the type to
7959 be used when as a base class type. Do not call
7960 finish_record_layout until we are done laying out the class.
7961 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
7962 as_base.
7963 (CLASSTYPE_SIZE): Reimplement.
7964 (CLASSTYPE_SIZE_UNIT): Likewise.
7965 (CLASSTYPE_ALIGN): Likweise.
7966 (CLASSTYPE_USER_ALIGN): Likewise.
7967 (CLASSTYPE_AS_BASE): New macro.
7968 (DECL_INITIALIZED_P): Likewise.
7969 (extract_init): Remove prototype.
7970 (build_forced_zero_init): Rename to ...
7971 (build_zero_init): ... this.
7972 (force_store_init_value): Remove.
7973 * decl.c (obscure_complex_init): Remove.
7974 (duplicate_decls): Copy DECL_INITIALIZED_P.
7975 (check_initializer): Do not leave junk in DECL_INITIAL.
7976 (cp_finish_decl): Handle zero-initialization of entities with
7977 static storage duration.
7978 * expr.c (extract_init): Remove.
7979 * init.c (build_forced_zero_init): Remove.
7980 (build_zero_init): New function.
7981 (build_default_init): Use it.
7982 (build_field_list): Skip FIELD_DECLs for base subobjects.
7983 (push_base_cleanups): Likewise.
7984 * method.c (do_build_assign_ref): Likewise.
7985 (synthesize_exception_spec): Likewise.
7986 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7987 (regenerate_decl_from_template): To not set DECL_INITIAL for a
7988 static data member whose initialization took place in its class.
7989 (instantiate_decl): Do not pass an initializer to cp_finish_decl
7990 in that situation.
7991 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7992 (dfs_unuse_fields): Likewise.
7993 * tree.c (pod_type_p): Handle error_mark_node.
7994 (zero_init_p): Likewise.
7995 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7996 subobjects.
7997 * typeck2.c (store_init_value): Remove #if 0'd code.
7998 (force_store_init_value): Remove.
7999 (process_init_constructor): Use build_zero_init.
8000
8001 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
8002
8003 PR c++/7788
8004 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
8005
8006 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
8007
8008 * cp-tree.h: Fix comment typos.
8009 * decl.c: Likewise.
8010 * pt.c: Likewise.
8011
8012 2002-09-25 Mark Mitchell <mark@codesourcery.com>
8013
8014 * cp/class.c (contains_empty_class_p): New method.
8015 (walk_subobject_offsets): Correct computation of field offset.
8016 (layout_empty_base): Correct placement of emtpy base classes.
8017 (layout_class_type): Warn about ABI changes.
8018
8019 2002-09-23 Mark Mitchell <mark@codesourcery.com>
8020
8021 * cp/class.c (layout_virtual_bases): Do not round the size of the
8022 type to a multiple of the alignment before laying out virtual bases.
8023 (layout_class_type): Correct handling of bit-fields that are wider
8024 than their type inside unions. Round the size of the type to a
8025 even number of bytes when computing the size without virtual
8026 bases.
8027 * cp/cp-tree.h (abi_version_at_least): New macro.
8028
8029 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
8030
8031 * ChangeLog: Follow spelling conventions.
8032 * ChangeLog.2: Likewise.
8033 * call.c: Likewise.
8034 * class.c: Likewise.
8035 * cp-tree.h: Likewise.
8036 * cvt.c: Likewise.
8037 * decl.c: Likewise.
8038 * decl2.c: Likewise.
8039 * except.c: Likewise.
8040 * friend.c: Likewise.
8041 * g++spec.c: Likewise.
8042 * init.c: Likewise.
8043 * lex.c: Likewise.
8044 * mangle.c: Likewise.
8045 * method.c: Likewise.
8046 * operators.def: Likewise.
8047 * optimize.c: Likewise.
8048 * pt.c: Likewise.
8049 * rtti.c: Likewise.
8050 * search.c: Likewise.
8051 * semantics.c: Likewise.
8052 * spew.c: Likewise.
8053 * tree.c: Likewise.
8054 * typeck.c: Likewise.
8055
8056 2002-09-18 Devang Patel <dpatel@apple.com>
8057
8058 * cp/cp-tree.h: New prototype for walk_vtabls().
8059 * cp/decl.c (walk_vtables_r): New function.
8060 (struct cp_binding_level): Add new members, namespaces,
8061 names_size and vtables.
8062 (add_decl_to_level): Add decl in namespaces or vtables
8063 chain, if conditions match.
8064 (walk_vtables): New function.
8065 (walk_namespaces_r): Travers separate namespace chain
8066 for namespace decls.
8067 (wrapup_globals_for_namespace): Use names_size instead
8068 of list_length().
8069 * cp/decl2.c (finish_file): Use walk_vtables() instead of
8070 walk_globals() to walk vtable decls.
8071
8072 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
8073
8074 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
8075 ICE with invalid pointers & references.
8076
8077 2002-09-17 Zack Weinberg <zack@codesourcery.com>
8078
8079 * Make-lang.in: Remove all references to the demangler.
8080 * cxxfilt.c: Moved to binutils.
8081
8082 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8083
8084 PR c++/7718
8085 * pt.c (tsubst_decl): Remove assert.
8086
8087 Remove DR 295 implementation.
8088 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
8089 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
8090 about ignoring volatile qualifiers.
8091
8092 * search.c (lookup_member): Correct documentation.
8093
8094 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8095
8096 * cp-tree.h (union lang_tree_node): Add chain_next option.
8097
8098 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8099
8100 * parse.y (parse_finish_call_expr): Check lookup_member result.
8101
8102 PR c++/7015
8103 * semantic.c (finish_asm_stmt): Fix operand/output_operands
8104 thinko.
8105 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
8106
8107 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
8108
8109 PR c++/7919
8110 * call.c (build_over_call): Convert this pointer for fns found by
8111 using decls.
8112
8113 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8114
8115 * ChangeLog: Follow spelling conventions.
8116 * ChangeLog.1: Likewise.
8117
8118 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
8119
8120 PR c++/7768
8121 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
8122
8123 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
8124
8125 * error.c: Fix comment formatting.
8126 * except.c: Likewise.
8127 * expr.c: Likewise.
8128 * friend.c: Likewise.
8129 * g++spec.c: Likewise.
8130 * init.c: Likewise.
8131 * lex.c: Likewise.
8132 * mangle.c: Likewise.
8133 * method.c: Likewise.
8134 * optimize.c: Likewise.
8135 * pt.c: Likewise.
8136 * rtti.c: Likewise.
8137 * search.c: Likewise.
8138 * semantics.c: Likewise.
8139 * spew.c: Likewise.
8140 * tree.c: Likewise.
8141 * typeck.c: Likewise.
8142 * typeck2.c: Likewise.
8143
8144 2002-09-13 Matt Austern <austern@apple.com>
8145
8146 PR C++/7828
8147 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
8148 * cp/call.c: Change call-by-const-reference mechanism to use
8149 non_cast_lvalue_p when deciding whether the create a temporary.
8150 We need a temporary when passing, e.g. (long) x by const ref.
8151
8152 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
8153
8154 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
8155
8156 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
8157
8158 * decl.c: Fix comment formatting.
8159 * decl2.c: Likewise.
8160
8161 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
8162
8163 * call.c: Fix comment formatting.
8164 * class.c: Likewise.
8165 * cp-lang.c: Likewise.
8166 * cp-tree.h: Likewise.
8167 * cvt.c: Likewise.
8168
8169 2002-09-11 Zack Weinberg <zack@codesourcery.com>
8170
8171 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8172 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8173 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8174 minor adjustments (use version_string, eliminate yet another
8175 duplicate of xmalloc)
8176
8177 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8178
8179 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8180
8181 2002-09-05 Jason Merrill <jason@redhat.com>
8182
8183 * typeck2.c (add_exception_specifier): Only pedwarn for an
8184 incomplete type.
8185 (require_complete_eh_spec_types): New fn.
8186 (cxx_incomplete_type_diagnostic): Also support pedwarning.
8187 * typeck.c (complete_type_or_diagnostic): Likewise.
8188 * call.c (build_call): Call require_complete_eh_spec_types.
8189 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8190 on an incomplete type.
8191
8192 2002-09-04 Jakub Jelinek <jakub@redhat.com>
8193
8194 * decl.c (start_cleanup_fn): Clear interface_only before
8195 start_function, restore it afterwards.
8196
8197 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
8198
8199 * cp-tree.h (finish_builtin_type): Remove.
8200 * decl2.c (finish_builtin_type): Move to common code.
8201 * decl.c (build_ptrmemfunc_type): Adjust.
8202 * rtti.c (create_pseudo_type_info): Adjust.
8203 (create_tinfo_types): Adjust.
8204
8205 2002-08-31 Jason Merrill <jason@redhat.com>
8206
8207 * cp-lang.c (cp_expr_size): Allow initialization from a
8208 CONSTRUCTOR.
8209
8210 2002-08-30 Richard Henderson <rth@redhat.com>
8211
8212 PR opt/7515
8213 * tree.c: Include target.h.
8214 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8215 don't bind locally.
8216 * Makefile.in (tree.o): Update.
8217
8218 2002-08-27 Mark Mitchell <mark@codesourcery.com>
8219
8220 * class.c (layout_virtual_bases): Warn about bugs in G++ that
8221 result in incorrect object layouts.
8222 (layout_class_type): Likewise.
8223
8224 2002-08-24 Matt Austern <austern@apple.com>
8225
8226 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8227 are allowable.
8228 (real_lvalue_p): Update caller.
8229 (lvalue_p): Ditto.
8230 (non_cast_lvalue_or_else): New.
8231 * tree.h: Declare it.
8232 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8233
8234 2002-08-22 Mark Mitchell <mark@codesourcery.com>
8235
8236 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8237 and COND_EXPR specially; fix error message output.
8238
8239 2002-08-22 Jason Merrill <jason@redhat.com>
8240
8241 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8242 * semantics.c (nullify_returns_r): Likewise.
8243
8244 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
8245
8246 Fix PR/7621
8247 * typeck.c (finish_class_member_access_expr): Diagnose cases where
8248 name lookup finds nothing.
8249
8250 2002-08-15 Jason Merrill <jason@redhat.com>
8251
8252 * semantics.c (finish_then_clause): Remove redundant assignment.
8253 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8254 extra binding level outside the if/switch statement.
8255 (finish_while_cond, finish_for_cond): Rewrite complex condition
8256 into the loop body.
8257
8258 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
8259
8260 * parse.y (sizeof, alignof, typeof): New non-terminals to
8261 increment skip_evaluation. Replace terminals with them and
8262 decrement skip_evaluation at the end of rules using them.
8263 * decl2.c (mark_used): Don't assemble_external if
8264 skipping evaluation.
8265
8266 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
8267
8268 Fix PR/7504
8269 * parse.y (parse_finish_call_expr): Handle incomplete
8270 type used to name a scope.
8271
8272 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
8273
8274 PR c++/7598
8275 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8276 regression caused by my 2002-08-08 patch.
8277
8278 2002-08-13 Mark Mitchell <mark@codesourcery.com>
8279
8280 * decl.c (pushdecl_class_level): Honor requests to bind names to
8281 OVERLOADs.
8282
8283 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8284
8285 * decl2.c (build_call_from_tree): Fix uninitialized variable.
8286 * parse.y (parse_finish_call_expr): Likewise.
8287 * repo.c (old_args, old_dir, old_main): Const-ify.
8288
8289 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
8290
8291 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8292 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8293 * optimize.c (maybe_clone_body): Likewise.
8294 * pt.c (tsubst_enum): Likewise.
8295 (lookup_template_class): Likewise.
8296 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8297
8298 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
8299
8300 * lang-specs.h: Remove -ansi.
8301
8302 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
8303
8304 * tree.c (maybe_dummy_object): Replace // with /* */
8305
8306 2002-08-09 Mark Mitchell <mark@codesourcery.com>
8307
8308 * call.c (standard_conversion): Use build_ptrmem_type.
8309 * cp-tree.h (build_ptrmem_type): New function.
8310 (adjust_result_of_qualified_name_lookup): Likewise.
8311 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8312 static data members.
8313 (build_ptrmem_type): New function.
8314 (grokdeclarator): Do not use build_offset_type when encountering a
8315 qualified name.
8316 * parse.y (parse_finish_call_expr): Use
8317 adjust_result_of_qualified_name_lookup.
8318 * search.c (adjust_result_of_qualified_name_lookup): New function.
8319 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8320 accessing OFFSET_TYPEs directly.
8321
8322 2002-08-08 Mike Stump <mrs@apple.com>
8323
8324 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8325 (type_decays_to): Likewise.
8326 * class.c (find_final_overrider): Likewise.
8327 (maybe_note_name_used_in_class): Likewise.
8328 * decl.c (current_tmpl_spec_kind): Likewise.
8329 (add_binding): Likewise.
8330 (push_class_binding): Likewise.
8331 (duplicate_decls): Likewise.
8332 (layout_var_decl): Likewise.
8333 (grokfndecl): Likewise.
8334 (grokdeclarator): Likewise.
8335 (check_default_argument): Likewise.
8336 * decl2.c (handle_class_head): Likewise.
8337 * error.c (dump_template_decl): Likewise.
8338 * init.c (build_offset_ref): Likewise.
8339 * pt.c (check_specialization_scope): Likewise.
8340 (determine_specialization): Likewise.
8341 (check_explicit_specialization): Likewise.
8342 (maybe_check_template_type): Likewise.
8343 (process_partial_specialization): Likewise.
8344 (check_default_tmpl_args): Likewise.
8345 (push_template_decl_real): Likewise.
8346 (convert_template_argument): Likewise.
8347 (try_class_unification): Likewise.
8348 (get_bindings_real): Likewise.
8349 (do_decl_instantiation): Likewise.
8350 * semantics.c (begin_function_definition): Likewise.
8351 (finish_member_declaration): Likewise.
8352 (check_multiple_declarators): Likewise.
8353 * typeck.c (comp_array_types): Likewise.
8354 (comptypes): Likewise.
8355 (expr_sizeof): Likewise.
8356 (build_binary_op): Likewise.
8357 (dubious_conversion_warnings): Likewise.
8358 (check_return_expr): Likewise.
8359
8360 2002-08-08 Mark Mitchell <mark@codesourcery.com>
8361
8362 * typeck.c (build_class_member_access_expr): Do not return
8363 error_mark_node when no error has occurred.
8364
8365 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8366
8367 * typeck.c (build_component_addr): Remove.
8368 (build_unary_op): Just check it's not a bitfield, and then build
8369 an ADDR_EXPR.
8370
8371 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8372
8373 * class.c (convert_to_base): Correct check for error_mark_node.
8374 (create_vtable_ptr): Remove unused VFUNS_P parm.
8375
8376 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8377
8378 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8379
8380 2002-08-07 Mark Mitchell <mark@codesourcery.com>
8381
8382 Rework build_component_ref.
8383 * call.c (build_vfield_ref): Do not go through build_component_ref.
8384 (build_field_call): Use build_class_member_access_expr.
8385 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8386 (build_object_call): Likewise.
8387 * class.c (convert_to_base): New function.
8388 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8389 (instantiate_type): Handle BASELINKs.
8390 * cp-tree.def (BASELINK): New tree code.
8391 * cp-tree.h (BASELINK_P): Reimplement.
8392 (SET_BASELINK_P): Remove.
8393 (BASELINK_BINFO): Reimplement.
8394 (BASELINK_FUNCTIONS): Likewise.
8395 (BASELINK_ACCESS_BINFO): Likewise.
8396 (BASELINK_OPTYPE): Likewise.
8397 (convert_to_base): New function.
8398 (name_p): Likewise.
8399 (build_object_ref): Remove.
8400 (build_component_ref_1): Likewise.
8401 (build_component_ref): Likewise.
8402 (build_x_component_ref): Likewise.
8403 (build_class_member_access_expr): New function.
8404 (finish_class_member_access_expr): Likewise.
8405 (build_ptrmemfunc_access_expr): Likewise.
8406 * decl.c (grokdeclarator): Handle BASELINKs.
8407 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8408 finish_class_member_access_expr.
8409 (arg_assoc): Handle BASELINKs.
8410 (do_class_using_decl): Likewise.
8411 * error.c (dump_decl): Likewise.
8412 (dump_expr): Use build_ptrmemfunc_access_expr.
8413 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8414 destructors.
8415 (build_throw): Use BASELINK_FUNCTIONS.
8416 * init.c (perform_member_init): Use
8417 build_class_member_access_expr.
8418 (build_offset_ref): Handle BASELINKs. Use
8419 build_class_member_access_expr.
8420 * method.c (hack_identifier): Likewise.
8421 * parse.y (do_id): Use BASELINK, not TREE_LIST.
8422 (primary): Remove uses of build_object_ref.
8423 * pt.c (lookup_template_function): Handle BASELINKs.
8424 (resolve_overloaded_unification): Likewise.
8425 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8426 (lookup_field): Use BASELINK, not TREE_LIST.
8427 (lookup_fnfiels): Likewise.
8428 (setup_class_bindings): Likewise.
8429 * semantics.c (finish_object_call_expr): Do not use
8430 build_method_call when we already know what function is being
8431 called.
8432 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8433 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8434 TREE_CHAIN.
8435 (name_p): New function.
8436 * typeck.c (build_object_ref): Remove.
8437 (build_component_ref_1): Likewise.
8438 (build_x_component_ref): Likewise.
8439 (build_class_member_access_expr): New function.
8440 (finish_class_member_access_expr): Likewise.
8441 (build_ptrmemfunc_access_expr): Likewise.
8442 (get_member_function_from_ptrfunc): Use
8443 build_ptrmemfunc_access_expr.
8444 (build_binary_op): Likewise.
8445 (build_unary_op): Likewise.
8446 (build_ptrmemfunc): Likewise.
8447 (pfn_from_ptrmemfunc): Likewise.
8448 * typeck2.c (build_m_component_ref): Adjust comment.
8449
8450 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
8451
8452 * Make-lang.in (CXX_C_OBJS): Update.
8453 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8454 * cp-tree.h (cxx_decode_option): Remove.
8455 * decl2.c (compare_options, lang_f_options, unsupported_options,
8456 cxx_decode_option): Remove.
8457
8458 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
8459
8460 * typeck.c (build_x_unary_op): Handle pointer-to-member.
8461
8462 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8463
8464 * class.c: Don't include obstack.h.
8465 (popclass):
8466 * decl2.c: Delete bogus comment.
8467 * error.c: Don't include obstack.h.
8468 * except.c: Likewise.
8469 (dump_type): Correct comment.
8470 * method.c: Don't include obstack.h.
8471 * tree.c: Likewise.
8472
8473 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
8474
8475 Fix PR/2213
8476 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8477 expressions to pointer-to-data-member of pointer-to-member-functions.
8478
8479 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8480
8481 * cvt.c (ocp_convert): Delete obsolete code.
8482 * parse.y (permanent_obstack): Delete declaration.
8483 * pt.c (permanent_obstack): Delete declaration.
8484 * repo.c (permanent_obstack): Delete declaration.
8485 (open_repo_file): Use xmalloc instead of permanent_obstack.
8486 (init_repo): Use xstrdup instead of permanent_obstack.
8487
8488 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
8489
8490 * cp-tree.h (VF_DERIVED_VALUE): Remove.
8491 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8492
8493 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
8494
8495 PR 7470.
8496 C++ ABI change - vfunc ordering.
8497 * class.c (add_virtual_function): Remove.
8498 (dfs_modify_all_vtables): Take list of all declared
8499 virtuals. Assign all that are not in primary base.
8500 (check_for_override): Adjust comments.
8501 (create_vtable_ptr): Take single list of virtuals. Build chain
8502 of declared virtuals here.
8503 (layout_class_type): Take single list of virtuals. Adjust.
8504 (finish_struct_1): Keep virtuals on single list. Adjust.
8505
8506 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8507
8508 * init.c (build_member_call): Use build_new_method_call, not
8509 build_method_call.
8510
8511 2002-08-02 Krister Walfridsson <cato@df.lth.se>
8512
8513 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8514
8515 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8516
8517 * call.c (build_method_call): Issue a more helpful error message
8518 about ambiguous method names.
8519
8520 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
8521
8522 * tree.c (build_shared_int_cst): Make cache file scope, and
8523 GTY it.
8524
8525 2002-08-02 Jason Merrill <jason@redhat.com>
8526
8527 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8528 (cp_expr_size): New fn.
8529 * call.c (build_over_call): Lose empty class hackery.
8530 (convert_arg_to_ellipsis): Promote non-POD warning to error.
8531 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8532
8533 * semantics.c (expand_body): Do tree optimization in the function
8534 context, too.
8535
8536 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
8537
8538 * cp-tree.h: Move all warning and flag declarations to c-common.h.
8539 * decl.c: Move all warning and flag variables to c-common.c.
8540 * decl2.c: Move all warning and flag variables to c-common.c.
8541 * lex.c (flag_digraphs): Remove.
8542 (warn_traditional): Now in c-common.c.
8543
8544 2002-07-31 Mark Mitchell <mark@codesourcery.com>
8545
8546 * call.c (build_field_call): Do not look up the field by name.
8547 (build_method_call): Simplify.
8548 (struct z_candidate): Add access_path and conversion_path. Remove
8549 basetype_path.
8550 (convert_class_to_reference): Adjust use of
8551 add_function_candidate.
8552 (add_candidate): Add conversion_path argument.
8553 (add_function_candidate): Use it.
8554 (add_conv_dndidate): Likewise.
8555 (build_builtin_candidate): Likewise.
8556 (add_template_candidate_real): Add conversion_path argument.
8557 (add_template_conv_candidate): Likewise.
8558 (add_template_candidate): Likewise.
8559 (build_user_type_conversion_1): Use it.
8560 (build_new_function_call): Remove name lookup code. Adjust use of
8561 add_template_candidate and add_function_candidate.
8562 (build_new_op): Likewise.
8563 (convert_like_real): Use build_special_member_call.
8564 (build_over_call): Use cand->conversion_path.
8565 (build_special_member_call): New method.
8566 (build_new_method_call): Remove name lookup code.
8567 * cp-tree.def (OFFSET_REF): Update documentation.
8568 (TEMPLATE_ID_EXPR): Likewise.
8569 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8570 (BASELINK_OPTYPE): Likewise.
8571 (build_new_method_call): Adjust prototype.
8572 (build_special_member_call): New method.
8573 (build_baselink): New method.
8574 (build_offset_ref_call_from_tree): Likewise.
8575 (build_call_from_tree): Likewise.
8576 (finish_qualified_call_expr): Remove.
8577 (finish_call_expr): Adjust prototype.
8578 (build_x_function_call): Remove.
8579 * cvt.c (ocp_convert): Use build_special_member_call.
8580 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8581 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8582 CALL_EXPR.
8583 (build_offset_ref_call_from_tree): New function.
8584 (build_call_from_tree): Likewise.
8585 * init.c (expand_cleanup): Use build_special_member_call.
8586 (expand_default_init): Likewise.
8587 (build_member_call): Use finish_call_expr.
8588 (build_new_1): Use build_special_member_call.
8589 (push_base_cleanups): Likewise.
8590 * method.c (do_build_assign_ref): Likewise.
8591 * parse.y (template_id): Do not pass a COMPONENT_REF to
8592 lookup_template_function.
8593 (primary): Use parse_finish_call_epxr, not finish_call_expr.
8594 (parse_finish_call_expr): New function.
8595 * pt.c (lookup_template_function): Add assertions.
8596 * search.c (lookup_base): Allow T to be a binfo.
8597 (build_baselink): New function.
8598 (lookup_member): Use it.
8599 * semantics.c (finish_call_expr): Do not do name lookup.
8600 (finish_object_call_expr): Remove #if 0'd code.
8601 (finish_qualified_call_expr): Remove.
8602 * typeck.c (build_x_function_call): Remove.
8603 (build_static_case): Use build_special_member_call.
8604 * typeck2.c (build_functional_cast): Likewise.
8605
8606 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8607
8608 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8609
8610 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
8611
8612 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8613
8614 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
8615
8616 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8617 documentation.
8618
8619 2002-07-29 Alan Modra <amodra@bigpond.net.au>
8620
8621 * cp-tree.h: Comment typo fix.
8622
8623 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
8624
8625 * spew.c (space_for_token): Allocate zeroed memory for a new token
8626 chunk.
8627
8628 2002-07-27 Roger Sayle <roger@eyesopen.com>
8629
8630 * decl.c (builtin_function_1): No need to explicitly mark
8631 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8632
8633 2002-07-27 Roger Sayle <roger@eyesopen.com>
8634
8635 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8636
8637 2002-07-26 Jason Merrill <jason@redhat.com>
8638
8639 * call.c (build_over_call): Likewise.
8640 (cp_convert_parm_for_inlining): New fn.
8641 (convert_for_arg_passing): New fn.
8642 (convert_default_arg, build_over_call): Use it.
8643 (type_passed_as): New fn.
8644 * pt.c (tsubst_decl): Use it.
8645 * decl2.c (cp_build_parm_decl): New fn.
8646 (build_artificial_parm): Use it.
8647 (start_static_storage_duration_function): Likewise.
8648 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8649 (grokparms): Don't mess with DECL_ARG_TYPE.
8650 * typeck.c (convert_arguments): Use convert_for_arg_passing.
8651 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8652 Define.
8653 * cp-tree.h: Declare new fns.
8654
8655 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
8656
8657 * cp-tree.h (flag_operator_names): Remove.
8658 * decl2.c (flag_operator_names): Remove.
8659 (lang_f_options): Remove operator-names.
8660 * lex.c (D_OPNAME): Remove.
8661 (reswords): Remove operator names.
8662 (rid_to_yy): Remove operator names.
8663 (init_reswords): No need to handle D_OPNAME.
8664 * spew.c (read_process_identifier): There are no operator
8665 names.
8666
8667 2002-07-26 Jason Merrill <jason@redhat.com>
8668
8669 * dump.c (cp_dump_tree): Call c_dump_tree.
8670 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8671
8672 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8673
8674 * error.c (print_whitespace): Remove.
8675 * g++spec.c (LIBUNWIND): Move.
8676 * mangle.c (mangled_position, write_signed_number): Remove.
8677
8678 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8679
8680 * decl2.c (cxx_decode_option): Similarly.
8681
8682 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
8683
8684 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8685 (cxx_sizeof_or_alignof_type): Take a third argument.
8686 (cxx_sizeof): Adjust definition.
8687 (cxx_alignof): Likewise.
8688 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8689 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8690 complaining.
8691 (c_sizeof_nowarn): Remove definition.
8692 (build_unary_op): Use cxx_sizeof_nowarn.
8693
8694 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
8695
8696 * tree.c (cp_build_qualified_type_real): When copying
8697 pointer-to-method types, unshare the record that holds
8698 the cached pointer-to-member-function type.
8699
8700 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8701
8702 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8703
8704 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
8705
8706 Fix PR/7363:
8707 * typeck.c (cxx_sizeof_or_alignof_type): New function.
8708 (c_sizeof): Remove definition.
8709 (expr_sizeof): Use cxx_sizeof.
8710 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8711 * decl.c (finish_destructor_body): Use cxx_sizeof.
8712 * semantics.c (finish_alignof): Likewise.
8713 (finish_alignof): Use cxx_alignof.
8714 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8715 (cxx_sizeof_or_alignof_type): Declare.
8716 (my_friendly_assert): Move to ../c-common.h.
8717
8718 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8719
8720 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8721
8722 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8723
8724 PR c++/7347, c++/7348
8725 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8726 * decl.c (make_typename_type): Use it.
8727 (make_unbound_class_template): Likewise.
8728 (lookup_name_real): Don't call type_access_control if scope is
8729 template parameter dependent.
8730 * parse.y (template_arg): Call make_unbound_class_template with
8731 tf_parsing set.
8732 (nest_name_specifier): Call make_typename_type with tf_parsing set.
8733 (typename_sub0): Likewise.
8734 (typename_sub1): Likewise.
8735 (instantiate_decl): Push class scope.
8736 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8737 for both static variable and member function template.
8738 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8739 and arguments.
8740 * search.c (type_access_control): Do type access for TEMPLATE_DECL
8741 too.
8742
8743 2002-07-20 Roger Sayle <roger@eyesopen.com>
8744
8745 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8746 test by using positive_option. Make whitespace consistent.
8747
8748 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
8749
8750 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8751 members with 'locus'. Adjust use throughout.
8752 (struct feed): Likewise.
8753 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8754 Adjust use.
8755 (snarf_defarg): Use error(), not error_with_file_and_line().
8756
8757 2002-07-19 Chris Demetriou <cgd@broadcom.com>
8758
8759 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8760 cpp_options is included.
8761
8762 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8763
8764 PR c++/2862, c++/2863
8765 * pt.c (determine_specialization): Compare the length of
8766 TYPE_ARG_TYPES. Tidy.
8767
8768 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8769
8770 PR c++/3797
8771 * decl.c (duplicate_decls): Don't propagate inlining parameters from
8772 olddecl to newdecl when newdecl is a specialization of the
8773 instantiation olddecl.
8774
8775 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8776
8777 PR c++/4802, c++/5387
8778 * decl.c (make_typename_type): Use enforce_access.
8779
8780 2002-07-17 Scott Snyder <snyder@fnal.gov>
8781
8782 PR c++/7320
8783 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8784
8785 2002-07-12 Mark Mitchell <mark@codesourcery.com>
8786
8787 * class.c (add_method): Correct handling of conversion operators.
8788
8789 2002-07-11 Mark Mitchell <mark@codesourcery.com>
8790
8791 PR c++/7224
8792 * class.c (add_method): Simplify.
8793
8794 2002-07-11 Jason Merrill <jason@redhat.com>
8795
8796 PR c++/7279
8797 * tree.c (cp_copy_res_decl_for_inlining): Also copy
8798 TREE_ADDRESSABLE.
8799
8800 2002-07-10 Graham Stott <graham.stott@btinternet.com>
8801
8802 * pt.c (template_parm_this_level_p, push_template_decl_real):
8803 Pass depth as int pointer.
8804
8805 2002-07-11 Tim Josling <tej@melbpc.org.au>
8806
8807 Remove front end hard coding from gengtype.c.
8808
8809 * config-lang.in (gtfiles): Add files needed for this front end.
8810
8811 2002-07-10 Mark Mitchell <mark@codesourcery.com>
8812
8813 * cp-tree.h (unqualified_name_lookup_error): Declare it.
8814 (begin_function_definition): Adjust prototype.
8815 * lex.c (unqualified_name_lookup_error): New function, split out
8816 from ...
8817 (do_identifier): ... here.
8818 * parse.y (parse_begin_function_definition): New function.
8819 (fn.def1): Use it.
8820 * semantics.c (begin_function_definition): Accept decl-specifiers
8821 and attributes as separate parameters.
8822
8823 2002-07-10 Jason Merrill <jason@redhat.com>
8824
8825 PR c++/6255
8826 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8827 modifying the old one.
8828
8829 2002-07-09 Mark Mitchell <mark@codesourcery.com>
8830
8831 * cp-tree.h (constructor_name_p): Declare it.
8832 (check_template_template_default_arg): Likewise.
8833 * class.c (handle_using_decl): Use constructor_name_p.
8834 * decl.c (grokdeclarator): Likewise.
8835 * decl2.c (constructor_name_p): Define it.
8836 * init.c (build_member_call): Use constructor_name_p.
8837 * parse.y (template_parm): Use check_template_template_default_arg.
8838 * pt.c (check_explicit_specialization): Use constructor_name_p.
8839 * semantics.c (check_template_template_default_arg): New function.
8840
8841 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8842
8843 * pt.c (can_complete_type_without_circularity): Add static to
8844 function definition.
8845
8846 2002-07-08 Mark Mitchell <mark@codesourcery.com>
8847
8848 * cp-tree.h (have_extern_spec): Declare it
8849 * decl.c (have_extern_spec): Define it.
8850 (start_decl): Eliminate use of used_extern_spec.
8851 (start_function): Likewise.
8852 * parse.y (have_extern_spec): Remove declaration.
8853 (used_extern_spec): Likewise.
8854 (frob_specs): Eliminate use of used_extern_spec.
8855 (.hush_warning): Likewise.
8856
8857 2002-07-07 Mark Mitchell <mark@codesourcery.com>
8858
8859 * Make-lang.in (cp/parse.o): Depend on decl.h.
8860 * cp-tree.h (do_decl_instantiation): Change prototype.
8861 * parse.y: Include decl.h.
8862 (parse_decl_instantiation): New function.
8863 (explicit_instantiation): Use it.
8864 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8865 and DECLSPECS.
8866
8867 2002-07-07 Roger Sayle <roger@eyesopen.com>
8868
8869 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8870 constructor and destructor tests when passed a TEMPLATE_DECL.
8871
8872 2002-07-05 Jason Merrill <jason@redhat.com>
8873
8874 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8875 pointers.
8876
8877 PR optimization/7145
8878 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8879
8880 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
8881
8882 Repair damage on weak-impared targets caused by my previous patch.
8883 * cp-tree.h (import_export_tinfo): Add parameter.
8884 * decl2.c (import_export_tinfo): Add parameter, post adjust
8885 DECL_COMDAT.
8886 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8887 import_export_tinfo.
8888
8889 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8890
8891 PR c++/6944
8892 * init.c (build_aggr_init): Remove qualifiers of init before calling
8893 build_vec_init.
8894 (build_vec_init): Flatten multi-dimensional array during cleanup.
8895 (build_vec_delete_1): Abort if the type of each element is array.
8896
8897 2002-07-03 Graham Stott <graham.stott@btinternet.com>
8898
8899 * pt.c (instantiate_class_template): Fix typo.
8900
8901 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8902
8903 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8904 by CVS conflict in my last patch.
8905
8906 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8907
8908 PR c++/6716
8909 * pt.c (can_complete_type_without_circularity): New function.
8910 (instantiate_class_template): Use it.
8911 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8912 message due to incomplete fields.
8913
8914 2002-07-01 Mark Mitchell <mark@codesourcery.com>
8915
8916 PR c++/7112
8917 * mangle.c (write_expression): Add mangling for sizeof when
8918 applied to a type.
8919 * operators.def: Remove stale comment.
8920
8921 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
8922
8923 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8924 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8925 (tinfo_decl_type): Replace with ...
8926 (type_info_ptr_type): ... this.
8927 (import_export_tinfo): Declare.
8928 (tinfo_decl_p): Rename to ...
8929 (unemitted_tinfo_decl_p): ... this.
8930 * decl2.c (import_export_decl): Break out tinfo handling into ...
8931 (import_export_tinfo): ... here. New function.
8932 (finish_file): Adjust.
8933 * rtti.c (TINFO_REAL_NAME): New macro.
8934 (init_rtti_processing): Create the tinfo types.
8935 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8936 (get_tinfo_decl): Adjust.
8937 (get_tinfo_ptr): New function.
8938 (get_type_id): Use it.
8939 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8940 (ptr_initializer): Use get_tinfo_ptr.
8941 (ptm_initializer): Likewise.
8942 (synthesize_tinfo_var): Break into ...
8943 (get_pseudo_ti_init): ... this. Just create the initializer.
8944 (get_pseudo_ti_desc): .. and this.
8945 (create_real_tinfo_var): Remove.
8946 (create_pseudo_type_info): Don't create the vtable decl here.
8947 (get_vmi_pseudo_type_info): Remove.
8948 (create_tinfo_types): Adjust.
8949 (tinfo_decl_p): Rename to ...
8950 (unemitted_tinfo_decl_p): ... here. Adjust.
8951 (emit_tinfo_decl): Adjust. Create the initializer.
8952
8953 2002-06-27 Mark Mitchell <mark@codesourcery.com>
8954
8955 PR c++/6695
8956 * pt.c (tsubst_friend_class): Substitute into the context of the
8957 friend before using it.
8958
8959 2002-06-26 Mark Mitchell <mark@codesourcery.com>
8960
8961 * cp-tree.h (xref_tag): Change prototype.
8962 (handle_class_head): Likewise.
8963 (build_x_component_ref): Likewise.
8964 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8965 (xref_tag): Take attributes as a separate parameter.
8966 (xref_tag_from_type): Adjust call to xref_tag.
8967 * decl2.c (build_expr_from_tree): Adjust call to
8968 build_x_component_ref.
8969 (handle_class_head): Take attributes as a separate parameter.
8970 * parse.y (parse_xref_tag): New function.
8971 (parse_handle_class_head): Likewise.
8972 (primary): Use parse_xref_tag.
8973 (class_head_decl): Use parse_handle_class_head.
8974 (class_head_defn): Likewise.
8975 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8976 (build_dynamic_cast_1): Likewise.
8977 (create_pseudo_type_info): Likewise.
8978 (emit_support_tinfos): Likewise.
8979 * typeck.c (build_object_ref): Adjust call to
8980 build_x_component_ref.
8981 (build_x_component_ref): Remove protect parameter.
8982
8983 2002-06-25 Mark Mitchell <mark@codesourcery.com>
8984
8985 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8986 * class.c (handle_using_decl): Likewise.
8987 (instantiate_type): Likewise.
8988 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8989 (xref_basetypes): Change prototype.
8990 (begin_mem_initializers): New function.
8991 (get_overloaded_fn): Likewise.
8992 * decl.c (xref_basetypes): Simplify.
8993 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8994 * init.c (build_offset_ref): Likewise.
8995 * parse.y (base_init): Use begin_mem_initializers().
8996 (structsp): Adjust call to xref_basetypes.
8997 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8998 (instantiate_class_template): Adjust call to xref_basetypes.
8999 * semantics.c (begin_mem_initializers): New function.
9000 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
9001 (really_overloaded_fn): Likewise.
9002 (get_overloaded_fn): New function.'
9003 (get_first_fn): USe BASELINK_FUNCTIONS.
9004
9005 2002-06-24 Mark Mitchell <mark@codesourcery.com>
9006
9007 * cp-tree.h (SCALAR_TYPE_P): New macro.
9008 (check_for_out_of_scope_variable): New function.
9009 (at_class_scope_p): Likewise.
9010 (finish_fname): Likewise.
9011 * class.c (finish_struct): Use at_function_scope_p.
9012 * decl.c (check_for_out_of_scope_variable): New function, split
9013 out from do_identifier.
9014 (finish_enum): Use at_function_scope_p.
9015 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
9016 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
9017 (primary): Use at_function_scope_p.
9018 * search.c (at_class_scope_p): New function.
9019 * semantics.c (finish_fname): Likewise.
9020 (check_multiple_declarators): Use at_function_scope_p.
9021
9022 2002-06-23 Mark Mitchell <mark@codesourcery.com>
9023
9024 * parse.y (parse_scoped_id): New function.
9025 (primary): Use it.
9026 * cp-tree.h (do_scoped_id): Adjust declaration.
9027 * lex.c (do_scoped_id): Remove call to yylex.
9028 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
9029 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
9030 expanding it inline.
9031
9032 2002-06-23 Matt Thomas <matt@3am-software.com>
9033
9034 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
9035 "#if VMS_TARGET".
9036
9037 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9038
9039 * mangle.c (integer_type_codes): Const-ify.
9040
9041 2002-06-20 Richard Henderson <rth@redhat.com>
9042
9043 PR c++/6747
9044 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
9045 Call put_var_into_stack.
9046
9047 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9048
9049 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
9050 array size calculation.
9051
9052 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9053
9054 PR c++/6892
9055 * pt.c (tsubst_expr): Handle FILE_STMT.
9056
9057 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9058
9059 PR c++/6723
9060 * pt.c (lookup_template_class): Don't build complete argument of
9061 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
9062 argument.
9063
9064 2002-06-19 Akim Demaille <akim@epita.fr>
9065
9066 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
9067 decl.h's TYPENAME.
9068 * spew.c, lex.c: Adjust.
9069 * parse.y (explicit_instantiation): Add empty action to override
9070 the default $$ = $1 where it introduces a type clash.
9071
9072 2002-06-14 Jason Merrill <jason@redhat.com>
9073
9074 * semantics.c (begin_for_stmt): Push the 'for' scope before
9075 adding the FOR_STMT.
9076
9077 C++ ABI changes.
9078 * class.c (build_base_field): Set DECL_PACKED.
9079 (layout_class_type): Don't use tail padding of PODs.
9080 * mangle.c (write_unqualified_name): Fix template conversion op
9081 mangling.
9082
9083 2002-06-16 Richard Henderson <rth@redhat.com>
9084
9085 PR opt/6793
9086 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
9087 after template instantiation.
9088
9089 2002-06-16 Richard Henderson <rth@redhat.com>
9090
9091 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
9092
9093 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
9094
9095 * cp-tree.h (compiler_error): Remove declaration.
9096 * lex.c (compiler_error): Remove definition.
9097
9098 2002-06-14 Steve Ellcey <sje@cup.hp.com>
9099
9100 * g++spec.c (LIBUNWIND): New.
9101 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
9102
9103 2002-06-13 Jessica Han <jessica@cup.hp.com>
9104
9105 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
9106 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
9107 (build_vbase_offset_vtbl_entries): Likewise.
9108 * rtti.c (build_headof): Likewise.
9109 (get_tinfo_decl_dynamic): Likewise.
9110 (create_pseudo_type_info): Likewise.
9111
9112 2002-06-12 Stan Shebs <shebs@apple.com>
9113
9114 * mpw-config.in: Remove file, no longer used.
9115 * mpw-make.sed: Ditto.
9116
9117 2002-06-07 Zack Weinberg <zack@codesourcery.com>
9118
9119 * decl2.c: Update call to cpp_handle_option.
9120
9121 2002-06-07 H.J. Lu (hjl@gnu.org)
9122
9123 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
9124
9125 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
9126
9127 * error.c (cp_error_at): Fix typo.
9128
9129 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
9130
9131 * error.c (cp_diagnostic_starter): Adjust call.
9132 (maybe_print_instantiation_context): Change prototype to take a
9133 'diagnostic_info *'.
9134 (print_instantiation_full_context): Likewise.
9135 (print_instantiation_partial_context): Likewise.
9136 (cp_diagnostic_starter): Likewise.
9137 (cp_diagnostic_finalizer): Likewise.
9138 (cp_print_error_function): Likewise.
9139 (cp_printer): Take a secondary parameter as a 'text_info *'.
9140 Remove output_state savings. Adjust calls.
9141
9142 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9143
9144 * pt.c (inline_parm_levels): Mark for GC.
9145
9146 * mangle.c (start_mangling): Allocate G.substitutions here...
9147 (init_mangle): ... rather than here.
9148 (finish_mangling): Clear the varray pointer when done with it.
9149 * spew.c (yylexstring): Don't use VARRAY_FREE.
9150 * search.c (bfs_walk): Don't use VARRAY_FREE.
9151 * decl2.c (pending_statics): Use gengtype to mark.
9152 (deferred_fns): Likewise.
9153 (ssdf_decls): Likewise.
9154 (init_decl2): Delete.
9155 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
9156 (cxx_init_decl_processing): Don't call init_decl2.
9157 (cxx_pop_function_context): Don't use VARRAY_FREE.
9158 * cp-tree.h (struct saved_scope): No need for special marking
9159 of varrays.
9160 (struct language_function): Likewise.
9161 (local_classes): Use gengtype to mark.
9162 (init_decl2): Delete prototype.
9163 * class.c (init_class_processing): Don't use
9164 ggc_add_tree_varray_root.
9165 (build_vtbl_initializer): Don't use VARRAY_FREE.
9166
9167 * decl.c (typename_compare): Don't use same_type_p.
9168
9169 * decl.c: Include hashtab.h instead of hash.h.
9170 (typename_hash): Update to use htab_h.
9171 (typename_compare): Likewise.
9172 (typename_htab): Use gengtype to mark.
9173 (build_typename_type): Update to use htab_h.
9174 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9175
9176 * Make-lang.in (gt-cp-tree.h): New rule.
9177 (cp/tree.o): Depend on gt-cp-tree.h.
9178 * config-lang.in (gtfiles): Add cp/tree.c.
9179 * tree.c: Include gt-cp-tree.h.
9180 (list_hash_table): Use gengtype to mark.
9181 (init_tree): Use gengtype to mark trees.
9182
9183 * Make-lang.in (cp/decl.o): Add debug.h dependency.
9184 * call.c (struct z_candidate): Use gengtype.
9185 (USER_CONV_CAND): Use WRAPPER_ZC.
9186 (convert_class_to_reference): Use build_zc_wrapper.
9187 (build_type_conversion_1): Likewise.
9188 (build_over_call): Use WRAPPER_ZC.
9189 (add_warning): Use build_zc_wrapper.
9190 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9191 * cp-tree.h (struct lang_identifier): Use gengtype.
9192 (struct template_parm_index_s): Likewise.
9193 (struct ptrmem_cst): Likewise.
9194 (struct tree_binding): Likewise.
9195 (struct tree_overload): Likewise.
9196 (struct tree_srcloc): Likewise.
9197 (struct tree_wrapper): Likewise. Also modify to have a pointer
9198 to struct z_candidate rather than void.
9199 (enum cp_tree_node_structure_enum): New.
9200 (union lang_tree_node): New.
9201 (cxx_mark_tree): Delete prototype.
9202 (cp_tree_node_structure): New prototype.
9203 (build_ptr_wrapper): Delete prototype.
9204 (build_int_wrapper): Delete prototype.
9205 (build_zc_wrapper): New prototype.
9206 * decl.c: Include debug.h
9207 (cxx_mark_tree): Delete.
9208 (cp_tree_node_structure): New.
9209 * tree.c (build_ptr_wrapper): Delete.
9210 (build_int_wrapper): Delete.
9211 (build_zc_wrapper): New.
9212
9213 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9214 Correct typo. Patch from k_fukui@highway.ne.jp.
9215
9216 * semantics.c (current_stmt_tree): Update for change to
9217 struct language_function.
9218 (finish_mem_initializers): Likewise.
9219 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9220 * cp-tree.h (struct language_function): Rename from
9221 cp_language_function. Change all uses.
9222 (cp_function_chain): Don't need to cast.
9223
9224 * class.c (duplicate_tag_error): Reset discriminator.
9225 (check_bases_and_members): Update for data structure changes.
9226 * cp-tree.h (struct lang_id2): Use gengtype.
9227 (flagged_type_tree): Likewise.
9228 (SET_LANG_ID): Use GGC on struct lang_id2.
9229 (struct cp_language_function): Use gengtype. Remove field
9230 'x_vcalls_possible_p'.
9231 (current_vcalls_possible_p): Delete.
9232 (struct lang_type_header): New.
9233 (struct lang_type_class): Rename from struct lang_type. Include
9234 struct lang_type_header.
9235 (struct lang_type_ptrmem): New.
9236 (struct lang_type): New.
9237 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
9238 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
9239 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9240 (struct lang_decl_flags): Use gengtype. Add discriminators.
9241 (struct lang_decl): Use gengtype. Add and use discriminators.
9242 Update the macros that reference moved fields.
9243 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
9244 (SET_DECL_THUNK_P): Set discriminator too.
9245 (clear_inline_text_obstack): Delete prototype.
9246 (finish_inline_definitions): Delete prototype.
9247 (mark_pending_inlines): Delete prototype.
9248 (lang_check_failed): New prototype.
9249 * decl.c (struct named_label_use_list): Use gengtype.
9250 (struct named_label_list): Likewise.
9251 (mark_binding_level): Delete.
9252 (mark_named_label_lists): Delete.
9253 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9254 (cxx_init_decl_processing): Use generated marker routine.
9255 (begin_destructor_body): Delete dead set to
9256 current_vcalls_possible_p.
9257 (mark_lang_function): Delete.
9258 (mark_cp_function_context): Delete.
9259 (lang_mark_tree): Use generated marker routines.
9260 * decl2.c (start_objects): Set discriminator when setting
9261 GLOBAL_INIT_PRIORITY.
9262 * lex.c (retrofit_lang_decl): Set discriminators.
9263 (copy_lang_type): Update for changes to lang_type structure.
9264 (cp_make_lang_type): Set discriminator.
9265 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
9266 * search.c: Include ggc.h.
9267 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9268 (finish_inline_definitions): Delete.
9269 * spew.c (struct token): Use gengtype.
9270 (struct token_chunk): New.
9271 (struct unparsed_text): Use gengtype. Store tokens in chunks.
9272 (struct feed): Use gengtype.
9273 (feed_obstack): Delete.
9274 (feed): Mark as GC root.
9275 (pending_inlines): Mark as GC root.
9276 (pending_inlines_tail): Likewise.
9277 (processing_these_inlines): Likewise.
9278 (token_obstack): Make static.
9279 (first_token): Likewise.
9280 (init_spew): Don't initialize deleted things; use gengtype for roots.
9281 (clear_inline_text_obstack): Delete.
9282 (feed_input): Use GC for struct feed. Update for changes to
9283 struct unparsed_text.
9284 (mark_pending_inlines): Delete.
9285 (next_token): Rename from add_token. Change all callers. Update
9286 for changes to struct unparsed_text.
9287 (space_for_token): New.
9288 (remove_last_token): New.
9289 (alloc_unparsed_text): New.
9290 (snarf_block): Take an unparsed_text. Update for changes to struct
9291 unparsed_text.
9292 (snarf_method): Update for changes to struct unparsed_text.
9293 (snarf_defarg): Update for changes to struct unparsed_text.
9294 * tree.c (lang_check_failed): New.
9295
9296 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9297 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9298 (cp/spew.o): Add dependency on gt-<filename>.h.
9299 (cp/decl2.o): Add dependency on gt-<filename>.h.
9300 (cp/call.o): Add dependency on gt-<filename>.h.
9301 (cp/pt.o): Add dependency on gt-<filename>.h.
9302 (cp/repo.o): Add dependency on gt-<filename>.h.
9303 (cp/parse.o): Add dependency on gt-<filename>.h.
9304 * call.c: Use gengtype for roots.
9305 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9306 decl2.c parse.y pt.c repo.c spew.c.
9307 * cp-tree.h: Use gengtype for roots.
9308 (struct saved_scope): Use GGC, gengtype.
9309 (cp_parse_init): Delete prototype.
9310 (init_pt): Delete prototype.
9311 * decl.c: Use gengtype for roots.
9312 (mark_saved_scope): Delete.
9313 (cxx_init_decl_processing): Don't call deleted initilisation
9314 routines.
9315 (signed_size_zero_node): Delete, unused.
9316 * decl.h: Use gengtype for roots.
9317 * decl2.c: Use gengtype for roots.
9318 * lex.h: Use gengtype for roots.
9319 * parse.y: Use gengtype for roots.
9320 (cp_parse_init): Delete.
9321 * pt.c: Use gengtype for roots.
9322 (init_pt): Delete.
9323 * repo.c: Use gengtype for roots.
9324 * spew.c: Use gengtype for roots.
9325
9326 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
9327 (cp/decl.o): Add dependency on gtype-cp.h.
9328 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9329 Include gtype-cp.h. Allow for filename changes.
9330
9331 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9332 (cp/decl.o): Add cp/gt-decl.h dependency.
9333 * config-lang.in (gtfiles): New.
9334 * tree.h: Rename struct binding_level to struct cp_binding_level.
9335 * decl.c: Rename struct binding_level to struct cp_binding_level.
9336 Include cp/gt-decl.h.
9337 (struct cp_binding_level): Use gengtype.
9338 (make_binding_level): Use GGC on struct cp_binding_level.
9339 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9340 (cxx_init_decl_processing): Mark free_binding_level as
9341 deletable.
9342
9343 * decl.c (mark_cp_function_context): Update calling sequence.
9344
9345 * decl.c (start_function): Don't free 'struct
9346 cp_language_function'.
9347 (pop_cp_function_context): Likewise.
9348 (save_function_data): Allocate it using GC.
9349 * semantics.c (genrtl_start_function): Don't free 'struct
9350 cp_language_function'.
9351
9352 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
9353
9354 * lang-specs.h: Use cpp_debug_options.
9355
9356 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9357
9358 * mangle.c, tree.c: Include real.h.
9359 * Make-lang.in: Update dependency lists.
9360
9361 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
9362
9363 * lex.c: Don't include c-lex.h.
9364 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9365
9366 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
9367
9368 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9369
9370 2002-05-22 Richard Henderson <rth@redhat.com>
9371
9372 * decl.c (obscure_complex_init): Check for VAR_DECL
9373 before using DECL_THREAD_LOCAL.
9374
9375 2002-05-22 Richard Henderson <rth@redhat.com>
9376
9377 * decl.c (check_tag_decl): Handle RID_THREAD.
9378 (obscure_complex_init): Reject run-time init of tls.
9379 (grokvardecl, grokdeclarator): Handle RID_THREAD.
9380 * lex.c (reswords): Add __thread.
9381 (rid_to_yy): Map RID_THREAD to SCSPEC.
9382
9383 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
9384
9385 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9386 * cp-tree.h (cxx_post_options): Kill.
9387 * cp-lex.c (cxx_post_options): Kill.
9388
9389 2002-05-21 Richard Henderson <rth@redhat.com>
9390
9391 * lex.c (rid_to_yy): Add RID_THREAD.
9392
9393 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
9394
9395 * init.c (build_vec_init): Test for trivial copy-assignment when
9396 copy-assigning arrays.
9397
9398 2002-05-20 Andreas Jaeger <aj@suse.de>
9399
9400 * init.c (build_default_init): Remove unused variable.
9401
9402 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
9403
9404 * call.c (any_strictly_viable): New.
9405 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9406
9407 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9408
9409 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9410
9411 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9412
9413 PR c++/186, DR 259
9414 * pt.c (do_decl_instantiation): Don't complain explicit
9415 instantiation after explicit specialization.
9416 (do_type_instantiation): Likewise.
9417
9418 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
9419
9420 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9421 renamed from...
9422 (complete_type_or_else): ... this. Redefined as macro.
9423 (cxx_incomplete_type_diagnostic): Declare.
9424 (cxx_incomplete_type_error): Define as macro.
9425 * init.c (build_delete): Warn about incomplete types other than
9426 void, and use the built-in operator delete for them.
9427 * typeck.c (complete_type_or_diagnostic): Renamed from
9428 complete_type_or_else. Added warn_only argument, passed to...
9429 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
9430 warnings or errors depending on new warn_only argument. Renamed
9431 from...
9432 (cxx_incomplete_type_error): ... this. New implementation in
9433 terms of cxx_incomplete_type_diagnostic.
9434
9435 2002-05-18 Jason Merrill <jason@redhat.com>
9436
9437 PR c++/6611
9438 * decl2.c (import_export_decl): If we clear
9439 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9440
9441 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9442
9443 PR c++/6620
9444 * pt.c (verify_class_unification): Don't check if PARM is template
9445 parameter dependent. Simplify.
9446 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9447 parameter dependent expression.
9448
9449 2002-05-14 Jason Merrill <jason@redhat.com>
9450
9451 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9452 Do set DECL_COMDAT.
9453 (synthesize_tinfo_var): Take the public decl.
9454 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
9455 (emit_tinfo_decl): Adjust. Call import_export_decl.
9456 * decl2.c (import_export_decl): Simplify tinfo decl handling.
9457
9458 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
9459
9460 * cp-tree.h (struct lang_type): Added non_zero_init.
9461 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9462 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9463 * class.c (check_field_decls): Test non_zero_init.
9464 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9465 zero-to-NULL conversions.
9466 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9467 type that needs zero-initialization without zeros.
9468 (check_initializer_decl): Compute zero-initializer for types
9469 that require a non-trivial one.
9470 * init.c (build_forced_zero_init): New function.
9471 (build_default_init): Use it.
9472 * tree.c (zero_init_p): New function.
9473 * typeck2.c (force_store_init_value): New function.
9474 (process_init_constructor): Create non-trivial zero-initializers
9475 for array members and class fields.
9476
9477 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
9478
9479 * lang-specs.h: Remove redundant -lang-c++.
9480
9481 2002-05-13 Jason Merrill <jason@redhat.com>
9482
9483 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9484 (fixed_type_or_null): See through reference vars.
9485 (build_base_path): Vtable contents are constant.
9486 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9487
9488 2002-05-12 Jason Merrill <jason@redhat.com>
9489
9490 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9491 structs are safe.
9492
9493 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
9494
9495 * cp-tree.h (flag_ansi): Remove.
9496 * decl2.c (flag_ansi): Remove.
9497 (cxx_decode_option): Set flag_iso and flag_undef.
9498
9499 2002-05-09 Jason Merrill <jason@redhat.com>
9500
9501 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9502 Use subtraction rather than a bitmask to get the index.
9503 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9504
9505 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9506
9507 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
9508
9509 * Make-lang.in (decl2.o): Update.
9510 * cp-tree.h (warn_multichar): Remove.
9511 * decl2.c: Include c-common.h.
9512 (warn_multichar): Remove.
9513
9514 2002-05-03 Jason Merrill <jason@redhat.com>
9515
9516 * tree.c (build_cplus_array_type): Only const and volatile get
9517 special handling.
9518
9519 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9520
9521 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9522
9523 ABI change, returning simple classes from functions.
9524 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9525 TYPE_HAS_TRIVIAL_INIT_REF is false or
9526 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9527
9528 2002-04-30 Jason Merrill <jason@redhat.com>
9529
9530 PR debug/6436
9531 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9532 anonymous class with a typedef if there are attributes.
9533
9534 2002-04-29 Paul Eggert <eggert@twinsun.com>
9535
9536 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9537
9538 2002-04-29 Jakub Jelinek <jakub@redhat.com>
9539
9540 PR c++/6477
9541 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9542 non-NULL first.
9543
9544 2002-04-29 Mark Mitchell <mark@codesourcery.com>
9545
9546 PR c++/6492
9547 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9548 enter that scope before name lookup.
9549
9550 PR c++/6486
9551 * method.c (do_build_copy_constructor): Avoid building
9552 cv-qualified reference types.
9553
9554 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
9555
9556 PR c++/5719
9557 * decl.c (grok_op_properties): Assignment ops don't have to return
9558 by value. operator% should.
9559
9560 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
9561
9562 PR c/6343
9563 * decl.c (duplicate_decls): Call merge_weak.
9564
9565 2002-04-26 Richard Henderson <rth@redhat.com>
9566
9567 * parse.y (malloced_yyss, malloced_yyvs): New.
9568 (yyoverflow): Re-add. Set them.
9569 (free_parser_stacks): New.
9570
9571 2002-04-26 Mark Mitchell <mark@codesourcery.com>
9572
9573 PR c++/6497
9574 * method.c (do_build_assign_ref): Pass a derivation to
9575 build_method_call when calling base class assignment operators.
9576
9577 2002-04-26 Richard Henderson <rth@redhat.com>
9578
9579 * parse.y (yyoverflow): Revert.
9580
9581 2002-04-26 Richard Henderson <rth@redhat.com>
9582
9583 PR c/3581
9584 * parse.y (string): Remove. Update all uses to use STRING
9585 instead, and not call combine_strings.
9586 * rtti.c (tinfo_name): Use fix_string_type.
9587 * semantics.c (finish_asm_stmt): Don't call combine_strings.
9588 * spew.c (yylexstring): New.
9589 (read_token): Use it.
9590
9591 2002-04-25 Richard Henderson <rth@redhat.com>
9592
9593 PR c/2161
9594 * parse.y (yyoverflow): New.
9595
9596 2002-04-25 Jason Merrill <jason@redhat.com>
9597
9598 PR c++/5607
9599 * search.c (check_final_overrider): No longer static.
9600 * class.c (update_vtable_entry_for_fn): Call it.
9601 * cp-tree.h: Adjust.
9602
9603 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9604
9605 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9606 * cp-tree.h (cxx_set_yydebug): Die.
9607 * lex.c (YYDEBUG): Get from c-lex.h.
9608 (cxx_set_yydebug): Remove.
9609 * parse.y: Include c-lex.h.
9610 (YYDEBUG): Get from c-lex.h.
9611
9612 2002-04-24 Mark Mitchell <mark@codesourcery.com>
9613
9614 PR c++/6438.
9615 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9616 void.
9617
9618 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
9619
9620 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9621 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9622 Redefine.
9623 * cp-tree.h (cp_attribute_table): Rename.
9624 * decl.c (lang_attribute_table): Remove declaration.
9625 (cxx_init_decl_processing): Don't set it.
9626 * tree.c (cp_attribute_table): Rename.
9627
9628 2002-04-24 Jason Merrill <jason@redhat.com>
9629
9630 PR c++/6331
9631 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9632 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9633 The pedwarn for array assignment is now unconditional.
9634 * tree.c (build_cplus_array_type_1): Still process simple array types
9635 normally in templates.
9636
9637 PR c++/6395
9638 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9639 stuff for comdats.
9640
9641 2002-04-23 Jakub Jelinek <jakub@redhat.com>
9642
9643 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9644 node with attributes.
9645
9646 2002-2-23 David O'Brien <obrien@FreeBSD.org>
9647
9648 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9649 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9650
9651 2002-04-23 Mark Mitchell <mark@codesourcery.com>
9652
9653 PR c++/6256:
9654 * pt.c (tsubst_friend_class): Handle templates with explicit
9655 nested names.
9656
9657 PR c++/6331:
9658 * typeck.c (merge_types): Remember the cv-qualification of pointer
9659 types when merging them.
9660
9661 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
9662
9663 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9664 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9665 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9666 cxx_mark_function_context): New.
9667 * decl.c (push_cp_function_context, pop_cp_function_context,
9668 mark_cp_function_context): Rename for consistency.
9669 (cxx_init_decl_processing): Don't set old hooks.
9670
9671 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
9672
9673 * call.c (convert_type_from_ellipsis): Rename, update.
9674 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9675 * cp-tree.h (convert_type_from_ellipsis): Rename.
9676 * decl.c (cxx_init_decl_processing): Don't set hook.
9677
9678 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9679
9680 * call.c (build_new_method_call): Update.
9681 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9682 * cp-tree.h (cxx_incomplete_type_error): New.
9683 * decl.c (grokdeclarator, grokparms): Update.
9684 * decl2.c (check_classfn): Update.
9685 * pt.c (tsubst): Update.
9686 * typeck.c (complete_type_or_else, expr_sizeof,
9687 decay_conversion): Update.
9688 * typeck2.c (incomplete_type_error): Rename.
9689 (add_exception_specifier): Update.
9690
9691 2002-04-18 Jason Merrill <jason@redhat.com>
9692
9693 PR c++/5658
9694 * search.c (setup_class_bindings): A class template qualifies as a
9695 type binding.
9696
9697 2002-04-17 Jakub Jelinek <jakub@redhat.com>
9698
9699 PR c++/6316
9700 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9701 before expanding.
9702
9703 2002-04-16 Mark Mitchell <mark@codesourcery.com>
9704
9705 * init.c (begin_init_stmts): Remove commented out code.
9706 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9707 * semantics.c (begin_gobal_stmt_expr): Adjust call to
9708 expand_start_stmt_expr.
9709
9710 2002-04-15 Mark Mitchell <mark@codesourcery.com>
9711
9712 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9713 dso_handle itself, to __cxa_atexit.
9714
9715 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9716
9717 * error.c (cxx_print_error_function): Adjust call to macros.
9718
9719 2002-04-14 Jakub Jelinek <jakub@redhat.com>
9720
9721 * class.c (layout_virtual_bases): Do all dsize computation on trees.
9722
9723 2002-04-14 Jason Merrill <jason@redhat.com>
9724
9725 * typeck.c (get_member_function_from_ptrfunc): Don't do
9726 gratuitious division and multiplication on
9727 ptrmemfunc_vbit_in_delta targets.
9728
9729 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9730
9731 PR c++/5373.
9732 * semantics.c (finish_expr_stmt): Remember the type of the
9733 expression before any conversions are performed.
9734
9735 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9736
9737 PR c++/5189.
9738 * call.c (add_template_candidate_real): Do not treat member
9739 templates as copy constructors.
9740
9741 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9742
9743 * decl.c (duplicate_decls): Do not copy the RTL for a variable
9744 declaration if the old variable had an incomplete type and the new
9745 variable does not.
9746 (complete_vars): Do not call layout_decl for completed variables.
9747
9748 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
9749
9750 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9751 with an explicit one.
9752 (follow_tag_typedef): New.
9753 (lookup_tag): Use it to extract the tag of an explicit typedef.
9754 (xref_tag): Likewise.
9755
9756 2002-04-11 Andrew Haley <aph@redhat.com>
9757
9758 * typeck.c (type_after_usual_arithmetic_conversions):
9759 If two types have the same variant, return immediately.
9760 When two floating-point operands are the same precision:
9761 convert to float if one of the operands is float;
9762 if neither operand is one of the standard types, return the type
9763 of the first operand.
9764
9765 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
9766
9767 PR c++/5507
9768 * decl.c (make_typename_type): Remove implicit typenameness.
9769
9770 2002-04-09 Jason Merrill <jason@redhat.com>
9771
9772 PR optimization/6189
9773 * semantics.c (genrtl_start_function): Don't free
9774 DECL_SAVED_FUNCTION_DATA for inline functions.
9775
9776 * init.c (build_member_call): For now, don't convert to
9777 intermediate base if it would cause an error.
9778
9779 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
9780
9781 * parse.y (namespace_qualifier, maybe_identifier,
9782 begin_explicit_instantiation, end_explicit_instantiation,
9783 apparent_template_type, .finish_template_type,
9784 do_id, maybe_init, defarg_again, component_decl_1):
9785 Add ending ';', in accordance with POSIX.
9786
9787 2002-04-06 Mark Mitchell <mark@codesourcery.com>
9788
9789 PR c++/5571
9790 * class.c (layout_class_type): Remember incomplete static
9791 variables.
9792 (finish_struct_1): Call complete_vars, not
9793 hack_incomplete_structures.
9794 * cp-tree.h (hack_incomplete_structures): Rename to ...
9795 (complete_vars): ... this.
9796 (struct saved_scope): Remove incomplete.
9797 (namespace_scope_incomplete): Remove.
9798 * decl.c (struct binding_level): Remove incomplete.
9799 (incomplete_vars): New variable.
9800 (mark_binding_level): Don't mark incomplete.
9801 (print_binding_level): Don't print it.
9802 (mark_saved_scope): Don't mark incomplete.
9803 (pushdecl): Use maybe_register_incopmlete_var.
9804 (cxx_init_decl_processing): Register incomplete_vars for GC.
9805 (start_decl_1): Clarify error message.
9806 (hack_incomplete_vars): Remove.
9807 (maybe_register_incomplete_var): New function.
9808 (complete_vars): Likewise.
9809
9810 2002-04-06 Jason Merrill <jason@redhat.com>
9811
9812 PR c++/4934
9813 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9814 set before checking it.
9815
9816 PR c++/525
9817 * init.c (build_member_call): Use build_scoped_ref.
9818 (resolve_offset_ref): Likewise.
9819 * call.c (build_scoped_method_call): Likewise.
9820 * tree.c (maybe_dummy_object): Kludge around current_class_type being
9821 wrong.
9822 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9823 * cp-tree.h: Adjust.
9824
9825 * init.c (push_base_cleanups): Just use build_scoped_method_call.
9826
9827 PR c++/6179
9828 * method.c (implicitly_declare_fn): Pass unqualified type to
9829 synthesize_exception_spec.
9830
9831 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9832
9833 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9834 * cvt.c: Update comment.
9835 * init.c (expand_cleanup_for_base): Update.
9836 * semantics.c (finish_parenthesized_expr): Update.
9837 * typeck.c (cp_truthvalue_conversion): Update.
9838
9839 2002-04-04 Jason Merrill <jason@redhat.com>
9840
9841 * semantics.c (finish_eh_cleanup): New fn.
9842 * cp-tree.h: Add prototype.
9843 * init.c (perform_member_init, expand_cleanup_for_base): Use
9844 finish_eh_cleanup.
9845 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9846 * cp-tree.h: Remove references.
9847 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9848 * dump.c (cp_dump_tree): Likewise.
9849 * pt.c (tsubst_expr): Likewise.
9850 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9851 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9852 * tree.c (cp_statement_code_p): Likewise.
9853
9854 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9855
9856 PR c++/5636
9857 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9858 cleanup for nrv.
9859
9860 PR c++/5104
9861 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9862 specifiers.
9863 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9864
9865 2002-04-03 Richard Henderson <rth@redhat.com>
9866
9867 * cp-lang.c (cxx_warn_unused_global_decl): New.
9868 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9869
9870 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
9871
9872 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9873 * tree.c (init_tree): Don't set hook.
9874
9875 2002-04-03 Roger Sayle <roger@eyesopen.com>
9876
9877 PR c++/5998:
9878 * decl.c (duplicate_decls): Don't mess with assembler names when
9879 redeclaring builtin functions as static.
9880
9881 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9882
9883 * call.c (build_addr_func): Update.
9884 * class.c (resolve_address_of_overloaded_function): Update.
9885 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9886 * cp-tree.h (cxx_mark_addressable): New.
9887 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9888 * decl2.c (build_cleanup): Update.
9889 * except.c (build_throw): Update.
9890 * init.c (resolve_offset_ref): Update.
9891 * pt.c (convert_nontype_argument): Update.
9892 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9893 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9894 unary_complex_lvalue): Update.
9895 (mark_addressable): Rename.
9896
9897 2002-04-01 Roger Sayle <roger@eyesopen.com>
9898
9899 PR c++/5998:
9900 * decl.c (duplicate_decls): Overwrite the RTL when (and only
9901 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
9902 but follow the SET_DECL_RTL idiom used elsewhere in the function.
9903
9904 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9905
9906 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9907 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9908 * decl.c (grokdeclarator): Update.
9909 * mangle.c (write_integer_cst): Update.
9910 * typeck.c (build_binary_op): Update.
9911
9912 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9913
9914 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9915 * lex.c (cxx_init): Don't set hook.
9916
9917 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9918
9919 * Make-lang.in (error.o): Update.
9920 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9921 * cp-tree.h (struct diagnostic_context): Predeclare.
9922 (cxx_print_error_function): New.
9923 * error.c: Include langhooks-def.h.
9924 (lang_print_error_function): Rename. Update.
9925 (init_error): Don't set hook.
9926
9927 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9928
9929 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9930 Redefine.
9931 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9932 * decl.c (finish_enum): Similarly.
9933 * error.c (dump_type): Similarly.
9934 * lex.c (cxx_init): Similarly.
9935 * mangle.c (write_builtin_type): Similarly.
9936 * typeck.c (comptypes): Similarly.
9937
9938 2002-03-28 Roger Sayle <roger@eyesopen.com>
9939
9940 PR c++/5998:
9941 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9942 in the g++ front-end.
9943 (duplicate_decl): Allow redefinition of anticipated built-ins.
9944 Fix inlining problem by over-writing the old DECL_RTL.
9945 (lookup_namespace_name): Fail to find an identifier in the
9946 specified namespace if its still anticipated.
9947 (builtin_function_1): New function split out from builtin_function
9948 to create a builtin in the current namespace with given context.
9949 (builtin_function): Call builtin_function_1 to define the
9950 appropriate builtins in both the std and global namespaces.
9951 (select_decl): Don't test for anticipated decls here.
9952 (unqualified_namespace_lookup): Instead ignore them whilst
9953 searching through scopes and namespaces.
9954 * decl2.c (do_nonmember_using_decl): If a using declaration
9955 specifies an anticipated built-in function, mark it as no longer
9956 anticipated in that scope.
9957 (ambiguous_decl): Avoid resolving to an anticipated decl.
9958 * lex.c (do_scoped_id): Fail to find an identifier in the global
9959 namespace if its still anticipated.
9960
9961 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9962
9963 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9964 * cp-tree.h (cp_make_lang_type): Rename.
9965 * lex.c (cp_make_lang_type): Rename.
9966 (make_aggr_type): Update.
9967 * tree.c (init_tree): Don't set make_lang_type_fn.
9968
9969 2002-03-29 Jakub Jelinek <jakub@redhat.com>
9970
9971 PR c++/6073
9972 * class.c (finish_struct_1): Update static field's DECL_MODE even
9973 if its type is a variant of t.
9974
9975 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9976
9977 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9978 * cp-tree.h (cxx_insert_default_attributes): New.
9979 * decl.c (insert_default_attributes): Rename.
9980
9981 2002-03-27 Mark Mitchell <mark@codesourcery.com>
9982
9983 PR c++/4884
9984 * call.c (build_op_delete_call): Allow for the fact the placement
9985 may be a COMPOUND_EXPR.
9986
9987 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9988
9989 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9990 * cp-tree.h (init_cplus_expand): Remove.
9991 (cxx_expand_expr): New.
9992 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9993 fix prototype.
9994 (init_cplus_expand): Remove.
9995 * lex.c (cxx_init): Don't call init_cplus_expand.
9996
9997 2002-03-26 Mark Mitchell <mark@codesourcery.com>
9998
9999 PR c++/4884.
10000 * init.c (build_new_1): Allow for the fact the result of
10001 build_function_call may be a COMPOUND_EXPR.
10002
10003 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
10004
10005 PR c++/5682
10006 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
10007 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
10008 (dfs_skip_nonprimary_vbases_markedp): Remove.
10009 * search.c (get_shared_vbase_if_not_primary): Remove.
10010 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
10011 (dfs_skip_nonprimary_vbases_markedp): Remove.
10012 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
10013 (dfs_marked_real_bases_queue_p): Likewise.
10014
10015 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
10016
10017 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
10018 * cp-tree.h (cxx_mark_tree): New.
10019 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
10020
10021 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
10022
10023 * cp-tree.h (cxx_maybe_build_cleanup): New.
10024 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
10025 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
10026 * tree.c (build_target_expr): Update.
10027 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
10028
10029 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
10030
10031 * decl2.c (cxx_decode_option): Handle -E.
10032 * lang-specs.h (default_compilers): Preprocess with cc1plus.
10033 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
10034
10035 2002-03-23 Jakub Jelinek <jakub@redhat.com>
10036
10037 PR c++/6037
10038 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
10039
10040 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10041
10042 * error.c (dump_type): Be careful about implicit typenames.
10043
10044 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10045
10046 PR C++/3656
10047 * semantics.c (finish_base_specifier): Handle erronous base
10048 classes.
10049
10050 2002-03-22 Zack Weinberg <zack@codesourcery.com>
10051
10052 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
10053 REAL_IS_NOT_DOUBLE.
10054
10055 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
10056
10057 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
10058 an index into the vtable_entry array regardless of
10059 TARGET_PTRMEMFUNC_VBIT_LOCATION.
10060
10061 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
10062
10063 * tree.c (cp_cannot_inline_tree_fn): Same.
10064
10065 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
10066
10067 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
10068 insert_block, getdecls, global_bindings_p): New.
10069
10070 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
10071
10072 PR c++/4361
10073 * mangle.c (struct globals) Add internal_mangling_p member.
10074 (write_template_param): Do internal mangling, if needed.
10075 (mangle_conv_op_name_for_type): Request internal mangling.
10076
10077 2002-03-20 Jason Merrill <jason@redhat.com>
10078
10079 PR c++/2136
10080 * init.c (build_delete): Check access for a member op delete here.
10081 * decl2.c (delete_sanity): Not here.
10082
10083 2002-03-19 Jason Merrill <jason@redhat.com>
10084
10085 PR c++/5118
10086 * class.c (get_vfield_name): Use the constructor_name.
10087
10088 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
10089
10090 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
10091 * cp-tree.h (lang_printable_name): Rename.
10092 * error.c (lang_decl_name): Use new hook.
10093 * lex.c (cxx_init): Remove old hook.
10094 * pt.c (tsubst_decl): Use new hook.
10095 * tree.c (lang_printable_name): Rename.
10096
10097 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
10098
10099 PR c++/3882
10100 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
10101 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
10102 only after recording the declaration.
10103
10104 2002-03-18 Jason Merrill <jason@redhat.com>
10105
10106 PR c++/2039
10107 * init.c (resolve_offset_ref): Hand off to build_component_ref.
10108
10109 PR c++/4222, c++/5995
10110 * call.c (build_over_call): Fix empty class logic.
10111
10112 PR c++/3870
10113 * cp-tree.h (struct saved_scope): Add last_parms field.
10114 * decl.c (maybe_push_to_top_level): Save last_function_parms.
10115 (pop_from_top_level): Restore it.
10116
10117 PR c++/4377
10118 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
10119 NON_LVALUE_EXPRs.
10120
10121 PR c++/4003
10122 * pt.c (tsubst_friend_function): Use decl_namespace_context.
10123
10124 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
10125 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
10126 type with a nontrivial destructor.
10127
10128 2002-03-17 Jason Merrill <jason@redhat.com>
10129
10130 PR c++/4460
10131 * class.c (build_base_path): Virtual base layout is fixed in
10132 in-charge [cd]tors.
10133
10134 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
10135
10136 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
10137 * parse.y (yyparse): Remove macro.
10138
10139 2002-03-17 Jason Merrill <jason@redhat.com>
10140
10141 PR c++/5757
10142 * init.c (build_new_1): Pass the right pointer to op delete.
10143
10144 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
10145
10146 PR c++/4361
10147 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
10148 conversion operators go.
10149 (struct lang_decl_flags): Add template_conv_p and unused
10150 bitfields.
10151 (DECL_TEMPLATE_CONV_FN_P): New macro.
10152 * call.c (build_user_type_conversion_1): Don't check second type
10153 conversion of overload set first.
10154 * class.c (add_method): Make sure templated conversion operators
10155 all end up on slot 2.
10156 * lex.c (do_identifier): A conversion operator token might be
10157 satisfied by a templated conversion operator.
10158 * pt.c (check_explicit_specialization): Use
10159 CLASSTYPE_FIRST_CONVERSION_SLOT.
10160 (template_parm_this_level_p): New function.
10161 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
10162 * search.c (lookup_fnfields_1): Template conversions will be on
10163 the first slot.
10164 * typeck.c (build_component_ref): Preserve the type of an
10165 conversion operator name on the overload type.
10166 (build_x_function_call): Retrieve the conversion operator name.
10167
10168 2002-03-15 Richard Henderson <rth@redhat.com>
10169
10170 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10171
10172 2002-03-15 Mark Mitchell <mark@codesourcery.com>
10173
10174 * cp-tree.h (CLEANUP_DECL): Remove.
10175 (CLEANUP_EXPR): Likewise.
10176 * decl.c (destroy_local_var): Simplify.
10177 (maybe_build_cleanup): Tidy.
10178 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10179 * semantics.c (cp_expand_stmt): Likewise.
10180 * cp/tree.c (cp_statement_code_p): Likewise.
10181
10182 2002-03-15 Jason Merrill <jason@redhat.com>
10183
10184 PR c++/5857
10185 * decl.c (duplicate_decls): Use merge_types instead of common_type.
10186 * typeck.c (common_type): Just hand off to
10187 type_after_usual_arithmetic_conversions and
10188 composite_pointer_type.
10189 (merge_types): New fn.
10190 (commonparms): Use it instead of common_type.
10191 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10192 (composite_pointer_type): Also handle attributes.
10193 * cp-tree.h: Declare merge_types.
10194
10195 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10196 variables.
10197 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10198
10199 2002-03-14 Richard Henderson <rth@redhat.com>
10200
10201 * decl.c: Include c-pragma.h.
10202 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10203 * Make-lang.in: Update dependencies.
10204
10205 2002-03-14 Jakub Jelinek <jakub@redhat.com>
10206
10207 PR c++/5908
10208 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10209 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10210
10211 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10212
10213 * mangle.c (write_builtin_type): Handle 128-bit integers even if
10214 they are not a standard integer type.
10215
10216 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10217
10218 * cp-tree.h (init_init_processing): Remove declaration.
10219 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10220 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10221
10222 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10223
10224 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10225 Define.
10226 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10227 tree_code_length.
10228 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10229 cplus_tree_code_name): Delete.
10230 (cxx_init): Don't call add_c_tree_codes, instead set
10231 lang_unsafe_for_reeval. Don't try to copy into the various
10232 tree_code arrays.
10233
10234 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
10235
10236 PR c++/5659
10237 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10238 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10239 definitions.
10240
10241 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10242
10243 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
10244 DR209 is now not a defect.
10245 * cp-tree.h (skip_type_access_control): Remove.
10246 * decl.c (grokdeclarator): Do type access control for friend
10247 declarations.
10248 * semantics.c (decl_type_access_control): Don't reset
10249 current_type_lookups.
10250 (save_type_access_control): Always save the lookups.
10251 (skip_type_access_control): Remove.
10252 (finish_class_definition): Don't change type_lookups.
10253
10254 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10255
10256 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
10257 It is incorrect.
10258 * typeck.c (build_static_cast): Compare non-qualified types
10259 with pointer to member conversions.
10260
10261 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
10262 Daniel Berlin <dan@dberlin.org>
10263
10264 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10265 (cxx_get_alias_set): Use it.
10266
10267 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10268
10269 * cp-tree.h (stabilize_expr): Prototype.
10270
10271 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
10272
10273 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10274 conditional return void.
10275
10276 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
10277
10278 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10279 * cp-tree.h (cxx_unsave): New.
10280 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10281 (init_tree): Update.
10282
10283 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10284
10285 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10286 explicit sizeof/sizeof.
10287 * decl2.c (cxx_decode_option): Likewise.
10288 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10289
10290 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
10291
10292 PR c++/775
10293 * decl.c (lookup_tag): Only reject enum/class mismatch, not
10294 class/union mismatch.
10295 * parse.y (check_class_key): New function.
10296 (structsp): Call it.
10297
10298 2002-03-01 Michael Matz <matz@suse.de>
10299
10300 * typeck.c (cp_pointer_int_sum): Complete inner type which is
10301 used later by size_in_bytes().
10302
10303 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
10304
10305 * cp-tree.h: Require __GNUC__ to be #defined.
10306 (build_init): Add missing prototype.
10307
10308 2002-03-01 Jason Merrill <jason@redhat.com>
10309
10310 * except.c: Don't include decl.h or obstack.h. Do include
10311 tree-inline.h.
10312 (build_throw): Destroy temporaries from the thrown
10313 expression before calling __cxa_throw. Construct a thrown
10314 temporary directly into the exception object.
10315 (stabilize_throw_expr): New function.
10316 (wrap_cleanups_r): New function.
10317 * tree.c (stabilize_expr): New function.
10318 * init.c (build_init): New function.
10319 * Make-lang.in (cp/except.o): Adjust .h deps.
10320
10321 2002-02-28 Jason Merrill <jason@redhat.com>
10322
10323 * search.c (lookup_base_r): Don't clear is_non_public just because
10324 we found a friendly scope.
10325
10326 * decl.c (finish_function): Only warn about missing return
10327 statement with -Wreturn-type.
10328
10329 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
10330
10331 * class.c (build_clone): Update.
10332 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10333 * cp-tree.h (cxx_dup_lang_specific_decl): New.
10334 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10335 (copy_decl): Update.
10336 * method.c (make_thunk): Update.
10337
10338 2002-02-27 Zack Weinberg <zack@codesourcery.com>
10339
10340 * decl2.c: Delete traditional-mode-related code copied from
10341 the C front end but not used, or used only to permit the
10342 compiler to link.
10343
10344 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
10345
10346 PR c++/4093
10347 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10348 to void.
10349
10350 2002-02-22 Jakub Jelinek <jakub@redhat.com>
10351
10352 PR other/5746
10353 * semantics.c (finish_switch_cond): Don't call get_unwidened
10354 if error_mark_node.
10355
10356 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
10357
10358 PR c++/2645, DR 295
10359 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10360 tf_keep_type_decl.
10361 (make_typename_type): Use tsubst_flags_t.
10362 * decl.c (make_typename_type): Adjust. Return non-artificial
10363 TYPE_DECLs, if required.
10364 (grokdeclarator): Simplify CVR qualification handling. Allow bad
10365 qualifiers on typedef types.
10366 * decl2.c (handle_class_head): Adjust make_typename_type call.
10367 * parse.y (nested_name_specifier): Likewise.
10368 (typename_sub0): Likewise.
10369 (typename_sub1): Likewise.
10370 * pt.c (convert_template_argument): Adjust make_typename_type
10371 return value.
10372 (tsubst): Adjust cp_build_qualified_type_real calls.
10373 (check_cv_quals_for_unify): Cope with allowing bad qualifications
10374 on template type parms.
10375 (instantiate_decl): Recheck substitutions to give warnings on bad
10376 qualifications.
10377 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10378
10379 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
10380
10381 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10382
10383 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10384 unless DECL_ALWAYS_INLINE.
10385
10386 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10387
10388 * typeck.c (cp_pointer_int_sum): Renamed from
10389 pointer_int_sum, call pointer_int_sum.
10390
10391 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10392
10393 * decl.c (duplicate_decls): Return 0 if issued error about
10394 redeclaration.
10395
10396 2002-02-19 Jason Merrill <jason@redhat.com>
10397
10398 ABI change: Mangle `void (A::*)() const' as
10399 M1AKFvvE, not MK1AFvvE.
10400 * mangle.c (write_function_type): Write cv-quals for member
10401 function type here.
10402 (write_pointer_to_member_type): Not here.
10403
10404 2002-02-18 Jason Merrill <jason@redhat.com>
10405
10406 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10407 (do_decl_instantiation): Likewise.
10408
10409 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
10410
10411 PR c++/5685
10412 * decl.c (duplicate_decls): Make warning unconditional
10413 if duplicate default argument declarations are present.
10414
10415 2002-02-17 Jakub Jelinek <jakub@redhat.com>
10416
10417 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10418 shortening.
10419
10420 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
10421
10422 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10423 remove incorrect comment. Move #if 0'd code to common path. Use
10424 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10425
10426 2002-02-13 Jason Merrill <jason@redhat.com>
10427
10428 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10429 (finish_function): Don't warn if current_function_returns_null.
10430
10431 * typeck2.c (digest_init): Do handle values of vector type.
10432
10433 * typeck2.c (digest_init, process_init_constructor): Treat vectors
10434 like arrays.
10435
10436 2002-02-11 Jason Merrill <jason@redhat.com>
10437
10438 * parse.y (reserved_declspecs): Don't handle attributes.
10439 (reserved_typespecquals): Handle them here.
10440 * Make-lang.in (parse.c): Adjust expected conflicts.
10441
10442 2002-02-08 Jakub Jelinek <jakub@redhat.com>
10443
10444 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10445 instead of compstmt.
10446 (compstmt_or_stmtexpr): Renamed from compstmt.
10447 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10448
10449 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10450
10451 Rename instantiate_type_flags to tsubst_flags_t & expand use.
10452 * cp-tree.h (instantiate_type_flags): Rename to ...
10453 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10454 add tf_warning flag.
10455 (instantiate_type): Adjust prototype.
10456 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10457 do_type_instantiation, cp_build_qualified_type_real): Likewise.
10458 cp_build_qualified_type: Adjust.
10459 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10460 tf_*.
10461 * call.c (standard_conversion): Rename itf_* to tf_*.
10462 (reference_binding): Likewise.
10463 (convert_like_real): Likewise.
10464 * cvt.c (cp_convert_to_pointer): Likewise.
10465 (convert_to_reference): Likewise.
10466 * decl.c (lookup_namespace_name): Use tf_* flags.
10467 (make_typename_type): Likewise.
10468 (grokdeclarator): Likewise.
10469 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10470 (coerce_template_template_parms, convert_template_argument,
10471 coerce_template_parms, maybe_get_template_decl_from_type_decl,
10472 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10473 instantiate_class_template, tsubst_template_arg_vector,
10474 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10475 tsubst_decl, tsubst_arg_types, tsubst_function_type,
10476 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10477 instantiate_template, fn_type_unification,
10478 resolve_overloaded_unification, verify_class_unification,
10479 unify, get_bindings_real, do_type_instantiation,
10480 regenerate_decl_from_template, instantiate_decl,
10481 tsubst_initializer_list, tsubst_enum,
10482 get_mostly_instantiated_function_type,
10483 invalid_nontype_parm_type_p): Likewise.
10484 * tree.c (cp_build_qualified_type_real): Likewise.
10485 * typeck.c (build_binary_op): Rename itf_* to tf_*.
10486 (build_ptrmemfunc): Likewise.
10487 (convert_for_assignment): Likewise.
10488
10489 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10490
10491 PR c++/109
10492 * decl.c (grokdeclarator): Allow friend declarations from
10493 dependent types.
10494 * decl2.c (handle_class_head): Don't push into template parm contexts.
10495 * pt.c (push_template_decl_real): Template parm contexts are never
10496 being defined.
10497
10498 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
10499
10500 * class.c: Include target.h.
10501 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10502 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10503 bit-field layout.
10504 * Make-lang.in: Adjust deps.
10505
10506 2002-02-05 Jason Merrill <jason@redhat.com>
10507
10508 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10509
10510 2002-02-04 Jakub Jelinek <jakub@redhat.com>
10511
10512 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10513 (finish_switch_cond): Set SWITCH_TYPE.
10514
10515 2002-02-04 Richard Henderson <rth@redhat.com>
10516
10517 * method.c (use_thunk): Always initialize the block tree. Reindent.
10518 * semantics.c (expand_body): Emit thunks after function, not before.
10519
10520 2002-02-04 Jason Merrill <jason@redhat.com>
10521
10522 * decl.c (start_function): Call cplus_decl_attributes immediately
10523 after grokdeclarator.
10524
10525 * decl.c (start_function): Combine DECL_RESULT handling code.
10526
10527 2002-02-03 Jason Merrill <jason@redhat.com>
10528
10529 * xref.c: Remove.
10530 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10531 (cp/xref.o): Remove dependencies.
10532 * class.c (finish_struct_1, check_methods): Don't call xref fns.
10533 (finish_struct_1): Likewise.
10534 * friend.c (make_friend_class): Likewise.
10535 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10536 * spew.c (read_process_identifier): Likewise.
10537
10538 2002-02-01 Jason Merrill <jason@redhat.com>
10539
10540 PR c++/4872
10541 * decl.c (finish_function): Warn about a non-void function with
10542 no return statement and no abnormal exit.
10543 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10544 (current_function_returns_abnormally): New macro.
10545 * call.c (build_call): Set it.
10546
10547 * typeck.c (build_component_ref): Always complain about offsetof
10548 constructs on non-PODs. Only make it an error for members of
10549 virtual bases.
10550
10551 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10552 (dump_function_decl): Always dump parms.
10553
10554 * decl2.c (finish_static_data_member_decl): Complain about a local
10555 class with a static data member.
10556
10557 PR c++/4286
10558 * search.c (lookup_field_1): Don't xref a static data member
10559 just because we looked it up.
10560
10561 2002-01-31 Jason Merrill <jason@redhat.com>
10562
10563 * Make-lang.in (parse.c): Handle .output file.
10564
10565 PR c++/3395
10566 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10567 not TREE_TYPE.
10568 * semantics.c (finish_class_definition): Adjust.
10569
10570 Allow attributes in parms and casts.
10571 * parse.y (named_parm): Don't strip attrs.
10572 (declmods): Remove 'attributes' production.
10573 (nonempty_cv_qualifiers): Accept attributes.
10574 (ATTRIBUTE): Give precedence.
10575 * decl.c (groktypename): Handle attributes.
10576 (grokparms): Likewise.
10577
10578 2002-01-29 Jakub Jelinek <jakub@redhat.com>
10579
10580 * decl2.c (cxx_decode_option): Pass 0 as last argument to
10581 cpp_handle_option.
10582 * lang-specs.h: Use cpp_unique_options instead of cpp_options
10583 when used together with cc1_options.
10584
10585 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
10586
10587 PR c++/5132
10588 * typeck2.c (digest_init): Make sure non-array core type is
10589 instantiated.
10590 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10591 constructor, rather than build a new one.
10592 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10593 PURPOSE of constructor elts.
10594
10595 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10596
10597 * Make-lang.in (parse.c): Adjust expected number of
10598 shift-reduce conflicts.
10599 (decl.o): Depend on diagnostic.h.
10600 * decl.c: Include diagnostic.h.
10601 (grokdeclarator): Check for null pointer.
10602 (finish_function): Don't abort when
10603 current_binding_level->parm_flag != 1, if errors have
10604 occurred; throw away the statement tree and extra binding
10605 levels, and continue.
10606 * lex.c (note_list_got_semicolon): Check for null pointer.
10607 * method.c (hack_identifier): Just return error_mark_node if
10608 value is error_mark_node.
10609 * parse.y (primary: TYPEID(type_id)): No need to use
10610 TYPE_MAIN_VARIANT here.
10611 (handler_seq): Accept an empty list of catch clauses and
10612 generate a fake handler block to avoid later crashes.
10613 (ansi_raise_identifier): Accept the error token too.
10614 * semantics.c (begin_class_definition,
10615 finish_class_definition): Check for error_mark_node.
10616
10617 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10618
10619 * typeck2.c (friendly_abort): Delete definition.
10620 * cp-tree.h (friendly_abort): Don't prototype.
10621 (my_friendly_assert): Use fancy_abort.
10622
10623 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10624
10625 * cp-tree.h (my_friendly_abort): Remove.
10626
10627 2002-01-23 Jakub Jelinek <jakub@redhat.com>
10628
10629 * spew.c (pending_inlines, pending_inlines_tail,
10630 processing_these_inlines): Make static.
10631 (mark_pending_inlines): Remove static.
10632 (begin_parsing_inclass_inline): If in function, save pi
10633 for GC to cp_function_chain->unparsed_inlines instead.
10634 (process_next_inline): Likewise.
10635 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10636 (mark_pending_inlines): Add prototype.
10637 * decl.c (spew_debug): Remove unused extern.
10638 (mark_lang_function): Call mark_pending_inlines.
10639
10640 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10641
10642 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10643 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10644 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10645 Change my_fancy_abort() to abort().
10646
10647 2002-01-23 Jason Merrill <jason@redhat.com>
10648
10649 PR c++/5453
10650 * class.c (fixed_type_or_null): Fix thinko.
10651
10652 PR c++/3331
10653 * init.c (resolve_offset_ref): Use build_indirect_ref.
10654
10655 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10656
10657 2002-01-22 Jason Merrill <jason@redhat.com>
10658
10659 * parse.y (function_body): Suppress the block for the outermost
10660 curly braces.
10661 * decl.c (pushdecl): Don't try to skip it.
10662 (begin_function_body): Keep the block we create, not the next one.
10663 * init.c (emit_base_init): Don't mess with keep_next_level.
10664
10665 * class.c (build_base_path): Tweak formatting.
10666
10667 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
10668
10669 Fix regression introduced with patch for c++/775
10670 * parse.y (class_head_defn): Check for template specializations
10671 with a different class-key.
10672
10673 2002-01-17 Jason Merrill <jason@redhat.com>
10674
10675 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10676 (begin_function_body): Call them and keep_next_level.
10677 * init.c (emit_base_init): Call keep_next_level.
10678 * semantics.c (setup_vtbl_ptr): Lose.
10679 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10680 (vtbls_set_up_p): Lose.
10681 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10682 * method.c (do_build_copy_constructor): Likewise.
10683 (synthesize_method): Call finish_mem_initializers.
10684 * parse.y (nodecls): Likewise.
10685
10686 * error.c (dump_type_suffix): Print the exception specs before
10687 recursing.
10688 (dump_function_decl): Here, too.
10689
10690 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10691
10692 2002-01-10 Ira Ruben <ira@apple.com>
10693
10694 PR c++/907
10695 * decl.c (start_method): Handle attrlist.
10696
10697 2002-01-10 Jakub Jelinek <jakub@redhat.com>
10698
10699 * decl2.c (max_tinst_depth): Increase default limit to 500.
10700
10701 2002-01-10 Graham Stott <grahams@redhat.com>
10702
10703 * spew.c (YYCHAR): Uppercase macro parameter and add
10704 parenthesis.
10705 (YYCODE): Likewise.
10706 (NAME): Uppercase macro parameter.
10707
10708 2002-01-09 Graham Stott <grahams@redhat.com>
10709
10710 * decl.h (grokdeclarator): Wrap long line.
10711
10712 * semantics.c (FINISH_COND): Uppercase macro paramaters and
10713 add parenthesis.
10714
10715 2002-01-08 Graham Stott <grahams@redhat.com>
10716
10717 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10718 (PALLOC): Uppercase macro parameter and whitespace.
10719 (SALLOC): Uppercase macro parameter.
10720 (SFREE): Uppercase macros parameter, add parenthese and
10721 whitespace.
10722 (STREQL): Uppercase macro parameter and whitespace.
10723 (STRNEQ): Likewise.
10724 (STRLSS): Likewise.
10725 (STRLEQ): Likewise.
10726 (STRGTR): Likewise.
10727 (STRGEQ): Likewise.
10728
10729 * call.c (convert_like): Add parenthesis and wrap.
10730 (convert_like_with_context): Likewise.
10731 (ICS_RANK): Whitespace.
10732 (NEED_TEMPORARY_P): Remove parenthesis.
10733
10734 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10735 whitespace.
10736 (VTT_MARKED_BINFO_P): Likewise.
10737
10738 * decl.c (BINDING_LEVEL): Add parenthesis.
10739 (DEF_OPERATOR): Likewise.
10740
10741 * mangle.c (MANGLE_TRACE): Add parenthesis.
10742 (MANGLE_TRACE_TREE): Likewise.
10743 (write_signed_number): Likewise.
10744 (write_unsigned_number): Likewise.
10745
10746 * pt.c (ccat): Uppercase macro parameter.
10747 (cat): Likewise
10748
10749 * search.c (SET_BINFO_ACCESS): Add parenthesis.
10750
10751 2002-01-07 Jason Merrill <jason@redhat.com>
10752
10753 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10754 to pedwarn.
10755
10756 PR c++/3536
10757 * method.c (make_thunk): If !flag_weak, give the thunk the
10758 function's linkage.
10759 (use_thunk): Here, too.
10760
10761 2002-01-07 Graham Stott <grahams@redhat.com>
10762
10763 * error.c: Update copyright date.
10764 (print_scope_operator): Add parenthesis.
10765 (print_left_paren): Likewise.
10766 (print_right_paren): Likewise.
10767 (print_left_bracket): Likewise.
10768 (print_right_bracket): Likewise.
10769 (print_template_argument_list_start): Likewise.
10770 (print_template_argument_list_end): Likewise.
10771 (print_non_consecutive_character): Likewise.
10772 (print_tree_identifier): Likewise.
10773 (print_identifier): Likewise.
10774 (NEXT_CODE): Uppercase macro parameter.
10775 (ident_fndecl): Delete unused.
10776 (GLOBAL_THING): Likewise.
10777
10778 2002-01-06 Graham Stott <grahams@redhat.com>
10779
10780 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10781 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10782 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10783 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10784 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10785 (C_IS_RESERVED_WORD): Uppercase macro parameter.
10786 (C_RID_YYCODE) Likewise.
10787 (ptrmem_cst): Use rtx.
10788 (LOCAL_BINDING_P): Add whitespace.
10789 (INHERITED_VALUE_BINDING_P): Likewise.
10790 (BINDING_SCOPE): Wrap long line.
10791 (BINDING_HAS_LEVEL_P): Remove parenthesis.
10792 (BINDING_VALUE): Wrap long line.
10793 (BINDING_TYPE): Whitespace.
10794 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10795 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10796 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10797 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10798 (same_type_p): Uppercase macro parameters.
10799 (same_type_ignoring_top_level_qualifiers_p): Likewise.
10800 (OVL_FUNCTION): Wrap long line.
10801 (OVL_CHAIN): Whitespace.
10802 (OVL_CURRENT): Add parenthesis and whitespace.
10803 (OVL_NEXT): Whitespace.
10804 (OVL_USED): Likewise.
10805 (IDENTIFIER_TYPE_VALUE): Likewise.
10806 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10807 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10808 (LANG_ID_FIELD): Whitespace.
10809 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10810 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10811 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10812 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10813 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10814 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10815 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10816 (IDENTIFIER_VIRTUAL_P): Likewise.
10817 (IDENTIFIER_OPNAME_P): Likewise.
10818 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10819 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10820 (C_SET_EXP_ORIGINAL_CODE): Likewise.
10821 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10822 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10823 (IS_AGGR_TYPE): Uppercase macro parameter.
10824 (CLASS_TYPE_P): Likewise.
10825 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10826 (IS_AGGR_TYPE_2): Whitespace.
10827 (TAGGED_TYPE_P): Uppercase macro parameter.
10828 (TYPE_BUILT_IN): Whitespace.
10829 (TYPE_FOR_JAVA): Likewise.
10830 (FUNCTION_ARG_CHAIN): Remove parenthesis.
10831 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10832 (FUNCTION_FIRST_USER_PARAM): Likewise.
10833 (PROMOTES_TO_AGGR_TYPE): Whitespace.
10834 (DERIVED_FROM_P): Add parenthesis and wrap.
10835 (UNIQUELY_DERIVED_FROM_P): Likewise.
10836 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10837 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10838 (CLASSTYPE_USE_TEMPLATE): Whitespace.
10839 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10840 (TYPE_GETS_DELETE): Add parenthesis.
10841 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10842 (TYPE_HAS_ASSIGN_REF): Likewise,
10843 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10844 (TYPE_HAS_INIT_REF): Likewise.
10845 (TYPE_HAS_CONST_INIT_REF): Likewise.
10846 (TYPE_BEING_DEFINED): Likewise.
10847 (TYPE_LANG_SPECIFIC): Likewise.
10848 (CLASSTYPE_RTTI): Likewise.
10849 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10850 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10851 (TYPE_OVERLOADS_ARROW): Likewise.
10852 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10853 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10854 (CLASSTYPE_METHOD_VEC): Likewise.
10855 (CLASSTYPE_MARKED_N): Likewise.
10856 (CLASSTYPE_MARKED): Likewise.
10857 (CLASSTYPE_MARKED2): Likewise.
10858 (CLASSTYPE_MARKED3): Likewise.
10859 (CLASSTYPE_MARKED4): Likewise.
10860 (CLASSTYPE_MARKED5): Likewise.
10861 (CLASSTYPE_MARKED6): Likewise.
10862 (SET_CLASSTYPE_MARKED): Whitespace.
10863 (CLEAR_CLASSTYPE_MARKED): Likewise.
10864 (SET_CLASSTYPE_MARKED2): Likewise.
10865 (CLEAR_CLASSTYPE_MARKED2): Likewise.
10866 (SET_CLASSTYPE_MARKED3): Likewise.
10867 (CLEAR_CLASSTYPE_MARKED3): Likewise.
10868 (SET_CLASSTYPE_MARKED4): Likewise.
10869 (CLEAR_CLASSTYPE_MARKED4): Likewise.
10870 (SET_CLASSTYPE_MARKED5): Likewise.
10871 (CLEAR_CLASSTYPE_MARKED5): Likewise.
10872 (SET_CLASSTYPE_MARKED6): Likewise.
10873 (CLEAR_CLASSTYPE_MARKED6): Likewise.
10874 (CLASSTYPE_TAGS): Likewise.
10875 (CLASSTYPE_VSIZE): Likewise.
10876 (CLASSTYPE_VBASECLASSES): Likewise.
10877 (CANONICAL_BINFO): Add parenthesis.
10878 (CLASSTYPE_SIZE(NODE): Likewise.
10879 (CLASSTYPE_SIZE_UNIT): Likewise.
10880 (CLASSTYPE_ALIGN(NODE): Likewise.
10881 (CLASSTYPE_USER_ALIGN): Likewise.
10882 (TYPE_JAVA_INTERFACE): Likewise.
10883 (CLASSTYPE_PURE_VIRTUALS): Likewise.
10884 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10885 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10886 (CLASSTYPE_HAS_MUTABLE): Likewise.
10887 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10888 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10889 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10890 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10891 (CLASSTYPE_INTERFACE_ONLY): Likewise.
10892 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10893 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10894 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10895 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10896 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10897 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10898 (BINFO_UNSHARED_MARKED): Whitespace.
10899 (BINFO_MARKED): Whitespace and wrap.
10900 (SET_BINFO_MARKED): Likewise.
10901 (CLEAR_BINFO_MARKED): Likewise.
10902 (BINFO_VTABLE_PATH_MARKED): Likewise.
10903 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10904 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10905 (BINFO_SUBVTT_INDEX): Remove parenthesis.
10906 (BINFO_VPTR_INDEX): Likewise.
10907 (BINFO_PRIMARY_BASE_OF): Likewise,
10908 (CLASSTYPE_VFIELDS): Whitespace.
10909 (VF_DERIVED_VALUE): Wrap long line.
10910 (NAMESPACE_LEVEL): Whitespace.
10911 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10912 (DEFARG_POINTER): Whitespace.
10913 (DECL_NEEDED_P): Remove parenthesis.
10914 (DECL_LANGUAGE): Whitespace.
10915 (SET_DECL_LANGUAGE): Add parenthesis.
10916 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10917 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10918 (DECL_IN_AGGR_P): Whitespace.
10919 (DECL_FRIEND_P): Likewise.
10920 (DECL_BEFRIENDING_CLASSES): Likewise.
10921 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10922 (DECL_NONCONVERTING_P): Whitespace.
10923 (DECL_PURE_VIRTUAL_P): Likewise.
10924 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10925 (DECL_PENDING_INLINE_INFO): Whitespace.
10926 (DECL_SORTED_FIELDS): Likewise.
10927 (DECL_DEFERRED_FN): Likewise.
10928 (DECL_TEMPLATE_INFO): Likewise.
10929 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10930 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10931 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10932 (TMPL_ARGS_LEVEL): Likewise.
10933 (SET_TMPL_ARGS_LEVEL): Likewise.
10934 (INNERMOST_TEMPLATE_PARMS): Whitespace.
10935 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10936 (INTEGRAL_CODE_P(CODE): Add parenthesis.
10937 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10938 (TYPE_HAS_CONSTRUCTOR): Whitespace.
10939 (TREE_HAS_CONSTRUCTOR): Likewise.
10940 (TYPE_HAS_DESTRUCTOR): Likewise.
10941 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10942 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10943 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10944 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10945 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10946 (TYPE_PTRMEMFUNC_P): Likewise.
10947 (TYPE_PTRMEMFUNC_FLAG): Likewise.
10948 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10949 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10950 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10951 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10952 (DECL_ACCESS): Whitespace.
10953 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10954 (DECL_GLOBAL_DTOR_P): Likewise.
10955 (GLOBAL_INIT_PRIORITY): Likewise.
10956 (DECL_TEMPLATE_PARMS): Likewise.
10957 (DECL_TEMPLATE_RESULT): Likewise.
10958 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10959 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10960 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10961 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10962 (PRIMARY_TEMPLATE_P): Add parenthesis.
10963 (DECL_USE_TEMPLATE): Whitespace.
10964 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10965 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10966 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10967 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10968 (CALL_DECLARATOR_PARMS): Remove parenthesis.
10969 (CALL_DECLARATOR_QUALS): Likewise.
10970 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10971 (TEMP_NAME_P): Wrap.
10972 (VFIELD_NAME_P): Likewise.
10973 (B_SET): Uppercase macro parameters and add parenthesis.
10974 (B_CLR): Likewise.
10975 (B_TST): Likewise.
10976 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10977 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10978 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10979 (same_or_base_type_p): Likewise.
10980 (cp_deprecated): Likewise.
10981
10982 2002-01-05 Richard Henderson <rth@redhat.com>
10983
10984 * semantics.c (expand_body): Revert last change.
10985
10986 2002-01-04 Jason Merrill <jason@redhat.com>
10987
10988 PR c++/4122
10989 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10990 lost primary.
10991
10992 * class.c (build_vtbl_initializer): Check for a lost primary
10993 before calculating the vtable entry to throw away.
10994
10995 2002-01-02 Jason Merrill <jason@redhat.com>
10996
10997 * semantics.c (expand_body): Call outlining_inline_function when
10998 emitting an inline function out of line.
10999
11000 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11001
11002 PR c++/5116, c++/764 reversion
11003 * call.c (build_new_op): Revert the instantiations. They are
11004 incorrect.
11005
11006 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11007
11008 PR c++/5089
11009 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
11010
11011 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11012
11013 PR c++/3716
11014 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
11015 (tsubst, case POINTER_TYPE): Handle pmfs here.
11016 (tsubst, case OFFSET_TYPE): Check it is not an offset to
11017 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
11018
11019 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11020
11021 PR c++/35
11022 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
11023 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
11024 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
11025 PARM_DECL.
11026 (tsubst_template_parms): Break up loop statements.
11027 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
11028 parm PARM_DECLs don't get promoted.
11029
11030 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11031
11032 PR c++/5123
11033 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
11034 (build_x_function_call): Cope with a COMPONENT_REF containing a
11035 TEMPLATE_ID_EXPR.
11036
11037 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11038
11039 PR c++/5213
11040 * pt.c (convert_template_argument): Be more careful determining
11041 when RECORD_TYPE templates are or are not templates.
11042
11043 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11044
11045 PR c++/775
11046 * cp-tree.h (handle_class_head): Adjust prototype.
11047 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
11048 parameters. Use for all class heads.
11049 * parse.y (named_class_head_sans_basetype, named_class_head,
11050 named_complex_class_head_sans_basetype,
11051 named_class_head_sans_basetype_defn,
11052 unnamed_class_head): Remove.
11053 (class_head, class_head_apparent_template): Recognize class heads
11054 (class_head_decl, class_head_defn): New reductions. Process class
11055 heads.
11056 (structsp): Adjust class definition and class declaration
11057 reductions.
11058 (maybe_base_class_list): Give diagnostic on empty list.
11059
11060 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11061
11062 PR c++/4379
11063 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
11064 single non-static member.
11065 (unary_complex_lvalue): If it cannot be a pointer to member, don't
11066 make it so. Check it is not pointer to reference.
11067
11068 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11069
11070 PR c++/5132
11071 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
11072 are processing a template decl.
11073
11074 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11075
11076 PR c++/5116, c++/764
11077 * call.c (build_new_op): Make sure template class operands are
11078 instantiated. Simplify arglist construction.
11079
11080 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11081
11082 * call.c (build_user_type_conversion_1): Use my_friendly_assert
11083 rather than if ... abort.
11084 * cvt.c (convert_to_reference): Likewise.
11085 * semantics.c (setup_vtbl_ptr): Likewise.
11086 * pt.c (lookup_template_class): Comment typo.
11087
11088 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11089
11090 PR c++/5125
11091 * pt.c (push_template_decl_real): Make sure DECL has
11092 DECL_LANG_SPECIFIC.
11093
11094 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11095
11096 PR c++/335
11097 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
11098 for non-reference fields.
11099 * typeck.c (require_complete_type): Use resolve_offset_ref).
11100
11101 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
11102
11103 PR c++/196
11104 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
11105
11106 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
11107
11108 PR c++/160
11109 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
11110 up. Don't stabilize_references when initializing a reference.
11111
11112 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11113
11114 * decl2.c (lang_f_options): Const-ify.
11115
11116 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
11117
11118 * config-lang.in (diff_excludes): Remove.
11119
11120 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
11121
11122 PR c++/90
11123 * typeck.c (build_function_call_real): Use original function
11124 expression for errors.
11125
11126 2001-12-18 Jason Merrill <jason@redhat.com>
11127
11128 PR c++/3242
11129 * class.c (add_method): Do compare 'this' quals when trying to match a
11130 used function. Don't defer to another used function.
11131
11132 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11133
11134 * pt.c (instantiate_clone): Remove, fold into ...
11135 (instantiate_template): ... here. Simplify by removing mutual
11136 recursion.
11137 * typeck2.c (build_m_component_ref): Don't cv qualify the function
11138 pointed to by a pointer to function.
11139 * class.c (delete_duplicate_fields_1): Typo.
11140
11141 2001-12-18 Jason Merrill <jason@redhat.com>
11142
11143 C++ ABI change: destroy value arguments in caller.
11144 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
11145 create an extra binding level for the parameters.
11146 * decl.c (store_parm_decls): Don't do parameter cleanups.
11147
11148 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11149
11150 * call.c (build_new_method_call): Use '%#V'.
11151 * error.c (cv_to_string): Use V parameter to determine padding.
11152
11153 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
11154
11155 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
11156 spellings in messages.
11157
11158 2001-12-17 Zack Weinberg <zack@codesourcery.com>
11159
11160 * cp-tree.h: Delete #defines for cp_error, cp_warning,
11161 cp_pedwarn, and cp_compiler_error.
11162 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
11163 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
11164 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
11165 typeck2.c: Change calls to the above macros to use their
11166 language-independent equivalents: error, warning, pedwarn, and
11167 internal_error respectively.
11168
11169 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
11170
11171 * decl2.c (finish_file): Remove back_end_hook.
11172
11173 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
11174
11175 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11176 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11177 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11178
11179 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
11180
11181 * lang-options.h: Use American spelling in messages.
11182
11183 2001-12-13 Jason Merrill <jason@redhat.com>
11184
11185 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11186
11187 Use cleanups to run base and member destructors.
11188 * init.c (push_base_cleanups): New function, split out from...
11189 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
11190 * decl.c (finish_destructor_body): Move vbase destruction code to
11191 push_base_cleanups.
11192 (begin_function_body, finish_function_body): New fns.
11193 (finish_function): Move [cd]tor handling and call_poplevel to
11194 finish_function_body.
11195 (pushdecl): Skip the new level.
11196 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11197 (setup_vtbl_ptr): Call push_base_cleanups.
11198 * method.c (synthesize_method): Call {begin,end}_function_body.
11199 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11200 * cp-tree.h: Declare new fns.
11201 * parse.y (function_body, .begin_function_body): New nonterminals.
11202 (fndef, pending_inline, function_try_block): Use function_body.
11203 (ctor_initializer_opt, function_try_block): No longer has a value.
11204 (base_init): Remove .set_base_init token.
11205 (.set_base_init, compstmt_or_error): Remove.
11206 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11207
11208 * optimize.c (maybe_clone_body): Fix parameter updating.
11209
11210 2001-12-12 Jason Merrill <jason@redhat.com>
11211
11212 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11213 * semantics.c (genrtl_start_function): Don't pass
11214 parms_have_cleanups or push an extra binding level.
11215 (genrtl_finish_function): Lose cleanup_label cruft.
11216
11217 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11218 (ctor_label): Remove.
11219 * semantics.c (finish_return_stmt): Lose ctor_label support.
11220 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11221 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11222 dtor_label.
11223
11224 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11225 check for [cd]tors.
11226 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11227
11228 * decl.c (finish_function): Check VMS_TARGET, not VMS.
11229
11230 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11231 (end_cleanup_fn): And poplevel.
11232
11233 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11234 if we're in a template.
11235
11236 2001-12-12 Jakub Jelinek <jakub@redhat.com>
11237
11238 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11239 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11240 THIS_NAME_P): Delete.
11241 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11242 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11243 with internal naming scheme.
11244 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11245
11246 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
11247
11248 * decl.c (grokdeclarator): Deprecated implicit typename use.
11249
11250 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
11251
11252 PR g++/51
11253 * parse.y (frob_specs): Indicate it is a language linkage which
11254 contained the extern.
11255 * decl.c (grokdeclarator): Allow extern language linkage with
11256 other specifiers.
11257
11258 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
11259
11260 PR g++/72
11261 * decl.c (add_binding): Don't reject duplicate typedefs involving
11262 template parameters.
11263
11264 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
11265
11266 * parse.y, semantics.c: Similarly.
11267
11268 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
11269
11270 PR g++/87
11271 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11272 (copy_args_p): Rename to ...
11273 (copy_fn_p): ... here.
11274 (grok_special_member_properties): New function.
11275 (grok_op_properties): Lose VIRTUALP parameter.
11276 (copy_assignment_arg_p): Remove.
11277 * call.c (build_over_call): Use copy_fn_p.
11278 * decl.c (grokfndecl): Reformat. Adjust call to
11279 grok_op_properties.
11280 (copy_args_p): Rename to ...
11281 (copy_fn_p): ... here. Reject template functions. Check for pass
11282 by value.
11283 (grok_special_member_properties): Remember special functions.
11284 (grok_ctor_properties): Don't remember them here, just check.
11285 (grok_op_properties): Likewise.
11286 (start_method): Call grok_special_member_properties.
11287 * decl2.c (grokfield): Likewise.
11288 (copy_assignment_arg_p): Remove.
11289 (grok_function_init): Don't remember abstract assignment here.
11290 * pt.c (instantiate_class_template): Call
11291 grok_special_member_properties.
11292 (tsubst_decl): Adjust grok_op_properties call.
11293
11294 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
11295
11296 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11297 RID_TYPES_COMPATIBLE_P.
11298
11299 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11300
11301 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11302 call to build_aggr_init.
11303 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11304
11305 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
11306
11307 * parse.y: Replace uses of the string non-terminal with STRING.
11308 Don't perform string concatentaion here.
11309 (string): Remove non-terminal.
11310 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11311
11312 2001-12-05 Jason Merrill <jason@redhat.com>
11313
11314 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11315 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11316 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11317 * pt.c (push_tinst_level): No longer static.
11318 * cp-tree.h: Declare them.
11319
11320 * init.c (resolve_offset_ref): Don't check access for the base
11321 conversion to access a FIELD_DECL.
11322
11323 * cp-tree.h (TYPE_REFFN_P): New macro.
11324 * decl.c (bad_specifiers): Check it, too.
11325
11326 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11327 on the __*_type_info type if we haven't seen a definition.
11328
11329 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
11330
11331 * decl.c: Include c-common.h.
11332 (shadow_warning): Move to c-common.c.
11333
11334 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11335
11336 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11337
11338 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11339
11340 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11341
11342 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11343
11344 PR g++/164
11345 * init.c (sort_base_init): Allow binfos to be directly specified.
11346 * method.c (do_build_copy_constructor): Explicitly convert to the
11347 base instance.
11348 (do_build_assign_ref): Likewise.
11349
11350 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
11351
11352 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11353 declaration and initialization.
11354
11355 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
11356
11357 * typeck2.c: Remove leading capital from diagnostic messages, as
11358 per GNU coding standards.
11359
11360 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
11361
11362 PR c++/3394
11363 * decl.c (xref_basetypes): Handle attributes between
11364 'class' and name.
11365
11366 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
11367
11368 PR g++/3381
11369 * parse.y (named_complex_class_head_sans_basetype): Add new
11370 reduction.
11371 * Make-lang.in (parse.c): Adjust expected conflict count.
11372
11373 2001-12-03 Jason Merrill <jason@redhat.com>
11374
11375 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11376 immediate binfos for our virtual bases.
11377
11378 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
11379
11380 * call.c (build_java_interface_fn_ref): Similarly.
11381 * except.c (is_admissible_throw_operand): Similarly.
11382 * init.c (build_java_class_ref): Similarly.
11383 * xref.c (open_xref_file): Similarly.
11384
11385 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
11386
11387 * class.c (finish_struct): Remove trailing periods from messages.
11388 * decl.c (check_tag_decl): Similarly.
11389 * lex.c (cxx_set_yydebug): Similarly.
11390 * typeck2.c (friendly_abort): Similarly.
11391
11392 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11393
11394 PR c++/3048
11395 * cp-tree.h (ovl_member): Remove.
11396 * decl2.c (merge_functions): Handle extern "C" functions
11397 specially.
11398 * tree.c (ovl_member): Remove.
11399
11400 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11401
11402 PR c++/4842
11403 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11404 FUNCTION_DECL, as input.
11405 (mark_overriders): Remove.
11406 (warn_hidden): Rework for the new ABI.
11407
11408 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11409
11410 PR c++/3471
11411 * call.c (convert_like_real): Do not build additional temporaries
11412 for rvalues of class type.
11413
11414 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
11415
11416 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11417 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11418 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11419 (DERIVED_FROM_P): Likewise.
11420 (enum base_access): Renumber, add ba_quiet bit mask.
11421 (get_binfo): Remove.
11422 (get_base_distance): Remove.
11423 (binfo_value): Remove.
11424 (ACCESSIBLY_DERIVED_FROM_P): Remove.
11425 * call.c (standard_conversion): Use lookup_base.
11426 * class.c (strictly_overrides): Likewise.
11427 (layout_virtual_bases): Likewise.
11428 (warn_about_ambiguous_direct_bases): Likewise.
11429 (is_base_of_enclosing_class): Likewise.
11430 (add_vcall_offset_vtbl_entries_1): Likewise.
11431 * cvt.c (build_up_reference): Adjust comment.
11432 * init.c (build_member_call): Reformat.
11433 * search.c (get_binfo): Remove.
11434 (get_base_distance_recursive): Remove.
11435 (get_base_distance): Remove.
11436 (lookup_base_r): Tweak.
11437 (lookup_base): Add ba_quiet control. Complete the types here.
11438 (covariant_return_p): Use lookup_base.
11439 * tree.c (binfo_value): Remove.
11440 (maybe_dummy_object): Use lookup_base.
11441 * typeck.c (build_static_cast): Use lookup_base.
11442 (get_delta_difference): Likewise.
11443 * typeck2.c (binfo_or_else): Use lookup_base.
11444 (build_scoped_ref): Add back error_mark_check.
11445 (build_m_component_ref): Use lookup_base.
11446
11447 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
11448
11449 * Make-lang.in (c++.generated-manpages): New dummy target.
11450
11451 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11452
11453 * Make-lang.in (cp-lang.o): Depends on c-common.h.
11454 * cp-lang.c (c-common.h): Include.
11455 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11456 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11457 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11458
11459 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
11460
11461 * decl2.c (c_language): Move to c-common.c.
11462 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11463 functions.
11464 (cxx_init): Update.
11465
11466 2001-11-26 Jason Merrill <jason@redhat.com>
11467
11468 * call.c (joust): Remove COND_EXPR hack.
11469
11470 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
11471
11472 * search.c (lookup_base_r): Declare bk in variable declaration
11473 space.
11474
11475 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
11476
11477 PR g++/3145
11478 * class.c (build_vbase_pointer): Remove.
11479 (build_vbase_path): Remove.
11480 (build_base_path): New function.
11481 * cp-tree.h (base_access, base_kind): New enumerations.
11482 (build_base_path): Declare.
11483 (convert_pointer_to_real): Remove.
11484 (convert_pointer_to): Remove.
11485 (lookup_base): Declare.
11486 (convert_pointer_to_vbase): Remove.
11487 * call.c (build_scoped_method_call): Use lookup_base &
11488 build_base_path instead of convert_pointer_to_real,
11489 get_base_distance & get_binfo.
11490 (build_over_call): Likewise.
11491 * cvt.c (cp_convert_to_pointer): Likewise.
11492 (convert_to_pointer_force): Likewise.
11493 (build_up_reference): Likewise.
11494 (convert_pointer_to_real): Remove.
11495 (convert_pointer_to): Remove.
11496 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11497 instead of convert_pointer_to_vbase & build_vbase_path.
11498 (emit_base_init): Use build_base_path instead of
11499 convert_pointer_to_real.
11500 (expand_virtual_init): Lose unrequired conversions.
11501 (resolve_offset_ref): Use lookup_base and build_base_path
11502 instead of convert_pointer_to.
11503 * rtti.c (build_dynamic_cast_1): Use lookup_base &
11504 build_base_path instead of get_base_distance & build_vbase_path.
11505 * search.c (get_vbase_1): Remove.
11506 (get_vbase): Remove.
11507 (convert_pointer_to_vbase): Remove.
11508 (lookup_base_r): New function.
11509 (lookup_base): New function.
11510 * typeck.c (require_complete_type): Use lookup_base &
11511 build_base_path instead of convert_pointer_to.
11512 (build_component_ref): Likewise.
11513 (build_x_function_call): Likewise.
11514 (get_member_function_from_ptrfunc): Likewise.
11515 (build_component_addr): Likewise.
11516 * typeck2.c (build_scoped_ref): Likewise.
11517
11518 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11519
11520 * cp-tree.h (CP_TYPE_QUALS): Removed.
11521 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11522 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11523 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11524 * dump.c (cp_dump_tree): Use void* dump_info argument to match
11525 lang-hooks prototype.
11526 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11527 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11528 CP_TYPE_QUALS changed to cp_type_quals.
11529 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11530 (CXX_C_OBJS): Remove c-dump.o.
11531
11532 2001-11-21 Mark Mitchell <mark@codesourcery.com>
11533
11534 PR c++/3637
11535 * pt.c (lookup_template_class): Ensure that all specializations
11536 are registered on the list corresponding to the most general
11537 template.
11538
11539 2001-11-20 Mark Mitchell <mark@codesourcery.com>
11540
11541 * call.c (non_reference): Add documentation.
11542 (convert_class_to_reference): Do not strip reference types
11543 from conversion operators.
11544 (maybe_handle_ref_bind): Simplify.
11545 (compare_ics): Correct handling of references.
11546
11547 2001-11-19 John Wilkinson <johnw@research.att.com>
11548
11549 * dump.c (dump_op): New function.
11550 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
11551 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11552 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11553
11554 2001-11-19 Mark Mitchell <mark@codesourcery.com>
11555
11556 PR4629
11557 * semantics.c (finish_sizeof): Make sure that expression created
11558 while processing a template do not have a type.
11559 (finish_alignof): Likewise.
11560 * typeck.c (c_sizeof): Likewise.
11561 (expr_sizeof): Likewise.
11562
11563 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
11564
11565 * lex.c (cxx_finish): Call c_common_finish.
11566 (finish_parse): Remove.
11567
11568 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11569
11570 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11571 when displaying error message about missing array bounds.
11572
11573 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11574
11575 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11576 CONST_CAST_EXPR.
11577 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11578
11579 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
11580
11581 * cp-tree.h (print_class_statistics): Restore.
11582
11583 2001-11-15 Jason Merrill <jason@redhat.com>
11584
11585 * method.c (use_thunk): Don't emit debugging information for thunks.
11586
11587 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11588 * decl.c (make_typename_type): Handle getting a class template.
11589 * search.c (lookup_field_r): A class template is good enough for
11590 want_type.
11591
11592 * call.c (convert_like_real): Only use cp_convert for the bad part.
11593 (standard_conversion): Also allow bad int->enum.
11594 * typeck.c (ptr_reasonably_similar): Also allow functions to
11595 interconvert. Pointers to same-size integers are reasonably
11596 similar.
11597
11598 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11599 give it void type.
11600
11601 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
11602
11603 PR g++/3154
11604 * init.c (sort_base_init): Remove unreachable code.
11605 (expand_member_init): Adjust comment to reflect reality. Simplify
11606 and remove unreachable code.
11607
11608 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
11609
11610 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11611 (cxx_init): Update prototype.
11612 * decl.c (init_decl_processing): Rename. Move null node init
11613 to its creation time.
11614 * lex.c (cxx_init_options): Update.
11615 (cxx_init): Combine with old init_parse; also call
11616 cxx_init_decl_processing.
11617
11618 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
11619
11620 * decl.c (check_initializer): Try to complete the type of an
11621 array element before checking whether it's complete. Don't
11622 complain about arrays with complete element types but an
11623 unknown size.
11624 (cp_finish_decl): Build the hierarchical constructor before
11625 calling maybe_deduce_size_from_array_init.
11626
11627 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
11628
11629 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11630
11631 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
11632
11633 PR g++/4206
11634 * parse.y (already_scoped_stmt): Remove.
11635 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11636
11637 2001-11-12 H.J. Lu <hjl@gnu.org>
11638
11639 * cvt.c (ocp_convert): Don't warn the address of a weak
11640 function is always `true'.
11641
11642 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11643
11644 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11645 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11646 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11647 * cp-tree.h (print_class_statistics): Remove.
11648 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11649 cxx_print_identifier, cxx_set_yydebug): New.
11650 * lex.c (set_yydebug): Rename c_set_yydebug.
11651 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11652 lang_print_xnode): Rename.
11653 * tree.c (print_lang_statistics): Rename.
11654
11655 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11656
11657 * class.c (dump_array): Fix format specifier warning.
11658
11659 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11660
11661 * cp-lang.c (LANG_HOOKS_NAME): Override.
11662 (struct lang_hooks): Constify.
11663 * lex.c (cxx_init_options): Update.
11664 (lang_identify): Remove.
11665 * parse.y (language_string): Remove.
11666
11667 2001-11-08 Andreas Franck <afranck@gmx.de>
11668
11669 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11670 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11671 suggested by autoconf.
11672 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11673 (c++.install-common): Use the transformed target alias names.
11674
11675 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11676
11677 * Make-lang.in: Update.
11678 * cp-lang.c: Include langhooks-def.h.
11679
11680 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11681
11682 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11683
11684 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11685
11686 * lex.c (copy_lang_type): Add static prototype.
11687
11688 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11689
11690 * pt.c (unify): Handle SCOPE_REF.
11691
11692 2001-11-01 Jakub Jelinek <jakub@redhat.com>
11693
11694 * tree.c (cp_copy_res_decl_for_inlining): Adjust
11695 DECL_ABSTRACT_ORIGIN for the return variable.
11696
11697 2001-10-31 Zack Weinberg <zack@codesourcery.com>
11698
11699 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11700
11701 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
11702
11703 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11704 semantics.c, spew.c: Fix spelling errors.
11705
11706 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11707
11708 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11709
11710 2001-10-25 Zack Weinberg <zack@codesourcery.com>
11711
11712 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11713 pop_everything.
11714
11715 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11716
11717 * cp-lang.c (cxx_get_alias_set): New function.
11718 Point LANG_HOOKS_GET_ALIAS_SET to it.
11719
11720 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11721
11722 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11723 * cp-tree.h (make_unbound_class_template): Prototype new function.
11724 * decl.c (make_unbound_class_template): New function.
11725 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11726 * error.c (dump_type): Likewise.
11727 * mangle.c (write_type): Likewise.
11728 * parse.y (template_parm): Likewise.
11729 (template_argument): Use make_unbound_class_template.
11730 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11731 (tsubst): Likewise.
11732 (tsubst_copy): Likewise.
11733 (unify): Likewise.
11734 * tree.c (walk_tree): Likewise.
11735 * typeck.c (comptypes): Likewise.
11736
11737 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11738
11739 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11740 extra calls into fewer ones.
11741
11742 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
11743
11744 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11745 Warn when merging inline with attribute noinline.
11746 (start_decl, start_function): Warn if inline and attribute
11747 noinline appear in the same declaration.
11748
11749 2001-10-16 H.J. Lu <hjl@gnu.org>
11750
11751 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11752 for tree checking disabled.
11753
11754 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
11755
11756 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11757 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11758
11759 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11760
11761 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11762 (unify): Only handle MINUS_EXPR specially if the above flag is set
11763 and the subtracted constant is 1. Clear the flag on recursive calls.
11764 Set it when unifying the maximum value in an INTEGER_TYPE's range.
11765
11766 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11767
11768 * decl.c (bad_specifiers): Don't allow exception specifications
11769 on any typedefs.
11770
11771 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
11772
11773 * cp/lex.c (init_cp_pragma): Similarly.
11774
11775 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11776
11777 * pt.c (lookup_template_class): Build complete template arguments
11778 for BOUND_TEMPLATE_TEMPLATE_PARM.
11779
11780 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11781
11782 * cp-tree.h (TYPE_BINFO): Update comment.
11783 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11784 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11785 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11786 (copy_type): Prototype new function.
11787 * lex.c (copy_lang_decl): Gather tree node statistics.
11788 (copy_lang_type): New function.
11789 (copy_type): Likewise.
11790 (cp_make_lang_type): Create lang_type for
11791 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
11792 and BOUND_TEMPLATE_TEMPLATE_PARM.
11793 * pt.c (tsubst): Use copy_type instead of copy_node.
11794 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11795
11796 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11797
11798 * pt.c (determine_specialization): Ignore functions without
11799 DECL_TEMPLATE_INFO.
11800
11801 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
11802
11803 PR g++/4476
11804 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11805
11806 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
11807
11808 * typeck2.c (store_init_value): Don't re-digest a bracketed
11809 initializer.
11810
11811 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11812 ANON_AGGR_TYPE_P.
11813
11814 2001-10-11 Richard Henderson <rth@redhat.com>
11815
11816 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11817 of an asm statement.
11818 (build_vtbl_ref_1): Split out from build_vtbl_ref.
11819 (build_vfn_ref): Use it to handle vtable descriptors before
11820 calling build_vtable_entry_ref.
11821 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11822
11823 2001-10-10 Richard Henderson <rth@redhat.com>
11824
11825 * parse.y (asm_operand): Allow named operands.
11826 * semantics.c (finish_asm_stmt): Tweek for changed location
11827 of the operand constraint.
11828
11829 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
11830
11831 * call.c (standard_conversion): Add bad conversion between
11832 integers and pointers.
11833 (convert_like_real): Don't use convert_for_initialization for bad
11834 conversions; complain here and use cp_convert.
11835 (build_over_call): Don't handle bad conversions specially.
11836 (perform_implicit_conversion): Allow bad conversions.
11837 (can_convert_arg_bad): New fn.
11838 * cp-tree.h: Declare it.
11839 * typeck.c (convert_for_assignment): Use it.
11840 (ptr_reasonably_similar): Any target type is similar to void.
11841
11842 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
11843
11844 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11845 (cp/cp-lang.o): New rule.
11846 * cp-tree.h: Declare hooks.
11847 * tree.c: Make hooks non-static.
11848 (init_tree): Don't initialize hooks here.
11849 * lex.c: Likewise. Move definition of lang_hooks to...
11850 * cp-lang.c: ... new file.
11851
11852 2001-10-08 Richard Henderson <rth@redhat.com>
11853
11854 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11855 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11856
11857 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11858
11859 * class.c (build_vtable_entry_ref): Const-ify.
11860 * decl.c (predefined_identifier,
11861 initialize_predefined_identifiers): Likewise.
11862 * init.c (build_new_1): Likewise.
11863 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11864 Likewise.
11865
11866 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
11867
11868 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11869 (INSNS_PER_STMT): Likewise.
11870 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11871 (copy_body, initialize_inlined_parameters): Likewise.
11872 (declare_return_variable, inlinable_function_p): Likewise.
11873 (expand_call_inline, expand_calls_inline): Likewise.
11874 (optimize_inline_calls, clone_body): Likewise.
11875 * tree.c (walk_tree): Moved to ../tree-inline.c.
11876 (walk_tree_without_duplicates): Likewise.
11877 (copy_tree_r, remap_save_expr): Likewise.
11878
11879 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
11880
11881 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11882 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11883 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11884 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11885 (flag_inline_trees): Moved declaration to ../tree-inline.h.
11886 (walk_tree): Moved declaration to ../tree-inline.h.
11887 (walk_tree_without_duplicates, copy_tree_r): Likewise.
11888 (remap_save_expr): Likewise.
11889 * decl.c: Include tree-inline.h.
11890 (lang_mark_tree): Don't mark inlined_fns.
11891 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11892 * optimize.c: Include tree-inline.h.
11893 (optimize_inline_calls): Move declaration to ../tree.h, as
11894 non-static.
11895 (remap_decl): Use language-independent constructs and hooks.
11896 (remap_block, copy_body_r, declare_return_variable): Likewise.
11897 (inlinable_function_p): Likewise. Don't test for
11898 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11899 no longer language-specific.
11900 (optimize_inline_calls): Likewise. Make it non-static. Moved
11901 call of dump_function to...
11902 (optimize_function): Here...
11903 (clone_body): New function, extracted from...
11904 (maybe_clone_body): ... here. Build decl_map locally and pass
11905 it on to clone_body.
11906 * pt.c, semantics.c: Include tree-inline.h.
11907 * tree.c: Likewise.
11908 (cp_walk_subtrees): New language-specific hook for tree inlining.
11909 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11910 cp_is_overload_p, cp_auto_var_in_fn_p,
11911 cp_copy_res_decl_for_inlining): Likewise.
11912 (walk_tree): Move language-specific constructs into...
11913 (cp_walk_subtrees): this new function.
11914 (copy_tree_r): Use language-independent constructs and hooks.
11915 (init_tree): Initialize tree inlining hooks.
11916 (remap_save_expr): Adjust prototype so that the declaration
11917 does not require the definition of splay_tree.
11918
11919 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
11920
11921 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11922 to build the declaration instead of the declaration itself.
11923
11924 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
11925
11926 * decl2.c (cxx_decode_option): Add 'else'.
11927
11928 * spew.c (end_input): No longer static.
11929 * cp-tree.h: Declare it.
11930 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11931
11932 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11933
11934 * call.c (build_over_call), typeck.c (build_function_call_real):
11935 Pass type attributes to check_function_format rather than name or
11936 assembler name. Don't require there to be a name or assembler
11937 name to check formats.
11938
11939 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11940
11941 * decl.c (init_decl_processing): Don't call
11942 init_function_format_info. Initialize lang_attribute_table
11943 earlier.
11944 (builtin_function): Call decl_attributes.
11945 (insert_default_attributes): New.
11946
11947 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
11948
11949 * decl.c (grokdeclarator): Copy array typedef handling from C
11950 frontend.
11951
11952 * decl.c (grokdeclarator): Copy too-large array handling from C
11953 frontend.
11954
11955 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
11956
11957 * config-lang.in (target_libs): Added target-gperf, so that we
11958 don't try to build it if C++ is disabled.
11959
11960 2001-09-23 Zack Weinberg <zack@codesourcery.com>
11961
11962 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11963 (cp/errfn.o): Delete rule.
11964 (cp/error.o): Depend on flags.h.
11965 * errfn.c: Delete file.
11966 * cp-tree.h: Declare warn_deprecated. Remove definitions of
11967 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11968 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11969 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11970 internal_error respectively. Make cp_deprecated into a macro.
11971 Don't define cp_printer typedef or declare cp_printers.
11972 * error.c: Include flags.h.
11973 Delete: struct tree_formatting_info, print_function_argument_list,
11974 print_declaration, print_expression, print_function_declaration,
11975 print_function_parameter, print_type_id, print_cv_qualifier_seq,
11976 print_type_specifier_seq, print_simple_type_specifier,
11977 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11978 print_parameter_declaration_clause, print_exception_specification,
11979 print_nested_name_specifier, and definition of cp_printers.
11980 (locate_error): New function.
11981 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11982 rewritten in terms of locate_error and diagnostic.c.
11983 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11984 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
11985 (init_error): Adjust to match.
11986
11987 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11988
11989 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11990
11991 2001-09-21 Richard Henderson <rth@redhat.com>
11992
11993 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11994 (build_vtbl_initializer): Likewise.
11995 (build_vfn_ref): New.
11996 * cp-tree.h: Declare it.
11997 * call.c (build_over_call): Use it.
11998 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11999 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
12000
12001 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
12002
12003 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
12004
12005 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
12006
12007 Table-driven attributes.
12008 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
12009 * decl2.c (cplus_decl_attributes): Only take one attributes
12010 parameter.
12011 * cp-tree.c (cplus_decl_attributes): Update prototype.
12012 * class.c (finish_struct), decl.c (start_decl, start_function),
12013 decl2.c (grokfield), friend.c (do_friend), parse.y
12014 (parse_bitfield): Update calls to cplus_decl_attributes.
12015 * decl.c (grokdeclarator): Take a pointer to a single ordinary
12016 attribute list.
12017 * decl.h (grokdeclarator): Update prototype.
12018 * decl2.c (grokfield): Take a single ordinary attribute list.
12019 * friend.c (do_friend): Likewise.
12020 * decl.c (shadow_tag, groktypename, start_decl,
12021 start_handler_parms, grokdeclarator, grokparms, start_function,
12022 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
12023 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
12024 (process_template_parm, do_decl_instantiation): Pass single
12025 ordinary attribute lists around.
12026 * decl.c (grokdeclarator): Correct handling of nested attributes.
12027 Revert the patch
12028 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
12029 * decl.c (grokdeclarator): Embedded attrs bind to the right,
12030 not the left.
12031 .
12032 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
12033 (cp_attribute_table): Declare.
12034 * decl.c (valid_lang_attribute): Don't define.
12035 (lang_attribute_table): Define.
12036 (init_decl_processing): Initialize lang_attribute_table instead of
12037 valid_lang_attribute.
12038 * tree.c (cp_valid_lang_attribute): Remove.
12039 (handle_java_interface_attribute, handle_com_interface_attribute,
12040 handle_init_priority_attribute): New functions.
12041 (cp_attribute_table): New array.
12042 * decl2.c (import_export_class): Don't use
12043 targetm.valid_type_attribute.
12044
12045 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12046
12047 * Make-lang.in (cp/error.o): Depend on real.h
12048 * error.c: #include "real.h"
12049
12050 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12051
12052 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
12053 xmalloc/strcpy/strcat.
12054
12055 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12056
12057 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
12058 Const-ification.
12059 * pt.c (tsubst_decl): Likewise.
12060
12061 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12062
12063 * decl2.c (lang_f_options): Const-ification.
12064 * lex.c (cplus_tree_code_name): Likewise.
12065 * spew.c (yyerror): Likewise.
12066
12067 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12068
12069 PR c++/3986
12070 * class.c (force_canonical_binfo_r): Check & move an indirect
12071 primary base first.
12072 (force_canonical_binfo): Check that it's not already
12073 canonical.
12074 (mark_primary_virtual_base): Remove BINFO parameter.
12075 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
12076
12077 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12078
12079 Remove TYPE_NONCOPIED_PARTS.
12080 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
12081 CLASSTYPE_PURE_VIRTUALS.
12082 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
12083 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
12084 (layout_class_type): Don't call fixup_inline_methods here ...
12085 (finish_struct_1): ... call it here.
12086
12087 2001-09-04 Mark Mitchell <mark@codesourcery.com>
12088
12089 * decl.c (duplicate_decls): Remove code deadling with
12090 DECL_SAVED_INSNS.
12091 * decl2.c (finish_file): Likewise.
12092 * pt.c (instantiate_decl): Likewise.
12093 * semantics.c (expand_body): Don't defer local functions if
12094 they wouldn't be deferred for some other reason. Don't
12095 generate RTL for functions that will not be emitted.
12096 (genrtl_start_function): Remove code deadling with
12097 DECL_SAVED_INSNS.
12098 (genrtl_finish_function): Likewise.
12099
12100 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
12101
12102 PR c++/4203
12103 * call.c (build_over_call): Do not optimize any empty base
12104 construction.
12105
12106 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12107
12108 * error.c (dump_template_decl): Output template parameters
12109 together with their specifiers.
12110 Output `class' prefix for template template parameter.
12111 (dump_decl): Fix formatting.
12112
12113 2001-08-30 Kurt Garloff <garloff@suse.de>
12114
12115 * optimize.c (inlinable_function_p): Allow only smaller single
12116 functions. Halve inline limit after reaching recursive limit.
12117
12118 2001-08-30 Joern Rennecke <amylaar@redhat.com>
12119 Jason Merrill <jason_merrill@redhat.com>
12120
12121 * class.c (build_vtable_entry_ref): Subtract in char*, not
12122 ptrdiff_t.
12123
12124 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
12125
12126 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
12127 (build_cplus_array_type): Use cp_build_qualified_type, not
12128 TYPE_MAIN_VARIANT, to get an unqualified version.
12129
12130 * decl2.c (grok_alignof): Lose.
12131 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
12132 * typeck.c (c_alignof): Lose.
12133 * semantics.c (finish_sizeof, finish_alignof): New.
12134 * parse.y: Use them.
12135 * cp-tree.h: Declare them.
12136
12137 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
12138
12139 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
12140 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
12141 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
12142
12143 2001-08-19 Jakub Jelinek <jakub@redhat.com>
12144
12145 * typeck2.c (add_exception_specifier): Only require complete type if
12146 not in processing template declaration.
12147
12148 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12149
12150 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
12151 GNU_xref_start_scope and GNU_xref_end_scope.
12152
12153 * tree.c (TYPE_HASH): Moved to ../tree.h.
12154
12155 2001-08-16 Mark Mitchell <mark@codesourcery.com>
12156
12157 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
12158 on COMPOUND_EXPRs.
12159
12160 2001-08-14 Richard Henderson <rth@redhat.com>
12161
12162 * class.c, cp-tree.h (build_vfn_ref): Remove.
12163 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
12164
12165 2001-08-13 Mark Mitchell <mark@codesourcery.com>
12166
12167 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12168 empty class assignment as having side-effects to avoid
12169 spurious warnings.
12170
12171 2001-08-13 Zack Weinberg <zackw@panix.com>
12172
12173 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12174 * except.c: Include libfuncs.h.
12175
12176 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12177
12178 * decl.c (grokdeclarator): Clarify diagnostic message.
12179
12180 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12181
12182 * decl2.c (do_nonmember_using_decl): Replace using directive
12183 with using declaration in the error message.
12184
12185 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12186
12187 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12188 criterion to avoid rebuilding expression tree instead of
12189 processing_template_decl.
12190
12191 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12192
12193 Support named return value optimization for inlines, too.
12194 * decl.c (finish_function): Nullify returns here.
12195 * semantics.c (genrtl_start_function): Not here.
12196 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12197 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
12198 Also nullify the CLEANUP_STMT for the nrv.
12199 * cp-tree.h: Declare it.
12200 * optimize.c (declare_return_variable): Replace the nrv with the
12201 return variable.
12202 * typeck.c (check_return_expr): Be more flexible on alignment check.
12203 Ignore cv-quals when checking for a matching type.
12204
12205 2001-08-09 Richard Henderson <rth@redhat.com>
12206
12207 * decl2.c (finish_objects): Use target hooks instead of
12208 assemble_constructor and assemble_destructor.
12209
12210 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
12211
12212 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12213
12214 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
12215
12216 PR c++/3820
12217 Stop using TYPE_NONCOPIED_PARTS.
12218 * call.c (build_over_call): Be careful when copy constructing
12219 or assigning to an empty class.
12220 * class.c (check_bases_and_members): It has a
12221 COMPLEX_ASSIGN_REF if it has a vptr.
12222 (layout_class_type): Don't add empty class padding to
12223 TYPE_NONCOPIED_PARTS.
12224 (finish_struct_1): Don't add the VFIELD either.
12225 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12226 initialization.
12227
12228 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12229
12230 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12231
12232 2001-08-06 Richard Henderson <rth@redhat.com>
12233
12234 * decl2.c (finish_objects): Pass a symbol_ref and priority to
12235 assemble_{constructor,destructor}. Remove priority handling.
12236
12237 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12238
12239 Don't allow template-id in using-declaration.
12240 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12241 (do_class_using_decl): Likewise.
12242
12243 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12244
12245 * cp/spew.c (read_token): No need to pop buffers.
12246
12247 2001-08-02 Stan Shebs <shebs@apple.com>
12248
12249 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12250 (fnaddr_from_vtable_entry): Remove decl.
12251 * method.c (use_thunk): Update comment.
12252
12253 2001-08-01 Andrew Cagney <ac131313@redhat.com>
12254
12255 * repo.c (get_base_filename): Change return value to const char
12256 pointer.
12257
12258 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
12259
12260 Kill -fhonor-std.
12261 * NEWS: Document.
12262 * cp-tree.h (flag_honor_std): Remove.
12263 (CPTI_FAKE_STD): Remove.
12264 (std_node): Remove comment about it being NULL.
12265 (fake_std_node): Remove.
12266 * decl.c (in_fake_std): Remove.
12267 (walk_namespaces_r): Remove fake_std_node check.
12268 (push_namespace): Remove in_fake_std code.
12269 (pop_namespace): Likewise.
12270 (lookup_name_real): Remove fake_std_node check.
12271 (init_decl_processing): Always create std_node. Always add
12272 std:: things there.
12273 (builtin_function): Always put non '_' fns in std.
12274 * decl2.c (flag_honor_std): Remove.
12275 (lang_f_options): Remove honor-std.
12276 (unsupported_options): Add honor-std.
12277 (set_decl_namespace): Remove fake_std_node check.
12278 (validate_nonmember_using_decl): Likewise.
12279 (do_using_directive): Likewise.
12280 (handle_class_head): Likewise.
12281 * dump.c (cp_dump_tree): Likewise.
12282 * except.c (init_exception_processing): Adjust.
12283 * init.c (build_member_call): Remove fake_std_node check.
12284 (build_offset_ref): Likewise.
12285 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12286 * rtti.c (init_rtti_processing): Adjust.
12287
12288 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
12289
12290 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12291 operand while calling cp_tree_equal.
12292
12293 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12294
12295 The 3.0 ABI no longer has vbase pointer fields.
12296 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12297 FORMAT_VBASE_NAME): Remove.
12298 * method.c (do_build_copy_constructor): Adjust.
12299 (do_build_assign_ref): Adjust.
12300 * search.c (lookup_field_r): Adjust.
12301 * typeck.c (build_component_ref): Adjust.
12302
12303 The 3.0 ABI always has a vtable pointer at the start of every
12304 polymorphic class.
12305 * rtti.c (build_headof_sub): Remove.
12306 (build_headof): Adjust.
12307 (get_tinfo_decl_dynamic): No need to check flag_rtti
12308 here. Adjust.
12309 (create_real_tinfo_var): Explain why we need a hidden name.
12310
12311 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12312
12313 PR c++/3631
12314 * class.c (update_vtable_entry_for_fn): The fixed adjustment
12315 of a virtual thunk should be from declaring base.
12316
12317 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12318
12319 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12320 the shared virtual base, so preserving inheritance graph order.
12321
12322 2001-07-30 Andreas Jaeger <aj@suse.de>
12323
12324 * decl2.c: Remove unused var global_temp_name_counter.
12325
12326 2001-07-28 Richard Henderson <rth@redhat.com>
12327
12328 * method.c (pending_inlines): Remove.
12329
12330 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12331
12332 * class.c (mark_primary_virtual_base): Don't adjust base
12333 offsets here.
12334 (dfs_unshared_virtual_bases): Adjust them here.
12335 (mark_primary_bases): Explain why we adjust at the end.
12336
12337 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12338
12339 * class.c (finish_struct_1): When copying the primary base's
12340 VFIELD, make sure we find it is at offset zero.
12341
12342 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12343
12344 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12345 tsubst_expr for default template arguments.
12346
12347 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12348
12349 PR c++/3621
12350 * spew.c (yylex): Only copy the token's lineno, if it is
12351 nonzero.
12352
12353 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12354
12355 PR c++/3624
12356 * call.c (resolve_args): Simplify, call
12357 convert_from_reference.
12358 (build_new_op): Resolve and convert from reference ARG1
12359 earlier. Adjust ARG2 & ARG3 resolve and conversion.
12360
12361 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12362
12363 * decl.c (last_function_parm_tags): Remove.
12364 (current_function_parm_tags): Remove.
12365 (init_decl_processing): Adjust.
12366 (start_function): Adjust.
12367 (store_parm_decls): Adjust.
12368
12369 PR c++/3152
12370 * decl.c (grokdeclarator): Detect when a function typedef is
12371 declaring a function, and create last_function_parms correctly.
12372
12373 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
12374
12375 * call.c (joust): Only prefer a non-builtin candidate to a builtin
12376 one if they have the same signature.
12377
12378 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
12379 it rather than toplevel_bindings_p. Give it a mangled name if static.
12380 (convert_to_reference): Adjust.
12381 * decl2.c (get_temp_name): Lose.
12382 * mangle.c (mangle_ref_init_variable): New fn.
12383 (mangle_guard_variable): Strip the ref-init header.
12384 * cp-tree.h: Adjust.
12385 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12386 initializer.
12387 (grok_reference_init): Always use DECL_INITIAL.
12388
12389 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12390
12391 PR c++/3416
12392 * call.c (build_conditional_expr): Recheck args after
12393 conversions.
12394 * cp-tree.h (build_conditional_expr): Move to correct file.
12395 * typeck.c (decay_conversion): Diagnose any unknown types
12396 reaching here.
12397 (build_binary_op): Don't do initial decay or default
12398 conversions on overloaded functions.
12399 (build_static_cast): Don't do a decay conversion here.
12400
12401 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12402
12403 PR c++/3543
12404 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12405 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12406
12407 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12408
12409 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12410 (create_vtbl_ptr): ... here.
12411
12412 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12413
12414 * class.c (build_vbase_offset_vbtl_entries): Look for
12415 non-primary base of which we are a sub vtable.
12416
12417 2001-07-24 Phil Edwards <pme@sources.redhat.com>
12418
12419 * semantics.c (finish_this_expr): Remove unused code.
12420
12421 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
12422
12423 Simplify rtti, now we've only one ABI.
12424 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12425 CPTI_TINFO_VAR_ID.
12426 (tinfo_decl_id, tinfo_var_id): Remove.
12427 (get_typeid_1): Remove.
12428 * rtti.c
12429 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12430 (typeid_ok_p): New function.
12431 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12432 (get_tinfo_decl): Remove old abi documentation.
12433 (tinfo_from_decl): Remove.
12434 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12435 (get_typeid_1): Remove.
12436 (get_base_offset): Remove.
12437 (synthesize_tinfo_var): Absorb get_base_offset.
12438 (create_real_tinfo_var): Don't use tinfo_decl_id.
12439
12440 2001-07-23 Graham Stott <grahams@redhat.com>
12441
12442 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12443 variable has_two_argument_delete_p.
12444
12445 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
12446
12447 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12448 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12449 (CPTI_INDEX_IDENTIFIER): Remove.
12450 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12451 (delta2_identifier): Remove.
12452 (index_identifier): Remove.
12453 (pfn_or_delta2_identifier): Remove.
12454 (flag_vtable_thunks): Remove.
12455 (VTABLE_DELTA2_NAME): Remove.
12456 (VTABLE_INDEX_NAME): Remove.
12457 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12458 (vfunc_ptr_type_node): Adjust.
12459 (VTABLE_NAME_PREFIX): Adjust.
12460 (build_vfn_ref): Lose first parameter.
12461 (fixup_all_virtual_upcast_offsets): Remove.
12462 * decl.c (initialize_predefined_identifiers): Remove
12463 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12464 (init_decl_processing): Remove no-vtable-thunk code.
12465 * decl2.c (flag_vtable_thunks): Remove.
12466 (mark_vtable_entries): Remove no-vtable-thunk code.
12467 * error.c (dump_decl): Remove no-vtable-thunk code.
12468 (dump_expr): Adjust ptr to member function code.
12469 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12470 code.
12471 * rtti.c (build_headof): Remove no-vtable-thunk code.
12472 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12473 * search.c (get_base_distance): Remove expand_upcast_fixups case.
12474 (virtual_context) Remove.
12475 (expand_upcast_fixups): Remove.
12476 (fixup_virtual_upcast_offsets): Remove.
12477 (fixup_all_virtual_upcast_offsets): Remove.
12478 * typeck.c (get_member_function_from_ptrfunc): Remove
12479 no-vtable-thunk code.
12480 * call.c (build_over_call): Adjust call to build_vfn_ref.
12481 * class.c (build_vfn_ref): Lose first parameter. Remove
12482 no-vtable-thunk code.
12483 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12484 (build_vtable_entry): Remove no-vtable-thunk code.
12485
12486 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
12487
12488 Remove old-abi remnants. Remove comments about old abi
12489 behavior. Remove references to 'new-abi' in comments.
12490 * cp-tree.h: Adjust comments.
12491 (vbase_offsets_in_vtable_p): Delete.
12492 (vcall_offsets_in_vtable_p): Delete.
12493 (vptrs_present_everywhere_p): Delete.
12494 (all_overridden_vfuns_in_vtables_p): Delete.
12495 (merge_primary_and_secondary_vtables_p): Delete.
12496 (TYPE_CONTAINS_VPTR_P): Adjust.
12497 (VTT_NAME_PREFIX): Remove.
12498 (CTOR_VTBL_NAME_PREFIX): Remove.
12499 (init_vbase_pointers): Remove.
12500 * class.c: Adjust coments.
12501 (build_vbase_pointer_fields): Delete.
12502 (build_vbase_pointer): Remove old-abi code.
12503 (build_secondary_vtable): Likewise.
12504 (modify_all_vtables): Likewise.
12505 (create_vtable_ptr): Likewise.
12506 (layout_class_type): Likewise.
12507 (finish_struct_1): Likewise.
12508 (finish_vtbls): Likewise.
12509 (dfs_finish_vtbls): Delete.
12510 (build_vbase_offset_vtbl_entries): Remove old-abi code.
12511 * cvt.c: Adjust comments.
12512 * decl.c: Adjust comments.
12513 * decl2.c: Adjust comments.
12514 * init.c: Adjust comments.
12515 (construct_virtual_bases): Remove old-abi code.
12516 * lang-specs.h: Remove -fno-new-abi.
12517 * mangle.c: Adjust comments.
12518 * rtti.c: Adjust comments.
12519 (get_base_offset): Remove old-abi-code.
12520 * search.c: Adjust comments.
12521 (dfs_init_vbase_pointers): Remove.
12522 (dfs_vtable_path_unmark): Remove.
12523 (init_vbase_pointers): Remove.
12524 * semantics.c: Adjust comments.
12525 (emit_associated_thunks): Remove old-abi code.
12526 * typeck.c: Adjust comments.
12527
12528 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
12529
12530 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12531 params.h.
12532
12533 2001-07-19 Mark Mitchell <mark@codesourcery.com>
12534
12535 * class.c (finish_struct_anon): Forbid nested classes.
12536
12537 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12538
12539 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12540 * optimize.c: Include debug.h.
12541 (maybe_clone_body): Use debug hook.
12542 * semantics.c: Include debug.h.
12543 (expand_body): Use debug hook.
12544
12545 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12546
12547 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12548
12549 2001-07-18 Mark Mitchell <mark@codesourcery.com>
12550
12551 * class.c (type_requires_array_cookie): New function.
12552 (check_methods): Don't try to figure out whether the type needs a
12553 cookie here.
12554 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12555 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12556 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12557 * pt.c (instantiate_class_template): Don't set
12558 TYPE_VEC_DELETE_TAKES_SIZE.
12559 * NEWS: Document ABI changes from GCC 3.0.
12560
12561 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
12562 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12563
12564 * NEWS (Changes in GCC 3.0): Fix typo.
12565
12566 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
12567
12568 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12569 which attributes are to be attached, and a flags argument. Update
12570 call to decl_attributes.
12571 (grokfield): Update call to decl_attributes.
12572 * class.c (finish_struct): Update call to cplus_decl_attributes.
12573 * cp-tree.h (cplus_decl_attributes): Update prototype.
12574 * decl.c (start_decl, grokdeclarator, start_function): Update
12575 calls to decl_attributes and cplus_decl_attributes.
12576 * friend.c (do_friend): Update call to cplus_decl_attributes.
12577 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12578
12579 2001-07-12 Mark Mitchell <mark@codesourcery.com>
12580
12581 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12582 for `register' variables with an asm-specification.
12583
12584 2001-07-11 Mark Mitchell <mark@codesourcery.com>
12585
12586 * semantics.c (finish_asm_stmt): Mark the output operands
12587 to an asm addressable, if necessary.
12588
12589 2001-07-11 Ben Elliston <bje@redhat.com>
12590
12591 * Revert this change -- there is a subtle bug.
12592
12593 PR c++/80
12594 * decl.c (finish_enum): New "attributes" argument; pass it to
12595 cplus_decl_attributes. Use a narrower type if the enum is packed.
12596 * cp-tree.h (finish_enum): Adjust prototype.
12597 * parse.y (enum_head): New non-terminal.
12598 (structsp): Use it. Enums now may be preceded or followed by
12599 optional attributes -- pass their chained tree to finish_enum().
12600 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12601
12602 2001-07-10 Mark Mitchell <mark@codesourcery.com>
12603
12604 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12605 variables.
12606
12607 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
12608
12609 * semantics.c (cp_expand_stmt): Fix for null
12610 current_function_return_value.
12611
12612 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
12613
12614 * call.c (build_op_delete_call): Initialize fn.
12615 (convert_like_real): Delete conditional.
12616 (joust): Initialize *w and *l.
12617 * class.c: Add prototype for binfo_ctor_vtable.
12618 (get_primary_binfo): Initialize result.
12619 * init.c (build_java_class_ref): Initialize name.
12620
12621 2001-07-09 Erik Rozendaal <dlr@acm.org>
12622
12623 * typeck.c (unary_complex_lvalue): Do not duplicate the
12624 argument to modify, pre-, or post-increment when used as an
12625 lvalue and when the argument has side-effects.
12626
12627 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12628
12629 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12630 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
12631 cplus_decl_attributes even if attrs is NULL.
12632 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12633
12634 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12635
12636 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12637 calls to decl_attributes.
12638
12639 2001-07-06 Ira Ruben <ira@apple.com>
12640
12641 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12642 be DECL_TEMPLATE_RESULT.
12643
12644 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12645
12646 * cp-tree.h (copy_template_template_parm): Rename to ...
12647 (bind_template_template_parm): ... here.
12648 * tree.c (copy_template_template_parm): Rename to ...
12649 (bind_template_template_parm): ... here. Remove the case when
12650 NEWARGS is NULL_TREE.
12651 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12652 BOUND_TEMPLATE_TEMPLATE_PARM.
12653 * pt.c (lookup_template_class): Adjust.
12654
12655 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
12656
12657 * cvt.c (convert_lvalue): New fn.
12658 * cp-tree.h: Declare it.
12659 * method.c (do_build_assign_ref): Use it.
12660 (do_build_copy_constructor): Convert parm to base types
12661 before calling base constructors.
12662
12663 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12664 DECL_USER_ALIGN. Check flag_elide_constructors instead of
12665 optimize.
12666 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12667
12668 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
12669
12670 * optimize.c (optimize_inline_calls): New function, broken out
12671 of ...
12672 (optimize_function): ... here. Call it. Don't inline if it is
12673 a thunk.
12674 (dump_function): Print name of dump flag causing this dump.
12675 * semantics.c (expand_body): Move thunk inline check to
12676 optimize_function.
12677
12678 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
12679
12680 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12681 (comptypes): Use target.comp_type_attributes.
12682
12683 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
12684
12685 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12686
12687 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12688
12689 * error.c (lang_print_error_function): Add a `diagnostic_context *'
12690 parameter. Tweak.
12691
12692 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12693
12694 * decl2.c (import_export_class): Update.
12695
12696 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12697
12698 * error.c (init_error): Adjust settings.
12699
12700 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12701
12702 * error.c (init_error): Adjust settings.
12703
12704 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
12705
12706 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12707 return pointers to data members by reference rather than by value.
12708
12709 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
12710
12711 Implement the Named Return Value optimization.
12712 * cp-tree.h (struct cp_language_function): Add x_return_value.
12713 (current_function_return_value): Now a macro.
12714 * decl.c: Don't define it.
12715 (define_label, finish_case_label): Don't clear it.
12716 (init_decl_processing): Don't register it with GC.
12717 * semantics.c (genrtl_finish_function): Don't check it for
12718 no_return_label. Copy the RTL from the return value to
12719 current_function_return_value and walk, calling...
12720 (nullify_returns_r): ...this new fn.
12721 * typeck.c (check_return_expr): Set current_function_return_value.
12722
12723 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
12724
12725 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12726 sharing a ctor vtable with. Merge code for cases 1 and 2.
12727 (binfo_ctor_vtable): New fn.
12728 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12729
12730 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
12731
12732 * class.c (dfs_find_final_overrider): Fix logic.
12733
12734 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12735 virtual thunk instead of non-virtual.
12736 (get_matching_virtual): Uncomment.
12737
12738 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12739 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
12740 PARM, not ARG.
12741
12742 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
12743
12744 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12745 we've not emerged from the hierarchy of RTTI_BINFO on reaching
12746 a non-virtual base.
12747
12748 2001-06-13 Mark Mitchell <mark@codesourcery.com>
12749
12750 * NEWS: Update release number.
12751
12752 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12753
12754 PR c++/3130, c++/3131, c++/3132
12755 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12756 * class.c (force_canonical_binfo_r): Move
12757 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12758 virtual bases unless they're primary and what they're primary
12759 too has been moved.
12760 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12761 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12762 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12763 derived binfo.
12764 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12765 (layout_nonempty_base_or_field): Add most derived type
12766 parameter. Adjust.
12767 (layout_empty_base): Likewise.
12768 (build_base_field): Likewise.
12769 (build_base_fields): Likewise.
12770 (propagate_binfo_offsets): Add most derived type
12771 parameter. Skip non canonical virtual bases too.
12772 (dfs_set_offset_for_unshared_vbases): Don't skip primary
12773 bases. Do skip canonical bases.
12774 (layout_virtual_bases): Adjust.
12775 (layout_class_type): Adjust.
12776 (dfs_get_primary_binfo): Build list of virtual primary base
12777 candidates.
12778 (get_primary_binfo): Check that the shared virtual primary
12779 base candidate was found first.
12780 (accumulate_vtbl_inits): Don't do anything for non-vptr
12781 containing binfos. For case 1 primary virtual bases, keep
12782 checking that we've not emerged from the hierarchy of RTTI_BINFO.
12783
12784 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12785
12786 PR c++/3089
12787 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12788 hierarchy looking for primary bases for a ctor
12789 vtable. Recursively call oneself, if we meet our primary via
12790 this route and haven't met it yet via inheritance graph order.
12791
12792 2001-06-11 Mark Mitchell <mark@codesourcery.com>
12793
12794 * lang-options.h: Emit documentation for -fno-honor-std, not
12795 -fhonor-std.
12796
12797 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
12798
12799 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12800 Don't clobber delta.
12801 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12802
12803 2001-06-10 Mark Mitchell <mark@codesourcery.com>
12804 Gabriel Dos Reis <gdr@codesourcery.com>
12805
12806 * Make-lang.in (cp/call.o): Depend on diagnostic.h
12807 (cp/typeck.o): Depend on diagnostic.h
12808 (cp/typeck2.o): Depend on diagnostic.h
12809 (cp/repo.o): Depend on dignostic.h
12810 * typeck.c: #include diagnostic.h
12811 (convert_for_initialization): Remove extern declaration for
12812 warningcount and errorcount.
12813
12814 * call.c: #include diagnostic.h
12815 (convert_like_real): Remove extern declaration for warnincount and
12816 errorcount.
12817
12818 * repo.c: #include diagnostic.h
12819 * typeck2.c: #include diagnostic.h
12820
12821 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12822
12823 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12824 in previous change.
12825
12826 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12827
12828 PR c++/2929
12829 * friend.c (do_friend): Use push_decl_namespace for classes at
12830 namespace scope.
12831
12832 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12833 Jason Merrill <jason_merrill@redhat.com>
12834
12835 PR c++/3061
12836 * class.c (build_secondary_vtable): Use assert, rather than an error
12837 message.
12838 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12839 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12840 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12841 Don't set BINFO_VTABLE for a primary virtual base.
12842
12843 2001-06-07 Mark Mitchell <mark@codesourcery.com>
12844
12845 * decl.c (duplicate_decls): Update source position information
12846 when a template function is defined.
12847
12848 2001-06-07 Phil Edwards <pme@sources.redhat.com>
12849
12850 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
12851
12852 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
12853
12854 PR c++/2914
12855 * decl.c (pushtag): Don't push into a complete type's scope.
12856
12857 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
12858
12859 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12860 (struct lang_decl_flags): Lose generate_with_vtable_p.
12861 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12862 * class.c (copy_virtuals): Adjust.
12863 * decl2.c (mark_vtable_entries): Adjust.
12864 * method.c (make_thunk, build_vtable_entry): Adjust.
12865 * class.c (update_vtable_entry_for_fn): Only look as far as the
12866 first defining class.
12867 (build_vtbl_initializer): Put nothing in the slot for a function only
12868 defined in a lost primary virtual base.
12869 (add_vcall_offset_vtbl_entries_1): Use the same code for
12870 the lost primary case and the normal case.
12871 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12872 (get_vfield_offset, get_derived_offset): Lose.
12873 (dfs_find_final_overrider): Use look_for_overrides_here.
12874 (get_matching_virtual): New fn.
12875 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12876 not BV_VCALL_INDEX.
12877 * search.c (look_for_overrides_here): Split out from...
12878 (look_for_overrides_r): Here.
12879
12880 * class.c (find_final_overrider): Return error_mark_node on error.
12881
12882 * decl2.c (key_method): #if 0 accidental change.
12883
12884 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
12885
12886 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12887 (build_over_call): Likewise.
12888 * decl.c (grokparms): Likewise.
12889 * pt.c (tsubst_decl): Likewise.
12890 * typeck.c (convert_arguments): Likewise.
12891
12892 2001-06-05 Mark Mitchell <mark@codesourcery.com>
12893
12894 * semantics.c (begin_class_definition): Robustify.
12895
12896 * pt.c (instantiate_decl): Tell the repository code about the
12897 clones, not the cloned functions.
12898 * repo.c (repo_template_used): Explicitly instantiate the cloned
12899 function, not the clones.
12900
12901 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12902
12903 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12904 ICS_BAD_FLAG on created conversion.
12905 (compare_ics): Break out rank.
12906
12907 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12908
12909 * decl.c (xref_tag): Remove extraneous %s on dependent name
12910 lookup warning.
12911
12912 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12913
12914 * class.c (layout_vtable_decl): Fix off by one error on
12915 build_index_type.
12916 (build_vtt): Likewise.
12917 (build_ctor_vtbl_group): Likewise.
12918
12919 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12920
12921 * class.c (maybe_indent_hierarchy): New function.
12922 (dump_class_hierarchy_r): Add flags. Dump extra binfo
12923 information, if enabled. Use maybe_indent_hierarchy. Adjust
12924 output format.
12925 (dump_class_hierarchy): Adjust prototype. Adjust output format.
12926 (dump_array, dump_vtable, dump_vtt): New functions.
12927 (finish_struct_1): Adjust hierarchy dumping.
12928 (initialize_vtable): Call dump_vtable.
12929 (build_vtt): Call dump_vtt.
12930 (build_ctor_vtbl_group): Call dump_vtable.
12931 * decl2.c (flag_dump_class_layout): Remove.
12932 (cxx_decode_option): Remove dump translation unit
12933 and dump class hierarchy check. Call dump_switch_p.
12934 (finish_file): Adjust dumping.
12935 (dump.c): Only dump base classes if not TDF_SLIM.
12936 Only dump namespace members if not TDF_SLIM.
12937 * optimize.c (dump_function): New function.
12938 (optimize_function): Call dump_function.
12939 * semantics.c (expand_body): Use dump_enabled_p.
12940
12941 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
12942
12943 PR g++/2936
12944 Part missed from first commit
12945 * decl2.c (finish_anon_union): Copy context.
12946
12947 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
12948
12949 PR g++/2936
12950 * optimize.c (remap_decl): Remap anonymous aggregate members too.
12951
12952 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
12953
12954 PR g++/2823
12955 * semantics.c (expand_body): Don't optimize thunks.
12956
12957 2001-05-25 Sam TH <sam@uchicago.edu>
12958
12959 * cp-tree.h lex.h: Fix header include guards.
12960
12961 2001-05-25 Mark Mitchell <mark@codesourcery.com>
12962
12963 * decl.c (init_decl_processing): Tweak.
12964
12965 2001-05-24 Mark Mitchell <mark@codesourcery.com>
12966
12967 * decl.c (duplicate_decls): Tidy.
12968 (init_decl_processing): Always set flag_no_builtin.
12969
12970 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
12971
12972 PR c++/2184
12973 * decl2.c (do_local_using_decl): Push the decls, even in a
12974 template.
12975
12976 2001-05-22 Mark Mitchell <mark@codesourcery.com>
12977
12978 * optimize.c (initialize_inlined_parameters): Don't set
12979 TREE_READONLY for a VAR_DECL taking the place of an inlined
12980 PARM_DECL.
12981
12982 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
12983
12984 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12985 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12986 attribute.
12987
12988 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
12989
12990 * parse.y: Refer to compound literals as such, not as
12991 constructor-expressions.
12992
12993 2001-05-21 Mark Mitchell <mark@codesourcery.com>
12994
12995 * call.c (build_op_delete_call): Ignore exception-specifications
12996 when looking for matching delete operators.
12997 * init.c (build_new_1): Compute whether or not the allocation
12998 function used is a placement allocation function or not, and
12999 communicate this information to build_op_delete_call.
13000
13001 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
13002
13003 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
13004 (build_vtbl_ref): Adjust.
13005 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
13006 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
13007 Re-add vtable-gc.
13008 (unsupported_options): Correspondingly.
13009
13010 * decl2.c (maybe_make_one_only): Check flag_weak, not
13011 supports_one_only().
13012
13013 * cp-tree.def (START_CATCH_STMT): Lose.
13014 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
13015 * tree.c (cp_statement_code_p): Don't case it.
13016 * semantics.c (cp_expand_stmt): Likewise.
13017 * cp-tree.h (START_CATCH_TYPE): Lose.
13018 (HANDLER_TYPE): New.
13019 * except.c (expand_start_catch_block): Don't start any blocks.
13020 Return the type.
13021 (expand_end_catch_block): Don't end any blocks.
13022 * parse.y (handler): Don't pass anything from finish_handler_parms
13023 to finish_handler.
13024 * pt.c (tsubst_expr): Likewise.
13025 * semantics.c (begin_handler): Call note_level_for_catch here.
13026 (finish_handler_parms): Don't return anything.
13027 (genrtl_catch_block, begin_catch_block): Lose.
13028 (genrtl_handler): Call expand_start_catch here.
13029
13030 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
13031
13032 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
13033 (get_vtable_decl, build_vtt): Not here.
13034
13035 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
13036
13037 PR c++/2781
13038 * optimize.c (update_cloned_parm): Copy addressability and other
13039 flags.
13040
13041 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13042
13043 * pt.c (determine_specialization): Ignore artificial functions.
13044
13045 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
13046
13047 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
13048 (C_RID_CODE): Remove.
13049 * lex.c (cxx_init_options): Call set_identifier_size. Update.
13050 (init_parse): Don't do it here.
13051
13052 2001-05-18 Diego Novillo <dnovillo@redhat.com>
13053
13054 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
13055 function declaration to avoid stripping the symbol's attributes.
13056
13057 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
13058
13059 * decl.c (pushdecl): Adjust error string.
13060 (xref_tag): Adjust friend class injection warning. Remove the
13061 inherited name from the class shadowed scope.
13062
13063 2001-05-17 Mark Mitchell <mark@codesourcery.com>
13064
13065 * except.c (cp_protect_cleanup_actions): New function.
13066 (init_exception_processing): Don't set protect_cleanup_actions
13067 here. Do set lang_protect_cleanup_actions.
13068
13069 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13070
13071 * spew.c (read_token): Call yyerror on all unexpected tokens.
13072
13073 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13074
13075 * init.c (member_init_ok_or_else): Take a tree rather than
13076 string for name.
13077 (expand_member_init): Adjust.
13078
13079 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
13080
13081 * decl.c (duplicate_decls): Suppress warning about duplicate
13082 decls if the first decl is a friend.
13083
13084 2001-05-12 Zack Weinberg <zackw@stanford.edu>
13085
13086 * except.c (choose_personality_routine): Export. Add
13087 explanatory comment. Take an enum languages, not a boolean.
13088 (initialize_handler_parm): Adjust to match.
13089 * cp-tree.h: Prototype choose_personality_routine.
13090 * lex.c (handle_pragma_java_exceptions): New function.
13091 (init_cp_pragma): Register #pragma GCC java_exceptions.
13092
13093 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
13094
13095 * method.c (build_mangled_C99_name): Remove unused prototype.
13096
13097 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
13098
13099 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
13100 * typeck.c (get_member_function_from_ptrfunc,
13101 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
13102 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
13103
13104 Reverted Geoff Keating's 2001-05-03's patch.
13105
13106 2001-05-11 Ira Ruben <ira@apple.com>
13107
13108 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
13109
13110 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
13111
13112 * cp-tree.h (finish_label_expr, lookup_label): Delete.
13113 * parse.y: Update for '&&'; don't issue warning here.
13114 * semantics.c (finish_label_expr): Delete.
13115
13116 2001-05-07 Mark Mitchell <mark@codesourcery.com>
13117
13118 * splay-tree.h (splay_tree_max): New function.
13119 (splay_tree_min): Likewise.
13120
13121 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
13122
13123 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
13124 (pfn_vflag_identifier): Define.
13125 Update comment about layout of pointer functions.
13126 (build_ptrmemfunc1): Update prototype.
13127 (expand_ptrmemfunc_cst): Update prototype.
13128 * decl.c (initialize_predefined_identifiers): Initialize
13129 pfn_vflag_identifier.
13130 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
13131 an extra field to the type.
13132 * expr.c (cplus_expand_constant): Pass 'flag' between
13133 expand_ptrmemfunc_cst and build_ptrmemfunc1.
13134 * typeck.c (get_member_function_from_ptrfunc): When
13135 FUNCTION_BOUNDARY < 16, look at additional field to determine
13136 if a pointer-to-member is a real pointer or a vtable offset.
13137 (build_ptrmemfunc1): Add new parameter to contain extra field.
13138 (build_ptrmemfunc): Pass the extra field around.
13139 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
13140 (pfn_from_ptrmemfunc): Ignore the extra field.
13141
13142 2001-05-03 Mark Mitchell <mark@codesourcery.com>
13143
13144 * cp-tree.h (flag_inline_trees): Update documentation.
13145 * decl.c (init_decl_processing): Adjust handling of
13146 flag_inline_functions and flag_inline_trees to support -O3.
13147 (grokfndecl): Set DECL_INLINE on all functions if that's what
13148 the user requested.
13149 (save_function_data): Clear DECL_INLINE in
13150 current_function_cannot_inline is non-NULL.
13151 * decl2.c (flag_inline_trees): Update documentation.
13152
13153 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
13154
13155 * dump.c (cp_dump_tree, USING_STMT case): New case.
13156 * tree.c (cp_statement_code_p): Add USING_STMT.
13157 * decl2.c (do_using_directive): Add the using directive statement.
13158
13159 * tree.c (walk_tree): Reformat an if block.
13160
13161 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13162
13163 * decl.c (compute_array_index_type): Don't try to do anything with
13164 the indices when processing a template.
13165
13166 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13167
13168 * call.c: NULL_PTR -> NULL.
13169 * class.c: Likewise.
13170 * cvt.c: Likewise.
13171 * decl.c: Likewise.
13172 * decl2.c: Likewise.
13173 * except.c: Likewise.
13174 * init.c: Likewise.
13175 * rtti.c: Likewise.
13176 * search.c: Likewise.
13177 * tree.c: Likewise.
13178 * typeck.c: Likewise.
13179 * typeck2.c: Likewise.
13180
13181 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13182
13183 * decl2.c (do_using_directive): Revert previous patch.
13184
13185 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13186
13187 * cp-tree.def (USING_STMT): New statement node.
13188 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13189 * decl2.c (do_using_directive): Add USING_STMT to statement
13190 tree. Don't emit errors when processing template decl.
13191 * pt.c (tsubst_expr, USING_STMT case): New case.
13192 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13193
13194 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13195
13196 * call.c (build_new_op): Convert args from reference here.
13197 (build_conditional_expr): Don't convert here.
13198
13199 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13200
13201 * spew.c (last_token_id): New static variable.
13202 (read_token): Set it here.
13203 (yyerror): Use it here.
13204
13205 2001-04-30 Richard Henderson <rth@redhat.com>
13206
13207 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13208 * decl.c: Likewise.
13209
13210 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13211
13212 * gxxint.texi: Remove.
13213 * Make-lang.in: Remove all traces of gxxint.texi.
13214
13215 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
13216
13217 * decl2.c (start_static_initialization_or_destruction): Correct
13218 logic to handle the -fno-use-cxa-atexit case.
13219
13220 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13221
13222 * optimize.c (update_cloned_parm): New function.
13223 (maybe_clone_body): Use it. Update the `this' parameter too.
13224
13225 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
13226
13227 * decl2.c (unsupported_options): Add new-abi.
13228 * lang-options.h: Remove no longer supported options.
13229
13230 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13231
13232 * except.c (can_convert_eh): Don't check template parms,
13233 typename types etc.
13234
13235 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13236
13237 * optimize.c (maybe_clone_body): Copy parameter names and locations.
13238
13239 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13240
13241 * cp-tree.h (adjust_clone_args): Prototype new function.
13242 * class.c (adjust_clone_args): New function.
13243 * decl.c (start_function): Call it for in charge ctors.
13244
13245 2001-04-26 Mark Mitchell <mark@codesourcery.com>
13246
13247 * method.c (use_thunk): Make sure that thunks really are emitted
13248 when requested.
13249
13250 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
13251
13252 * mangle.c (write_chars): New macro.
13253 (hwint_to_ascii): New function
13254 (write_number): Use it.
13255 (write_integer_cst): Deal with really big numbers.
13256
13257 2001-04-25 Mark Mitchell <mark@codesourcery.com>
13258
13259 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13260 the clone.
13261
13262 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
13263
13264 * decl.c (grokdeclarator): Set context of namespace scope
13265 TYPE_DECLS.
13266
13267 2001-04-24 Zack Weinberg <zackw@stanford.edu>
13268
13269 * cp/optimize.c: Include hashtab.h.
13270 (struct inline_data): Add tree_pruner.
13271 (expand_call_inline, expand_calls_inline): Use it when calling
13272 walk_tree.
13273 (optimize_function): Initialize and free tree_pruner.
13274
13275 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13276
13277 Lazy __FUNCTION__ generation.
13278 * cp-tree.def (FUNCTION_NAME): Remove.
13279 * cp-tree.h (function_name_declared_p): Remove.
13280 (cp_fname_init): Prototype.
13281 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13282 don't call declare_function_name. Call start_fname_decls.
13283 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13284 clobber the line number.
13285 (cp_fname_init): New function.
13286 (start_function): Call start_fname_decls.
13287 (finish_function): Call finish_fname_decls.
13288 * lex.c (reswords): Add slots for __FUNCTION__ et al.
13289 (rid_to_yy): Add mappings for __FUNCTION__ et al.
13290 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13291 * parse.y (VAR_FUNC_NAME): New token.
13292 (primary): Add VAR_FUNC_NAME.
13293 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13294 generation.
13295 (tsubst, FUNCTION_NAME case): Remove.
13296 (tsubst_copy, FUNCTION_NAME case): Remove.
13297 (tsubst_expr, DECL_STMT case): Be careful with a
13298 DECL_PRETTY_FUNCTION_P.
13299 (instantiate_decl): Remove function_name_declared_p.
13300 * semantics.c (begin_compound_statement): Don't call
13301 declare_function_name here.
13302 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13303 (finish_translation_unit): Call finish_fname_decls.
13304 (expand_body): Remove function_name_declared_p.
13305 * typeck2.c (digest_init): Allow any ERROR_MARK.
13306
13307 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13308
13309 * pt.c (tsubst_decl): Use VOID_TYPE_P.
13310 * semantics.c: Fix some typos.
13311
13312 2001-04-23 Phil Edwards <pme@sources.redhat.com>
13313
13314 * cp/decl2.c (flag_honor_std): Always initialize to 1.
13315
13316 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13317
13318 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13319
13320 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
13321
13322 * except.c (build_throw): Wrap the initialization of the exception
13323 object in a MUST_NOT_THROW_EXPR.
13324 (do_free_exception): #if 0.
13325
13326 2001-04-20 Mark Mitchell <mark@codesourcery.com>
13327
13328 * cp-tree.h (finish_enum): Change prototype.
13329 * decl.c (finish_enum): Reorganize.
13330 * parse.y (structsp): Adjust calls to finish_enum.
13331
13332 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13333
13334 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13335 't' case.
13336
13337 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13338
13339 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13340 (layout_empty_base): Return at end flag.
13341 (build_base_field): Likewise.
13342 (build_base_fields): Likewise.
13343 (layout_virtual_bases): Don't add 1 to eoc value.
13344 (end_of_class): Use full size for empty bases.
13345 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13346 empty bases. Don't add 1 to eoc value. Only add trailing padding
13347 if we're an empty class with no empty bases.
13348 (dump_class_hierarchy): Dump size and alignment.
13349
13350 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13351
13352 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13353 ICS_BAD_FLAG.
13354
13355 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13356
13357 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13358 is found, look first if name does not match the structure name.
13359
13360 2001-04-19 Mark Mitchell <mark@codesourcery.com>
13361
13362 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13363 set.
13364 (SET_DECL_LANGUAGE): New macro.
13365 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13366 (pushdecl): Likewise.
13367 (build_library_fn_1): Likewise.
13368 (build_cp_library_fn): Likewise.
13369 (grokfndecl): Likewise.
13370 (grokvardecl): Mark `extern "C"' variables as having C linkage.
13371 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13372 * lex.c (retrofit_lang_decl): Likewise.
13373 * mangle.c (mangle_decl_string): Don't mangle the names of
13374 variables declared with C language linkage.
13375 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13376
13377 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
13378
13379 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13380 flag_access_control from uninitialized storage.
13381
13382 2001-04-15 Mark Mitchell <mark@codesourcery.com>
13383
13384 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13385 * mangle.c (write_pointer_to_member_type): Fix mangling of
13386 pointers to cv-qualified member function types.
13387
13388 * init.c (build_delete): Create a SAVE_EXPR for the address if
13389 we're going to use it more than once.
13390
13391 2001-04-13 Mark Mitchell <mark@codesourcery.com>
13392
13393 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13394 (expand_ptremfunc_cst): Change prototype.
13395 (delta2_from_ptrmemfunc): Remove.
13396 * expr.c (cplus_expand_constant): Adjust call to
13397 expand_ptrmemfunc_cst.
13398 * typeck.c (build_ptrmemfunc1): Simplify.
13399 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13400 results in a constant.
13401 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13402 (delta2_from_ptrmemfunc): Remove.
13403 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13404
13405 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
13406
13407 * cp-tree.h (decl_namespace_list): New macro.
13408 (struct saved_scope): Add decl_ns_list.
13409 * decl.c (mark_saved_scope): Mark it.
13410 * decl2.c: Lose static decl_namespace_list.
13411 (init_decl2): Don't save it.
13412
13413 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13414
13415 * cp-tree.h (warn_return_type, yylex): Delete redundant
13416 declarations.
13417
13418 * decl.c (current_class_depth, global_namespace): Likewise.
13419
13420 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13421
13422 * repo.c (flag_use_repository): Likewise.
13423
13424 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13425
13426 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13427 set_block, pushdecl, getdecls, gettags, init_decl_processing,
13428 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13429 lvalue_or_else, print_lang_statistics, comp_target_types,
13430 unsigned_type, signed_type, signed_or_unsigned_type,
13431 build_function_call, mark_addressable, incomplete_type_error):
13432 Delete redundant declarations.
13433
13434 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
13435
13436 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13437 (TYPE_ANONYMOUS_P): New macro.
13438 (TAGGED_TYPE_P): New macro.
13439 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13440 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13441 * tree.c (no_linkage_helper): Likewise.
13442 * semantics.c (begin_class_definition): Likewise.
13443 * pt.c (convert_template_argument): Likewise.
13444 * lex.c (check_for_missing_semicolon): Likewise.
13445
13446 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13447
13448 * class.c (dfs_unshared_virtual_bases): New function.
13449 (mark_primary_bases): Call it.
13450 (check_bases): Ignore virtual bases when determining
13451 nearly-emptiness.
13452
13453 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13454
13455 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13456
13457 2001-04-11 Mark Mitchell <mark@codesourcery.com>
13458
13459 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13460 cloned function to the clone.
13461
13462 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13463
13464 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13465
13466 * semantics.c: Include expr.h.
13467
13468 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
13469
13470 * method.c (implicitly_declare_fn): Commonize code for copy ctor
13471 and assignment op. Set TREE_USED for parameter.
13472
13473 2001-04-10 Mark Mitchell <mark@codesourcery.com>
13474
13475 * class.c (find_final_overrider_data): Add `candidates'.
13476 (dfs_find_final_overrider): Don't issue error messages
13477 prematurely.
13478 (find_final_overrider): Issue error messages here.
13479 (build_base_field): Don't warn about amgibuous direct bases here.
13480 (warn_about_ambiguous_direct_bases): New function.
13481 (layout_class_type): Use it.
13482
13483 2001-04-10 Richard Henderson <rth@redhat.com>
13484
13485 * typeck.c (build_array_ref): Push the array reference inside
13486 COMPOUND_EXPR and COND_EXPR.
13487
13488 2001-04-05 Mark Mitchell <mark@codesourcery.com>
13489
13490 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13491 * decl.c (duplicate_decls): Adjust accordingly.
13492 (maybe_commonize_var): Likewise.
13493 (grokfndecl): Likewise.
13494 (start_function): Likewise.
13495 (start_method): Likewise.
13496 * decl2.c (key_method): Likewise.
13497 (import_export_decl): Likewise.
13498 * method.c (implicitly_declare_fn): Likewise.
13499 * optimize.c (maybe_clone_body): Likewise.
13500
13501 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
13502
13503 * lang-specs.h: Add __DEPRECATED.
13504
13505 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
13506
13507 * search.c (get_dynamic_cast_base_type): When building a new
13508 constant, set its type to ssizetype.
13509
13510 2001-04-04 Jakub Jelinek <jakub@redhat.com>
13511
13512 * optimize.c (expand_call_inline): Only add newly inlined statements
13513 into inlined_stmts.
13514
13515 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13516
13517 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13518 (OPERATOR_FORMAT): Likewise.
13519 (OPERATOR_TYPENAME_FORMAT): Likewise.
13520 * operators.def: Remove old name-mangling information.
13521 * decl.c (grok_op_properties): Adjust accordingly.
13522 * lex.c (init_operators): Likewise.
13523 * rtti.c (get_tinfo_decl): Issue error messages about types that
13524 have variable size.
13525
13526 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13527
13528 * decl2.c (import_export_decl): Don't call import_export_class
13529 when processing an inline member function.
13530 * semantics.c (expand_body): Call import_export_decl before
13531 emitting inline functions.
13532
13533 2001-03-28 Richard Henderson <rth@redhat.com>
13534
13535 IA-64 ABI Exception Handling:
13536 * cp-tree.def (EH_SPEC_BLOCK): New.
13537 (MUST_NOT_THROW_EXPR): New.
13538 * cp-tree.h: Update changed function declarations.
13539 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13540 (CPTI_CALL_UNEXPECTED): New.
13541 (struct cp_language_function): Rename x_eh_spec_try_block
13542 to x_eh_spec_block.
13543 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13544 * decl.c (current_binding_level): If no current function
13545 bindings, revert to scope_chain.
13546 (initialize_predefined_identifiers): Remove __cp_push_exception.
13547 (store_parm_decls): Use begin_eh_spec_block.
13548 (finish_function): Use finish_eh_spec_block.
13549 (mark_lang_function): Update for name changes.
13550 * decl2.c (finish_file): No mark_all_runtime_matches.
13551 * dump.c (cp_dump_tree): Handle new tree codes.
13552 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13553 * except.c (catch_language_init, catch_language): Remove.
13554 (init_exception_processing): Don't set language code.
13555 Initialize call_unexpected_node, protect_cleanup_actions,
13556 eh_personality_libfunc, lang_eh_runtime_type.
13557 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13558 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13559 (prepare_eh_type): Split out type canonicalizations ...
13560 (build_eh_type_type): ... from here.
13561 (build_eh_type_type_ref): Remove.
13562 (mark_all_runtime_matches): Remove.
13563 (build_exc_ptr): New.
13564 (do_begin_catch, do_end_catch): New.
13565 (do_pop_exception): Remove.
13566 (build_terminate_handler): Remove.
13567 (choose_personality_routine): Split out language choice from ...
13568 (initialize_handler_parm): ... here.
13569 Use MUST_NOT_THROW_EXPR.
13570 (expand_start_catch_block): Use do_begin_catch. Simplify Java
13571 exception object handling.
13572 (expand_start_eh_spec, expand_end_eh_spec): Remove.
13573 (expand_exception_blocks, alloc_eh_object): Remove.
13574 (begin_eh_spec_block, finish_eh_spec_block): New.
13575 (do_allocate_exception, do_free_exception): New.
13576 (expand_throw): Merge into ...
13577 (build_throw): ... here. Update for abi.
13578 * expr.c (cplus_expand_expr): No expand_internal_throw.
13579 Handle MUST_NOT_THROW_EXPR.
13580 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13581 * semantics.c (*) Update for except.h name changes.
13582 (genrtl_try_block): No protect_with_terminate.
13583 (genrtl_eh_spec_block): New.
13584 (genrtl_handler): Don't emit the goto here.
13585 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13586 (genrtl_finish_function): Don't expand_exception_blocks.
13587 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13588
13589 2001-03-28 Richard Henderson <rth@redhat.com>
13590
13591 * decl.c (struct named_label_list): Rename eh_region to
13592 in_try_scope, add in_catch_scope.
13593 (struct binding_level): Rename eh_region to is_try_scope,
13594 add is_catch_scope.
13595 (note_level_for_try): Rename from note_level_for_eh.
13596 (note_level_for_catch): New.
13597 (poplevel): Copy both is_try_scope and is_catch_scope to
13598 the named_label_list struct.
13599 (check_previous_goto_1): Don't check for catch block via
13600 DECL_ARTIFICIAL; use in_try_scope instead.
13601 (check_goto): Likewise.
13602 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13603 * except.c (expand_start_catch_block): Call note_level_for_catch.
13604 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13605
13606 2001-03-27 Richard Henderson <rth@redhat.com>
13607
13608 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13609 exceptions_via_longjmp.
13610
13611 2001-03-27 Phil Edwards <pme@sources.redhat.com>
13612
13613 * pt.c (check_default_tmpl_args): Make error messages clearer.
13614
13615 2001-03-26 Phil Edwards <pme@sources.redhat.com>
13616
13617 * error.c: Also undefine 'A' macro used for cp_printers definition.
13618
13619 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13620
13621 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13622
13623 2001-03-26 Mike Yang <yang@research.att.com>
13624 Mark Mitchell <mark@codesourcery.com>
13625
13626 * dump.c (dump_access): New function.
13627 (cp_dump_tree): Use it. Dump basetype information for class
13628 types.
13629
13630 2001-03-26 Mark Mitchell <mark@codesourcery.com>
13631
13632 * Makefile.in (optimize.o): Depend on params.h.
13633 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13634 (init_decl_processing): Set flag_no_inline when doing
13635 inlining-on-trees.
13636 * optimize.c: Include params.h.
13637 (struct inline_data): Improve documentation of FNS. Add
13638 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13639 (INSNS_PER_STMT): New macro.
13640 (remap_block): Use CLONING_P.
13641 (inlinable_function_p): Don't inline big functions.
13642 (expand_call_inline): Keep track of how much inlining we've done.
13643 (optimize_function): Set FIRST_INLINED_FN.
13644 (maybe_clone_body): Set CLONING_P.
13645 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13646 tree nodes.
13647 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13648 rest_of_compilation. Clear DECL_RTL for local variables
13649 afterwards.
13650 (clear_decl_rtl): New function.
13651
13652 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
13653
13654 Implement DR 209
13655 * cp-tree.h (skip_type_access_control,
13656 reset_type_access_control): Prototype.
13657 * decl.c (grokdeclarator): Access of friends is not checked.
13658 * parse.y (component_decl_list): Reset type access control.
13659 * semantics.c (decl_type_access_control): Clear
13660 current_type_lookups.
13661 (save_type_access_control): Don't save if not deferring.
13662 (skip_type_access_control, reset_type_access_control): New
13663 functions.
13664 (begin_class_definition): Do type access control for basetypes.
13665 Start deferred access control.
13666 (finish_class_definition): Resume immediate access control if
13667 this is a local class.
13668
13669 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13670
13671 * class.c (add_method): Use memcpy/memmove, not bcopy.
13672
13673 * decl.c (duplicate_decls): Likewise.
13674
13675 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13676
13677 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13678 not `_'.
13679
13680 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13681
13682 * decl.c (local_names): Define.
13683 (push_local_name): New.
13684 (grok_reference_init): Return init if initializing static reference
13685 variable with non-constant instead of emitting it.
13686 Move expand_static_init call to cp_finish_decl.
13687 (layout_var_decl): Call push_local_name.
13688 (maybe_commonize_var): Allow inlining functions even if they have
13689 static local variables, use comdat_linkage for them if flag_weak.
13690 (check_initializer): Call obscure_complex_init if
13691 grok_reference_init returned nonzero.
13692 (save_function_data): Clear x_local_names.
13693 (pop_cp_function_context): Free x_local_names.
13694 (mark_inlined_fns): Remove.
13695 (mark_lang_function): Mark x_local_names.
13696 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13697 Mark inlined_fns as tree, remove call to mark_inlined_fns.
13698 * class.c (alter_access): Ensure DECL_ACCESS is never set if
13699 DECL_DISCRIMINATOR_P.
13700 * cp-tree.h (cp_language_function): Add x_local_names.
13701 (lang_decl_flags): Add discriminator into u2.
13702 (lang_decl_inlined_fns): Remove.
13703 (lang_decl): inlined_fns is now a TREE_VEC.
13704 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13705 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13706 TREE_VEC, not a custom structure.
13707 (optimize_function): Likewise.
13708 * mangle.c (discriminator_for_local_entity): Discriminate among
13709 VAR_DECL local entities.
13710 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13711 is not valid.
13712
13713 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
13714
13715 Add support for Java interface method calls.
13716 * cp-tree.h (struct lang_type): Add java_interface flag.
13717 (TYPE_JAVA_INTERFACE): New macro.
13718 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13719 by setting TYPE_JAVA_INTERFACE.
13720 * call.c (java_iface_lookup_fn): New static.
13721 (build_over_call): If calling a method declared in a
13722 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13723 expression which resolves the function address.
13724 (build_java_interface_fn_ref): New function.
13725
13726 2001-03-22 Richard Henderson <rth@redhat.com>
13727
13728 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13729 * except.c: Don't include it.
13730
13731 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13732 based on an idea from Joe Buck <jbuck@synopsys.com>
13733
13734 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13735 New nonterminals.
13736 (data_def, component_decl): Add reductions to bad_decl.
13737
13738 2001-03-22 Jakub Jelinek <jakub@redhat.com>
13739
13740 * method.c (do_build_assign_ref): Don't use build_modify_expr for
13741 anonymous aggregates, since they don't have assignment operator
13742 method.
13743 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13744 assignment operators for anonymous structure fields.
13745
13746 2001-03-21 Jason Merrill <jason@redhat.com>
13747
13748 * pt.c (instantiate_decl): Abort if we see a member constant
13749 instantiation that doesn't already have its initializer.
13750 Downgrade explicit instantiation without definition to pedwarn.
13751
13752 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13753 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13754 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13755
13756 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13757 (pending_vtables): Remove.
13758 * decl2.c (pending_vtables): Remove.
13759 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13760 CLASSTYPE_VTABLE_NEEDS_WRITING.
13761 (import_export_class): Likewise.
13762 (init_decl2): Don't mark pending_vtables.
13763 * lex.c (handle_pragma_vtable): Just sorry.
13764 * pt.c (instantiate_class_template): Don't mess with
13765 CLASSTYPE_VTABLE_NEEDS_WRITING.
13766 (mark_class_instantiated): Likewise.
13767 * ptree.c (print_lang_type): Don't print it.
13768 * semantics.c (begin_class_definition): Don't set it.
13769
13770 * pt.c (template_tail): Replace with last_pending_template.
13771 (maybe_templates, maybe_template_tail): Remove.
13772 (add_pending_template): Adjust.
13773 (instantiate_pending_templates): Adjust.
13774
13775 * cp-tree.h (struct saved_scope): Remove lang_stack field.
13776 (current_lang_stack): Remove.
13777 * decl.c (maybe_push_to_top_level): Don't initialize it.
13778 (duplicate_decls): Use current_lang_depth.
13779 (xref_basetypes): Likewise.
13780 * class.c (current_lang_depth): New fn.
13781 (push_lang_context): Use more varray functionality.
13782 (pop_lang_context): Likewise.
13783
13784 * error.c (GLOBAL_THING): Always use '__'.
13785
13786 2001-03-21 Mark Mitchell <mark@codesourcery.com>
13787
13788 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13789
13790 * mangle.c (mangle_decl_string): Mangle the names of overloaded
13791 operators, even when they have `extern "C"' linkage.
13792
13793 2001-03-19 Mark Mitchell <mark@codesourcery.com>
13794
13795 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13796 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13797 where it's not necessary.
13798 (add_method): Remove optimization involving comparison of
13799 DECL_ASSEMBLER_NAME.
13800 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13801 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13802 where it's not necessary.
13803 (check_methods): Likewise.
13804 (build_clone): Likewise.
13805 (built_vtt): Likewise.
13806 * cp-tree.h (DECL_NEEDED_P): Likewise.
13807 * decl.c (pushtag): Likewise.
13808 (duplicate_decls): Likewise.
13809 (pushdecl): Likewise.
13810 (builtin_function): Likewise.
13811 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13812 (build_cp_library_fn): Likewise.
13813 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13814 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13815 where it's not necessary.
13816 (make_rtl_for_nonlocal_decl): Likewise.
13817 (cp_finish_decl): Likewise.
13818 (grokfndecl): Likewise.
13819 (grokvardecl): Likewise.
13820 (grokdeclarator): Likewise.
13821 (start_function): Likewise.
13822 (cp_missing_return_ok_p): Likewise.
13823 * decl2.c (grokclassfn): Likewise.
13824 (check_classfn): Likewise.
13825 (finish_static_data_member_decl): Likewise.
13826 (grokfield): Likewise.
13827 * error.c (GLOBAL_IORD_P): Remove.
13828 (dump_global_iord): Improve output.
13829 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13830 * except.c (nothrow_libfn_p): Summarily reject any function not in
13831 namespace-scope.
13832 * init.c (build_java_class_ref): Don't explicitly set
13833 DECL_ASSEMBLER_NAME after calling mangle_decl.
13834 * mangle.c (mangle_decl_string): Handle extern "C" functions.
13835 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13836 * method.c (set_mangled_name_for_decl): Don't explicitly set
13837 DECL_ASSEMBLER_NAME after calling mangle_decl.
13838 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13839 IDENTIFIER_GLOBAL_VALUE for the thunk.
13840 * pt.c (set_mangled_name_for_template_decl): Remove.
13841 (check_explicit_specialization): Don't use it.
13842 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13843 (tsubst_friend_function): Likewise.
13844 (tsubst_decl): Likewise.
13845 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13846 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13847 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13848 where it's not necessary.
13849 (tinfo_base_init): Likewise.
13850 (create_real_tinfo_var): Likewise.
13851 * search.c (looup_field_1): Likewise.
13852 * semantics.c (finish_named_return_value): Likewise.
13853 * tree.c (init_tree): Set lang_set_decl_assembler_name.
13854
13855 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
13856
13857 Correct semantics restrictions checking in throw-expression.
13858 * except.c (is_admissible_throw_operand): New function.
13859 (build_throw): Use it.
13860
13861 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13862
13863 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13864 and its ilk.
13865
13866 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13867
13868 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13869 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13870 * decl.c (duplicate_decls): Likewise.
13871 (builtin_function): Likewise.
13872 (build_library_fn): Likewise.
13873 (build_cp_library_fn): Likewise.
13874 (check_initializer): Likewise.
13875 (cp_finish_decl): Likewise.
13876 * decl2.c (grokfield): Likewise.
13877 (grok_function_init): Remove #if 0'd code.
13878 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13879 * friend.c (do_friend): Likewise.
13880 * init.c (get_temp_regvar): Likewise.
13881 * method.c (make_thunk): Likewise.
13882 * pt.c (tsubst_friend_function): Likewise.
13883 (tsubst_decl): Likewise.
13884 (regenerate_decl_from_template): Likewise.
13885 * semantics.c (genrtl_named_return_value): Likewise.
13886 (expand_body): Likewise.
13887 (genrtl_finish_function): Likewise.
13888 * tree.c (cp_tree_equal): Likewise.
13889
13890 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
13891
13892 * call.c (convert_like_real): Add extra semantics to INNER
13893 parameter. Don't convert to temporary if a user conversion
13894 gives us an lvalue that we're about to bind to a reference.
13895 Set INNER to indicate pending reference binding on recursive
13896 calls.
13897
13898 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13899
13900 * cp/lex.c: Delete duplicate pending_lang_change.
13901
13902 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13903
13904 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13905 Similarly.
13906 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13907 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13908
13909 2001-03-09 Zack Weinberg <zackw@stanford.edu>
13910
13911 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13912
13913 2001-03-08 Stan Shebs <shebs@apple.com>
13914
13915 * cp-tree.h (set_identifier_local_value): Remove unused decl.
13916
13917 2001-03-06 Zack Weinberg <zackw@stanford.edu>
13918
13919 * spew.c: Remove references to CPP_OSTRING.
13920
13921 2001-03-06 Andrew Haley <aph@redhat.com>
13922
13923 * typeck.c (convert_arguments): Check that we have an fndecl.
13924
13925 2001-03-05 Andrew Haley <aph@redhat.com>
13926
13927 * typeck.c (convert_arguments): Don't do ellipsis conversion for
13928 __built_in_constant_p.
13929
13930 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13931
13932 * typeck.c (build_static_cast): Allow enum to enum conversions
13933 as per DR 128.
13934
13935 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13936
13937 * class.c (check_field_decls): Pointers to member do not a
13938 non-pod struct make, as per DR 148.
13939
13940 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13941
13942 * call.c (joust): cp_pedwarn when using gnu extension concerning
13943 worst conversion sequences.
13944
13945 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13946
13947 * decl.c: Replace all uses of 'boolean' with 'bool'.
13948
13949 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13950
13951 * lang-specs.h: Add zero initializer for cpp_spec field to
13952 all array elements that need one. Don't put an #ifdef inside
13953 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13954 use it.
13955
13956 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13957
13958 Implement using decls inside template functions.
13959 * decl2.c (validate_nonmember_using_decl): Don't special case
13960 fake_std_node in the global namespace. Don't reject early when
13961 processing a template.
13962 (do_local_using_decl): Add to statement tree. Don't do further
13963 processing when building a template.
13964 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13965
13966 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13967
13968 * decl2.c (do_nonmember_using_decl): Don't complain if we find
13969 same function. Do complain about ambiguating extern "C"
13970 declarations.
13971
13972 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
13973
13974 Remove floating point and complex type template constant parms.
13975 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13976 COMPLEX_TYPE extensions.
13977 (invalid_nontype_parm_type_p): Likewise.
13978
13979 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
13980
13981 * except.c (call_eh_info): Revert "match_function"'s type.
13982
13983 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
13984
13985 Fix ctor vtable vcall offsets.
13986 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13987 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13988 (get_matching_base): Remove.
13989 (get_original_base): New function.
13990 (build_vtbl_initializer): Initialize vid.rtti_binfo.
13991 Use a virtual thunk for a ctor vtable with an index
13992 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13993 primary base within a constructor vtable. Only set
13994 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13995 when primary base has been lost.
13996 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13997
13998 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
13999
14000 * call.c (joust): Ensure more_specialized()'s argument length
14001 parameter has correct value for constructors.
14002
14003 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
14004
14005 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
14006
14007 * decl.c (mark_inlined_fns): Prototype.
14008
14009 2001-02-22 Mark Mitchell <mark@codesourcery.com>
14010
14011 * spew.c (yylex): Correct handling of friends.
14012
14013 2001-02-22 Mark Mitchell <mark@codesourcery.com>
14014
14015 * mangle.c (write_encoding): Pass write_function_type the
14016 FUNCTION_DECL for the function being encoded.
14017 (write_function_type): Pass it along to write_bare_function_type.
14018 (write_bare_function_type): Pass it along to write_method_parms.
14019 (write_method_parms): Don't mangle the compiler-generated
14020 parameters to a constructor or destructor.
14021
14022 2001-02-22 Andreas Jaeger <aj@suse.de>
14023
14024 * optimize.c: Include toplev.h for
14025 note_deferral_of_defined_inline_function prototype.
14026
14027 2001-02-22 Jakub Jelinek <jakub@redhat.com>
14028
14029 * cp-tree.h (struct lang_decl_inlined_fns): New.
14030 (struct lang_decls): Add inlined_fns.
14031 (DECL_INLINED_FNS): New macro.
14032 * optimize.c (struct inline_data): Add inlined_fns.
14033 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
14034 (inlinable_function_p): Likewise, fix typo in comment,
14035 function is not inlinable if it already inlined function currently
14036 being optimized.
14037 (expand_call_inline): Add fn to inlined_fns if necessary.
14038 (optimize_function): Initialize inlined_fns.
14039 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
14040 * decl.c (mark_inlined_fns): New function.
14041 (lang_mark_tree): Call it.
14042
14043 2001-02-21 Jason Merrill <jason@redhat.com>
14044
14045 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
14046 (DECL_UNINLINABLE): Move to middle-end.
14047
14048 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
14049 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
14050 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
14051 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
14052 parms and outer BLOCK. note_deferral_of_defined_inline_function.
14053
14054 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
14055 second parm of op=.
14056
14057 2001-02-19 Mark Mitchell <mark@codesourcery.com>
14058
14059 * decl2.c (set_decl_namespace): Allow explicit instantiations in
14060 any namespace.
14061
14062 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14063
14064 * optimize.c (expand_call_inline): Don't walk subtrees of type
14065 nodes.
14066
14067 2001-02-18 Mark Mitchell <mark@codesourcery.com>
14068
14069 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
14070 for a destructor.
14071
14072 2001-02-18 Jason Merrill <jason@redhat.com>
14073
14074 Do put the VTT parameter in DECL_ARGUMENTS.
14075 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
14076 (current_vtt_parm): New macro.
14077 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
14078 (DECL_HAS_VTT_PARM_P): New macro.
14079 (DECL_VTT_PARM): Remove.
14080 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
14081 * decl.c (duplicate_decls): Only copy the operator code if
14082 appropriate.
14083 (start_function): Set current_vtt_parm.
14084 (lang_mark_tree): Don't mark vtt_parm.
14085 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
14086 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
14087 * class.c (build_clone): Maybe remove the VTT parm.
14088 * optimize.c (maybe_clone_body): Set up the VTT parm.
14089 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
14090 * call.c (build_over_call): Just allow the VTT arg.
14091 * method.c (make_thunk): Don't set DECL_VTT_PARM.
14092 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
14093 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
14094 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
14095 * error.c (dump_function_decl): Likewise.
14096 * call.c (build_user_type_conversion_1, convert_like_real): Abort
14097 if we try to call a constructor with in-charge or VTT parms.
14098 * method.c (skip_artificial_parms_for): New fn.
14099 * call.c (add_function_candidate, build_over_call): Call it.
14100 * call.c (build_new_method_call): Use current_vtt_parm.
14101 * init.c (expand_virtual_init): Likewise.
14102 * class.c (same_signature_p): No longer static.
14103 * cp-tree.h: Declare it.
14104 * search.c (look_for_overrides_r): Use it.
14105
14106 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14107
14108 * cp-tree.h (new_abi_rtti_p): Remove.
14109 (name_mangling_version): Likewise.
14110 (flag_do_squangling): Likewise.
14111 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
14112 * decl.c (grokfndecl): Likewise.
14113 * decl2.c (name_mangling_version): Remove.
14114 (flag_do_squangling): Likewise.
14115 (lang_f_options): Remove `squangle'.
14116 (unsupported_options): Add `squangle'.
14117 (cxx_decode_option): Issue a warning about uses of
14118 -fname-mangling-version.
14119 (finish_file): Remove old ABI support.
14120 * pt.c (check_explicit_specialization): Likewise.
14121 (tsubst_decl): Likewise.
14122 * rtti.c (init_rtti_processing): Likewise.
14123 (build_headof): Likewise.
14124 (get_tinfo_decl_dynamic): Likewise.
14125 (tinfo_from_decl): Likewise.
14126 (build_dynamic_cast_1): Likewise.
14127 (synthesize_tinfo_var): Likewise.
14128 * init.c (build_new): Allow enumeration types for the array-bounds
14129 in a direct-new-declarator.
14130
14131 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
14132
14133 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
14134 TREE_PROTECTED from the template being specialized.
14135
14136 2001-02-17 Jason Merrill <jason@redhat.com>
14137
14138 * decl2.c (build_artificial_parm): Set TREE_READONLY.
14139
14140 * decl.c (bad_specifiers): Allow throw specs on things with
14141 pointer-to-function or -member-function type.
14142 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
14143 a pmf.
14144
14145 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14146
14147 * call.c (check_dtor_name): Handle template names correctly.
14148
14149 2001-02-16 Jason Merrill <jason@redhat.com>
14150
14151 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
14152 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
14153 * optimize.c (maybe_clone_body): Don't substitute it.
14154 * call.c (build_new_method_call): Check in_chrg instead.
14155 * init.c (expand_virtual_init): Likewise.
14156
14157 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
14158
14159 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
14160 class-type introduces at least a type-name.
14161
14162 2001-02-16 Jakub Jelinek <jakub@redhat.com>
14163
14164 * call.c (convert_like_real): Create a temporary for non-lvalue.
14165
14166 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
14167
14168 * cp-tree.h: Fix typos in comments.
14169
14170 2001-02-16 Jason Merrill <jason@redhat.com>
14171
14172 * optimize.c (remap_block): If we're compiling a clone, pass the
14173 new block to insert_block.
14174
14175 2001-02-16 Mark Mitchell <mark@codesourcery.com>
14176
14177 * semantics.c (finish_asm_stmt): Robustify.
14178
14179 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14180
14181 * pt.c (push_template_decl_real): Don't remangle the name of a
14182 class template.
14183
14184 2001-02-15 Jim Meyering <meyering@lucent.com>
14185
14186 * Make-lang.in (c++.install-common): Depend on installdirs.
14187 (c++.install-info): Likewise.
14188 (c++.install-man): Likewise.
14189
14190 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14191
14192 * typeck2.c (build_m_component_ref): Robustify.
14193
14194 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
14195
14196 * friend.c (do_friend): Don't take the nested [template] class
14197 into account when deciding whether to warn about the friend
14198 function not referring to a template function.
14199
14200 2001-02-14 Jakub Jelinek <jakub@redhat.com>
14201
14202 * typeck.c (build_unary_op): Clarify error message.
14203
14204 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
14205
14206 * parse.y (component_constructor_declarator): allow optional
14207 parentheses around constructor class name.
14208
14209 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14210
14211 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14212 section.
14213 * init.c (emit_base_init): Remove incorrect comment about
14214 virtual bases.
14215 * method.c (make_thunk): Fix comment alignment.
14216
14217 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14218
14219 Kill remnants of this is variable.
14220 * cp-tree.h (flag_this_is_variable): Remove.
14221 * decl2.c (flag_this_is_variable): Remove.
14222 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14223 (build_vbase_path): The path is non-static, even in a cdtor.
14224 (resolves_to_fixed_type_p): Add additional return value.
14225 * search.c (init_vbase_pointers): Adjust.
14226 * tree.c (lvalue_p_1): Adjust.
14227 * typeck.c (mark_addressable): Adjust.
14228
14229 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14230
14231 * pt.c (unify): Don't check cv quals of array types.
14232
14233 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14234
14235 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14236 check whether we already have the type.
14237
14238 2001-02-13 Mark Mitchell <mark@codesourcery.com>
14239
14240 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14241 * call.c (build_op_delete_call): Simplify to remove duplicate
14242 code.
14243 * class.c (clone_function_decl): Don't build the deleting variant
14244 of a non-virtual destructor.
14245 * decl.c (finish_destructor_body): Don't call delete if this is a
14246 non-virtual destructor.
14247 * init.c (build_delete): Explicitly call `operator delete' when
14248 deleting an object with a non-virtual destructor.
14249
14250 2001-02-13 Jason Merrill <jason@redhat.com>
14251
14252 * lang-specs.h: Add more __EXCEPTIONS.
14253
14254 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14255
14256 * typeck2.c (process_init_constructor): Check
14257 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14258
14259 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14260
14261 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14262 Remove spurious information in comment. Allow further
14263 adjustments of REFERENCE_TYPE args.
14264
14265 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14266
14267 * errfn.c (cp_deprecated): Tweak diagnostic text.
14268 * parse.y (new_initializer): Deprecate initializer lists
14269 extension.
14270
14271 2001-02-12 Mark Mitchell <mark@codesourcery.com>
14272
14273 Remove old ABI support.
14274
14275 2001-02-11 Mark Mitchell <mark@codesourcery.com>
14276
14277 * decl2.c (flag_vtable_thunks): Always set it to 1.
14278 (flag_new_abi): Likewise.
14279 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14280
14281 * Makefile.in (g++spec.o): Fix typo.
14282
14283 2001-02-09 Jason Merrill <jason@redhat.com>
14284
14285 * lang-specs.h: Restore definition of __EXCEPTIONS.
14286
14287 2001-02-08 Jason Merrill <jason@redhat.com>
14288
14289 * search.c (shared_member_p): New function.
14290 (lookup_field_r): Use it.
14291 * cp-tree.h (SHARED_MEMBER_P): Remove.
14292
14293 * method.c (process_overload_item): Handle template-dependent array
14294 bounds.
14295 * pt.c (type_unification_real): If we end up with undeduced nontype
14296 parms, try again.
14297
14298 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14299 types.
14300
14301 * typeck2.c (friendly_abort): Don't say anything if we have
14302 earlier errors or sorries.
14303
14304 * decl.c (check_tag_decl): Notice attempts to redefine bool and
14305 wchar_t. Ignore if in_system_header.
14306
14307 * decl.c (maybe_push_cleanup_level): New fn...
14308 (start_decl_1): ...split out from here.
14309 * cvt.c (build_up_reference): Use it.
14310 * cp-tree.h: Declare it.
14311
14312 2001-02-07 Mark Mitchell <mark@codesourcery.com>
14313
14314 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14315 spec.
14316
14317 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
14318
14319 * pt.c (lookup_template_class): Make sure it's a primary
14320 template or template_template_parm when called from the parser.
14321 (instantiate_template_class): Add assertion.
14322
14323 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
14324
14325 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14326 from error_mark_node.
14327
14328 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
14329
14330 Fix specification and implementation bugs in V3 ABI
14331 construction vtables.
14332 * cp-tree.h (flag_dump_class_layout): New flag.
14333 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14334 (BINFO_LOST_PRIMARY_P): New flag.
14335 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14336 (BINFO_PRIMARY_MARKED_P): Rename to ...
14337 (BINFO_PRIMARY_P): ... here.
14338 (binfo_via_virtual): New prototype.
14339 * decl2.c (flag_dump_class_layout): New flag.
14340 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14341 use `=' as a file name separator.
14342 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14343 bases.
14344 (build_vtbl_address): If this is a virtual primary base, then
14345 get the vtbl of what it is ultimately primary for.
14346 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14347 for BINFO_PRIMARY_P.
14348 (dfs_skip_nonprimary_vbases_markedp): Likewise.
14349 (get_shared_vbase_if_not_primary): Likewise.
14350 (dfs_get_pure_virtuals): Likewise.
14351 (expand_upcast_fixups): Likewise.
14352 (fixup_virtual_upcast_offsets): Likewise.
14353 (dfs_find_vbase_instance): Likewise.
14354 (find_vbase_instance): Likewise.
14355 (binfo_from_vbase): Adjust comment to reflect reality.
14356 (binfo_via_virtual): New function.
14357 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14358 for binfo walking during VTT construction.
14359 (dfs_mark_primary_bases): Remove.
14360 (force_canonical_binfo_r): New function.
14361 (force_canonical_binfo): New function.
14362 (mark_primary_virtual_base): New function.
14363 (mark_primary_bases): Walk in inheritance graph order, use
14364 mark_primary_virtual_base.
14365 (determine_primary_base): Use some more intermediate variables.
14366 (dfs_find_final_overrider): Don't check for overriding along a
14367 virtual path.
14368 (dfs_modify_vtables): Walk into primary virtual bases too.
14369 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14370 (build_base_fields): Likewise.
14371 (dfs_set_offset_for_unshared_vbases): Likewise.
14372 (layout_virtual_bases): Likewise.
14373 (end_of_class): Likewise.
14374 (finish_struct_1): Call dump_class_hierarchy, if requested.
14375 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14376 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14377 (dump_class_hierarchy): Add file parameter. Append to file, if
14378 required.
14379 (finish_vtbls): Adjust accumulate_vtbl_inits call.
14380 Use canonical base for virtual bases.
14381 (build_vtt): Add more comments. Adjust build_vtt_inits call.
14382 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14383 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14384 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14385 virtual VTTs.
14386 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14387 from DATA. We want virtual primary bases and all bases via virtual.
14388 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14389 virtual base when not a construction vtable.
14390 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14391 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14392 Use canonical bases when processing virtual bases.
14393 (accumulate_vtbl_inits): We're interested in any base via a
14394 virtual path.
14395 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14396 within a construction vtable, determine what is being overridden.
14397 (build_vtbl_initializer): Add more comments
14398 (add_vcall_offset_vtbl_entries_1): Adjust comment.
14399 (build_rtti_vtbl_entries): Check if the base has lost its
14400 primary.
14401
14402 2001-02-05 Mark Mitchell <mark@codesourcery.com>
14403
14404 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14405
14406 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14407
14408 * decl.c (pushdecl): Call abort instead of fatal.
14409 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14410 * init.c (build_new_1): Likewise.
14411 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14412 * decl.c (build_typename_type): hash_table_init now returns void.
14413 decl.c (init_decl_processing): Make an error non-fatal.
14414
14415 2001-02-04 Mark Mitchell <mark@codesourcery.com>
14416
14417 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14418 Document.
14419 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14420 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14421 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14422 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14423 * decl.c (maybe_commonize_var): Use the new name-mangling where
14424 appropriate.
14425 * decl2.c (comdat_linkage): Enhance comments. Make all
14426 compiler-generated things static, if COMDAT is not available.
14427 (get_tinfo_decl): Do not make typeinfo objects that belong in the
14428 library COMDAT.
14429 (tinfo_base_init): Use the correct mangled name for typeinfo
14430 strings, and push them into the global scope.
14431 (typeinfo_in_lib_p): New function.
14432 (synthesize_tinfo_var): Use it.
14433 (create_real_tinfo_var): Likewise.
14434
14435 2001-02-03 Jakub Jelinek <jakub@redhat.com>
14436
14437 * decl.c (push_class_binding): Use context_for_name_lookup instead
14438 of CP_DECL_CONTEXT.
14439 * search.c (context_for_name_lookup): Remove static. Check for NULL
14440 context in the loop.
14441 * cp-tree.h (context_for_name_lookup): Add prototype.
14442
14443 2001-02-02 Jakub Jelinek <jakub@redhat.com>
14444
14445 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14446 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14447 Remove.
14448 * call.c (convert_class_to_reference, build_user_type_conversion_1,
14449 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14450
14451 2001-02-02 Mark Mitchell <mark@codesourcery.com>
14452
14453 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14454 of macros used when compiling g++spec.c.
14455 * g++spec.c (lang_specific_driver): Link with the shared
14456 libgcc by default.
14457
14458 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
14459
14460 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14461 make_reference_declarator, make_call_declarator), method.c
14462 (implicitly_declare_fn), parse.y (namespace_using_decl,
14463 notype_unqualified_id, expr_or_declarator, new_type_id,
14464 after_type_declarator, direct_after_type_declarator,
14465 notype_declarator, complex_notype_declarator,
14466 complex_direct_notype_declarator, qualified_id,
14467 notype_qualified_id, overqualified_id, direct_new_declarator,
14468 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14469 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14470 instead of build_parse_node.
14471
14472 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14473
14474 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14475 (minus_one_node): Moved to top level gcc directory. Renamed
14476 to integer_minus_one_node.
14477
14478 * init.c (init_init_processing): Don't set minus_one_node.
14479 (build_vec_init): Use integer_minus_one_node.
14480
14481 * rtti.c (get_tinfo_decl_dynamic): Likewise.
14482
14483 2001-01-28 Jakub Jelinek <jakub@redhat.com>
14484
14485 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14486 identical and they would be replaced with constant, remove
14487 MODIFY_EXPR from the tree.
14488
14489 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14490
14491 * Make-lang.in: Remove all dependencies on defaults.h.
14492 * call.c: Don't include defaults.h.
14493 * decl.c: Likewise.
14494 * decl2.c: Likewise.
14495 * except.c: Likewise.
14496 * pt.c: Likewise.
14497 * rtti.c: Likewise.
14498 * tree.c: Likewise.
14499 * typeck.c: Likewise.
14500
14501 2001-01-25 Jakub Jelinek <jakub@redhat.com>
14502
14503 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14504 operators even in "C" linkage.
14505 * method.c (set_mangled_name_for_decl): Likewise.
14506 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14507 overloaded operators in "C" linkage.
14508
14509 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14510
14511 * pt.c (tsubst_decl): Remove IN_DECL parameter.
14512 (tsubst_arg_types): Check parameter is not void.
14513 (tsubst): Adjust tsubst_decl call.
14514
14515 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14516
14517 * call.c (add_builtin_candidate): Quote std properly, from
14518 previous change.
14519
14520 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14521
14522 * pt.c (check_explicit_specialization): Clone constructors and
14523 destructors.
14524
14525 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14526
14527 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14528 indicates anything special about template depth. Make sure we
14529 only count the user visible template classes.
14530
14531 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14532
14533 * call.c (build_conv): Typo in comment.
14534 (add_builtin_candidate): Add more explanation.
14535 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14536 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14537 when we have enumeral types.
14538 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14539 candidates for relops and eqops.
14540 (joust): Simplify control flow. Allow a non-template user
14541 function to hide a builtin.
14542
14543 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
14544
14545 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14546 (more_specialized): Add deduction parameter.
14547 * call.c (joust): Adjust more_specialized call.
14548 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14549 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14550 (get_bindings_order): Remove.
14551 (get_bindings_real): Add DEDUCE parameter.
14552 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14553 REFERENCE_TYPE jig for DEDUCE_ORDER.
14554 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14555 maybe_adjust_types_for_deduction.
14556 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14557 directly.
14558 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14559 (check_cv_quals_for_unify): Use new unify qualifier flags.
14560 (unify): Clear new unify qualifier flags.
14561 (get_bindings_real): Add DEDUCE parameter.
14562 (get_bindings): Adjust call to get_bindings_real.
14563 (get_bindings_overload): Likewise.
14564 (most_specialized_instantiation): Adjust call to
14565 more_specialized.
14566
14567 2001-01-19 Jason Merrill <jason@redhat.com>
14568
14569 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14570
14571 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14572 -fnew-abi.
14573
14574 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
14575
14576 * decl2.c (arg_assoc_class): Fix double iteration logic.
14577
14578 2001-01-19 Jason Merrill <jason@redhat.com>
14579
14580 * init.c (build_delete): Always call convert_force to strip cv-quals.
14581
14582 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14583 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14584 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14585
14586 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14587
14588 * search.c (get_vbase_1): Count only virtual bases.
14589
14590 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14591
14592 * class.c (duplicate_tag_error): Robustify flag clearing.
14593
14594 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14595
14596 * cp-tree.h (lookup_template_class): Add complain parm.
14597 * decl.c (lookup_namespace_name): Adjust call to
14598 lookup_template_class.
14599 (make_typename_type): Likewise.
14600 * semantics.c (finish_template_type): Likewise.
14601 * pt.c (lookup_template_class): Add complain parm. Adjust.
14602 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14603 (tsubst): Likewise.
14604
14605 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14606
14607 * pt.c (copy_default_args_to_explicit_spec): Preserve
14608 object's CV quals. Reorganize.
14609
14610 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14611
14612 * typeck.c (build_modify_expr): Say `initialization' for
14613 INIT_EXPRs.
14614 * init.c (build_default_init): Convert to enumeral type, if
14615 needed.
14616
14617 2001-01-18 Jakub Jelinek <jakub@redhat.com>
14618
14619 * parse.y (nomods_initdcl0): Properly set things up for
14620 initdcl0_innards.
14621
14622 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14623
14624 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14625 (type_unification_real): Set it.
14626 (unify): Use it.
14627
14628 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14629
14630 * decl.c (finish_destructor_body): Convert to vbase pointer here.
14631
14632 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14633
14634 * semantics.c (begin_class_definition): Check we're not inside a
14635 template parm list.
14636
14637 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14638
14639 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14640 BASELINK_P.
14641
14642 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14643
14644 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14645 * call.c (build_over_call): Add comment.
14646
14647 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14648
14649 * cvt.c (ocp_convert): Handle vector type conversion
14650 * typeck2.c (digest_init): Handle vector type initializations
14651
14652 2001-01-16 Phil Edwards <pme@sources.redhat.com>
14653
14654 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
14655 was given.
14656
14657 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14658
14659 * pt.c (check_nontype_parm): Rename to ...
14660 (invalid_nontype_parm_type_p): ... here.
14661 (process_template_parm): Adjust.
14662 (convert_template_argument): Adjust.
14663
14664 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14665
14666 * pt.c (check_nontype_parm): New function.
14667 (process_template_parm): Use it.
14668 (convert_template_argument): Use it.
14669 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14670 member.
14671
14672 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
14673
14674 * tree.c: Add defaults.h
14675 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14676 * Make-lang.in (cp/tree.o): Add defaults.h.
14677
14678 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14679
14680 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14681
14682 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14683
14684 * g++.1: Change to be ".so man1/gcc.1".
14685
14686 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14687
14688 * Make-lang.in (c++.info, c++.install-info): Build and install g++
14689 internals info.
14690 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14691 ($(srcdir)/cp/g++int.info): New target.
14692 * gxxint.texi: Add info directory entry. Use @@ in email address.
14693 * .cvsignore: Update.
14694
14695 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14696
14697 * typeck.c (build_c_cast): Do template processing earlier.
14698 Always pedwarn on array casts.
14699
14700 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14701
14702 * friend.c (make_friend_class): Make sure a templated class is
14703 actually a template.
14704
14705 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14706
14707 * decl2.c (get_guard): Set linkage from guarded decl.
14708
14709 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14710
14711 * call.c (convert_default_arg): Check for unprocessed
14712 DEFAULT_ARG.
14713 * cp-tree.h (replace_defarg): Move to spew.c.
14714 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14715 spew.c, which is where they really are.
14716 (done_pending_defargs): Declare.
14717 (unprocessed_defarg_fn): Declare.
14718 * decl.c (replace_defarg): Move to spew.c
14719 * parse.y (structsp): Call done_pending_defargs.
14720 * spew.c (defarg_fns): Rearrange list structure.
14721 (defarg_fnsdone): New static variable.
14722 (defarg_depfns): New static variable.
14723 (init_spew): Adjust.
14724 (add_defarg_fn): Store the type in TREE_TYPE.
14725 (do_pending_defargs): Detect and deal with ordering constraints
14726 and circularity.
14727 (done_pending_defargs): New function.
14728 (unprocessed_defarg_fn): New function.
14729 (replace_defarg): Moved from decl.c. Robustify. Don't save
14730 if circularity detected.
14731
14732 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14733
14734 * pt.c (unify): Check array has a domain, before checking
14735 whether it is variable sized.
14736
14737 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14738
14739 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14740 parameters with pointers to arrays of unknown bound.
14741
14742 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14743
14744 * parse.y (template_parm_header, template_spec_header): New
14745 reductions. Split out from ...
14746 (template_header): ... here. Use them.
14747 (template_template_parm): Use template_parm_header.
14748 * semantics.c (finish_template_template_parm): Add assert.
14749
14750 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14751
14752 * mangle.c (write_builtin_type): Fix thinko.
14753
14754 * pt.c (copy_default_args_to_explicit_spec_1): New function.
14755 (copy_default_args_to_explicit_spec): Likewise.
14756 (check_explicit_specialization): Use it.
14757
14758 * class.c (finish_struct_1): Remove last argument in call to
14759 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14760 * decl.c (builtin_function): Likewise.
14761 (build_cp_library_fn): Likewise.
14762 (check_initializer): Likewise.
14763 (make_rtl_for_nonlocal_decl): Likewise.
14764 (cp_finish_decl): Likewise.
14765 (start_function): Likewise.
14766 * decl2.c (finish_anon_union): Likewise.
14767 * friend.c (do_friend): Likewise.
14768 * init.c (build_java_class_ref): Likewise.
14769 * method.c (make_thunk): Likewise.
14770 * pt.c (tsubst_friend_function): Likewise.
14771 * semantics.c (expand_body): Likewise.
14772
14773 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14774
14775 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14776 looking at DECL_CLONED_FUNCTION for non-functions.
14777
14778 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14779
14780 * error.c (dump_template_parameter): Use parm to determine how
14781 to print default value.
14782
14783 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14784
14785 * class.c (duplicate_tag_error): Clear more flags.
14786
14787 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14788
14789 * call.c (build_new_method_call): Use binfo_for_vbase.
14790
14791 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
14792
14793 * cp-tree.h (flag_cond_mismatch): Don't declare.
14794 * decl2.c (flag_cond_mismatch): Don't define.
14795 (lang_f_options): Remove cond-mismatch.
14796 (unsupported_options): Add cond-mismatch.
14797
14798 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
14799
14800 * class.c (handle_using_decl): Reject using of constructor name
14801 of sourcing class. Allow injecting of a method with same name as
14802 nested class. Fixup error messages.
14803
14804 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
14805
14806 * decl2.c (lang_decode_option): Handle -Wformat=2.
14807
14808 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14809
14810 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14811 initialized_in_class.
14812 (DECL_DEFINED_IN_CLASS_P): Rename to ...
14813 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14814 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14815 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14816 * pt.c (check_default_tmpl_args): Adjust for
14817 DECL_INITIALIZED_IN_CLASS_P.
14818 (instantiate_class_template): Likewise.
14819 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14820
14821 * class.c (finish_struct): Constify saved_filename.
14822
14823 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14824
14825 * class.c (duplicate_tag_error): Adjust diagnostic.
14826 (finish_struct): Locally set location to start of struct.
14827 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14828
14829 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14830
14831 * decl.c (struct binding_level): Adjust class_shadowed comments
14832 to reflect reality.
14833 (push_class_level_binding): Adjust comments to reflect reality.
14834 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14835 Don't set TREE_VALUE on the class_shadowed list.
14836
14837 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14838
14839 * decl2.c (acceptable_java_type): Allow references too.
14840 * init.c (build_java_class_ref): When using the new ABI, search
14841 `class$' and have it mangled with `mangle_decl.'
14842 * mangle.c (write_java_integer_type_codes): New function.
14843 (write_builtin_type): Detect and mangle Java integer and real
14844 types.
14845
14846 2001-01-07 Mark Mitchell <mark@codesourcery.com>
14847
14848 * decl2.c (grokfield): Don't accept `asm' specifiers for
14849 non-static data members.
14850
14851 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14852
14853 * expr.c (cplus_expand_expr): Don't reset `target'.
14854
14855 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
14856
14857 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14858
14859 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14860
14861 * parse.y (template_datadef): Check for error_mark_node.
14862
14863 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14864
14865 * cp-tree.def (DEFAULT_ARG): Make `x' class.
14866
14867 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
14868
14869 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14870 (record_builtin_type): Make non-static.
14871 (flag_short_double): Don't declare.
14872 (init_decl_processing): Remove the creation of many tree nodes now
14873 in c_common_nodes_and_builtins.
14874 (build_void_list_node): New function.
14875 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14876 * cp-tree.h (flag_short_wchar): Don't declare.
14877
14878 2001-01-04 Mark Mitchell <mark@codesourcery.com>
14879
14880 * call.c (build_conv): Don't use build1 for USER_CONV.
14881 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14882
14883 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
14884
14885 * lex.c (lang_init): Call c_common_lang_init.
14886
14887 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14888
14889 * search.c (lookup_fnfields_here): Remove.
14890 (look_for_overrides_r): Use lookup_fnfields_1.
14891 Ignore functions from using declarations.
14892
14893 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14894
14895 Implement exceptions specifiers for implicit member functions.
14896 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14897 * method.c (synthesize_exception_spec): New function.
14898 (locate_dtor, locate_ctor, locate_copy): New functions.
14899 (implicitly_declare_fn): Generate the exception spec too.
14900 * search.c (check_final_overrider): Check artificial functions
14901 too.
14902 * typeck2.c (merge_exception_specifiers): New function.
14903
14904 2001-01-03 Jason Merrill <jason@redhat.com>
14905
14906 * init.c (build_default_init): New fn.
14907 (perform_member_init): Split out from here.
14908 (build_new_1): Use it. Simplify initialization logic.
14909 (build_vec_init): Take an array, rather than a pointer and maxindex.
14910 Speed up simple initializations. Don't clean up if we're assigning.
14911 * cp-tree.h: Adjust.
14912 * decl2.c (do_static_initialization): Remove TREE_VEC case.
14913 * parse.y (new_initializer): Return void_zero_node for ().
14914 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14915 * typeck2.c (digest_init): Only complain about user-written
14916 CONSTRUCTORs.
14917
14918 2000-12-22 Mike Stump <mrs@wrs.com>
14919
14920 * decl2.c: (max_tinst_depth): Increase to 50.
14921
14922 2001-01-02 Mark Mitchell <mark@codesourcery.com>
14923
14924 * class.c (invalidate_class_lookup_cache): Zero the
14925 previous_class_values.
14926 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14927 TREE_INT_CST_HIGH.
14928 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14929 * decl.c (free_bindings): New variable.
14930 (push_binding): Don't create a new binding if we have one on the
14931 free list.
14932 (pop_binding): Put old bindings on the free list.
14933 (init_decl_processing): Use size_int, not build_int_2.
14934 Register free_bindings as a GC root.
14935 (cp_make_fname_decl): Use size_int, not build_int_2.
14936 (push_inline_template_parms_recursive): Likewise.
14937 (end_template_parm_list): Likewise.
14938 (for_each_template_parm): Do not use walk_tree_without_duplicates.
14939 (tsubst_template_parms): Use size_int, not build_int_2.
14940 (tsubst): Likewise.
14941 * rtti.c (get_vmi_pseudo_type_info): Likewise.
14942
14943 2001-01-02 Richard Henderson <rth@redhat.com>
14944
14945 * parse.y (asm): Set ASM_INPUT_P.
14946
14947 2001-01-02 Jason Merrill <jason@redhat.com>
14948
14949 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14950 for v3 ABI.
14951
14952 * typeck.c (cp_truthvalue_conversion): New fn.
14953 * cvt.c (ocp_convert): Use it.
14954
14955 * cp-tree.h: Lose c-common.c decls.
14956
14957 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14958 * cvt.c (convert_to_void): Use type_unknown_p.
14959
14960 * typeck.c (strip_all_pointer_quals): Also strip quals from
14961 pointer-to-member types.
14962
14963 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
14964 parse.y as C.
14965
14966 * call.c (build_new_method_call): Do evaluate the object parameter
14967 when accessing a static member.
14968 * typeck.c (build_component_ref): Likewise.
14969
14970 2001-01-02 Andreas Jaeger <aj@suse.de>
14971
14972 * decl.c (cp_missing_noreturn_ok_p): New.
14973 (init_decl_processing): Set lang_missing_noreturn_ok_p.
14974
14975 2000-12-29 Jakub Jelinek <jakub@redhat.com>
14976
14977 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14978
14979 2000-12-29 Mark Mitchell <mark@codesourcery.com>
14980
14981 * class.c (pushclass): Remove #if 0'd code.
14982 * cp-tree.h (overload_template_name): Remove.
14983 * decl.c (store_bindings): Simplify.
14984 (pop_from_top_level): Likewise.
14985 * pt.c (overload_template_name): Remove.
14986 (instantiate_decl): Don't call push_to_top_level if it's not
14987 needed.
14988
14989 2000-12-28 Mark Mitchell <mark@codesourcery.com>
14990
14991 * pt.c (register_local_specialization): Don't return a value.
14992 (lookup_template_class): Use move-to-front heuristic when looking
14993 up template instantiations.
14994 (instantiate_decl): Only push_to_top_level when we're actually
14995 going to instantiate the template.
14996
14997 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
14998
14999 * search.c (binfo_for_vtable): Return least derived class, not
15000 most. Handle secondary vtables.
15001
15002 2000-12-22 Jason Merrill <jason@redhat.com>
15003
15004 * pt.c (more_specialized): Don't optimize len==0.
15005 (fn_type_unification): If we're adding the return type, increase len.
15006
15007 * typeck.c (build_binary_op): Fix pmf comparison logic.
15008
15009 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
15010 DECL_STATIC_FUNCTION_P.
15011
15012 * semantics.c (genrtl_finish_function): Don't try to jump to
15013 return_label unless it exists.
15014
15015 In partial ordering for a call, ignore parms for which we don't have
15016 a real argument.
15017 * call.c (joust): Pass len to more_specialized.
15018 (add_template_candidate_real): Strip 'this', pass len.
15019 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
15020 (get_bindings_order): New fn. Pass len down.
15021 (get_bindings_real): Strip 'this', pass len.
15022 (fn_type_unification): Likewise.
15023 (type_unification_real): Succeed after checking 'len' args.
15024 (most_specialized_instantiation): Lose explicit_args parm.
15025 * class.c (resolve_address_of_overloaded_function): Strip 'this',
15026 pass len.
15027
15028 2000-12-21 Jason Merrill <jason@redhat.com>
15029
15030 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
15031 DECL_TEMPLATE_RESULT.
15032
15033 * search.c (lookup_field_r): Call lookup_fnfields_1, not
15034 lookup_fnfields_here.
15035
15036 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
15037
15038 * call.c (build_object_call): Also allow conversions that return
15039 reference to pointer to function.
15040 (add_conv_candidate): Handle totype being ref to ptr to fn.
15041 (build_field_call): Also allow members of type reference to function.
15042 Lose support for calling pointer to METHOD_TYPE fields.
15043
15044 * error.c (dump_expr): Handle *_CAST_EXPR.
15045
15046 * typeck2.c (build_scoped_ref): Always convert to the naming class.
15047
15048 * tree.c (break_out_cleanups): Lose.
15049 * cp-tree.h: Remove prototype.
15050 * typeck.c (build_component_ref): Don't break_out_cleanups.
15051 (build_compound_expr): Likewise.
15052 * semantics.c (finish_expr_stmt): Likewise.
15053
15054 2000-12-20 Richard Henderson <rth@redhat.com>
15055
15056 * cp-tree.h: Update declarations.
15057 * decl.c (finish_case_label): Return the new stmt node.
15058 * semantics.c (finish_goto_stmt): Likewise.
15059 (finish_expr_stmt, finish_return_stmt): Likewise.
15060 (finish_break_stmt, finish_continue_stmt): Likewise.
15061 (finish_asm_stmt): Likewise.
15062 * parse.y (already_scoped_stmt): Set STMT_LINENO.
15063 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
15064 (simple_if, simple_stmt): Return the new stmt node.
15065 (save_lineno): New.
15066
15067 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
15068
15069 * cp-tree.h: Don't declare warn_long_long.
15070
15071 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15072
15073 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
15074 IS_AGGR_TYPE.
15075
15076 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15077
15078 * pt.c (unify): Handle when both ARG and PARM are
15079 BOUND_TEMPLATE_TEMPLATE_PARM.
15080
15081 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15082
15083 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
15084 DECL_TEMPLATE_PARM_P.
15085
15086 2000-12-15 Jason Merrill <jason@redhat.com>
15087
15088 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
15089
15090 * init.c (build_new_1): Don't strip quals from type.
15091
15092 * decl.c (pushdecl): Don't check for linkage on a non-decl.
15093
15094 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
15095
15096 * call.c (build_new_function_call): Lose space before paren in
15097 error message.
15098 (build_new_method_call): Likewise.
15099
15100 * typeck2.c (build_m_component_ref): Propagate quals from datum.
15101
15102 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15103
15104 * pt.c (check_explicit_specialization): Propagate default
15105 function arguments to explicit specializations.
15106
15107 2000-12-13 DJ Delorie <dj@redhat.com>
15108
15109 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
15110 and <? operators.
15111
15112 2000-12-08 Jason Merrill <jason@redhat.com>
15113
15114 * error.c (dump_function_name): Don't let the user see __comp_ctor.
15115
15116 Clean up copy-initialization in overloading code.
15117 * call.c (build_user_type_conversion_1): Die if we are asked to
15118 convert to the same or a base type.
15119 (implicit_conversion): Avoid doing so. Lose reference binding code.
15120 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
15121 direct-initialization. Also do direct-init part of copy-init.
15122 (build_user_type_conversion): Don't provide context to convert_like.
15123 * cvt.c (ocp_convert): build_user_type_conversion will now provide
15124 the constructor call for copy-init.
15125
15126 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
15127 instantiation of a member template.
15128 (do_decl_instantiation): Not here.
15129
15130 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15131
15132 * class.c (check_field_decls): Don't special case anonymous
15133 fields in error messages.
15134 (note_name_declared_in_class): Use %D on diagnostic.
15135
15136 * tree.c (pod_type_p): Use strip_array_types.
15137 (cp_valid_lang_attribute): Likewise.
15138 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
15139 multiple evaluations.
15140 (cp_has_mutable_p): Use strip_array_types.
15141
15142 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15143
15144 * cp-tree.h (sufficient_parms_p): Declare new function.
15145 * call.c (sufficient_parms_p): New function, broken out of ...
15146 (add_function_candidate): ... here. Use it.
15147 (add_conv_candidate): Use it.
15148 * decl.c (grok_ctor_properties): Use it.
15149
15150 2000-12-07 Jakub Jelinek <jakub@redhat.com>
15151
15152 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
15153
15154 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
15155
15156 * decl2.c (lang_decode_option): Handle -Wformat-security.
15157
15158 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15159
15160 * pt.c (verify_class_unification): New function.
15161 (get_class_bindings): Use it.
15162 (try_class_unification): Tidy.
15163 (unify): Handle when argument of a template-id is not
15164 template parameter dependent.
15165 (template_args_equal): Handle when TREE_CODE's do not match.
15166
15167 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
15168
15169 * lang-specs.h (c++): When invoking the stand-alone preprocessor
15170 for -save-temps, pass all relevant -Defines to it, and then don't
15171 pass them to cc1plus.
15172
15173 2000-12-05 Will Cohen <wcohen@redhat.com>
15174
15175 * decl.c (finish_case_label): Cleared
15176 more_cleanups_ok in surrounding function scopes.
15177 (define_label): Likewise.
15178
15179 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15180
15181 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15182 (get_matching_virtual): Remove.
15183 (look_for_overrides): Declare new function.
15184 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15185 DECL_VINDEX here.
15186 * class.c (check_for_override): Move base class iteration code
15187 to look_for_overrides.
15188 * search.c (next_baselink): Remove.
15189 (get_virtuals_named_this): Remove.
15190 (get_virtual_destructor): Remove.
15191 (tree_has_any_destructors_p): Remove.
15192 (struct gvnt_info): Remove.
15193 (check_final_overrider): Remove `virtual' from error messages.
15194 (get_matching_virtuals): Remove. Move functionality to ...
15195 (look_for_overrides): ... here, and ...
15196 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15197 to be overriding.
15198
15199 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15200
15201 * typeck.c (get_delta_difference): If via a virtual base,
15202 return zero.
15203 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15204 adjustment.
15205
15206 2000-12-04 Richard Henderson <rth@redhat.com>
15207
15208 * error.c (dump_tree): Use output_add_string not OB_PUTS.
15209
15210 2000-12-04 Jason Merrill <jason@redhat.com>
15211
15212 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15213 (write_builtin_type): Pass intSI_type_node and the like through
15214 type_for_mode.
15215 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15216 Pass intSI_type_node and the like through type_for_mode.
15217 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15218 * pt.c (tsubst, unify): Likewise.
15219 * tree.c (walk_tree): Likewise.
15220 * error.c (dump_type): Likewise.
15221 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15222
15223 * Make-lang.in: Tweak top comment for emacs.
15224 (cp/TAGS): Restore.
15225
15226 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15227
15228 * class.c (clone_function_decl): Robustify.
15229
15230 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
15231
15232 * decl.c (store_bindings): Only search in the non modified
15233 old_bindings for duplicates.
15234
15235 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
15236
15237 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15238 TYPE_POLYMORPHIC_P.
15239
15240 * typeck.c (build_static_cast): Remove unused variable.
15241
15242 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15243
15244 * pt.c: Fix typo in comment.
15245
15246 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15247
15248 * decl2.c (warn_format): Remove definition.
15249 (lang_decode_option): Handle -Wformat-nonliteral,
15250 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
15251
15252 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15253
15254 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15255 (init_decl_processing): Don't create string_type_node,
15256 const_string_type_node, wint_type_node, intmax_type_node,
15257 uintmax_type_node, default_function_type, ptrdiff_type_node and
15258 unsigned_ptrdiff_type_node. Adjust position of call to
15259 c_common_nodes_and_builtins.
15260 (identifier_global_value): New function.
15261
15262 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
15263
15264 * call.c (standard_conversion): Reject pointer to member
15265 conversions from ambiguous, inaccessible or virtual bases.
15266 * typeck.c (build_static_cast): Don't check pointers to members
15267 specially.
15268
15269 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15270
15271 * method.c (do_build_copy_constructor): Preserve cv
15272 qualifications when accessing source object members.
15273 (do_build_assign_ref): Likewise. Remove separate diagnostics for
15274 unnamed fields.
15275
15276 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15277
15278 * method.c (do_build_assign_ref): Construct appropriately
15279 CV-qualified base reference. Don't allow const casts in base
15280 conversion.
15281
15282 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15283
15284 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15285 incomplete return type.
15286
15287 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15288
15289 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15290 * semantics.c (finish_base_specifier): Accept a _TYPE not a
15291 _DECL.
15292
15293 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15294
15295 * spew.c (yyerror): Cope if yylval.ttype is NULL.
15296
15297 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15298
15299 * decl.c (grokdeclarator): Diagnose undefined template contexts.
15300
15301 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15302
15303 * decl.c (grokdeclarator): Do type access control on friend
15304 class.
15305
15306 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15307
15308 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15309 bison parser ickiness.
15310 * pt.c (tsubst_friend_function): Enter namespace scope when
15311 tsubsting the function name.
15312 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15313
15314 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15315
15316 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15317 * cvt.c (cp_convert_to_pointer): Add force parameter.
15318 Allow conversions via virtual base if forced.
15319 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15320 (ocp_convert): Likewise.
15321 * search.c (binfo_from_vbase): Return the virtual base's binfo.
15322 * typeck.c (get_delta_difference): Adjust handling of virtual
15323 bases.
15324
15325 2000-11-26 Mark Mitchell <mark@codesourcery.com>
15326
15327 * tree.c (struct list_hash): Remove.
15328 (list_hash_table): Make it be an htab.
15329 (struct list_proxy): New type.
15330 (list_hash_eq): New function.
15331 (list_hash_pieces): Renamed from ...
15332 (list_hash): ... this.
15333 (list_hash_lookup): Remove.
15334 (list_hash_add): Remove.
15335 (hash_tree_cons): Use the generic hashtable.
15336 (mark_list_hash): Remove.
15337 (init_tree): Create the hashtable.
15338
15339 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
15340
15341 * method.c (build_mangled_C9x_name): Rename to
15342 build_mangled_C99_name. Change C9X references in comments to
15343 refer to C99.
15344
15345 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15346
15347 * parse.y (unary_expr): Move VA_ARG from here ...
15348 (primary): ... to here.
15349
15350 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15351
15352 * semantics.c (finish_id_expr): If type is error_mark, return
15353 error_mark.
15354
15355 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
15356
15357 * pt.c (lookup_template_class): Simplify loop exit constructs.
15358 Cope when there is no partial instantiation of a template
15359 template member.
15360
15361 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
15362
15363 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15364
15365 2000-11-22 Mark Mitchell <mark@codesourcery.com>
15366
15367 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15368 prefix.
15369
15370 * pt.c (do_decl_instantiate): Explicitly clone constructors and
15371 destructors that haven't already been cloned.
15372
15373 2000-11-20 Richard Henderson <rth@redhat.com>
15374
15375 * parse.y (yyparse_1): Rename the parser entry point.
15376
15377 2000-11-20 Alex Samuel <samuel@codesourcery.com>
15378
15379 * mangle.c (write_name): Use <unscoped-name> for names directly in
15380 function scope.
15381 (write_unscoped_name): Accept names directly in function scope.
15382
15383 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
15384
15385 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15386 * parse.y (extdef): Add EXPORT reduction.
15387 * spew.c (yylex): Don't skip export here.
15388
15389 2000-11-19 Mark Mitchell <mark@codesourcery.com>
15390
15391 * decl.c (init_decl_processing): Correct name of pure virtual
15392 function under the new ABI.
15393 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15394 (throw_bad_typeid): Likewise for bad typeid function.
15395
15396 2000-11-18 Mark Mitchell <mark@codesourcery.com>
15397
15398 * decl.c (grokparms): Don't even function types of `void' type,
15399 either.
15400 * mangle.c (write_type): Don't crash when confronted with the
15401 error_mark_node.
15402
15403 * decl.c (grokparms): Don't create parameters of `void' type.
15404
15405 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
15406
15407 * lex.c (mark_impl_file_chain): Delete.
15408 (init_parse): Remove call to ggc_add_string_root. No need to
15409 ggc_strdup a string constant. Do not add impl_file_chain to GC
15410 roots.
15411 (handle_pragma_implementation): No need to ggc_strdup main_filename.
15412
15413 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15414
15415 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15416
15417 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15418
15419 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15420 * decl.c (grokdeclarator): Don't reject void parms here.
15421 (require_complete_types_for_parms): Simplify, use
15422 complete_type_or_else.
15423 (grokparms): Remove bitrot. Remove funcdef parm.
15424 Deal with ellipsis parm lists here.
15425 * semantics.c (finish_parmlist): Don't append void_list_node
15426 here. Set PARMLIST_ELLIPSIS_P.
15427
15428 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15429
15430 * typeck2.c (incomplete_type_error): Reorganize to avoid
15431 excessive diagnostics.
15432
15433 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
15434
15435 * lex.c (struct impl_files, internal_filename): Constify a char *.
15436
15437 2000-11-16 Mark Mitchell <mark@codesourcery.com>
15438
15439 * mangle.c (write_special_name_constructor): Don't generate
15440 assembler junk when confronted with an old-style constructor.
15441 (write_special_name_destructor): Likewise.
15442 (mangle_decl_string): Do it here instead.
15443
15444 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
15445
15446 * call.c (op_error): Make error messages clearer.
15447
15448 2000-11-15 Mark Mitchell <mark@codesourcery.com>
15449
15450 * decl.c (wrapup_globals_for_namespace): Don't mark things
15451 TREE_ASM_WRITTEN when they're not.
15452
15453 2000-11-15 Jason Merrill <jason@redhat.com>
15454
15455 * typeck2.c (friendly_abort): Uncount the error before handing
15456 off to fancy_abort.
15457
15458 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
15459
15460 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15461
15462 2000-11-14 Mark Mitchell <mark@codesourcery.com>
15463
15464 * class.c (build_vtbl_initializer): Fix typo in comment.
15465 * typeck.c (expr_sizeof): Don't crash on errors.
15466
15467 2000-11-14 Jim Wilson <wilson@redhat.com>
15468
15469 * lang-specs.h: Add %2 after %(cc1_options).
15470
15471 2000-11-14 Richard Henderson <rth@redhat.com>
15472
15473 * typeck.c (c_sizeof): Be strict about casting result value
15474 back to c_size_type_node.
15475 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15476
15477 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
15478
15479 * typeck.c (build_unary_op): Use boolean_increment from
15480 c-common.c, moving the relevant code there.
15481
15482 2000-11-11 Jason Merrill <jason@redhat.com>
15483
15484 * typeck.c (mark_addressable): Don't call put_var_into_stack.
15485
15486 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15487 in inlines.
15488
15489 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15490
15491 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15492 * lex.c (copy_lang_decl): Likewise.
15493
15494 2000-11-09 Mark Mitchell <mark@codesourcery.com>
15495
15496 * dump.c (cp_dump_tree): Don't dump function bodies here.
15497
15498 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15499 (dump.o): Update dependency list.
15500 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15501 (flag_dump_translation_unit): Likewise.
15502 (CP_TYPE_QUALS): Adjust definition.
15503 (DECL_C_BIT_FIELD): Remove.
15504 (SET_DECL_C_BIT_FIELD): Likewise.
15505 (CLEAR_DECL_C_BIT_FIELD): Likewise.
15506 (add_maybe_template): Likewise.
15507 (strip_array_types): Likewise.
15508 (dump_node_to_file): Likewise.
15509 (cp_dump_tree): New function.
15510 * decl.c (init_decl_processing): Set lang_dump_tree.
15511 * decl2.c (flag_dump_translation_unit): Remove.
15512 * dump.c: Move most of it to ../c-dump.c.
15513 (cp_dump_tree): New function.
15514 * pt.c (add_maybe_template): Remove.
15515 * typeck.c (strip_array_types): Likewise.
15516
15517 2000-11-07 Eric Christopher <echristo@redhat.com>
15518
15519 * decl.c (init_decl_processing): Change definition of
15520 __wchar_t to wchar_t. Remove artificial declaration of
15521 wchar_t.
15522 * lex.c: Change instances of __wchar_t to wchar_t.
15523
15524 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
15525
15526 * lex.c (do_identifier): Don't lookup_name for operators.
15527 * parse.y (operator): Save looking_for_typename.
15528 (unoperator): Restore it.
15529 * spew.c (frob_opname): Use nth_token for lookahead.
15530
15531 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
15532
15533 * decl.c (grok_op_properties): Always use coerce_new_type and
15534 coerce_delete_type.
15535 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15536 exception specification. Tidy up.
15537 (coerce_delete_type): Preserve exception specification. Tidy up.
15538
15539 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
15540
15541 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15542 (push_binding_level), error.c (cp_tree_printer), pt.c
15543 (process_partial_specialization, tsubst_template_arg_vector),
15544 search.c (lookup_member): Use memset () instead of bzero ().
15545
15546 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
15547
15548 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15549
15550 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
15551
15552 * Make-lang.in (c++.distdir): Remove.
15553
15554 2000-11-04 Mark Mitchell <mark@codesourcery.com>
15555
15556 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15557 declarations from different namespaces to be combined.
15558
15559 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
15560
15561 * decl.c: Include tm_p.h.
15562
15563 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
15564
15565 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15566
15567 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
15568
15569 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15570 (build_overload_value), repo.c (open_repo_file), xref.c
15571 (open_xref_file): Use strchr () and strrchr () instead of index ()
15572 and rindex ().
15573
15574 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
15575
15576 * call.c (build_over_call): Call fold on the CALL_EXPR.
15577
15578 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
15579
15580 * error.c (dump_template_decl): Separate template hearders with
15581 space not comma.
15582
15583 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
15584
15585 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
15586 TS_* flags with corresponding TFF_*. Adjust prototypes of
15587 functions (which used to take a tree_string_flags) to take an int.
15588
15589 * cp-tree.h (enum tree_string_flags): Remove
15590 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15591 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15592 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15593 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15594 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15595 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15596 (type_as_string, decl_as_string, expr_as_string,
15597 context_as_string): Adjust prototype.
15598
15599 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15600 instead of TS_PLAIN.
15601
15602 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15603 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15604 plain `0'.
15605
15606 2000-10-30 Mark Mitchell <mark@codesourcery.com>
15607
15608 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15609 (linkage_kind): New enumeration.
15610 (decl_linkage): New function.
15611 * decl2.c (comdat_linkage): Extend comment.
15612 * error.c (dump_function_decl): Print the arguments used to
15613 instantiate a template, even when not printing the type of the
15614 function.
15615 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15616 not TREE_PUBLIC, to test for external linkage.
15617 * tree.c (decl_linkage): New function.
15618
15619 2000-10-28 Mark Mitchell <mark@codesourcery.com>
15620
15621 * pt.c (instantiate_decl): Always instantiate static data members
15622 initialized in-class.
15623
15624 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
15625
15626 * Make-lang.in: Move all build rules here from Makefile.in,
15627 adapt to new context. Wrap all rules that change the current
15628 directory in parentheses. Expunge all references to $(P).
15629 When one command depends on another and they're run all at
15630 once, use && to separate them, not ;. Add OUTPUT_OPTION to
15631 all object-file generation rules. Delete obsolete variables.
15632
15633 * Makefile.in: Delete.
15634 * config-lang.in: Delete outputs= line.
15635
15636 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
15637
15638 * error.c (dump_function_decl): Print no space between
15639 `ptr-operator' the `type-specifier' of the return type.
15640 (dump_type_prefix): Make sure we put space at the appropriate
15641 place.
15642
15643 2000-10-23 Jason Merrill <jason@redhat.com>
15644
15645 * call.c (equal_functions): Also call decls_match for extern "C" fns.
15646
15647 2000-10-22 Jason Merrill <jason@redhat.com>
15648
15649 * call.c (build_conditional_expr): Use ocp_convert to force
15650 rvalue conversion.
15651
15652 2000-10-22 Mark Mitchell <mark@codesourcery.com>
15653
15654 * call.c (standard_conversion): Use RVALUE_CONVs for all
15655 expressions that satisfy lvalue_p, not just those that satisfy
15656 real_lvalue_p.
15657
15658 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15659
15660 * typeck.c (c_sizeof): Return an expression of `size_t' type,
15661 not one with TYPE_IS_SIZETYPE set.
15662 (dubious_conversion_warnings): Remove special-case code.
15663
15664 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
15665
15666 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15667 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15668 (dump_type_prefix): Print vector-of-int as 'int vector'.
15669 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15670 * tree.c (walk_tree): Handle VECTOR_TYPE.
15671
15672 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15673
15674 2000-10-21 Jason Merrill <jason@redhat.com>
15675
15676 * parse.y (operator): Set got_object from got_scope.
15677 Set looking_for_typename.
15678 * decl.c (lookup_name_real): Clear val after setting from_obj.
15679 Reorganize diagnostic.
15680
15681 2000-10-20 Jason Merrill <jason@redhat.com>
15682
15683 * tree.c (walk_tree): Don't walk into default args.
15684
15685 * error.c (dump_expr): Use host_integerp.
15686
15687 2000-10-20 David Edelsohn <edelsohn@gnu.org>
15688
15689 * typeck2.c (abstract_virtuals_error): Use "because" instead of
15690 "since" in error message.
15691
15692 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15693
15694 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15695
15696 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
15697
15698 * decl.c (revert_static_member_fn): Fixed typo.
15699
15700 2000-10-19 Mark Mitchell <mark@codesourcery.com>
15701
15702 * class.c (subobject_offset_fn): New type.
15703 (dfs_record_base_offsets): Remove.
15704 (record_base_offsets): Likewise.
15705 (dfs_search_base_offsets): Likewise.
15706 (record_subobject_offset): New function.
15707 (check_subobject_offset): Likewise.
15708 (walk_subobject_offsets): Likewise.
15709 (record_subobject_offsets): Likewise.
15710 (layout_conflict_p): Reimplement.
15711 (layout_nonempty_base_or_field): Correct handling of type
15712 conflicts during layout.
15713 (layout_empty_base): Likewise.
15714 (build_base_field): Adjust to handle new representation of empty
15715 base offset table.
15716 (build_base_fields): Likewise.
15717 (layout_virtual_bases): Likewise.
15718 (splay_tree_compare_integer_csts): New function.
15719 (layout_class_type): Use a splay_tree, rather than a varray, to
15720 represent the offsets of empty bases.
15721
15722 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15723 * decl.c (select_decl): Don't return declarations that are
15724 DECL_ANTICIPATED.
15725
15726 2000-10-18 Mark Mitchell <mark@codesourcery.com>
15727
15728 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15729 (fake_std_node): New macro.
15730 * decl.c (in_std): Rename to ...
15731 (in_fake_std): ... this.
15732 (flag_no_builtin): Remove.
15733 (flag_no_nonansi_builtin): Likewise.
15734 (walk_namespaces_r): Use fake_std_node.
15735 (push_namespace): Use std_identifier.
15736 (pop_namespace): Use in_fake_std.
15737 (lookup_name_real): Use fake_std_node.
15738 (init_decl_processing): When -fhonor-std, create the `std'
15739 namespace. Don't create a dummy fake_std_node in that case.
15740 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
15741 (builtin_function): Put builtins whose names don't begin
15742 with `_' in the std namespace.
15743 * decl2.c (flag_no_builtin): Remove.
15744 (flag_no_nonansi_builtin): Likewise.
15745 (set_decl_namespace): Use fake_std_node.
15746 (validate_nonmember_using_decl): Likewise.
15747 (do_using_directive): Likewise.
15748 (handle_class_head): Likewise.
15749 * dump.c (dequeue_and_dump): Likewise.
15750 * except.c (init_exception_processing): Use std_identifier.
15751 * init.c (build_member_call): Use fake_std_node.
15752 * rtti.c (init_rtti_processing): Use std_identifier.
15753
15754 2000-10-17 Mark Mitchell <mark@codesourcery.com>
15755
15756 * cp-tree.h (back_end_hook): Remove declaration.
15757 * decl2.c (back_end_hook): Remove definition.
15758
15759 * dump.c (dequeue_and_dump): Dump TREE_USED.
15760
15761 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
15762
15763 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15764
15765 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15766
15767 * decl.c (WINT_TYPE): Define.
15768 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15769 c_size_type_node, signed_size_type_node and wint_type_node.
15770
15771 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15772
15773 * decl2.c (warn_missing_format_attribute): New variable.
15774 (lang_decode_option): Decode -Wmissing-format-attribute.
15775
15776 2000-10-16 Mark Mitchell <mark@codesourcery.com>
15777
15778 * typeck.c (qualify_type): Remove.
15779 (composite_pointer_type): Fix handling of conversions to `cv void*'.
15780
15781 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15782
15783 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15784
15785 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15786
15787 * Makefile.in (parse.c, parse.h): Create atomically.
15788
15789 2000-10-12 Mark Mitchell <mark@codesourcery.com>
15790
15791 * class.c (current_obstack): Remove.
15792 * decl.c (ggc_p): Remove.
15793 (start_decl): Don't use decl_tree_cons.
15794 (grokdeclarator): Don't use build_decl_list.
15795 (start_function): Don't use decl_tree_cons.
15796 (finish_function): Don't mess with obstacks.
15797 * decl2.c (grok_x_components): Don't use build_decl_list.
15798 * lex.c (make_call_declarator): Don't call decl_tree_cons.
15799 (implicitly_declare_fn): Don't call build_decl_list.
15800 * parse.y (frob_specs): Don't call build_decl_list or
15801 decl_tree_cons.
15802 (expr_or_declarator_intern): Don't call decl_tree_cons.
15803 (primary): Don't call build_decl_list.
15804 (fcast_or_absdcl): Likewise.
15805 (typed_declspecs): Don't call decl_tree_cons.
15806 (reserved_declspecs): Don't call build_decl_list.
15807 (declmods): Likewise.
15808 (reserved_typespecquals): Likewise.
15809 (aggr): Likewise.
15810 (new_type_id): Likewise.
15811 (cv_qualifiers): Likewise.
15812 (after_type_declarator_intern): Likewise.
15813 (notype_declarator_intern): Likewise.
15814 (absdcl_intern): Likewise.
15815 (named_parm): Likewise.
15816 * pt.c (most_specialized_class): Likewise.
15817 * repo.c (temporary_obstack): Make it a structure, not a pointer.
15818 (init_repo): Initialize it.
15819 * search.c (current_obstack): Remove.
15820 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15821
15822 2000-10-09 Richard Henderson <rth@cygnus.com>
15823
15824 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15825 (c++ language support bits for libgcc): Remove.
15826 (c++.clean): Remove cplib2.txt cleanup.
15827 * config-lang.in (headers, lib2funcs): Remove.
15828
15829 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15830 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15831 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15832 * inc/new.h, inc/typeinfo: Remove files.
15833
15834 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
15835
15836 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15837 defined.
15838 (init_decl_processing): Initialize intmax_type_node and
15839 uintmax_type_node.
15840
15841 2000-10-06 Richard Henderson <rth@cygnus.com>
15842
15843 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15844 (original_result_rtx): Remove.
15845 * decl.c (save_function_data): Don't clear x_result_rtx.
15846 (mark_lang_function): Don't mark it either.
15847 * expr.c (fixup_result_decl): Remove.
15848 * semantics.c (genrtl_named_return_value): Frob the return decl
15849 before calling emit_local_var.
15850 (genrtl_finish_function): Don't call fixup_result_decl.
15851 Always emit the jump to return_label.
15852
15853 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
15854
15855 * pt.c (lookup_template_class): Set current access for enum.
15856 (tsubst_enum): Set file & line for enum decl.
15857
15858 * spew.c (yylex): Remove unused variable.
15859
15860 2000-10-05 Richard Henderson <rth@cygnus.com>
15861
15862 * semantics.c (genrtl_finish_function): Don't init or check
15863 can_reach_end; remove noreturn and return value checks.
15864
15865 2000-10-05 Tom Tromey <tromey@cygnus.com>
15866
15867 * init.c (build_java_class_ref): Use `build_static_name' with a
15868 suffix, not a prefix, to build the class object's name.
15869
15870 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15871
15872 * cp-tree.h (access_kind): Fix comment typo.
15873 * decl2.c (grokfield): Fix diagnostic typo.
15874 * semantics.c (finish_template_type): Fix comment typo.
15875 (finish_qualified_object_call_expr): Likewise.
15876
15877 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15878
15879 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15880 tsubsting fails.
15881
15882 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15883
15884 * spew.c (frob_id): New static function.
15885 (frob_opname): Use it.
15886 (yylex): Use it.
15887
15888 2000-10-01 Mark Mitchell <mark@codesourcery.com>
15889
15890 * decl.c (lang_mark_false_label_stack): Remove.
15891 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15892
15893 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
15894
15895 * gxxint.texi: Use @email for formatting email addresses.
15896
15897 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
15898
15899 * error.c: Remove direct obstack manipulation. Replace with
15900 output_buffer-based formatting. Adjust calls to removed macros.
15901 (obstack_chunk_alloc, obstack_chunk_free): Remove.
15902 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15903 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15904
15905 2000-09-24 Mark Mitchell <mark@codesourcery.com>
15906
15907 * ir.texi: Move to ../c-tree.texi.
15908
15909 2000-09-20 Jason Merrill <jason@redhat.com>
15910
15911 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15912
15913 2000-09-21 Andreas Jaeger <aj@suse.de>
15914
15915 * errfn.c: Move declaration of cp_printer and cp_printers to ...
15916 * cp-tree.h: ... here.
15917
15918 * error.c: Remove declaration of cp_printer.
15919
15920 2000-09-20 Mark Mitchell <mark@codesourcery.com>
15921
15922 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15923
15924 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
15925
15926 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15927 users.
15928
15929 2000-09-18 Mark Mitchell <mark@codesourcery.com>
15930
15931 * decl.c (start_function): Robustify.
15932
15933 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15934
15935 * cp-tree.h (check_function_format): Accept a `status' parameter.
15936
15937 * call.c, typeck.c: Updates calls to `check_function_format'.
15938
15939 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
15940
15941 * decl2.c (handle_class_head): Always push some scope even
15942 in the error case.
15943
15944 2000-09-16 Mark Mitchell <mark@codesourcery.com>
15945
15946 * cp-tree.h (struct cp_language_function): Remove
15947 x_scope_stmt_stack and name_declared.
15948 (current_scope_stmt_stack): Remove.
15949 (function_name_declared_p): New macro.
15950 (struct lang_decl_flags): Use c_lang_decl as a base class.
15951 (context): Remove.
15952 (struct lang_decl): Replace saved_tree with context.
15953 (DECL_FRIEND_CONTEXT): Adjust accordingly.
15954 (SET_DECL_FRIEND_CONTEXT): Likewise.
15955 (DECL_VIRTUAL_CONTEXT): Likewise.
15956 (DECL_SAVED_TREE): Remove.
15957 (C_DECLARED_LABEL_FLAG): Likewise.
15958 (cplus_expand_expr_stmt): Don't declare.
15959 (add_decl_stmt): Likewise.
15960 (add_scope_stmt): Likewise.
15961 * decl.c (mark_stmt_tree): Remove.
15962 (case_compare): Likewise.
15963 (finish_case_label): Use c_add_case_label.
15964 (init_decl_processing): Set more language-specific hooks.
15965 (build_enumerator): Fix typo in comment.
15966 (cplus_expand_expr_stmt): Remove.
15967 (mark_lang_function): Use mark_c_language_function.
15968 (lang_mark_tree): Use c_mark_lang_decl.
15969 * decl2.c: Change order of inclusion.
15970 * except.c: Likewise.
15971 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
15972 back on c_expand_expr.
15973 * friend.c: Include expr.h.
15974 * init.c: Change order of inclusion.
15975 * Makefile.in: Update dependencies.
15976 * lex.h (free_lang_decl_chain): Remove.
15977 * optimize.c (maybe_clone_body): Use function_name_declared_p.
15978 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15979 it doesn't exist.
15980 (instantiate_decl): Use function_name_declared_p.
15981 * semantics.c (lang_expand_expr_stmt): Remove.
15982 (set_current_function_name_declared): Likewise.
15983 (current_function_name_declared): Likewise.
15984 (begin_compound_stmt): Use function_name_declared_p.
15985 (add_decl_stmt): Remove.
15986 (setup_vtbl_ptr): Use function_name_declared_p.
15987 (add_scope_stmt): Remove.
15988 (current_scope_stmt_stack): New function.
15989 (cp_expand_stmt): Don't handle SCOPE_STMTs.
15990 (expand_body): Use function_name_declared_p.
15991 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15992 * typeck.c: Change order of includes.
15993 (convert_sequence): Remove.
15994
15995 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
15996
15997 * lex.c (reswords): Add _Complex.
15998
15999 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16000
16001 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
16002
16003 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
16004
16005 * init.c (begin_init_stmts): Don't use // comments.
16006
16007 2000-09-12 Jason Merrill <jason@redhat.com>
16008
16009 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
16010 all non-extern arrays.
16011
16012 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
16013 typenames, too. Downgrade complaint to pedwarn.
16014 (xref_tag): Warn about surprising behavior of 'friend struct T'.
16015 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
16016 'class This::Inherited'.
16017
16018 2000-09-12 Mark Mitchell <mark@codesourcery.com>
16019
16020 * decl.c (finish_case_label): Given the LABEL_DECL a
16021 DECL_CONTEXT.
16022
16023 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
16024
16025 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
16026 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
16027 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
16028 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
16029 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
16030 New macros.
16031 (sorry_for_unsupported_tree, print_scope_operator,
16032 print_left_paren, print_right_paren, print_left_bracket,
16033 print_right_bracket, print_whitespace): Likewise.
16034 (aggr_variety): Rename to class_key_or_enum.
16035 (print_type): Rename to print_type_id.
16036 (print_type_specifier_seq, print_simple_type_specifier,
16037 print_elaborated_type_specifier,
16038 print_rest_of_abstract_declarator,
16039 print_parameter_declaration_clause, print_exception_specification,
16040 print_nested_name_specifier, print_template_id,
16041 typedef_original_name, print_template_argument_list_start,
16042 print_template_argument_list_end): New functions.
16043
16044 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
16045
16046 * ir.texi: Add more documentation.
16047
16048 2000-09-11 Mark Mitchell <mark@codesourcery.com>
16049
16050 * cp-tree.h (struct saved_scope): Remove x_function_parms.
16051 (current_function_parms): Don't define.
16052 (struct cp_language_function): Remove parms_stored.
16053 (current_function_just_assigned_this): Don't define.
16054 (current_function_parms_stored): Likewise.
16055 (static_ctors): Declare.
16056 (static_dtors): Likewise.
16057 (SF_EXPAND): Don't define.
16058 (expand_start_early_try_stmts): Remove declaration.
16059 (store_parm_decls): Likewise.
16060 * decl.c (static_ctors): Don't declare.
16061 (static_dtors): Likewise.
16062 (struct binding_level): Remove this_block.
16063 (poplevel): Remove dead code.
16064 (set_block): Likewise.
16065 (mark_binding_level): Don't mark this_block.
16066 (mark_saved_scope): Don't mark x_function_parms.
16067 (init_decl_processing): Don't add current_function_parms as a GC
16068 root.
16069 (check_function_type): Change prototype.
16070 (start_function): Remove RTL-generation code.
16071 (expand_start_early_try_stmts): Remove.
16072 (store_parm_decls): Give it internal linkage. Remove
16073 RTL-generation code.
16074 (finish_function): Remove RTL-generation code.
16075 * decl2.c (static_ctors): Fix formatting.
16076 (static_dtors): Likewise.
16077 * method.c (use_thunk): Don't call store_parm_decls.
16078 (synthesize_method): Likewise.
16079 * optimize.c (maybe_clone_body): Likewise.
16080 * parse.y (fn.def2): Likewise.
16081 (.set_base_init): Likewise.
16082 (nodecls): Likewise.
16083 * pt.c (instantiate_decl): Likewise.
16084 * rtti.c (synthesize_tinfo_fn): Likewise.
16085 * semantics.c (genrtl_try_block): Simplify.
16086 (expand_body): Use genrtl_start_function and
16087 genrtl_finish_function.
16088 (genrtl_start_function): New function.
16089 (genrtl_finish_function): Likewise.
16090
16091 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16092
16093 * error.c (cp_tree_printer, case 'P'): Append break.
16094
16095 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16096
16097 * cp-tree.h (frob_opname): Declare.
16098 * parse.y (saved_scopes): New static variable.
16099 (cp_parse_init): Adjust.
16100 (do_id): If lastiddecl is NULL, do do_identifier.
16101 (operator): Save scope information.
16102 (unoperator): New reduction. Restore scope information.
16103 (operator_name): Append unoperator. Call frob_opname.
16104 * spew.c (frob_opname): Define.
16105
16106 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
16107
16108 * decl.c, rtti.c: Include defaults.h if not already included.
16109 Don't define the *_TYPE_SIZE macros.
16110
16111 2000-09-09 Mark Mitchell <mark@codesourcery.com>
16112
16113 * cp-tree.h (push_switch): Change prototype.
16114 (check_cp_case_value): Remove declaration.
16115 (decl_constant_value): Likewise.
16116 * decl.c (struct cp_switch): Add switch_stmt and cases.
16117 (case_compare): New function.
16118 (push_switch): Set switch_stmt. Initialize cases.
16119 (pop_switch): Clean up cases.
16120 (define_case_label): Rename to ...
16121 (finish_case_label): ... this. Do semantic analysis for case
16122 labels here.
16123 (start_function): Correct comment.
16124 * decl2.c (check_cp_case_value): Remove.
16125 * expr.c (do_case): Remove.
16126 * pt.c (tsubst_expr): Adjust call to finish_case_label.
16127 * semantics.c (genrtl_do_poplevel): Remove declaration.
16128 (RECHAIN_STMTS): Remove.
16129 (finish_break_stmt): Use build_break_stmt.
16130 (finish_continue_stmt): Use build_continue_stmt.
16131 (finish_switch_cond): Adjust condition here, rater than in
16132 c_expand_start_case.
16133 (finish_case_label): Remove.
16134 * typeck.c (c_expand_return): Remove.
16135 (c_expand_start_case): Likewise.
16136
16137 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
16138
16139 * ir.texi: Document type nodes.
16140
16141 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16142
16143 * cp-tree.h (init_cp_semantics): Declare.
16144 (genrtl_try_block): Don't declare.
16145 (genrtl_handler): Likewise.
16146 (genrtl_catch_block): Likewise.
16147 (genrtl_ctor_stmt): Likewise.
16148 (genrtl_subobject): Likewise.
16149 (genrtl_do_poplevel): Likewise.
16150 (genrtl_named_return_value): Likewise.
16151 * lex.c (init_parse): Call init_cp_semantics.
16152 * semantics.c (genrtl_try_block): Give it internal linkage.
16153 (genrtl_handler): Likewise.
16154 (genrtl_catch_block): Likewise.
16155 (genrtl_ctor_stmt): Likewise.
16156 (genrtl_subobject): Likewise.
16157 (genrtl_do_poplevel): Likewise.
16158 (genrtl_named_return_value): Likewise.
16159 (lang_expand_stmt): Rename to ...
16160 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
16161 (init_cp_semantics): Define.
16162
16163 * decl.c (initialize_local_var): Remove RTL-generating code.
16164 * semantics.c (genrtl_try_block): Fix formatting.
16165
16166 Move statement-tree facilities from C++ to C front-end.
16167 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16168 (void_zero_node): Remove.
16169 (stmt_tree): Likewise.
16170 (scope_chain): Adjust.
16171 (language_function): Rename to cp_language_function.
16172 (cp_function_chain): Adjust.
16173 (current_stmt_tree): Remove.
16174 (last_tree): Likewise.
16175 (last_expr_type): Likewise.
16176 (struct lang_decl): Adjust.
16177 (STMT_IS_FULL_EXPR_P): Remove.
16178 (add_tree): Remove.
16179 (begin_stmt_tree): Likewise.
16180 (finish_stmt_tree): Likewise.
16181 (walk_tree_fn): Likewise.
16182 (walk_stmt_tree): Likewise.
16183 * class.c (finish_struct): Replace use of add_tree with add_stmt.
16184 * decl.c (mark_stmt_tree): Adjust type.
16185 (init_decl_processing): Don't build void_zero_node.
16186 (initialize_local_var): Adjust usage of current_stmt_tree.
16187 (finish_enum): Use add_stmt, not add_tree.
16188 (save_function_data): Adjust use of language_function.
16189 (finish_constructor_body): Use add_stmt, not add_tree.
16190 (finish_destructor_body): Likewise.
16191 (push_cp_function_context): Adjust use of language_function.
16192 (pop_cp_function_context): Likewise.
16193 (mark_lang_function): Likewise.
16194 (mark_cp_function_context): Likewise.
16195 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16196 (build_vec_init): Likewise.
16197 * semantics.c (SET_LAST_STMT): Remove.
16198 (RECHAIN_STMTS): Don't use it.
16199 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16200 (current_stmt_tree): Define.
16201 (add_tree): Remove.
16202 (finish_goto_stmt): Use add_stmt, not add_tree.
16203 (finish_expr_stmt): Likewise.
16204 (begin_if_stmt): Likewise.
16205 (finish_then_clause): Likewise.
16206 (begin_while_stmt): Likewise.
16207 (begin_do_stmt): Likewise.
16208 (finish_return_stmt): Likewise.
16209 (begin_for_stmt): Likewise.
16210 (finish_break_stmt): Likewise.
16211 (finish_continue_stmt): Likewise.
16212 (begin_switch_stmt): Likewise.
16213 (finish_case_label): Likewise.
16214 (begin_try_block): Likewise.
16215 (begin_function_try_block): Likewise.
16216 (begin_handler): Likewise.
16217 (begin_catch_block): Likewise.
16218 (begin_compound_stmt): Likewise.
16219 (begin_asm_stmt): Likewise.
16220 (finish_asm_stmt): Likewise.
16221 (finish_label_stmt): Likewise.
16222 (add_decl_stmt): Likewise.
16223 (finish_subobject): Likewise.
16224 (finish_decl_cleanup): Likewise.
16225 (finish_named_return_value): Likewise.
16226 (setup_vtbl_ptr): Likewise.
16227 (add_scope_stmt): Likewise.
16228 (finish_stmt_expr): Likewise.
16229 (prune_unused_decls): Remove.
16230 (begin_stmt_tree): Likewise.
16231 (finish_stmt_tree): Likewise.
16232 (prep_stmt): Adjust use of current_stmt_tree.
16233 (lang_expand_stmt): Likewise.
16234 * tree.c (statement_code_p): Remove.
16235 (cp_statement_code_p): New function.
16236 (walk_stmt_tree): Remove.
16237 (init_tree): Set lang_statement_code_p.
16238
16239 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
16240
16241 Integrated preprocessor.
16242
16243 * Make-lang.in, Makefile.in: Remove all references to input.c,
16244 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
16245 * gxx.gperf, hash.h, input.c: Delete.
16246 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16247 initialized properly.
16248
16249 * class.c (fixup_pending_inline): Take a tree, not a
16250 struct pending_inline *. All callers changed.
16251 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16252 RID_PROTECTED entries in ridpointers[] array here.
16253 * decl.c (duplicate_decls): Do not refer to struct
16254 pending_inline.
16255 (record_builtin_type, init_decl_processing): Use RID_MAX not
16256 CP_RID_MAX.
16257 (grokdeclarator): Use C_IS_RESERVED_WORD.
16258 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16259 cpplib.
16260 (grok_x_components): Do not inspect pending_inlines chain.
16261
16262 * cp-tree.h (struct lang_identifier): Add rid_code entry.
16263 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16264 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16265 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16266 TIME_IDENTIFIER_FILEINFO): Kill.
16267 Update prototypes.
16268 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
16269 single 32-bit word.
16270 * parse.y: Call do_pending_inlines unconditionally.
16271 reinit_parse_for_method is now snarf_method. fn.defpen is no
16272 longer necessary. Remove unnecessary <itype> annotation on
16273 SCOPE. Do not refer to end_of_file or struct pending_inline.
16274 * semantics.c (begin_inline_definitions): Call
16275 do_pending_inlines unconditionally.
16276
16277 * lex.c: Remove all code now shared with C front end.
16278 Initialize cpplib properly if USE_CPPLIB. Put reserved words
16279 into the get_identifier table. Rewrite pragma handling to
16280 work with the registry. Move code to save tokens for later
16281 processing to spew.c.
16282
16283 * spew.c: Rewrite everything in terms of token streams instead
16284 of text. Move routines here from lex.c / input.c as
16285 appropriate. GC-mark trees hanging off the pending inlines
16286 chain.
16287
16288 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16289
16290 * NEWS: Mention that the named return value extension has been
16291 deprecated.
16292 * cp-tree.h (original_result_rtx): Define.
16293 (TREE_REFERENCE_EXPR): Remove.
16294 (DECL_VPARENT): Likewise.
16295 (pushdecl_nonclass_level): Likewise.
16296 (store_return_init): Likewise.
16297 (reinit_lang_specific): Likewise.
16298 (genrtl_named_return_value): Change prototype.
16299 * decl.c (original_result_rtx): Remove.
16300 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16301 Do not generate RTL for local variables here.
16302 (store_return_init): Remove.
16303 * semantics.c (genrtl_named_return_value): Simplify. Fold in
16304 store_return_init.
16305 (finish_named_return_value): Adjust accordingly. Warn that this
16306 extension is deprecated.
16307 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16308
16309 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16310
16311 * pt.c (type_unification_real): Replace switch with if.
16312 (unify): Tsubst non-type parms before comparing.
16313
16314 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16315
16316 * error.c (dump_typename): New function, broken out of ...
16317 (dump_type): ... here. Use it.
16318 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16319
16320 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16321
16322 * init.c (build_offset_ref): Deal with namespace scoped
16323 TEMPLATE_ID_EXPRs.
16324
16325 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16326
16327 * class.c (resolve_address_of_overloaded_function): Add
16328 explanation message.
16329 * decl.c (define_case_label): Reformat explanation.
16330 * decl2.c (finish_static_data_member_decl): Likewise.
16331 (grokfield): Likewise.
16332 * friend.c (do_friend): Likewise.
16333
16334 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
16335
16336 * tree.c (walk_tree): Expose tail recursion.
16337 (walk_stmt_tree): New function.
16338 * cp-tree.h: Prototype walk_stmt_tree.
16339 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16340 the BLOCKs directly. If a BLOCK has no variables after
16341 pruning, discard it.
16342 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
16343 restore the line number.
16344
16345 2000-09-05 Mark Mitchell <mark@codesourcery.com>
16346
16347 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16348 (pt.o): Remove dependency on HTAB_H.
16349 * cp-tree.h: Include hashtab.h.
16350 (walk_tree): Change prototype.
16351 (walk_tree_without_duplicates): New function.
16352 * decl.c (check_default_argument): Use it.
16353 * optimize.c (remap_decl): Adjust calls to walk_tree.
16354 (copy_body): Likewise.
16355 (expand_calls_inline): Likewise.
16356 (calls_setjmp_p): Use walk_tree_without_duplicates.
16357 * pt.c: Don't include hashtab.h.
16358 (for_each_template_parm): Use walk_tree_without_duplicates.
16359 * semantics.c (finish-stmt_tree): Likewise.
16360 (expand_body): Likewise.
16361 * tree.c (walk_tree): Add additional parameter.
16362 (walk_tree_without_duplicates): New function.
16363 (count_trees): Use it.
16364 (verify_stmt_tree): Adjust call to walk_tree.
16365 (find_tree): Use walk_tree_without_duplicates.
16366 (no_linkage_check): Likewise.
16367 (break_out_target_exprs): Adjust call to walk_tree.
16368 (cp_unsave): Likewise.
16369
16370 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16371
16372 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16373 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16374 * cp-tree.h (TYPE_BINFO): Adjust comment.
16375 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16376 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16377 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16378 (TYPE_TEMPLATE_INFO): Likewise.
16379 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16380 * class.c (push_nested_class): Likewise.
16381 * decl.c (lookup_name_real): Likewise.
16382 (grokdeclarator): Likewise.
16383 (grok_op_properties): Likewise.
16384 (xref_tag): Likewise.
16385 (xref_basetypes): Likewise.
16386 * decl2.c (constructor_name_full): Likewise.
16387 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16388 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16389 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16390 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16391 (dump_type_suffix): Likewise.
16392 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16393 instead.
16394 (get_aggr_from_typedef): Likewise.
16395 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16396 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16397 (write_template_parm): Likewise.
16398 (write_template_template_parm): Check tree code instead of
16399 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16400 * method.c (build_overload_nested_name): Add
16401 BOUND_TEMPLATE_TEMPLATE_PARM.
16402 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16403 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16404 * pt.c (convert_template_argument): Check tree code instead of
16405 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16406 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16407 (for_each_template_parm): Adjust comment.
16408 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
16409 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16410 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
16411 template_args_equal to compare template template parameter cases.
16412 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16413 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16414 instead.
16415 * tree.c (copy_template_template_parm): Decide whether to create
16416 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16417 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16418 (copy_tree_r): Likewise.
16419 * typeck.c (comptypes): Likewise. Check tree code instead of
16420 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16421
16422 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
16423
16424 * decl.c (finish_function): Move the code for handling functions
16425 marked with the constructor and destructor attributes inside the
16426 expand_p block.
16427
16428 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16429
16430 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16431
16432 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16433
16434 * pt.c (lookup_template_class): Remove abort.
16435 * tree.c (get_type_decl): Allow error_mark_node.
16436
16437 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16438
16439 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16440 TEMPLATE_ID_EXPRs.
16441
16442 2000-09-03 Mark Mitchell <mark@codesourcery.com>
16443
16444 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16445 new ABI mangling.
16446
16447 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16448
16449 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16450 union tag mismatch error reporting.
16451
16452 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16453
16454 * call.c (build_scoped_method_call): Check it is not a namespace.
16455
16456 2000-08-30 Jason Merrill <jason@redhat.com>
16457
16458 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16459
16460 * tree.c (bot_manip): Check TREE_CONSTANT rather than
16461 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
16462 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16463
16464 * decl.c (start_function): Always call make_function_rtl.
16465
16466 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16467
16468 * semantics.c (prune_unused_decls): New function.
16469 (finish_stmt_tree): Call it via walk_tree.
16470
16471 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16472
16473 * class.c (build_secondary_vtable): Constify a char *.
16474 * decl.c (init_decl_processing): Initialize function_id_node,
16475 pretty_function_id_node, and func_id_node.
16476 * input.c (struct input_source): Constify 'str'.
16477 (feed_input): Constify first argument.
16478 * mangle.c (write_identifier): Constify argument.
16479 * pt.c (mangle_class_name_for_template): Constify argument.
16480
16481 2000-08-29 Mark Mitchell <mark@codesourcery.com>
16482
16483 * typeck.c (mark_addressable): Remove code that pokes around in
16484 RTL.
16485
16486 2000-08-28 Jason Merrill <jason@redhat.com>
16487
16488 * lex.c (file_name_nondirectory): Move to toplev.c.
16489
16490 * cp-tree.h (LOCAL_CLASS_P): New macro.
16491 * class.c (finish_struct_1): Use it.
16492
16493 2000-08-27 Alex Samuel <samuel@codesourcery.com>
16494
16495 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16496 (write_encoding): Pass another argument to write_name.
16497 (write_name): Add ignore_local_scope parameter. Fix handling of
16498 local names.
16499 (write_nested_name): Use write_unqualified_name.
16500 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
16501 (write_template_prefix): Use write_unqualified_name.
16502 (write_component): Remove.
16503 (write_local_name): Add parameter. Use direct local entity to
16504 discriminator calculation.
16505 (write_class_enum_type): Pass another argument to write_name.
16506 (write_template_template_arg): Likewise.
16507 (make_guard_variable): Likewise.
16508
16509 2000-08-27 Jason Merrill <jason@redhat.com>
16510
16511 * decl.c (pushdecl): Matching decls for local externs are found in
16512 the current level. Propagate linkage information from previous
16513 declarations.
16514
16515 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
16516
16517 * ir.texi (Expressions): Fix typo.
16518
16519 2000-08-25 Greg McGary <greg@mcgary.org>
16520
16521 * tree.c (init_tree): Use ARRAY_SIZE.
16522
16523 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16524
16525 * error.c (cp_tree_printer): Rework.
16526
16527 2000-08-25 Mark Mitchell <mark@codesourcery.com>
16528
16529 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16530 dyn-string.o.
16531 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16532 (cp-demangle.o): Remove target.
16533 (dyn-string.o): Likewise.
16534
16535 * decl.c (grokfndecl): Require that `main' return an `int'.
16536 * mangle.c (write_encoding): Don't mangle return types for
16537 conversion functions.
16538
16539 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16540
16541 * error.c (tree_formatting_info): New data type.
16542 (tree_being_formatted): New macro.
16543 (tree_formatting_flags): Likewise.
16544 (put_whitespace): Likewise.
16545 (print_tree_identifier): Likewise.
16546 (print_identifier): Likewise.
16547 (cp_tree_printer, print_function_argument_list, print_declaration,
16548 print_expression, print_function_declaration,
16549 print_function_parameter, print_type, print_cv_qualifier): New
16550 functions.
16551 (init_error): Initialize lang_printer.
16552
16553 2000-08-24 Jason Merrill <jason@redhat.com>
16554
16555 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16556 adjustment necessary.
16557
16558 2000-08-24 Greg McGary <greg@mcgary.org>
16559
16560 * cp-tree.h (MAIN_NAME_P): Remove macro.
16561
16562 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
16563
16564 * error.c (print_instantiation_context): Don't forget to flush the
16565 buffer.
16566
16567 2000-08-23 Jason Merrill <jason@redhat.com>
16568
16569 * typeck.c (build_ptrmemfunc): Save the input pmf.
16570
16571 * method.c (process_modifiers): Use same_type_p.
16572
16573 2000-08-23 Mark Mitchell <mark@codesourcery.com>
16574
16575 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16576 * mangle.c (write_function_type): Change prototype.
16577 (write_encoding): Don't mangle return types for
16578 constructors or destructors.
16579 (write_type): Adjust call to write_function_type.
16580 * pt.c (instantiate_template): Instantiate alternate entry points
16581 when instantiating the main function.
16582
16583 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16584
16585 * error.c (cp_print_error_function): Don't use embedded '\n' in
16586 output_printf.
16587
16588 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16589
16590 * decl.c (init_decl_processing): Remove bogus initialization.
16591 * error.c (lang_print_error_function): Restore here.
16592 (init_error): Initialize print_error_function.
16593
16594 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16595
16596 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16597
16598 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
16599
16600 * Makefile.in (error.o): Depends on diagnostic.h
16601
16602 * cp-tree.h (problematic_instantiation_changed,
16603 record_last_problematic_instantiation, current_instantiation,
16604 print_instantiation_context): Declare.
16605 (maybe_print_template_context): Remove.
16606
16607 * decl.c (init_decl_processing): Set print_error_function to NULL.
16608 (lang_print_error_function): Remove, since we're using a new
16609 machinery.
16610
16611 * error.c: #include diagnostic.h
16612 (function_category): New function.
16613 (cp_diagnostic_starter): Likewise.
16614 (cp_diagnostic_finalizer): Likewise.
16615 (cp_print_error_function): Likewise.
16616 (maybe_print_instantiation_context): Likewise.
16617 (print_instantiation_full_context): Likewise.
16618 (print_instantiation_partial_context): Likewise.
16619 (print_instantiation_context): Define.
16620 (init_error): Initialize diagnostic pager and finalizer.
16621
16622 * pt.c (problematic_instantiation_changed): Define.
16623 (record_last_problematic_instantiation): Likewise.
16624 (current_instantiation): Likewise.
16625 (maybe_print_template_context): Remove.
16626 (print_template_context): Likewise.
16627 (current_tinst_level): Make static to reflect Brendan Kehoe's
16628 change of 1995-04-13.
16629 (push_tinst_level): Call print_instantiation_context.
16630
16631 2000-08-21 Nix <nix@esperi.demon.co.uk>
16632
16633 * lang-specs.h: Do not process -o or run the assembler if
16634 -fsyntax-only.
16635
16636 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
16637
16638 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16639 variables.
16640 * decl2.c (lang_decode_option): Disable gettext attributes for
16641 -ansi.
16642
16643 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
16644
16645 * lex.c (lang_init_options): Default diagnostic message maximum
16646 length to 80, when line-wrapping.
16647
16648 2000-08-20 Mark Mitchell <mark@codesourcery.com>
16649
16650 * class.c (build_vtbl_initializer): Clear the entire
16651 vtbl_init_data. Start keeping track of the functions for which we
16652 have created vcall offsets here.
16653 (dfs_build_vcall_offset_vtbl_entries): Remove.
16654 (build_vcall_offset_vtbl_entries): Reimplement.
16655 (add_vcall_offset_vtbl_entries_r): New function.
16656 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
16657 computing when vcall offsets are necessary.
16658
16659 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16660
16661 * decl.c (member_function_or_else): Use cp_error ... %T.
16662 (grokdeclarator): Likewise.
16663 (start_method): Likewise.
16664 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16665
16666 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16667
16668 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16669 TYPE_DECLs.
16670
16671 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16672
16673 * cp-tree.h (PTRMEM_OK_P): New macro.
16674 (itf_ptrmem_ok): New enumeration value.
16675 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16676 argument. Diagnose implicit pointer to member.
16677 (instantiate_type): Don't diagnose implicit pointer to member
16678 here. Pass itf_ptrmem_ok if ok. Adjust calls to
16679 resolve_address_of_overloaded_function.
16680 * init.c (build_offset_ref): Set PTRMEM_OK_P.
16681 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16682 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16683 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16684 (build_unary_op): Deal with single non-static member in
16685 microsoft-land.
16686
16687 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16688
16689 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16690
16691 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16692
16693 * cp-tree.h (enum_name_string): Remove prototype.
16694 (report_case_error): Remove prototype.
16695 * cp/typeck2.c (enum_name_string): Remove.
16696 (report_case_error): Remove.
16697 * error.c (dump_expr): Deal with enum values directly.
16698 Correctly negate integer constant.
16699
16700 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16701
16702 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16703 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16704 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16705 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16706 (__cxa_vec_new): Use __cxa_vec_new2.
16707 (__cxa_vec_delete): Use __cxa_vec_delete2.
16708
16709 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16710
16711 * vec.cc (__cxa_vec_new): Set "C" linkage.
16712 (__cxa_vec_ctor): Likewise.
16713 (__cxa_vec_cctor): Likewise.
16714 (__cxa_vec_dtor): Likewise.
16715 (__cxa_vec_delete): Likewise.
16716 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16717 (__cxa_vec_ctor): Likewise.
16718 (__cxa_vec_cctor): Likewise.
16719 (__cxa_vec_dtor): Likewise.
16720 (__cxa_vec_delete): Likewise.
16721
16722 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16723
16724 * class.c (instantiate_type): Reinstate local variable
16725 deleted in previous change.
16726
16727 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16728 itf_no_attributes.
16729
16730 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16731
16732 * cp-tree.h (instantiate_type_flags): New enumeration.
16733 (instantiate_type): Change parameter.
16734 * class.c (instantiate_type): Adjust prototype. Adjust.
16735 * call.c (standard_conversion): Adjust instantiate_type call.
16736 (reference_binding): Likewise.
16737 (build_op_delete_call): Likewise.
16738 (convert_like_real): Likewise.
16739 * cvt.c (cp_convert_to_pointer): Likewise.
16740 (convert_to_reference): Likewise.
16741 * pt.c (convert_nontype_argument): Likewise.
16742 * typeck.c (build_binary_op): Likewise.
16743 (build_ptrmemfunc): Likewise.
16744 (convert_for_assignment): Likewise.
16745
16746 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16747
16748 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16749 (current_aggr): Define.
16750 * decl.c (grokdeclarator): Make sure a friend class is an
16751 elaborated type specifier.
16752 * parse.y (current_aggr): Remove static definition.
16753 (cp_parse_init): Adjust.
16754 (structsp): Clear and restore current_aggr.
16755 (component_decl_list): Clear current_aggr.
16756
16757 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16758 aggregate tag on the typename's context.
16759
16760 * pt.c (tsubst_friend_class): Return error_mark_node, if
16761 parms becomes NULL.
16762 (instantiate_class_template): Ignore error_mark_node friend types.
16763
16764 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
16765
16766 * cvt.c (warn_ref_binding): New static function, broken out of ...
16767 (convert_to_reference): ... here. Use it.
16768
16769 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16770
16771 * parse.y (template_arg): Add rule for template qualified with
16772 global scope.
16773
16774 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16775
16776 * decl2.c (add_function): Reorganize.
16777 (arg_assoc): Do not consider function template decls.
16778
16779 2000-08-11 Jason Merrill <jason@redhat.com>
16780
16781 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16782 looking inside.
16783
16784 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16785
16786 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16787 (lookup_nested_tag): Likewise.
16788
16789 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16790 can be produced.
16791
16792 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16793
16794 * parse.y (named_complex_class_head_sans_basetype): Remove
16795 always true if.
16796
16797 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16798
16799 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16800 explicit TEMPLATE_ID_EXPR args.
16801 (build_expr_from_tree, case CALL_EXPR): Likewise.
16802
16803 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16804
16805 * decl.c (check_tag_decl): Diagnose typename's which don't
16806 declare anything.
16807
16808 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
16809
16810 * init.c (build_aggr_init): Reject bogus array initializers
16811 early.
16812
16813 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16814
16815 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16816 runtime.
16817 * cp/tinfo.cc (__dynamic_cast): Likewise.
16818 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16819
16820 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16821
16822 * cvt.c (convert_to_pointer_force): Fix error message when
16823 attempting to cast from ambiguous base.
16824
16825 2000-08-08 Jason Merrill <jason@redhat.com>
16826
16827 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16828 (tsubst_template_arg_vector): Likewise.
16829
16830 * decl2.c (build_anon_union_vars): Choose the largest field; don't
16831 assume that one will be as large as the union.
16832
16833 2000-08-07 Kazu Hirata <kazu@hxi.com>
16834
16835 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16836 * decl.c (pop_labels): Likewise.
16837
16838 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
16839
16840 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16841 specifications.
16842 (__pointer_to_member_type_info): Likewise.
16843 (__base_class_info): Likewise.
16844 (__class_type_info): Likewise.
16845 (__si_class_type_info): Likewise.
16846 (__vmi_class_type_info): Likewise.
16847 * tinfo.cc (__si_class_type_info::__do_find_public_src):
16848 Changed member names to match specifications.
16849 (__vmi_class_type_info::__do_find_public_src): Likewise.
16850 (__si_class_type_info::__do_dyncast): Likewise.
16851 (__vmi_class_type_info::__do_dyncast): Likewise.
16852 (__si_class_type_info::__do_upcast): Likewise.
16853 (__vmi_class_type_info::__do_upcast): Likewise.
16854 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16855 (__pbase_type_info::__pointer_catch): Likewise.
16856 (__pointer_type_info::__pointer_catch): Likewise.
16857 (__pointer_to_member_type_info::__pointer_catch): Likewise.
16858
16859 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
16860
16861 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16862 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16863 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16864
16865 2000-08-04 Mark Mitchell <mark@codesourcery.com>
16866
16867 * cp-tree.h (add_method): Change prototype.
16868 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
16869 Don't double the size of the method vector in the error case.
16870 (handle_using_decl): Adjust call to add_method.
16871 (add_implicitly_declared_members): Likewise.
16872 (clone_function_decl): Likewise.
16873 * decl2.c (check_classfn): Likewise.
16874 * semantics.c (finish_member_declaration): Likewise.
16875
16876 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
16877
16878 * decl.c (flag_isoc94): New variable.
16879
16880 2000-08-02 Jason Merrill <jason@redhat.com>
16881
16882 * pt.c (do_type_instantiation): Add complain parm; don't complain
16883 if called recursively.
16884 * cp-tree.h, parse.y: Adjust.
16885
16886 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
16887
16888 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16889 -Wno-strict-prototypes.
16890
16891 * g++spec.c: Adjust type of second argument to
16892 lang_specific_driver, and update code as necessary.
16893
16894 * cp-tree.h: Don't prototype min_precision here.
16895 (my_friendly_assert): Cast expression to void.
16896 * semantics.c (do_poplevel): Initialize scope_stmts.
16897
16898 2000-08-02 Mark Mitchell <mark@codesourcery.com>
16899
16900 * cp-tree.h (DECL_NEEDED_P): Tweak.
16901
16902 2000-07-28 Jason Merrill <jason@redhat.com>
16903
16904 * lang-specs.h: Use %i in rule for .ii files.
16905
16906 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
16907
16908 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16909
16910 2000-07-30 Mark Mitchell <mark@codesourcery.com>
16911
16912 Allow indirect primary bases.
16913 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
16914 primary_base.
16915 (CLASSTYPE_VFIELD_PARENT): Remove.
16916 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16917 (BINFO_PRIMARY_BINFO): Remove.
16918 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16919 (BINFO_VBASE_PRIMARY_P): Likewise.
16920 (BINFO_PRIMARY_BASE_OF): New macro.
16921 (BINFO_INDIRECT_PRIMARY_P): Likewise.
16922 (get_primary_binfo): New function.
16923 * decl.c (lang_mark_tree): Make lang_type::primary_base.
16924 * class.c (vcall_offset_data_s): Rename to ...
16925 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
16926 and add ctor_vtbl_p.
16927 (get_derived_offset): Use get_primary_binfo.
16928 (dfs_mark_primary_bases): Adjust handling of virtual primary
16929 bases.
16930 (mark_primary_bases): Likewise.
16931 (set_primary_base): Take a binfo, not an integer, as a
16932 representation of the primary base.
16933 (indirect_primary_base_p): Remove.
16934 (determine_primary_base): Adjust for indirect primary bases.
16935 (dfs_find_final_overrider): Fix typo in coment.
16936 (update_vtable_entry_for_fn): Use get_primary_binfo.
16937 (layout_nonempty_base_or_field): Tweak.
16938 (build_base_fields): Adjust for new primary base semantics.
16939 (dfs_propagate_binfo_offsets): Remove.
16940 (propagate_binfo_offsets): Rewrite.
16941 (dfs_set_offset_for_shared_vbases): Remove.
16942 (layout_virtual_bases): Don't use it.
16943 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16944 ABI.
16945 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16946 CLASSTYPE_VFIELD_PARENT.
16947 (dfs_get_primary_binfo): New function.
16948 (get_primary_binfo): Likewise.
16949 (dump_class_hierarchy_r): Tweak printing of primary bases.
16950 (build_vtbl_initializer): Fix typo in comments. Use
16951 vtbl_init_data.
16952 (build_vcall_and_vbase_vtbl_entries): Likewise.
16953 (build_vbaes_offset_vtbl_entries): Likewise.
16954 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16955 BV_VCALL_INDEX to handle indirect primary bases.
16956 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16957 (build_rtti_vtbl_entries): Likewise.
16958 * search.c (get_shared_vbase_if_not_primary): Tweak.
16959 (find_vbase_instance): Likewise.
16960 (binfo_for_vtable): Simplify.
16961 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16962 (make_binfo): Make it have 11 entries.
16963
16964 2000-07-30 Alex Samuel <samuel@codesourcery.com>
16965
16966 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16967 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16968 ascertaining primaryness.
16969 (G): Remove template_args.
16970 (decl_is_template_id): New function.
16971 (write_encoding): Use decl_is_template_id.
16972 (write_name): Likewise. Handle type_decls. Get main variant of
16973 type decls.
16974 (write_nested_name): Likewise.
16975 (write_prefix): Likewise.
16976 (write_template_prefix): Likewise.
16977 (write_special_name_constructor): Remove defunct production from
16978 comment.
16979 (write_bare_function_type): Remove comment about absent parameter.
16980 (write_template_template_arg): Add missing grammar production to
16981 comment.
16982
16983 2000-07-27 Jason Merrill <jason@redhat.com>
16984
16985 * decl.c (duplicate_decls): If common_type produces a non-typedef
16986 type for a typedef, just use the old type.
16987
16988 2000-07-27 Mark Mitchell <mark@codesourcery.com>
16989
16990 * cp-tree.h (function_depth): Declare.
16991 (verify_stmt_tree): Likewise.
16992 (find_tree): Likewise.
16993 * decl.c (function_depth): Give it external linkage.
16994 * optimize.c (optimize_function): Increment and decrement it.
16995 * tree.c (verify_stmt_tree_r): New function.
16996 (verify_stmt_tree): Likewise.
16997 (find_tree_r): Likewise.
16998 (find_tree): Likewise.
16999
17000 2000-07-27 Jason Merrill <jason@redhat.com>
17001
17002 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
17003 TYPE_PTRMEMFUNC_P.
17004 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
17005
17006 2000-07-26 Mark Mitchell <mark@codesourcery.com>
17007
17008 * decl.c (start_cleanup_fn): Mark the function as `inline'.
17009 * decl2.c (get_guard): Call cp_finish_decl, not
17010 rest_of_decl_compilation, for local guards.
17011 * lex.c (do_identifier): Remove unused variable.
17012
17013 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
17014
17015 * parse.y: Add missing ';'.
17016
17017 2000-07-26 Mark Mitchell <mark@codesourcery.com>
17018
17019 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
17020 of `extern "C++"'.
17021
17022 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
17023
17024 Kill strict_prototype. Backwards compatibility only for
17025 non NO_IMPLICIT_EXTERN_C systems.
17026 * cp-tree.h (flag_strict_prototype): Remove.
17027 (strict_prototype): Remove.
17028 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
17029 * decl.c (maybe_push_to_top_level): Adjust.
17030 (pop_from_top_level): Adjust.
17031 (decls_match): Only allow sloppy parm matching for ancient
17032 system headers.
17033 (init_decl_processing): Adjust.
17034 (grokdeclarator): Adjust.
17035 * decl2.c (flag_strict_prototype): Remove.
17036 (strict_prototype): Remove.
17037 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
17038 (lang_f_options): Remove "strict-prototype".
17039 (unsupported-options): Add "strict-prototype".
17040 * lex.c (do_identifier): Adjust.
17041 (do_scoped_id): Adjust.
17042 * parse.y (empty_parms): Adjust.
17043 * class.c (push_lang_context): Adjust.
17044 (pop_lang_context): Adjust.
17045 * typeck.c (comp_target_parms): Adjust.
17046
17047 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
17048
17049 * decl.c (poplevel): Deal with anonymous variables at for scope.
17050 (maybe_inject_for_scope_var): Likewise.
17051
17052 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
17053
17054 * decl.c: Remove all signal handling code, now done in toplev.c.
17055
17056 2000-07-23 Mark Mitchell <mark@codesourcery.com>
17057
17058 * decl.c (make_rtl_for_nonlocal_decl): Rework.
17059
17060 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
17061 correctly.
17062
17063 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
17064
17065 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
17066 Define my_friendly_assert and my_friendly_abort as macros
17067 which may call friendly_abort. Prototype friendly abort, not
17068 my_friendly_abort or my_friendly_assert.
17069 * decl.c (signal_catch): Report the signal caught in the error
17070 message. Call fatal directly.
17071 * typeck2.c (ack, my_friendly_assert): Delete.
17072 (my_friendly_abort): Rename to friendly_abort. Expect file,
17073 line, and function parameters. Report the abort code, then
17074 call fancy_abort. Do not mask an abort if errors have
17075 already occurred.
17076
17077 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
17078
17079 * typeck.c (comp_target_parms): Remove obsolete parameter.
17080 (comp_target_types): Adjust.
17081
17082 2000-07-17 Jason Merrill <jason@redhat.com>
17083
17084 * typeck.c (mark_addressable): Never set TREE_USED.
17085 * call.c (build_call): Don't abort on calls to library functions
17086 that have been declared normally.
17087
17088 * typeck.c (build_binary_op): Fix grammar in warning.
17089
17090 * exception.cc (__eh_free): Fix prototype.
17091
17092 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
17093
17094 * decl.c (pushdecl): Handle seeing an OVERLOAD in
17095 IDENTIFIER_NAMESPACE_VALUE.
17096
17097 2000-07-16 Mark Mitchell <mark@codesourcery.com>
17098
17099 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
17100 * method.c (use_thunk): Correct handling of vcall offsets.
17101
17102 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
17103
17104 * .cvsignore: parse.h and parse.c have no cp- prefix.
17105
17106 2000-07-13 Mark Mitchell <mark@codesourcery.com>
17107
17108 * .cvsignore: New file.
17109
17110 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
17111
17112 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
17113
17114 2000-07-12 Mark Mitchell <mark@codesourcery.com>
17115
17116 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
17117 * parse.c: Remove.
17118 * parse.h: Likewise.
17119
17120 2000-07-11 Mark Mitchell <mark@codesourcery.com>
17121
17122 * class.c (layout_class_type): Add pointers to virtual bases after
17123 base classes under the old ABI.
17124
17125 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
17126
17127 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
17128 (finish_continue_stmt): Likewise.
17129 (begin_for_stmt): Remove call to note_level_for_for.
17130 (finish_goto_stmt): Change call from build_min_nt
17131 to build_stmt.
17132 (finish_expr_stmt): Likewise.
17133 (begin_if_stmt): Likewise.
17134 (begin_while_stmt): Likewise.
17135 (finish_while_stmt): Likewise.
17136 (finish_return_stmt): Likewise.
17137 (begin_for_stmt): Likewise.
17138 (finish_for_stmt): Likewise.
17139 (finish_break_stmt): Likewise.
17140 (begin_switch_stmt): Likewise.
17141 (finish_case_label): Likewise.
17142 (genrtl_try_block): Likewise.
17143 (begin_try_block): Likewise.
17144 (begin_handler): Likewise.
17145 (begin_compound_stmt): Likewise.
17146 (finish_asm_stmt): Likewise.
17147 (finish_label_stmt): Likewise.
17148 (add_decl_stmt): Likewise.
17149 (finish_subobject): Likewise.
17150 (finish_decl_cleanup): Likewise.
17151 (finish_named_return_value): Likewise.
17152 (setup_vtbl_ptr): Likewise.
17153 (add_scope_stmt): Likewise.
17154 * decl.c (finish_constructor_body): Likewise.
17155 (finish_destructor_body): Likewise.
17156 * optimize.c (copy_body_r): Likewise.
17157 (initialize_inlined_parameters): Likewise.
17158 (declare_return_variable): Likewise.
17159 (expand_call_inline): Likewise.
17160
17161 2000-07-10 Jakub Jelinek <jakub@redhat.com>
17162
17163 * semantics.c (expand_body): Sync interface information
17164 at the end of function body expansion.
17165
17166 2000-07-09 Jason Merrill <jason@redhat.com>
17167
17168 * init.c (build_new_1): Bail early if the call to new fails.
17169
17170 * decl.c (compute_array_index_type): Check specifically for
17171 an INTEGER_CST, not just TREE_CONSTANT.
17172
17173 * decl.c (duplicate_decls): Don't call duplicate_decls on
17174 the DECL_TEMPLATE_RESULT.
17175 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17176 codes.
17177
17178 * error.c (dump_template_bindings): Don't crash if we had an
17179 invalid argument list.
17180
17181 * typeck.c (c_expand_start_case): Do narrowing here.
17182 * semantics.c (finish_switch_cond): Not here.
17183
17184 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
17185
17186 * parse.y (asm_clobbers): Do string concatenation.
17187
17188 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17189
17190 * decl.c (pushtag): Don't put local classes in template functions
17191 on the local_classes list.
17192
17193 2000-07-04 Scott Snyder <snyder@fnal.gov>
17194
17195 * decl2.c (get_guard): Add missing return for old ABI local
17196 variable case.
17197
17198 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17199
17200 * cp-tree.h (char_type_p): New function.
17201 * decl.c (init_decl_processing): Don't initialize
17202 signed_wchar_type_node or unsigned_wchar_type_node.
17203 (complete_array_type): Handle brace-enclosed string-constants.
17204 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17205 * tree.c (char_type_p): New function.
17206 * typeck2.c (digest_init): Use char_type_p.
17207
17208 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17209
17210 * pt.c (tsubst): Don't layout type, if it's error_mark.
17211
17212 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17213
17214 * pt.c (instantiate_pending_templates): Reset template level.
17215
17216 2000-07-05 Jason Merrill <jason@redhat.com>
17217
17218 * call.c (joust): Don't complain about `operator char *()' beating
17219 `operator const char *() const'.
17220
17221 2000-07-04 scott snyder <snyder@fnal.gov>
17222 Jason Merrill <jason@redhat.com>
17223
17224 * repo.c (repo_get_id): Handle the case where a class with virtual
17225 bases has a null TYPE_BINFO_VTABLE.
17226
17227 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
17228 Jason Merrill <jason@redhat.com>
17229
17230 * parse.y (member_init): Just pass in the type.
17231 * init.c (expand_member_init): Handle getting a type.
17232
17233 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17234 Jason Merrill <jason@redhat.com>
17235
17236 * decl.c (finish_function): Warn if a function has no return
17237 statement.
17238 Suggested by Andrew Koenig.
17239 * typeck.c (check_return_expr): Do set current_function_returns_value
17240 if we got an error_mark_node.
17241
17242 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17243
17244 * decl2.c (push_decl_namespace): Push the original namespace.
17245
17246 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17247
17248 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17249 * semantics.c (begin_class_definition): Clear it.
17250
17251 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
17252
17253 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17254 (genrtl_expr_stmt): Likewise.
17255 (genrtl_decl_stmt): Likewise.
17256 (genrtl_if_stmt): Likewise.
17257 (genrtl_while_stmt): Likewise.
17258 (genrtl_do_stmt): Likewise.
17259 (genrtl_return_stmt): Likewise.
17260 (genrtl_for_stmt): Likewise.
17261 (genrtl_break_stmt): Likewise.
17262 (genrtl_continue_stmt): Likewise.
17263 (genrtl_scope_stmt): Likewise.
17264 (genrtl_switch_stmt): Likewise.
17265 (genrtl_case_label): Likewise.
17266 (genrtl_begin_compound_stmt): Likewise.
17267 (genrtl_finish_compound_stmt): Likewise.
17268 (genrtl_compound_stmt): Likewise.
17269 (genrtl_asm_stmt): Likewise.
17270
17271 * init.c (begin_init_stmts): Remove call to
17272 genrtl_begin_compound_stmt.
17273 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17274
17275 * semantics.c (lang_expand_stmt): Changed call to
17276 genrtl_compound_stmt to ignore return value.
17277
17278 2000-07-02 Mark Mitchell <mark@codesourcery.com>
17279
17280 * mangle.c (canonicalize_for_substitution): Return the canonical
17281 variant of a type.
17282
17283 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17284 TYPE_DECL.
17285 * typeck.c (commonparms): Remove obstack manipulations.
17286
17287 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
17288
17289 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17290
17291 * Makefile.in (OBJS): Added ../c-semantics.o.
17292 (OBJDEPS): Likewise.
17293
17294 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17295 ../c-common.h.
17296 (struct stmt_tree): Added comment.
17297 (current_function_name_declared): Removed.
17298 (stmts_are_full_exprs_p): Likewise.
17299 (genrtl_do_pushlevel): Likewise.
17300 (genrtl_clear_out_block): Likewise.
17301 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17302 (DECL_ANON_UNION_ELEMS): Likewise.
17303 (emit_local_var): Likewise.
17304 (make_rtl_for_local_static): Likewise.
17305 (do_case): Likewise.
17306 (expand_stmt): Likewise.
17307 (genrtl_decl_cleanup): Likewise.
17308 (c_expand_asm_operands): Likewise.
17309 (c_expand_return): Likewise.
17310 (c_expand_start_case): Likewise.
17311
17312 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17313 (emit_local_var): Likewise.
17314 (initialize_local_var): Change reference to
17315 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17316 Change reference to stmts_are_full_exprs_p to
17317 current_stmt_tree->stmts_are_full_exprs_p.
17318 (push_cp_function_context): Likewise.
17319
17320 * expect.c (expand_throw): Change reference to
17321 stmts_are_full_exprs_p.
17322
17323 * init.c (build_aggr_init): Change reference to
17324 stmts_are_full_exprs_p.
17325 (build_vec_init): Likewise.
17326
17327 * optimize.c (maybe_clone_body): Change reference to
17328 current_function_name_declared to
17329 cp_function_chain->name_declared.
17330
17331 * pt.c (instantiate_decl): Change reference to
17332 current_function_name_declared to
17333 cp_function_chain->name_declared.
17334
17335 * semantics.c (expand_cond): Moved declaration to c-common.h.
17336 (genrtl_do_pushlevel): Moved to c-semantics.c.
17337 (genrtl_clear_out_block): Likewise.
17338 (genrtl_goto_stmt): Likewise.
17339 (genrtl_expr_stmt): Likewise.
17340 (genrtl_decl_stmt): Likewise.
17341 (gerntl_if_stmt): Likewise.
17342 (genrtl_while_stmt): Likewise.
17343 (genrtl_do_stmt): Likewise.
17344 (genrtl_return_stmt): Likewise.
17345 (genrtl_for_stmt): Likewise.
17346 (genrtl_break_stmt): Likewise.
17347 (genrtl_continue_stmt): Likewise.
17348 (genrtl_scope_stmt): Likewise.
17349 (genrtl_switch_stmt): Likewise.
17350 (genrtl_case_label): Likewise.
17351 (genrtl_begin_compound_stmt): Likewise.
17352 (genrtl_finish_compound_stmt): Likewise.
17353 (genrtl_compound_stmt): Likewise.
17354 (genrtl_asm_stmt): Likewise.
17355 (genrtl_decl_cleanup): Likewise.
17356 (expand_cond): Likewise.
17357 (expand_stmt): Renamed to ...
17358 (lang_expand_stmt): ... this.
17359 (lang_expand_expr_stmt): Initialize.
17360 (set_current_function_name_declared): Likewise.
17361 (stmts_are_full_exprs_p): Likewise.
17362 (current_function_name_declared): Likewise.
17363 (anon_aggr_type_p): Likewise.
17364 (do_poplevel): Change reference to
17365 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17366 Change reference to stmts_are_full_exprs_p to
17367 current_stmt_tree->stmts_are_full_exprs_p.
17368 (add_tree): Likewise.
17369 (finish_expr_stmt): Likewise.
17370 (prep_stmt): Likewise.
17371 (lang_expand_stmt): Likewise.
17372 (begin_compound_stmt): Change reference to
17373 current_function_name_declared to
17374 cp_function_chain->name_declared and call to
17375 current_function_name_declared().
17376 (setup_vtbl_ptr): Likewise.
17377 (genrtl_do_poplevel): Removed.
17378
17379 2000-06-30 Jason Merrill <jason@redhat.com>
17380
17381 * init.c (init_init_processing): Go back to aligning like
17382 double_type_node for old ABI.
17383 (get_cookie_size): Make cookie larger if we get a type that needs
17384 more alignment.
17385 (build_vec_delete): Call it.
17386
17387 * typeck.c (qualify_type_recursive): New fn.
17388 (composite_pointer_type): Use it.
17389 (build_binary_op): Use composite_pointer_type.
17390
17391 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
17392 Jason Merrill <jason@redhat.com>
17393
17394 * typeck.c (check_return_expr): Don't complain about returning
17395 NULL from operator new if -fcheck-new.
17396 * cp-tree.h: Declare flag_check_new here.
17397 * init.c: Not here.
17398
17399 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17400
17401 * mangle.c (find_substitution): Use same_type_p.
17402 (write_encoding): Don't check for substitutions.
17403
17404 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17405
17406 * parse.y (expr_no_comma_rangle): New non-terminal.
17407 (template_parm): Use it for default parameter case.
17408 (template_arg): Use it.
17409 (expr_no_commas): Remove commented out undefined extensions.
17410 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17411 * parse.h, parse.c: Rebuilt.
17412
17413 2000-06-30 Mark Mitchell <mark@codesourcery.com>
17414
17415 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17416 (finish_asm_stmt): Do it here, instead.
17417
17418 * cp-tree.h (ridpointers): Don't declare.
17419 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17420 (record_builtin_java_type): Likewise.
17421 (init_decl_processing): Likewise.
17422 * lex.c: Move inclusion of lex.h.
17423 (ridpointers): Don't define.
17424 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
17425 RID_MAX.
17426 * lex.h (enum rid): Rename to ...
17427 (enum cp_rid): ... this.
17428 (ridpointers): Don't declare.
17429 * parse.y: Move inclusion of lex.h.
17430 * parse.c: Regenerated.
17431 * spew.c: Move inclusion of lex.h.
17432
17433 * cp-tree.h (struct language_function): Remove temp_name_counter.
17434 (temp_name_counter): Remove.
17435 (get_temp_name): Change prototype.
17436 (get_guard): New function.
17437 (get_guard_cond): Likewise.
17438 (set_guard): Likewise.
17439 * cvt.c (build_up_reference): Adjust call to get_temp_name.
17440 * decl.c (expand_static_init): Use get_guard and friends to
17441 implement guard variables.
17442 * decl2.c (get_temp_name): Assume that the variables created are
17443 always static.
17444 (get_sentry): Rename to ...
17445 (get_guard): ... this. Implement new ABI guard variables.
17446 (get_guard_bits): New function.
17447 (get_guard_cond): Likewise.
17448 (set_guard): Likewise.
17449 (start_static_initialization_or_destruction): Use them.
17450 (do_static_initialization): Replace sentry with guard throughout.
17451 (do_static_destruction): Likewise.
17452 * init.c (create_temporary_var): Add comment.
17453
17454 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17455
17456 * mangle.c (find_substitution): Use same_type_p.
17457 (write_encoding): Don't check for substitutions.
17458
17459 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17460
17461 * parse.y (expr_no_comma_rangle): New non-terminal.
17462 (template_parm): Use it for default parameter case.
17463 (template_arg): Use it.
17464 (expr_no_commas): Remove commented out undefined extensions.
17465 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17466 * parse.h, parse.c: Rebuilt.
17467
17468 2000-06-29 Mark Mitchell <mark@codesourcery.com>
17469
17470 * cp-tree.h (flag_const_strings): Remove.
17471 (warn_parentheses): Likewise.
17472 (warn_format): Likewise.
17473 (common_type): Likewise.
17474 (default_conversion): Likewise.
17475 (build_binary_op): Likewise.
17476 (cp_build_binary_op): New macro.
17477 * call.c (build_new_op): Use cp_build_binary_op instead of
17478 build_binary_op.
17479 * class.c (build_vtable_entry_ref): Likewise.
17480 * decl.c (expand_static_init): Likewise.
17481 (compute_array_index_type): Likewise.
17482 (build_enumerator): Likewise.
17483 * decl2.c (delete_sanity): Likewise.
17484 (start_static_initialization_or_destruction): Likewise.
17485 * error.c (dump_type_suffix): Likewise.
17486 * init.c (resolve_offset_ref): Likewise.
17487 (build_new): Likewise.
17488 (build_new_1): Likewise.
17489 (build_vec_delete_1): Likewise.
17490 (build_vec_init): Likewise.
17491 (build_delete): Likewise.
17492 * rtti.c (synthesize_tinfo_fn): Likewise.
17493 (synthesize_tinfo_var): Likewise.
17494 * search.c (expand_upcast_fixups): Likewise.
17495 (fixup_all_virtual_upcast_offsets): Likewise.
17496 * typeck.c (build_array_ref): Likewise.
17497 (get_member_function_from_ptrfunc): Likewise.
17498 (build_binary_op): Add parameter.
17499 (pointer_int_sum): Use cp_build_binary_op.
17500 (pointer_diff): Likewise.
17501 (build_modify_expr): Likewise.
17502 (get_delta_difference): Likewise.
17503 (build_ptrmemfunc): Likewise.
17504
17505 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
17506
17507 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17508 * decl.c (create_implicit_typedef): Adjust.
17509 * decl2.c (build_artificial_parm): Adjust.
17510 * method.c (implicitly_declare_fn): Adjust.
17511 * pt.c (push_inline_template_parms_recursive): Adjust.
17512 (process_template_parm): Adjust.
17513 (overloaded_template_name): Adjust.
17514 * semantics.c (finish_template_template_parm): Adjust.
17515
17516 2000-06-28 Mark Mitchell <mark@codesourcery.com>
17517
17518 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17519 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17520 where to emit thunks.
17521 (build_vtt): Adjust call to build_vtt_inits.
17522 (build_vtt_inits): Add parameter to indicate whether or not
17523 sub-VTTs for virtual bases should be included. Adjust handling of
17524 construction vtables.
17525 (get_matching_base): New function.
17526 (dfs_build_vtt_inits): Rename to ...
17527 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17528 construction vtables.
17529 (dfs_fixup_binfo_vtbls): Likewise.
17530 (build_ctor_vtbl_groups): Build construction vtables for virtual
17531 bases, too.
17532 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17533 to build construction vtbls.
17534 (dfs_accumulate_vtbl_inits): Adjust handling of
17535 construction vtables.
17536
17537 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17538 types correctly.
17539
17540 2000-06-27 Mark Mitchell <mark@codesourcery.com>
17541
17542 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17543
17544 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17545
17546 * search.c (hides): Remove.
17547 (is_subobject_of_p): Add most_derived parameter. Use
17548 CANONICAL_BINFO.
17549 (lookup_field_queue_p): Adjust.
17550 (lookup_field_r): Adjust.
17551
17552 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17553
17554 * decl2.c (handle_class_head): Bash typedefs to the type's main
17555 decl.
17556
17557 2000-06-25 Mark Mitchell <mark@codesourcery.com>
17558
17559 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17560 (begin_global_stmt_expr): ... this.
17561 (genrtl_finish_stmt_expr): Rename to ...
17562 (finish_global_stmt_expr): ... this.
17563 * init.c (begin_init_stmts): Adjust calls.
17564 (finish_init_stmts): Likewise.
17565 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17566 (begin_global_stmt_expr): ... this.
17567 (genrtl_finish_stmt_expr): Rename to ...
17568 (finish_global_stmt_expr): ... this.
17569
17570 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17571
17572 * search.c (lookup_member): Fix typo in comment.
17573
17574 2000-06-24 Jason Merrill <jason@redhat.com>
17575
17576 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17577 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17578
17579 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17580
17581 * parse.y (complex_direct_notype_declarator): Support global_scope.
17582 * Makefile.in: Adjust conflict count.
17583
17584 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17585
17586 * parse.y (template_arg): Convert TEMPLATE_DECL
17587 that is a template template parameter to
17588 TEMPLATE_TEMPLATE_PARM here.
17589
17590 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17591 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17592 (copy_template_template_parm): Adjust prototype.
17593 * decl.c (grokdeclarator): Remove dead code.
17594 * pt.c (process_template_parm): Tidy.
17595 (lookup_template_class): Construct nodes in
17596 copy_template_template_parm.
17597 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17598 lookup_template_class. Use TYPE_TI_TEMPLATE.
17599 * tree.c (copy_template_template_parm): Add NEWARGS
17600 parameter.
17601 (mapcar): Adjust call to copy_template_template_parm.
17602 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17603 * method.c (build_template_template_parm_names): Change error
17604 code to avoid compilation warning.
17605
17606 * gxxint.texi: Document template template parameter
17607 name mangling.
17608
17609 2000-06-21 Alex Samuel <samuel@codesourcery.com>
17610
17611 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17612 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17613 (cp-demangle.o): New rule.
17614 (dyn-string.o): Likewise.
17615 * inc/cxxabi.h (__cxa_demangle): New declaration.
17616
17617 2000-06-22 Mark Mitchell <mark@codesourcery.com>
17618
17619 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17620 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17621 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
17622 a tree, not an int.
17623 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17624 (make_thunk): Change prototype.
17625 (emit_thunk): Rename to use_thunk.
17626 (mangle_thunk): Change prototype.
17627 * class.c (get_derived_offset): Simplify.
17628 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17629 BV_GENERATE_THUNK_WITH_VTABLE_P.
17630 (build_primary_vtable): Simplify.
17631 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17632 (dfs_find_base): Remove.
17633 (update_vtable_entry_for_fn): Correct bug in finding the base
17634 where a virtual function was first declared. Figure out whether
17635 or not to emit a vcall-thunk with the vtables in which it appears.
17636 Correct logic for deciding whether to use an ordinary thunk, or a
17637 vcall thunk.
17638 (finish_struct_1): Remove unnecssary code.
17639 (build_vtbl_initializer): Use ssize_int for the running counter of
17640 negative indices.
17641 (build_vtbl_initializer): Only use vcall thunks where necessary.
17642 Mark thunks as needing to be emitted with their vtables, or not.
17643 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17644 indices. Use size_binop.
17645 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17646 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
17647 size_binop.
17648 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17649 (build_vtable_entry): Mark thunks as needing to be emitted with
17650 their vtables, or not.
17651 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17652 * decl2.c (mark_vtable_entries): Use use_thunk instead of
17653 emit_thunk.
17654 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
17655 information.
17656 * error.c (dump_expr): Use BV_FN.
17657 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17658 not an int.
17659 * method.c (make_thunk): Likewise.
17660 (emit_thunk): Rename to use_thunk. Allow callers to decide
17661 whether or not to actually emit the thunk. Adjust for changes in
17662 representation of vcall offsets.
17663 * search.c (dfs_get_pure_virtuals): Use BV_FN.
17664 * semantics.c (emit_associated_thunks): New function.
17665 (expand_body): Use it.
17666 * ir.texi: Adjust decriptions of thunks.
17667
17668 2000-06-22 Jason Merrill <jason@redhat.com>
17669
17670 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17671 (tsubst_friend_function): Copy it here.
17672
17673 * decl.c (grok_op_properties): Fix typo.
17674
17675 * decl2.c (delete_sanity): Clarify warning, avoid failure on
17676 deleting void*.
17677
17678 * pt.c (check_explicit_specialization): Clarify error.
17679
17680 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17681 an old OVERLOAD when we're declaring a non-function.
17682 (pushdecl, destroy_local_var): Check for error_mark_node.
17683 (warn_extern_redeclared_static): Also bail early if
17684 we're a CONST_DECL.
17685 (push_overloaded_decl): Ignore an old error_mark_node.
17686
17687 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
17688
17689 * call.c (build_x_va_arg): Check if in a template decl.
17690 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17691
17692 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17693
17694 * class.c (push_lang_context): TYPE_NAME gets you to the Java
17695 types DECLs.
17696 * decl.c (check_goto): Computed gotos assumed OK.
17697
17698 2000-06-20 Jason Merrill <jason@redhat.com>
17699
17700 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17701 for which we don't need to look for instantiations.
17702
17703 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
17704
17705 * parse.y (program): Always call finish_translation_unit.
17706 * parse.c, parse.h: Rebuilt.
17707
17708 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
17709
17710 * method.c: Don't include hard-reg-set.h.
17711
17712 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17713
17714 * rtti.c (get_base_offset): Cope when vbase field is in a base.
17715
17716 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17717
17718 * call.c (build_conditional_expr): Use VOID_TYPE_P.
17719 * cvt.c (cp_convert_to_pointer): Likewise.
17720 (convert_to_void): Likewise.
17721 * error.c (dump_expr): Likewise.
17722 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17723 * init.c (build_delete): Likewise.
17724 * method.c (emit_thunk): Likewise.
17725 * optmize.c (declare_return_variable): Likewise.
17726 * rtti.c (get_tinfo_decl_dynamic): Likewise.
17727 (get_typeid): Likewise.
17728 (build_dynamic_cast_1): Likewise.
17729 * typeck.c (composite_pointer_type): Likewise.
17730 (common_type): Likewise.
17731 (build_indirect_ref): Likewise.
17732 (build_binary_op): Likewise.
17733 (build_x_compound_expr): Likewise.
17734 (check_return_expr): Likewise.
17735 * typeck2.c (add_exception_specifier): Likewise.
17736
17737 * mangle.c (write_method_parms): Use direct comparison for end
17738 of parmlist.
17739
17740 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
17741
17742 * cp-tree.h (genrtl_try_block): Declare function.
17743 (genrtl_handler): Likewise.
17744 (genrtl_catch_block): Likewise.
17745 (genrtl_ctor_stmt): Likewise.
17746 (genrtl_subobject): Likewise.
17747 (genrtl_decl_cleanup): Likewise.
17748 (genrtl_do_poplevel): Likewise.
17749 (genrtl_do_pushlevel): Likewise.
17750 (genrtl_clear_out_block): Likewise.
17751 (genrtl_goto_stmt): Likewise.
17752 (genrtl_expr_stmt): Likewise.
17753 (genrtl_decl_stmt): Likewise.
17754 (genrtl_if_stmt): Likewise.
17755 (genrtl_while_stmt): Likewise.
17756 (genrtl_do_stmt): Likewise.
17757 (genrtl_return_stmt): Likewise.
17758 (genrtl_for_stmt): Likewise.
17759 (genrtl_break_stmt): Likewise.
17760 (genrtl_continue_stmt): Likewise.
17761 (genrtl_scope_stmt): Likewise.
17762 (genrtl_switch_stmt): Likewise.
17763 (genrtl_case_label): Likewise.
17764 (genrtl_begin_compound_stmt): Likewise.
17765 (genrtl_finish_compound_stmt): Likewise.
17766 (genrtl_compound_stmt): Likewise.
17767 (genrtl_asm_stmt): Likewise.
17768 (genrtl_named_return_value): Likewise.
17769 (genrtl_begin_stmt_expr): Likewise.
17770 (genrtl_finish_stmt_expr): Likewise.
17771 (finish_for_stmt): Removed first argument.
17772 (finish_switch_stmt): Likewise.
17773
17774 * semantics.c (genrtl_try_block): Define function.
17775 (genrtl_handler): Likewise.
17776 (genrtl_catch_block): Likewise.
17777 (genrtl_ctor_stmt): Likewise.
17778 (genrtl_subobject): Likewise.
17779 (genrtl_decl_cleanup): Likewise.
17780 (genrtl_do_poplevel): Likewise.
17781 (genrtl_do_pushlevel): Likewise.
17782 (genrtl_clear_out_block): Likewise.
17783 (genrtl_goto_stmt): Likewise.
17784 (genrtl_expr_stmt): Likewise.
17785 (genrtl_decl_stmt): Likewise.
17786 (genrtl_if_stmt): Likewise.
17787 (genrtl_while_stmt): Likewise.
17788 (genrtl_do_stmt): Likewise.
17789 (genrtl_return_stmt): Likewise.
17790 (genrtl_for_stmt): Likewise.
17791 (genrtl_break_stmt): Likewise.
17792 (genrtl_continue_stmt): Likewise.
17793 (genrtl_scope_stmt): Likewise.
17794 (genrtl_switch_stmt): Likewise.
17795 (genrtl_case_label): Likewise.
17796 (genrtl_begin_compound_stmt): Likewise.
17797 (genrtl_finish_compound_stmt): Likewise.
17798 (genrtl_compound_stmt): Likewise.
17799 (genrtl_asm_stmt): Likewise.
17800 (genrtl_named_return_value): Likewise.
17801 (genrtl_begin_stmt_expr): Likewise.
17802 (genrtl_finish_stmt_expr): Likewise.
17803 (finish_for_stmt): Removed first argument and generate rtl
17804 specific code.
17805 (finish_switch_stmt): Likewise.
17806 (do_poplevel): Removed generate rtl specific code.
17807 (do_pushlevel): Likewise.
17808 (add_tree): Likewise.
17809 (finish_goto_stmt): Likewise.
17810 (finish_expr_stmt): Likewise.
17811 (begin_if_stmt): Likewise.
17812 (finish_if_stmt_cond): Likewise.
17813 (finish_then_clause): Likewise.
17814 (begin_else_clause): Likewise.
17815 (finish_else_clause): Likewise.
17816 (finish_if_stmt): Likewise.
17817 (clear_out_block): Likewise.
17818 (begin_while_stmt): Likewise.
17819 (finish_while_stmt_cond): Likewise.
17820 (finish_while_stmt): Likewise.
17821 (begin_do_stmt): Likewise.
17822 (finish_do_body): Likewise.
17823 (finish_do_stmt): Likewise.
17824 (finish_return_stmt): Likewise.
17825 (begin_for_stmt): Likewise.
17826 (finish_for_init_stmt): Likewise.
17827 (finish_for_cond): Likewise.
17828 (finish_for_expr): Likewise.
17829 (finish_break_stmt): Likewise.
17830 (finish_continue_stmt): Likewise.
17831 (begin_switch_stmt): Likewise.
17832 (finish_switch_cond): Likewise.
17833 (finish_case_label): Likewise.
17834 (begin_try_block): Likewise.
17835 (begin_function_try_block): Likewise.
17836 (finish_try_block): Likewise.
17837 (finish_cleanup_try_block): Likewise.
17838 (finish_cleanup): Likewise.
17839 (finish_function_try_block): Likewise.
17840 (finish_handler_sequence): Likewise.
17841 (finish_function_handler_sequence): Likewise.
17842 (begin_handler): Likewise.
17843 (finish_handler_parms): Likewise.
17844 (begin_catch_block): Likewise.
17845 (finish_handler): Likewise.
17846 (begin_compound_stmt): Likewise.
17847 (finish_compound_stmt): Likewise.
17848 (finish_asm_stmt): Likewise.
17849 (finish_label_stmt): Likewise.
17850 (finish_label_decl): Likewise.
17851 (finish_subobject): Likewise.
17852 (finish_decl_cleanup): Likewise.
17853 (finish_named_return_value): Likewise.
17854 (begin_stmt_expr): Likewise.
17855 (finish_stmt_expr): Likewise.
17856
17857 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17858 to call genrtl_expr_stmt when appropriate.
17859
17860 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17861 begin_compound_expr to call genrtl_begin_stmt_expr and
17862 genrtl_begin_compound_expr when appropriate.
17863 (finish_init_stmts): Changed calls to finish_compound_expr and
17864 finish_stmt_expr to call genrtl_finish_compound_expr and
17865 genrtl_finish_stmt_expr when appropriate.
17866 (expand_default_init): Changed call to finish_expr_stmt to call
17867 genrtl_expr_stmt when appropriate.
17868 (build_vec_init): Likewise.
17869
17870 * parse.y (simple_stmt): Removed first argument from call to
17871 finish_for_stmt. Removed first argument from call to
17872 finish_switch_stmt.
17873
17874 * parse.c: Regenerated.
17875
17876 * pt.c (tsubst_expr): Removed first argument from call to
17877 finish_for_stmt. Removed first argument from call to
17878 finish_switch_stmt.
17879
17880 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
17881
17882 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17883 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17884
17885 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17886 (cplus_tree_code_length[]): Likewise.
17887 (cplus_tree_code_name[]): Likewise.
17888 (init_parse): Added call to add_c_tree_codes. Changed
17889 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17890
17891 2000-06-16 Mark Mitchell <mark@codesourcery.com>
17892
17893 * cp-tree.h (finish_mem_initializers): Declare.
17894 (count_trees): Likewise.
17895 * parse.y (base_init): Use finish_mem_initializers.
17896 * semantics.c (finish_mem_initializers): New function.
17897
17898 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
17899 the number of trees.
17900 (n_trees): Remove.
17901 (count_trees): Don't use it.
17902
17903 2000-06-15 Jason Merrill <jason@redhat.com>
17904
17905 * tree.c (count_trees): New debugging function.
17906
17907 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17908 * init.c (build_member_call): Pull out the name of a DECL.
17909
17910 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17911 * semantics.c (expand_body): Push to TV_INTEGRATION here.
17912 * optimize.c (optimize_function): Not here.
17913 * pt.c (instantiate_decl): Push to TV_PARSE.
17914
17915 2000-06-15 Mark Mitchell <mark@codesourcery.com>
17916
17917 * cp-tree.h (struct language_function): Remove x_base_init_list
17918 and x_member_init_list.
17919 (current_base_init_list): Remove.
17920 (current_member_init_list): Likewise.
17921 (setup_vtbl_ptr): Change prototype.
17922 (emit_base_init): Likewise.
17923 (expand_member_init): Likewise.
17924 (reinit_parse_for_function): Remove.
17925 * decl.c (save_function_data): Don't clear x_base_init_list and
17926 x_member_init_list.
17927 (mark_language_function): Don't mark them.
17928 * init.c (perform_member_init): Tweak comment.
17929 (sort_member_init): Take the list of initializers as an argument.
17930 (sort_base_init): Likewise.
17931 (emit_base_init): Likewise.
17932 (expand_member_init): Return the initializer. Don't use global
17933 variables.
17934 * lex.c (reinit_parse_for_function): Remove.
17935 * method.c (build_template_parm_names): Correct substitution.
17936 (do_build_copy_constructor): Don't use current_member_init_list
17937 and current_base_init_list.
17938 (synthesize_method): Likewise.
17939 * parse.y (base_init): Split mem-initializers into
17940 base-initializers and field-initializers.
17941 (member_init_list): Build up the list here.
17942 (member_init): Return the initializer.
17943 (fn.depfn): Don't use reinit_parse_for_function.
17944 * parse.c: Regenerated.
17945 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17946 ERROR_MARK.
17947 (tsubst_expr): Don't use current_member_init_list
17948 and current_base_init_list.
17949 (tsubst_expr_values): Rename to ...
17950 (tsubst_initializer_list): ... this. Use convert_from_reference.
17951 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17952 and current_base_init_list.
17953 (begin_function_definition): Don't call reinit_parse_for_function.
17954
17955 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17956
17957 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17958 correctly.
17959
17960 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17961
17962 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
17963
17964 * cp-tree.h (IF_COND): Move to c-common.h.
17965 (THEN_CLAUSE): Likewise.
17966 (ELSE_CLAUSE): Likewise.
17967 (WHILE_COND): Likewise.
17968 (WHILE_BODY): Likewise.
17969 (DO_COND): Likewise.
17970 (DO_BODY): Likewise.
17971 (RETURN_EXPR): Likewise.
17972 (EXPR_STMT_EXPR): Likewise.
17973 (FOR_INIT_STMT): Likewise.
17974 (FOR_COND): Likewise.
17975 (FOR_EXPR): Likewise.
17976 (FOR_BODY): Likewise.
17977 (SWITCH_COND): Likewise.
17978 (SWITCH_BODY): Likewise.
17979 (CASE_LOW): Likewise.
17980 (CASE_HIGH): Likewise.
17981 (GOTO_DESTINATION): Likewise.
17982 (COMPOUND_BODY): Likewise.
17983 (ASM_CV_QUAL): Likewise.
17984 (ASM_STRING): Likewise.
17985 (ASM_OUTPUTS): Likewise.
17986 (ASM_INPUTS): Likewise.
17987 (ASM_CLOBBERS): Likewise.
17988 (DECL_STMT_DECL): Likewise.
17989 (STMT_EXPR_STMT): Likewise.
17990 (LABEL_STMT_LABEL): Likewise.
17991 (SCOPE_BEGIN_P): Likewise.
17992 (SCOPE_END_P): Likewise.
17993 (SCOPE_STMT_BLOCK): Likewise.
17994 (SCOPE_NULLIFIED_P): Likewise.
17995 (SCOPE_NO_CLEANUPS_P): Likewise.
17996 (SCOPE_PARTIAL_P): Likewise.
17997 (ASM_VOLATILE_P): Likewise.
17998 (STMT_LINENO): Likewise.
17999 (STMT_LINENO_FOR_FN_P): Likewise.
18000
18001 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
18002 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
18003 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
18004 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
18005 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
18006
18007 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
18008
18009 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
18010 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
18011
18012 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
18013 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
18014 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
18015
18016 2000-06-14 Mark Mitchell <mark@codesourcery.com>
18017
18018 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
18019 * class.c (dfs_find_final_overrider): Set it appropriately.
18020 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
18021 avoid unneeded secondary vptrs.
18022
18023 2000-06-13 Jakub Jelinek <jakub@redhat.com>
18024
18025 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
18026 (check_bitfield_decl, check_field_decl): Likewise.
18027 (build_vtbl_or_vbase_field, build_base_field): Likewise.
18028 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
18029 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
18030 (xfer_tag, finish_enum): Likewise.
18031 * decl2.c (finish_builtin_type): Likewise.
18032 * init.c (init_init_processing): Likewise.
18033 * pt.c (instantiate_class_template): Likewise.
18034 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
18035 * cp-tree.h (struct lang_type): Add user_align member.
18036 (CLASSTYPE_USER_ALIGN): Define.
18037
18038 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
18039
18040 * Make-lang.in (c++.install-common): Install g++-cross in
18041 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
18042 $(target_alias)-g++ and $(target_alias)-c++.
18043
18044 2000-06-12 Mark Mitchell <mark@codesourcery.com>
18045
18046 * class.c (vcall_offset_data_s): Add last_init and fns.
18047 (overrides): Rename to same_signature_p.
18048 (dfs_find_final_overrider): Adjust accordingly.
18049 (mark_overriders): Likewise.
18050 (warn_hidden): Likewise.
18051 (build_vtbl_initializer): Reorganize machinery for building things
18052 at negative offsets.
18053 (build_vcall_and_vbase_vtbl_entries): Likewise.
18054 (build_vbase_offset_vtbl_entries): Likewise.
18055 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
18056 offset entries. Do not create two entries for functions with the
18057 same signature.
18058 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
18059 (build_rtti_vtbl_entries): Reorganize machinery for building things
18060 at negative offsets.
18061
18062 * optimize.c (expand_call_inline): Don't recurse into the code
18063 used to initialize the parameters more than once.
18064
18065 2000-06-11 Mark Mitchell <mark@codesourcery.com>
18066
18067 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
18068 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
18069 (find_substitution): Only use the `Sa' substitution for
18070 std::allocator, not instantiations of it.
18071 (write_template_prefix): Move comment. Only use a TREE_LIST to
18072 represent substitutions for a member template.
18073 (write_array_type): Mangle array dimensions correctly.
18074 * optimize.c (maybe_clone_body): Copy more information from the
18075 cloned function.
18076 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
18077 on the regenerated declaration.
18078
18079 2000-06-11 Chip Salzenberg <chip@valinux.com>
18080 Mark Mitchell <mark@codesourcery.com>
18081
18082 * class.c (build_vtable): Clarify comment.
18083 (build_ctor_vtbl_group): Pass the most derived type to
18084 build_vtable.
18085
18086 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18087
18088 * decl2.c (compare_options): Don't needlessly cast away const-ness.
18089
18090 2000-06-10 Mark Mitchell <mark@codesourcery.com>
18091
18092 * decl.c (add_binding): Handle duplicate declarations of external
18093 variables.
18094
18095 2000-06-09 Chip Salzenberg <chip@valinux.com>
18096 Mark Mitchell <mark@codesourcery.com>
18097
18098 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
18099 argument.
18100 (write_signed_number): New macro.
18101 (write_unsigned_number): Likewise.
18102 (write_source_name): Use them.
18103 (write_number): Handle signed and unsigned values.
18104 (write_integer_cst): Use tree_int_cst_sgn, and use
18105 write_unsigned_number or write_signed_number as appropriate.
18106 (write_discriminator): Use write_unsigned_number or
18107 write_signed_number as appropriate.
18108 (write_template_arg_literal): Likewise.
18109 (write_array_type): Use tree_low_cst.
18110 (write_template_parm): Use write_unsigned_number or
18111 write_signed_number as appropriate.
18112 (write_substitution): Adjust call to write_number.
18113 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
18114 (write_expression): Handle non-type template arguments of
18115 reference type correctly.
18116 (mangle_thunk): Use write_signed_number.
18117
18118 2000-06-09 Chip Salzenberg <chip@valinux.com>
18119
18120 * mangle.c (find_substition): Don't mangle objects with typename
18121 substitutions (e.g. "cin" as "Si").
18122
18123 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
18124
18125 * call.c (add_candidate): Use ggc_alloc_cleared.
18126 * decl.c (lookup_label): Likewise.
18127 * lex.c (retrofit_lang_decl): Likewise.
18128
18129 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
18130
18131 * semantics.c (expand_body): Push to TV_EXPAND.
18132 * optimize.c (optimize_function): Push to TV_INTEGRATION.
18133 * decl.c (start_function): Always call announce_function.
18134
18135 * tinfo2.cc: Just declare abort.
18136
18137 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
18138
18139 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
18140 whenever @ is a symbolic name.
18141
18142 2000-06-08 Jakub Jelinek <jakub@redhat.com>
18143
18144 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
18145
18146 2000-06-07 Mark Mitchell <mark@codesourcery.com>
18147
18148 * decl.c (pushdecl): Look up functions by DECL_NAME, not
18149 DECL_ASSEMBLER_NAME.
18150
18151 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18152
18153 * decl2.c (c_language): Define.
18154
18155 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
18156
18157 * lex.c (lang_init_options): Tweak.
18158
18159 * decl2.c: Remove #inclusion of diagnostic.h
18160 (lang_decode_option): Move diagnostic formatting options to
18161 toplevel.
18162
18163 * lang-options.h: Remove documentation for diagnostic options.
18164
18165 * Makefile.in (lex.o): Depends upon diagnostic.h
18166
18167 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18168
18169 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18170 the same DECL_RESULT, it's not a redefinition.
18171 * pt.c (tsubst_decl): Remove code to handle illegal
18172 specializations.
18173
18174 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
18175
18176 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18177
18178 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
18179
18180 * search.c (maybe_suppress_debug_info): Don't check
18181 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18182
18183 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18184 here if extern_p.
18185
18186 Remember instantiation context in deferred instantiations.
18187 * cp-tree.h (struct tinst_level): Remove.
18188 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18189 * pt.c (current_tinst_level): Now a tree.
18190 (print_template_context, push_tinst_level, pop_tinst_level,
18191 tinst_for_decl): Adjust.
18192 (reopen_tinst_level): New fn.
18193 (init_pt): Register current_tinst_level as a root.
18194 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18195 of the pending templates list.
18196 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
18197 * lex.c (extract_interface_info): Adjust.
18198 * decl2.c (warn_if_unknown_interface): Adjust.
18199
18200 2000-06-05 Mark Mitchell <mark@codesourcery.com>
18201
18202 * class.c (indirect_primary_base_p): New function.
18203 (determine_primary_base): Use it.
18204
18205 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
18206
18207 Update new-abi dynamic cast algorithm.
18208 * tinfo.cc (__class_type_info::__dyncast_result): Add
18209 whole_details. Adjust constructor.
18210 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18211 Avoid unnecessary searching.
18212 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18213
18214 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18215
18216 * decl.c (init_decl_processing): Don't call record_component_aliases.
18217 * tree.c (build_cplus_array_type_1): Likewise.
18218
18219 2000-06-04 Mark Mitchell <mark@codesourcery.com>
18220
18221 * ir.texi: Correct typo.
18222 * mangle.c (write_expression): Handle non-type template arguments
18223 with reference type.
18224 * method.c (build_overload_value): Likewise.
18225 * pt.c (convert_nontype_argument): Explicitly represent conversion
18226 to a reference with an ADDR_EXPR.
18227 (unify): Always unify arguments in left-to-right order.
18228
18229 2000-06-03 Alex Samuel <samuel@codesourcery.com>
18230 Mark Mitchell <mark@codesourcery.com>
18231
18232 * Make-lang.in (CXX_SRCS): Add mangle.c.
18233 * Makefile.in (CXX_OBJS): Add mangle.o.
18234 (mangle.o): New rule.
18235
18236 * class.c (local_classes): New variable.
18237 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18238 (get_vtt_name): Use mangle_vtt_name for new ABI.
18239 (init_class_processing): Initialize local_classes.
18240 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18241 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18242 (std_identifier): New macro.
18243 (DECL_VOLATILE_MEMFUNC_P): New macro.
18244 (DECL_NAMESPACE_STD_P): Likewise.
18245 (local_classes): Declare.
18246 (get_mostly_instantiated_function_type): Declare.
18247 (init_mangle): Declare.
18248 (mangle_decl): Likewise.
18249 (mangle_type_string): Likewise.
18250 (mangle_type): Likewise.
18251 (mangle_typeinfo_for_type): Likewise.
18252 (mangle_typeinfo_string_for_type): Likewise.
18253 (mangle_vtbl_for_type): Likewise.
18254 (mangle_vtt_for_type): Likewise.
18255 (mangle_ctor_vtbl_for_type): Likewise.
18256 (mangle_thunk): Likewise.
18257 (mangle_conv_op_name_for_type): Likewise.
18258 (mangle_guard_variable): Likewise.
18259 * decl.c (pushtag): Keep track of local classes.
18260 (initialize_predefined_identifiers): Initialize std_identifier.
18261 (init_decl_processing): Use std_identifier.
18262 (start_decl): Don't treat instantiations as specializations.
18263 (grokdeclarator): Likewise.
18264 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
18265 name for fully-instantiated templates.
18266 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18267 destructors with the new ABI.
18268 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18269 (grokfield): Use mangle_type for new ABI.
18270 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18271 (get_sentry): Use mangle_guard_variable for new ABI.
18272 (start_static_initialization_or_destruction): Likewise.
18273 * expr.c (extract_aggr_init): Remove.
18274 (extract_scalar_init): Likewise.
18275 (extract_init): Remove #if 0'd code.
18276 * mangle.c: New function.
18277 * method.c (build_mangled_name): Assert not flag_new_abi.
18278 (build_static_name): Likewise.
18279 (build_decl_overload_real): Likewise.
18280 (build_typename_overload): Likewise.
18281 (build_overload_with_type): Likewise.
18282 (build_overload_name): Likewise.
18283 (get_ctor_vtbl_name): Likewise.
18284 (start_squangling): Likewise.
18285 (get_id_2): Likewise.
18286 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18287 (init_method): Call init_mangle for new ABI.
18288 (make_thunk): Call mangle_thunk for new ABI.
18289 * operators.def: Correct new ABI manglings for the `%' operator.
18290 Add `::' operator.
18291 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18292 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18293 (lookup_template_class): Call mangle_decl for new ABI.
18294 (get_mostly_instantiated_function_type): New function.
18295 (set_mangled_name_for_template_decl): Use it.
18296 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18297 the new ABI. Use mangle_conv_op_name_for_type for instantiated
18298 conversion op names.
18299 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18300 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18301 (tinfo_base_init): Likewise. Mangle typeinfo string name with
18302 mangle_typeinfo_string_for_type.
18303
18304 2000-06-03 Mark Mitchell <mark@codesourcery.com>
18305
18306 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18307 (INNERMOST_TEMPLATE_ARGS): New macro.
18308 (innermost_args): Remove.
18309 (get_innermost_template_args): New function.
18310 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18311 * error.c (dump_function_decl): Be caution when using
18312 most_general_template.
18313 * method.c (build_template_parm_names): Use
18314 INNERMOST_TEMPLATE_ARGS.
18315 * pt.c (add_to_template_args): Tidy comment
18316 (get_innermost_template_args): New function.
18317 (check_explicit_specialization): Clear DECL_INITIAL for a new
18318 specialization.
18319 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18320 Tidy.
18321 (push_template_decl): Always register specializations of the most
18322 general template.
18323 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18324 (coerce_template_parms): Likewise.
18325 (lookup_template_class): Likewise.
18326 (innermost_args): Remove.
18327 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18328 (tsubst_decl): Handle tricky specializations. Use
18329 get_innermost_template_args.
18330 (instantiate_template): Simplify handling of partial
18331 instantiations.
18332 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18333 (most_general_template): Reimplement, in a more straightforward
18334 manner.
18335 (regenerate_decl_from_template): Tweak formatting. Use
18336 TMPL_ARGS_DEPTH for clarity.
18337 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18338
18339 * dump.c (dequeue_and_dump): Dump information about thunks.
18340
18341 2000-06-01 Richard Henderson <rth@cygnus.com>
18342
18343 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18344
18345 2000-06-01 Richard Henderson <rth@cygnus.com>
18346
18347 * decl2.c (unsupported_options): Fix typo, make const.
18348 (lang_decode_option): Fix bsearch argument order.
18349
18350 2000-06-01 Mark Mitchell <mark@codesourcery.com>
18351
18352 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18353 on FIELD_DECLs.
18354
18355 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18356
18357 * cp-tree.h (c_get_alias_set): Deleted.
18358 * Makefile.in (decl.o): Include ../expr.h.
18359 * decl.c (expr.h): Include.
18360 (init_decl_processing): Call record_component_aliases for arrays.
18361 (grokdeclarator): Likewise.
18362 Set TREE_ADDRESSABLE for fields that aren't bitfields.
18363 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18364
18365 2000-05-31 Mark Mitchell <mark@codesourcery.com>
18366
18367 Remove guiding declaration support.
18368 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18369 (flag_guiding_decls): Remove.
18370 * call.c (build_user_type_conversion_1): Remove support for
18371 guiding decls.
18372 (build_new_function_call): Likewise.
18373 (build_new_op): Likewise.
18374 (build_new_method_call): Likewise.
18375 * decl.c (start_function): Likewise.
18376 * friend.c (is_friend): Likewise.
18377 (do_friend): Likewise.
18378 * decl2.c ((flag_dump_translation_unit): Make it const.
18379 (flag_guiding_decls): Remove.
18380 (unsupported_options): New variable
18381 (compare_options): New function.
18382 (lang_decode_option): Use them.
18383
18384 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18385
18386 * method.c (mangle_expression): Adjust test for legal expression
18387 operators.
18388
18389 * pt.c (instantiate_decl): Save and restore the local
18390 specializations list.
18391
18392 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
18393
18394 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18395
18396 2000-05-30 Mark Mitchell <mark@codesourcery.com>
18397
18398 * call.c (add_template_candidate_real): Handle member template
18399 constructors for classes with virtual bases.
18400 (build_user_type_conversion_1): Use in_charge_arg_for_name.
18401 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18402
18403 * ir.texi: Update thunk documentation.
18404
18405 * call.c (joust): Fix handling of overloaded builtin operators.
18406
18407 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
18408
18409 * cp-tree.h (DECL_ANTICIPATED): New macro.
18410 Document new use of DECL_LANG_FLAG_7.
18411 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18412 in the user namespace.
18413 * lex.c (do_identifier): If the identifier's declaration has
18414 DECL_ANTICIPATED on, it has not yet been declared. But do not
18415 replace it with an ordinary implicit declaration.
18416
18417 * tinfo2.cc: Include stdlib.h.
18418
18419 2000-05-29 Mark Mitchell <mark@codesourcery.com>
18420
18421 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18422 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18423 CLASSTYPE_ALIGN.
18424
18425 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
18426
18427 * decl2.c (lang_decode_option): Use skip_leading_substring instead
18428 of plain strncmp.
18429
18430 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
18431
18432 * operators.def (<?): Duplicated, should have been...
18433 (>?): this. Fixed.
18434
18435 2000-05-27 Alex Samuel <samuel@codesourcery.com>
18436 Mark Mitchell <mark@codesourcery.com>
18437
18438 * cp-tree.h (ansi_opname): Make it a macro.
18439 (ansi_assopname): Likewise.
18440 (struct lang_decl_flags): Add assignment_operator_p.
18441 (struct lang_decl): Add operator_code.
18442 (DECL_VTT_PARM): Adjust.
18443 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18444 overloaded operator.
18445 (SET_OVERLOADED_OPERATOR_CODE): New macro.
18446 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18447 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18448 (opname_tab): Remove.
18449 (assignop_tab): Likewise.
18450 (operator_name_info_t): New type.
18451 (operator_name_info): New variable.
18452 (assignment_operator_name_info): Likewise.
18453 (build_cp_library_fn): Remove declaration.
18454 (push_cp_library_fn): Likewise.
18455 (operator_name_string): Likewise.
18456 (build_decl_overload): Likewise.
18457 * call.c (print_z_candidates): Simplify.
18458 (build_object_call): Adjust usage of ansi_opname. Use
18459 DECL_OVERLOADED_OPERATOR_P.
18460 (op_error): Adjust operator name lookup.
18461 (build_conditional_expr): Adjust usage of ansi_opname.
18462 (build_new_op): Likewise.
18463 (build_op_delete_call): Likewise.
18464 (build_over_call): Likewise.
18465 (joust): Use DECL_OVERLOADED_OPERATOR_P.
18466 * decl.c (duplicate_decls): Copy operator_code.
18467 (init_decl_processing): Adjust parameters to push_cp_library_fn.
18468 (builtin_function): Adjust parameters to build_library_fn_1.
18469 (build_library_fn_1): Accept an overloaded operator code.
18470 (build_library_fn): Pass ERROR_MARK.
18471 (build_cp_library_fn): Accept an overloaded operator code.
18472 (push_cp_library_fn): Likewise.
18473 (grokfndecl): Tweak.
18474 (grokdeclarator): Simplify code to compute names of overloaded
18475 operators. Adjust use of ansi_opname.
18476 (ambi_op_p): Work on tree_codes, not identifiers.
18477 (unary_op_p): Likewise.
18478 (grok_op_properties): Likewise.
18479 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18480 (lang_mark_tree): Don't try to mark the operator_code.
18481 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18482 * error.c (dump_decl): Remove special handling for operator
18483 names.
18484 (dump_function_name): Likewise.
18485 (dump_expr): Adjust name lookup of operators.
18486 (op_to_string): Simplify.
18487 (assop_to_string): Likewise.
18488 * init.c (build_new_1): Adjust use of ansi_opname.
18489 * lex.c (opname_tab): Remove.
18490 (assignop_tab): Likewise.
18491 (ansi_opname): Likewise.
18492 (ansi_assopname): Likewise.
18493 (operator_name_string): Likewise.
18494 (reinit_lang_specific): Likewise.
18495 (operator_name_info): New variable.
18496 (assignment_operator_name_info): Likewise.
18497 (init_operators): New function.
18498 (init_parse): Use it.
18499 (do_identifier): Adjust use of ansi_opname.
18500 * method.c (mangle_expression): Don't use ansi_opname for
18501 mangling.
18502 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18503 (build_decl_overload): Remove.
18504 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18505 (do_build_assign_ref): Adjust use of ansi_opname.
18506 (synthesize_method): Likewise.
18507 (implicitly_declare_fn): Likewise.
18508 * operators.def: New file.
18509 * parse.y (operator): Adjust use of ansi_opname.
18510 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18511 (set_mangled_name_for_template_decl): Don't play games with
18512 current_namespace.
18513 (special_function_p): Adjust use of ansi_opname.
18514 * typeck.c (check_return_expr): Likewise.
18515 * Make-lang.in (cc1plus): Depend on operators.def.
18516 * Makefile.in (lex.o): Likewise.
18517 (decl.o): Likewise.
18518
18519 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
18520
18521 * Make-lang.in (cplib2.ready): Eradicate.
18522
18523 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18524
18525 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18526 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18527 (built_min, cp_tree_equal): Likewise.
18528
18529 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18530
18531 * class.c (layout_nonempty_base_or_field): Replace
18532 `record_layout_info' with `record_layout_info_s'.
18533
18534 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
18535
18536 Fix goto checking.
18537 * cp-tree.h (struct language_function): x_named_labels is now
18538 a struct named_label_list*.
18539 * decl.c (struct named_label_use_list): Renamed from...
18540 (struct named_label_list): ...this. New struct.
18541 (push_binding_level): Don't set eh_region.
18542 (note_level_for_eh): New fn.
18543 (pop_label): Take label and old value directly.
18544 (pop_labels): Adjust for new named_labels format.
18545 (lookup_label): Likewise.
18546 (poplevel): Note characteristics of a binding level containing a
18547 named label. Mess with named label lists earlier.
18548 (mark_named_label_lists): New fn.
18549 (mark_lang_function): Call it.
18550 (use_label): New fn, split out from...
18551 (make_label_decl): ...here. Don't call it.
18552 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18553 check_previous_gotos): New fns, split out from...
18554 (define_label): ...here.
18555 (check_switch_goto): New fn.
18556 (define_case_label): Call it.
18557 (check_goto): New fn.
18558 * semantics.c (finish_goto_stmt): Call it and use_label.
18559 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18560 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18561
18562 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18563
18564 * class.c (build_vtable_entry_ref): Correct usage of
18565 get_vtbl_decl_for_binfo.
18566
18567 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18568 * method.c (implicitly_declare_fn): Not here.
18569
18570 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
18571
18572 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18573 (CPTI_PTMD_DESC_TYPE): ... here.
18574 (ptmd_desc_type_node): Rename to ...
18575 (ptm_desc_type_node): ... here.
18576 * decl.c: Likewise.
18577 * rtti.c (ptmd_initializer): Rename to ...
18578 (ptm_initializer): ... here.
18579 (sythesize_tinfo_var): Adjust. Deal with pointer to member
18580 function.
18581 (create_tinfo_types): Adjust.
18582
18583 2000-05-25 Mark Mitchell <mark@codesourcery.com>
18584
18585 Finish implementation of VTTs.
18586 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18587 CPTI_VTT_PARM_IDENTIFIER.
18588 (vtt_parm_identifier): New macro.
18589 (vtt_parm_type): Likewise.
18590 (BINFO_SUBVTT_INDEX): Likewise.
18591 (BINFO_VPTR_INDEX): Likewise.
18592 (struct lang_decl): Add vtt_parm.
18593 (DECL_VTT_PARM): New macro.
18594 (DECL_USE_VTT_PARM): Likewise.
18595 (DECL_NEEDS_VTT_PARM_P): Likewise.
18596 (get_vtt_name): Declare.
18597 (build_artificial_parm): Likewise.
18598 (fixup_all_virtual_upcast_offsets): Likewise.
18599 (expand_indirect_vtbls_init): Remove.
18600 * call.c (build_new_method_call): Pass the vtt to subobject
18601 constructors and destructors.
18602 * class.c (get_vtt_name): Give it external linkage.
18603 (build_clone): Handle the magic VTT parameters for clones.
18604 (clone_function_decl): Fix typo in comment.
18605 (build_vtt): Keep track of the indices in the VTTs where various
18606 entities are stored.
18607 (build_vtt_inits): Likewise.
18608 (dfs_build_vtt_inits): Likewise.
18609 (build_ctor_vtbl_group): Tweak type of construction vtables.
18610 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18611 primary bases, when building construction vtables.
18612 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18613 (initialize_predefined_identifiers): Add vtt_parm_identifier.
18614 (init_decl_processing): Initialize vtt_parm_type.
18615 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18616 (lang_mark_tree): Make vtt_parm.
18617 * decl2.c (build_artificial_parm): New function.
18618 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
18619 (grokclassfn): Use build_artificial_parm.
18620 * init.c (initialize_vtbl_ptrs): Call
18621 fixup_all_virtual_upcast_offsets directly.
18622 (perform_member_init): Use the complete subobject destructor for
18623 member cleanups.
18624 (build_vtbl_address): New function.
18625 (expand_virtual_init): Handle VTTs.
18626 * optimize (maybe_clone_body): Likewise.
18627 * search.c (fixup_all_virtual_upcast_offsets): Give it external
18628 linkage.
18629 (expand_indirect_vtbls_init): Remove.
18630 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18631 * tree.c (make_binfo): Make them bigger.
18632
18633 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18634
18635 * inc/cxxabi.h (__pbase_type_info): Define, based on
18636 __pointer_type_info.
18637 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18638 (__pointer_to_member_type_info): Likewise.
18639 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18640 (__pointer_to_member_type_info::__is_pointer_p): Remove.
18641 (__pointer_type_info::__do_catch): Rename to ...
18642 (__pbase_type_info::__do_catch): ... here. Adjust.
18643 (__pbase_type_info::__pointer_catch): Implement.
18644 (__pointer_type_info::__pointer_catch): Adjust.
18645 (__pointer_to_member_type_info::__pointer_catch): Adjust.
18646
18647 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18648
18649 * tinfo.h (__user_type_info::contained_virtual_p): New
18650 predicate.
18651 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18652 shaped hierarchy.
18653 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18654 diamond shaped hierarchy. Add early out for mixed diamond and
18655 duplicate shaped hierarchy.
18656
18657 2000-05-24 Mark Mitchell <mark@codesourcery.com>
18658
18659 * cp-tree.h (build_delete): Change prototype.
18660 (build_vec_delete): Likewise.
18661 * call.c (build_scoped_method_call): Use special_function_kind
18662 values to indicate the kind of destruction to be done.
18663 (build_method_call): Likewise.
18664 * decl.c (finish_destructor_body): Likewise.
18665 (maybe_build_cleanup_1): Likewise. Rename to ...
18666 (maybe_build_cleanup): ... this.
18667 * decl2.c (delete_sanity): Use special_function_kind
18668 values to indicate the kind of destruction to be done.
18669 (build_cleanup): Likewise.
18670 * init.c (perform_member_init): Likewise.
18671 (build_vec_delete_1): Likewise.
18672 (build_dtor_call): Simplify.
18673 (build_delete): Use special_function_kind
18674 values to indicate the kind of destruction to be done.
18675 (build_vbase_delete): Likewise.
18676 (build_vec_delete): Likewise.
18677
18678 * init.c (sort_member_init): Fix typo in error message generation
18679 code.
18680
18681 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
18682
18683 * semantics.c (begin_class_definition): make the packed
18684 attribute be sensitive to the "-fpack-struct" command line flag
18685
18686 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
18687
18688 Update new-abi upcast algorithm.
18689 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18690 prototype and meaning of return value.
18691 (__si_class_type_info::__do_upcast): Likewise.
18692 (__vmi_class_type_info::__do_upcast): Likewise.
18693 * tinfo.cc (__class_type_info::__upcast_result): Replace
18694 whole2dst with part2dst. Adjust ctor.
18695 (__class_type_info::__do_upcast): Adjust call of worker function.
18696 (__class_type_info::__do_upcast): Adjust.
18697 (__si_class_type_info::__do_upcast): Adjust. Use parent's
18698 __do_upcast.
18699 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18700 virtual base in diamond hierarchy bug.
18701
18702 2000-05-23 Mark Mitchell <mark@codesourcery.com>
18703
18704 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18705 and bitfield to tinfo_fn_p.
18706 (DECL_TINFO_FN_P): Adjust.
18707 (SET_DECL_TINFO_FN_P): Likewise.
18708 (DECL_MUTABLE_P): Likewise.
18709 (DECL_C_BIT_FIELD): Likewise.
18710 (SET_DECL_C_BIT_FIELD): Likewise.
18711 (CLEAR_DECL_C_BIT_FIELD): Likewise.
18712 (DECL_UNINLINABLE): Likewise.
18713 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18714 (handle_using_decl): Remove assertion.
18715 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18716 to build FIELD_DECLs.
18717 (build_base_field): Likewise.
18718 (layout_class_type): Likewise.
18719 * decl.c (init_decl_processing): Likewise.
18720 (build_ptrmemfunc_type): Likewise.
18721 (grokdeclarator): Likewise.
18722 * decl2.c (grok_x_components): Likewise.
18723 * except.c (call_eh_info): Likewise.
18724 * init.c (init_init_processing): Likewise.
18725 * rtti.c (expand_class_desc): Likewise.
18726 (create_pseudo_type_info): Likewise.
18727 (get_vmi_pseudo_type_info): Likewise.
18728 (create_tinfo_types): Likewise.
18729 * ptree.c (print_lang_decl): Adjust.
18730 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18731 before checking DECL_MUTABLE_P.
18732
18733 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18734 parameters for template functions.
18735 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18736 destructors as well as constructors.
18737
18738 2000-05-22 Mark Mitchell <mark@codesourcery.com>
18739
18740 * class.c (build_ctor_vtbl_group): Set inits.
18741 * optimize.c (maybe_clone_body): Set DECL_INLINE and
18742 DECL_THIS_INLINE appropriately for clones.
18743
18744 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18745 (DECL_CONV_FN_P): Simplify.
18746 (DECL_OPERATOR): Remove.
18747 (language_to_string): Declare.
18748 * decl.c (duplicate_decls): Fix typo in comment.
18749 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18750 (grok_op_properties): Use DECL_CONV_FN_P instead of
18751 IDENTIFIER_TYPENAME_P.
18752 * dump.c (dequeue_and_dump): Dump the language linkage of
18753 declarations.
18754 * error.c (language_to_string): Give it external linkage.
18755 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18756 (implicitly_declare_fn): Set DECL_LANGUAGE.
18757 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18758 IDENTIFIER_TYPENAME_P.
18759 (tsubst_decl): Likewise.
18760 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18761 * semantics.c (finish_member_declaration): Don't mark members of
18762 classes declared in an extern "C" region as extern "C".
18763
18764 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18765
18766 * decl2.c (qualified_lookup_using_namespace): Look through
18767 namespace aliases.
18768
18769 * decl.c (push_using_decl): Return the old decl on namespace level.
18770
18771 2000-05-21 Mark Mitchell <mark@codesourcery.com>
18772
18773 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18774 (VTT_NAME_PREFIX): New macro.
18775 (CTOR_VTBL_NAME_PREFIX): Likewise.
18776 (get_ctor_vtbl_name): New function.
18777 * class.c (get_vtable_name): Simplify.
18778 (get_vtt_name): New function.
18779 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18780 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18781 when a virtual base becomes primary.
18782 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
18783 VTTs.
18784 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18785 additional parameters.
18786 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18787 (initialize_array): New function.
18788 (build_vtt): Likewise.
18789 (build_vtt_inits): Likewise.
18790 (dfs_build_vtt_inits): Likewise.
18791 (dfs_fixup_binfo_vtbls): Likewise.
18792 (build_ctor_vtbl_group): Likewise.
18793 (initialize_vtable): Use initialize_array.
18794 (accumulate_vtbl_inits): Reimplement to handle construction
18795 vtables.
18796 (dfs_accumulate_vtbl_inits): Likewise.
18797 (bulid_vtbl_initializer): Adjust parameter name.
18798 * method.c (build_typename_overload): Remove #if 0'd code.
18799 (get_ctor_vtbl_name): New function.
18800 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18801 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18802
18803 * cp-tree.h (struct lang_type): Remove search_slot.
18804 (CLASSTYPE_SEARCH_SLOT): Remove.
18805 (emit_base_init): Change prototype.
18806 (initialize_vtbl_ptrs): Likewise.
18807 (expand_indirect_vtbls_init): Likewise.
18808 (clear_search_slots): Remove.
18809 * decl.c (lang_mark_tree): Don't mark search_slot.
18810 * init.c (initialize_vtbl_ptrs): Simplify.
18811 (emit_base_init): Likewise.
18812 * search.c (struct vbase_info): Document decl_ptr.
18813 (convert_pointer_to_single_level): Remove.
18814 (dfs_find_vbases): Remove.
18815 (dfs_init_base_pointers): Simplify.
18816 (dfs_clear_vbase_slots): Remove.
18817 (dfs_vtable_path_unmark): New function.
18818 (init_vbase_pointers): Simplify.
18819 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18820 (expand_indirect_vtbls_init): Simplify. Don't call
18821 mark_all_temps_used.
18822 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18823 initialize_vtbl_ptrs.
18824
18825 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
18826
18827 * except.c: Add static prototypes.
18828
18829 2000-05-20 H.J. Lu <hjl@gnu.org>
18830
18831 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18832
18833 2000-05-19 Mark Mitchell <mark@codesourcery.com>
18834
18835 Don't create a separate copy of virtual bases for the
18836 CLASSTYPE_VBASECLASSES list.
18837 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18838 (BINFO_FOR_VBASE): Remove.
18839 (CANONICAL_BINFO): Adjust.
18840 (binfo_for_vbase): New function.
18841 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18842 instead of BINFO_FOR_VBASE.
18843 (build_vbase_pointer): Likewise.
18844 (build_secondary_vtable): Likewise.
18845 (dfs_mark_primary_bases): Likewise.
18846 (mark_primary_bases): Likewise.
18847 (layout_nonempty_base_or_field): Likewise.
18848 (dfs_set_offset_for_shared_vbases): Likewise.
18849 (dfs_set_offset_for_unshared_vbases): Likewise.
18850 (layout_virtual_bases): Likewise. Adjust for changes to the
18851 CLASSTYPE_VBASECLASSES list.
18852 (dump_class_hierarchy_r): Use binfo_for_vbase
18853 instead of BINFO_FOR_VBASE.
18854 (dump_class_hierarchy): Likewise.
18855 (finish_vtbls): Likewise.
18856 (build_vtbl_initializer): Adjust for changes to the
18857 CLASSTYPE_VBASECLASSES list.
18858 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18859 * decl.c (finish_destructor_body): Adjust for changes to the
18860 CLASSTYPE_VBASECLASSES list.
18861 * init.c (sort_base_init): Use binfo_for_vbase.
18862 (construct_virtual_bases): Adjust for changes to the
18863 CLASSTYPE_VBASECLASSES list.
18864 (expand_member_init): Use binfo_for_vbase.
18865 (build_vbase_delete): Adjust for changes to the
18866 CLASSTYPE_VBASECLASSES list.
18867 * method.c (do_build_copy_constructor): Likewise.
18868 * rtti.c (get_base_offset): Use binfo_for_vbase.
18869 (expand_class_desc): Remove #if 0'd code.
18870 * search.c (struct vbase_info): Remove vbase_types.
18871 (get_base_distance): Use binfo_for_vbase.
18872 (lookup_field_queue_p): Use CANONICAL_BINFO.
18873 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18874 (get_pure_virtuals): Adjust for changes to the
18875 CLASSTYPE_VBASECLASSES list.
18876 (dfs_find_vbases): Use binfo_for_vbase.
18877 (dfs_init_vbase_pointers): Likewise.
18878 (init_vbase_pointers): Don't initialize vi.vbase_types.
18879 (virtual_context): Use binfo_for_vbase.
18880 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18881 CLASSTYPE_VBASECLASSES list.
18882 (expand_indirect_vtbls_init): Simplify.
18883 (dfs_get_vbase_types): Don't replicate virtual bases.
18884 (find_vbase_instance): Use binfo_for_vbase.
18885 (binfo_for_vbase): New function.
18886 * typeck.c (get_delta_difference): Use binfo_for_vbase.
18887
18888 2000-05-17 Mark Mitchell <mark@codesourcery.com>
18889
18890 * decl2.c (finish_anon_union): Generalize error messages to handle
18891 anonymous structures.
18892 * init.c (perform_member_init): Remove `name' parameter.
18893 (build_field_list): New function.
18894 (sort_member_init): Handle anonymous union initialization order
18895 correctly. Check for multiple initializations of the same union.
18896 (emit_base_init): Don't look up fields by name here.
18897 (expand_member_init): Record the result of name lookup for future
18898 reference.
18899 * typeck.c (build_component_ref): Fix formatting.
18900
18901 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
18902
18903 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18904 * typeck.c (build_x_compound_expr): Replace warn_unused with
18905 warn_unused_value.
18906
18907 * decl2.c (lang_decode_option): Update -Wall unused flags by
18908 calling set_Wunused.
18909
18910 2000-05-16 Mark Mitchell <mark@codesourcery.com>
18911
18912 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18913 * init.c (dfs_vtable_path_unmark): Remove.
18914 * search.c (marked_new_vtable_p): Likewise.
18915 (unmarked_new_vtable_p): Likewise.
18916 (dfs_search_slot_nonempty_p): Likewise.
18917 (dfs_mark): Likewise.
18918 (dfs_vtable_path_unmark): Likewise.
18919 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18920 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18921 (dfs_init_vbase_pointers): Remove special-case new ABI code.
18922 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18923 (init_vbase_pointers): Simplify.
18924 (expand_indirect_vtbls_init): Likewise.
18925
18926 * class.c (copy_virtuals): New function.
18927 (build_primary_table): Use it.
18928 (build_secondary_vtable): Likewise.
18929 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18930 indicate that no vcall offset is required.
18931 (add_virtual_function): Likewise.
18932 (modify_all_vtables): Likewise.
18933 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18934 (dfs_accumulate_vtbl_inits): Likewise.
18935 (build_vtbl_initializer): Make changes to handle construction
18936 vtables.
18937 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18938 (build_rtti_vtbl_entries): Likewise.
18939 (build_vtable_entries): Handle a NULL vcall_index.
18940
18941 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
18942
18943 * decl2.c (lang_decode_option): Fix thinko.
18944
18945 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
18946
18947 * except.c (check_handlers): New fn.
18948 * cp-tree.h: Declare it.
18949 * semantics.c (finish_handler_sequence): Call it.
18950 (finish_function_handler_sequence): Likewise.
18951 (finish_handler_parms): Set TREE_TYPE on the handler.
18952 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18953 * search.c (get_base_distance_recursive): If protect>1, ignore
18954 special access.
18955 (get_base_distance): Don't reduce watch_access.
18956
18957 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
18958
18959 * lex.c: #include diagnostic.h.
18960 (lang_init_options): Set default prefixing rules.
18961
18962 * lang-options.h: Add -fdiagnostics-show-location=.
18963
18964 * decl2.c: #include diagnostic.h.
18965 (lang_decode_option): Handle -fdiagnostics-show-location=.
18966
18967 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
18968
18969 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18970 * vec.cc: Revert my 2000-05-07 change.
18971
18972 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
18973
18974 * class.c (check_field_decls): Complain about non-static data
18975 members with same name as class in class with constructor.
18976
18977 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
18978
18979 * decl.c (grokdeclarator): Allow non-static data members with
18980 same name as class.
18981
18982 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
18983
18984 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18985 and pending_inline.filename. Update prototypes.
18986 * decl.c (define_label): Constify filename parameter.
18987 * decl2.c (warn_if_unknown_interface): Constify local char *.
18988 * input.c Constify input_source.filename. Don't declare
18989 input_filename or lineno. Constify filename parameter to feed_input.
18990 * lex.c (init_parse): Constify parameter and return value.
18991 (cp_pragma_interface, cp_pragma_implementation): Constify
18992 filename argument.
18993 (reinit_parse_for_method, reinit_parse_for_block,
18994 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18995 Constify local char *.
18996 * pt.c: Don't declare lineno or input_filename.
18997 (print_template_context, tsubst_friend_function, tsubst_decl,
18998 tsubst, instantiate_decl): Constify local char *.
18999 * semantics.c (expand_body): Constify local char *.
19000 * tree.c (build_srcloc): Constify filename parameter.
19001 * typeck.c (c_expand_asm_operands): Constify filename
19002 parameter.
19003
19004 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
19005
19006 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
19007 offsetof expansion.
19008
19009 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
19010
19011 * inc/cxxabi.h: Fix typos in comment.
19012 (__base_class_info::__offset): Use a static_cast.
19013
19014 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
19015
19016 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
19017 of std::size_t and std::ptrdiff_t respectively.
19018 * tinfo.cc: Likewise.
19019 * vec.cc: Likewise.
19020
19021 2000-05-06 Richard Henderson <rth@cygnus.com>
19022
19023 * typeck.c (build_c_cast): Don't warn integer->pointer size
19024 mismatch for constants.
19025
19026 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
19027
19028 * rtti.c (ptmd_initializer): Set non-public, if class is
19029 incomplete.
19030
19031 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
19032 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19033 __cxa_vec_delete): Likewise.
19034 * tinfo.cc (__dynamic_cast): Likewise.
19035 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19036 __cxa_vec_delete): Likewise.
19037
19038 2000-05-04 Mark Mitchell <mark@codesourcery.com>
19039
19040 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
19041 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
19042 (lang_decl_flags): Add vcall_offset.
19043 (THUNK_VCALL_OFFSET): Use it.
19044 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
19045 * method.c (make_thunk): Create the lang_decl here, not in
19046 emit_thunk.
19047 (emit_thunk): Make generic thunks into ordinary functions once
19048 they have been fed to expand_body.
19049 * semantics.c (expand_body): Set current_function_is_thunk here.
19050
19051 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19052
19053 * class.c (update_vtable_entry_for_fn): Prototype.
19054
19055 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
19056 and `tmpl'.
19057
19058 * search.c (dfs_build_inheritance_graph_order): Prototype.
19059
19060 2000-05-04 Mark Mitchell <mark@codesourcery.com>
19061
19062 * cp-tree.h (special_function_kind): Add various kinds of
19063 destructors.
19064 (special_function_p): New function.
19065 * class.c (overrides): Don't let one kind of destructor override
19066 another.
19067 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
19068 whether or not to instantiate a template.
19069 * tree.c (special_function_p): Define.
19070
19071 2000-05-03 Mark Mitchell <mark@codesourcery.com>
19072
19073 * cp-tree.def (THUNK_DECL): Remove.
19074 * cp-tree.h (DECL_THUNK_P): New macro.
19075 (DECL_NON_THUNK_FUNCTION_P): Likewise.
19076 (DECL_EXTERN_C_FUNCTION_P): Likewise.
19077 (SET_DECL_THUNK_P): Likewise.
19078 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
19079 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
19080 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
19081 * decl.c (decls_match): Use DECL_EXTERN_C_P.
19082 (duplicate_decls): Likewise.
19083 (pushdecl): Likewise. Adjust thunk handling.
19084 (grokfndecl): Use DECL_EXTERN_C_P.
19085 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
19086 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
19087 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
19088 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
19089 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
19090 DECL_NO_STATIC_CHAIN.
19091 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
19092 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
19093 * search.c (covariant_return_p): Remove THUNK_DECL handling.
19094 * ir.texi: Update.
19095
19096 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19097
19098 * tree.c (walk_tree): Set lineno.
19099
19100 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19101
19102 * exception.cc: Update license notice.
19103 * new.cc: Likewise.
19104 * new1.cc: Likewise.
19105 * new2.cc: Likewise.
19106 * tinfo.cc: Likewise.
19107 * tinfo2.cc: Likewise.
19108 * vec.cc: Likewise.
19109 * inc/cxxabi.h: Likewise.
19110 * inc/exception: Likewise.
19111 * inc/new: Likewise.
19112 * inc/new.h: Likewise.
19113 * inc/typeinfo: Likewise.
19114
19115 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19116
19117 * tree.c (build_target_expr_with_type): If we already have a
19118 TARGET_EXPR, just return it.
19119
19120 * optimize.c (initialize_inlined_parameters): Don't generate an
19121 EXPR_STMT if we can just use DECL_INITIAL.
19122 * decl.c (emit_local_var): Only make the initialization a
19123 full-expression if stmts_are_full_exprs_p.
19124
19125 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19126
19127 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
19128 macro.
19129 * call.c (standard_conversion): Use it.
19130 (direct_reference_binding): Likewise.
19131 (build_over_call): Likewise.
19132 (is_properly_derived_from): Likewise.
19133 (compare_ics): Likewise.
19134 * class.c (resolves_to_fixed_type_p): Likewise.
19135 * optimize.c (declare_return_variable): Likewise.
19136 * pt.c (is_specialization_of): Likewise.
19137 (unify): Likewise.
19138 * typeck.c (comp_target_parms): Likeiwse.
19139 (build_static_cast): Likewise.
19140 (build_reinterpret_cast): Likewise.
19141 (build_const_cast): Likewise.
19142 (comp_ptr_ttypes_real): Likewise.
19143 (comp_ptr_ttypes_const): Likewise.
19144 * typeck2.c (process_init_constructor): Likewise.
19145
19146 2000-04-30 Scott Snyder <snyder@fnal.gov>
19147
19148 * decl.c (finish_destructor_body): Use the base destructor when
19149 destroying virtual bases.
19150
19151 2000-04-30 Mark Mitchell <mark@codesourcery.com>
19152
19153 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
19154 STMT_EXPRs.
19155 * optimize.c (struct inline_data): Add target_exprs field.
19156 (declare_return_variable): When a function returns an aggregate,
19157 use the variable declared in the TARGET_EXPR as the remapped
19158 DECL_RESULT.
19159 (expand_call_inline): Update the pending target_exprs stack.
19160 (optimize_function): Initialize the stack.
19161
19162 * decl2.c (finish_file): Fix typo in comment.
19163
19164 * method.c (emit_thunk): Don't try to return a `void' value.
19165
19166 * optimize.c (initialize_inlined_parameters): If the parameter is
19167 addressable, we need to make a new VAR_DECL, even if the
19168 initializer is constant.
19169
19170 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
19171
19172 * decl.c (grok_op_properties): Add an extra check of argtypes.
19173
19174 2000-04-27 Mark Mitchell <mark@codesourcery.com>
19175
19176 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19177 variables.
19178 (initialize_inlined_parameters): Try to avoid creating new
19179 VAR_DECLs.
19180
19181 2000-04-27 Alex Samuel <samuel@codesourcery.com>
19182
19183 * lex.c (my_get_run_time): Remove.
19184 (init_filename_times): Use get_run_time instead of my_get_run_time.
19185 (check_newline): Likewise.
19186 (dump_time_statistics): Likewise.
19187 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19188 of computing elapsed time explicitly.
19189
19190 2000-04-26 Mark Mitchell <mark@codesourcery.com>
19191
19192 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19193 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19194 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19195 before calling decl_constant_value.
19196 * class.c (check_bitfield_decl): Likewise.
19197 * cvt.c (ocp_convert): Likewise.
19198 (convert): Likewise.
19199 * decl.c (compute_array_index_type): Likewise.
19200 (build_enumerator): Likewise.
19201 * decl2.c (check_cp_case_value): Likewise.
19202 * pt.c (convert_nontype_argument): Likewise.
19203 (tsubst): Likewise.
19204 * typeck.c (decay_conversion): Likewise.
19205 (build_compound_expr): Likewise.
19206 (build_reinterpret_cast): Likewise.
19207 (build_c_cast): Likewise.
19208 (convert_for_assignment): Likewise.
19209
19210 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
19211
19212 * decl.c (finish_function): Don't play games with DECL_INLINE.
19213
19214 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
19215
19216 * ir.texi: Correct typo.
19217
19218 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19219
19220 * decl.c (grokdeclarator): Reject VLAs as members.
19221
19222 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
19223
19224 * call.c (standard_conversion): Accept conversion between
19225 COMPLEX_TYPEs.
19226
19227 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19228
19229 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
19230
19231 * decl2.c (finish_file): Remove double setup for accounting
19232 compile time.
19233
19234 2000-04-24 Robert Lipe <robertlipe@usa.net>
19235
19236 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19237
19238 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
19239
19240 * new.cc (set_new_handler): Needs to be in std::.
19241
19242 2000-04-23 Mark Mitchell <mark@codesourcery.com>
19243
19244 * cp-tree.h (lang_decl): Remove pretty_function_p.
19245 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19246 language-specific node.
19247 * decl.c (cp_make_fname_decl): Use build_decl, not
19248 build_lang_decl, to build the variables.
19249 (grokvardecl): Don't call build_lang_decl for local variables in
19250 templates.
19251 (grokdeclarator): Don't call build_lang_decl for local type
19252 declarations in templates.
19253 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19254 zero'd memory, rather than calling memset.
19255 * pt.c: Include hashtab.h.
19256 (local_specializations): New variable.
19257 (retrieve_local_specialization): Use it.
19258 (register_local_specialization): Likewise.
19259 (tsubst_decl): Don't assume local variables have
19260 DECL_LANG_SPECIFIC.
19261 (instantiate_decl): Set up local_specializations.
19262 * Makefile.in (HTAB_H): New variable.
19263
19264 2000-04-23 Richard Henderson <rth@cygnus.com>
19265
19266 * typeck.c (c_expand_asm_operands): Restore the original
19267 contents of the output list.
19268
19269 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
19270
19271 * ir.texi: Document complex number representation.
19272
19273 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
19274
19275 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19276 (target_incomplete_p): New function.
19277 (tinfo_base_init): Create comdat NTBS name variable.
19278 (ptr_initializer): Add non_public parameter. Calculate it.
19279 (ptmd_initializer): Likewise.
19280 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19281 (create_real_tinfo_var): Add non_public parameter. Use it.
19282 Push proxy into global namespace.
19283 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19284 New enumeration.
19285 * inc/typeinfo (type_info::before, type_info::operator==):
19286 Compare __name addresses.
19287
19288 * tinfo2.cc: Remove new-abi builtins comment.
19289
19290 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
19291
19292 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19293
19294 * call.c (joust): Exit early if we get the same function, too.
19295
19296 * decl2.c (key_method): Return NULL_TREE for template classes.
19297 (import_export_class): Don't need to check for template classes.
19298
19299 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
19300
19301 * lex.c: Remove references to cccp.c.
19302
19303 2000-04-18 Mark Mitchell <mark@codesourcery.com>
19304
19305 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19306 volatile_memfunc. Add destructor_attr. Adjust dummy.
19307 (DECL_DESTRUCTOR_P): Use destructor_attr.
19308 (DECL_CONST_MEMFUNC_P): Reimplement.
19309 (DECL_VOLATILE_MEMFUNC_P): Remove.
19310 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19311 (overrides): Use DECL_DESTRUCTOR_P.
19312 (check_for_override): Likewise.
19313 * decl.c (start_function): Likewise.
19314 * decl2.c (grokfclassfn): Likewise.
19315 (check_classfn): Likewise.
19316 (grok_function_init): Likewise.
19317
19318 2000-04-17 Mark Mitchell <mark@codesourcery.com>
19319
19320 * decl2.c (grokfield): Issue error on illegal data member
19321 declaration.
19322
19323 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
19324
19325 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19326
19327 2000-04-16 Mark Mitchell <mark@codesourcery.com>
19328
19329 * class.c (build_vtable_entry): Don't build thunks for type-info
19330 functions.
19331
19332 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
19333
19334 * decl.c (decls_match): Allow a redeclaration of a builtin to
19335 specify args while the builtin did not.
19336
19337 2000-04-15 Mark Mitchell <mark@codesourcery.com>
19338
19339 * cp-tree.def (THUNK_DECL): Add to documentation.
19340 * cp-tree.h (flag_huge_objects): Declare.
19341 * class.c (modify_vtable_entry): Tidy.
19342 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19343 Calculate delta appropriately for the new ABI.
19344 (dfs_modify_vtables): Use it.
19345 (modify_all_vtables): Fix thinko in code to add overriding copies
19346 of functions to primary vtables.
19347 (build_clone): Fix typo in comment.
19348 (clone_function_decl): Correct order of destructors in vtable.
19349 (build_vbase_offset_vtbl_entries): Adjust comment.
19350 (dfs_vcall_offset_queue_p): Remove.
19351 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19352 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19353 (build_vtable_entry): Correct check for pure virtual functions.
19354 Don't declare flag_huge_objects.
19355 * decl.c (flag_huge_objects): Remove declaration.
19356 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19357 Use int_size_in_bytes.
19358 (emit_thunk): Handle vcall offset thunks.
19359
19360 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19361
19362 * decl2.c (parse_time, varconst_time): Delete declarations.
19363 (finish_file): Delete LINENO declaration.
19364 START_TIME and THIS_TIME now long.
19365
19366 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
19367
19368 * class.c (build_base_field): Reformat comment.
19369
19370 * inc/cxxabi.h (stddef.h): Comment inclusion.
19371 (__base_class_info::__offset): Comment shift.
19372
19373 2000-04-12 Mark Mitchell <mark@codesourcery.com>
19374
19375 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19376 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19377 (cp_push_exception_identifier): New macro.
19378 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19379 (DECL_BASE_DESTRUCTOR_P): Likewise.
19380 (DECL_DELETING_DESTRUCTOR_P): Likewise.
19381 (get_vtbl_decl_for_binfo): Fix formatting.
19382 (in_charge_arg_for_name): New macro.
19383 (maybe_build_cleanup_and_delete): Remove declaration.
19384 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19385 (in_charge_arg_for_name): New function.
19386 (build_new_method_call): Use it. Handle cloned destructors.
19387 (build_clone): Don't make the base constructor virtual.
19388 Automatically defer generated functions.
19389 (clone_function_decl): Handle destructors, too.
19390 (clone_constructors_and_destructors): Likewise.
19391 (create_vtable_ptr): Don't create a vtable entry for a cloned
19392 function.
19393 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19394 (initialize_predefined_identifiers): Update appropriately.
19395 (finish_destructor_body): Simplify.
19396 (maybe_build_cleanup_and_delete): Remove.
19397 * except.c (expand_throw): Handle new-ABI destructors.
19398 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19399 (build_dtor_call): New function.
19400 (build_delete): Use it. Simplify.
19401 * optimize.c (maybe_clone_body): Handle destructors.
19402 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19403
19404 * exception.cc (cleanup_fn): New typedef.
19405 (CALL_CLEANUP): New macro.
19406 (cp_eh_info): Use them.
19407 (__cp_push_exception): Likewise.
19408 (__cp_pop_exception): Likewise.
19409
19410 2000-04-11 Mark Mitchell <mark@codesourcery.com>
19411
19412 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19413 (complete_dtor_identifier): New macro.
19414 (CLASSTYPE_FIRST_CONVERSION): Remove.
19415 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19416 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19417 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19418 (CLASSTYPE_CONSTRUCTORS): Likewise.
19419 (CLASSTYPE_DESTRUCTORS): Likewise.
19420 (lang_decl): Add cloned_function.
19421 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19422 (DECL_BASE_CONSTRUCTOR_P): Likewise.
19423 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19424 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19425 (DECL_CLONED_FUNCTION_P): Likewise.
19426 (DECL_CLONED_FUNCTION): Likewise.
19427 (clone_function_decl): Declare.
19428 (maybe_clone_body): Likewise.
19429 * call.c (build_user_type_conversion_1): Call complete object
19430 constructors in the new ABI.
19431 (build_new_method_call): Don't add in-charge parameters under the
19432 new ABI.
19433 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19434 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19435 CLASSTYPE_DESTRUCTOR_SLOT.
19436 (build_clone): New function.
19437 (clone_function_decl): Likewise.
19438 (clone_constructors_and_destructors): Likewise.
19439 (check_bases_and_members): Use it.
19440 * decl.c (iniitialize_predefined_identifiers): Initialize
19441 complete_dtor_identifier.
19442 (finish_function): Don't add extra code to a clone.
19443 (lang_mark_tree): Mark cloned_function.
19444 * decl2.c (mark_used): Don't bother trying to instantiate things
19445 we synthesized.
19446 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19447 * method.c (set_mangled_name_for_decl): Don't treat clones as
19448 constructors.
19449 (synthesize_method): Sythesize cloned functions, not the clones.
19450 * optimize.c (inline_data): Update comment on ret_label.
19451 (remap_block): Don't assume DECL_INITIAL exists.
19452 (copy_body_r): Allow ret_label to be NULL.
19453 (maybe_clone_body): Define.
19454 * pt.c (tsubst_decl): Handle clones.
19455 (instantiate_clone): New function.
19456 (instantiate_template): Use it.
19457 (set_mangled_name_for_template_decl): Don't treat clones as
19458 constructors.
19459 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19460 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19461 * semantics.c (expand_body): Clone function bodies as necessary.
19462
19463 * optimize.c (remap_decl): Avoid sharing structure for arrays
19464 whose size is only known at run-time.
19465 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19466
19467 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19468 to has_in_charge_parm_p.
19469 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19470 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19471 (DECL_COPY_CONSTRUCTOR_P): New macro.
19472 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19473 (build_user_type_conversion_1): Likewise.
19474 (convert_like_real): Likewise.
19475 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
19476 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19477 (copy_args_p): Likewise.
19478 (grok_ctor_properties): Likewise.
19479 (start_function): Likewise.
19480 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
19481 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19482 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19483 * method.c (do_build_copy_constructor): Use
19484 DECL_HAS_IN_CHARGE_PARM_P.
19485 (synthesize_method): Likewise.
19486 * pt.c (instantiate_template): Remove goto.
19487 * tree.c (build_cplus_method_type): Remove mention of obstacks in
19488 comment.
19489
19490 * cp-tre.h (finish_function): Change prototype.
19491 * decl.c (end_cleanup_fn): Adjust caller.
19492 (finish_function): Take only one parameter.
19493 * decl2.c (finish_objects): Adjust caller.
19494 (finish_static_storage_duration_function): Likewise.
19495 * method.c (emit_thunk): Likewise.
19496 * parse.y: Likewise.
19497 * parse.c: Regenerated.
19498 * pt.c (instantiate_decl): Likewise.
19499 * rtti.c (synthesize_tinfo_fn): Likewise.
19500 * semantics.c (expand_body): Likewise.
19501
19502 * cp-tree.h (copy_decl): New function.
19503 * class.c (finish_struct_1): Use it.
19504 * lex.c (copy_decl): Define it.
19505 * pt.c (tsubst_decl): Likewise.
19506 * tree.c (copy_template_template_parm): Likewise.
19507
19508 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19509 has_nonpublic_assign_ref.
19510 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19511 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19512 * class.c (finish_struct_methods): Don't set
19513 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19514 (interface_only): Don't declare.
19515 (interface_unknown): Likewise.
19516
19517 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19518
19519 * tree.h (HAVE_TEMPLATES): Remove definition.
19520 * lang-options.h (-fthis-is-variable): Remove documentation.
19521
19522 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
19523
19524 * class.c (instantiate_type): Handle object-relative template-id.
19525
19526 * semantics.c (finish_expr_stmt): Call convert_to_void here.
19527 * decl.c (cplus_expand_expr_stmt): Not here.
19528
19529 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19530 Initialize exprtype earlier.
19531
19532 * parse.y (fn.def1): Check for defining types in return types.
19533
19534 * decl.c (check_tag_decl): Notice extra fundamental types.
19535 Diagnose empty decls in classes, too.
19536
19537 * decl.c (grokdeclarator): Don't override an anonymous name if no
19538 declarator was given.
19539
19540 * cvt.c (convert_to_void): Call resolve_offset_ref.
19541
19542 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19543
19544 * decl2.c (decl_namespace): Handle getting a type.
19545
19546 * typeck.c (build_c_cast): Re-enable warning for cast between
19547 pointer and integer of different size.
19548
19549 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
19550
19551 * inc/cxxabi.h (__pointer_type_info): Add restrict and
19552 incomplete flags.
19553 (__pointer_type_info::__pointer_catch): New virtual function.
19554 (__pointer_to_member_type_info): Derive from
19555 __pointer_type_info. Adjust.
19556 (__pointer_to_member_type_info::__do_catch): Remove.
19557 (__pointer_to_member_type_info::__is_pointer_p): Declare.
19558 (__pointer_to_member_type_info::__pointer_catch): Declare.
19559 * rtti.c (qualifier_flags): Add restrict flag.
19560 (ptmd_initializer): Reorder members.
19561 (create_tinfo_types): Expand comments. Reorder
19562 ptmd_desc_type_node members.
19563 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19564 Implement.
19565 (__pointer_type_info::__do_catch): Move specific code into
19566 __pointer_catch. Call it.
19567 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19568 specific catch checking. Fix void conversion check.
19569 (__pointer_to_member_type_info::__do_catch): Remove.
19570 (__pointer_to_member_type_info::__pointer_catch): Implement.
19571
19572 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19573
19574 * lex.c (init_parse): Remove traces of classof and headof.
19575 * decl2.c (flag_operator_names): Default to 1.
19576 (lang_decode_option): Do not set it for -ansi.
19577
19578 2000-04-09 Mark Mitchell <mark@codesourcery.com>
19579
19580 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19581 (DECL_MAIN_VARIANT): Remove.
19582 * decl.c (duplicate_decls): Don't set it.
19583 (start_function): Likewise.
19584 (lang_mark_tree): Don't mark it.
19585 * decl2.c (defer_fn): Don't use it.
19586 * lex.c (retrofit_lang_decl): Don't set it.
19587 * pt.c (tsubst_decl): Likewise.
19588 * ptree.c (print_lang_decl): Don't print it.
19589 * typeck.c (mark_addressable): Don't use it.
19590
19591 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19592
19593 * vec.cc: Include <new> and <exception>.
19594 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19595 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19596 terminate.
19597 (__cxa_vec_delete): Catch dtor exceptions.
19598
19599 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19600
19601 Prepend __ to implementation defined names.
19602 * inc/typeinfo (type_info): Rename _name to __name.
19603 (type_info::type_info): Rename parameter.
19604 (type_info::operator==, type_info::operator!=,
19605 type_info::before): Likewise.
19606 (type_info::is_pointer_p, type_info::is_function_p,
19607 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19608 parameters.
19609 * inc/cxxabi.h
19610 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19611 (__pointer_type_info::__pointer_type_info): Likewise.
19612 (__pointer_type_info::is_pointer_p,
19613 __pointer_type_info::do_catch): Prepend __. Rename parameters.
19614 (__array_type_info::__array_type_info): Rename parameters.
19615 (__function_type_info::__function_type_info): Likewise.
19616 (__function_type_info::is_function_p): Prepend __.
19617 (__enum_type_info::__enum_type_info): Rename parameters.
19618 (__pointer_to_member_type_info::__pointer_to_member_type_info):
19619 Likewise.
19620 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19621 parameters.
19622 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19623 (__class_type_info::__class_type_info): Rename parameters.
19624 (__class_type_info::sub_kind): Prepend __. Adjust member names.
19625 (__class_type_info::upcast_result,
19626 __class_type_info::dyncast_result): Prepend __. Move definition
19627 into tinfo.cc.
19628 (__class_type_info::do_upcast, __class_type_info::do_catch,
19629 __class_type_info::find_public_src,
19630 __class_type_info::do_dyncast,
19631 __class_type_info::do_find_public_src): Prepend __. Rename
19632 parameters.
19633 (__si_class_type_info::__si_class_type_info): Rename parameters.
19634 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19635 __si_class_type_info::do_find_public_src): Prepent __. Rename
19636 parameters.
19637 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19638 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19639 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19640 parameters.
19641 (__dynamic_cast): Rename parameters.
19642 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19643 type_info::do_catch, type_info::do_upcast): Prepend __.
19644 (contained_p, public_p, virtual_p, contained_public_p,
19645 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19646 (__class_type_info::do_catch,
19647 __class_type_info::do_upcast): Prepend __. Adjust.
19648 (__class_type_info::__upcast_result,
19649 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19650 Adjust.
19651 (__class_type_info::find_public_src): Prepend __. Adjust.
19652 (__class_type_info::do_find_public_src,
19653 __si_class_type_info::do_find_public_src,
19654 __vmi_class_type_info::do_find_public_src): Likewise.
19655 (__class_type_info::do_dyncast,
19656 __si_class_type_info::do_dyncast,
19657 __vmi_class_type_info::do_dyncast): Likewise.
19658 (__class_type_info::do_upcast,
19659 __si_class_type_info::do_upcast,
19660 __vmi_class_type_info::do_upcast): Likewise.
19661 (__dynamic_cast): Adjust.
19662 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19663 (__function_type_info::is_function_p): Likewise.
19664 (__pointer_type_info::do_catch): Likewise. Adjust.
19665 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19666 (__throw_type_match_rtti_2): Adjust.
19667 (__is_pointer): Adjust.
19668
19669 2000-04-08 Mark Mitchell <mark@codesourcery.com>
19670
19671 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19672 (complete_ctor_identifier): New macro.
19673 (special_function_kind): Add sfk_copy_constructor and
19674 sfk_assignment_operator.
19675 (LOOKUP_HAS_IN_CHARGE): Remove.
19676 (cons_up_default_function): Rename to ...
19677 (implicitly_declare_fn): ... this.
19678 * call.c (build_new_method_call): Add in-charge parameters for
19679 constructors here.
19680 * class.c (add_implicitly_declared_members): Change parameter name
19681 from cant_have_assignment to cant_have_const_assignment.
19682 Replace calls to cons_up_default_function to implicitly_declare_fn.
19683 * cvt.c (ocp_convert): Use complete_ctor_identifier.
19684 * decl.c (initialize_predefined_identifiers): Initialize it.
19685 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19686 complex expression.
19687 * init.c (expand_default_init): Don't calculate the in-charge
19688 parameter here.
19689 (build_new_1): Likewise.
19690 * lex.c (cons_up_default_function): Move to method.c.
19691 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19692 (implicitly_declare_fn): New function.
19693 * typeck.c (build_static_cast): Use complete_ctor_identifier.
19694 (build_modify_expr): Likewise.
19695 * typeck2.c (build_functional_cast): Likewise.
19696
19697 Under the new ABI, constructors don't return `this'.
19698 * cp-tree.h (warn_reorder): Declare.
19699 (special_function_kind): New enum.
19700 (global_base_init_list): Remove declaration.
19701 (emit_base_init): Don't return a value.
19702 (check_base_init): Don't declare.
19703 (is_aggr_typedef): Likewise.
19704 * decl.c (check_special_function_return_type): New function.
19705 (return_types): Remove.
19706 (grokdeclarator): Use check_special_function_return_type.
19707 (start_function): Don't initialize ctor_label under the new ABI.
19708 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19709 * init.c (begin_init_stmts): Move to top of file.
19710 (finish_init_stmts): Likewise.
19711 (warn_reorder): Don't declare.
19712 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
19713 value.
19714 (check_base_init): Remove.
19715 (is_aggr_typedef): Likewise.
19716 (build_new_1): Don't use the return value of a constructor.
19717 * semantics.c (setup_vtbl_ptr): Don't use the return value
19718 of emit_base_init.
19719 * typeck.c (check_return_expr): Don't magically convert return
19720 statements into `return this' in constructors under the new ABI.
19721
19722 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19723 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19724 (base_ctor_identifier): New macro.
19725 (base_dtor_identifier): Likewise.
19726 (deleting_dtor_identifier): Likewise.
19727 * decl.c: Don't include obstack.h.
19728 (obstack_chunk_alloc): Don't define.
19729 (obstack_chunk_free): Likewise.
19730 (struct predefined_identifier): New type.
19731 (initialize_predefined_identifiers): New function.
19732 (init_decl_processing): Use it.
19733 (debug_temp_inits): Remove.
19734 (start_method): Don't call preserve_data.
19735 (hack_incomplete_structures): Update comment.
19736 * init.c (init_init_processing): Don't initialize
19737 nelts_identifier.
19738 (build_offset_rf): Remove dead code.
19739 (build_delete): Use CLASSTYPE_N_BASECLASSES.
19740 * search.c (init_search_processing): Don't initialize
19741 vptr_identifier.
19742
19743 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19744
19745 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19746 some sign_compare warnings.
19747
19748 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19749
19750 Rename abi::__vmi_class_type_info members.
19751 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19752 base_list, detail_masks members to vmi_flags, vmi_base_count,
19753 vmi_bases and vmi_flags_masks respectively.
19754 (__vmi_class_type_info::vmi_flags_masks): Rename
19755 details_unknown_mask to flags_unknown_mask.
19756 * tinfo.cc (__class_type_info::do_upcast): Adjust.
19757 (__vmi_class_type_info::do_find_public_src): Adjust.
19758 (__vmi_class_type_info::do_dyncast): Adjust.
19759 (__vmi_class_type_info::do_upcast): Adjust.
19760
19761 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19762
19763 * tinfo.cc (convert_to_base): New function.
19764 (get_vbase_offset): Remove. Move into convert_to_base.
19765 (__vmi_class_type_info::do_find_public_src): Adjust.
19766 (__vmi_class_type_info::do_dyncast): Adjust.
19767 (__vmi_class_type_info::do_upcast): Adjust.
19768
19769 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
19770
19771 * tinfo.cc (operator=): Use __builtin_strcmp.
19772 * tinfo2.cc (before): Likewise.
19773
19774 2000-04-06 Mark Mitchell <mark@codesourcery.com>
19775
19776 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19777 (DECL_SAVED_INLINE): Rename to ...
19778 (DECL_DEFERRED_FN): ... this.
19779 (in_function_p): Remove declaration.
19780 (mark_inline_for_output): Rename to ...
19781 (defer_fn): ... this.
19782 * decl.c (finish_function): Adjust call to mark_inline_for_output.
19783 (in_function_p): Remove definition.
19784 * decl2.c (saved_inlines): Rename to ...
19785 (deferred_fns): ... this.
19786 (saved_inlines_used): Rename to ...
19787 (deferred_fns_used): ... this.
19788 (mark_inline_for_output): Rename to ...
19789 (defer_fn): ... this.
19790 (finish_file): Adjust accordingly.
19791 (init_decl2): Likewise.
19792 * lex.c (cons_up_default_function): Likewise.
19793 * pt.c (mark_decl_instantiated): Likewise.
19794 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19795 circumstances.
19796 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19797 * semantics.c (expand_body): Defer more functions.
19798
19799 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19800
19801 * vec.cc: New file.
19802 * Make-lang.in (CXX_LIB2FUNCS): Add it.
19803 (vec.o): Build it.
19804 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19805 __cxa_vec_delete): Declare.
19806
19807 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19808
19809 * rtti.c (dfs_class_hint_mark): New static function.
19810 (dfs_class_hint_unmark): New static function.
19811 (class_hint_flags): Use them.
19812
19813 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
19814
19815 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19816
19817 2000-04-05 Mark Mitchell <mark@codesourcery.com>
19818
19819 * cp-tree.h (instantiate_decl): Change prototype.
19820 * decl2.c (mark_used): Adjust call.
19821 * optimize.c (inlinable_function_p): Adjust handling of templates.
19822 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19823 (do_type_instantiation): Likewise.
19824 (instantiate_decl): Defer more templates.
19825 (instantiate_pending_templates): Adjust logic to handle inline
19826 friend functions.
19827
19828 * Makefile.in (GGC_H): New variable. Use it throughout in place
19829 of ggc.h.
19830
19831 * call.c: Don't include obstack.h. Include ggc.h.
19832 (obstack_chunk_alloc): Don't define.
19833 (obstack_chunk_free): Likewise.
19834 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19835 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19836 (pop_switch): Free it.
19837
19838 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19839
19840 * dump.c (dequeue_and_dump): Don't try to print the bit_position
19841 if we don't have a DECL_FIELD_OFFSET.
19842
19843 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
19844
19845 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19846 special_function_p.
19847
19848 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19849
19850 * cfns.gperf (hash, libc_name_p): Prototype.
19851
19852 * rtti.c (build_dynamic_cast_1): Constification.
19853
19854 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19855
19856 * semantics.c (deferred_type_access_control): Prototype.
19857
19858 2000-04-04 Mark Mitchell <mark@codesourcery.com>
19859
19860 Correct many new ABI issues regarding vbase and vcall offset
19861 layout.
19862 * cp-tree.h (BINFO_VTABLE): Document.
19863 (struct lang_type): Tweak formatting.
19864 (BINFO_PRIMARY_BINFO): Add to documentation.
19865 (CLASSTYPE_VSIZE): Fix typo in comment.
19866 (CLASSTYPE_VBASECLASSES): Update documentation.
19867 (BINFO_VBASE_MARKED): Remove.
19868 (SET_BINFO_VBASE_MARKED): Likewise.
19869 (CLEAR_BINFO_VBASE_MARKED): Likewise.
19870 (BINFO_FIELDS_MARKED): Remove.
19871 (SET_BINFO_FIELDS_MARKED): Likewise.
19872 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19873 (enum access_kind): New enumeration.
19874 (num_extra_vtbl_entries): Remove declaration.
19875 (size_extra_vtbl_entries): Likewise.
19876 (get_vtbl_decl_for_binfo): New function.
19877 (dfs_vbase_unmark): Remove declaration.
19878 (mark_primary_bases): Likewise.
19879 * class.c (SAME_FN): Remove.
19880 (struct vcall_offset_data_s): Move definition.
19881 (build_vbase_pointer): Use `build', not `build_binary_op', to
19882 access the vbase pointer under the new ABI.
19883 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19884 (build_primary_vtable): Likewise.
19885 (dfs_mark_primary_bases): Move here from search.c.
19886 (mark_primary_bases): Likewise.
19887 (determine_primary_bases): Under the new ABI, don't make a base
19888 class a primary base just because we don't yet have any virtual
19889 functions.
19890 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19891 (num_vfun_entries): Remove.
19892 (dfs_count_virtuals): Likewise.
19893 (num_extra_vtbl_entries): Likewise.
19894 (size_extra_vtbl_entries): Likewise.
19895 (layout_virtual_bases): Iterate in inheritance graph order under
19896 the new ABI.
19897 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19898 indicate that a vfield is present.
19899 (init_class_processing): Initialize access_public_node, etc., from
19900 ak_public, etc.
19901 (get_vtbl_decl_for_binfo): New function.
19902 (dump_class_hierarchy_r): Likewise.
19903 (dump_class_hierarchy): Use it.
19904 (finish_vtbls): Build the vtbls in inheritance graph order.
19905 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19906 (initialize_vtable): Use get_vtbl_decl_for_binfo.
19907 (accumulate_vtbl_inits): Add comments explaining why a pre-order
19908 walk is required.
19909 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19910 where the vptr points, even for primary vtables.
19911 (build_vtbl_initializer): Adjust handling of vbase and vcall
19912 offsets.
19913 (build_vcall_and_vbase_vtable_entries): New function.
19914 (dfs_build_vbase_offset_vtbl_entries): Remove.
19915 (build_vbase_offset_vtbl_entries): Reimplement.
19916 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19917 were already handled in a primary base class vtable.
19918 (build_vcall_offset_vtbl_entries): Adjust.
19919 (build_rtti_vtbl_entries): Adjust.
19920 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19921 * init.c (expand_virtual_init): Simplify.
19922 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19923 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19924 * search.c (BINFO_ACCESS): New macro.
19925 (SET_BINFO_ACCESS): Likewise.
19926 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19927 (access_in_type): Likewise.
19928 (dfs_accessible_p): Likewise.
19929 (protected_accessible_p): Likewise.
19930 (lookup_fnfields_1): Adjust documentation.
19931 (dfs_mark_primary_bases): Move to class.c
19932 (mark_primary_bases): Likewise.
19933 (dfs_vbase_unmark): Remove.
19934 (virtual_context): Use BINFO_FOR_VBASE.
19935 (dfs_get_vbase_types): Simplify.
19936 (dfs_build_inheritance_graph_order): New function.
19937 (get_vbase_types): Use it.
19938 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19939
19940 * tinfo.cc (get_vbase_offset): New function.
19941 (__vmi_class_type_info::do_find_public_src): Use it.
19942 (__vmi_class_type_info::do_dyncast): Likewise.
19943 (__vmi_class_type_info::do_upcast): Likewise.
19944
19945 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
19946
19947 * lang-specs.h: Pass -fno-show-column to the preprocessor.
19948
19949 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
19950
19951 * rtti.c (class_hint_flags): Rename flags.
19952 (class_initializer): Remove flags.
19953 (synthesize_tinfo_var): Combine offset and flags. Add flags
19954 for __vmi_class_type_info.
19955 (create_tinfo_types): Remove flags from __class_type_info and
19956 __si_class_type_info. Merge flags and offset from
19957 base_class_type_info.
19958 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19959 (__base_class_info::is_virtual_p): Adjust.
19960 (__base_class_info::is_public_p): Adjust.
19961 (__base_class_info::offset): New accessor.
19962 (__class_type_info::details): Remove member.
19963 (__class_type_info::__class_type_info): Lose details.
19964 (__class_type_info::detail_masks): Remove.
19965 (__si_class_type_info::__si_class_type_info): Lose details.
19966 (__vmi_class_type_info::details): New member.
19967 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19968 (__vmi_class_type_info::detail_masks): New member.
19969 * tinfo.cc (__class_type_info::do_upcast): Initialize result
19970 with unknown_details_mask.
19971 (__vmi_class_type_info::do_find_public_src): Adjust
19972 (__vmi_class_type_info::do_dyncast): Adjust.
19973 (__vmi_class_type_info::do_upcast): Set result details, if
19974 needed. Adjust.
19975 (__dynamic_cast): Temporarily #if out optimization.
19976
19977 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
19978
19979 * rtti.c (get_tinfo_decl): Mark used.
19980 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19981 mark as dealt with, if we output it.
19982
19983 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19984
19985 * class.c: Reorganize to put virtual function table initialization
19986 machinery at the end of the file.
19987
19988 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
19989
19990 * class.c (finish_struct): Use bitsize_zero_node.
19991 * pt.c (instantiate_class_template): Likewise.
19992
19993 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19994
19995 Put RTTI entries at negative offsets in new ABI.
19996 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19997 vbase offset at index -3, not -1.
19998 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19999 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
20000 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
20001 (build_rtti_vtbl_entries): New function.
20002 (set_rtti_entry): Remove.
20003 (build_primary_vtable): Don't use it.
20004 (build_secondary_vtable): Likewise.
20005 (start_vtable): Remove.
20006 (first_vfun_index): New function.
20007 (set_vindex): Likewise.
20008 (add_virtual_function): Don't call start_vtable. Do call
20009 set_vindex.
20010 (set_primary_base): Rename parameter.
20011 (determine_primary_base): Likewise.
20012 (num_vfun_entries): Don't use skip_rtti_stuff.
20013 (num_extra_vtbl_entries): Include RTTI information.
20014 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
20015 (skip_rtti_stuff): Remove.
20016 (dfs_modify_vtables): Don't use it.
20017 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
20018 (layout_nonempty_base_or_field): Update size handling.
20019 (create_vtable_ptr): Tweak.
20020 (layout_class_type): Adjust parameter names.
20021 (finish_struct_1): Simplify.
20022 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
20023 (skip_rtti_stuff): Remove.
20024 (first_vfun_index): New function.
20025 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
20026 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
20027 (marked_vtable_pathp): Declare.
20028 (unmarked_vtable_pathp): Likewise.
20029 * error.c (dump_expr): Use first_vfun_index to calculate vtable
20030 offsets.
20031 * rtti.c (build_headof): Look for RTTI at negative offsets.
20032 (get_tinfo_decl_dynamic): Likewise.
20033 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
20034 here.
20035 (create_pseudo_type_info): Do it here instead. Adjust so that
20036 vptr points at first virtual function.
20037 * search.c (marked_vtable_pathp): Make it global.
20038 (unmarked_vtable_pathp): Likewise.
20039 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
20040 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20041 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
20042 (get_pure_virtuals): Likewise.
20043 (expand_upcast_fixups): Likewise.
20044 * tree.c (debug_binfo): Likewise.
20045 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
20046 negative offset.
20047
20048 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20049
20050 * class.c (check_field_decl): Fix typo.
20051 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
20052 (check_methods): Likewise.
20053 (check_field_decls): Likewise.
20054 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
20055 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
20056 Use DECL_RESULT_FLD, not DECL_RESULT.
20057 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
20058 * lex.c (identifier_type): Likewise.
20059 * pt.c (determine_specialization, lookup_template_class): Likewise.
20060 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
20061 (resolve_overloaded_unification, more_specialized): Likewise.
20062 * semantics.c (finish_member_declaration): Likewise.
20063 * typeck.c (build_x_function_call): Likewise.
20064
20065 2000-03-26 Mark Mitchell <mark@codesourcery.com>
20066
20067 * class.c (layout_empty_base): Handle empty bases with non-byte
20068 alignment.
20069 (build_base_field): Likewise.
20070 (layout_virtual_bases): Likewise.
20071
20072 * class.c (finish_struct_1): Fix typo in this change:
20073
20074 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20075
20076 2000-03-25 Mark Mitchell <mark@codesourcery.com>
20077
20078 * decl.c (grokdeclarator): Count partial specializations when
20079 keeping track of how many template classes have been seen.
20080
20081 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
20082
20083 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20084
20085 * class.c (build_vbase_pointer_fields): layout_field now place_field.
20086 (get_vfield_offset): Use byte_position.
20087 (set_rtti_entry): Set OFFSET to ssizetype zero.
20088 (get_binfo_offset_as_int): Deleted.
20089 (dfs_record_base_offsets): Use tree_low_cst.
20090 (dfs_search_base_offsets): Likewise.
20091 (layout_nonempty_base_or_field): Reflect changes in RLI format
20092 and call byte_position.
20093 (layout_empty_base): Convert offset to ssizetype.
20094 (build_base_field): use rli_size_unit_so_far.
20095 (dfs_propagate_binfo_offsets): Do computation in proper type.
20096 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
20097 (layout_class_type): Reflect changes in RLI names and fields.
20098 (finish_struct_1): Set DECL_FIELD_OFFSET.
20099 * dump.c (dequeue_and_dump): Call bit_position.
20100 * expr.c (cplus_expand_constant): Use byte_position.
20101 * rtti.c (expand_class_desc): Use bitsize_one_node.
20102 * typeck.c (build_component_addr): Use byte_position and don't
20103 special case for zero offset.
20104
20105 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
20106
20107 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
20108
20109 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
20110 tinfo object.
20111 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
20112 vtable.
20113
20114 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20115
20116 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
20117 DECL_P macros.
20118 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
20119 make_typename_type, check_initializer, cp_finish_decl,
20120 xref_tag): Likewise.
20121 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
20122 decl_namespace, arg_assoc_template_arg, arg_assoc,
20123 validate_nonmember_using_decl, do_class_using_decl): Likewise.
20124 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
20125 args_to_string): Likewise.
20126 * friend.c (is_friend): Likewise.
20127 * lex.c (note_got_semicolon, note_list_got_semicolon,
20128 is_global): Likewise.
20129 * method.c (build_overload_nested_name, build_overload_value,
20130 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
20131 * parse.y (typename_sub, typename_sub1): Likewise.
20132 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
20133 process_partial_specialization, convert_template_argument,
20134 template_args_equal, add_pending_template, lookup_template_class,
20135 for_each_template_parm_r, maybe_fold_nontype_arg,
20136 tsubst, instantiate_template, type_unification_real, unify,
20137 instantiate_pending_templates, set_mangled_name_for_template_decl):
20138 Likewise.
20139 * repo.c (repo_get_id, repo_template_used): Likewise.
20140 * search.c (lookup_field_1): Likewise.
20141 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
20142 * xref.c (classname): Likewise.
20143
20144 2000-03-22 Mark Mitchell <mark@codesourcery.com>
20145
20146 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
20147 (CANONICAL_BINFO): New macro.
20148 (BINFO_NEW_VTABLE_MARKED): Use it.
20149 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
20150 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
20151 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
20152 not TREE_TYPE.
20153 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20154 (build_secondary_vtable): Likewise.
20155 (dfs_finish_vtbls): Likewise.
20156 (dfs_accumulate_vtbl_inits): Likewise.
20157 (accumulate_vtbl_inits): New function.
20158 (finish_vtbls): Make sure that virtual bases come after
20159 non-virtual bases in the vtable group.
20160 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
20161 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20162 * search.c (struct vbase_info): Move definition.
20163 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20164 (unmarked_new_vtable_p): Likewise.
20165 (dfs_mark_vtable_path): Remove.
20166 (dfs_mark_new_vtable): Remove.
20167 (dfs_unmark_new_vtable): Likewise.
20168 (dfs_clear_search_slot): Likewise.
20169 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20170 (dfs_clear_vbase_slots): Likewise.
20171 (init_vbase_pointers): LIkewise.
20172
20173 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
20174
20175 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20176 SIZETYPE to a non-SIZETYPE.
20177
20178 2000-03-21 Mark Mitchell <mark@codesourcery.com>
20179
20180 * class.c (layout_virtual_bases): Adjust names in conditionally
20181 compiled code.
20182
20183 * class.c (record_base_offsets): New function.
20184 (layout_conflict_p): Likewise.
20185 (layout_nonempty_base_or_field): Use it.
20186 (layout_empty_base): New function.
20187 (build_base_field): Use it.
20188 (build_base_fields): Update comment.
20189 (layout_virtual_bases): Fold in a little code form
20190 layout_basetypes. Use layout_empty_base.
20191 (layout_basetypes): Remove.
20192 (end_of_class): New function.
20193 (layout_class_type): Use it. Adjust.
20194
20195 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20196 (fntype_p): Remove.
20197 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20198 comment.
20199 (dfs_skip_nonprimary_vbases_markedp): Likewise.
20200 * typeck.c (fntype_p): Remove.
20201
20202 * cp-tree.h (TI_SPEC_INFO): Remove.
20203 (CLASSTYPE_TI_SPEC_INFO): Likewise.
20204 * pt.c (process_partial_specialization): Likewise.
20205
20206 * class.c (build_base_field): Fix thinko in computation of binfo
20207 offsets.
20208
20209 * tree.c (mark_local_for_remap_p): Mark variables declared in
20210 TARGET_EXPRs as well.
20211
20212 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20213
20214 * typeck.c (require_complete_type, complete_type,
20215 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20216 build_array_ref, convert_arguments, pointer_diff,
20217 build_x_unary_op, build_unary_op, build_c_cast,
20218 build_modify_expr): Use COMPLETE_TYPE_P etc.
20219 * call.c (is_complete, convert_like_real,
20220 build_new_method_call): Likewise.
20221 * class.c (build_vbase_pointer_fields, check_bases,
20222 build_base_field, finish_struct_1, pushclass): Likewise.
20223 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20224 * decl.c (maybe_process_template_type_declaration, pushtag,
20225 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20226 layout_var_decl, check_initializer, cp_finish_decl,
20227 grokdeclarator, require_complete_types_for_parms,
20228 grok_op_properties, xref_tag, xref_basetypes,
20229 check_function_type): Likewise.
20230 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20231 * friend.c (do_friend): Likewise.
20232 * init.c (build_offset_ref): Likewise.
20233 * parse.y (structsp): Likewise.
20234 * pt.c (maybe_process_partial_specialization,
20235 tsubst_friend_function, instantiate_class_template, tsubst,
20236 do_type_instantiation, instantiate_pending_templates): Likewise.
20237 * repo.c (repo_get_id): Likewise.
20238 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20239 synthesize_tinfo_var, emit_support_tinfos): Likewise.
20240 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20241 * semantics.c (begin_class_definition): Likewise.
20242 * tree.c (build_cplus_method_type): Likewise.
20243 * typeck2.c (digest_init, build_functional_cast,
20244 add_exception_specifier): Likewise.
20245 * parse.h, parse.c: Regenerated.
20246
20247 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20248
20249 * inc/cxxabi.h: New header file. Define new-abi entry points.
20250 (__pointer_type_info::target): Rename member to ...
20251 (__pointer_type_info::type): ... here.
20252 (__base_class_info::type): Rename member to ...
20253 (__base_class_info::base): ... here.
20254 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20255 * cp-tree.h (CPTI_ABI): New global tree enumeration.
20256 (abi_node): New global tree node.
20257 * decl.c (abi_node): Document.
20258 (init_decl_processing): Initialize abi_node.
20259 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20260 (get_vmi_pseudo_type_info): Likewise.
20261 (create_tinfo_types): Likewise.
20262 (emit_support_tinfos): Likewise.
20263 * tinfo.h (cxxabi.h): Include for new-abi.
20264 Move rtti class definitions to new header file.
20265 * tinfo.cc (abi): Use the namespace.
20266 (std): Move new abi rtti classes from here ...
20267 (__cxxabiv1): ... to here.
20268 * tinfo2.cc (cxxabi.h): Include for new-abi.
20269 Move rtti class definitions to new header file.
20270 (std): Move new abi rtti classes from here ...
20271 (__cxxabiv1): ... to here.
20272 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20273 namespace.
20274
20275 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20276 Jason Merrill <jason@casey.cygnus.com>
20277
20278 * method.c (build_overload_int): Use host_integerp.
20279
20280 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20281
20282 * init.c (build_offset_ref): Handle the case of a templated member
20283 function.
20284
20285 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20286
20287 * except.c (expand_exception_blocks): Clear catch_clauses_last.
20288
20289 2000-03-18 Mark Mitchell <mark@codesourcery.com>
20290
20291 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20292 * class.c (check_bitfield_decl): Turn illegal bitfields into
20293 non-bitfields.
20294 (dfs_propagate_binfo_offsets): Adjust for new size_binop
20295 semantics.
20296 (dfs_offset_for_unshared_vbases): Likewise.
20297 * cvt.c (cp_convert_to_pointer): Convert NULL to a
20298 pointer-to-member correctly under the new ABI.
20299 * expr.c (cplus_expand_constant): Don't use cp_convert when
20300 turning an offset into a pointer-to-member.
20301 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20302 when dereferencing them under the new ABI.
20303 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20304 of pointers-to-members under the new ABI.
20305
20306 * class.c (check_bitfield_decl): Remove restriction on really long
20307 bitfields.
20308 (layout_class_type): Implement new ABI handling of bitfields
20309 longer than their types.
20310
20311 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20312
20313 * parse.y (extdefs): Call ggc_collect.
20314 * parse.c: Regenerated.
20315
20316 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
20317
20318 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20319 (note_name_declared_in_class): Use OVL_CURRENT to get at a
20320 potential overload.
20321
20322 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20323
20324 * class.c (build_vbase_path): Use integer_zerop.
20325 (build_vtable_entry): Use tree_low_cst.
20326 (get_vfield_offset): Use bit_position.
20327 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20328 Use tree_low_cst.
20329 (check_bitfield_decl): Set DECL_SIZE using convert.
20330 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20331 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20332 Use tree_low_cst.
20333 (finish_struct_1): Use bit_position.
20334 (dump_class_hierarchy): Use tree_low_cst.
20335 * cp-tree.h (min_precision): Add declaration.
20336 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20337 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20338 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20339 * expr.c (cplus_expand_constant): Use bit_position.
20340 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20341 * rtti.c (get_base_offset): Use bit_position.
20342 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20343 host_integerp, and tree_low_cst.
20344 (pointer_int_sum): Use integer_zerop.
20345 (build_component_addr): Use bit_position.
20346
20347 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
20348
20349 * typeck.c (require_complete_type): Don't assume size_zero_node.
20350 (complete_type_or_else): Likewise.
20351
20352 2000-03-16 Steven Grady <grady@digitaldeck.com>
20353 Jason Merrill <jason@casey.cygnus.com>
20354
20355 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20356
20357 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
20358
20359 * decl2.c (grokfield): Bail out if type is error_mark_node.
20360
20361 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20362
20363 * tinfo2.cc (__ptr_to_member_data): Rename to ...
20364 (__pointer_to_member_data): ... here. Adjust.
20365 * rtti.c (create_tinfo_types): Adjust.
20366
20367 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20368
20369 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20370 * decl.c (ref_desc_type_node): Undocument.
20371 * rtti.c (ptr_ref_initializer): Rename to ...
20372 (ptr_initializer): ... here. Adjust comments.
20373 (ptmd_initializer): Fix comment thinko.
20374 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20375 (create_tinfo_types): Remove ref_desc_type_node init.
20376 * tinfo2.cc (__reference_type_info): Remove.
20377
20378 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20379
20380 * decl.c (cp_finish_decl): Remove obsolete comment.
20381
20382 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20383
20384 2000-03-14 Mark Mitchell <mark@codesourcery.com>
20385
20386 * cp-tree.h: Tweak documentation.
20387 * class.c (build_vbase_pointer_fields): Layout the fields, too.
20388 (avoid_overlap): Remove.
20389 (get_binfo_offset_as_int): New function.
20390 (dfs_serach_base_offsets): Likewise.
20391 (layout_nonempty_base_or_field): Likewise.
20392 (build_base_field): Layout fields here. Avoid placing two objects
20393 of the same type at the same address, under the new ABI.
20394 (build_base_fields): Adjust accordingly.
20395 (create_vtable_ptr): Return the new field, but don't attach it to
20396 TYPE_FIELDS.
20397 (remove_base_field): Remove.
20398 (remove_base_fields): Remove.
20399 (layout_basetypes): Adjust accordingly.
20400 (layout_class_type): Call layout_field for each field, rather than
20401 just making a wholesale call to layout_type.
20402
20403 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
20404
20405 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20406
20407 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
20408
20409 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20410
20411 * except.c (dtor_nothrow): New fn.
20412 (do_pop_exception): Use it. Take type parm.
20413 (push_eh_cleanup): Take type parm.
20414 (expand_start_catch_block): Pass it.
20415 (build_eh_type_type_ref): Accept null type.
20416
20417 2000-03-12 Mark Mitchell <mark@codesourcery.com>
20418
20419 * cp-tree.h (revert_static_member_fn): Change prototype.
20420 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20421 (grok_op_properties): Likewise.
20422 (start_function): Likewise.
20423 (revert_static_member_fn): Simplify.
20424 * pt.c (check_explicit_specialization): Adjust call to
20425 revert_static_member_fn.
20426
20427 2000-03-11 Mark Mitchell <mark@codesourcery.com>
20428
20429 * cp-tree.h (scope_kind): New type.
20430 (tmpl_spec_kind): Likewise.
20431 (declare_pseudo_global_level): Remove.
20432 (pseudo_global_level_p): Rename to template_parm_scope_p.
20433 (pushlevel): Remove declaration.
20434 (begin_scope): New function.
20435 (finish_scope): Likewise.
20436 (current_tmpl_spec_kind): Likewise.
20437 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20438 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
20439 Add template_spec_p.
20440 (toplevel_bindings_p): Adjust.
20441 (declare_pseudo_global_level): Remove.
20442 (pseudo_global_level_p): Rename to template_parm_scope_p.
20443 (current_tmpl_spec_kind): New function.
20444 (begin_scope): Likewise.
20445 (finish_scope): Likewise.
20446 (maybe_push_to_top_level): Adjust.
20447 (maybe_process_template_type_declaration): Likewise.
20448 (pushtag): Likewise.
20449 (pushdecl_nonclass_level): Likewise.
20450 (lookup_tag): Likewise.
20451 (grokfndecl): Handle member template specializations. Share
20452 constructor and non-constructor code.
20453 * decl2.c (check_classfn): Handle member template specializations.
20454 * pt.c (begin_template_parm_list): Use begin_scope.
20455 (begin_specialization): Likewise.
20456 (end_specialization): Likewise.
20457 (check_explicit_specialization): Use current_tmpl_spec_kind.
20458 Handle member template specializations.
20459 (end_template_decl): Use finish_scope. Remove call to
20460 get_pending_sizes.
20461 (push_template_decl_real): Remove bogus error message.
20462 (tsubst_decl): Fix typo in code contained in comment.
20463 (instantiate_template): Handle member template specializations.
20464 (most_general_template): Likewise.
20465
20466 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
20467
20468 * lex.c (whitespace_cr): Compress consecutive calls to warning().
20469 (do_identifier): Ditto for error().
20470
20471 * pt.c (convert_nontype_argument): Ditto for cp_error().
20472 (convert_template_argument): Ditto for cp_pedwarn().
20473
20474 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
20475
20476 * exception.cc (__check_null_eh_spec): New fn.
20477 * except.c (expand_end_eh_spec): Call it if the spec is throw().
20478
20479 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20480
20481 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20482 * except.c (expand_end_eh_spec): Add the return type.
20483 * rtti.c (throw_bad_cast): Add the parmtypes.
20484 (throw_bad_typeid): Likewise.
20485
20486 * semantics.c (expand_stmt): Only leave out rtl for unused
20487 artificials, and set DECL_IGNORED_P on them as well.
20488 * decl.c (wrapup_globals_for_namespace): Likewise.
20489
20490 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
20491
20492 * decl.c (maybe_commonize_var): Skip all artificial decls.
20493 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20494
20495 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20496
20497 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20498 * cp-tree.h: Declare flag_enforce_eh_specs.
20499 * decl.c (store_parm_decls, finish_function): Check it.
20500
20501 C library functions don't throw.
20502 * Makefile.in (cfns.h): New target.
20503 (except.o): Depend on it.
20504 * Make-lang.in (cc1plus): Depend on cfns.gperf.
20505 * cfns.gperf: New file.
20506 * cfns.h: Generated.
20507 * except.c: Include it.
20508 (nothrow_libfn_p): New fn.
20509 * decl.c (grokfndecl): Use it.
20510 * cp-tree.h: Declare it.
20511
20512 * decl.c (push_overloaded_decl_1, auto_function,
20513 define_function): Lose.
20514 (build_library_fn_1): New static fn.
20515 (builtin_function): Use it.
20516 (get_atexit_node): Use build_library_fn_ptr.
20517 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20518 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20519 push_void_library_fn, push_throw_library_fn): New fns.
20520 * cp-tree.h: Declare them.
20521 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20522 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20523 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20524 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20525 * rtti.c (build_runtime_decl): Lose.
20526 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20527 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20528 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20529
20530 * call.c (build_call): Remove result_type parm.
20531 Call mark_used on unused artificial fns.
20532 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20533
20534 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
20535
20536 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20537 appropriate.
20538 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20539 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20540 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20541 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20542 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20543 expand_generic_desc): Likewise.
20544
20545 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20546
20547 * exception.cc (__cp_pop_exception): Cleanup the original object.
20548
20549 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20550
20551 * decl.c (grok_op_properties): Merge conversion to void warning
20552 with other silly op warnings.
20553
20554 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
20555
20556 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20557 array CONSTRUCTOR elements. Don't use expr_tree_cons.
20558
20559 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20560
20561 * decl.c (cp_make_fname_decl): New function.
20562 (wrapup_globals_for_namespace): Don't emit unused static vars.
20563 (init_decl_processing): Remove comment about use of
20564 array_domain_type. Set make_fname_decl.
20565 (cp_finish_decl): Remove __FUNCTION__ nadgering.
20566 * semantics.c (begin_compound_stmt): Remove
20567 current_function_name_declared flagging.
20568 (expand_stmt): Don't emit unused local statics.
20569 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20570 specially.
20571
20572 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20573
20574 * typeck.c (convert_for_assignment): Don't look at array
20575 initializer.
20576 * call.c (convert_like_real): Likewise.
20577
20578 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
20579
20580 Add initial support for '\uNNNN' specifier.
20581 * lex.c (read_ucs): New fn.
20582 (readescape, skip_white_space): Call it.
20583 (is_extended_char, is_extended_char_1): New fns.
20584 (utf8_extend_token): New fn, #if 0'd out.
20585 (real_yylex): Treat extended chars like letters.
20586
20587 * search.c (note_debug_info_needed): Walk the bases even if we
20588 weren't deferring the type itself.
20589
20590 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20591
20592 * decl2.c (finish_objects): Constify a char*.
20593
20594 * method.c (emit_thunk): Likewise.
20595
20596 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
20597
20598 * typeck.c (dubious_conversion_warnings): Look through
20599 REFERENCE_TYPE.
20600
20601 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20602
20603 * class.c (dfs_modify_vtables): I is now unsigned.
20604 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20605 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20606 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20607 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20608 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20609 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20610 Call integer_all_onesp.
20611 * typeck2.c (process_init_constructor): Use compare_tree_int.
20612
20613 * lang-specs.h (as): Don't call if -syntax-only.
20614
20615 2000-03-06 Mark Mitchell <mark@codesourcery.com>
20616
20617 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20618 RTL_EXPR_HAS_NO_SCOPE after all.
20619
20620 2000-03-05 Mark Mitchell <mark@codesourcery.com>
20621
20622 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20623 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
20624 RTL_EXPR_HAS_NO_SCOPE.
20625
20626 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20627 later.
20628
20629 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20630
20631 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
20632
20633 * call.c (convert_like): Macrofy.
20634 (convert_like_with_context): New macro.
20635 (convert_like_real): Renamed from convert_like. Add calling
20636 context parameters, for diagnostics. Add recursive flag. Call
20637 dubious_conversion_warnings for outer conversion.
20638 (build_user_type_conversion): Use convert_like_with_context.
20639 (build_over_call): Likewise. Don't warn about dubious
20640 conversions here. Adjust convert_default_arg calls.
20641 (convert_default_arg): Add context parameters for diagnostics.
20642 Pass through to convert_like_with_context.
20643 * cp-tree.h (convert_default_arg): Add context parameters.
20644 (dubious_conversion_warnings): Prototype new function.
20645 * typeck.c (convert_arguments): Adjust convert_default_arg call.
20646 (dubious_conversion_warnings): New function, broken
20647 out of convert_for_assignment.
20648 (convert_for_assignment): Adjust.
20649
20650 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
20651
20652 * decl2.c (key_method): Break out from...
20653 (import_export_vtable, import_export_class): ...here.
20654
20655 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20656 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20657
20658 * search.c (note_debug_info_needed, dfs_debug_mark,
20659 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
20660 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20661
20662 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
20663
20664 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20665 typos.
20666
20667 2000-03-02 Mark Mitchell <mark@codesourcery.com>
20668
20669 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20670 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20671 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20672 (lang_type): Split gets_new into has_new and has_array_new.
20673 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20674 (TYPE_GETS_NEW): Split into ...
20675 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20676 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20677 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20678 (build_op_new_call): Don't declare.
20679 (build_new_1): Likewise.
20680 * call.c (build_op_new_call): Remove.
20681 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20682 instead of TYPE_NEEDS_DESTRUCTOR.
20683 (finish_struct_bits): Likewise.
20684 (add_implicitly_declared_members): Likewise.
20685 (check_field_decl): Likewise.
20686 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20687 correctly under the new ABI.
20688 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20689 instead of TYPE_NEEDS_DESTRUCTOR.
20690 (initialize_local_var): Likewise.
20691 (destroy_local_var): Likewise.
20692 (cp_finish_decl): Likewise.
20693 (register_dtor_fn): Likewise.
20694 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20695 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
20696 TYPE_VEC_DELETE_TAKES_SIZE here.
20697 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20698 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20699 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20700 (finish_destructor_body): Likewise.
20701 (maybe_build_cleanup_1): Likewise.
20702 * decl2.c (do_static_destruction): Likewise.
20703 * init.c (build_new_1): Make it static.
20704 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20705 (expand_cleanup_for_base): Likewise.
20706 (get_cookie_size): New function.
20707 (build_new_1): Handle array-new cookies correctly under the new
20708 ABI.
20709 (build_vec_delete_1): Likewise.
20710 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20711 (build_delete): Likewise.
20712 (build_vec_delete): Handle array-new cookies correctly under the new
20713 ABI.
20714 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20715 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20716 TYPE_HAS_ARRAY_NEW_OPERATOR.
20717 * ptree.c (print_lang_type): Check them.
20718 * search.c (context_for_name_lookup): Fix typo in comment.
20719 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20720 * tree.c (break_out_cleanups): Likewise.
20721 (build_cplus_array_test_1): Likewise.
20722 (cp_build_qualified_type_real): Likewise.
20723 * typeck.c (complete_type): Likewise.
20724
20725 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20726 the command-line, not the end.
20727
20728 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
20729
20730 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20731
20732 2000-03-02 Tom Tromey <tromey@cygnus.com>
20733
20734 * cp-tree.h (build_java_class_ref): Declare.
20735 * init.c (build_java_class_ref): No longer static.
20736 * except.c (expand_throw): Generate a Java-style `throw' if the
20737 thrown object is a "Java" object.
20738 (initialize_handler_parm): Generate a Java-style lookup of
20739 exception info if the caught object is a "Java" object.
20740 (catch_language, catch_language_init): New globals.
20741 (decl_is_java_type): New function.
20742 (expand_start_catch_block): Don't call push_eh_info() or
20743 push_eh_cleanup() when handling a Java-style "catch". Pass Java
20744 class reference to build_catch_block.
20745
20746 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20747
20748 * typeck.c (comptypes): Treat sizetype like its language equivalent.
20749
20750 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
20751
20752 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20753 to merge reference/pointer code and fix incorrect warnings.
20754
20755 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
20756
20757 * search.c (protected_accessible_p): Use context_for_name_lookup.
20758
20759 * init.c (construct_virtual_bases): Fix thinko.
20760 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20761
20762 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
20763
20764 * decl.c (current_function_decl): Move to toplev.c.
20765
20766 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
20767
20768 * pt.c (fn_type_unification): Unify return type, whenever
20769 provided.
20770 (get_bindings_real): Only pass return type when necessary.
20771 Remove explicit return type check.
20772 * class.c (resolve_address_of_overloaded_function): Pass desired
20773 return type to fn_type_unification.
20774
20775 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20776
20777 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20778 DECL_FIELD_SIZE.
20779 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20780 DECL_FIELD_SIZE.
20781 * rtti.c (expand_class_desc): Likewise.
20782 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20783 (THUNK_VCALL_OFFSET): Likewise.
20784 (THUNK_DELTA): Reflect changes in ../tree.h.
20785
20786 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
20787
20788 * search.c (protected_accessible_p): Also allow the access if
20789 the member is public in DERIVED. Lose TYPE parm.
20790 (friend_accessible_p): Lose TYPE parm.
20791 (accessible_p): Adjust.
20792
20793 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20794
20795 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20796 on things that are not sizes; ssize_binop deleted.
20797 Call size_diffop when appropriate.
20798 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20799 (build_primary_vtable, build_secondary_vtable): Likewise.
20800 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20801 Variable I is HOST_WIDE_INT.
20802 (get_vfield_offset): Pass proper types to size_binop.
20803 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20804 (finish_struct_1): Likewise.
20805 (skip_rtti_stuff): Arg N is now pointer to signed.
20806 (layout_class_type): Use size_zero_node.
20807 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20808 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20809 * decl.c (complete_arry_type): Pass proper types to size_binop.
20810 (xref_basetypes): BINFO_OFFSET is sizetype.
20811 * error.c (dump_expr): Don't use size_binop non-sizes.
20812 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20813 * init.c (construct_virtual_bases): Fix type error.
20814 (build_vec_delete_1): Pass proper type to size_binop and don't
20815 fold result.
20816 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20817 * rtti.c (get_base_offset): Pass proper type to size_binop.
20818 * search.c (dfs_find_vbases): Fix type error.
20819 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20820 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20821 * tree.c (debug_binfo): Variable N is signed.
20822 Use HOST_WIDE_INT_PRINT_DEC.
20823 * typeck.c (comptypes): sizetype is same as equivalent integer type.
20824 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20825 size_one_node and size_zero_node.
20826 (c_alignof): Use size_one_node.
20827 (build_component_addr): Pass proper types to size_binop.
20828 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20829
20830 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
20831
20832 Implement class scope using-declarations for functions.
20833 * class.c (handle_using_decl): Call add_method for used functions.
20834 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20835 (add_method): Used functions are hidden by local functions.
20836 (check_bases_and_members): Handle using-decls before finalizing
20837 CLASSTYPE_METHOD_VEC.
20838 * call.c (add_function_candidate): Add ctype parm; if nonzero,
20839 override the type of 'this' accordingly.
20840 (add_template_candidate, add_template_candidate_real): Add ctype parm.
20841 (convert_class_to_reference, build_user_type_conversion_1,
20842 build_new_function_call, build_object_call, build_new_op,
20843 build_new_method_call): Pass ctype parm.
20844
20845 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20846 the baselink.
20847 * call.c (convert_class_to_reference, build_user_type_conversion_1,
20848 build_new_function_call, build_object_call, build_new_op,
20849 build_new_method_call, build_op_delete_call): Don't get basetype_path
20850 from a baselink.
20851 * typeck.c (build_component_ref): Likewise.
20852 * init.c (build_offset_ref): Likewise.
20853 (resolve_offset_ref): Don't call enforce_access.
20854 Call build_scoped_ref.
20855 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
20856 would cause an error or if -pedantic.
20857 * class.c (alter_access): Lose binfo parm.
20858
20859 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20860
20861 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20862 types.
20863
20864 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
20865
20866 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20867 pseudo_type_info creation into the std namespace
20868
20869 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20870
20871 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20872 (import_export_class): Remove declaration.
20873 * decl2.c (import_export_class): Make it static.
20874 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20875 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20876 EXPR_WITH_FILE_LOCATION.
20877 * lex.c (check_newline): Tweak filename/lineno setting.
20878 * semantics.c (begin_while_stmt): Fix typo in comment.
20879
20880 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20881
20882 * lang-options.h (-fmessage-length=): Add missing option.
20883
20884 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20885
20886 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
20887
20888 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20889
20890 2000-02-25 Jim Wilson <wilson@cygnus.com>
20891
20892 * optimize.c (expand_call_inline): Emit the return label before
20893 evaluating the return value.
20894
20895 2000-02-24 Mark Mitchell <mark@codesourcery.com>
20896
20897 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20898 than duplicating functionality here.
20899 * optimize.c: Include input.h.
20900 (expand_call_inline): Use push_srcloc and pop_srcloc.
20901 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20902 * parse.c: Regenerated.
20903 * Makefile.in (lex.o): Depend on input.h.
20904 (optimize.o): Likewise.
20905
20906 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
20907
20908 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20909 function type, rather than ICE.
20910
20911 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
20912
20913 * decl.c (grokdeclarator): Call decl_type_access_control.
20914 * parse.y (parse_end_decl): Don't call decl_type_access_control if
20915 decl is null.
20916
20917 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
20918
20919 * decl.c (decls_match): Remove obsolete static member nadgering.
20920
20921 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20922
20923 * decl.c (grokdeclarator): Change ANSI to ISO.
20924 * lex.c (consume_string, readescape, do_identifier): Likewise.
20925 (parse_float, real_yylex): Likewise.
20926 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20927 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20928 new_type_id, maybe_label_decls, simple_stmt,
20929 for.init.statement): Likewise.
20930 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20931 * semantics.c (finish_named_return_value): Likewise.
20932 * parse.c: Regenerate.
20933
20934 2000-02-21 Mark Mitchell <mark@codesourcery.com>
20935
20936 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20937 (CPTI_CLASS_STAR_TYPE): Remove.
20938 (vtable_index_type): Likewise.
20939 (class_star_type_node): Remove.
20940 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20941 (build_binary_op_nodefault): Remove.
20942 * call.c (build_new_op): Use build_binary_op instead of
20943 build_binary_op_nodefault.
20944 * decl.c (init_decl_processing): Remove class_star_type_node
20945 initialization. Make delta_type_node ptrdiff_type_node under the
20946 new ABI. Initialize vtable_index_type.
20947 (build_ptrmemfunc_type): Build different structures for the new
20948 ABI.
20949 (build_enumerator): Use build_binary_op instead of
20950 build_binary_op_nodefault.
20951 * method.c (build_overload_value): Mangle pointers-to-members
20952 appropriately under the new ABI.
20953 * typeck.c (build_array_ref): Use build_binary_op instead of
20954 build_binary_op_nodefault.
20955 (get_member_function_from_ptrfunc): Adjust for the new ABI.
20956 (build_binary_op_nodefault): Rename to ...
20957 (build_binary_op): ... this. Remove old version. Adjust for
20958 pointer-to-member comparisons under the new ABI.
20959 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
20960 (build_ptrmemfunc): Adjust for the new ABI.
20961 (expand_ptrmemfunc_cst): Likewise.
20962 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20963 (pfn_from_ptrmemfunc): Adjust for the new ABI.
20964
20965 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
20966
20967 * call.c (build_object_call): Compress consecutive calls to
20968 cp_error.
20969 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20970 (build_op_delete_call): Adjust message formatting.
20971
20972 * class.c (check_bases): Compress consecutive calls to
20973 cp_pedwarn.
20974 (finish_struct_anon): Say 'ISO C++'.
20975
20976 * decl.c (start_decl): Same here.
20977 (grok_reference_init): Likewise.
20978 (grokfndecl): Correct message formatting.
20979 (grokfndecl): Improve diagnostic.
20980 (check_static_variable_definition): Likewise. Say 'ISO C++'
20981 (compute_array_index_type): Say 'ISO C++'
20982 (create_array_type_for_decl): Compress consecutive calls to
20983 cp_error.
20984 (grokdeclarator): Say 'ISO C++'
20985 (grok_op_properties): Likewise.
20986
20987 * decl2.c (delete_sanity): Clairify diagnostic.
20988 (check_member_template): Same here.
20989 (grok_function_init): Use consistent terminology.
20990
20991 * expr.c (do_case): Say 'ISO C++'
20992
20993 * friend.c (do_friend): Compress consecutive calls to warning.
20994
20995 2000-02-20 Mark Mitchell <mark@codesourcery.com>
20996
20997 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20998 * class.c (build_secondary_vtable): Reorganize. Don't create a
20999 new vtable under the new ABI.
21000 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
21001 computing the size.
21002 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
21003 the initializing elements.
21004 (initialize_vtable): New function.
21005 (dfs_finish_vtbls): Use it.
21006 (dfs_accumulate_vtbl_inits): New function.
21007 (finish_vtbls): Merge primary and secondary vtables under the new
21008 ABI.
21009 (finish_struct_1): Remove redundant call to layout_vtable_decl.
21010 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
21011 aren't VAR_DECLs.
21012
21013 * class.c (build_vtable): New function, split out from ...
21014 (get_vtable_decl): ... here, and ...
21015 (build_secondary_vtable): ... here.
21016
21017 * pt.c (tsubst_decl): Fix formatting.
21018
21019 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
21020
21021 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
21022 (avoid_overlap, build_base_field): Likewise.
21023 (build_base_field, build_base_fields, is_empty_class):
21024 Test DECL_SIZE with integer_zero.
21025 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
21026 * cp-tree.h (struct lang_type): New field size_unit.
21027 (CLASSTYPE_SIZE_UNIT): New macro.
21028 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
21029 (cp_finish_decl): Delete -Wlarger-than processing.
21030 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
21031 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
21032 * tree.c (make_binfo): binfo vector is one entry longer.
21033 (walk_tree): Walk DECL_SIZE_UNIT.
21034
21035 2000-02-19 Mark Mitchell <mark@codesourcery.com>
21036
21037 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
21038 comment.
21039 (build_vtable_entry): Don't assume all vtable entries are
21040 functions.
21041 (build_vtbl_initializer): Adjust accordingly.
21042 (get_vtable_decl): Fix formatting.
21043
21044 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
21045
21046 * semantics.c (deferred_type_access_control): Walk the entire
21047 type_lookups list.
21048 (save_type_access_control): Rename from
21049 initial_deferred_type_access_control. Just remember the value.
21050 (decl_type_access_control): New fn.
21051 (begin_function_definition): Use deferred_type_access_control, after
21052 we've started the function. Set type_lookups to error_mark_node.
21053 * parse.y (frob_specs, fn.def1): Adjust.
21054 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
21055 (parse_end_decl, parse_bitfield0, parse_method): New fns.
21056 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
21057 (after_type_component_declarator0): Likewise.
21058 (after_type_component_declarator): Likewise.
21059 (notype_component_declarator): Likewise.
21060 * cp-tree.h: Adjust.
21061
21062 * decl.c (redeclaration_error_message): Allow redeclaration of
21063 namespace-scope decls.
21064
21065 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
21066
21067 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
21068
21069 2000-02-17 Mark Mitchell <mark@codesourcery.com>
21070
21071 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
21072 * decl2.c (grokclassfn): Likewise.
21073
21074 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
21075
21076 * decl2.c (lang_decode_option): Don't set default message length
21077 here.
21078 * lex.c (lang_init_options): Set it here.
21079
21080 2000-02-16 Mark Mitchell <mark@codesourcery.com>
21081
21082 Make DECL_CONTEXT mean the class in which a member function was
21083 declared, even for a virtual function.
21084 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
21085 (DECL_FRIEND_CONTEXT): New macro.
21086 (DECL_REAL_CONTEXT): Remove.
21087 (SET_DECL_FRIEND_CONTEXT): Likewise.
21088 (DECL_VIRTUAL_CONTEXT): Adjust.
21089 (DECL_CLASS_SCOPE_P): Use TYPE_P.
21090 (add_friends): Remove.
21091 (hack_decl_function_context): Likewise.
21092 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
21093 CP_DECL_CONTEXT.
21094 (build_over_call): Fix indentation. Use DECL_CONTEXT
21095 instead of DECL_CLASS_CONTEXT.
21096 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
21097 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21098 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21099 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
21100 (build_base_field): Likewise.
21101 (finish_struct_1): Likewise.
21102 (build_self_reference): Likewise.
21103 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
21104 DECL_REAL_CONTEXT.
21105 (pushtag): Use decl_function_context, not
21106 hack_decl_function_context.
21107 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21108 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
21109 (pushdecl): Remove bogus code.
21110 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
21111 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21112 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21113 Use decl_function_context, nothack_decl_function_context.
21114 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
21115 (grokdeclarator): Likewise. Use decl_function_context, not
21116 hack_decl_function_context.
21117 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
21118 (start_function): Use DECL_FRIEND_CONTEXT, not
21119 DECL_CLASS_CONTEXT. Use decl_function_context, not
21120 hack_decl_function_context.
21121 (finish_function): Use decl_function_context, not
21122 hack_decl_function_context.
21123 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
21124 DECL_CLASS_CONTEXT.
21125 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
21126 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
21127 (grokfield): Likewise.
21128 (finish_builtin_type): Likewise.
21129 (finish_vtable_vardec): Use decl_function_context, not
21130 hack_decl_function_context.
21131 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21132 (start_static_initialization_or_destruction): Likewise.
21133 (finish_static_initialization_or_destruction): Likewise.
21134 (mark_used): Adjust logic for deciding when to synthesize methods.
21135 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
21136 DECL_REAL_CONTEXT.
21137 * error.c (dump_function_decl): Use DECL_CONTEXT, not
21138 DECL_CLASS_CONTEXT.
21139 * friend.c (is_friend): Likewise.
21140 (add_friends): Remove.
21141 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
21142 * lex.c (begin_definition_of_inclass_inline): Use
21143 decl_function_context, not hack_decl_function_context.
21144 (process_next_inline): Likewise.
21145 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21146 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
21147 DECL_CLASSS_CONTEXT.
21148 (hack_identifier): Likewise.
21149 (synthesize_method): Use decl_function_context, not
21150 hack_decl_function_context.
21151 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
21152 DECL_REAL_CONTEXT.
21153 (is_member_template): Use decl_function_context, not
21154 hack_decl_function_context. Use DECL_CONTEXT, not
21155 DECL_CLASS_CONTEXT.
21156 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
21157 DECL_CLASS_CONTEXT.
21158 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
21159 DECL_REAL_CONTEXT.
21160 (push_template_decl_real): Likewise.
21161 (instantiate_class_template): Don't call add_friends.
21162 (tsubst_default_argument): Use DECL_CONTEXT, not
21163 DECL_REAL_CONTEXT.
21164 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21165 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21166 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
21167 DECL_CLASS_CONTEXT.
21168 * repo.c (repo_inline_used): Likewise.
21169 * search.c (current_scope): Adjust for new _CONTEXT macros.
21170 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21171 DECL_REAL_CONTEXT.
21172 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21173 (lookup_fnfields_here):Likewise.
21174 (check_final_overrider): Likewise.
21175 (init_vbase_pointers): Likewise.
21176 (virtual_context): Likewise.
21177 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21178 (expand_body): Use decl_function_context, not
21179 hack_decl_function_context.
21180 * tree.c (hack_decl_function_context): Remove.
21181 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21182 DECL_CLASS_CONTEXT.
21183 * typeck2.c (error_not_base_type): Likewise.
21184
21185 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
21186
21187 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21188
21189 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21190
21191 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21192
21193 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
21194
21195 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21196
21197 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
21198
21199 * decl2.c (lang_decode_option): Enable automatic line wrapping.
21200
21201 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
21202
21203 * parse.y (frob_specs): Split out...
21204 (parse_decl): From here.
21205 (fn.def2): Call initial_deferred_type_access_control.
21206 (after_type_component_declarator0): Call frob_specs.
21207 (notype_component_declarator0): Likewise.
21208 * search.c (friend_accessible_p): Nested classes are friends of their
21209 enclosing classes.
21210
21211 2000-02-10 Mark Mitchell <mark@codesourcery.com>
21212
21213 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21214 used to create an implicit temporary.
21215
21216 * class.c (dfs_modify_vtables): Tweak calculation of functions to
21217 override.
21218
21219 2000-02-08 Nathan Sidwell <nathan@acm.org>
21220
21221 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21222 strip array element qualifiers too.
21223
21224 2000-02-07 Mark Mitchell <mark@codesourcery.com>
21225
21226 * decl.c (store_parm_decls): Don't build cleanups for parameters
21227 while processing_template_decl.
21228
21229 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
21230
21231 * cp-tree.h (struct saved_scope): Add incomplete field.
21232 (namespace_scope_incomplete): New macro.
21233 * decl.c (pushdecl): Use it.
21234 (hack_incomplete_structures): Use it. See through artificial
21235 binding levels.
21236 (mark_saved_scope): Mark it.
21237
21238 Implement access control for nested types.
21239 * search.c (type_access_control): New fn.
21240 (accessible_p): Now we do perform access control for types.
21241 * semantics.c (deferred_type_access_control): New fn.
21242 (initial_deferred_type_access_control): New fn.
21243 (begin_function_definition): Call it. Add lookups parm.
21244 * decl.c (struct binding_level): Add this_class field.
21245 (pushlevel_class): Set it.
21246 (mark_binding_level): Mark it.
21247 (lookup_name_real): Use it. Call type_access_control.
21248 (mark_saved_scope): Mark lookups field.
21249 * cp-tree.h (flagged_type_tree): Add lookups field.
21250 (struct saved_scope): Add lookups field.
21251 (type_lookups): New macro.
21252 * parse.y (declmods): Now <ftype>.
21253 (parse_decl): Add lookups parm. Call
21254 initial_deferred_type_access_control.
21255 (lang_extdef): Clear type_lookups.
21256 (typed_declspecs, declmods, typespec): Set lookups field.
21257 (initdcl): Call deferred_type_access_control.
21258 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21259 component_decl_1, named_parm): Adjust.
21260 * friend.c (is_friend): Nested classes are friends of their
21261 enclosing classes.
21262
21263 * class.c (currently_open_derived_class): New fn.
21264 * method.c (hack_identifier): Use it.
21265
21266 * lex.c (do_identifier): Remove obsolete code.
21267
21268 * parse.y (typed_typespecs): Propagate new_type_flag properly.
21269
21270 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
21271
21272 * tinfo.h: Remove apostrophes from C++ comment (xgettext
21273 thinks this file is plain C).
21274
21275 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21276
21277 * Makefile.in (call.o): Depend on $(EXPR_H).
21278
21279 * call.c: Include "expr.h".
21280
21281 * class.c (dump_class_hierarchy): Add prototype.
21282
21283 * search.c (dfs_get_pure_virtuals): Likewise.
21284
21285 2000-02-1 Ulrich Drepper <drepper@redhat.com>
21286
21287 * parse.y (simple_stmt): Allow :: token in asm parameter list.
21288 * parse.c: Rebuilt.
21289
21290 2000-01-31 Jim Wilson <wilson@cygnus.com>
21291
21292 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21293 Store it in DECL_FCONTEXT.
21294 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21295
21296 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
21297
21298 * tinfo.h (old abi): #include "tconfig.h".
21299 * tinfo.cc (convert_to_base): Move into old abi section.
21300
21301 2000-01-31 Mark Mitchell <mark@codesourcery.com>
21302
21303 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21304 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21305 (BINFO_PRIMARY_BINFO): New macro.
21306 (BF_DELTA): Rename to ...
21307 (BV_DELTA): ... this.
21308 (BF_VCALL_INDEX): Rename to ...
21309 (BV_VCALL_INDEX): ... this.
21310 (BF_FN): Rename to ...
21311 (BV_FN): ... this.
21312 * class.c (build_vbase_path): Adjust for changes to reverse_path.
21313 (set_rtti_entry): Rename BF_ macros to BV_ variants.
21314 (modify_vtable_entry): Simplify.
21315 (add_virtual_function): Rename BF_ macros to BV_ variants.
21316 (build_vtable_initializer): Likewise.
21317 (get_class_offset_1): Remove.
21318 (dfs_get_class_offset): Likewise.
21319 (get_class_offset): Likewise.
21320 (dfs_find_final_overrider): New function.
21321 (find_final_overrider): Likewise.
21322 (modify_one_vtable): Remove.
21323 (dfs_find_base): New function.
21324 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
21325 find_final_overrider.
21326 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
21327 virtuals.
21328 (dfs_fixup_vtable_deltas): Remove.
21329 (override_one_vtable): Remove.
21330 (merge_overrides): Likewise.
21331 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21332 unreal chilren of virtual bases.
21333 (finish_struct_1): Don't use merge_overrides. Don't use
21334 dfs_fixup_vtable_deltas.
21335 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21336 BINFOs.
21337
21338 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21339 Jason Merrill <jason@yorick.cygnus.com>
21340
21341 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21342
21343 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
21344
21345 * exception.cc (__throw_bad_typeid): Add missing std::.
21346
21347 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21348
21349 * cp-tree.h (make_thunk): PROTO -> PARAMS.
21350
21351 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
21352
21353 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21354
21355 Runtime support for new-abi rtti.
21356 * inc/typeinfo (type_info::operator!=): Define in class.
21357 (type_info::before, type_info::name, type_info::operator==,
21358 type_info::operator!=): Define new ABI implementations.
21359 (type_info::is_pointer_p, type_info::is_function_p): Declare
21360 new virtual functions.
21361 (type_info::do_catch, type_info::do_upcast): Likewise.
21362
21363 * tinfo.h (__base_class_info): Define new class.
21364 (__class_type_info): Likewise.
21365 (__si_class_type_info): Likewise.
21366 (__vmi_class_type_info): Likewise.
21367 (__dynamic_cast): Prototype.
21368
21369 * tinfo.cc: Conditionalize old and new rtti mechanisms.
21370 (type_info::is_pointer_p): Define new function.
21371 (type_info::is_function_p): Likewise.
21372 (type_info::do_catch): Likewise.
21373 (type_info::do_upcast): Likewise.
21374 (vtable_prefix): New structure for vtable access.
21375 (adjust_pointer): Define new template function.
21376 (contained_p, public_p, virtual_p, contained_public_p,
21377 contained_nonpublic_p, contained_nonvirtual_p): Define new
21378 functions.
21379 (nonvirtual_base_type): New local variable.
21380 (__class_type_info::~__class_type_info): Define.
21381 (__si_class_type_info::~__si_class_type_info): Likewise.
21382 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21383 (__class_type_info::do_catch): Define new function.
21384 (__class_type_info::do_upcast): Likewise.
21385 (__class_type_info::find_public_src): Likewise.
21386 (__class_type_info::do_find_public_src): Likewise.
21387 (__si_class_type_info::do_find_public_src): Likewise.
21388 (__vmi_class_type_info::do_find_public_src): Likewise.
21389 (__class_type_info::do_dyncast): Likewise.
21390 (__si_class_type_info::do_dyncast): Likewise.
21391 (__vmi_class_type_info::do_dyncast): Likewise.
21392 (__class_type_info::do_upcast): Likewise.
21393 (__si_class_type_info::do_upcast): Likewise.
21394 (__vmi_class_type_info::do_upcast): Likewise.
21395 (__dynamic_cast): Likewise.
21396
21397 * tinfo2.cc (__fundamental_type_info): Define new class.
21398 (__pointer_type_info): Likewise.
21399 (__reference_type_info): Likewise.
21400 (__array_type_info): Likewise.
21401 (__function_type_info): Likewise.
21402 (__enum_type_info): Likewise.
21403 (__ptr_to_member_type_info): Likewise.
21404 (__fundamental_type_info::~__fundamental_type_info): Define.
21405 (__pointer_type_info::~__pointer_type_info): Likewise.
21406 (__reference_type_info::~__reference_type_info): Likewise.
21407 (__array_type_info::~__array_type_info): Likewise.
21408 (__function_type_info::~__function_type_info): Likewise.
21409 (__enum_type_info::~__enum_type_info): Likewise.
21410 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21411 (__pointer_type_info::do_catch): Define new function.
21412 (__ptr_to_member_type_info::do_catch): Define new function.
21413
21414 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21415 (__is_pointer): Likewise.
21416
21417 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21418
21419 2000-01-30 Mark Mitchell <mark@codesourcery.com>
21420
21421 * cp/class.c (build_vtable): Rename to build_primary_vtable.
21422 (prepare_fresh_vtable): Rename to build_secondary_vtable.
21423 (make_new_vtable): New function.
21424 (modify_vtable_entry): Handle generation of new vtables correctly.
21425 (modify_one_vtable): Remove unused parameter.
21426 (dfs_fixup_vtable_deltas): Likewise.
21427 (override_one_vtable): Use build_secondary_vtable.
21428 (finish_struct_1): Use build_primary_vtable and
21429 build_secondary_vtable.
21430
21431 2000-01-28 Ulrich Drepper <drepper@redhat.com>
21432
21433 * cp/decl.c: Adjust variable names, comments, help strings.
21434
21435 2000-01-29 Nathan Sidwell <nathan@acm.org>
21436
21437 * new2.cc (operator delete[]): Use operator delete, don't assume
21438 implementation.
21439
21440 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
21441
21442 * class.c (build_vtbl_initializer): Add argument to
21443 build_vtable_entry call.
21444
21445 2000-01-27 Mark Mitchell <mark@codesourcery.com>
21446
21447 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21448 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21449 (BF_DELTA): New macro.
21450 (BF_VCALL_INDEX): Likewise.
21451 (BF_FN): Likewise.
21452 (THUNK_VCALL_OFFSET): Likewise.
21453 (make_thunk): Change prototype.
21454 * class.c (build_vtable_entry): Integrate
21455 build_vtable_entry_for_fn. Handle vcall indices.
21456 (build_vtable_entry_for_fn): Remove.
21457 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
21458 BF_VCALL_INDEX, BF_FN.
21459 (modify_vtable_entry): Integrate common code from
21460 modify_one_vtable and dfs_fixup_vtable_deltas.
21461 (add_virtual_function): Set BF_VCALL_INDEX.
21462 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
21463 and BF_FN.
21464 (modify_one_vtable): Simplify.
21465 (dfs_fixup_vtable_deltas): Likewise.
21466 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21467 * method.c (make_thunk): Handle vcall indices.
21468
21469 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
21470
21471 Compiler side new abi rtti (not enabled).
21472 * cp-tree.h (new_abi_rtti_p): New macro.
21473 (emit_support_tinfos): Prototype new function.
21474 (tinfo_decl_p): Likewise.
21475 (emit_tinfo_decl): Likwise.
21476 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21477 macros.
21478 (doing_runtime): New local static.
21479 (init_rtti_processing): Add new-abi initializer.
21480 (get_tinfo_decl): Add new-abi logic.
21481 (tinfo_from_decl): Likewise.
21482 (build_dynamic_cast_1): Likewise.
21483 (qualifier_flags): New static function.
21484 (tinfo_base_init): Likewise.
21485 (generic_initializer): Likewise.
21486 (ptr_ref_initializer): Likewise.
21487 (ptmd_initializer): Likewise.
21488 (class_hint_flags): Likewise.
21489 (class_initializer): Likewise.
21490 (synthesize_tinfo_var): Likewise.
21491 (create_real_tinfo_var): Likewise.
21492 (create_pseudo_type_info): Likewise.
21493 (get_vmi_pseudo_type_info): Likewise.
21494 (create_tinfo_types): Likewise.
21495 (emit_support_tinfos): New global function.
21496 (tinfo_decl_p): New global predicate.
21497 (emit_tinfo_decl): New global function.
21498 * class.c (set_rtti_entry): Generalize for old and new rtti.
21499 (build_vtbl_initializer): Likewise.
21500 * decl2.c (finish_file): Likewise.
21501
21502 2000-01-27 Jim Wilson <wilson@cygnus.com>
21503
21504 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21505 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21506
21507 2000-01-27 Mike Stump <mrs@wrs.com>
21508
21509 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21510 for scopes.
21511
21512 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
21513
21514 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21515
21516 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
21517
21518 * optimize.c (calls_setjmp_r): Supply new argument
21519 to special_function_p.
21520
21521 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21522
21523 * call.c: PROTO -> PARAMS.
21524 * class.c: Likewise.
21525 * cp-tree.h: Likewise.
21526 * cvt.c: Likewise.
21527 * decl.c: Likewise.
21528 * decl.h: Likewise.
21529 * decl2.c: Likewise.
21530 * dump.c: Likewise.
21531 * errfn.c: Likewise.
21532 * error.c: Likewise.
21533 * except.c: Likewise.
21534 * expr.c: Likewise.
21535 * init.c: Likewise.
21536 * input.c: Likewise.
21537 * lex.c: Likewise.
21538 * lex.h: Likewise.
21539 * method.c: Likewise.
21540 * optimize.c: Likewise.
21541 * parse.y: Likewise.
21542 * pt.c: Likewise.
21543 * repo.c: Likewise.
21544 * rtti.c: Likewise.
21545 * search.c: Likewise.
21546 * semantics.c: Likewise.
21547 * spew.c: Likewise.
21548 * tree.c: Likewise.
21549 * typeck.c: Likewise.
21550 * typeck2.c: Likewise.
21551 * xref.c: Likewise.
21552
21553 2000-01-25 Richard Henderson <rth@cygnus.com>
21554
21555 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21556
21557 2000-01-25 Mark Mitchell <mark@codesourcery.com>
21558
21559 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21560 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21561 (struct vcall_offset_data_s): New type.
21562 (dfs_vcall_offset_queue_p): New function.
21563 (dfs_build_vcall_offset_vtbl_entries): Likewise.
21564 (build_vcall_offset_vtbl_entries): Likewise.
21565 (layout_vtable_decl): Likewise.
21566 (num_vfun_entries): Likewise.
21567 (num_extra_vtbl_entries): Add the entries for vcall offsets.
21568 (build_vtbl_initializer): Likewise.
21569 (dfs_finish_vtabls): Use layout_vtable_decl.
21570 (modify_one_vtables): Always duplicate vtables under the new ABI.
21571 (finish_struct_1): Use layout_vtable_decl.
21572
21573 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21574
21575 * decl.c (member_function_or_else): Change third arg from a format
21576 specifier to an `enum overload_flags'. Callers changed.
21577
21578 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
21579
21580 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21581 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21582 build_const_cast, get_delta_difference, check_return_expr): Avoid
21583 ANSI string concatenation usage.
21584
21585 2000-01-24 Mark Mitchell <mark@codesourcery.com>
21586
21587 * class.c (layout_class_type): Put the fields required to make a
21588 class non-empty at the end, not the beginning, of the TYPE_FIELDs
21589 list.
21590
21591 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
21592
21593 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21594 template.
21595
21596 * decl2.c (mark_used): Do instantiate inlines that have been
21597 explicitly instantiated.
21598
21599 2000-01-24 Richard Henderson <rth@cygnus.com>
21600
21601 * call.c (build_over_call): Use expand_tree_builtin.
21602 * typeck.c (build_function_call_real): Likewise.
21603 (build_binary_op_nodefault): Handle unordered compares.
21604
21605 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21606
21607 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21608 cp_tree_index values.
21609 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21610 New global node #defines for them.
21611 * rtti.c (call_void_fn): Replace with ...
21612 (build_runtime_decl): ... new static function.
21613 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21614 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21615 (build_dynamic_cast_1): Always produce correctly typed result.
21616 Explicitly produce type_info addresses. Use dynamic_cast_node.
21617 * exception.cc (__throw_bad_cast): Return `void *'.
21618 (__throw_bad_typeid): Return `const type_info &'.
21619
21620 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21621
21622 * cp-tree.h (get_vtable_decl): Prototype new function.
21623 * class.c (get_vtable_decl): New function. Broken out from ...
21624 (build_vtable): ... here. Use it.
21625 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21626 by get_vtable_decl.
21627
21628 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21629
21630 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21631 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21632 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21633 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21634 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21635 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21636 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21637 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21638 (CPTI_TINFO_VAR_ID): New enumeration.
21639 (__tp_desc_type_node, __access_mode_type_node,
21640 __bltn_desc_type_node, __user_desc_type_node,
21641 __class_desc_type_node, __ptr_desc_type_node,
21642 __attr_desc_type_node, __func_desc_type_node,
21643 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21644 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21645 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21646 enum_desc_type_node, class_desc_type_node,
21647 si_class_desc_type_node, vmi_class_desc_type_node,
21648 ptmd_desc_type_node, base_desc_type_node): New #defines.
21649 (tinfo_fn_id, tinfo_fn_type): Rename to ...
21650 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21651 (tinfo_var_id): New enumeration.
21652 (DECL_TINFO_FN_P): Augment comment.
21653 * decl.c (cp_global_trees): Adjust documentation.
21654 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21655 tinfo_decl_type and tinfo_var_id.
21656 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21657 (build_typeid): Remove unused variable.
21658 (get_tinfo_var): Use tinfo_var_id.
21659 (tinfo_name): New static function.
21660 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21661 (tinfo_from_decl): Likewise.
21662 (get_base_offset): New static function, broken out of
21663 expand_class_desc.
21664 (expand_si_desc): Use tinfo_name.
21665 (expand_class_desc): Likewise. Lose local static variable.
21666 Use base_desc_type_node. Use get_base_offset.
21667 (expand_ptr_desc): Use tinfo_name.
21668 (expand_attr_desc): Likewise.
21669 (expand_generic_desc): Likewise.
21670
21671 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21672 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21673
21674 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21675
21676 * cp-tree.h (__eprintf): Remove declaration.
21677 * tree.c (__eprintf): Remove definition.
21678
21679 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
21680 Mark Mitchell <mark@codesourcery.com>
21681
21682 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21683 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21684
21685 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
21686
21687 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21688
21689 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21690
21691 * cp-tree.h (register_dtor_fn): New function.
21692 * decl.c (destroy_local_static): Rename to ...
21693 (register_dtor_fn): ... this. Give it external linkage.
21694 (expand_static_init): Use it.
21695 * decl2.c (do_static_initialization): Likewise, if using
21696 __cxa_atexit.
21697 (do_static_destruction): Check that __cxa_atexit is not in use.
21698 (finish_file): Don't call do_static_destruction if using
21699 __cxa_atexit.
21700
21701 * typeck.c (convert_arguments): Restore two-message error
21702 reporting.
21703
21704 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
21705
21706 Remap dynamic cast hint values to be consistent across ABIs.
21707 * search.c (dynamic_cast_base_recurse): Remap generated value.
21708 (get_dynamic_cast_base_type): Adjust documentation.
21709 * tinfo.h (__user_type_info::dyncast): Likewise.
21710 (__user_type_info::find_public_subobj): Remap BOFF meaning.
21711 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21712 (__class_type_info::do_dyncast): Likewise.
21713 (__class_type_info::do_find_public_subobj): Likewise.
21714 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21715
21716 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21717
21718 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21719
21720 * typeck2.c (incomplete_type_error): Restore previous
21721 cp_error and cp_error_at call sequence.
21722
21723 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
21724
21725 * class.c (dump_class_hierarchy): Make format agree with argument;
21726 cast pointer to unsigned long and print with %lx.
21727
21728 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21729
21730 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21731
21732 * typeck.c (composite_pointer_type, common_type,
21733 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21734 build_function_call_real, convert_arguments,
21735 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21736 build_unary_op, mark_addressable, build_compound_expr,
21737 build_static_cast, build_reinterpret_cast, build_const_cast,
21738 build_c_cast, build_modify_expr, get_delta_difference,
21739 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21740 'ISO C++'. Fusion consecutive calls to diagnostic message routines
21741 into a single one.
21742 * typeck2.c (readonly_error, abstract_virtuals_error,
21743 process_init_constructor, check_for_new_type): Likewise.
21744
21745 2000-01-19 Mark Mitchell <mark@codesourcery.com>
21746
21747 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21748 VAR_DECLs.
21749
21750 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
21751
21752 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21753 (build_x_typeid): Likewise.
21754 (get_tinfo_fn): Likewise.
21755 (get_tinfo_fn_unused): Rename to ...
21756 (get_tinfo_decl): ... here.
21757 * rtti.c (build_headof): Replace logic error with assertion.
21758 (get_tinfo_fn_dynamic): Rename to ...
21759 (get_tinfo_decl_dynamic): ... here. Make static. Use
21760 complete_type_or_else.
21761 (build_x_typeid): Move into ...
21762 (build_typeid): ... here. Adjust call to
21763 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21764 throw_bad_typeid expression.
21765 (get_tinfo_fn_unused): Rename to ...
21766 (get_tinfo_decl): ... here. Adjust comment.
21767 (get_tinfo_fn): Delete.
21768 (tinfo_from_decl): New static function.
21769 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21770 (get_typeid): Use complete_type_or_else.
21771 (build_dynamic_cast_1): Adjust calls to
21772 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21773 * parse.y (primary): Adjust call to build_typeid.
21774 * except.c (build_eh_type_type_ref): Adjust call to
21775 get_tinfo_decl. Mark as used.
21776 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21777 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21778 * parse.c: Regenerated.
21779
21780 2000-01-17 Mark Mitchell <mark@codesourcery.com>
21781
21782 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
21783 calling convention.
21784 (resolves_to_fixed_type_p): Document calling convention.
21785 * rtti.c (build_x_typeid): Initialize NONNULL.
21786
21787 * cp-tree.h (build_shared_int_cst): New function.
21788 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21789 * class.c (modify_vtable_entry): Likewise.
21790 (add_virtual_function): Split out code to generated shared
21791 INTEGER_CSTs to build_share_int_cst.
21792 (modify_all_vtables): Handle all the overridden functions here.
21793 Add overridden functions from non-primary virtual bases to the
21794 primary vtable.
21795 (finish_struct_1): Adjust call to modify_all_vtables. Add
21796 overridden functions from non-primary bases to the vtable.
21797 * tree.c (build_shared_int_cst): New function.
21798
21799 * cp-tree.h (scratchalloc): Remove.
21800 (build_scratch_list): Likewise.
21801 * call.c (convert_class_to_reference): Replace build_scratch_list
21802 and build_expr_list with build_tree_list.
21803 (add_candidate): Replace scratchalloc with expralloc. Note memory
21804 leak.
21805 (build_user_type_conversion_1): Replace build_scratch_list
21806 and build_expr_list with build_tree_list.
21807 (build_new_op): Likewise.
21808 (build_op_delete_call): Likewise.
21809 (convert_like): Likewise.
21810 * cvt.c (ocp_convert): Likewise.
21811 * decl.c (start_decl): Likewise.
21812 (start_function): Likewise.
21813 (finish_destructor_body): Likewise.
21814 (maybe_build_cleanup_1): Likewise.
21815 * decl2.c (reparse_decl_as_expr): Likewise.
21816 * init.c (perform_member_init): Likewise.
21817 (expand_cleanup_for_base): Likewise.
21818 (build_builtin_delete_call): Likewise.
21819 (build_new_1): Likewise.
21820 (build_delete): Likewise.
21821 * method.c (do_build_assign_ref): Likewise.
21822 * parse.y (already_scoped_stmt): Likewise.
21823 (nontrivial_exprlist): Likewise.
21824 (net_initializer): Likewise.
21825 (initlist): Likewise.
21826 * parse.c: Regenerated.
21827 * rtti.c (build_x_typeid): Likewise.
21828 (build_dynamic_cast_1): Likewise.
21829 * typeck.c (build_x_compound_expr): Likewise.
21830 (build_static_cast): Likewise.
21831 (build_modify_expr): Likewise.
21832
21833 * cp-tree.h (DECL_VINDEX): Add documentation.
21834 * class.c (build_vtable_entry): Likewise.
21835 (start_vtable): Add comment.
21836 (add_virtual_function): Replace pending_hard_virtuals with
21837 overridden_virtuals and pending_virtuals with new_virtuals.
21838 Replace redundant assignments with assertions.
21839 (check_for_override): Add comment.
21840 (check_bases_and_members): Replace pending_hard_virtuals with
21841 overridden_virtuals and pending_virtuals with new_virtuals.
21842 (create_vtbl_ptr): Likewise.
21843 (layout_class_type): Likewise.
21844 (finish_struct_1): Likewise. Add comments.
21845
21846 2000-01-16 Mark Mitchell <mark@codesourcery.com>
21847
21848 * class.c (finish_struct_1): Replace redundant code with
21849 assertions.
21850
21851 * cp-tree.h (flag_new_abi): Move.
21852 (flag_use_cxa_atexit): Likewise.
21853 (flag_honor_std): Likewise.
21854 (flag_rtti): Likewise.
21855 (vbase_offsets_in_vtable_p): Define.
21856 (vptrs_present_everywhere_p): Likewise.
21857 (TYPE_CONTAINS_VPTR_P): Likewise.
21858 (dfs_walk_real): Declare.
21859 * class.c (build_vbase_pointer_fields): Check
21860 vbase_offsets_in_vtable_p.
21861 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21862 BINFO_VPTR_FIELD.
21863 (build_vbase_offset_vtbl_entries): Simplify.
21864 (build_vbase_offset_vtbl_entries): Adjust.
21865 (build_vbase_pointer): Add ability to look up vbase offsets in
21866 vtable.
21867 (start_vtable): New function.
21868 (add_virtual_function): Use it.
21869 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21870 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21871 (build_vtbl_initializer): Take the type of the complete object as
21872 input. Use it to correctly calculate vbase offsets.
21873 (dfs_finish_vtbls): Pass the complete type to
21874 build_vtbl_initializer.
21875 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21876 (create_vtable_ptr): Create a vtable even if there are no
21877 new virtual functions, under the new ABI.
21878 (finish_struct_1): Likewise.
21879 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21880 * decl.c (exapnd_static_init): Remove call to
21881 preserve_initializer.
21882 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21883 vtables.
21884 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21885 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21886 (construct_virtual_bases): Don't initialize virtual base pointers
21887 under the new ABI.
21888 (build_aggr_init): Clean up comment.
21889 (expand_aggr_init_1): Likewise.
21890 * rtti.c (expand_class_desc): Store the virtual function table
21891 index where the vbase offset lives in the offset field.
21892 * search.c (dfs_walk_real): Make it global.
21893 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21894 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21895
21896 * tinfo.h (USItype): Make it signed under the new ABI.
21897 * tinfo.cc (convert_to_base): New function. Encapsulate base
21898 conversion logic here.
21899 (__class_type_info::do_upcast): Use it.
21900 (__class_type_info::do_dyncast): Likewise.
21901 (__class_type_info::do_find_public_subobj): Likewise.
21902
21903 * init.c (construct_virtual_bases): Don't look up the addresses of
21904 virtual bases at run-time.
21905
21906 * class.c (build_vbase_pointer): Relocate.
21907 (build_vbase_pointer_fields): Likewise.
21908 (dfs_build_vbase_offset_vtbl_entries): Likewise.
21909 (build_vbase_offset_vtbl_entries): Likewise.
21910
21911 * decl.c (init_decl_processing): Complain if -fnew-abi
21912 -fno-vtable-thunks is used.
21913
21914 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21915 flag_new_abi.
21916
21917 2000-01-15 Mark Mitchell <mark@codesourcery.com>
21918
21919 * cp-tree.h (num_extra_vtbl_entries): New function.
21920 (size_extra_vtbl_entries): Likewise.
21921 (dfs_vtable_path_unmark): Likewise.
21922 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21923 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21924 * class.c (num_extra_vtbl_entries): New function.
21925 (size_extra_vtbl_entries): Likewise.
21926 (dfs_build_vbase_offset_vtbl_entries): New function.
21927 (build_vbase_offset_vtbl_entries): Likewise.
21928 (build_vtbl_initializer): Use it.
21929 (finish_struct_1): Adjust vtable sizes (using
21930 num_extra_vtbl_entries).
21931 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21932 THUNK_DECL is non-NULL before expanding it.
21933 * init.c (expand_virtual_init): Adjust the vtable pointer by
21934 size_extra_vtbl_entries before storing it.
21935 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21936 Handle TREE_LIST parameters here, not in the dfs_* functions.
21937 (dfs_unmarked_real_bases_queue_p): Adjust.
21938 (dfs_marked_real_bases_queue_p): Likewise.
21939 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21940 (dfs_vtable_path_marked_real_bases_queue_p): New function.
21941 (dfs_vtable_path_unmark): Likewise.
21942
21943 2000-01-14 Mark Mitchell <mark@codesourcery.com>
21944
21945 * optimize.c (copy_body_r): Clear the operand three of a
21946 TARGET_EXPR when copying it.
21947
21948 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21949
21950 * method.c (build_decl_overload_real): Check whether we are in ::
21951 before returning __builtin_new/delete.
21952
21953 2000-01-13 Mark Mitchell <mark@codesourcery.com>
21954
21955 * pt.c (tsubst_friend_function): Improve comment.
21956 (instantiate_decl): Avoid crashing when a "nested" function is
21957 instantiated from the top level.
21958
21959 * dump.c (dqeueue_and_dump): Dump
21960 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21961
21962 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21963
21964 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21965
21966 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
21967
21968 * g++spec.c (lang_specific_driver): Add -fnew-abi if
21969 ENABLE_NEW_GXX_ABI defined.
21970 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21971 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21972 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21973
21974 2000-01-12 Mark Mitchell <mark@codesourcery.com>
21975
21976 * decl.c (start_cleanup_fn): Call pushdecl.
21977
21978 * call.c (convert_class_to_reference): Fix typos.
21979 (build_conditional_expr): Handle errors gracefully.
21980 * class.c (push_nested_class): Likewise.
21981 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21982 (DECL_THIS_EXTERN): Use it.
21983 (DECL_THIS_STATIC): Likewise.
21984 * cvt.c (convert_to_void): Handle errors gracefully.
21985 (build_expr_type_conversion): Likewise.
21986 * decl.c (maybe_push_decl): Likewise.
21987 (start_decl_1): Likewise.
21988 (require_complete_types_for_parms): Likewise.
21989 * parse.y (structsp): Likewise.
21990 (base_class): Likewise.
21991 * parse.c: Regenerated.
21992 * pt.c (finish_member_template_decl): Likewise.
21993 * typeck.c (decay_conversion): Likewise.
21994
21995 * cp-tree.h (dfs_skip_vbases): New function.
21996 (find_vbase_instance): Likewise.
21997 * class.c (determine_primary_base): Allow a nearly empty base to
21998 serve as a primary base class under the new ABI.
21999 (get_class_offset_1): Rename to ...
22000 (dfs_get_class_offset): ... this. Simplify. Don't issue error
22001 messages here.
22002 (get_class_offset): Use it. Issue error messages here.
22003 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
22004 find the right copies of virtual bases.
22005 (fixup_vtable_deltas1): Rename to ...
22006 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
22007 bases as primary bases.
22008 (fixup_vtable_deltas): Remove.
22009 (override_one_vtable): Handle virtual bases as primary bases.
22010 (merge_overrides): Likewise.
22011 (finish_struct_1): Likewise.
22012 (dump_class_hierarchy): Dump primary-ness of bases as well.
22013 * search.c (mark_primary_bases): Use a pre-order traversal to
22014 handle primary virtual bases.
22015 (dfs_skip_vbases): New fiunction.
22016 (expand_upcast_fixups): Adjust to handle primary virtual bases.
22017 (fixup_virtual_upcast_offsets): Likewise.
22018 (fixup_all_virtual_upcast_offsets): Likewise.
22019 (dfs_find_vbase_instances): New function.
22020 (find_vbase_instance): Likewise.
22021
22022 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
22023
22024 * lex.c (DIR_SEPARATOR): Delete macro.
22025
22026 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
22027
22028 * decl2.c (lang_decode_option): Handle automatic line wrapping
22029 option.
22030
22031 2000-01-11 Mark Mitchell <mark@codesourcery.com>
22032
22033 * friend.c (do_friend): Don't resolve scopes when processing
22034 template declarations, even if the qualifying scope doesn't
22035 involve template parameters.
22036
22037 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
22038
22039 * class.c (dfs_modify_vtables_queue_p): Remove.
22040 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
22041 and dfs_marked_real_bases_queue_p instead of
22042 dfs_modify_vtables_queue_p.
22043
22044 * class.c (build_vbase_path): Simplify.
22045 (dfs_propagate_binfo_offsets): New function.
22046 (propagate_binfo_offsets): Use it.
22047 (remove_base_field): Simplify.
22048 (dfs_set_offset_for_vbases): Remove.
22049 (dfs_set_offset_for_shared_vbases): New function.
22050 (dfs_set_offset_for_unshared_vbases): Likewise.
22051 (layout_virtual_bases): Use them.
22052 (layout_basetypes): Don't call propagate_binfo_offsets.
22053 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
22054 for the vbases.
22055
22056 * class.c (build_base_field): New function, split out from ...
22057 (build_base_fields): ... here. Use it. Allocate primary bases
22058 first, under the new ABI.
22059 (get_vtable_entry): Remove.
22060 (remove_base_field): New function, split out from ...
22061 (remove_base_fields): ... here. Adjust since primary bases come
22062 first under the new ABI.
22063
22064 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
22065 (initialize_vtbl_ptrs): New function.
22066 (expand_indirect_vtbls_init): Change prototype.
22067 (convert_pointer_to_vbase): Declare.
22068 * init.c (expand_direct_vtbls_init): Remove.
22069 (dfs_initialize_vtbl_ptrs): New function.
22070 (initialize_vtbl_ptrs): Likewise.
22071 (emit_base_init): Use initialize_vtbl_ptrs.
22072 * search.c (convert_pointer_to_vbase): Make it global.
22073 (expand_indirect_vtbls_init): Remove vtable initialization code.
22074 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
22075
22076 * class.c (dfs_finish_vtbls): New function.
22077 (finish_vtbls): Use it.
22078 (dump_class_hierarchy): New function.
22079
22080 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
22081 (BINFO_VBASE_PRIMARY_P): New macro.
22082 (BINFO_VIRTUALS): Add to documentation.
22083 (SET_BINFO_PRIMARY_MARKED_P): Remove.
22084 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22085 (dfs_mark_primary_bases_queue_p): Likewise.
22086 (dfs_unmarked_real_bases_queue_p): New function.
22087 (dfs_marked_real_bases_queue_p): Likewise.
22088 * search.c (dfs_mark_primary_bases): Adjust.
22089 (mark_primary_bases): Likewise.
22090 (get_shared_vbase_if_not_primary): New function.
22091 (dfs_unmarked_real_bases_queue_p): Likewise.
22092 (dfs_marked_real_bases_queue_p): Likewise.
22093 (dfs_get_pure_virtuals): Simplify.
22094 (get_pure_virtuals): Likewise.
22095
22096 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22097
22098 * lex.c: Include tm_p.h.
22099
22100 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
22101
22102 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
22103
22104 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
22105
22106 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
22107 * pt.c (instantiate_decl): Defer comdat templates that might not be
22108 needed.
22109
22110 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
22111 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
22112 (finish_file): Likewise.
22113
22114 * decl2.c (import_export_class): Undo 12/14 change.
22115
22116 * error.c (dump_decl): operator new, not operatornew.
22117
22118 * class.c (field_decl_cmp): A nontype is "greater" than a type.
22119 * search.c (lookup_field_1): Look for the last field with the
22120 desired name.
22121
22122 2000-01-05 Nathan Sidwell <nathan@acm.org>
22123
22124 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
22125 FUNCTION_DECL.
22126
22127 2000-01-05 Nathan Sidwell <nathan@acm.org>
22128
22129 * typeck.c (build_static_cast): Don't strip target qualifiers
22130 when casting from a class.
22131
22132 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22133
22134 * class.c (warn_hidden): Initialize variable `fndecl'.
22135
22136 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
22137
22138 * decl.c (flag_isoc9x): New variable to be able to use code in
22139 c-common.c. For now always zero.
22140
22141 2000-01-03 Mark Mitchell <mark@codesourcery.com>
22142
22143 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
22144 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
22145 or unshare_base_binfos for virtual bases here.
22146 * search.c (dfs_get_vbase_types): Do it here.
22147 (get_vbase_types): Adjust.
22148
22149 2000-01-02 Mark Mitchell <mark@codesourcery.com>
22150
22151 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
22152 (BINFO_PRIMARY_MARKED_P): Use flag 5.
22153 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22154 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22155 (unmark_primary_bases): Remove declaration.
22156 (unmarkedp): Declare.
22157 (dfs_vbase_unmark): Likewise.
22158 * class.c (determine_primary_base): Return immediately if there
22159 are no base classes. Call mark_primary_bases here.
22160 (modify_all_direct_vtables): Remove.
22161 (modify_all_indirect_vtables): Remove.
22162 (dfs_modify_vtables_queue_p): New function.
22163 (dfs_modify_vtables): New function.
22164 (modify_all_vtables): Use them.
22165 (build_base_fields): Build FIELD_DECLs for primary virtual base
22166 classes.
22167 (create_vtable_ptr): Don't call determine_primary_base here.
22168 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22169 (dfs_set_offset_for_vbases): ... this.
22170 (layout_virtual_bases): Use it.
22171 (layout_class_type): Call determine_primary_base here.
22172 * search.c (unmarkedp): Make it global.
22173 (shared_marked_p): Simplify.
22174 (shared_unmarked_p): Likewise.
22175 (dfs_primary_bases_queue_p): Remove.
22176 (dfs_unmark_primary_bases): Likewise.
22177 (unmark_primary_bases): Likewise.
22178 (mark_primary_bases): Simplify.
22179 (get_pure_virtuals): Don't call mark_primary_bases here.
22180 (dfs_vbase_unmark): New function.
22181 (get_vbase_types): Simplify.
22182
22183 * class.c (struct base_info): Remove.
22184 (determine_primary_base): Take has_virtual_p rather than a
22185 base_info as input. Don't calculate max_has_virtual.
22186 (finish_struct_bits): Remove max_has_virtual argument.
22187 (create_vtable_ptr): Remove max_has_virtual_p argument.
22188 (layout_virtual_bases): Remove max argument.
22189 (layout_basetypes): Likewise.
22190 (layout_class_type): Remove max_has_virtual_p argument.
22191 (finish_struct_1): Remove max_has_virtual.
22192
22193 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22194 (layout_basetypes): Remove.
22195 * class.c (propagate_binfo_offsets): Moved here from tree.c.
22196 Update to handle primary virtual bases.
22197 (remove_base_fields): New function, split out from
22198 layout_basetypes.
22199 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22200 (layout_virtual_bases): New function, split out from
22201 layout_basetypes. Update to handle primary virtual bases.
22202 (layout_basetypes): Moved here from tree.c. Use
22203 remove_base_fields and layout_virtual_bases.
22204 * search.c (dfs_mark_primary_bases_queue_p): New function.
22205 (mark_primary_bases): Use it.
22206 * tree.c (CEIL): Remove.
22207 (propagate_binfo_offsets): Remove.
22208 (layout_basetypes): Remove.
22209
22210 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22211
22212 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22213 (BINFO_PRIMARY_MARKED_P): New macro.
22214 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22215 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22216 (mark_primary_bases): New function.
22217 (unmark_primary_bases): Likewise.
22218 * search.c (get_abstract_virtuals_1): Remove.
22219 (dfs_mark_primary_bases): New function.
22220 (mark_primary_bases): Likewise.
22221 (dfs_unmark_primary_bases): Likewise.
22222 (unmark_primary_bases): Likewise.
22223 (dfs_get_pure_virtuals): Likewise.
22224
22225 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22226
22227 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22228 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22229 (modify_one_vtable): Adjust.
22230 (fixup_vtable_deltas1): Likewise.
22231 (override_one_vtable): Likewise.
22232 * search.c (get_abstract_virtuals_1): Likewise.
22233 (get_pure_virtuals): Likewise.
22234 (expand_upcast_fixups): Likewise.
22235 * tree.c (debug_binfo): Likewise.
22236
22237 * class.c (build_vtable): Don't return a value. Don't rebuild
22238 vtables for bases that have already been handled.
22239 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22240 already been handled.
22241 (modify_one_vtable): Adjust accordingly.
22242 (fixup_vtable_deltas1): Likewise.
22243 (finish_struct_1): Likewise.
22244
22245 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
22246
22247 * call.c (build_new_method_call): Also check destructors.