re PR c++/13118 ([ABI] Missed covariant return thunk)
[gcc.git] / gcc / cp / ChangeLog
1 2003-12-12 Nathan Sidwell <nathan@codesourcery.com>
2
3 PR c++/13118
4 * cp-tree.h (lang_decl_u): Add thunk_alias member.
5 (THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL.
6 (THUNK_ALIAS_P): Remove.
7 (THUNK_ALIAS): Adjust.
8 * class.c (update_vtable_entry_for_fn): Get the vbase within the
9 overriding function's return type.
10 (dump_thunk): Adjust THUNK_ALIAS printing.
11 (build_vtbl_initializer): Adjust THUNK_ALIAS use.
12 * method.c (make_thunk): Revert 12881 test change. Clear
13 THUNK_ALIAS.
14 (finish_thunk): Adjust THUNK_ALIAS setting.
15 (use_thunk): Adjust THUNK_ALIAS use.
16 * semantics.c (emit_associated_thunks): Likewise.
17
18 PR c++/13114, c++/13115
19 * class.c (layout_empty_base): Propagate the move of an empty base
20 to offset zero.
21
22 PR c++/12881
23 * method.c (make_thunk): Deal with thunk aliases when searching
24 for a thunk. Robustify assertion.
25
26 2003-12-11 Nathan Sidwell <nathan@codesourcery.com>
27
28 * mangle.c (conv_type_names): Holds IDENTIFIER_NODEs only.
29 (hash_type): Use TYPE_UID of the identifier's type.
30 (compare_type): Adjust.
31 (mangle_conv_op_name_for_type): Store identifier nodes only, use
32 TYPE_UID has hash value.
33
34 2003-12-10 Mark Mitchell <mark@codesourcery.com>
35
36 * cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL.
37
38 2003-12-08 Matt Austern <austern@apple.com>
39
40 PR c/13134
41 * decl.c (duplicate_decls): Copy visibility flag when appropriate.
42
43 2003-12-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
44
45 * init.c (build_new_1): Deal with an OVERLOAD set when
46 looking up for _Jv_AllocObject.
47 * except.c (build_throw): Likewise for _Jv_Throw.
48
49 2003-12-08 Jason Merrill <jason@redhat.com>
50
51 PR c++/11971
52 * tree.c (build_local_temp): Split out from build_cplus_new.
53 (force_target_expr): New fn.
54 * call.c (call_builtin_trap): Call it. Take a type parm.
55 (convert_arg_to_ellipsis): Pass it.
56 (build_x_va_arg): Use call_builtin_trap.
57
58 PR c++/11929
59 * call.c (magic_varargs_p): New fn.
60 (build_over_call): Do no ellipsis conversions for arguments to
61 functions with magic varargs.
62
63 * name-lookup.c, init.c, except.c: Revert Giovanni's patch from
64 yesterday.
65
66 Give the anonymous namespace a null DECL_NAME.
67 * cp-tree.h: Don't declare anonymous_namespace_name.
68 * decl.c: Don't define it.
69 * dump.c (cp_dump_tree): Don't check for it.
70 * cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise.
71 * error.c (dump_decl): Likewise.
72 * name-lookup.c: Define it here.
73 (push_namespace): Put it in DECL_ASSEMBLER_NAME instead.
74 * mangle.c (write_unqualified_name): Adjust.
75
76 2003-12-07 Giovanni Bajo <giovannibajo@gcc.gnu.org>
77
78 PR c++/2294
79 * name-lookup.c (push_overloaded_decl): Always construct an
80 OVERLOAD unless the declaration is a built-in.
81 (set_namespace_binding): While binding OVERLOADs with only one
82 declaration, we still need to call supplement_binding.
83 * init.c (build_new_1): Deal with an OVERLOAD set when
84 looking up for _Jv_AllocObject.
85 * except.c (build_throw): Likewise for _Jv_Throw.
86
87 2003-12-06 Mark Mitchell <mark@codesourcery.com>
88
89 PR c++/13323
90 * class.c (same_signature_p): Handle conversion operators
91 correctly.
92 (check_for_override): Likewise.
93
94 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
95
96 * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
97 (c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
98 (c++.uninstall): Likewise.
99
100 2003-12-05 Danny Smith <dannysmith@gcc.gnu.org>
101 Mark Mitchell <mark@codesourcery.com>
102
103 PR c++/13305
104 * parser.c (cp_parser_elaborated_type_specifier): Accept
105 attributes.
106
107 2003-12-05 Mark Mitchell <mark@codesourcery.com>
108
109 PR c++/13314
110 * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
111 calls.
112 (cp_parser_class_head): Likewise.
113
114 2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
115
116 PR c++/13166
117 * parser.c (cp_parser_late_parsing_default_args): Make sure the
118 context is a class before calling push_nested_class and
119 pop_nested_class.
120
121 2003-12-03 James E Wilson <wilson@specifixinc.com>
122
123 * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
124 support.
125
126 2003-12-03 Mark Mitchell <mark@codesourcery.com>
127
128 PR c++/9127
129 * cp-tree.h (at_namespace_scope_p): New function.
130 * parser.c (cp_parser_class_head): Handle invalid explicit
131 specializations.
132 * search.c (at_namespace_scope_p): New function.
133
134 PR c++/13179
135 * semantics.c (finish_handler_parms): Do not call eh_type_info for
136 types used in templates.
137
138 PR c++/10771
139 * parser.c (cp_parser_check_for_invalid_template_id): New
140 function.
141 (cp_parser_simple_type_specifier): Use it.
142 (cp_parser_elaborated_type_specifier): Likewise.
143 (cp_parser_class_head): Likewise.
144
145 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
146
147 PR c++/10126
148 * pt.c (convert_nontype_argument): Handle default conversions
149 while converting a pointer to member function.
150
151 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
152
153 PR c++/12573
154 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
155 looking into them recursively.
156
157 2003-12-02 Richard Henderson <rth@redhat.com>
158
159 * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
160 * parser.c (struct cp_token): Likewise.
161 (struct cp_parser_token_tree_map_node): Likewise.
162 * lex.c (struct resword): Move const after ENUM_BITFIELD.
163
164 2003-11-30 Mark Mitchell <mark@codesourcery.com>
165
166 PR c++/9849
167 * parser.c (cp_lexer_prev_token): New function.
168 (cp_parser_skip_to_closing_parenthesis): Add consume_paren
169 parameter.
170 (cp_parser_nested_name_specifier_opt): Add is_declaration
171 parameter.
172 (cp_parser_nested_name_specifier): Likewise.
173 (cp_parser_class_or_namespace_name): Likewise.
174 (cp_parser_class_name): Likewise.
175 (cp_parser_template_id): Likewise.
176 (cp_parser_template_name): Likewise.
177 (cp_parser_id_expression): Adjust calls to
178 cp_parser_nested_name_specifier_op, cp_parser_template_id,
179 cp_parser_class_name.
180 (cp_parser_unqualified_id): Likewise.
181 (cp_parser_postfix_expression): Likewise.
182 (cp_parser_pseudo_destructor_name): Likewise.
183 (cp_parser_cast_expression): Likewise.
184 (cp_parser_mem_initializer_id): Likewise.
185 (cp_parser_simple_type_specifier): Likewise.
186 (cp_parser_type_name): Likewise.
187 (cp_parser_elaborated_type_specifier): Likewise.
188 (cp_parser_qualified_namespace_specifier): Likewise.
189 (cp_parser_using_declaration): Likewise.
190 (cp_parser_using_directive): Likewise.
191 (cp_parser_ptr_operator): Likewise.
192 (cp_parser_declarator_id): Likewise.
193 (cp_parser_class_head): Likewise.
194 (cp_parser_base_specifier): Likewise.
195 (cp_parser_constructor_declarator_p): Likewise.
196 (cp_parser_direct_declarator): Fix typo in comment.
197 (cp_parser_parenthesized_expression_list): Adjust call to
198 cp_parser_skip_to_closing_parenthesis.
199 (cp_parser_selection_statement): Likewise.
200
201 2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
202
203 PR c++/12924
204 * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
205 with OVERLOAD and DECL nodes as the first operand.
206
207 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
208
209 * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
210
211 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
212
213 PR c++/5369
214 * friend.c (is_friend): Handle member function of a class
215 template as template friend.
216 (do_friend): Likewise.
217 * decl2.c (check_classfn): Add template_header_p parameter.
218 * decl.c (start_decl): Adjust check_classfn call.
219 (grokfndecl): Likewise.
220 * pt.c (is_specialization_of_friend): New function.
221 (uses_template_parms_level): Likewise.
222 (push_template_decl_real): Use uses_template_parms_level.
223 (tsubst_friend_function): Adjust check_classfn call.
224 * cp-tree.h (check_classfn): Adjust declaration.
225 (uses_template_parms_level): Add declaration.
226 (is_specialization_of_friend): Likewise.
227
228 2003-11-21 Mark Mitchell <mark@codesourcery.com>
229
230 PR c++/12515
231 * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
232 operator.
233
234 2003-11-21 Jan Hubicka <jh@suse.cz>
235
236 * parser.c (cp_parser_postfix_expression): Initialize 's' to
237 NULL_TREE.
238
239 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
240
241 * Make-lang.in (c++.extraclean): Delete.
242
243 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
244
245 * Make-lang.in (check-g++, lang_checks): Add.
246
247 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
248
249 PR c++/12932
250 * class.c (currently_open_derived_class): Check if
251 current_class_type is NULL_TREE.
252 * semantics.c (finish_call_expr): Check if
253 currently_open_derived_class returns NULL_TREE.
254 * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
255 parameter.
256
257 2003-11-17 Jason Merrill <jason@redhat.com>
258
259 * init.c (build_new_1): Preevaluate placement args.
260 * call.c (build_op_delete_call): Don't expose placement args to
261 overload resolution.
262
263 2003-11-16 Jason Merrill <jason@redhat.com>
264
265 * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
266 and TAGS files that include them for each front end.
267
268 2003-11-15 Bernardo Innocenti <bernie@develer.com>
269
270 PR c++/2294
271 * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
272 build failure on libjava.
273
274 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
275
276 PR c++/2294
277 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
278 unless the declaration is a built-in.
279 (set_namespace_binding): While binding OVERLOADs with only one
280 declaration, we still need to call supplement_binding.
281
282 2003-11-14 Mark Mitchell <mark@codesourcery.com>
283
284 PR c++/12762
285 * parser.c (cp_parser_enclosed_template_argument_list): New
286 function.
287 (cp_parser_template_id): Use it.
288 (cp_parser_simple_type_specifier): Recognize invalid template
289 syntax.
290
291 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
292
293 PR c++/2094
294 * pt.c (unify): Add support for PTRMEM_CST and
295 FIELD_DECL unification.
296
297 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
298
299 * decl.c (grokfndecl): Change OK to type tree.
300
301 2003-11-12 Mark Mitchell <mark@codesourcery.com>
302
303 * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
304 CONSTRUCTOR.
305
306 * decl.c (cp_make_fname_decl): When creating a top-level
307 __FUNCTION__-like symbol, do register it with pushdecl.
308
309 * decl.c (finish_case_label): Do not check that we are within a
310 switch statement here.
311 * parser.c (struct cp_parser): Add in_iteration_statement_p and
312 in_switch_statement_p.
313 (cp_parser_new): Initialize them.
314 (cp_parser_labeled_statement): Check validity of case labels
315 here.
316 (cp_parser_selection_statement): Set in_switch_statement_p.
317 (cp_parser_iteration_statement): Set in_iteration_statement_p.
318 (cp_parser_jump_statement): Check validity of break/continue
319 statements here.
320
321 PR c++/12735
322 * cp-tree.h (duplicate_decls): Return a tree.
323 * decl.c (duplicate_decls): Clarify documentation. Return
324 error_mark_node to indicate a failed redeclaration.
325 * friend.c (do_friend): Handle that case.
326 * name-lookup.c (pushdecl): Likewise.
327
328 2003-11-11 Jason Merrill <jason@redhat.com>
329
330 * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
331 * name-lookup.c (parse_using_directive): New fn.
332 (is_associated_namespace): New fn.
333 (arg_assoc_namespace): Also check associated namespaces.
334 * name-lookup.h: Declare new fns.
335 * pt.c (maybe_process_partial_specialization): Allow
336 specialization in associated namespace.
337 * parser.c (cp_parser_using_directive): Accept attributes. Use
338 parse_using_directive.
339
340 2003-11-10 Richard Henderson <rth@redhat.com>
341
342 * cvt.c (convert_to_void): Use void_zero_node after overload failure.
343
344 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
345
346 PR c++/12832
347 * name-lookup.c (supplement_binding): Gracefully handle names
348 used at non-class scope prior declaration.
349
350 2003-11-06 Matt Austern <austern@apple.com>
351
352 * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
353 * method.c (use_thunk): give thunk same visibility as function.
354 * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
355
356 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
357
358 PR c++/11616
359 * pt.c (instantiate_pending_templates): Save and restore
360 input_location.
361
362 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
363
364 PR c++/2019
365 * friend.c (add_friend): Don't display previous declaration in
366 case of duplicate friend warning.
367
368 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
369
370 PR c++/9810
371 * call.c (build_over_call): Check access using primary template
372 if FN is a member function template.
373
374 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
375
376 PR c++/12796
377 * class.c (handle_using_decl): Set input_location before calling
378 error_not_base_type.
379
380 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
381
382 PR c++/10371
383 * semantics.c (finish_non_static_data_member): Handle when
384 both processing_template_decl and qualifying_scope are true.
385
386 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
387
388 PR c++/11076
389 * class.c (handle_using_decl): Swap arguments of error_not_base_type.
390 * parser.c (cp_parser_direct_declarator): Only resolve typename for
391 namespace scope declarations.
392
393 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
394
395 PR c++/12698, c++/12699, c++/12700, c++/12566
396 * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
397 (debug_class, debug_thunks): New.
398 * class.c (dump_class_hierarchy_1): New break out from ...
399 (dump_class_hierarchy): ... here.
400 (dump_thunk, debug_thunks, debug_class): New.
401 (update_vtable_entry_for_fn): Add ssizetype casts. Correct
402 continued search for primary binfo via virtual.
403 (build_vtbl_initializer): Follow covariant thunk alias.
404 * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
405 (finish_thunk): Look for an alias of the covariant thunk and point
406 to it.
407 (use_thunk): We should never use an alias.
408 * semantics.c (emit_associated_thunks): Do not emit aliases.
409
410 PR c++/12566
411 * cp-tree.h (cp_fname_init): Add TYPE pointer param.
412 * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
413 create an ad-hoc ERROR_MARK.
414 (cp_make_fname_decl): Adjust.
415 * pt.c (tsubst_expr): Adjust.
416
417 2003-10-23 Jason Merrill <jason@redhat.com>
418
419 PR c++/12726
420 * tree.c (build_target_expr_with_type): Don't call force_rvalue
421 for CONSTRUCTORs.
422
423 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
424
425 * call.c: Fix comment formatting.
426 * class.c: Likewise.
427 * cxx-pretty-print.c: Likewise.
428 * init.c: Likewise.
429 * parser.c: Likewise.
430 * pt.c: Likewise.
431 * semantics.c: Likewise.
432 * tree.c: Likewise.
433 * typeck.c: Likewise.
434 * typeck2.c: Likewise.
435
436 2003-10-21 Mark Mitchell <mark@codesourcery.com>
437
438 PR c++/11962
439 * typeck.c (build_x_conditional_expr): Handle missing middle
440 operands in templates.
441 * mangle.c (write_expression): Issue errors about attempts to
442 mangle a non-existant middle operator to the ?: operator.
443
444 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
445 * decl.c (cp_finish_decl): Remove clause intended for asm directives
446 in struct or class fields: this code is never executed.
447
448 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
449
450 * decl.c (start_decl): Exit if push_template_decl returns
451 error_mark_node.
452
453 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
454
455 * ChangeLog: Fix typos.
456 * call.c: Fix comment typos.
457 * class.c: Likewise.
458 * cp-tree.h: Likewise.
459 * cvt.c: Likewise.
460 * cxx-pretty-print.c: Likewise.
461 * decl.c: Likewise.
462 * decl2.c: Likewise.
463 * init.c: Likewise.
464 * mangle.c: Likewise.
465 * name-lookup.c: Likewise.
466 * parser.c: Likewise.
467 * search.c: Likewise.
468 * semantics.c: Likewise.
469 * tree.c: Likewise.
470 * typeck.c: Likewise.
471
472 2003-10-20 Jan Hubicka <jh@suse.cz>
473
474 * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
475 the expansion.
476
477 2003-10-20 Mark Mitchell <mark@codesourcery.com>
478
479 * Make-lang.in (c++.install-info): Remove.
480
481 2003-10-20 Jason Merrill <jason@redhat.com>
482
483 * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
484 field.
485
486 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
487
488 PR c++/9781, c++/10583, c++/11862
489 * decl.c (cp_finish_decl): Exit immediately if decl is an
490 error_mark_node.
491 * pt.c (push_template_decl_real): Return error_mark_node for
492 invalid template declaration of variable.
493
494 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
495
496 PR c++/12495
497 * pt.c (lookup_template_class): Handle when current_class_type
498 is a local class.
499
500 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
501
502 PR c++/2513
503 * decl.c (make_typename_type): Use dependent_type_p.
504 (make_unbound_class_template): Likewise.
505 * pt.c (instantiate_class_template): Increment
506 processing_template_decl during substitution of template friend
507 function. Preincrement processing_template_decl rather than
508 postincrement.
509 (get_mostly_instantiated_function_type): Increment
510 processing_template_decl during partial substitution of function
511 type.
512
513 2003-10-15 Jan Hubicka <jh@suse.cz>
514
515 PR c++/12574
516 * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
517
518 2003-10-14 Jason Merrill <jason@redhat.com>
519
520 PR c++/11878
521 * tree.c (build_target_expr_with_type): Call force_rvalue for
522 classes with non-trivial copy ctors.
523
524 PR c++/11063
525 * typeck.c (build_modify_expr): Call convert rather than abort.
526
527 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
528
529 Breack out decl.c (3/n)
530 * name-lookup.c: Include flags.h
531 (lookup_name_current_level): Make static.
532 (add_decl_to_level): Likewise.
533 (push_local_binding): Likewise.
534 (push_overloaded_decl): Likewise.
535 (lookup_using_namespace): Likewise.
536 (qualified_lookup_using_namespace): Likewise.
537 (lookup_type_current_level): Likewise.
538 (unqualified_namespace_lookup): Likewise.
539 (namespace_ancestor): Likewise.
540 (push_using_directive): Likewise.
541 * decl.c (pushdecl): Move to name-lookup.c.
542 (pushdecl_top_level_1): Likewise.
543 (pushdecl_top_level): Likewise.
544 (pushdecl_top_level_and_finish): Likewise.
545 (maybe_push_decl): Likewise.
546 (push_using_decl): Likewise.
547 (push_overloaded_decl): Likewise.
548 (make_anon_name): Likewise.
549 (anon_cnt): Likewise.
550 (clear_anon_tags): Likewise.
551 (maybe_inject_for_scope_var): Likewise.
552 (check_for_out_of_scope_variable): Likewise.
553 * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
554 * decl.c (warn_extern_redeclared_static): Export.
555 * cp-tree.h (warn_extern_redeclared_static): Declare.
556
557 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
558
559 * Make-lang.in: Replace uses of $(target_alias) with
560 $(target_noncanonical).
561
562 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
563
564 * ChangeLog: Add PR number to patch for PR c++/12370.
565
566 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
567
568 * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
569 (binding_for_name): Likewise.
570 (cxx_binding_clear): Move to name-lookup.c.
571 * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
572 (binding_for_name): Likewise.
573 * decl2.c (is_ancestor): Move to name-lookup.c
574 (namespace_ancestor): Likewise.
575 (add_using_namespace): Likewise.
576 (ambiguous_decl): Likewise.
577 (lookup_using_namespace): Likewise.
578 (qualified_lookup_using_namespace): Likewise.
579 (set_decl_namespace): Likewise.
580 (decl_namespace): Likewise.
581 (current_decl_namespace): Likewise.
582 (push_decl_namespace): Likewise.
583 (pop_decl_namespace): Likewise.
584 (push_scope): Likewise.
585 (pop_scope): Likewise.
586 (struct arg_lookup): Likewise.
587 (arg_assoc): Likewise.
588 (arg_assoc_args): Likewise.
589 (arg_assoc_type): Likewise.
590 (add_function): Likewise.
591 (arg_assoc_namespace): Likewise.
592 (arg_assoc_class): Likewise.
593 (arg_assoc_template_arg): Likewise.
594 (do_namespace_alias): Likewise.
595 (validate_nonmember_using_decl): Likewise.
596 (do_nonmember_using_decl): Likewise.
597 (do_toplevel_using_decl): Likewise.
598 (do_local_using_decl): Likewise.
599 (do_class_using_decl): Likewise.
600 (do_using_directive): Likewise.
601 (constructor_name_full): Likewise.
602 (constructor_name): Likewise.
603 (constructor_name_p): Likewise.
604
605 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
606
607 Break out decl.c (2/n)
608 * name-lookup.c: Include diagnostic.h
609 (cxx_binding_free): Make static.
610 (cxx_binding_make): Likewise.
611 (binding_table_new): Likewise
612 (binding_table_free): Likewise.
613 (binding_table_insert): Likewise.
614 (binding_table_find_anon_type): Likewise.
615 (binding_table_reverse_maybe_remap): Likewise.
616 (supplement_binding): Likewise.
617 * name-lookup.h (global_scope_name): Declare extern.
618 (global_type_node): Likewise.
619 (cxx_binding_free): Don't export.
620 (cxx_binding_make): Likewise.
621 (binding_table_new): Likewise.
622 (binding_table_free): Likewise.
623 (binding_table_insert): Likewise.
624 (binding_table_find_anon_type): Likewise.
625 (binding_table_reverse_maybe_remap): Likewise.
626 * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
627 * decl.c (lookup_namespace_name): Move to name-lookup.c
628 (select_decl): Likewise.
629 (unqualified_namespace_lookup): Likewise.
630 (lookup_qualified_name): Likewise.
631 (lookup_name_real): Likewise.
632 (lookup_name_nonclass): Likewise.
633 (lookup_function_nonclass): Likewise.
634 (lookup_name): Likewise.
635 (lookup_name_current_level): Likewise.
636 (lookup_type_current_level): Likewise.
637 (lookup_flags): Likewise.
638 (qualify_lookup): Likewise.
639 (lookup_tag): Likewise.
640 (lookup_tag_reverse): Likewise.
641 (getdecls): Likewise.
642 (storedecls): Remove.
643 (cxx_remember_type_decls): Move to name-lookup.c.
644 (global_bindings_p): Likewise.
645 (innermost_nonclass_level): Likewise.
646 (toplevel_bindings_p): Likewise.
647 (namespace_bindings_p): Likewise.
648 (kept_level_p): Likewise.
649 (innermost_scope_kind): Likewise.
650 (template_parm_scope_p): Likewise.
651 (push_binding): Likewise.
652 (push_local_binding): Likewise.
653 (add_decl_to_level): Likewise. Make extern.
654 (push_class_binding): Move to name-lookup.c.
655 (resume_level): Likewise. Rename to resume_scope.
656 (begin_scope): Move to name-lookup.c.
657 (indent): Likewise.
658 (binding_depth): Likewise.
659 (is_class_level): Likewise.
660 (cxx_scope_descriptor): Likewise.
661 (cxx_scope_debug): Likewise.
662 (namespace_scope_ht_size): Likewise.
663 (leave_scope): Likewise.
664 (pushlevel_class): Likewise.
665 (poplevel_class): Likewise.
666 (clear_identifier_class_values): Likewise.
667 (pushdecl_with_scope): Likewise.
668 (pushdecl_namespace_level): Likewise.
669 (pushdecl_class_level): Likewise.
670 (push_class_level_binding): Likewise.
671 (push_using_directive): Likewise.
672 (identifier_global_value): Likewise.
673 (keep_next_level_flag): Likewise.
674 (keep_next_level): Likewise.
675 (free_binding_level): Likewise.
676 (set_class_shadows): Likewise.
677 (maybe_push_cleanup_level): Likewise.
678 (cp_namespace_decls): Likewise.
679 (bt_print_entry): Likewise.
680 (print_binding_level): Likewise.
681 (print_other_binding_stack): Likewise.
682 (print_binding_stack): Likewise.
683 (push_namespace): Likewise.
684 (pop_namespace): Likewise.
685 (push_nested_namespace): Likewise.
686 (pop_nested_namespace): Likewise.
687 (cxx_saved_binding_make): Likewise.
688 (struct cxx_saved_binding_make): Likewise.
689 (store_bindings): Likewise.
690 (maybe_push_to_top_level): Likewise.
691 (push_to_top_level): Likewise.
692 (pop_from_top_level): Likewise.
693 (identifier_type_value): Likewise.
694 (set_identifier_type_value): Likewise.
695 (set_identifier_type_value_with_scope): Likewise.
696 (pop_everything): Likewise.
697 (pushtag): Likewise.
698 (follow_tag_typedef): Likewise.
699 (maybe_process_template_type_declaration): Likewise.
700 (pop_binding): Likewise.
701 * cp-tree.h: Move corresponding declarations to name-lookup.h
702
703 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
704
705 * cvt.c (ocp_convert): Move warning to C common code.
706
707 2003-10-09 Jason Merrill <jason@redhat.com>
708
709 PR c++/6392
710 * tree.c (build_cplus_array_type): Handle all quals the same.
711 (cp_build_qualified_type_real): Look through arrays first.
712
713 * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
714 (build_target_expr_with_type): Likewise.
715
716 * pt.c (instantiate_class_template): Sanity check that our
717 enclosing class has been instantiated.
718
719 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
720
721 * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
722 * error.c (dump_function_decl): Use it to skip the dump of the
723 arguments.
724 (dump_expr): When dumping a declaration found within an
725 expression, always set TFF_NO_FUNCTION_ARGUMENTS
726 in the flags.
727
728 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
729
730 PR c++/11097
731 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
732 USING_DECL.
733
734 2003-10-06 Mark Mitchell <mark@codesourcery.com>
735
736 PR c++/10147
737 * call.c (initialize_reference): Tweak error message.
738 * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
739 pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
740 * cxx-pretty-print.c (pp_cxx_id_expression): Always display
741 qualified entities using qualified names.
742
743 PR c++/12337
744 * init.c (build_new_1): Make sure that the expression returned is
745 not an lvalue.
746
747 PR c++/12344, c++/12236, c++/8656
748 * decl.c (start_function): Do not ignore attributes embedded in a
749 function declarator.
750
751 2003-10-06 Mark Mitchell <mark@codesourcery.com>
752
753 * Make-lang.in (c++.info): Remove.
754 (c++.dvi): Remove.
755 (c++.generated-manpages): Replace with ...
756 (generated-manpages): ... this.
757
758 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
759
760 * decl.c (struct cp_binding_level): Move to name-lookup.h
761 (current_binding_level): Likewise.
762 (class_binding_level): Likewise.
763 * cp-tree.h (enum scope_kind): Likewise.
764
765 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
766
767 * name-lookup.c (binding_entry_free): Nullify name and type
768 fields.
769
770 2003-10-02 Mark Mitchell <mark@codesourcery.com>
771
772 PR c++/12486
773 * typeck.c (finish_class_member_access_expr): Issue diagnostic
774 on erroneous use of qualified name.
775
776 2003-09-30 Richard Henderson <rth@redhat.com>
777
778 PR c++/12370
779 * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
780
781 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
782
783 * g++spec.c: Convert to ISO C90 prototypes.
784 * parser.c: Likewise.
785
786 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
787
788 * decl.c (pop_binding): Don't mess with nullifying binding->scope
789 here.
790 * name-lookup.c: Re-format.
791 (cxx_binding_free): Nullify binding->scope.
792
793 2003-09-29 Jan Hubicka <jh@suse.cz>
794
795 PR C++/12047
796 * except.c (build_eh_type_type): Call mark_used on the type.
797
798 2003-09-28 Richard Henderson <rth@redhat.com>
799
800 * typeck.c (c_expand_asm_operands): Take location_t, instead of
801 individual file and line.
802
803 2003-09-28 Andreas Jaeger <aj@suse.de>
804
805 * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
806 definition.
807 * init.c (push_base_cleanups): Likewise.
808 * decl2.c (finish_file): Likewise.
809 * mangle.c (init_mangle): Likewise.
810 (dump_substitution_candidates): Likewise.
811 * search.c: Likewise.
812
813 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
814
815 * name-lookup.h (get_global_value_if_present): New function.
816 (is_typename_at_global_scope): Likewise.
817 * except.c (do_begin_catch): Use get_global_value_if_present.
818 (do_end_catch): Likewise.
819 (do_allocate_exception): Likewise.
820 (do_free_exception): Likewise.
821 (build_throw): Likewise.
822 * parser.c (cp_parser_member_declaration): Likewise.
823 * rtti.c (throw_bad_cast): Likewise.
824 (throw_bad_typeid): Likewise.
825 * decl.c (check_tag_decl): Use is_typename_at_global_scope.
826 (grokdeclarator): Likewise.
827 * cp-tree.h (global_namespace): Move to name-lookup.h
828 * call.c (call_builtin_trap): Tidy.
829
830 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
831
832 PR c++/11415
833 * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
834 error message when parser->scope is global_namespace.
835
836 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
837
838 * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
839 macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
840
841 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
842
843 * decl.c (pop_binding_level, suspend_binding_level,
844 find_class_binding_level): Merge into leave_scope. Remove.
845 (leave_scope): New function.
846 (poplevel): Update.
847 (poplevel_class): Likewise.
848 (pop_namespace): Likewise.
849
850 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
851
852 PR c++/5655
853 * parser.c (cp_parser_check_access_in_redeclaration): New function.
854 (cp_parser_member_declaration): Use it.
855 (cp_parser_template_declaration_after_export): Likewise.
856
857 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
858
859 * cp-tree.h (scope_kind): Add new enumerator.
860 (keep_next_level): Change parameter type to bool.
861 (begin_scope): Change prototype.
862 (pushlevel): Remove declaration.
863 * decl.c (push_binding_level): Fold in begin_scope. Remove.
864 (struct cp_binding_level): Remove tag_tranparent field. Make keep
865 of bitsize one.
866 (keep_next_level_flag): Make a bool.
867 (cxx_scope_descriptor): Update scope names table
868 (make_cxx_scope): Fold in begin_scope. Remove..
869 (namespace_scope_ht_size): New function.
870 (begin_scope): Change prototype. Return a scope. Tidy.
871 (kept_level_p): Update.
872 (pushlevel): Remove.
873 (maybe_push_cleanup_level): Simplify.
874 (poplevel): Update for sk_cleanup and keep change.
875 (print_binding_level): Likewise.
876 (initial_push_namespace_scope): Fold in begin_scope. Remove.
877 (push_namespace): Update.
878 (pushtag): Likewise.
879 (lookup_tag): Likewise.
880 (lookup_name_current_level): Likewise.
881 (lookup_type_current_level): Likewise.
882 (cxx_init_decl_processing): Likewise.
883 (start_function): Likewise.
884 (begin_function_body): Likewise.
885 (start_method): Likewise.
886 * pt.c (push_inline_template_parms_recursive): Likewise.
887 (begin_template_parm_list): Likewise.
888 (begin_specialization): Likewise.
889 * semantics.c (do_pushlevel): Likewise.
890 (begin_compound_stmt): Likewise.
891 (begin_stmt_expr): Likewise.
892
893 2003-09-21 Richard Henderson <rth@redhat.com>
894
895 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
896 method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
897
898 2003-09-21 Richard Henderson <rth@redhat.com>
899
900 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
901 method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
902 DECL_SOURCE_LOCATION rename and change to const.
903
904 2003-09-20 Richard Henderson <rth@redhat.com>
905
906 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
907
908 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
909
910 PR c++/157
911 * parser.c (cp_parser_direct_declarator): Clear
912 parser->num_template_parameter_lists when parsing function
913 parameters.
914 (cp_parser_constructor_declarator_p): Likewise.
915
916 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
917
918 PR c++/495
919 * pt.c (tsubst_friend_class): Only use innermost template
920 arguments for the injected friend class template.
921
922 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
923
924 PR c++/12332
925 * pt.c (instantiate_class_template): Increment
926 processing_template_decl around the tsubst of a template member
927 function.
928
929 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
930
931 * decl.c (cxx_scope_descriptor): Fix thinko.
932 (struct cp_binding_level): Adjust type of binding_depth field.
933
934 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
935
936 PR c++/12320
937 * call.c (type_passed_as): Check for incomplete type.
938 (convert_for_arg_passing): Likewise.
939
940 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
941
942 PR c++/9848
943 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
944 here.
945 * semantics.c (expand_body): Set it here on the remaining clones.
946
947 2003-09-18 Roger Sayle <roger@eyesopen.com>
948
949 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
950 * class.c (instantiate_type): Remove FFS_EXPR case.
951
952 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
953
954 * ChangeLog: Fix recent commit.
955
956 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
957
958 * ChangeLog: Add PR number to patch for PR c++/12316.
959
960 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
961
962 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
963 "C" types.
964 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
965
966 2003-09-17 Richard Henderson <rth@redhat.com>
967
968 * semantics.c (expand_body): Don't save/restore input_location.
969
970 2003-09-17 Mark Mitchell <mark@codesourcery.com>
971
972 PR c++/12266
973 * cp-tree.h (tsubst_flags_t): Add tf_conv.
974 * class.c (standard_conversion): Pass tf_conv to
975 instantiate_type.
976 (resolve_address_of_overloaded_function): Do not call mark_used
977 when just checking conversions.
978
979 PR debug/12066
980 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
981 * cp-tree.h (cxx_builtin_type_decls): Declare.
982 * decl.c (builtin_type_decls): New variables.
983 (cxx_builtin_type_decls): New function.
984 (record_builtin_type): Add to builtin_type_decls.
985
986 2003-09-17 Richard Henderson <rth@redhat.com>
987
988 PR c++/12316
989 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
990
991 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
992
993 PR c++/7939
994 * typeck.c (comptypes): Don't ICE when its first argument is
995 error_mark_node.
996 (compparms): Reverse the arguments of same_type_p.
997
998 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
999
1000 PR c++/12184
1001 * typeck.c (convert_arguments): Return error_mark_node for an
1002 incomplete parameter. Make error message more informative.
1003
1004 2003-09-12 Mark Mitchell <mark@codesourcery.com>
1005
1006 PR c++/3907
1007 * class.c (maybe_note_name_used_in_class): Refine test for whether
1008 or not we are in a class scope.
1009
1010 * cp-tree.h (language_function): Remove x_expanding_p.
1011 (expanding_p): Remove.
1012 (doing_semantic_analysis_p): Remove.
1013 (scope_kind): Add sk_function_parms, sk_class,
1014 sk_namespace.
1015 (innermost_scope_kind): New method.
1016 * call.c (cxx_type_promotes_to): Use type_decays_to.
1017 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
1018 (LANG_HOOKS_POPLEVEL): Likewise.
1019 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
1020 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
1021 is_catch_scope. Add kind and explicit_spec_p.
1022 (cxx_scope_descriptor): Use a lookup table.
1023 (find_class_binding_level): Use "kind" field in binding_level, not
1024 the various flags.
1025 (pop_binding_level): Likewise.
1026 (innermost_nonclass_level): Likewise.
1027 (toplevel_bindings_p): Likewise.
1028 (namespace_bindings_p): Likewise.
1029 (template_parm_scope_p): Likewise.
1030 (innermost_scope_kind): New method.
1031 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
1032 the various flags.
1033 (pushlevel): Remove check for doing_semantic_analysis_p.
1034 (begin_scope): Simplify.
1035 (add_decl_to_level): Use "kind" field in binding_level, not
1036 the various flags.
1037 (push_local_binding): Likewise.
1038 (pop_label): Remove check for doing_semantic_analysis_p.
1039 (poplevel): Use "kind" field in binding_level, not
1040 the various flags.
1041 (set_block): Remove check for doing_semantic_analysis_p.
1042 (pushlevel_class): Use "kind" field in binding_level, not
1043 the various flags.
1044 (poplevel_class): Likewise.
1045 (initial_push_namespace_scope): Likewise.
1046 (maybe_push_to_top_level): Likewise.
1047 (set_identifier_type_value_with_scope): Likewise.
1048 (pop_everything): Likewise.
1049 (maybe_process_template_type_declaration): Likewise.
1050 (pushtag): Likewise.
1051 (pushdecl): Likewise.
1052 (pushdecl_with_scope): Likewise.
1053 (check_previous_goto_1): Likewise.
1054 (define_label): Likewise.
1055 (finish_case_label): Likewise.
1056 (lookup_tag): Likewise.
1057 (unqualified_namespace_lookup): Likewise.
1058 (lookup_name_real): Likewise.
1059 (lookup_name_current_level): Likewise.
1060 (lookup_type_current_level): Likewise.
1061 (record_builtin_type): Likewise.
1062 (cp_make_fname_decl): Likewise.
1063 (maybe_inject_for_scope_var): Likewise.
1064 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
1065 (start_function): Use begin_scope, not pushlevel.
1066 (finish_function): Use "kind" field in binding_level, not
1067 the various flags.
1068 (start_method): Use begin_scope, not pushlevel.
1069 (make_label_decl): Do not check expanding_p.
1070 (save_function-data): Do not set expanding_p.
1071 (cxx_push_function_context): Do not clear expanding_p.
1072 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
1073
1074 2003-09-14 Mark Mitchell <mark@codesourcery.com>
1075
1076 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
1077 an bit-field whose width exceeds that of its type.
1078
1079 2003-09-14 Geoffrey Keating <geoffk@apple.com>
1080
1081 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
1082
1083 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
1084
1085 * ChangeLog: Follow spelling conventions.
1086 * parser.c: Likewise.
1087
1088 2003-09-13 Richard Henderson <rth@redhat.com>
1089
1090 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
1091 during relaxation loop.
1092
1093 2003-09-11 David Edelsohn <edelsohn@gnu.org>
1094
1095 * decl2.c (var_finalized_p): Swap arms of conditional.
1096
1097 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
1098
1099 PR c++/11788
1100 * typeck.c (build_address): If it is a function, mark it used.
1101 (build_unary_op): Do not lose object's side-effects when taking
1102 address of static member function.
1103 * class.c (resolve_address_of_overloaded_function): Use
1104 tsubst_flags_t parameter. Only expect overload sets. Adjust.
1105 (instantiate_type): Adjust flags passing. Do not lose object's
1106 side-effects when taking address of static member function.
1107
1108 2003-09-11 Richard Henderson <rth@redhat.com>
1109
1110 * semantics.c (expand_or_defer_fn): Update for new
1111 cgraph_finalize_function argument.
1112
1113 2003-09-10 Richard Henderson <rth@redhat.com>
1114
1115 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
1116
1117 2003-09-10 Jan Hubicka <jh@suse.cz>
1118
1119 * decl2.c (var_finalized_p): New.
1120 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
1121
1122 2003-09-10 Richard Henderson <rth@redhat.com>
1123
1124 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
1125 mark_member_pointers.
1126 (lower_function): Remove.
1127 * cp-tree.h: Update to match.
1128 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
1129 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
1130
1131 2003-09-09 Richard Henderson <rth@redhat.com>
1132
1133 * semantics.c (expand_or_defer_fn): Update call to
1134 cgraph_finalize_function.
1135
1136 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1137 always.
1138
1139 * decl2.c (finish_file): Avoid out-of-bounds array reference
1140 during memmove.
1141
1142 2003-09-09 Richard Henderson <rth@redhat.com>
1143
1144 * decl2.c (mark_member_pointers): Rename from
1145 mark_member_pointers_and_eh_handlers and don't check eh handlers.
1146
1147 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
1148
1149 PR bootstrap/12168
1150 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1151
1152 2003-09-08 Mark Mitchell <mark@codesourcery.com>
1153
1154 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1155 c_register_builtin_type.
1156
1157 PR c++/11786
1158 * decl2.c (add_function): Do not complain about seeing the same
1159 non-function twice.
1160 * semantics.c (perform_koenig_lookup): Improve documentation.
1161
1162 PR c++/5296
1163 * pt.c (try_one_overload): Add addr_p parameter.
1164 (resolve_overloaded_unification): Pass it.
1165
1166 2003-09-08 Richard Henderson <rth@redhat.com>
1167
1168 * optimize.c (maybe_clone_body): Inc/dec function_depth.
1169
1170 2003-09-08 Richard Henderson <rth@redhat.com>
1171
1172 * decl.c (finish_function): Clear current_function_decl.
1173 * decl2.c (mark_used): Don't push/pop gc context.
1174 * optimize.c (optimize_function): Likewise.
1175 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1176 * pt.c (instantiate_decl): Inc/dec function_depth instead.
1177 * semantics.c (expand_body): Update for tree_rest_of_compilation
1178 nested argument.
1179
1180 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
1181
1182 PR c++/11762
1183 * error.c (dump_decl): Handle namespace-alias-definition.
1184 * decl.c (warn_extern_redeclared_static): There is no point in
1185 checking changes in storage class specifier for a namespace
1186 declaration.
1187 (duplicate_decls): Tidy diagnostic message.
1188 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1189 (pp_cxx_right_brace): Likewise.
1190 (pp_cxx_original_namespace_definition): New function.
1191 (pp_cxx_namespace_alias_definition): Likewise.
1192 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
1193
1194 2003-09-07 Jan Hubicka <jh@suse.cz>
1195
1196 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1197 Avoid re-emitting variables in unit-at-a-time mode.
1198
1199 2003-09-06 Mark Mitchell <mark@codesourcery.com>
1200
1201 PR c++/11867
1202 * call.c (standard_conversion): Improve comments.
1203 (perform_direct_initialization): Make sure we return an expression
1204 of the correct type.
1205 * typeck.c (build_static_cast): Check for ambiguity and
1206 accessibility when performing conversions.
1207
1208 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
1209
1210 * cp-tree.h (add_binding): Remove declaration.
1211 * name-lookup.h (supplement_binding): Declare.
1212 * decl.c (add_binding): Move to name-lookup.c.
1213 (push_local_binding): Adjust.
1214 (push_class_binding): Likewise.
1215 (set_identifier_type_value_with_scope): Likewise.
1216 * name-lookup.c (supplement_binding): Rename from add_binding.
1217 Return a bool. Improve documentation.
1218 (set_namespace_binding): Adjust.
1219 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1220
1221 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1222
1223 PR c++/11794
1224 * class.c (pushclass): Push dependent using decls for nested
1225 classes of templates too.
1226
1227 2003-09-06 Roger Sayle <roger@eyesopen.com>
1228
1229 PR c++/11409
1230 * class.c (resolve_address_of_overloaded_function): When building
1231 list of matching non-template function decls, ignore anticipated
1232 declarations of undeclared or shadowed GCC builtins.
1233
1234 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
1235
1236 PR c++/11595
1237 * decl.c (define_label): Remove unreachable timevar pop.
1238 Always return the decl, even if the definition is invalid.
1239
1240 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1241
1242 PR c++/12167
1243 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1244 unparsed functions queue.
1245
1246 2003-09-05 Mark Mitchell <mark@codesourcery.com>
1247
1248 PR c++/12163
1249 * call.c (perform_direct_initialization): Correct logic for
1250 direct-initialization of a class type.
1251
1252 PR c++/12146
1253 * pt.c (lookup_template_function): Robustify.
1254
1255 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
1256
1257 PR c++/11922
1258 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1259 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1260 is_type_p to lookup_qualified_name.
1261
1262 * semantics.c (finish_call_expr): Refactor some code.
1263
1264 PR c++/12037
1265 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1266 (build_min_non_dep): Declare.
1267 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1268 (build_min_non_dep): New.
1269 * cvt.c (convert_to_void): Don't explicitly copy
1270 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1271 * call.c (build_new_method_call): Use build_min_non_dep.
1272 * decl2.c (grok_array_decl): Likewise.
1273 (build_offset_ref_call_from_tree): Likewise.
1274 * typeck.c (finish_class_member_access_expr,
1275 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1276 build_x_conditional_expr, build_x_compound_expr): Likewise.
1277 (build_static_cast, build_reinterpret_cast,
1278 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1279 * typeck2.c (build_x_arrow): Use build_min_non_dep.
1280 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1281 template.
1282 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1283 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1284 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1285
1286 2003-09-04 Richard Henderson <rth@redhat.com>
1287
1288 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1289 change in cgraph_mark_needed_node arguments.
1290
1291 2003-09-02 Geoffrey Keating <geoffk@apple.com>
1292
1293 PR 12161
1294 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1295 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1296
1297 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
1298
1299 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1300 (expr_sizeof): Replace with ...
1301 (cxx_sizeof_or_alignof_expr): ... here.
1302 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1303 * parser.c (cp_parser_unary_expression): Commonize alignof and
1304 sizeof handling.
1305 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1306 substitution.
1307 * semantics.c (finish_sizeof, finish_alignof): Remove.
1308 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1309 becomes bool. Set TREE_READONLY.
1310 (expr_sizeof): Replace with ...
1311 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1312
1313 2003-09-04 Mark Mitchell <mark@codesourcery.com>
1314
1315 Remove cast-as-lvalue extension.
1316 * call.c (build_conditional_expr): Correct formatting.
1317 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1318 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1319 * cp-tree.h (non_cast_lvalue_p): Remove.
1320 (real_non_cast_lvalue_p): Remove.
1321 (non_cast_lvalue_or_else): Remove.
1322 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1323 (real_lvalue_p): Adjust call to lvalue_p_1.
1324 (non_cast_lvalue_p): Remove.
1325 (non_cast_lvalue_or_else): Remove.
1326 (lvalue_p): Adjust call to lvalue_p_1.
1327 (lvalue_or_else): Simplify.
1328 * typeck.c (build_unary_op): Use lvalue_or_else, not
1329 non_cast_lvalue_or_else.
1330 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1331
1332 2003-09-03 DJ Delorie <dj@redhat.com>
1333
1334 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1335
1336 2003-09-03 Mark Mitchell <mark@codesourcery.com>
1337
1338 PR c++/12053
1339 * class.c (include_empty_classes): Correct logic for ABI version 1.
1340
1341 2003-09-03 Richard Henderson <rth@redhat.com>
1342
1343 * optimize.c (optimize_function): Push/pop ggc context around
1344 the call to optimize_inline_calls.
1345
1346 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
1347
1348 PR c++/11553
1349 * parser.c (cp_parser_decl_specifier_seq): Add check for a
1350 duplicate friend decl-specifier.
1351
1352 2003-09-02 Mark Mitchell <mark@codesourcery.com>
1353
1354 PR c++/11847
1355 * pt.c (convert_nontype_argument): Correct representation of
1356 REFERENCE_TYPE expressions.
1357
1358 PR c++/11808
1359 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1360 (finish_call_expr): Change prototype.
1361 * parser.c (cp_parser_postfix_expression): Adjust call to
1362 finish_call_expr.
1363 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1364 * semantics.c (finish_call_expr): Add koenig_p parameter.
1365
1366 2003-09-01 Mark Mitchell <mark@codesourcery.com>
1367
1368 PR c++/12114
1369 * cp-tree.h (initialize_reference): Change prototype.
1370 * call.c (initialize_reference): Add cleanup parameter.
1371 * decl.c (grok_reference_init): Likewise.
1372 (check_initializer): Likewise.
1373 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1374 (duplicate_decls): When replacing an anticipated builtin, do not
1375 honor TREE_NOTHROW.
1376 * typeck.c (convert_for_initialization): Correct call to
1377 initialize_reference.
1378
1379 PR c++/11972
1380 * pt.c (dependent_type_p_r): Pass only the innermost template
1381 arguments to any_dependent_template_arguments_p.
1382
1383 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
1384
1385 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1386 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1387 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1388 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1389 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1390
1391 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1392
1393 PR c++/12093
1394 * pt.c (build_non_dependent_expr): Do not build a
1395 NON_DEPENDENT_EXPR for a STRING_CST.
1396
1397 PR c++/11928
1398 * search.c (add_conversions): Avoid adding two conversion
1399 operators for the same type.
1400
1401 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1402
1403 PR c++/6196
1404 * pt.c (tsubst_copy_and_build): Correct handling of
1405 address-of-label extension.
1406 * semantics.c (finish_goto_stmt): The address of a label must go
1407 through the lvalue-to-rvalue conversion.
1408
1409 2003-08-29 Richard Henderson <rth@redhat.com>
1410 Jason Merrill <jason@redhat.com>
1411
1412 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1413 (LANG_HOOKS_RTL_EXPAND_STMT): New.
1414 * cp-tree.h (cxx_expand_function_start): Declare.
1415 * decl.c (start_function): Use allocate_struct_function.
1416 Move stmts_are_full_exprs_p assertion from expand_body.
1417 Do not free_after_parsing or free_after_compilation.
1418 (cxx_push_function_context): Move code to set struct function
1419 data from genrtl_start_function.
1420 * optimize.c (optimize_function): Don't inc/dec function_depth.
1421 * semantics.c (expand_body): Use tree_rest_of_compilation.
1422 (cxx_expand_function_start): Rename from genrtl_start_function,
1423 omit bits done by tree_rest_of_compilation.
1424 (genrtl_finish_function): Remove.
1425 (clear_decl_rtl): Move to ../tree-optimize.c.
1426
1427 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1428
1429 PR c++/11811
1430 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1431 function.
1432 * cxx-pretty-print.h: Declare.
1433 * error.c (dump_template_parameter): Use it.
1434 (dump_type): Likewise.
1435
1436 2003-08-28 Mark Mitchell <mark@codesourcery.com>
1437
1438 * init.c (decl_constant_value): Deal with COND_EXPR specially.
1439 * call.c (build_conditional_expr): Revert previous patch.
1440
1441 PR optimization/5079
1442 * call.c (build_conditional_expr): Use decl_constant_value to
1443 simplify the arguments.
1444
1445 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
1446
1447 * parser.c (struct cp_token): Use enum bitfields.
1448 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1449 512B allocation unit.
1450 (cp_parser_token_tree_map_node): Use enum bitfields.
1451
1452 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
1453
1454 PR c++/11871
1455 * decl.c (push_class_level_binding): Correct old_decl value from
1456 my 2003-07-29 reorganization.
1457
1458 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1459 (build_new_method_call): Add goto finish.
1460 * semantics.c (simplify_aggr_init_exprs_r): Don't set
1461 TREE_SIDE_EFFECTS on a call.
1462
1463 2003-08-25 Richard Henderson <rth@redhat.com>
1464
1465 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1466
1467 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1468
1469 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1470 (cxx_pretty_printer): Adjust base type.
1471 (pp_cxx_function_specifier): Declare.
1472 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1473 (pp_cxx_left_paren): Likewise.
1474 (pp_cxx_right_paren): Likewise.
1475 (pp_cxx_dot): Likewise.
1476 (pp_cxx_arrow): Likewise.
1477 (pp_cxx_semicolon): Likewise.
1478 (pp_cxx_identifier): Likewise.
1479 (pp_cxx_cv_qualifier_seq): Likewise.
1480 (pp_cxx_storage_class_specifier): Likewise.
1481 (pp_cxx_expression_list): Likewise.
1482 (pp_cxx_space_for_pointer_operator): Likewise.
1483 (pp_cxx_init_declarator): Likewise.
1484 (pp_cxx_call_argument_list): Likewise.
1485 (pp_cxx_nonconsecutive_character): Tidy.
1486 (pp_cxx_conversion_function_id): New function.
1487 (pp_cxx_template_id): Likewise.
1488 (pp_cxx_template_keyword_if_needed): Likewise.
1489 (pp_cxx_nested_name_specifier): Likewise.
1490 (pp_cxx_unqualified_id): Tidy
1491 (pp_cxx_qualified_id): Handle more nodes.
1492 (pp_cxx_primary_expression): Tidy.
1493 (pp_cxx_postfix_expression): Likewise.
1494 (pp_cxx_new_expression): Tidy.
1495 (pp_cxx_delete_expression): Likewise.
1496 (pp_cxx_cast_expression): New function.
1497 (pp_cxx_pm_expression): Tidy.
1498 (pp_cxx_conditional_expression): Likewise.
1499 (pp_cxx_assignment_operator): New function.
1500 (pp_cxx_assignment_expression): Tidy.
1501 (pp_cxx_expression): New function.
1502 (pp_cxx_function_specifier): Likewise.
1503 (pp_cxx_decl_specifier_seq): Likewise.
1504 (pp_cxx_simple_type_specifier): Tidy.
1505 (pp_cxx_type_specifier_seq): Likewise.
1506 (pp_cxx_ptr_operator): New function.
1507 (pp_cxx_implicit_parameter_type): Likewise.
1508 (pp_cxx_parameter_declaration): Tidy.
1509 (pp_cxx_parameter_declaration_clause): New function.
1510 (pp_cxx_exception_specification): Likewise.
1511 (pp_cxx_direct_declarator): Tidy.
1512 (pp_cxx_declarator): Likewise.
1513 (pp_cxx_ctor_initializer): New function.
1514 (pp_cxx_function_definition): Likewise.
1515 (pp_cxx_abstract_declarator): Tidy.
1516 (pp_cxx_direct_abstract_declarator): Likewise.
1517 (pp_cxx_type_id): Likewise.
1518 (pp_cxx_exception_declaration): New function.
1519 (pp_cxx_statement): Likewise.
1520 (pp_cxx_simple_declaration): Likewise.
1521 (pp_cxx_template_parameter_list): Likewise.
1522 (pp_cxx_template_parameter): Likewise.
1523 (pp_cxx_template_declaration): Likewise.
1524 (pp_cxx_explicit_specialization): Likewise.
1525 (pp_cxx_explicit_instantiation): Likewise.
1526 (pp_cxx_declaration): Tidy.
1527 (pp_cxx_pretty_printer_init): Initialize more fields.
1528
1529 2003-08-25 Mark Mitchell <mark@codesourcery.com>
1530
1531 PR c++/8795
1532 * cp-tree.h (build_cplus_method_type): Remove.
1533 * call.c (standard_conversion): Use build_method_type_directly
1534 instead of build_cplus_method_type.
1535 * class.c (build_clone): Likewise.
1536 (adjust_clone_args): Likewise.
1537 * decl.c (build_ptrmem_type): Likewise.
1538 (grokdeclarator): Likewise.
1539 (check_function_type): Likewise.
1540 * decl2.c (grok_method_quals): Likewise.
1541 (maybe_retrofit_in_chrg): Likewise.
1542 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1543 (tsubst_function_type): Likewise.
1544 (tsubst): Likewise.
1545 * tree.c (build_cplus_method_type): Remove.
1546 * typeck.c (merge_types): Use build_method_type_directly.
1547
1548 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1549
1550 PR c++/3765
1551 * search.c (dfs_access_in_type): Fix typo in comment.
1552 (dfs_accessible_queue_p): Likewise.
1553 (dfs_accessible_p): Only terminate when a friend is found.
1554 (accessible_p): Return immediately if access_in_type allows
1555 access.
1556
1557 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1558
1559 PR c++/641, c++/11876
1560 * friend.c (add_friend): Add complain parameter.
1561 (make_friend_class): Likewise.
1562 (do_friend): Adjust add_friend call.
1563 * decl.c (grokdeclarator): Adjust make_friend_class call.
1564 * parser.c (cp_parser_member_declaration): Likewise.
1565 (cp_parser_template_declaration_after_export): Likewise.
1566 * pt.c (instantiate_class_template): Adjust make_friend_class
1567 and add_friend call.
1568 * cp-tree.h (make_friend_class): Adjust declaration.
1569 (add_friend): Likewise.
1570
1571 2003-08-21 Jason Merrill <jason@redhat.com>
1572
1573 PR c++/11283
1574 * call.c (build_conditional_expr): Ignore cv-qual differences for
1575 non-class types.
1576
1577 2003-08-21 Mark Mitchell <mark@codesourcery.com>
1578
1579 PR c++/11551
1580 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1581 (cp_parser_primary_expression): Adjust call to
1582 cp_parser_id_expression.
1583 (cp_parser_unqualified_id): Complain about the use of
1584 typedef-names in a destructor declarator.
1585 (cp_parser_postfix_expression): Adjust call to
1586 cp_parser_id_expression.
1587 (cp_parser_type_parameter): Likewise.
1588 (cp_parser_template_argument): Likewise.
1589 (cp_parser_declarator_id): Likewise.
1590
1591 PR c++/11919
1592 * call.c (standard_conversion): Use same_type_p, not pointer
1593 equality, to compare types.
1594
1595 PR c++/10762
1596 * parser.c (cp_parser_using_declaration): Check for invalid uses
1597 of template-ids here...
1598 * decl2.c (do_class_using_decl): ... rather than here.
1599
1600 2003-08-20 Mark Mitchell <mark@codesourcery.com>
1601
1602 PR c++/11834
1603 * pt.c (more_specialized): Bump processing_template_decl.
1604
1605 2003-08-21 Jason Merrill <jason@redhat.com>
1606
1607 PR c++/11614
1608 * decl.c (grokdeclarator): Recognize a flexible array based on the
1609 type, not the form of the declarator.
1610
1611 2003-08-20 Jason Merrill <jason@redhat.com>
1612
1613 * semantics.c (simplify_aggr_init_expr): Split out from
1614 simplify_aggr_init_exprs_r. Convert slot address to match
1615 the return type.
1616 * cp-tree.h: Declare it.
1617 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1618 DECL_NAME of a user variable.
1619
1620 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
1621
1622 PR c++/11945
1623 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1624 COMPOUND_EXPR.
1625 * semantics.c (finish_expr_stmt): Always convert to void.
1626 * typeck.c (build_x_compound_exp): Always convert to void.
1627
1628 2003-08-19 Mark Mitchell <mark@codesourcery.com>
1629
1630 PR c++/11684
1631 * cp-tree.h (grok_op_properties): Change prototype.
1632 * decl.c (grok_op_properties): Add complain parameter.
1633 (grokfndecl): Pass it.
1634 * pt.c (tsubst_decl): Adjust accordingly.
1635
1636 PR c++/10926
1637 * decl.c (start_method): Return immediately if push_template_decl
1638 does not like the declaration.
1639 * pt.c (push_template_decl_real): Disallow member template
1640 destructors.
1641
1642 PR c++/11036
1643 * cp-tree.h (add_binding): Add prototype.
1644 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1645 (maybe_warn_about_overly_private_class): Use
1646 CLASSTYPE_DESTRUCTORS.
1647 (pushclass): Adjust call to set_identifier_type_value.
1648 * decl.c (add_binding): Give it external linkage.
1649 (push_local_binding): Adjust call to add_binding.
1650 (push_class_binding): Likewise.
1651 (set_identifier_type_value_with_scope): Change prototype. Use
1652 add_binding for global bindings.
1653 (set_identifier_type_value): Adjust accordingly.
1654 (pushtag): Likewise.
1655 (pushdecl): Use set_identifier_type_value, not
1656 set_identifier_type_value_with_scope.
1657 (pushdecl_namespace_level): Adjust calls to
1658 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1659 (pushdecl_class_level): Likewise.
1660 (lookup_tag): Use select_decl.
1661 (select_decl): Improve comment.
1662 (record_builtin_type): Do not call pushdecl.
1663 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1664 (cp_finish_decl): Adjust call to set_identifier_type_value.
1665 (check_elaborated_type_specifier): Improve checks for invalid uses
1666 of typedefs.
1667 (xref_tag): Adjust call to check_elaborated_type_specifier.
1668 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1669 * name-lookup.c (set_namespace_binding): Use add_binding.
1670 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1671 rather than an IDENTIFIER_NODE, to represent built-in types, if
1672 requested by the caller.
1673 (cp_parser_postfix_expression): Adjust call.
1674 (cp_parser_type_specifier): Likewise.
1675 (cp_parser_elaborated_type_specifier): Adjust call to
1676 check_elaborated_type_specifier.
1677 * typeck2.c (build_functional_cast): Do not perform name lookups.
1678
1679 PR c++/10717
1680 * decl.c (expand_static_init): Remove unnecessary code.
1681
1682 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
1683
1684 PR c++/10538, PR c/5582
1685 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1686
1687 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1688
1689 PR c++/11174
1690 * init.c (build_offset_ref): Perform access checking for
1691 pointer to member correctly.
1692
1693 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
1694
1695 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1696
1697 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
1698
1699 PR c++/11957
1700 * cp-tree.h (finish_stmt_expr): Add bool parameter.
1701 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1702 adjust the stmt_expr here.
1703 (build_vec_init): Use finish_stmt_expr_expr, convert result to
1704 array type.
1705 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1706 call.
1707 * pt.c (tsubst_copy): Likewise.
1708 * semantics.c (finish_stmt_expr): Add parameter.
1709
1710 * pt.c (instantiate_class_template): Push to class's scope before
1711 tsubsting base.
1712
1713 2003-08-17 Jan Hubicka <jh@suse.cz>
1714
1715 PR C++/11702
1716 * semantics.c (finish_id_expression): Mark all functions as used.
1717
1718 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
1719
1720 PR c++/11512
1721 * cvt.c (convert_to_void): Indicate which side of conditional has
1722 no effects, and rhs of comma operator. Test for no sideeffect
1723 expressions here and always build a convert expr.
1724 * init.c (expand_default_init): Convert the init to void.
1725 * typeck.c (build_x_compound_expr): Do not check for side effects
1726 here.
1727 (build_compound_expr): Do not convert lhs when building a
1728 template.
1729
1730 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1731
1732 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1733 * decl2.c (build_offset_ref_call_from_tree): Use
1734 build_non_dependent_expr.
1735 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1736 * pt.c (build_non_dependent_expr): Set operand.
1737
1738 2003-08-14 Jan Hubicka <jh@suse.cz>
1739
1740 * decl2.c (mark_member_pointers): Rename to...
1741 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1742 (lower_function): Update call.
1743 * except.c (eh_type_info): Break out from ...
1744 (build_eh_type): ... here; tinfo is already used.
1745 (finish_eh_spec_block): Mark tinfos as used.
1746 * semantics.c (finish_handler_params): Mark tinfo as used.
1747 * cp-tree.h (eh_type_info): Declare.
1748
1749 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1750
1751 * pt.c (instantiate_class_template): Set location before
1752 substuting bases.
1753
1754 * decl.c (make_typename_type): Use my_friendly_assert.
1755 * pt.c (tsubst_aggr_type): Rearrange context substitution.
1756
1757 2003-08-14 Jan Hubicka <jh@suse.cz>
1758
1759 * method.c (use_thunk): Expand body directly.
1760
1761 2003-08-12 Mark Mitchell <mark@codesourcery.com>
1762
1763 PR c++/11703
1764 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1765 determine whether or not to promote types.
1766 (convert_for_arg_passing): Likewise.
1767 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1768 templates.
1769 * pt.c (tsubst_decl): Do not expect it to be set.
1770
1771 PR c++/9512
1772 PR c++/10923
1773 * cp-tree.h (check_elaborated_type_specifier): Declare.
1774 (handle_class_head): Remove.
1775 (note_got_semicolon): Likewise.
1776 (note_list_got_semicolon): Likewise.
1777 (finish_class_definition): Likewise.
1778 * decl.c (check_elaborated_type_specifier): Make it public.
1779 Robustify.
1780 (handle_class_head): Remove.
1781 * parser.c (cp_parser_elaborated_type_specifier): Use
1782 check_elaborated_type_specifier.
1783 (cp_parser_class_specifier): Do not call finish_class_definition.
1784 (cp_parser_class_head): Or handle_class_head. Check for
1785 over-qualified names.
1786 * semantics.c (finish_class_definition): Remove.
1787
1788 * parser.c (cp_parser_check_for_definition_in_return_type): New
1789 function.
1790 (cp_parser_simple_declaration): Adjust call to
1791 cp_parser_init_declarator.
1792 (cp_parser_decl_specifier_seq): Change type of
1793 declares_class_or_enum parameter.
1794 (cp_parser_explicit_instantiation): Adjust accordingly.
1795 (cp_parser_type_specifier): Change type of
1796 declares_class_or_enum parameter.
1797 (cp_parser_init_declarator): Add declares_class_or_enum
1798 parameter.
1799 (cp_parser_parameter_declaration): Adjust call to
1800 cp_parser_decl_specifier_seq.
1801 (cp_parser_function_definition): Likewise.
1802 (cp_parser_member_declaration): Likewise.
1803 (cp_parser_single_declaration): Likewise.
1804
1805 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1806 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1807 (TYPE_OVERLOADS_CALL_EXPR): Remove.
1808 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1809 (TYPE_OVERLOADS_ARROW): Likewise.
1810 (CLASSTYPE_GOT_SEMICOLON): Likewise.
1811 * class.c (check_bases): Do not set them.
1812 (finish_struct_1): Likewise.
1813 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1814 (build_ptrmemfunc_type): Likewise.
1815 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1816 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1817 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1818 * lex.c (note_got_semicolon): Remove.
1819 (note_list_got_semicolon): Likewise.
1820 * parser.c (cp_parser_simple_declaration): Do not call
1821 note_list_got_semicolon.
1822 * pt.c (list_eq): Remove.
1823 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1824 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1825 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1826 * ptree.c (cxx_print_type): Do not print them.
1827 * semantics.c (finish_member_class_template): Do not call
1828 note_list_got_semicolon.
1829
1830 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
1831
1832 * call.c (standard_conversion): Opaque pointers interconvert.
1833
1834 * testsuite/g++.dg/other/opaque-3.C: New.
1835
1836 2003-08-11 Mark Mitchell <mark@codesourcery.com>
1837
1838 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1839 types correctly.
1840
1841 2003-08-10 Mark Mitchell <mark@codesourcery.com>
1842
1843 PR c++/11789
1844 * cp-tree.h (get_vbase): Remove.
1845 (get_vbase_types): Remove.
1846 * init.c (expand_member_init): Correct logic for looking up base
1847 classes.
1848
1849 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1850
1851 * error.c (dump_expr): Tidy.
1852 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1853 (pp_cxx_begin_template_argument_list): Likewise.
1854 (pp_cxx_end_template_argument_list): Likewise.
1855 (is_destructor_name): Likewise.
1856 (pp_cxx_unqualified_id): Likewise.
1857 (pp_cxx_qualified_id): Likewise.
1858 (pp_cxx_id_expression): Likewise.
1859 (pp_cxx_new_expression): Likewise.
1860 (pp_cxx_delete_expression): Likewise.
1861 (pp_cxx_pm_expression): Likewise.
1862 (pp_cxx_type_specifier): Rework.
1863 (pp_cxx_type_id): Likewise.
1864 (pp_cxx_primary_expression): Likewise.
1865 (pp_cxx_postfix_expression): Likewise.
1866 (pp_cxx_unary_expression): Likewise.
1867 (pp_cxx_multiplicative_expression): Likewise.
1868 (pp_cxx_conditional_expression): Likewise.
1869 (pp_cxx_assignment_expression): Likewise.
1870 (pp_cxx_pretty_printer_init): Tidy.
1871
1872 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
1873
1874 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1875 NODE is always a TREE_VEC of nonzero size.
1876 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1877 * decl2.c (arg_assoc): Template args will be a vec.
1878 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1879 dump_template_argument_list.
1880 (dump_template_parms): Args will be a vec.
1881 * parser.c (cp_parser_template_argument_list): Produce a
1882 vector, not a list.
1883 * pt.c (coerce_template_parms): Args are always vectors.
1884 (mangle_class_name_for_template): Likewise.
1885 (lookup_template_function): Likewise.
1886 (lookup_template_class): Likewise.
1887 (tsubst_template_args): Likewise.
1888 (tsubst_baselink): Use tsubst_template_args.
1889 (tsubst_qualified_id): Likewise.
1890 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1891 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1892 (any_dependent_template_args_p): Args are always vectors.
1893 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1894
1895 PR c++/11670
1896 * call.c (convert_like_real): Add rvalue binding error message.
1897 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1898 really a cast.
1899
1900 PR c++/10530
1901 * pt.c (dependent_type_p_r): A dependent template-id is a class
1902 type with dependent template arguments, or a bound template
1903 template parameter.
1904 (type_dependent_expression_p): A template function decl cannot
1905 have a dependent context.
1906
1907 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1908
1909 PR c++/5767
1910 * parser.c (cp_parser_class_name): Return immediately when scope
1911 is error_mark_node.
1912
1913 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
1914
1915 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1916
1917 * cp/call.c (standard_conversion): Support opaque types.
1918 Include target.h.
1919 (strip_top_quals): Use cp_build_qualified_type instead of
1920 TYPE_MAIN_VARIANT.
1921
1922 * cp/typeck.c (convert_for_assignment): Support opaque types.
1923
1924 * testsuite/g++.dg/other/opaque-1.C: New.
1925
1926 * testsuite/g++.dg/other/opaque-2.C: New.
1927
1928 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
1929
1930 * decl.c (grokparms): Use cp_build_qualified_type instead
1931 TYPE_MAIN_VARIANT.
1932
1933 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1934
1935 * cxx-pretty-print.h: New file.
1936 * cxx-pretty-print.c: Likewise.
1937 * error.c (scratch_pretty_printer): Change type.
1938 (init_error): Tidy.
1939 (dump_aggr_type): Likewise.
1940 (dump_global_iord): Likewise.
1941 (dump_expr): Likewise.
1942 (dump_char): Remove.
1943 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1944 (cxx_initialize_diagnostics): New function.
1945 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1946 (CXX_PRETTY_PRINT_H): New variable.
1947 (cp/cxx-pretty-print.o): New rule.
1948 (cp/cp-lang.o): Update dependence.
1949 (cp/error.o): Likewise.
1950
1951 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1952
1953 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1954 (DECL_DECLARED_INLINE_P): Remove.
1955 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1956 if decl is a FUNCTION_DECL. This never made sense, but now it is
1957 required to avoid a tree check failure.
1958 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1959 * optimize.c (maybe_clone_body): Likewise.
1960
1961 2003-08-04 Roger Sayle <roger@eyesopen.com>
1962
1963 * decl.c (cxx_insert_default_attributes): Delete.
1964 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1965 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1966
1967 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
1968
1969 PR c++/11704
1970 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1971 unknown type.
1972
1973 PR c++/11766
1974 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1975 member functions.
1976
1977 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1978
1979 PR c++/9447
1980 * cp-tree.def (USING_DECL): Document its type.
1981 * class.c (pushclass): If we're entering a template, push any
1982 dependent using decls it has.
1983 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1984 a dependent scope.
1985 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1986 (tsubst): Remove USING_DECL checks.
1987 (type_dependent_expression_p): Remove USING_DECL case.
1988 * semantics.c (finish_member_declaration): A USING_DECL's type
1989 indicates whether it is dependent.
1990
1991 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1992
1993 * cp-tree.h (pushclass): Remove unneeded parameter.
1994 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1995 (push_nested_class): Adjust pushclass call.
1996 * pt.c (instantiate_class_template): Likewise.
1997 * semantics.c (begin_class_definition): Likewise.
1998
1999 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
2000
2001 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
2002
2003 2003-08-01 Mark Mitchell <mark@codesourcery.com>
2004
2005 PR c++/11697
2006 * decl.c (decls_match): Don't ignore the types of template
2007 classes.
2008
2009 PR c++/11744
2010 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
2011
2012 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2013
2014 PR c++/8442, c++/8806
2015 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
2016 preferred.
2017 (check_elaborated_type_specifier): Add allow_template_p
2018 parameter. Check tag mismatch and class template.
2019 (xref_tag): Add template_header_p parameter. Add assertion
2020 that name is an IDENTIFIER_NODE. Remove implicit typename
2021 warning. Simplify lookup process if globalize is true.
2022 (cxx_init_decl_processing): Adjust call to xref_tag.
2023 (xref_tag_from_type): Likewise.
2024 * decl2.c (handle_class_head): Likewise.
2025 * parser.c (cp_parser_elaborated_type_specifier,
2026 cp_parser_class_head): Likewise.
2027 * rtti.c (init_rtti_processing, build_dynamic_cast1,
2028 tinfo_base_init, emit_support_tinfos): Likewise.
2029 * class.c (is_base_of_enclosing_class): Remove.
2030 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
2031 template template argument.
2032 * cp-tree.h (xref_tag): Adjust declaration.
2033 (is_base_of_enclosing_class): Remove.
2034 * NEWS: Document template template argument change.
2035
2036 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
2037
2038 * parser.c (cp_parser_init_declarator,
2039 cp_paser_member_declaration): Reformat.
2040 * pt.c (lookup_template_class, type_unification_real, unify,
2041 type_dependent_expression_p): Reformat.
2042
2043 PR c++/11295
2044 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
2045 tf_stmt_expr_body.
2046 (finish_stmt_expr_expr): Declare.
2047 * parser.c (cp_parser_primary_expression): Tell
2048 cp_parser_compount_statement that it is a statement expression.
2049 (cp_parser_statement, cp_parser_labeled_statement,
2050 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
2051 in_statement_expr_p parameter.
2052 (cp_parser_expression_statement): Likewise. Call
2053 finish_stmt_expr_expr for final expression of a statement
2054 expression.
2055 (cp_parser_for_init_statement,
2056 cp_parser_implicitly_scoped_statement,
2057 cp_parser_already_scoped_statement, cp_parser_function_definition,
2058 cp_parser_try_block, cp_parser_handled): Adjust.
2059 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
2060 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
2061 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
2062 * semantics.c (finish_expr_stmt): Do not deal with statement
2063 expressions.
2064 (begin_stmt_expr): Clear last_expr_type.
2065 (finish_stmt_expr_expr): New.
2066 (finish_stmt_expr): Process the value expression.
2067
2068 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
2069 compound expr inside the target's initializer.
2070
2071 PR c++/11525
2072 * parser.c (cp_parser_primary_expression): Do not set
2073 non-constant-p merely because it is a dependent scope.
2074
2075 PR c++/9447
2076 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
2077 * semantics.c (finish_expr_stmt): Do not convert to void in a
2078 template.
2079
2080 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
2081
2082 * pt.c (coerce_template_parms): Refactor.
2083 (fn_type_unification): Increment processing_template_decl when
2084 tsubsting an incomplete set of explicit args.
2085
2086 PR c++/11347
2087 * pt.c (instantiate_class_template): Increment
2088 processing_template_decl around the tsubst of a template member
2089 class.
2090 (tsubst_qualified_id): Assert we do not have a dependent scope.
2091
2092 * pt.c (coerce_template_template_parms, lookup_template_class,
2093 can_complete_type_without_circularity, instantiate_class_template,
2094 tsubst_decl, unify): Reformat.
2095
2096 2003-07-31 Jan Hubicka <jh@suse.cz>
2097
2098 * decl2.c (maybe_make_one_only): Use mark_referenced.
2099 * method.c (use_thunk): Likewsie.
2100
2101 2003-07-30 Jan Hubicka <jh@suse.cz>
2102
2103 * class.c (build_vtable_entry_ref): Kill.
2104 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
2105 (build_vfn_ref): Do not call build_vtable_entry_ref.
2106 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
2107 * cp-tree.h (prepare_assemble_variable): Kill.
2108 * cp-decl.c (prepare_assemble_variable): Kill.
2109
2110 2003-07-29 Geoffrey Keating <geoffk@apple.com>
2111
2112 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
2113 of setting valid_pch by hand.
2114
2115 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2116
2117 * decl.c (finish_enum): Initialize underlying_type.
2118
2119 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
2120
2121 PR c++/9447
2122 * decl.c (add_binding): Add bval local variable.
2123 (push_class_level_binding): Likewise. Allow a USING_DECL to be
2124 pushed.
2125 * decl2.c (do_class_using_decl): The type of a using decl is
2126 unknown.
2127 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
2128 function call lookup code.
2129 * pt.c (tsubst): A USING_DECL will have unknown type.
2130 (tsubst_copy_and_build): Allow a using decl.
2131 (type_dependent_expression_p): A USING_DECL will make it
2132 dependent.
2133 * semantics.c (finish_member_declaration): Push a dependent using
2134 declaration.
2135
2136 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2137
2138 PR c++/11530
2139 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2140 * semantics.c (finish_id_expression): Call mark_used for all
2141 declarations.
2142
2143 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2144
2145 PR c++/11667
2146 * call.c (standard_conversion): Allow all integral->enumeral
2147 conversions, after marking them as bad.
2148 * decl.c (finish_enum): Make sure that all enumerators are
2149 properly converted to the underlying type.
2150 (build_enumerator): Set DECL_CONTEXT for namespace-scope
2151 enumeration types.
2152 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2153 (tsubst_enum): Tidy.
2154
2155 * Make-lang.in (typeck.o): Depend on convert.h.
2156 (class.o): Likewise.
2157 (rtti.o): Likewise.
2158 * call.c: Include convert.h.
2159 (convert_arg_to_ellipsis): Use convert_to_real.
2160 * class.c: Include convert.h.
2161 (build_base_path): Use convert_to_integer.
2162 * rtti.c: Include convert.h.
2163 (build_headof): Use convert_to_integer.
2164 * typeck.c: Include convert.h.
2165 (decay_conversion): Use convert_to_integer.
2166 (build_unary_op): Use build_nop.
2167 (get_delta_difference): Use convert_to_integer.
2168 (build_ptrmemfunc): Avoid unnecessary conversions.
2169
2170 2003-07-28 Jan Hubicka <jh@suse.cz>
2171
2172 * decl2.c (mark_member_pointers): Verify that member pointer points to
2173 the function.
2174
2175 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
2176
2177 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2178 (finish_compound_stmt): Remove no scope arg.
2179 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2180 end_compound_stmt calls.
2181 (expand_static_init, begin_destructor_body, begin_function_body,
2182 finish_function_body): Likewise.
2183 * decl2.c (start_objects, finish_objects,
2184 start_static_storage_duration_function,
2185 finish_static_storage_duration_function): Likewise.
2186 * init.c (begin_init_stmts, finish_init_stmts,
2187 construct_virtual_base, build_vec_init): Likewise.
2188 * method.c (do_build_assign_ref, synthesize_method): Likewise.
2189 * parser.c (cp_parser_compound_statement,
2190 cp_parser_implicitly_scoped_statement,
2191 cp_parser_already_scoped_statement): Likewise.
2192 * pt.c (tsubst_expr): Likewise.
2193 * semantics.c (begin_compound_stmt): No scope arg is a bool.
2194 (finish_compound_stmt): Remove no scope arg.
2195
2196 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2197 always dyadic.
2198
2199 2003-07-27 Mark Mitchell <mark@codesourcery.com>
2200
2201 * call.c (standard_conversion): Tweak handling of
2202 pointer-to-member types.
2203 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2204 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2205 pointer-to-data member types.
2206
2207 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
2208
2209 * parser.c (cp_parser_type_parameter): Reformat.
2210 (cp_parser_parameter_declaration): Deprecate default args where
2211 not allowed.
2212
2213 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
2214
2215 * cfns.h: Rebuilt.
2216
2217 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2218 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2219 * init.c (begin_init_stmts): Make static. Return is_global
2220 value. Always call begin_stmt_expr.
2221 (finish_init_stmts): Make static. Add is_global parm. Always
2222 building a stmt tree.
2223 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2224 (build_vec_init): Likewise. Always building a stmt tree.
2225 (expand_default_init): Always building a stmt tree.
2226 (get_temp_regvar): Likewise.
2227 * semantics.c (begin_global_stmt_expr,
2228 finish_global_stmt_expr): Remove.
2229
2230 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2231
2232 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2233 (build_x_compound_expr_from_list): Declare.
2234 * typeck.c (build_x_compound_expr_from_list): New.
2235 (build_x_compound_expr): Adjust.
2236 (build_compound_expr): Remove unreachable code. Take two
2237 parameters, adjust.
2238 * decl.c (grok_reference_init): Use
2239 build_x_compound_expr_from_list.
2240 (expand_static_init): Adjust build_compound_expr call.
2241 (cxx_maybe_build_cleanup): Likewise.
2242 * init.c (perform_member_init): Use
2243 build_x_compound_expr_from_list.
2244 (build_new_1): Likewise.
2245 (build_vec_delete): Adjust build_compound_expr calls.
2246 (build_vbase_delete): Likewise.
2247 * typeck2.c (store_init_value): Use
2248 build_x_compound_expr_from_list.
2249 (build_functional_cast): Likewise.
2250
2251 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2252
2253 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2254 * decl.c (make_typename_type): Pass it.
2255 * pt.c (lookup_template_class): Use it.
2256 (resolve_typename_type): Pass it.
2257 * semantics.c (finish_template_type): Pass it.
2258
2259 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2260
2261 PR c++/11617
2262 * cp-tree.h (qualified_name_lookup_error): Declare.
2263 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2264 errors.
2265 (tsubst_expr) <DECL_STMT case>: Likewise.
2266 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2267 * semantics.c (qualified_name_lookup_error): New, broken out of ...
2268 (finish_id_expression): ... here. Use it.
2269
2270 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
2271
2272 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2273
2274 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2275
2276 PR c++/11596
2277 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2278 (tsubst_template_arg): New.
2279 (tsubst_template_arg_vector): Rename to ...
2280 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2281 tsubst_template_arg.
2282 (coerce_template_parms): Use tsubst_template_arg for default
2283 value.
2284 (tsubst_template_parms): Likewise.
2285 (tsubst_aggr_type): Adjust.
2286 (tsubst_decl): Likewise.
2287 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2288 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2289
2290 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2291
2292 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2293 * error.c: Use the new pretty-printer framework.
2294
2295 2003-07-24 Per Bothner <pbothner@apple.com>
2296
2297 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2298 which causes errors messages to incorrectly mention included files.
2299
2300 2003-07-24 Mark Mitchell <mark@codesourcery.com>
2301
2302 * cp-tree.h (convert_to_base_statically): Declare.
2303 * call.c (build_special_member_call): Convert INSTANCE to the base
2304 type.
2305 * class.c (convert_to_base_statically): New method.
2306 * init.c (construct_virtual_base): Use it.
2307 * method.c (do_build_assign_ref): Fix typo in comment.
2308
2309 2003-07-24 Jason Merrill <jason@redhat.com>
2310
2311 * decl.c: Just set truthvalue_* to boolean_*.
2312
2313 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
2314
2315 * decl.c (reshape_init): Remove unreachable code.
2316
2317 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2318
2319 PR c++/11513
2320 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2321
2322 2003-07-23 Mark Mitchell <mark@codesourcery.com>
2323
2324 PR c++/11645
2325 * cp-tree.h (accessible_base_p): Declare.
2326 * call.c (build_over_call): Use it.
2327 * search.c (accessible_base_p): New function, split out from ...
2328 (lookup_base): ... here.
2329
2330 PR c++/11517
2331 * call.c (build_conditional_expr): Use perform_implicit_conversion
2332 and error_operand_p. Robustify.
2333 * typeck.c (build_unary_op): Use perform_implicit_conversion.
2334
2335 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
2336
2337 PR c++/10953
2338 * parser.c (cp_parser_nested_name_specifier): Reset scope on
2339 failure.
2340 (cp_parser_elaborated_type_specifier): Likewise.
2341
2342 2003-07-22 Mark Mitchell <mark@codesourcery.com>
2343
2344 Eliminate use of POINTER_TYPE for pointers-to-members.
2345 * call.c (standard_conversion): Rework pointer-to-member handling.
2346 Add comments.
2347 (add_builtin_candidate): Likewise.
2348 (resolve_scoped_fn_name): Remove.
2349 (build_conditional_expr): Rework pointer-to-member handling.
2350 (compare_ics): Likewise.
2351 * class.c (check_field_decls): Use TYPE_PTR_P.
2352 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2353 handling.
2354 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2355 (TYPE_PTRMEM_P): Add comment.
2356 (TYPE_PTR_P): Simplify.
2357 (TYPE_PTROB_P): Correct definition.
2358 (TYPE_PTR_TO_MEMBER_P): New macro.
2359 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2360 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2361 (resolved_scoped_fn_name): Remove declaration.
2362 (build_offset_ref): Change prototype.
2363 (resolve_offset_ref): Remove.
2364 (comp_target_types): Remove.
2365 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2366 handling.
2367 (convert_to_reference): Use can_convert.
2368 (ocp_convert): Improve error handling. Rework pointer-to-member
2369 handling.
2370 (perform_qualification_conversions): Rework pointer-to-member
2371 handling.
2372 * decl.c (build_ptrmem_type): Handle functions too.
2373 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2374 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2375 (grokparms): Remove OFFSET_TYPE error message.
2376 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2377 * error.c (dump_type_prefix): Likewise.
2378 * expr.c (cplus_expand_constant): Use build_nop.
2379 * init.c (build_offset_ref): Add address_p parameter. Fold in
2380 necessary bits from resolve_offset_ref.
2381 (resolve_offset_ref): Remove.
2382 * parser.c (cp_parser_postfix_expression): Remove special case
2383 code for OFFSET_TYPE.
2384 * pt.c (convert_nontype_argument): Rework pointer-to-member
2385 handling.
2386 (convert_template_argument): Likewise.
2387 (unify): Likewise.
2388 (invalid_nontype_parm_type_p): Likewise.
2389 (dependent_type_p_r): Likewise.
2390 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2391 (target_incomplete_p_): Rework pointer-to-member
2392 handling.
2393 (get_pseudo_ti_init): Likewise.
2394 (get_pseudo_ti_desc): Likewise.
2395 * semantics.c (finish_qualified_id_expr): Adjust call to
2396 build_offset_ref. Remove use of resolve_offset_ref.
2397 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2398 * typeck.c (target_type): Use TYPE_PTRMEM_P.
2399 (type_unknown_p): Remove obsolete code about the time before
2400 non-dependent expressions were handled correctly.
2401 (qualify_type_recursive): Remove.
2402 (composite_pointer_type_r): New function.
2403 (composite_pointer_type): Use it.
2404 (merge_types): Remove dead comments.
2405 (comp_cv_target_types): Remove.
2406 (comp_target_types): Likewise.
2407 (comp_target_parms): Likewise.
2408 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2409 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2410 (build_binary_op): Do not use of comp_target_types.
2411 (pointer_diff): Remove OFFSET_TYPE case.
2412 (build_unary_op): Adjust pointer-to-member handling.
2413 (unary_complex_lvalue): Likewise.
2414 (check_for_casting_away_constness): Add description parameter.
2415 (build_static_cast): Pass it.
2416 (build_reinterpret_cast): Use check_for_casting_away_constness.
2417 (build_const_cast): Adjust pointer-to-member handling.
2418 (build_c_cast): Likewise.
2419 (convert_for_assignment): Remove OFFSET_TYPE error message.
2420 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2421 (comp_ptr_ttypes_reinterpret): Remove.
2422 (casts_away_constness_r): Adjust pointer-to-member handling.
2423 (casts_away_constness): Liekwise.
2424 (strip_all_pointer_quals): Remove.
2425 * typeck2.c (digest_init): Adjust pointer-to-member handling.
2426 (build_m_component_ref): Likewise.
2427
2428 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
2429
2430 * lex.c (unqualified_fn_lookup_error): Mention that the error
2431 message needs to be kept in synch with the manual.
2432
2433 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2434
2435 PR c++/11614
2436 * decl.c (grokdeclarator): An array member is only a flexible
2437 array member if the field itself is the array.
2438
2439 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2440
2441 PR c++/10793
2442 * decl.c (xref_basetypes): Handle error_mark_node.
2443
2444 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2445
2446 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2447 * tree.c (lvalue_p_1): Set it.
2448 * class.c (check_field): Don't allow non-packed non-POD fields to
2449 be packed.
2450 * call.c (reference_binding): Need a temporary for all bitfield
2451 and packed fields.
2452 (convert_like_real): Check it is ok to make a temporary here.
2453
2454 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
2455
2456 * cp-tree.h (hack_identifier): Remove.
2457 * method.c (hack_identifier): Remove.
2458 * semantics.c (finish_id_expression): Expand hack_identifier
2459 here. Simplify.
2460
2461 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2462
2463 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2464 semantics.c typeck.c: Remove unnecessary casts.
2465
2466 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2467
2468 * cp-tree.h (hack_identifier): Remove.
2469 * method.c (hack_identifier): Remove.
2470 * semantics.c (finish_id_expression): Expand hack_identifier
2471 here. Simplify.
2472
2473 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2474
2475 * cp-tree.h (finish_non_static_data_member): Add object param.
2476 * method.c (hack_identifier): Adjust.
2477 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2478 again for a FIELD_DECL.
2479 * semantics.c (finish_non_static_data_member): Add object
2480 parameter. Always save the DECL in the COMPONENT_REF.
2481 * call.c (resolve_scoped_fn_name): Adjust.
2482
2483 2003-07-17 Zack Weinberg <zack@codesourcery.com>
2484
2485 * pt.c (get_bindings): Make definition consistent with
2486 forward declaration.
2487
2488 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2489
2490 PR c++/7809
2491 * friend.c (add_friend): Check access for member functions
2492 and templates.
2493
2494 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2495
2496 PR c++/10668
2497 * typeck.c (build_class_member_access_expr): Improve diagnostic.
2498
2499 2003-07-16 Mark Mitchell <mark@codesourcery.com>
2500
2501 PR c++/11547
2502 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2503 macro.
2504 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2505 * decl.c (duplicate_decls): Merge
2506 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2507 * parser.c (cp_parser_postfix_expression): Adjust call to
2508 cp_parser_initializer_list and
2509 cp_parser_parenthesized_expression_list.
2510 (cp_parser_parenthesized_expression_list): Add non_constant_p.
2511 (cp_parser_new_placement): Adjust call to
2512 cp_parser_parenthesized_expression_list.
2513 (cp_parser_direct_new_declarator): Likewise.
2514 (cp_parser_conditional_expression): Remove.
2515 (cp_parser_constant_expression): Parse an assignment-expression,
2516 not a conditional-expression.
2517 (cp_parser_simple_declaration): Resolve expression/declaration
2518 ambiguity more quickly.
2519 (cp_parser_mem_initializer): Adjust call to
2520 cp_parser_parenthesized_expression_list.
2521 (cp_parser_init_declarator): Keep track of whether or not the
2522 initializer is a constant-expression.
2523 (cp_parser_initializer): Add non_constant_p parameter.
2524 (cp_parser_initializer_clause): Likewise.
2525 (cp_parser_initializer_list): Likewise.
2526 (cp_parser_attribute_list): Adjust call to
2527 cp_parser_parenthesized_expression_list.
2528 (cp_parser_functional_cast): Likewise.
2529 * pt.c (tsubst_decl): Copy
2530 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2531 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2532 * semantics.c (finish_id_expression): Use
2533 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2534
2535 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
2536
2537 * lang-options.h: Remove.
2538
2539 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
2540
2541 PR c/10962
2542 * class.c (field_decl_cmp): Remove.
2543 (resort_field_decl_cmp): Remove.
2544 (resort_sorted_fields): Remove.
2545 (add_fields_to_vec): Rename to ...
2546 (add_fields_to_record_type): this.
2547 (finish_struct_1): Change to be using
2548 sorted_fields_type's fields.
2549 * cp-tree.h (lang_decl): In lang_decl_u3
2550 change sorted_fields to be a pointer to
2551 sorted_fields_type.
2552 (resort_sorted_fields): Remove prototype.
2553 * search.c (lookup_field_1): Change to be using
2554 sorted_fields_type's fields.
2555
2556 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2557
2558 PR c++/5421
2559 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2560 is a member of other class.
2561 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2562 is a specialization of function template.
2563
2564 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2565
2566 PR c++/10903
2567 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2568 Improve.
2569
2570 2003-07-15 Mark Mitchell <mark@codesourcery.com>
2571
2572 * cp-tree.def (LOOKUP_EXPR): Remove.
2573 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2574 (LOOKUP_EXPR_GLOBAL): Remove.
2575 (get_bindings): Remove.
2576 (is_aggr_type_2): Remove.
2577 * call.c (resolved_scoped_fn_name): Remove support for
2578 LOOKUP_EXPR.
2579 * decl.c (grokfndecl): Likewise.
2580 (grokdeclarator): Likewise.
2581 * error.c (dump_decl): Likewise.
2582 (dump_expr): Likewise.
2583 * friend.c (do_friend): Likewise.
2584 * init.c (build_offset_ref): Likewise.
2585 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
2586 LOOKUP_EXPRs
2587 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2588 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2589 test.
2590 * pt.c (get_bindings): Give it internal linkage.
2591 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2592 (lookup_template_function): Likewise.
2593 (for_each_tempalte_parm_r): Likewise.
2594 (tsubst_decl): Likewise.
2595 (tsubst_qualified_id): Handle template template parameters.
2596 (tsubst_copy): Remove support for LOOKUP_EXPR.
2597 (tsubst_copy_and_build): Likewise.
2598 (most_general_template): Likewise.
2599 (value_dependent_expression_p): Likewise.
2600 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2601 always dependent.
2602 * semantics.c (perform_koenig_lookup): Do not create
2603 IDENTIFIER_NODEs.
2604 (finish_fname): Likewise.
2605 (finish_id_expression): Likewise.
2606 * tree.c (is_aggr_type_2): Remove.
2607
2608 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2609
2610 PR c++/11531
2611 * typeck.c (check_return_expr): Fix thinko in diagnostic.
2612
2613 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2614
2615 PR c++/10108
2616 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2617 error_mark_node.
2618
2619 2003-07-14 Mark Mitchell <mark@codesourcery.com>
2620
2621 PR c++/11509
2622 * pt.c (dependent_scope_ref_p): New function.
2623 (value_dependent_expression_p): Use it.
2624 (type_dependent_expression_p): Likewise.
2625
2626 * pt.c (tsubst_friend_function): Use reregister_specialization.
2627
2628 PR c++/7019
2629 * cp-tree.h (lookup_qualified_name): Adjust prototype.
2630 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
2631 call to is_aggr_type.
2632 * parser.c (cp_parser_lookup_name): Adjust call to
2633 lookup_qualified_name.
2634 * pt.c (tsubst_qualified_id): Likewise.
2635 (tsubst_copy_and_build): Likewise.
2636 * semantics.c (finish_qualified_id_expr): Deal with erroneous
2637 expressions.
2638
2639 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2640
2641 PR c++/11510
2642 * call.c (op_error): Properly format REALPART_EXPR and
2643 IMAGPART_EXPR.
2644 * error.c (dump_expr): Likewise.
2645
2646 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2647
2648 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2649
2650 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2651
2652 PR c++/5293
2653 * call.c (initialize_reference): Improve diagnostic.
2654
2655 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2656
2657 PR c++/11154
2658 * pt.c (more_specialized_class): Add full_args parameter.
2659 (most_specialized_class): Adjust calls to more_specialized_class.
2660 * cp-tree.h (more_specialized_class): Adjust declaration.
2661
2662 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
2663
2664 * lex.c (enum tree_node_kind): Delete.
2665
2666 2003-07-13 Mark Mitchell <mark@codesourcery.com>
2667
2668 PR c++/11503
2669 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2670 (SET_DECL_SELF_REFERENCE_P): Likewise.
2671 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2672 * pt.c (tsubst_decl): Copy it.
2673 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2674
2675 * pt.c (reregister_specialization): Fix thinko in previous change.
2676
2677 * cp-tree.h (cp_id_kind): New type.
2678 (unqualified_name_lookup_error): Change prototype.
2679 (unqualified_fn_lookup_error): New function.
2680 (do_identifier): Remove.
2681 (do_scoped_id): Likewise.
2682 (tsubst_copy_and_build): Change prototype.
2683 (reregister_specialization): New function.
2684 (perform_koenig_lookup): Likewise.
2685 (finish_id_expression): Likewise.
2686 * call.c (build_method_call): Adjust call to
2687 unqualified_name_lookup_error.
2688 * decl.c (duplicate_decls): Use reregister_specialization.
2689 * lex.c (is_global): Remove.
2690 (unqualified_name_lookup_error): Return a value.
2691 (do_identifier): Remove.
2692 (do_scoped_id): Likewise.
2693 (identifier_typedecl_value): Remove.
2694 (unqualified_fn_lookup_error): New function.
2695 * parser.c (cp_parser_id_kind): Remove.
2696 (cp_parser_non_constant_id_expression): Remove.
2697 (cp_parser_primary_expression): Use finish_id_expression.
2698 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2699 cp_parser_id_kind.
2700 (cp_parser_postfix_expression): Use perform_koenig_lookup.
2701 (cp_parser_template_argument): Use cp_id_kind.
2702 (cp_parser_fold_non_dependent_expr): Adjust call to
2703 tsubst_copy_and_build.
2704 * pt.c (unregister_specialization): Rename to ...
2705 (reregister_specialization): This.
2706 (tsubst_friend_function): Use it.
2707 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2708 (tsubst_qualified_id): Likewise.
2709 (tsubst_expr): Likewise.
2710 (tsubst_copy_and_build): Add function_p parameter. Use
2711 finish_id_expression. Introduce RECUR macro.
2712 (tsubst_non_call_postfix_expression): New function.
2713 (regenerate_decl_from_template): Use reregister_specialization.
2714 * semantics.c (perform_koenig_lookup): New function.
2715 (finish_id_expression): Likewise.
2716
2717 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2718
2719 * pt.c (push_access_scope_real): Remove.
2720 (push_access_scope): Move code from push_access_scope_real.
2721 (pop_access_scope): Don't check for TEMPLATE_DECL.
2722 (instantiate_template): Defer access checking during template
2723 substitution.
2724 (regenerate_decl_from_template): Tidy.
2725
2726 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
2727
2728 PR c++/11437
2729 * operators.def: Add definitions for __imag__, __real__.
2730
2731 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
2732
2733 PR c++/11050
2734 * parser.c (cp_parser_expression_list): Rename to ...
2735 (cp_parser_parenthesized_expression_list): ... here. Add attribute
2736 parameter, parse the surounding parentheses.
2737 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2738 parameters. Return int.
2739 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2740 (cp_parser_postfix_expression): Adjust function call parsing.
2741 (cp_parser_new_placement): Adjust.
2742 (cp_parser_new_initializer): Likewise.
2743 (cp_parser_cast_expression): Likewise.
2744 (cp_parser_selection_statement): Likewise.
2745 (cp_parser_mem_initializer): Likewise.
2746 (cp_parser_asm_definition): Likewise.
2747 (cp_parser_init_declarator): Likewise.
2748 (cp_parser_declarator): Make
2749 cdtor_or_conv_p an int ptr.
2750 (cp_parser_direct_declarator): Likewise. Check for a parameter
2751 list on cdtors & conv functions.
2752 (cp_parser_initializer): Adjust.
2753 (cp_parser_member_declaration): Adjust.
2754 (cp_parser_attribute_list): Move code into
2755 cp_parser_parens_expression_list.
2756 (cp_parser_functional_cast): Adjust.
2757 * pt.c (type_dependent_expression_p): Erroneous expressions are
2758 non-dependent.
2759
2760 2003-07-11 Geoffrey Keating <geoffk@apple.com>
2761
2762 * decl.c (cp_finish_decl): Handle 'used' attribute.
2763
2764 * cp-lang.c (c_reset_state): New dummy routine.
2765 * cp-tree.h (finish_file): Move prototype to c-common.h.
2766 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2767
2768 2003-07-11 Mark Mitchell <mark@codesourcery.com>
2769
2770 PR c++/8327
2771 * pt.c (tsubst_qualified_id): Implement suggested resolution for
2772 Core Issue 2.
2773 (type_dependent_expression_p): Likewise.
2774
2775 2003-07-10 Mark Mitchell <mark@codesourcery.com>
2776
2777 * typeck.c (build_binary_op): Do not warn about signed
2778 vs. unsigned comparisons in the bodies of templates.
2779
2780 PR c++/9411
2781 * parser.c (cp_parser_postfix_expression): Check dependency of
2782 functions.
2783
2784 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2785
2786 PR c++/10032
2787 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2788 still errors.
2789
2790 PR c++/10527
2791 * error.c (decl_to_string): Do not print default argument
2792 expressions.
2793
2794 * cp-tree.h (break_out_calls): Remove declaration.
2795 * tree.c (break_out_calls): Remove.
2796 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2797
2798 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
2799
2800 PR c++ 9483
2801 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2802 * decl2.c (constructor_name_p): Avoid repeated constructor_name
2803 calls.
2804 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2805
2806 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2807
2808 * typeck.c (build_x_unary_op): Take note of the fact that
2809 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2810 trees.
2811
2812 * parser.c (cp_parser_primary_expression): Preserve the form of
2813 qualified expressions in templates, even if they are not
2814 dependent.
2815 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2816 (tsubst_qualified_id): Likewise.
2817 * search.c (accessible_p): Treat everything in the body of a
2818 template as accessible.
2819
2820 2003-07-08 Mark Mitchell <mark@codesourcery.com>
2821
2822 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2823 * cp-tree.h (build_call_from_tree): Remove.
2824 (build_member_call): Likewise.
2825 (dependent_template_arg_p): Remove.
2826 (any_dependent_template_arguments_p): New function.
2827 (dependent_template_id_p): Likewise.
2828 (any_type_dependent_arguments_p): Likewise.
2829 (build_non_dependent_expr): Likewise.
2830 (build_non_dependent_args): Likewise.
2831 (build_x_compound_expr): Adjust prototype.
2832 * call.c (build_new_method_call): Handle non-dependent expressions
2833 correctly.
2834 * decl2.c (grok_array_decl): Likewise.
2835 (build_offset_ref_call_from_tree): Likewise.
2836 (build_call_from_tree): Remove.
2837 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2838 (dump_expr): Likewise.
2839 * init.c (build_member_call): Remove.
2840 * mangle.c (write_expression): Update handling for template-ids.
2841 * parser.c (cp_parser_primary_expression): Use
2842 any_dependent_template_arguments_p. Update constant-expression
2843 handling.
2844 (cp_parser_postfix_expression): Use
2845 any_type_dependent_arguments_p. Simplify call processing.
2846 (cp_parser_unary_expression): Simplify.
2847 (cp_parser_expression): Adjust for changes to
2848 build_x_compound_expr.
2849 (cp_parser_template_argument): Implement standard-conforming
2850 parsing of non-type template arguments.
2851 (cp_parser_direct_declarator): Use
2852 cp_parser_fold_non_dependent_expr.
2853 (cp_parser_fold_non_dependent_expr): New function.
2854 (cp_parser_next_token_ends_template_argument_p): Likewise.
2855 * pt.c (convert_template_argument): Do not call
2856 maybe_fold_nontype_arg.
2857 (tsubst_baselink): Likewise.
2858 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
2859 processing work correctly for non-dependent expressions. Adjust
2860 handling of COMPOUND_EXPR. Simplify call processing.
2861 (value_dependent_expression_p): Deal with functional casts and
2862 sizeof/alignof correctly.
2863 (type_dependent_expression_p): Handle overloaded functions.
2864 (any_type_dependent_arguments_p): New function.
2865 (any_dependent_template_arguments_p): Likewise.
2866 (dependent_template_p): Treat SCOPE_REFs as dependent.
2867 (dependent_template_id_p): Simplify.
2868 (build_non_dependent_expr): New function.
2869 (build_non_dependent_args): Likewise.
2870 * semantics.c (finish_stmt_expr): Don't make dependent
2871 statement-expresions have void type.
2872 (finish_call_expr): Handle non-dependent expressions
2873 correctly.
2874 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2875 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2876 type size_t, even in templates.
2877 (expr_sizeof): Likewise.
2878 (finish_class_member_access_expr): Handle non-dependent expressions
2879 correctly.
2880 (build_x_indirect_ref): Likewise.
2881 (build_x_binary_op): Likewise.
2882 (build_x_unary_op): Likewise.
2883 (build_x_conditional_expr): Likewise.
2884 (build_x_compound_expr): Likewise.
2885 * typeck2.c (build_x_arrow): Likewise.
2886
2887 2003-07-09 Jan Hubicka <jh@suse.cz>
2888
2889 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2890 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2891 (start_function): Use DECL_ESTIMATED_INSNS.
2892 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2893
2894 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2895 unit-at-a-time
2896
2897 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2898
2899 PR c++/11030
2900 * pt.c (instantiate_class_template): Don't call xref_tag to
2901 inject name when the friend class is a specialization.
2902
2903 2003-07-07 Mark Mitchell <mark@codesourcery.com>
2904
2905 * cp-tree.h (build_scoped_method_call): Remove.
2906 (lookup_qualified_name): Remove parameter.
2907 (tsubst_copy_and_build): Declare.
2908 (finish_qualified_object_call_expr): Remove.
2909 (check_accessibility_of_qualified_id): New function.
2910 (finish_qualified_id_expr): Likewise.
2911 (non_reference): Likewise.
2912 (build_expr_from-tree): Remove.
2913 * call.c (non_reference): Remove.
2914 (build_scoped_method_call): Likewise.
2915 (build_method_call): Use error_operand_p. Assert that we are not
2916 processing a template.
2917 (standard_conversion): Use non_reference.
2918 * class.c (build_vtbl_entry_ref): Likewise.
2919 (build_vtbl_ref_1): Likewise.
2920 * cvt.c (build_expr_type_conversion): Use non_reference.
2921 * decl.c (lookup_qualified_name): Remove flags parameter.
2922 (grok_op_properties): Use non_reference.
2923 * decl2.c (grok_array_decl): Likewise.
2924 (build_expr_from_tree): Remove.
2925 (build_offset_ref_call_from_tree): Update comment.
2926 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2927 * except.c (prepare_eh_types): Use non_reference.
2928 (can_convert_eh): Likewise.
2929 * init.c (build_dtor_call): Avoid using build_method_call.
2930 * mangle.c (write_template_param): Remove misleading comment.
2931 * method.c (locate_copy): Use non_reference.
2932 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2933 (cp_parser_primary_expression): Do not create SCOPE_REFs is
2934 non-dependent contexts.
2935 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2936 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2937 build_expr_from_tree.
2938 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2939 Use check_accessibility_of_qualified_id.
2940 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2941 build_expr_from_tree.
2942 (tsubst_baselink): New function.
2943 (tsubst_qualified_id): Likewise.
2944 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
2945 (tsubst_expr): Adjust call to lookup_qualified_name.
2946 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
2947 handling of CALL_EXPRs.
2948 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2949 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2950 * search.c (check_final_overrider): Likewise.
2951 * semantics.c (check_accessibility_of_qualified_id): New function.
2952 (finish_qualified_object_call_expr): Remove.
2953 * typeck.c (target_type): Use non_reference.
2954 (cxx_sizeof_or_alignof_type): Likewise.
2955 (dubious_conversion_warnings): Likewise.
2956 (convert_for_initialization): Likewise.
2957 (non_reference): New function.
2958
2959 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2960
2961 * decl.c (print_binding_level, print_other_binding_stack,
2962 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2963 stdio calls.
2964 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2965
2966 2003-07-07 Andreas Jaeger <aj@suse.de>
2967
2968 * friend.c: Convert to ISO C90 prototypes.
2969
2970 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2971 language.
2972 * cfns.h: Regenerate.
2973
2974 * typeck.c: Convert remaining prototypes to ISO C90.
2975 * search.c: Likewise.
2976
2977 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2978 * semantics.c (expand_or_defer_fn): Likewise
2979 * mangle.c (discriminator_for_string_literal): Likewise.
2980 * g++spec.c (lang_specific_driver): Likewise.
2981
2982 * search.c (lookup_base_r): Remove unused variable.
2983
2984 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
2985
2986 * semantics.c: (genrtl_try_block) Adjust emit_line_note
2987 calls.
2988
2989 2003-07-07 Andreas Jaeger <aj@suse.de>
2990
2991 * search.c (lookup_base_r): Remove unused variable.
2992
2993 2003-07-06 Michael Chastain <mec@shout.net>
2994
2995 PR debug/10055
2996 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2997 assigning to input_filename directly.
2998
2999 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
3000
3001 * call.c: Fix comment formatting.
3002 * class.c: Likewise.
3003 * cp-tree.h: Likewise.
3004 * decl.c: Likewise.
3005 * decl2.c: Likewise.
3006 * error.c: Likewise.
3007 * method.c: Likewise.
3008 * name-lookup.c: Likewise.
3009 * parser.c: Likewise.
3010 * pt.c: Likewise.
3011 * rtti.c: Likewise.
3012 * search.c: Likewise.
3013 * typeck.c: Likewise.
3014
3015 2003-07-06 Mark Mitchell <mark@codesourcery.com>
3016
3017 PR c++/11345
3018 * search.c (lookup_base_r): Remove is_non_public and
3019 within_current_scope parameters. Remove other dead code.
3020 (lookup_base): Adjust call to lookup_base_r.
3021 (adjust_result_of_qualified_name_lookup): Improve comment.
3022 * semantics.c (finish_call_expr): Use maybe_dummy_object.
3023
3024 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
3025
3026 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
3027 LANG_HOOKS_MISSING_ARGUMENT): Override.
3028
3029 2003-07-05 Mark Mitchell <mark@codesourcery.com>
3030
3031 PR c++/11431
3032 * typeck.c (build_static_cast): Check for reference conversions
3033 earlier.
3034
3035 2003-07-04 Mark Mitchell <mark@codesourcery.com>
3036
3037 * cp-tree.h (perform_integral_promotions): Declare.
3038 * call.c (build_addr_func): Use decay_conversion.
3039 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
3040 (convert_for_arg_passing): Use perform_integral_promotions.
3041 * cvt.c (build_expr_type_conversion): Use decay_conversion.
3042 (type_promotes_to): Do not return a cv-qualified type.
3043 * decl.c (grok_reference_init): Fix formatting.
3044 (get_atexit_node): Use decay_conversion.
3045 (build_enumerator): Use perform_integral_promotions.
3046 * init.c (build_vec_init): Use decay_conversion.
3047 * semantics.c (finish_expr_stmt): Likewise.
3048 (finish_switch_cond): Use perform_integral_promotions.
3049 * typeck.c (default_conversion): Likewise.
3050 (perform_integral_promotions): New function.
3051 (build_indirect_ref): Use decay_conversion.
3052 (build_array_ref): Use perform_integral_promotions.
3053 (convert_arguments): Use decay_conversion.
3054 (build_unary_op): Use perform_integral_promotions.
3055 (build_c_cast): Use decay_conversion.
3056 (build_modify_expr): Likewise.
3057 (convert_for_initialization): Likewise.
3058 * typeck2.c (build_x_arrow): Likewise.
3059
3060 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
3061
3062 * call.c: Fix comment typos.
3063 * class.c: Likewise.
3064 * cp-tree.h: Likewise.
3065 * cvt.c: Likewise.
3066 * decl2.c: Likewise.
3067 * decl.c: Likewise.
3068 * init.c: Likewise.
3069 * mangle.c: Likewise.
3070 * parser.c: Likewise.
3071 * pt.c: Likewise.
3072 * search.c: Likewise.
3073 * semantics.c: Likewise.
3074 * tree.c: Likewise.
3075 * typeck.c: Likewise.
3076
3077 2003-07-04 Zack Weinberg <zack@codesourcery.com>
3078
3079 * parser.c (cp_lexer_read_token): No need to handle string
3080 constant concatenation.
3081
3082 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3083
3084 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
3085 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
3086 ATTRIBUTE_GCC_CXXDIAG.
3087
3088 2003-07-03 Mark Mitchell <mark@codesourcery.com>
3089
3090 * call.c (build_addr_func): Handle bound pointers-to-members.
3091 (build_method_call): Do not call resolve_offset_ref.
3092 (implicit_conversion): Likewise.
3093 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
3094 resolve_offset_ref.
3095 (resolve_args): Do not call resolve_offset_ref.
3096 (build_conditional_expr): Likewise.
3097 (build_new_method_call): Likewise.
3098 * cp-tree.def (OFFSET_REF): Update documentation.
3099 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
3100 pointers to members to pointers.
3101 (ocp_convert): Do not call resolve_offset_ref.
3102 (convert_to_void): Likewise.
3103 (build_expr_type_conversion): Likewise.
3104 * decl2.c (delete_sanity): Likewise.
3105 * init.c (resolve_offset_ref): Simplify greatly.
3106 (build_vec_delete): Do not call resolve_offset_ref.
3107 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
3108 if appropriate.
3109 (cp_parser_unary_expression): Use
3110 cp_parser_simple_cast_expression.
3111 (cp_parser_delete_expression): Likewise.
3112 (cp_parser_cast_expression): Likewise.
3113 (cp_parser_pm_expression): Use cp_parser_binary_op.
3114 (cp_parser_simple_cast_expression): New function.
3115 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
3116 * semantics.c (finish_increment_expr): Likewise.
3117 (finish_typeof): Likewise.
3118 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
3119 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
3120 (decay_conversion): Do not call resolve_offset_ref.
3121 (finish_class_member_access_expr): Likewise.
3122 (convert_arguments): Likewise.
3123 (build_x_binary_op): Handle DOTSTAR_EXPR.
3124 (condition_conversion): Do not call resolve_offset_ref.
3125 (unary_complex_lvalue): Likewise.
3126 (build_static_cast): Likewise.
3127 (build_reinterpret_cast): Likewise.
3128 (build_const_cast): Likewise.
3129 (build_c_cast): Likewise.
3130 (build_modify_expr): Likewise.
3131 (convert_for_assignment): Likewise.
3132 (convert_for_initialization): Likewise.
3133 * typeck2.c (build_x_arrow): Likewise.
3134 (build_m_component_ref): Simplify.
3135
3136 * call.c (build_scoped_method_call): Use convert_to_void.
3137 (build_method_call): Likewise.
3138 * class.c (check_field_decls): Remove dead code.
3139 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3140 * decl2.c (grok_array_decl): Remove dead code.
3141 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3142 as pointer-to-member representation.
3143 * init.c (build_offset_ref): Tidy.
3144 (build_vec_delete_1): Use convert_to_void.
3145 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3146 as pointer-to-member representation.
3147
3148 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
3149
3150 PR c++/9162
3151 * decl.c (grokdeclarator): Return friend decls, not
3152 void_type_node.
3153 * decl2.c (grokfield): Alter friend decl check.
3154 * parser.c (struct cp_parser): Document default_arg chain on
3155 unparsed_functions_queue.
3156 (cp_parser_save_default_args): New.
3157 (cp_parser_init_declarator, cp_parser_function_definition,
3158 cp_parser_member_declaration): Call it.
3159 (cp_parser_class_specifier): Remove unused variable. Alter
3160 processing of unparsed_functions_queue.
3161
3162 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3163
3164 * class.c (add_method, check_field_decl): Fix format specifier.
3165 * decl.c (duplicate_decls, pushdecl, check_goto,
3166 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3167 start_enum): Likewise.
3168 * decl2.c (ambiguous_decl): Likewise.
3169 * pt.c (redeclare_class_template): Likewise.
3170
3171 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
3172
3173 PR c++/10219
3174 * pt.c (type_unification_real): Don't unify exprs of error type.
3175 * tree.c (error_type): Don't die on error_type.
3176
3177 PR c++/9779
3178 * decl2.c (arg_assoc_class): Don't die on NULL type.
3179 * typeck.c (type_unknown_p): Don't die on untyped expressions.
3180
3181 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3182
3183 PR c++/6949
3184 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3185 classes.
3186
3187 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3188
3189 * error.c (locate_error): %P takes an `int', not a `tree'.
3190
3191 2003-07-02 Jan Hubicka <jh@suse.cz>
3192
3193 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3194 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3195 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3196 massaging.
3197
3198 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3199 (expand_or_defer_fn): Declare.
3200 (lower_function): Declare.
3201 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3202 * decl2.c: Include cgraph.h and varpool.h
3203 (maybe_emit_vtables): Make explicit instantations as needed.
3204 (mark_member_pointers, lower_function): New functions.
3205 (finish_file): Do unit-at-a-time.
3206 * method.c (synthesize_method): Use expand_or_defer_fn.
3207 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3208 * parser.c (cp_parser_function_definition_after_decl): Use
3209 expand_or_defer_fn.
3210 * pt.c (instantiate_decl): Likewise.
3211 * semantics.c: Include cgraph.h
3212 (expand_or_defer_fn): Break out from ...
3213 (expand_body): ... here; deal with unit-at-a-time.
3214 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3215 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3216
3217 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3218
3219 * call.c (resolve_scoped_fn_name): Return error_mark_node for
3220 erroneous cases.
3221
3222 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3223
3224 PR c++/11149
3225 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3226 is a class type.
3227
3228 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
3229
3230 PR c++/8046
3231 * error.c (dump_decl): Handle BIT_NOT_EXPR as
3232 pseudo destructor calls.
3233
3234 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3235
3236 * cp-tree.h (define_label): Replace filename and lineno
3237 arguments with a location_t.
3238 * decl.c (pop_label): Adjust define_label call.
3239 (define_label): Replace filename and lineno arguments with a
3240 location_t.
3241 * semantics.c (finish_label): Adjust define_label call.
3242
3243 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3244
3245 PR c++/9559
3246 * decl2.c (grokfield): Do not build NOP_EXPRs around the
3247 error_mark_node.
3248
3249 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
3250
3251 * Make-lang.in: Update.
3252 * cp-lang.c (c_language): Define.
3253 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3254 * cp-tree.h (cxx_init_options): Remove.
3255 * lex.c: Don't include diagnostic.h.
3256 (cxx_init_options): Remove.
3257
3258 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3259
3260 PR c++/4933
3261 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3262 tree generated within a template. Use dump_expr to dump an
3263 expression sizeof.
3264
3265 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3266
3267 * mangle.c (write_expression): Exit gracefully when trying to
3268 mangle a CALL_EXPR.
3269
3270 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3271
3272 PR c++/10750
3273 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3274 (value- or type-) dependent expression as DECL_INITIAL is a
3275 valid constant-expression (at parser time).
3276
3277 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3278
3279 PR c++/11106
3280 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3281 USING_DECL, instead of print_tree_identifier.
3282
3283 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3284
3285 * cp-tree.h (language_to_string): Adjust declaration.
3286 * dump.c (cp_dump_tree): Adjust usage.
3287 * error.c (dump_char): Use output_formatted_scalar. Tidy.
3288 (parm_to_string): Lose unused parameter. Tidy.
3289 (expr_to_string): Likewise.
3290 (code_to_string): Likewise.
3291 (language_to_string): Likewise.
3292 (op_to_string): Likewise.
3293 (assop_to_string): Likewise.
3294 (digit_buffer): Remove.
3295 (dump_type): Format builtin vector type as __vector__.
3296
3297 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3298
3299 * error.c (print_integer): Remove.
3300 (dump_type_suffix): Adjust.
3301 (dump_expr): Likewise.
3302
3303 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3304
3305 * error.c (print_instantiation_partial_context): Take a
3306 location_t.
3307 (print_instantiation_full_context): Adjust.
3308 (print_instantiation_context): Adjust.
3309
3310 * cp-tree.h (cp_line_of, cp_file_of): Remove.
3311 * error.c (cp_line_of, cp_file_of): Merge into ...
3312 (location_of): ... here. Make static, return a location_t.
3313 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3314
3315 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3316
3317 PR c++/10784
3318 * call.c (joust): Move warn_conversion check outwards.
3319
3320 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3321
3322 * decl.c (build_typename_type)
3323 * mangle.c (write_template_template_arg)
3324 * parser.c (cp_parser_scope_through_which_access_occurs)
3325 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3326 * repo.c (get_base_filename)
3327 * semantics.c (maybe_convert_cond):
3328 Mark the definition static, matching the forward declaration.
3329
3330 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3331
3332 PR c++/10468
3333 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3334
3335 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3336
3337 PR c++/10796
3338 * decl.c (finish_enum): Implement DR377.
3339
3340 * decl.c (cp_finish_decl): Don't make variables with reference
3341 type readonly while they are being initialized.
3342
3343 2003-06-26 Mark Mitchell <mark@codesourcery.com>
3344
3345 PR c++/11332
3346 * typeck.c (build_static_cast): Avoid returning expressions with
3347 reference type.
3348
3349 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
3350
3351 * call.c (build_op_delete_call): Use strip_array_call. Correct
3352 error message to say 'delete' or 'delete[]'.
3353
3354 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
3355
3356 PR c++/8266
3357 * pt.c (check_explicit_specialization): When looking up a
3358 template function from an identifier outside class-scope, bind
3359 it to CP_DECL_CONTEXT.
3360
3361 2003-06-25 Mark Mitchell <mark@codesourcery.com>
3362
3363 PR c++/10990
3364 * search.c (lookup_base_r): Rely on accessible_p, rather than
3365 trying to emulate that logic here.
3366
3367 PR c++/10931
3368 * call.c (convert_like): Pass issue_conversion_warnings.
3369 (convert_like_with_context): Likewise.
3370 (convert_like_real): Add issue_conversion_warnings parameter.
3371 (perform_direct_initialization_if_possible): New function.
3372 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3373 * typeck.c (check_for_casting_away_constness): New function.
3374 (build_static_cast): Rewrite.
3375
3376 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
3377
3378 * call.c (enforce_access): Assert we get a binfo.
3379 (build_op_delete_call): Pass a binfo to
3380 perform_or_defer_access_check.
3381 * class.c (alter_access): Likewise.
3382 * decl.c (make_typename_type): Likewise.
3383 (make_unbound_class_template): Likewise.
3384 * lex.c (do_identifier): Likewise.
3385 * method.c (hack_identifier): Likewise.
3386 * parser.c (cp_parser_lookup_name): Likewise.
3387 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3388 test.
3389 * semantics.c (finish_non_static_data_member): Likewise.
3390 (perform_or_defer_access_check): Expect a binfo.
3391 * typeck.c (comptypes): Expect types.
3392
3393 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3394 * friend.c (make_friend_class): Likewise.
3395 * pt.c (check_default_tmpl_args): Likewise.
3396 (lookup_template_class): Likewise.
3397
3398 2003-06-24 Jan Hubicka <jh@suse.cz>
3399
3400 * method.c (thunk_labelno): Move outside ifdef block to make garbage
3401 collector happy.
3402
3403 2003-06-24 Jan Hubicka <jh@suse.cz>
3404
3405 * class.c (build_vtable): Make vtables.
3406 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3407 * decl2.c (output_vtable_inherit): Rename to ...
3408 (prepare_assemble_variable): ... this one; change interface.
3409 (maybe_emit_vtables): Do not call output_vtable_inherit.
3410 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3411 * cp-tree.h (prepare_assemble_variable): New.
3412
3413 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
3414
3415 * method.c: add prototype for make_alias_for_thunk.
3416 (thunk_labelno, make_alias_for_thunk): only define
3417 if ASM_OUTPUT_DEF is defined.
3418
3419 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3420
3421 * method.c (thunk_labelno): New variable.
3422 (make_alias_for_thunk): New function.
3423 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
3424 into the same section as the function it is calling.
3425 Include gt-cp-method.h.
3426 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3427 (cp/method.o): Depend on gt-cp-method.h.
3428 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3429
3430 2003-06-23 Jan Hubicka <jh@suse.cz>
3431
3432 * decl.c (register_dtor_fn): Mark cleanup as used.
3433 * decl2.c (mark_vtable_entries): Skip nops.
3434 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3435 (build_dynamic_cast_1): Likewise.
3436 (tinfo_base_init): Likewise.
3437 (emit_tinfo_decl): Likewise.
3438
3439 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3440
3441 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3442 to it.
3443
3444 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3445
3446 PR c++/10784
3447 * call.c (joust): Warn about choosing conversion sequence only if
3448 -Wconversion.
3449
3450 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3451
3452 PR c++/10864
3453 * call.c (op_error): Tidy.
3454 * error.c (dump_expr): Properly format 'T()' when T is an
3455 aggregate type.
3456
3457 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3458
3459 PR c++/10915
3460 * decl.c (grok_op_properties): Warn possible confusing conversion
3461 only if -Wconversion.
3462
3463 2003-06-20 Mark Mitchell <mark@codesourcery.com>
3464
3465 PR c++/10749
3466 * parser.c (cp_parser_class_head): See through dependent names
3467 when parsing a class-head.
3468
3469 PR c++/10845
3470 * pt.c (try_class_unification): Correct handling of member class
3471 templates.
3472
3473 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3474
3475 * semantics.c (genrtl_finish_function): Adjust
3476 expand_function_end call.
3477
3478 2003-06-19 Mark Mitchell <mark@codesourcery.com>
3479
3480 PR c++/10939
3481 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3482 functions.
3483 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3484
3485 PR c++/9649
3486 * cp-tree.h (pushdecl_class_level): Change prototype.
3487 (push_class_level_binding): Likewise.
3488 * decl.c (add_binding): Reject duplicate static data members.
3489 (pushdecl_class_level): Return a value indicating whether or not
3490 the binding was valid.
3491 (push_class_level_binding): Likewise.
3492 * semantics.c (finish_member_declaration): Don't keep invalid
3493 declarations.
3494
3495 PR c++/11041
3496 * call.c (initialize_reference): Do not use cp_finish_decl to emit
3497 temporary variables.
3498 * cp-tree.h (static_aggregates): Declare.
3499 (pushdecl_top_level_and_finish): Likewise.
3500 * decl.c (pushdecl_top_level_1): New function.
3501 (pushdecl_top_level): Use it.
3502 (pushdecl_top_level_and_finish): New function.
3503 (initialize_local_var): Remove redundant code.
3504 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
3505 building_stmt_tree.
3506 * decl.h (static_aggregates): Remove.
3507 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3508 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3509 (tinfo_base_init): Likewise.
3510
3511 2003-06-19 Matt Austern <austern@apple.com>
3512
3513 PR c++/11228
3514 * init.c (build_zero_init): Assert that number of array elements
3515 is an integer constant.
3516 (build_default_init) Don't use build_zero_init for arrays with
3517 variable number of elements.
3518
3519 2003-06-19 Andreas Jaeger <aj@suse.de>
3520
3521 * cp-tree.h: Remove duplicated declarations.
3522
3523 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
3524
3525 * pt.c: Convert to ISO C.
3526 * semantics.c: Convert to ISO C.
3527
3528 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3529
3530 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3531 at_least_as_qualified_p, more_qualified_p): Return bool.
3532 * typeck.c: ANSIFY function definitions.
3533 (comp_array_types): Take redeclaration bool parameter.
3534 (comptypes): Rearrange STRICT handling.
3535 (at_least_as_qualified_p, more_qualified_p,
3536 comp_cv_qualification): Cache cv quals.
3537 (compparms): Rearrange loop.
3538
3539 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3540
3541 * cp-tree.h (COMPARE_RELAXED): Rename to ...
3542 (COMPARE_DERIVED): ... here. Adjust comment.
3543 (resolve_typename_type_in_current_instantiation): Remove.
3544 (cp_tree_equal, comptypes): Return a bool.
3545 * cvt.c (convert_to_reference): Adjust comptypes call.
3546 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3547 (resolve_typename_type_in_current_instantiation): Remove.
3548 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3549 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3550 calls. Refactor code.
3551 * typeck.c (comp_array_types): Return bool. Lose callback.
3552 parameter. Adjust cp_tree_equal calls.
3553 (comptypes): Return bool. Adjust strict handling. Remove relaxed
3554 enumeration and java type handling. Deal with typename types here.
3555 Adjust recursive and cp_tree_equals calls. Adjust base and derived
3556 checking.
3557 (comp_target_types): Remove unreachable code. Adjust
3558 same_or_base_type_p calls.
3559 (ptr_reasonably_similar): Adjust base and derived check.
3560
3561 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3562 unused calculation.
3563 (check_return_expr): Adjust error messages.
3564 * cp-tree.def (SCOPE_REF): Correct comment.
3565
3566 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3567
3568 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3569 string again.
3570
3571 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3572
3573 * optimize.c (dump_function): Form complete flag name by
3574 prefixing 'fdump-' to string returned by dump_flag_name().
3575
3576 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3577
3578 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3579 string.
3580
3581 2003-06-17 Jason Merrill <jason@redhat.com>
3582
3583 PR c++/10929
3584 * decl.c (grokfndecl): Don't mark a function inline for
3585 -finline-functions if it isn't defined.
3586
3587 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3588
3589 PR c++/10712
3590 * class.c (handle_using_decl): Robustify.
3591
3592 PR c++/11105
3593 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3594 * mangle.c (struct globals): Remove internal_mangling_p.
3595 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3596 (write_template_parm): Don't write out the level number.
3597 (conv_type_names): New variable.
3598 (hash_type): New function.
3599 (compare_type): Likewise.
3600 (mangle_conv_op_name_for_type): Don't try to mangle conversion
3601 operator names.
3602 * search.c (lookup_conversion_operator): New function.
3603 (lookup_fnfields_1): Use it.
3604
3605 2003-06-17 Andreas Jaeger <aj@suse.de>
3606
3607 * except.c: Remove duplicate declaration of push_eh_cleanup.
3608
3609 * call.c: Remove extra declaration of inhibit_warnings.
3610
3611 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3612
3613 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
3614 * mangle.c: Convert to ISO C.
3615
3616 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3617
3618 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3619 macro.
3620
3621 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3622
3623 * tree.c: Convert to ISO C.
3624
3625 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
3626
3627 * cp-tree.h: Follow spelling conventions.
3628 * mangle.c: Likewise.
3629 * method.c: Likewise.
3630 * parser.c: Likewise.
3631
3632 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3633
3634 * decl.c (start_function): Adjust init_function_start call.
3635 * method.c (use_thunk): Likewise.
3636 * semantics.c (genrtl_start_function): Likewise.
3637
3638 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3639
3640 * Make-lang.in: Remove c-options.o.
3641
3642 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
3643
3644 * lex.c: Convert to ISO C.
3645
3646 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
3647 * init.c: removes use of PARAMS macro. Use ISO style function
3648 declarations. (Not copyright-significant change.)
3649
3650 * rtti.c: Remove PARAMS.
3651
3652 * typeck2.c: Convert to ISO C.
3653
3654 2003-06-12 Mark Mitchell <mark@codesourcery.com>
3655
3656 PR c++/10635
3657 * typeck.c (build_c_cast): Check that the destination type is
3658 complete.
3659
3660 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3661
3662 PR c++/10432
3663 * cp-tree.h (finish_declarator): Remove.
3664 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3665 erroneous declarations.
3666 * semantics.c (finish_declarator): Remove.
3667
3668 2003-06-11 Roger Sayle <roger@eyesopen.com>
3669
3670 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3671 global static constructor/destructor if it will be empty, i.e.
3672 either doesn't call any ctors/dtors or only calls pure or const
3673 ctors/dtors.
3674
3675 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3676
3677 * mangle.c (tm_p.h): Include it.
3678 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3679
3680 PR c++/11131
3681 * tree.c (cp_cannot_inline_fn): Check for "inline" before
3682 instantiation.
3683
3684 2003-06-10 Jason Merrill <jason@redhat.com>
3685
3686 PR c++/10968
3687 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3688
3689 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
3690
3691 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3692 (start_cleanup_cnt): New.
3693
3694 2003-06-10 Mark Mitchell <mark@codesourcery.com>
3695
3696 PR c++/11131
3697 * cp-tree.h (template_for_substitution): Declare.
3698 * decl2.c (mark_used): Use it when figuring out whether or not a
3699 function is inline.
3700 * pt.c (template_for_substitution): Give it external linkage.
3701 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3702 possible.
3703
3704 2003-06-09 Zack Weinberg <zack@codesourcery.com>
3705
3706 PR 8861
3707 * mangle.c (write_real_cst): New function. Implement
3708 ABI-compliant mangling of floating-point literals when
3709 -fabi-version>=2; provide backward compatibility with 3.3 when
3710 -fabi-version=1 (with warning). Clarify commentary.
3711 (write_template_arg_literal): Use write_real_cst.
3712
3713 2003-06-07 Andreas Jaeger <aj@suse.de>
3714
3715 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3716
3717 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3718
3719 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3720 (LANG_HOOKS_HANDLE_OPTION): Override.
3721 * cp-tree.h (cxx_init_options): Update.
3722 * lex.c (cxx_init_options): Update.
3723
3724 2003-06-05 Jan Hubicka <jh@suse.cz>
3725
3726 * Make-lang.in: Add support for stageprofile and stagefeedback
3727
3728 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
3729
3730 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3731
3732 2003-06-04 Andreas Jaeger <aj@suse.de>
3733
3734 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3735
3736 2003-06-03 Jason Merrill <jason@redhat.com>
3737
3738 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3739
3740 * cp/decl.c (reshape_init): Handle vectors.
3741
3742 * testsuite/g++.dg/init/array10.C: New.
3743
3744 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3745
3746 PR c++/10940
3747 * pt.c (check_explicit_specialization): Check for 'static'
3748 earlier.
3749
3750 2003-05-31 Diego Novillo <dnovillo@redhat.com>
3751
3752 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3753 the operand of a CONSTRUCTOR node.
3754
3755 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3756
3757 * decl.c (cp_binding_level::this_entity): Rename from this_class.
3758 (cxx_scope_descriptor): New function.
3759 (cxx_scope_debug): Likewise.
3760 (push_binding_level): Use it.
3761 (pop_binding_level): Likewise.
3762 (suspend_binding_level): Likewise.
3763 (resume_binding_level): Likewise.
3764 (pushlevel_class): Adjust use of this_class.
3765 (pushtag): Likewise.
3766 (lookup_name_real): Likewise.
3767 (global_scope_name): New variable.
3768 (initialize_predefined_identifiers): Initialize it.
3769 (push_namespace): Use it.
3770 (make_cxx_scope): New function.
3771 (pushlevel): Use it.
3772 (pushlevel_class): Likewise.
3773 (push_binding_level): Simplify. Loose the last two arguments.
3774 (make_binding_level): Remove.
3775 (initial_push__namespace_scope): New function.
3776 (push_namespace): Use it. Simplify.
3777 (cxx_init_decl_processing): Likewise.
3778 (declare_namespace_level): Remove.
3779
3780 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3781
3782 PR c++/10956
3783 * pt.c (instantiate_decl): Don't use full template arguments if
3784 we are dealing with specializations.
3785
3786 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3787
3788 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3789 (binding_depth): Unconditionally define.
3790 (is_class_level): Likewise.
3791 (indent): Likewise. Take an indenting parameter.
3792 (push_binding_level): Remove conditional definittion.
3793 (pop_binding_level): Likewise.
3794 (suspend_binding_level): Likewise.
3795 (resume_binding_level): Likewise.
3796 (pushlevel): Likewise.
3797 (pushlevel_class): Likewise.
3798 (poplevel_class): Likewise.
3799 (pop_everything): Likewise.
3800
3801 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3802
3803 * name-lookup.h (global_scope_p): New macro.
3804 * decl.c (pop_binding_level): Use it. Don't refer directly to
3805 global_binding_level.
3806 (suspend_binding_level): Likewise.
3807 (global_bindings_p): Likewise.
3808 (print_other_binding_stack): Likewise.
3809 (print_binding_stack): Likewise.
3810 (maybe_push_to_top_level): Likewise.
3811 (pushdecl_namespace_level): Likewise.
3812 (cxx_init_decl_processing): Likewise.
3813 (start_decl): Likewise.
3814 (cp_finish_decl): Likewise.
3815 (start_function): Likewise.
3816 (global_binding_level): Remove.
3817
3818 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3819
3820 * parser.c (cp_parser_explicit_instantiation): Restore old
3821 access before template instantiation.
3822
3823 2003-05-23 Geoffrey Keating <geoffk@apple.com>
3824
3825 * lang-specs.h: Use -o to specify preprocessor's output file.
3826 Make -no-integrated-cpp work when building PCH files.
3827
3828 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3829
3830 PR c++/10682
3831 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3832 check for implicitly created typedef to an enum.
3833
3834 2003-05-21 Jason Merrill <jason@redhat.com>
3835
3836 * init.c (build_vec_delete): Copy the address into a temporary
3837 variable before calling build_vec_delete_1.
3838 * decl2.c (delete_sanity): Don't call stabilize_reference.
3839
3840 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
3841
3842 * pt.c (register_specialization): Update the decl's location,
3843 if necessary.
3844 (check_explicit_specialization): Likewise.
3845
3846 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3847
3848 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3849
3850 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
3851
3852 PR c++/9738
3853 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3854 if the old decl had instantiated DECL_RTL.
3855 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3856
3857 2003-05-19 Matt Austern <austern@apple.com>
3858
3859 * lang-options.h: Document -Wno-invalid-offsetof
3860 * typeck.c (build_class_member_access_expr): Don't complain about
3861 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3862
3863 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3864
3865 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3866 (binding_entry_make): Make entry->chain NULL after getting an entry.
3867 fix the spelling of chain in a comment.
3868 (binding_table_free): speed up by having temporary variable.
3869 (binding_table_new): set table->chain to be NULL after allocating
3870 a table.
3871 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3872 binding->previous to NULL after getting an binding for speed.
3873
3874 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3875
3876 * cp-tree.h (struct lang_type_class): Replace data member tags
3877 with hash-table nested_udts.
3878 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3879 * class.c (unreverse_member_declarations): Don't touch
3880 CLASSTYPE_TAGS.
3881 (pushclass): Use cxx_remember_type_decls.
3882 * decl.c (struct cp_binding_level): Replace data member tags with
3883 hash-table type_decls.
3884 (pop_binding_level): Handle level->type_decls.
3885 (kept_level_p): Adjust.
3886 (poplevel): Remove unused local variable.
3887 (bt_print_entry): New function.
3888 (print_binding_level): Use it.
3889 (push_namespace): Build current_binding_level->type_decls.
3890 (maybe_process_template_type_declaration): Adjust.
3891 (pushtag): Likewise.
3892 (clear_anon_tags): Use binding_table_remove_anonymous_types.
3893 (gettags): Remove.
3894 (cxx_remember_type_decls): Rename from storetags. Adjust.
3895 (lookup_tag): Use binding_table_find_anon_type. Tidy.
3896 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3897 (cxx_init_decl_processing): Build global_binding_level->type_decls.
3898 (store_parm_decls): Remove pointless code.
3899 * name-lookup.c (free_binding_entry): New variable.
3900 (ENTRY_INDEX): New macro.
3901 (struct binding_table_s): New datatype.
3902 (binding_entry_make): New function.
3903 (binding_entry_free): Likewise.
3904 (binding_table_construct): Likewise.
3905 (binding_table_free): Likewise.
3906 (binding_table_new): Likewise.
3907 (binding_table_expand): Likewise.
3908 (binding_table_insert): Likewise.
3909 (binding_table_find): Likewise.
3910 (binding_table_find_anon_type): Likewise.
3911 (binding_table_reverse_maybe_remap): Likewise.
3912 (binding_table_remove_anonymous_types): Likewise.
3913 (binding_table_foreach): Likewise.
3914 * name-lookup.h (binding_table): New type.
3915 (binding_entry): Likewise.
3916 (bt_foreach_proc): Likewise.
3917 (struct binding_entry_s): New datatype.
3918 (SCOPE_DEFAULT_HT_SIZE): New macro.
3919 (CLASS_SCOPE_HT_SIZE): Likewise.
3920 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3921 (NAMESPACE_STD_HT_SIZE): Likewise.
3922 (GLOBAL_SCOPE_HT_SIZE): Likewise.
3923 (binding_table_new): Declare.
3924 (binding_table_free): Likewise.
3925 (binding_table_insert): Likewise.
3926 (binding_table_find_anon_type): Likewise.
3927 (binding_table_reverse_maybe_remap): Likewise.
3928 (binding_table_remove_anonymous_types): Likewise.
3929 (binding_table_foreach): Likewise.
3930 (binding_table_find): Likewise.
3931 (cxx_remember_type_decls): Likewise.
3932 * pt.c (bt_instantiate_type_proc): New function.
3933 (do_type_instantiation): Use it.
3934 * search.c (lookup_field_r): Use binding_table_find.
3935
3936 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3937
3938 * semantics.c (perform_deferred_access_checks): Don't discard
3939 checked access.
3940
3941 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3942
3943 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3944 libiberty VA_ macros, always use stdarg.
3945 * rtti.c (create_pseudo_type_info): Likewise.
3946 * tree.c (build_min_nt, build_min): Likewise.
3947
3948 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3949
3950 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3951 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3952 collapse multiple function calls into one.
3953 * tree.c (debug_binfo): Likewise.
3954
3955 2003-05-15 Jason Merrill <jason@redhat.com>
3956
3957 PR c++/5388
3958 * call.c (conditional_conversion): Don't consider implicit
3959 conversions if T2 is a base of T1.
3960 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3961 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3962
3963 * parser.c (cp_parser_primary_expression): Convert a static data
3964 member from reference.
3965
3966 2003-05-15 Mark Mitchell <mark@codesourcery.com>
3967
3968 * call.c (build_op_delete_call): Avoid creating unnecessary types.
3969 * class.c (instantiate_type): Remove tests for tf_no_attributes.
3970 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3971 (COMPARE_NO_ATTRIBUTES): Remove.
3972 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3973
3974 PR c++/8385
3975 * semantics.c (finish_typeof): Refine type-dependency check.
3976
3977 2003-05-13 Jason Merrill <jason@redhat.com>
3978
3979 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3980 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3981
3982 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3983
3984 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3985
3986 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3987
3988 PR c++/10230, c++/10481
3989 * semantics.c (finish_non_static_data_member): Handle when the
3990 non-static member is not from a base of the current class type.
3991
3992 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3993
3994 PR c++/10552
3995 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3996 template and has dependent context.
3997
3998 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3999
4000 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
4001
4002 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4003
4004 PR c++/9252
4005 * cp-tree.h (saved_scope): Remove check_access field.
4006 (tsubst_flags_t): Remove tf_parsing.
4007 * decl.c (maybe_push_to_top_level): Don't initialize
4008 scope_chain->check_access.
4009 (make_typename_type, make_unbound_class_template): Don't use
4010 tf_parsing.
4011 (register_dtor_fn): Use push/pop_deferring_access_checks
4012 instead of scope_chain->check_access.
4013 * method.c (use_thunk): Likewise.
4014 * parser.c (cp_parser_explicit_instantiation
4015 (cp_parser_constructor_declarator_p): Don't call
4016 push/pop_deferring_access_checks here.
4017 (cp_parser_template_argument, cp_parser_class_name): Don't use
4018 tf_parsing.
4019 (yyparse): Check flag_access_control.
4020 * pt.c (instantiate_class_template): Call
4021 push/pop_deferring_access_checks.
4022 * semantics.c (push_deferring_access_checks): Propagate
4023 dk_no_check.
4024 (perform_or_defer_access_check): Make sure basetype_path is
4025 a type before comparison.
4026 * call.c (build_op_delete_call, build_over_call): Use
4027 perform_or_defer_access_check.
4028 * class.c (alter_access): Likewise.
4029 * init.c (build_offset_ref): Likewise.
4030 * lex.c (do_identifier): Likewise.
4031 * method.c (hack_identifier): Likewise.
4032 * search.c (lookup_member): Likewise.
4033 * semantics.c (finish_non_static_data_member): Likewise.
4034 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
4035 instead of flag_access_control.
4036
4037 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4038
4039 PR c++/9554
4040 * parser.c (cp_parser_class_name): Remove check_access parameter.
4041 All caller adjusted. Update declaration.
4042 (cp_parser_lookup_name): Likewise.
4043 * semantics.c (push_deferring_access_checks): Change parameter type
4044 to enum deferring_kind. All caller adjusted.
4045 (resume_deferring_access_checks): Adjust to use new enum.
4046 (stop_deferring_access_checks): Likewise.
4047 (perform_or_defer_access_check): Likewise.
4048 * cp-tree.h (deferring_kind): New enum.
4049 (deferred_access): Adjust field type.
4050 (push_deferring_access_checks): Update declaration.
4051
4052 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4053
4054 PR c++/10555, c++/10576
4055 * pt.c (lookup_template_class): Handle class template with
4056 multiple levels of parameters when one of the levels contain
4057 errors.
4058
4059 2003-05-08 Jason Merrill <jason@redhat.com>
4060
4061 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
4062 expression. Undo some of the recent reorg.
4063
4064 2003-05-07 Richard Henderson <rth@redhat.com>
4065
4066 PR c++/10570
4067 * cfns.gperf: Comment out POSIX thread cancellation points,
4068 plus abort and raise.
4069 * cfns.h: Regenerate.
4070
4071 2003-05-07 Jason Merrill <jason@redhat.com>
4072
4073 * call.c (build_conditional_expr): Don't assume that the folded
4074 expression has result_type.
4075
4076 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4077
4078 * typeck.c (build_unary_op): Deal with const qualifier in
4079 invalid pointer-to-member earlier.
4080
4081 2003-05-05 Jason Merrill <jason@redhat.com>
4082
4083 PR c++/9537
4084 * call.c (conditional_conversion): Build an RVALUE_CONV if
4085 we're just changing the cv-quals.
4086 (build_conditional_expr): Don't call convert to change
4087 cv-quals.
4088
4089 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4090
4091 PR c++/10496
4092 * typeck.c (build_unary_op): Don't output const qualifier when
4093 output invalid pointer-to-member diagnostics.
4094
4095 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4096
4097 * decl.c: Fix typos.
4098
4099 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4100
4101 PR c++/4494
4102 * decl.c (start_function): Use same_type_p to check return type
4103 of main.
4104
4105 2003-05-03 Zack Weinberg <zack@codesourcery.com>
4106
4107 PR c/10604
4108 * cp/typeck.c (build_x_compound_expr): No need to check
4109 extra_warnings as well as warn_unused_value.
4110
4111 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4112
4113 PR c++/9364, c++/10553, c++/10586
4114 * decl.c (make_typename_type): Don't crash on illegal code.
4115
4116 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
4117
4118 * class.c (finish_struct): Use location_t and input_location
4119 directly.
4120 * decl.c (make_label_decl): Likewise.
4121 (use_label): Likewise.
4122 * decl2.c (warn_if_unknown_interface): Likewise.
4123 (start_static_initialization_or_destruction): Likewise.
4124 (generate_ctor_or_dtor_function): Likewise.
4125 (finish_file): Likewise.
4126 * error.c (print_instantiation_full_context): Likewise.
4127 * init.c (create_temporary_var): Likewise.
4128 * method.c (synthesize_method): Likewise.
4129 * parser.c (cp_token): Likewise.
4130 (cp_lexer_set_source_position_from_token): Likewise.
4131 (cp_lexer_get_preprocessor_token): Likewise.
4132 (cp_parser_statement): Likewise.
4133 * pt.c (tsubst_friend_function): Likewise.
4134 (instantiate_class_template): Likewise.
4135 (tsubst_decl): Likewise.
4136 (tsubst): Likewise.
4137 (instantiate_decl): Likewise.
4138 * semantics.c (begin_class_definition): Likewise.
4139 (expand_body): Likewise.
4140
4141 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
4142
4143 * class.c (finish_struct): Rename lineno to input_line.
4144 * decl.c (push_binding_level, pop_binding_level,
4145 suspend_binding_level, resume_binding_level, make_label_decl,
4146 use_label, start_function): Likewise.
4147 * decl2.c (warn_if_unknown_interface,
4148 start_static_initialization_or_destruction,
4149 generate_ctor_or_dtor_function, finish_file): Likewise.
4150 * error.c (cp_line_of, print_instantiation_full_context,
4151 print_instantiation_context): Likewise.
4152 * except.c (check_handlers_1, check_handlers): Likewise.
4153 * init.c (create_temporary_var): Likewise.
4154 * method.c (use_thunk, synthesize_method): Likewise.
4155 * parser.c (cp_lexer_set_source_position_from_token,
4156 cp_lexer_get_preprocessor_token): Likewise.
4157 * pt.c (push_tinst_level, pop_tinst_level,
4158 tsubst_friend_function, instantiate_class_template, tsubst_decl,
4159 tsubst, tsubst_expr, instantiate_decl): Likewise.
4160 * semantics.c (genrtl_try_block, finish_label_stmt,
4161 begin_class_definition, expand_body,
4162 genrtl_finish_function): Likewise.
4163 * tree.c (build_min_nt, build_min): Likewise.
4164
4165 2003-05-01 Mark Mitchell <mark@codesourcery.com>
4166
4167 * decl2.c (comdat_linkage): Don't externalize explicit
4168 instantiations.
4169
4170 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4171
4172 PR c++/10554
4173 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4174 is not NULL.
4175
4176 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
4177
4178 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
4179 (struct lang_identifier): ... to here.
4180 (LANG_ID_FIELD): Remove.
4181 (SET_LANG_ID): Remove.
4182 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4183 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4184 (IDENTIFIER_IMPLICIT_DECL): Likewise.
4185 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4186 (IDENTIFIER_ERROR_LOCUS): Likewise.
4187 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4188
4189 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4190
4191 PR c++/8772
4192 * pt.c (convert_template_argument): Correct diagnostic.
4193
4194 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4195
4196 PR c++/9432, c++/9528
4197 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4198
4199 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
4200
4201 * decl.c (check_previous_goto_1): Adjust prototype.
4202 (check_previous_goto): Adjust use.
4203 (check_switch_goto): Likewise.
4204 (use_label): Adjust.
4205 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4206 (struct named_label_use_list): Use location_t datatype.
4207
4208 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4209
4210 PR c++/10551
4211 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4212 that have not yet been written out.
4213
4214 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4215
4216 PR c++/10549
4217 * class.c (layout_class_type): Mark overlong bitfields as having
4218 the maximum size permitted by their type, after layout.
4219
4220 PR c++/10527
4221 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4222
4223 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4224
4225 * call.c (build_operator_new_call): Fix typo.
4226 * lang-options.h: Likewise.
4227
4228 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4229
4230 PR c++/10515
4231 * cp-tree.h (lookup_field_1): Declare it.
4232 * search.c (lookup_field_1): Make it public.
4233 * decl.c (reshape_init): Handle designated initializers.
4234
4235 * decl.c (maybe_commonize_var): Further tweak support for systems
4236 without weak symbols.
4237
4238 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4239
4240 * decl.c (maybe_commonize_var): Fix thinko in last patch.
4241
4242 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4243
4244 PR c++/10506
4245 * method.c (use_thunk): Decrement immediate_size_expand.
4246
4247 PR c++/10503
4248 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4249 (DECL_MAYBE_TEMPLATE): Remove.
4250 * class.c (fixed_type_or_null): Avoid infinite recursion.
4251
4252 * decl.c (maybe_commonize_var): Make the code match the comments.
4253 * pt.c (instantiate_decl): Move call to import_export_decl.
4254
4255 2003-04-26 Mark Mitchell <mark@codesourcery.com>
4256
4257 * decl2.c (finish_file): Fix merge botch.
4258
4259 2003-04-25 Mark Mitchell <mark@codesourcery.com>
4260
4261 * decl2.c (finish_file): Don't call import_export_decl for
4262 functions that are not defined.
4263 (handle_class_head): Robustify.
4264 * pt.c (instantiate_decl): Do not call cp_finish_decl for
4265 variables that are not defined.
4266
4267 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
4268
4269 * call.c (print_z_candidates): Fix off by one error.
4270
4271 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
4272
4273 PR c++/10337
4274 * call.c (joust): Don't warn about conversion ops that are exact
4275 or cv-conversions. Rearrange to avoid multiple type comparisons.
4276
4277 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4278
4279 PR c++/10471
4280 * call.c (build_cxx_call): Robustify.
4281
4282 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
4283
4284 * Make-lang.in (lex.o): Remove mbchar.h.
4285 * lex.c (MULTIBYTE_CHARS): Lose.
4286 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4287 in c-lex.c.
4288
4289 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4290
4291 PR c++/9847
4292 * cp-tree.h (duplicate_tag_error): Remove.
4293 * class.c (duplicate_tag_error): Remove.
4294 * semantics.c (begin_class_definition): Return immediately for a
4295 duplicate class definition.
4296
4297 PR c++/10451
4298 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4299
4300 2003-04-22 Mark Mitchell <mark@codesourcery.com>
4301
4302 PR c++/10446
4303 * search.c (lookup_fnfields_1): Handle empty slots in the method
4304 vector.
4305
4306 PR c++/10428
4307 * decl.c (check_elaborated_type_specifier): New function, split
4308 out from ...
4309 (xref_tag): ... here. Use the new function in more places.
4310
4311 * rtti.c (throw_bad_typeid): Use build_cxx_call.
4312
4313 2003-04-21 Mark Mitchell <mark@codesourcery.com>
4314
4315 * call.c (build_over_call): Use build_cxx_call.
4316 (build_cxx_call): New method, split out of build_over_call.
4317 * cp-tree.h (language_function): Add can_throw.
4318 (build_cxx_call): Declare it.
4319 * decl.c (finish_function): If a function does not contain any
4320 calls to functions that can throw an exception, indicate that
4321 fact.
4322 * decl2.c (mark_used): Do not defer the instantiation of
4323 functions, if the current function does not throw.
4324 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4325 * pt.c (instantiate_decl): Make sure import_export_decl is called
4326 before emitting things.
4327 * rtti.c (throw_bad_cast): Use build_cxx_call.
4328 (build_dynamic_cast_1): Likewise.
4329 * typeck.c (build_function_call): Likewise.
4330
4331 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
4332
4333 PR c++/9881
4334 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4335 expressions. Reverts my 2002-08-08 patch.
4336
4337 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4338 cheaper early exit.
4339
4340 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4341
4342 * cp/decl2.c (start_static_storage_duration_function): Take count
4343 arg, don't check if it wraps round.
4344 (generate_ctor_or_dtor_function): Add locus arg, use it.
4345 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4346 locus.
4347 (finish_file): Set line numbers to past EOF for synthesized
4348 functions.
4349
4350 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4351
4352 PR c++/10405
4353 * search.c (lookup_field_1): Final scan goes backwards for
4354 types, forwards for non-types.
4355
4356 2003-04-17 Roger Sayle <roger@eyesopen.com>
4357
4358 PR c/10375
4359 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4360 "nothrow" function attributes.
4361
4362 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4363
4364 PR c++/10347
4365 * pt.c (type_dependent_expression_p): Handle array new.
4366
4367 2003-04-15 Mark Mitchell <mark@codesourcery.com>
4368
4369 PR c++/10381
4370 * parser.c (cp_parser_primary_expression): Reorganize logic for
4371 dealing with name lookup failures.
4372
4373 2003-04-15 Jason Merrill <jason@redhat.com>
4374
4375 * decl2.c (mark_used): Don't instantiate anything if
4376 skip_evaluation.
4377
4378 2003-04-14 Ziemowit Laski <zlaski@apple.com>
4379
4380 * tree.c (build_cplus_array_type_1): Do not call
4381 uses_template_parms() on a NULL index_type.
4382
4383 2003-04-13 Roger Sayle <roger@eyesopen.com>
4384
4385 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4386
4387 2003-04-12 Mark Mitchell <mark@codesourcery.com>
4388
4389 PR c++/10300
4390 * init.c (build_new_1): Reorganize.
4391
4392 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4393
4394 * class.c (initialize_array)
4395 * decl.c (reshape_init)
4396 * decl2.c (build_expr_from_tree)
4397 * init.c (build_zero_init)
4398 * pt.c (tsubst_copy, tsubst_copy_and_build)
4399 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4400 (ptm_initializer, class_initializer, get_pseudo_ti_init)
4401 * semantics.c (finish_compound_literal)
4402 * typeck.c (build_ptrmemfunc1)
4403 * typeck2.c (store_init_value, process_init_constructor)
4404 (build_functional_cast): Use build_constructor.
4405
4406 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4407
4408 * call.c (print_z_candidates): Use gcc_gettext_width, not
4409 strlen, to determine how much padding to use.
4410
4411 2003-04-10 Zack Weinberg <zack@codesourcery.com>
4412
4413 * decl.c: Update all calls to shadow_warning.
4414
4415 2003-04-10 Mark Mitchell <mark@codesourcery.com>
4416
4417 * class.c (layout_class_type): Correct handling for overlong
4418 bit-fields whose width is the same as an integer type.
4419
4420 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4421
4422 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4423 * cp-lang.c (cp_tree_size): New function.
4424 (LANG_HOOKS_TREE_SIZE): Override.
4425
4426 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4427 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4428 (union lang_tree_node): Remove common and srcloc members.
4429 (build_srcloc_here): Don't prototype.
4430 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4431 * pt.c (pending_templates): Correct comment.
4432 * tree.c (build_srcloc, build_srcloc_here): Kill.
4433
4434 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4435
4436 * call.c: Include intl.h.
4437 (print_z_candidate): Always use inform; get rid of errfn
4438 argument. Reorganize so that all the strings get picked up
4439 by xgettext. Note obligation of caller to pass first argument
4440 through gettext.
4441 (print_z_candidates): Update to match. Indent second and
4442 successive candidates by strlen() of translated message.
4443 (joust): Restructure ambiguous-conversion pedwarn so that
4444 translators see a complete sentence. Update calls to
4445 print_z_candidate.
4446
4447 * Make-lang.in (cp/call.o): Update dependencies.
4448
4449 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4450
4451 * decl.c (set_current_binding_level): Delete, revert last change.
4452 (current_binding_level): Modify to allow it as as lvalue.
4453
4454 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4455
4456 * name-lookup.c (find_binding): Pass appropriate pointer type to
4457 POP_TIMEVAR_AND_RETURN.
4458
4459 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4460
4461 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4462 * cp-tree.h: Don't insist on having GNUC.
4463
4464 2003-04-03 Jason Merrill <jason@redhat.com>
4465
4466 * cvt.c (ocp_convert): Only abort if we try to convert an object
4467 of TREE_ADDRESSABLE type.
4468
4469 * class.c (build_vtable): Set DECL_ALIGN here.
4470 (get_vtable_decl): Not here.
4471 (layout_vtable_decl): Or here.
4472 (create_vtable_ptr): Or here.
4473 (layout_class_type): Or here.
4474 (check_bitfield_decl): Don't mess with field alignment.
4475
4476 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4477
4478 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4479 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4480 * rtti.c (dfs_class_hint_mark): Likewise.
4481
4482 * decl.c (push_local_name, push_class_level_binding,
4483 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4484 functions returning void.
4485 * decl2.c (add_using_namespace): Likewise.
4486
4487 * decl.c (print_binding_level, print_other_binding_stack,
4488 print_binding_stack): Cast argument of %p specifier to void*.
4489 * ptree.c (cxx_print_decl): Likewise.
4490
4491 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4492 VAR_FUNCTION_OR_PARM_DECL_CHECK,
4493 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4494 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4495 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4496
4497 * decl.c (set_current_binding_level): New macro. Use throughout
4498 when setting the current binding level.
4499
4500 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4501 in enum.
4502 * method.c (mangling_flags): Likewise.
4503
4504 * cp-tree.h (lang_type_header): Add __extension__ and use
4505 CHAR_BITFIELD for members.
4506
4507 2003-04-02 Geoffrey Keating <geoffk@apple.com>
4508
4509 PR other/9274
4510 * mangle.c: Include gt-cp-mangle.h.
4511 (subst_identifiers): Mark with GTY.
4512 * config-lang.in (gtfiles): Add cp/mangle.c.
4513 * Make-lang.in: (gt-cp-mangle.h): New rule.
4514 (cp/mangle.o): Depends on gt-cp-mangle.h.
4515
4516 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
4517
4518 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4519 after \$(srcdir)/cp/name-lookup.h.
4520 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4521 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
4522 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4523 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4524
4525 2003-03-31 Jason Merrill <jason@redhat.com>
4526
4527 PR java/10145
4528 * class.c (check_field_decl): Don't set DECL_ALIGN.
4529
4530 2003-03-30 Mark Mitchell <mark@codesourcery.com>
4531
4532 PR c++/7647
4533 * decl.c (grokdeclarator): Tidy, slightly.
4534 * search.c (lookup_field_1): Add want_type parameter.
4535 (lookup_field_r): Adjust call to lookup_field_1.
4536
4537 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4538
4539 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4540
4541 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4542
4543 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
4544 prototype.
4545 (cxx_scope_find_binding_for_name): Likewise.
4546 * decl.c (find_binding: Move to name-lookup.c.
4547 (binding_for_name): Likewise.
4548 (cxx_scope_find_binding_for_name): Likewise.
4549 (BINDING_LEVEL): Remove.
4550 (push_binding): Tidy.
4551 (push_class_binding): Likewise.
4552 (pop_binding): Likewise.
4553 (poplevel): Likewise.
4554 (poplevel_class): Likewise.
4555 (set_identifier_type_value_with_scope): Likewise.
4556 (push_overloaded_decl): Likewise.
4557 (lookup_tag): Likewise.
4558 (unqualified_namespace_lookup): Likewise.
4559 (lookup_name_current_level): Likewise.
4560 (maybe_inject_for_scope_var): Likewise.
4561 (namespace_binding): Move to name-lookup.c.
4562 (set_namespace_binding): Likewise.
4563 * decl2.c (lookup_using_namespace): Tidy.
4564 (qualified_lookup_using_namespace): Likewise.
4565 (do_toplevel_using_decl): Likewise.
4566 * name-lookup.c: Include "timevar.h"
4567 * name-lookup.h (cxx_scope): Declare.
4568 (struct cxx_binding): Lose member "has_level". Adjust "scope"
4569 member declaration.
4570 (BINDING_SCOPE): Adjust definition.
4571 (BINDING_HAS_LEVEL_P): Remove.
4572
4573 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4574
4575 * name-lookup.c: New file.
4576 * name-lookup.h: Likewise..
4577 * decl.c (push_binding): Adjust use cxx_binding_make.
4578 (free_bindings): Move to name-lookup.c
4579 (pop_binding): Use cxx_binding_free.
4580 (binding_for_name): Tidy.
4581 * cp-tree.h: Include "name-lookup.h"
4582 (cxx_binding_make): Move to name-lookup.h
4583 (cxx_binding_clear): Likewise.
4584 (struct cxx_binding): Likewise.
4585 (LOCAL_BINDING_P): Likewise.
4586 (INHERITED_VALUE_BINDING_P): Likewise.
4587 (BINDING_SCOPE): Likewise.
4588 (BINDING_HAS_LEVEL_P): Likewise.
4589 (BINDING_VALUE): Likewise.
4590 (BINDING_TYPE): Likewise.
4591 * config-lang.in (gtfiles): Add cp/name-lookup.h
4592 * Make-lang.in (cp/name-lookup.o): New rule.
4593 (CXX_OBJS): Add cp/name-lookup.o
4594 (CXX_TREE_H): Add cp/name-lookup.h
4595
4596 2003-03-28 Jason Merrill <jason@redhat.com>
4597
4598 PR c++/10245
4599 * cvt.c (force_rvalue): New fn.
4600 * call.c (build_conditional_expr): Use it.
4601 * cp-tree.h: Declare it.
4602
4603 2003-03-28 Mike Stump <mrs@apple.com>
4604
4605 * error.c (dump_expr): Add 0x to printed hex numbers to make
4606 output match source code better.
4607
4608 2003-03-28 Mark Mitchell <mark@codesourcery.com>
4609
4610 PR c++/10218
4611 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4612 definitions.
4613
4614 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4615 non-existant ssdf_decls array.
4616 (finish_file): Call generator_ctor_or_dtor_function when there are
4617 static constructors or destructors and no other static
4618 initializations.
4619
4620 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
4621
4622 PR c++/10047
4623 * decl2.c (finish_file): Don't warn about explicitly instantiated
4624 inline decls.
4625
4626 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4627
4628 PR c++/10224
4629 * pt.c (lookup_template_class): Only check instantiated args if
4630 they do not contain template parameters.
4631
4632 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4633
4634 PR c++/10158
4635 * parser.c (cp_parser_function_definition): Set
4636 DECL_INITIALIZED_IN_CLASS for members.
4637 * pt.c (instantiate_decl): Only reduce the template args for
4638 friends that are not defined in class.
4639
4640 2003-03-25 Jason Merrill <jason@redhat.com>
4641
4642 * call.c (print_z_candidate): Change name of first arg to msgid.
4643 (joust): Add comment for translators.
4644
4645 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4646
4647 PR c++/9898, PR c++/383, DR 322
4648 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4649 through reference types on both PARM and ARG.
4650
4651 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4652
4653 PR c++/10119
4654 * error.c (dump_expr) <BASELINK>: Use dump_expr.
4655 * pt.c (maybe_fold_nontype_args): New function.
4656 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4657 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4658 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4659 maybe_fold_nontype_args.
4660
4661 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4662
4663 PR c++/10026
4664 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4665
4666 2003-03-23 Mark Mitchell <mark@codesourcery.com>
4667
4668 PR c++/7086
4669 * typeck.c (cxx_mark_addressable): Adjust call to
4670 gen_mem_addressof or put_var_into_stack.
4671
4672 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
4673
4674 PR c++/9978, c++/9708
4675 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4676 * call.c (add_template_candidate_real): Adjust
4677 instantiate_template call.
4678 * class.c (resolve_address_of_overloaded_function): Likewise.
4679 * decl.c (build_enumerator): Set TREE_CONSTANT.
4680 * pt.c (check_instantiated_args): New.
4681 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4682 TREE_READONLY.
4683 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4684 (reduce_template_parm_level): Likewise.
4685 (process_template_parm): Likewise.
4686 (check_explicit_specialization): Adjust instantiate_template call.
4687 (convert_template_argument): Don't check non-type argument here.
4688 (lookup_template_class): Check them here.
4689 (tsubst_friend_function): Adjust instantiate_template call.
4690 (instantiate_template): Add tsubst_flags parameter, use it. Check
4691 instantiated args.
4692
4693 2003-03-21 Zack Weinberg <zack@codesourcery.com>
4694
4695 * decl.c: Update calls to shadow_warning.
4696
4697 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
4698
4699 PR c++/9898
4700 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4701 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4702
4703 2003-03-20 Mark Mitchell <mark@codesourcery.com>
4704
4705 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4706 friends.
4707 * cp/pt.c (instantiate_class_template): Fix formatting.
4708
4709 2003-03-14 Matt Austern <austern@apple.com>
4710
4711 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4712 (unemitted_tinfo_decl_p): Remove.
4713 (emit_tinfo_decl): Change declaration to remove unused parameter.
4714 * decl2.c (finish_file): Change tinfo emission to loop through
4715 unemitted_tinfo_decls array instead of looping through all decls.
4716 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4717 unused second parameter.
4718 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4719 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4720 (emit_tinfo_decl): remove unused second parameter, add assertion
4721 that decl hasn't already been emitted.
4722
4723 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
4724
4725 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4726 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4727 return statements.
4728
4729 2003-03-19 Jason Merrill <jason@redhat.com>
4730
4731 PR c++/8316, c++/9315, c++/10136
4732 * call.c (print_z_candidate): Split out from...
4733 (print_z_candidiates): ...here.
4734 (joust): Use it.
4735
4736 2003-03-17 Roger Sayle <roger@eyesopen.com>
4737
4738 PR c++/10031
4739 * decl.c (duplicate_decls): Use the new type when prototyping
4740 anticipated decls, even when the types match. This defines the
4741 exception list for the built-in function.
4742
4743 2003-03-17 Jason Merrill <jason@redhat.com>
4744
4745 PR c++/10091
4746 * typeck.c (build_class_member_access_expr): Compare
4747 TYPE_MAIN_VARIANTs.
4748
4749 2003-03-17 Mark Mitchell <mark@codesourcery.com>
4750
4751 PR c++/9639
4752 * parser.c (cp_parser_declarator_id): Clear parser->scope.
4753
4754 2003-03-16 Jason Merrill <jason@redhat.com>
4755
4756 PR c++/9993
4757 * decl.c (finish_function): Only allow the NRVO to use variables
4758 declared at function scope.
4759
4760 2003-03-17 Andreas Jaeger <aj@suse.de>
4761
4762 * Make-lang.in (cp/TAGS): Remove.
4763
4764 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
4765
4766 PR c++/9629
4767 * cp-tree.h (struct language_function): Add in_base_initializer.
4768 (in_base_initializer): define it.
4769 (expand_member_init): Remove INIT param.
4770 * init.c (expand_member_init): Remove INIT param, return the member.
4771 (emit_mem_initializers): Set in_base_initializer.
4772 * class.c (build_base_path): Check in_base_initializer.
4773 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4774 * pt.c (tsubst_initializer_list): Likewise.
4775
4776 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
4777
4778 * decl.c (binding_for_name): Fix initialization thinko.
4779
4780 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4781
4782 Compile-time improvement: 2/n.
4783 * cp-tree.h (struct cxx_binding): New datatype;
4784 (struct lang_identifier): Use it.
4785 (LOCAL_BINDING_P): Adjust definition.
4786 (INHERITED_VALUE_BINDING_P): Likewise.
4787 (BINDING_SCOPE): Likewise.
4788 (BINDING_HAS_LEVEL_P): Likewise.
4789 (BINDING_VALUE): Likewise.
4790 (BINDING_TYPE): Likewise.
4791 (IDENTIFIER_VALUE): Likewise.
4792 (struct tree_binding): Remove.
4793 (TS_CP_BINDING): Likewise.
4794 ((union lang_tree_node): Remove field "binding".
4795 (cxx_binding_clear): New macro.
4796 (binding_for_name): Adjust return type.
4797 (qualified_lookup_using_namespace): Adjust prototype.
4798 (lookup_using_namespace): Adjust prototype.
4799 (cxx_scope_find_binding_for_name): Declare.
4800 * cp-tree.def: Remove CPLUS_BINDING definition.
4801 * decl.c (push_binding): Adjust local variable type.
4802 (add_binding): Likewise.
4803 (push_class_binding): Likewise.
4804 (pop_binding): Likewise.
4805 (poplevel): Likewise.
4806 (poplevel_class): Likewise.
4807 (free_bindings): Adjust type.
4808 (find_binding): Adjust return type, add a third parameter. Remove
4809 non-useful assertion now that we use static typing.
4810 (cxx_scope_find_binding_for_name): New function.
4811 (binding_for_name): Use it. Adjust local variable type. Simplify.
4812 (namespace_binding): Simplify.
4813 (set_namespace_binding): Likewise.
4814 (set_identifier_type_value_with_scope): Adjust local variable type.
4815 (lookup_tag): Don't type-abuse of local variable 'old'.
4816 (lookup_namespace_name): Likewise. Allocate binding on stack.
4817 (select_decl): Adjust prototype.
4818 (unqualified_namespace_lookup): Allocate binding on stack.
4819 Don't type-abuse of local variable 'val'.
4820 (lookup_name_real): Likewise.
4821 (maybe_inject_for_scope_var): Adjust local variable type.
4822 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4823 (namespace_binding): Adjust logic, simplify.
4824 (BINDING_LEVEL): Adjust definition.
4825 (push_class_level_binding): Adjust local variable type.
4826 (struct cxx_saved_binding): Adjust field 'binding' type.
4827 * decl2.c (ambiguous_decl): Adjust prototype.
4828 (lookup_using_namespace): Adjust local variable type.
4829 (qualified_lookup_using_namespace): Catch type error and correct
4830 ensueing logic error.
4831 (do_nonmember_using_decl): Adjust local variable type. Allocate
4832 temporary cxx_binding on stack.
4833 (do_toplevel_using_decl): Adjust local variable type.
4834 * ptree.c (cxx_print_cxx_binding): New function.
4835 (cxx_print_identifier): Use it.
4836 (cxx_print_xnode): Delete CPLUS_BINDING case label.
4837
4838 2003-03-15 Roger Sayle <roger@eyesopen.com>
4839
4840 * tree.c (count_functions): Fix whitespace.
4841
4842 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
4843
4844 * Make-lang.in: Update.
4845
4846 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4847
4848 PR c++/6440
4849 * pt.c (maybe_process_partial_specialization): Handle
4850 member class template when enclosing class template is
4851 explicit specialized.
4852 (most_general_template): Stop looking when DECL is already
4853 specialized.
4854
4855 2003-03-13 Jason Merrill <jason@redhat.com>
4856
4857 PR c++/9420
4858 * search.c (lookup_conversions): Call complete_type here.
4859 * call.c (implicit_conversion): Not here.
4860
4861 2003-03-13 Mark Mitchell <mark@codesourcery.com>
4862
4863 * decl2.c (do_nonmember_using_decl): Correct handling of
4864 simultaneous type/non-type bindings.
4865
4866 * call.c (initialize_reference): Remove bogus assertion.
4867 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4868
4869 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
4870
4871 PR c++/7050
4872 * expr.c (cxx_expand_expr): Return const0_rtx for throw
4873 expressions.
4874
4875 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4876
4877 PR c++/9474
4878 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4879 to merge old and new declarations.
4880
4881 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4882
4883 * g++.1: Remove.
4884 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4885 (cp/g++.1): Build it from scratch in the build tree.
4886 (c++.install-man): Depend on it. Install it from the build tree.
4887 (c++.mostlyclean): Clean it.
4888
4889 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4890
4891 PR c++/9474
4892 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4893 to merge old and new declarations.
4894
4895 PR c++/9924
4896 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4897
4898 2003-03-11 Jason Merrill <jason@redhat.com>
4899
4900 PR c++/9820
4901 * search.c (lookup_member): Fix handling of functions in a class
4902 being defined.
4903
4904 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4905
4906 PR c++/8700
4907 * call.c (convert_class_to_reference): Adjust usage of
4908 splice_viable.
4909 (any_viable): Remove.
4910 (splice_viable): Combine with any_viable.
4911 (print_z_candidates): Avoid printing duplicates.
4912 (build_user_type_conversion_1): Adjust usage of splice_viable.
4913 (build_new_function_call): Likewise.
4914 (build_operator_new_call): Likewise.
4915 (build_object_call): Likewise.
4916 (build_conditional_expr): Likewise.
4917 (build_new_op): Likewise.
4918 (build_new_method_call): Likewise.
4919 (joust): Remove spurious comment.
4920 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4921 * decl2.c (arg_assoc_class): Simplify.
4922 * friend.c (add_friend): Likewise.
4923
4924 2003-03-11 Jason Merrill <jason@redhat.com>
4925
4926 PR c++/8660
4927 * decl2.c (check_classfn): A member template only matches a
4928 member template.
4929
4930 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
4931
4932 * Make-lang.in (CXX_C_OBJS): Update.
4933 * lang-specs.h: Don't define __GNUG__ here.
4934
4935 2003-03-10 Mark Mitchell <mark@codesourcery.com>
4936
4937 * call.c (perform_overload_resolution): New function.
4938 (build_new_function_call): Use it.
4939 (build_operator_new_call): Likewise.
4940 (add_candidates): Add explicit_targs and template_only parameters.
4941 (build_new_op): Adjust accordingly.
4942 * cp-tree.h (build_operator_new_call): New function.
4943 (build_function_call_real): Remove.
4944 (build_function_call_maybe): Likewise.
4945 * init.c (build_new_1): Use build_operator_new_call.
4946 * typeck.c (build_function_call_real): Rename to ...
4947 (build_function_call): ... this.
4948
4949 2003-03-10 Devang Patel <dpatel@apple.com>
4950
4951 PR c++/9394
4952 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4953
4954 2003-03-10 Jason Merrill <jason@redhat.com>
4955
4956 PR c++/9798
4957 * decl.c (push_using_directive): Push before recursing.
4958
4959 PR c++/9868, c++/9524
4960 * call.c (resolve_scoped_fn_name): Handle the case of a function
4961 pointer member.
4962
4963 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4964 argument in the pointer-to-member case.
4965
4966 2003-03-09 Mark Mitchell <mark@codesourcery.com>
4967
4968 PR c++/9373
4969 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4970 pointers to member functions.
4971
4972 PR c++/8534
4973 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4974 in pointer-to-member-function types.
4975
4976 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4977
4978 * expr.c (cplus_expand_constant): Use C90 prototype style.
4979 (cxx_expand_expr): Likewise.
4980
4981 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4982
4983 PR c++/9970
4984 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4985 functions.
4986
4987 2003-03-08 Geoffrey Keating <geoffk@apple.com>
4988
4989 * lang-specs.h (c++-header): Change .pch to .gch.
4990
4991 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
4992
4993 * cp-tree.h (cxx_init): Update prototype.
4994 * lex.c (cxx_init): Similarly.
4995
4996 2003-03-08 Mark Mitchell <mark@codesourcery.com>
4997
4998 PR c++/9823
4999 * cp-tree.h (begin_mem_initializers): Remove.
5000 * parser.c (cp_parser_mem_initializer_list): Inline it here.
5001 Do not call finish_mem_initializers if not in a constructor.
5002 (cp_parser_class_head): Fix typo in error message.
5003 * semantics.c (begin_mem_initializers): Remove.
5004 * testsuite/g++.dg/parser/constructor1.C: New test.
5005
5006 PR c++/9809
5007 * call.c (add_function_candidate): Skip builtin fuctions that have
5008 not yet been declared.
5009
5010 PR c++/9982
5011 * init.c (build_new_1): Correct logic for determining whether or
5012 not to use an array cookie.
5013
5014 PR c++/9524
5015 * parser.c (cp_parser_postfix_expression): Call
5016 finish_non_static_data_member, even when processing_template_decl.
5017
5018 PR c++/9912
5019 * cp-tree.h (is_ancestor): New function.
5020 (handle_class_head): Change prototype.
5021 * decl2.c (is_namespace_ancestor): Rename to ...
5022 (namespace_anecestor): ... this.
5023 (set_decl_namespace): Adjust accordingly.
5024 (handle_class_head): Remove unnecessary parameters.
5025 * parser.c (cp_parser_class_head): Check that
5026 nested-name-specifiers are used appropriately.
5027
5028 2003-03-07 Mark Mitchell <mark@codesourcery.com>
5029
5030 * call.c (reference_binding): Remove REF_IS_VAR parameter.
5031 (implicit_conversion): Adjust call to reference_binding.
5032 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
5033 (initialize_reference): Adjust handling for references bound to
5034 rvalues.
5035 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
5036 prototype.
5037 (real_non_cast_lvalue_p): New method.
5038 * cvt.c (build_up_reference): Adjust use of
5039 make_temporary_var_for_ref_to_temp.
5040 * tree.c (real_non_cast_lvalue_p): New method.
5041
5042 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
5043
5044 * except.c (init_exception_processing): Use C90 prototype style.
5045 (cp_protect_cleanup_actions): Likewise.
5046 (prepare_eh_type): Likewise.
5047 (build_eh_type_type): Likewise.
5048 (build_exc_ptr): Likewise.
5049 (do_begin_catch): Likewise.
5050 (dtor_nothrow): Likewise.
5051 (do_end_catch): Likewise.
5052 (push_eh_cleanup): Likewise.
5053 (decl_is_java_type): Likewise.
5054 (choose_personality_routine): Likewise.
5055 (initialize_handler_parm): Likewise.
5056 (expand_start_catch_block): Likewise.
5057 (expand_end_catch_block): Likewise.
5058 (begin_eh_spec_block): Likewise.
5059 (finish_eh_spec_block): Likewise.
5060 (do_allocate_exception): Likewise.
5061 (do_free_exception): Likewise.
5062 (wrap_cleanups_r): Likewise.
5063 (stabilize_throw_expr): Likewise.
5064 (build_throw): Likewise.
5065 (complete_ptr_ref_or_void_ptr_p): Likewise.
5066 (is_admissible_throw_operand): Likewise.
5067 (nothrow_libfn_p): Likewise.
5068 (can_convert_eh): Likewise.
5069 (check_handlers_1): Likewise.
5070 (check_handlers): Likewise.
5071
5072 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5073
5074 * call.c (merge_conversion_sequences): New function.
5075 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
5076 (convert_class_to_reference): Correct handling of second
5077 standard conversion sequence in a user-defined conversion
5078 sequence.
5079 (build_user_type_conversion_1): Use merge_conversion_sequences.
5080 * cp-tree.def: Add comments for CONV nodes.
5081 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
5082
5083 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
5084
5085 * error.c (init_error): Use C90 prototype style.
5086 (dump_scope): Likewise.
5087 (dump_qualifiers): Likewise.
5088 (dump_template_argument): Likewise.
5089 (dump_template_argument_list): Likewise.
5090 (dump_template_parameter): Likewise.
5091 (dump_template_bindings): Likewise.
5092 (dump_type): Likewise.
5093 (dump_typename): Likewise.
5094 (class_key_or_enum): Likewise.
5095 (dump_aggr_type): Likewise.
5096 (dump_type_prefix): Likewise.
5097 (dump_type_suffix): Likewise.
5098 (dump_global_iord): Likewise.
5099 (dump_simple_decl): Likewise.
5100 (dump_decl): Likewise.
5101 (dump_template_decl): Likewise.
5102 (dump_function_decl): Likewise.
5103 (dump_parameters): Likewise.
5104 (dump_exception_spec): Likewise.
5105 (dump_function_name): Likewise.
5106 (dump_template_parms): Likewise.
5107 (dump_char): Likewise.
5108 (dump_expr_list): Likewise.
5109 (dump_expr): Likewise.
5110 (dump_binary_op): Likewise.
5111 (dump_unary_op): Likewise.
5112 (type_as_string): Likewise.
5113 (expr_as_string): Likewise.
5114 (decl_as_string): Likewise.
5115 (context_as_string): Likewise.
5116 (lang_decl_name): Likewise.
5117 (cp_file_of): Likewise.
5118 (cp_line_of): Likewise.
5119 (decl_to_string): Likewise.
5120 (expr_to_string): Likewise.
5121 (fndecl_to_string): Likewise.
5122 (code_to_string): Likewise.
5123 (language_to_string): Likewise.
5124 (parm_to_string): Likewise.
5125 (op_to_string): Likewise.
5126 (type_to_string): Likewise.
5127 (assop_to_string): Likewise.
5128 (args_to_string): Likewise.
5129 (cv_to_string): Likewise.
5130 (cxx_print_error_function): Likewise.
5131 (cp_diagnostic_starter): Likewise.
5132 (cp_diagnostic_finalizer): Likewise.
5133 (cp_print_error_function): Likewise.
5134 (function_category): Likewise.
5135 (print_instantiation_full_context): Likewise.
5136 (print_instantiation_partial_context): Likewise.
5137 (maybe_print_instantiation_context): Likewise.
5138 (print_instantiation_context): Likewise.
5139 (cp_printer): Likewise.
5140 (print_integer): Likewise.
5141 (print_non_consecutive_character): Likewise.
5142 (locate_error): Likewise.
5143
5144 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5145
5146 PR c++/9965
5147 * call.c (reference_binding): Add ref_is_var parameter.
5148 (implicit_conversion): Adjust call to reference_binding.
5149 (initialize_reference): Likewise.
5150
5151 PR c++/9400
5152 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5153 PARM_DECLs.
5154
5155 PR c++/9791
5156 * class.c (get_basefndecls): Use lookup_fnfields_1.
5157
5158 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5159
5160 PR c++/9188
5161 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5162 in error message.
5163 (cp_parser_single_declaration): Likewise.
5164
5165 2003-03-05 Jason Merrill <jason@redhat.com>
5166
5167 PR c++/9440
5168 * call.c (build_conditional_expr): Use convert rather than an
5169 explicit NOP_EXPR.
5170
5171 2003-03-02 Matt Austern <austern@apple.com>
5172
5173 * decl.c (cp_binding_level): Add static_decls varray member.
5174 (add_decl_to_level): Add static/inline namespace scope
5175 declarations to static_decls array.
5176 (wrapup_global_for_namespace): Pass static_decls only, instead of
5177 all decls, to wrapup_global_declarations/check_global_declarations.
5178 (push_namespace): Initialize static_decls for ordinary namespaces.
5179 (cxx_init_decl_processing): Initialize static_decls for global
5180 namespace.
5181
5182 2003-03-05 Mark Mitchell <mark@codesourcery.com>
5183
5184 * class.c (end_of_class): Correct thinko.
5185
5186 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
5187
5188 * config-lang.in: Replace ${libstdcxx_version} by its value.
5189
5190 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5191
5192 * cp-tree.h (cxx_saved_binding): Declare.
5193 (struct saved_scope): Adjust type of field 'old_binding'.
5194 * decl.c (cxx_saved_binding_make): New macro.
5195 (struct cxx_saved_binding): Define.
5196 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
5197 C++ bindings.
5198 (maybe_push_to_top_level): Adjust local variable type.
5199 (pop_from_top_level): Likewise.
5200
5201 2003-03-04 Tom Tromey <tromey@redhat.com>
5202
5203 * Make-lang.in (c++.tags): New target.
5204
5205 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
5206
5207 * Make-lang.in: Update.
5208
5209 2003-03-03 Jason Merrill <jason@redhat.com>
5210
5211 * decl.c (finish_enum): Do set the type in a template. Simplify.
5212 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5213
5214 2003-03-03 Mark Mitchell <mark@codesourcery.com>
5215
5216 PR c++/9878
5217 * call.c (convert_class_to_reference): Correct conversion
5218 sequences.
5219 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5220 (implicit_conversion): Adjust call to reference_binding.
5221 (add_candidate): Change type of candidates parameter.
5222 (add_function_candidate): Likewise.
5223 (add_conv_candidate): Likewise.
5224 (build_builtin_candidate): Likewise.
5225 (add_builtin_candidate): Likewise.
5226 (add_builtin_candidates): Likewise.
5227 (add_template_candidate_real): Likewise.
5228 (add_template_candidate): Likewise.
5229 (add_template_conv_candidate): Likewise.
5230 (build_user_type_conversion_1): Adjust accordingly.
5231 (build_object_call): Likewise.
5232 (build_conditional_expr): Likewise.
5233 (add_candidates): Likewise.
5234 (build_new_op): Likewise.
5235 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
5236 (build_new_method_call): Adjust calls to add_function_candidate.
5237 (make_temporary_var_for_ref_to_temp): New function.
5238 (initialize_reference): Add decl parameter.
5239 * class.c (build_rtti_vtbl_entries): Use build_address and
5240 build_nop.
5241 * cp-tree.h (initialize_reference): Change prototype.
5242 (make_temporary_var_for_ref_to_temp): New function.
5243 (build_type_conversion): Change prototype.
5244 (build_address): New function.
5245 (build_nop): Likewise.
5246 * cvt.c (cp_convert_to_pointer): Adjust call to
5247 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
5248 Use build_nop.
5249 (convert_to_pointer_force): Use build_nop.
5250 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5251 (convert_to_reference): Adjust call to build_type_conversion.
5252 (ocp_convert): Likewise.
5253 (build_type_conversion): Remove for_sure parameter.
5254 * decl.c (grok_reference_init): Use initialize_reference.
5255 * typeck.c (build_address): New function.
5256 (build_nop): Likewise.
5257 (build_unary_op): Use them.
5258 (build_ptrmemfunc): Tidy slightly.
5259 (convert_for_initialization): Adjust call to
5260 initialize_reference.
5261 * typeck2.c (store_init_value): Remove #if 0'd code.
5262
5263 2003-03-03 Jason Merrill <jason@redhat.com>
5264
5265 * decl.c (start_function): Clear DECL_NUM_STMTS.
5266
5267 * class.c (get_vtable_decl): Use vtbl_type_node.
5268 (build_primary_vtable): Check for it.
5269
5270 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
5271
5272 * decl.c (check_initializer): Check for vector_opaque_p.
5273
5274 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
5275
5276 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5277 invoke an external cpp during compilation.
5278
5279 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5280
5281 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5282 that of warning().
5283 (start_decl): Likewise.
5284 (start_function): Likewise.
5285
5286 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
5287
5288 * Make-lang.in (CXX_C_OBJS): Update.
5289
5290 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5291
5292 PR c++/9892
5293 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5294 instantiating it.
5295
5296 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
5297
5298 * parser.c (cp_parser_init_declarator): Revert opaque
5299 vector_opaque_p change.
5300 Do not include target.h.
5301
5302 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5303
5304 PR c++/9879
5305 * cp-tree.h (build_zero_init): Add parameter.
5306 * decl.c (cp_finish_decl): Adjust call.
5307 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
5308 calls.
5309 (build_default_init): Add nelts parameter. Adjust calls to
5310 build_zero_init.
5311 (build_new_1): Adjust call to build_default_init.
5312 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5313
5314 2003-02-26 Devang Patel <dpatel@apple.com>
5315
5316 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5317 required. Postpone enum setting for template decls.
5318 (build_enumerator): Delay copying value node until finish_enum
5319 (). Remove #if 0'ed code.
5320 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5321 (tsubst_copy): Add check for enum type.
5322
5323 2003-02-25 Mark Mitchell <mark@codesourcery.com>
5324
5325 PR c++/9683
5326 * decl2.c (prune_vars_needing_no_initialization): Do not throw
5327 away initializations for DECL_EXTERNAL VAR_DECLs.
5328 (finish_file): Adjust accordingly.
5329 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5330
5331 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5332
5333 * decl.c (add_binding): Time TV_NAME_LOOKUP.
5334 (push_class_binding): Likewise.
5335 (set_namespace_binding): Likewise.
5336
5337 2003-02-24 Mark Mitchell <mark@codesourcery.com>
5338
5339 PR c++/9836
5340 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5341 specializations back to the main template.
5342 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5343 * pt.c (resolve_typename_type): Likewise.
5344
5345 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
5346
5347 PR c++/9778
5348 * pt.c (tsubst_copy_and_build): For a templated function inside a
5349 scope, process template arguments.
5350
5351 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5352
5353 PR c++/9602
5354 * typeck2.c (abstract_virtuals_error): Don't check when
5355 TYPE is still template parameter dependent.
5356
5357 2003-02-23 Mark Mitchell <mark@codesourcery.com>
5358
5359 PR c++/5333
5360 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5361 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5362 * pt.c (instantiate_class_template): Don't try to instantiate
5363 dependent types.
5364 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5365
5366 2003-02-21 Mark Mitchell <mark@codesourcery.com>
5367
5368 PR c++/9749
5369 * decl.c (grokdeclarator): Do not allow parameters with variably
5370 modified types.
5371
5372 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
5373
5374 * search.c (grow_bfs_bases): Remove. Fold into ...
5375 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5376 in previous patch.
5377
5378 2003-02-20 Mark Mitchell <mark@codesourcery.com>
5379
5380 PR c++/9729
5381 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5382 when the G++ 3.2 ABI prevents correct compilation.
5383
5384 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
5385
5386 Change base class access representation. Share virtual base
5387 binfos.
5388 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5389 call.
5390 * cp/class.c (build_base_path): Likewise.
5391 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5392 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5393 (make_new_vtable): Adjust.
5394 (force_canonical_binfo_r): Delete.
5395 (force_canonical_binfo): Delete.
5396 (mark_primary_virtual_base): Delete.
5397 (dfs_unshared_virtual_bases): Delete.
5398 (mark_primary_bases): Adjust.
5399 (maybe_warn_about_overly_private_class): Adjust.
5400 (dfs_base_derived_from): Delete.
5401 (base_derived_from): Follow the inheritance chain.
5402 (struct find_final_overrider_data): Add vpath member.
5403 (dfs_find_final_overrider): Adjust.
5404 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5405 (find_final_overrider): Adjust.
5406 (update_vtable_entry_for_fn): Adjust.
5407 (modify_all_vtables): Adjust.
5408 (walk_subobject_offsets): Adjust.
5409 (layout_nonempty_base_or_field): Adjust.
5410 (layout_empty_base): Remove last parameter. Adjust.
5411 (build_base_field): Adjust.
5412 (build_base_fields): Adjust.
5413 (propagate_binfo_offsets): Remove last parameter. Adjust.
5414 (dfs_set_offset_for_unshared_vbases): Delete.
5415 (layout_virtual_bases): Adjust.
5416 (finish_struct_1): Adjust.
5417 (init_class_processing): Don't init access nodes.
5418 (dfs_get_primary_binfo): Delete.
5419 (get_primary_binfo): Adjust.
5420 (dump_class_hierarchy_r): Remove most derived arg, add IGO
5421 parameter. Adjust.
5422 (dump_class_hierarchy): Adjust.
5423 (finish_vtbls): Adjust.
5424 (get_original_base): Delete.
5425 (build_vtt_inits): Adjust.
5426 (dfs_build_secondary_vptr_vtt_inits): Adjust.
5427 (dfs_ctor_vtable_bases_queue_p): Adjust.
5428 (build_ctor_vtbl_group): Adjust.
5429 (dfs_accumulate_vtbl_inits): Adjust.
5430 (build_vtbl_initializer): Adjust.
5431 (build_vbase_offset_vtbl_entries): Adjust.
5432 (add_vcall_offset_vtbl_entries_1): Adjust.
5433 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5434 (access_*_node): Remove.
5435 (CANONICAL_BINFO): Delete.
5436 (BINFO_UNSHARED_MARKED): Remove.
5437 (BINFO_MARKED): Set LANG_FLAG_0 directly.
5438 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5439 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5440 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5441 Delete.
5442 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5443 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5444 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5445 Delete.
5446 (BINFO_DEPENDENT_BASE_P): New.
5447 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5448 index.
5449 (markedp, unmarkedp): Adjust.
5450 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5451 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5452 find_vbase_instance, binfo_for_vbase): Delete.
5453 (copied_binfo, original_binfo): Declare.
5454 (finish_base_specifier): Add virtual_p arg.
5455 (unshare_base_binfos): Delete.
5456 (copy_base_binfos): Declare.
5457 (reverse_path): Delete.
5458 * cp/decl.c (xref_basetypes): Access and virtuality passed
5459 differently. Don't copy direct base binfos here. Call
5460 copy_base_binfos.
5461 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5462 (initialize_vtbl_ptrs): Adjust.
5463 (expand_member_init): Adjust.
5464 * cp/parser.c (cp_parser_base_specifier): Adjust.
5465 * cp/pt.c (instantiate_class_template): Adjust.
5466 (get_template_base_recursive): Adjust.
5467 * cp/rtti.c (get_pseudo_ti_init): Adjust.
5468 (get_pseudo_ti_desc): Adjust.
5469 * cp/tree.c (unshare_base_binfos): Rename to ...
5470 (copy_base_binfos): ... here, reimplement.
5471 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5472 (reverse_path): Remove.
5473 * cp/typeck.c (get_delta_difference): Adjust error messages.
5474 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5475 * cp/search.c (lookup_base_r): Adjust.
5476 (dynamic_cast_base_recurse): Adjust.
5477 (canonical_binfo): Remove.
5478 (dfs_canonical_queue): Remove.
5479 (dfs_assert_unmarked_p): Remove.
5480 (assert_canonical_unmarked): Remove.
5481 (shared_marked_p, shared_unmarked_p): Remove.
5482 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5483 (dfs_access_in_type): Adjust.
5484 (access_in_type): Adjust.
5485 (dfs_accessible_queue_p): Adjust.
5486 (dfs_accessible_p): Adjust.
5487 (is_subobject_of_p_1, is_subobject_of_p): Remove.
5488 (struct lookup_field_info): Remove from_dep_base_p field.
5489 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5490 (lookup_field_r): Remove dependent base code.
5491 (lookup_member): Likewise.
5492 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5493 (dfs_unmarked_real_bases_queue_p): Remove.
5494 (dfs_marked_real_bases_queue_p): Remove.
5495 (dfs_skip_vbases): Remove.
5496 (dfs_get_pure_virtuals): Adjust.
5497 (markedp, unmarkedp): Adjust.
5498 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5499 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5500 (dfs_unmark): Adjust.
5501 (dfs_get_vbase_types):Remove.
5502 (dfs_build_inheritance_graph_order): Remove.
5503 (get_vbase_types): Remove
5504 (dfs_find_vbase_instance): Remove.
5505 (find_vbase_instance): Remove.
5506 (dfs_debug_unmarkedp): Adjust.
5507 (dependent_base_p): Remove.
5508 (dfs_push_type_decls): Adjust.
5509 (dfs_push_decls): Adjust.
5510 (dfs_no_overlap_yet): Adjust.
5511 (copied_binfo): New function.
5512 (original_binfo): New function.
5513 (binfo_for_vbase): Remove.
5514
5515 2003-02-18 Zack Weinberg <zack@codesourcery.com>
5516
5517 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5518 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5519 vectors, for speed.
5520
5521 2003-02-18 Mark Mitchell <mark@codesourcery.com>
5522
5523 PR c++/9704
5524 * class.c (layout_class_type): In the 3.2 ABI, take into account
5525 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5526
5527 2003-02-18 Matt Austern <austern@apple.com>
5528
5529 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5530 nothing for C++.
5531 * cp/decl.c (wrapup_globals_for_namespace): Remove special
5532 handling of global namespace.
5533
5534 2003-02-18 Geoffrey Keating <geoffk@apple.com>
5535
5536 * cp-tree.h (rid_to_yy): Delete.
5537 (C_RID_YYCODE): Delete.
5538 (finish_file): Delete redundant declaration.
5539
5540 2003-02-18 Jason Merrill <jason@redhat.com>
5541
5542 PR c++/9623
5543 * decl.c (reshape_init): Don't mess with initializer labels.
5544
5545 PR c++/9485
5546 * parser.c (cp_parser_postfix_expression): Set idk properly for
5547 object->scope::member.
5548
5549 2003-02-18 Ben Elliston <bje@redhat.com>
5550
5551 PR other/7350
5552 * decl.c (duplicate_decls): Fix typo in comment.
5553
5554 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
5555
5556 PR debug/9717
5557 * class.c (build_base_field): Mark fields for base classes with
5558 DECL_IGNORED_P.
5559
5560 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5561
5562 PR c++/9457
5563 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5564 CONSTRUCTOR_ELTS only once.
5565
5566 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5567
5568 PR c++/9459
5569 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5570 (dump_type_suffix): Likewise.
5571
5572 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
5573
5574 * search.c: ANSIfy function declarations and definitions.
5575 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5576 * call.c (build_method_call, resolve_scoped_fn_name,
5577 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5578 calls.
5579 * class.c (handle_using_decl): Likewise.
5580 * decl.c (make_typename_type, make_unmound_class_template,
5581 start_decl, compute_array_index_type): Likewise.
5582 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5583 * init.c (expand_member_init, build_member_call): Likewise.
5584 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5585 resolve_typename_type): Likewise.
5586 * typeck.c (lookup_destructor, finish_class_member_access_exprm
5587 build_prememfunc_access_expr): Likewise.
5588
5589 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5590
5591 * decl2.c: Include "timevar.h".
5592 (namespace_ancestor): Time name lookup.
5593 (add_using_namespace): Likewise.
5594 (lookup_using_namespace): Likewise.
5595 (qualified_lookup_using_namespace): Likewise.
5596 (decl_namespace): Likewise.
5597 (lookup_arg_dependent): Likewise.
5598 * lex.c (do_identifier): Likewise.
5599 (do_scoped_id): Likewise.
5600 * pt.c (lookup_template_class): Likewise.
5601
5602 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
5603
5604 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5605
5606 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5607
5608 * decl.c: Include "timevar.h".
5609 (poplevel): Time name lookup.
5610 (find_binding): Likewise.
5611 (push_namespace): Likewise.
5612 (pop_nested_namespace): Likewise.
5613 (store_bindings): Likewise.
5614 (maybe_push_to_top_level): Likewise.
5615 (pop_from_top_level): Likewise.
5616 (push_local_name): Likewise.
5617 (pushtag): Likewise.
5618 (pushdecl): Likewise.
5619 (pushdecl_with_scope): Likewise.
5620 (pushdecl_namespace_level): Likewise.
5621 (pushdecl_top_level): Likewise.
5622 (pushdecl_class_level): Likewise.
5623 (push_class_level_binding): Likewise.
5624 (push_using_decl): Likewise.
5625 (push_using_directive): Likewise.
5626 (push_overloaded_decl): Likewise.
5627 (lookup_label): Likewise.
5628 (define_label): Likewise.
5629 (lookup_tag): Likewise.
5630 (lookup_tag_reverse): Likewise.
5631 (lookup_namespace_name): Likewise.
5632 (select_decl): Likewise.
5633 (unqualified_namespace_lookup): Likewise.
5634 (lookup_name_real): Likewise.
5635 (lookup_name_current_level): Likewise.
5636 (lookup_type_current_level): Likewise.
5637 (maybe_inject_for_scope_var): Likewise.
5638 (xref_tag): Likewise.
5639
5640 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5641
5642 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
5643
5644 * decl.c (build_enumerator): Remove unneeded test.
5645
5646 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
5647
5648 * cp-tree.h (struct lang_type_header): Make all fields unsigned
5649 char.
5650
5651 2003-02-03 Mark Mitchell <mark@codesourcery.com>
5652
5653 PR c++/7129
5654 * call.c (z_candidate): Add args.
5655 (convert_class_to_reference): Set it.
5656 (implicit_conversion): Tidy.
5657 (add_candidate): Add args parameter.
5658 (add_function_candidate): Adjust call to add_candidate.
5659 (add_conv_candidate): Likewise.
5660 (build_builtin_candidate): Likewise.
5661 (build_user_type_conversion_1): Eliminate wasteful tree_cons
5662 usage.
5663 (build_new_function_call): Likewise.
5664 (build_object_call): Likewise.
5665 (add_candidates): New function.
5666 (build_new_op): Use it.
5667 (covert_like_real): Adjust call to build_over_call.
5668 (build_over_call): Remove args parameter.
5669 * operators.def: Add <?= and >?=.
5670
5671 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
5672
5673 * typeck.c (build_indirect_ref): Don't check flag_volatile.
5674
5675 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5676
5677 PR c++/8849
5678 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5679
5680 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
5681
5682 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5683 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5684 (BINFO_LANG_ELTS): New #define.
5685 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5686
5687 2003-01-30 Geoffrey Keating <geoffk@apple.com>
5688
5689 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5690
5691 2003-01-30 Mark Mitchell <mark@codesourcery.com>
5692
5693 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5694 for class types.
5695 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5696 rather than TYPE_LANG_FLAG_0.
5697 (TYPE_BUILT_IN): Remove.
5698 (TYPE_DEPENDENT_P): New macro.
5699 (TYPE_DEPENDENT_P_VALID): Likewise.
5700 (lang_type_class): Add fields_readonly.
5701 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5702 * pt.c (dependent_type_p_r): New function, split out from ...
5703 (dependent_type_p): ... here. Memoize results.
5704 * search.c (dependent_base_p): Use dependent_type_p, not
5705 uses_template_parms.
5706 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5707 for class types.
5708
5709 2003-01-29 Mark Mitchell <mark@codesourcery.com>
5710
5711 * call.c (build_field_call): Use build_new_op, not build_opfncall.
5712 (prep_operand): New function.
5713 (build_new_op): Use it. Remove dead code.
5714 * class.c (pushclass): Change "modify" parameter type from int to
5715 bool.
5716 (currently_open_class): Use same_type_p, not pointer equality.
5717 (push_nested_class): Adjust calls to pushclass, remove modify
5718 parameter.
5719 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5720 (pushclass): Change prototype.
5721 (push_nested_class): Likewise.
5722 (grokoptypename): Remove.
5723 (build_opfncall): Remove.
5724 (value_dependent_expression_p): Declare.
5725 (resolve_typename_type): Likewise.
5726 (resolve_typename_type_in_current_instantiation): Likewise.
5727 (enter_scope_of): Remove.
5728 (tsubst): Remove.
5729 (tsubst_expr): Likewise.
5730 (tsubst_copy): Likewise.
5731 (tsubst_copy_and_build): Likewise.
5732 * decl.c (warn_about_implicit_typename_lookup): Remove.
5733 (finish_case_label): Return error_mark_node for erroneous labels.
5734 (start_decl): Adjust calls to push_nested_class.
5735 (grokfndecl): Call push_scope/pop_scope around call to
5736 duplicate_decls.
5737 (grokdeclarator): Do not call tsubst.
5738 (start_function): Adjust calls to push_nested_class.
5739 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5740 (check_classfn): Use push_scope/pop_scope around type comparisions.
5741 (grokoptypename): Remove.
5742 (push_sscope): Adjust call to push_nested_class.
5743 * error.c (dump_type): Show cv-qualification of typename types.
5744 * init.c (build_member_call): Use build_new_op, not
5745 build_opfncall.
5746 * method.c (build_opfncall): Remove.
5747 * parser.c (cp_parser): Add allow_non_constant_expression_p and
5748 non_constant_expression_p.
5749 (cp_parser_constant_expression): Adjust prototype.
5750 (cp_parser_resolve_typename_type): Remove.
5751 (cp_parser_non_constant_expression): New function.
5752 (cp_parser_non_constant_id_expression): Likewise.
5753 (cp_parser_new): Set allow_non_constant_expression_p and
5754 non_constant_expression_p.
5755 (cp_parser_primary_expression): Reject `this' and `va_arg' in
5756 constant-expressions. Note that dependent names aren't really
5757 constant.
5758 (cp_parser_postfix_expression): Reject conversions to non-integral
5759 types in constant-expressions. Neither are increments or
5760 decrements.
5761 (cp_parser_unary_expression): Reject increments and decrements in
5762 constant-expressions.
5763 (cp_parser_direct_new_declarator): Adjust call to
5764 cp_parser_constant_expression.
5765 (cp_parser_cast_expression): Reject conversions to non-integral
5766 types in constant-expressions.
5767 (cp_parser_assignment_expression): Rejects assignments in
5768 constant-expressions.
5769 (cp_parser_expression): Reject commas in constant-expressions.
5770 (cp_parser_labeled_statement): Adjust call to
5771 cp_parser_constant_expression.
5772 (cp_parser_direct_declarator): Simplify array bounds, even in
5773 templates, when they are non-dependent. Use
5774 resolve_typename_type, not cp_parser_resolve_typename_type.
5775 (cp_parser_class_head): Use resolve_typename_type, not
5776 cp_parser_resolve_typename_type.
5777 (cp_parser_member_declaration): Adjust call to
5778 cp_parser_constant_expression.
5779 (cp_parser_constant_initializer): Likewise.
5780 (cp_parser_constructor_declarator): Use resolve_typename_type, not
5781 cp_parser_resolve_typename_type.
5782 (cp_parser_late_parsing_default_args): Adjust call to
5783 push_nested_class.
5784 * pt.c (tsubst): Give it internal linkage.
5785 (tsubst_expr): Likewise.
5786 (tsubst_copy): Likewise.
5787 (tsubst_copy_and_build): Likewise.
5788 (push_access_scope_real): Likewise.
5789 (tsubst_friend_class): Likewise.
5790 (instantiate_class_template): Adjust call to pushclass.
5791 (value_dependent_expression_p): Give it external linkage.
5792 Robustify.
5793 (resolve_typename_type): New function.
5794 * semantics.c (finish_call_expr): Use build_new_op, not
5795 build_opfncall.
5796 (begin_constructor_declarator): Remove.
5797 (begin_class_definition): Adjust call to pushclass.
5798 (enter_scope_of): Remove.
5799 * typeck.c (comptypes): Resolve typename types as appropriate.
5800 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5801 (build_x_compound_expr): Likewise.
5802 (build_modify_expr): Likewise.
5803 (build_x_modify_expr): Likewise.
5804 * typeck2.c (build_x_arrow): Likewise.
5805
5806 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
5807
5808 * pt.c (last_pending_template) Declare GTY().
5809
5810 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5811
5812 PR c++/8591
5813 * parser.c (cp_parser_elaborated_type_specifier): Convert
5814 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5815 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5816
5817 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
5818
5819 PR c++/9437
5820 * pt.c (unify): Don't unify '*T' with 'U C::*'.
5821
5822 PR c++/3902
5823 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5824 inside a declarator.
5825
5826 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
5827
5828 * class.c (update_vtable_entry_for_fn): Add index parameter.
5829 Generate vcall thunk for covariant overriding from a virtual
5830 primary base.
5831 (dfs_modify_vtables): Adjust.
5832
5833 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
5834
5835 PR c++/9403
5836 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5837 template keyword.
5838 (cp_parser_base_specifier): Look for and consume a
5839 TEMPLATE keyword. Replace switch with array index.
5840
5841 PR c++/795
5842 * semantics.c (finish_non_static_data_member): Remember the
5843 field's type even in a template.
5844
5845 PR c++/9415
5846 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5847 already scoped.
5848
5849 PR c++/8545
5850 * parser.c (cp_parser_cast_expression): Be more tentative.
5851
5852 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5853
5854 * cp-tree.h (flagged_type_tree_s): Remove.
5855 (check_for_new_type): Likewise.
5856 * typeck2.c (check_for_new_type): Likewise.
5857
5858 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
5859
5860 * dump.c: ANSIfy function declarations and definitions.
5861
5862 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
5863
5864 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5865
5866 PR c++/9354
5867 * init.c (build_new): Set the type of the new-expression, even
5868 when processing_templte_decl.
5869
5870 PR c++/9216
5871 * parser.c (cp_parser_primary_expression): Improve error message
5872 for templates used in an expression context.
5873
5874 PR c++/8696
5875 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5876 parse when encountering "typedef".
5877
5878 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
5879
5880 * class.c, parser.c: ANSIfy function definitions and declarations.
5881
5882 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5883
5884 PR c++/9328
5885 * error.c (dump_decl): For an OVERLOAD, just print the name of the
5886 function; it doesn't make sense to try to print its type.
5887 * semantics.c (finish_typeof): Issue errors about invalid uses.
5888
5889 PR c++/9298
5890 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5891 function.
5892 (cp_parser_expression_statement): Use it.
5893 (cp_parser_explicit_instantiation): Likewise.
5894 * pt.c (do_decl_instantiation): Improve error handling logic.
5895
5896 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5897
5898 PR c++/9384
5899 * parser.c (cp_parser_using_declaration): Issue error messages
5900 about name resolution failures here.
5901
5902 PR c++/9388
5903 * class.c (currently_open_derived_class): Use dependent_type_p.
5904 * cp-tree.h (dependent_type_p): New function.
5905 (dependent_template_arg_p): Likewise.
5906 (dependent_template_p): Likewise.
5907 (type_dependent_expression_p): Likewise.
5908 * parser.c (cp_parser_dependent_type_p): Remove.
5909 (cp_parser_value_dependent_type_p): Likewise.
5910 (cp_parser_type_dependent_expression_p): Likewise.
5911 (cp_parser_dependent_template_arg_p): Likewise.
5912 (cp_parser_dependent_template_id_p): Likewise.
5913 (cp_parser_dependent_template_p): Likewise.
5914 (cp_parser_diagnose_invalid_type_name): Replace
5915 cp_parser_dependent_type_p with dependent_type_p, etc.
5916 (cp_parser_primary_expresion): Likewise.
5917 (cp_parser_nested_name_specifier_opt): Likewise.
5918 (cp_parser_postfix_expression): Likewise.
5919 (cp_parser_unary_expression): Likewise.
5920 (cp_parser_template_name): Likewise.
5921 (cp_parser_class_name): Likewise.
5922 (cp_parser_lookup_name): Likewise.
5923 * pt.c (dependent_type_p): New function.
5924 (value_dependent_expression_p): Likewise.
5925 (type_dependent_expression_p): Likewise.
5926 (dependent_template_arg_p): Likewise.
5927 (dependent_template_id_p): Likewise.
5928 (dependent_template_p): Likewise.
5929
5930 PR c++/9285
5931 PR c++/9294
5932 * parser.c (cp_parser_simple_declaration): Return quickly when
5933 encountering errors.
5934
5935 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5936
5937 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5938
5939 2003-01-17 Jason Merrill <jason@redhat.com>
5940
5941 PR c++/9167, c++/9358
5942 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5943
5944 2003-01-17 Jason Merrill <jason@redhat.com>
5945
5946 PR c++/9342
5947 * call.c (build_conditional_expr): Always do lvalue-rvalue
5948 conversion.
5949
5950 2003-01-17 Mark Mitchell <mark@codesourcery.com>
5951
5952 PR c++/9294
5953 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5954 * cp-tree.h (BASELINK_BINFO): Adjust.
5955 (BASELINK_FUNCTIONS): Likewise.
5956 (BASELINK_ACCESS_BINFO): Likewise.
5957 (tree_baselink): New structure.
5958 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5959 (lang_tree_node): Add baselink.
5960 * decl.c (cp_tree_node_structure): Add BASELINK case.
5961 * search.c (build_baselink): Adjust.
5962 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
5963 test from TREE_LIST case.
5964
5965 PR c++/9272
5966 * parser.c (cp_parser_constructor_declarator_p): Do not assume
5967 that a constructor cannot be declared outside of its own class.
5968
5969 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5970 be resolved, neither can the qualified name.
5971
5972 * rtti.c (get_pseudo_ti_desc): Fix thinko.
5973
5974 2003-01-16 Jason Merrill <jason@redhat.com>
5975
5976 PR c++/8564
5977 * init.c (build_vec_init): Re-add maxindex parm.
5978 (perform_member_init, build_aggr_init): Pass it.
5979 (build_new_1): Pass it. Use an incomplete array type for full_type.
5980 * typeck.c (build_modify_expr): Pass it.
5981 * cp-tree.h: Adjust.
5982
5983 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
5984
5985 * cp-tree.h (tsubst_copy_and_build): New declaration.
5986 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5987 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
5988 (tsubst_copy_and_build): New function.
5989
5990 2003-01-16 Mark Mitchell <mark@codesourcery.com>
5991
5992 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5993 (PARTIAL_INSTANTIATION_P): Remove.
5994 (IMPLICIT_TYPENAME_P): Likewise.
5995 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5996 (build_typename_type): Remove declaration.
5997 (parmlist_is_exprlist): Likewise.
5998 * decl.c (build_typename_type): Make it static, remove third
5999 parameter.
6000 (push_class_binding): Don't do implicit typename stuff.
6001 (make_typename_type): Likewise.
6002 (lookup_name_real): Likewise.
6003 (grokdeclarator): Don't try to convert declarations into
6004 initializations. Don't do implicit typename stuff.
6005 (parmlist_is_exprlist): Remove.
6006 (xref_basetypes): Simplify.
6007 * decl2.c (grokfield): Don't try to convert declarations into
6008 initializations.
6009 (build_anon_union_vars): Do this while processing templates, too.
6010 (finish_anon_union): Likewise.
6011 * error.c (dump_type): Remove implicit typename handling.
6012 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
6013 (cp_parser_primary_expression): Correct handling of names not
6014 found by unqualified name lookup in templates.
6015 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
6016 of types when possible.
6017 (cp_parser_simple_declaration): Complain intelligently about some
6018 invalid declarations.
6019 (cp_parser_member_declaration): Likewise.
6020 (cp_parser_constructor_declarator_p): Don't check when we're in a
6021 function scope.
6022 * pt.c (instantiate_class_template): Remove
6023 PARTIAL_INSTANTIATION_P gunk.
6024 * search.c (lookup_field_r): Don't build implicit typenames.
6025 (marked_pushdecls_p): Don't enter dependent base types.
6026 (unmarked_pushdecls_p): Likewise.
6027 * semantics.c (begin_class_definition): Remove implicit typename
6028 stuff.
6029
6030 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
6031
6032 PR c++/9212
6033 * parser.c (cp_parser_direct_declarator): If accepting either
6034 abstract or named, the name must be an unqualified-id.
6035
6036 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6037
6038 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
6039
6040 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6041
6042 * decl2.c (check_classfn): Fix uninitialized warning.
6043 (build_anon_union_vars): Likewise.
6044 * pt.c (tsubst_copy): Likewise.
6045
6046 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
6047
6048 Further conform g++'s __vmi_class_type_info to the C++ ABI
6049 specification.
6050 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
6051 the specification.
6052 (class_hint_flags): Likewise.
6053
6054 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6055
6056 * config-lang.in: Add semantics.c to gtfiles.
6057 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
6058 (saved_scope): Likewise.
6059 (type_lookups): Remove.
6060 (deferred_access): New structure.
6061 (type_access_control): Remove.
6062 (save_type_access_control): Likewise.
6063 (reset_type_access_control): Likewise.
6064 (decl_type_access_control): Likewise.
6065 (push_deferring_access_checks): Declare.
6066 (resume_deferring_access_checks): Likewise.
6067 (stop_deferring_access_checks): Likewise.
6068 (pop_deferring_access_checks): Likewise.
6069 (get_deferred_access_checks): Likewise.
6070 (pop_to_parent_deferring_access_checks): Likewise.
6071 (perform_deferred_access_checks): Likewise.
6072 (perform_or_defer_access_check): Likewise.
6073 * decl.c (make_typename_type): Use perform_or_defer_access_check.
6074 (make_unbound_class_template): Likewise.
6075 (grokdeclarator): Don't call decl_type_access_control.
6076 * parser.c (cp_parser_context): Remove deferred_access_checks
6077 and deferring_access_checks_p fields.
6078 (cp_parser_context_new): Adjust.
6079 (cp_parser): Remove access_checks_lists.
6080 (cp_parser_defer_access_check): Remove.
6081 (cp_parser_start_deferring_access_checks): Remove.
6082 (cp_parser_stop_deferring_access_checks): Remove.
6083 (cp_parser_perform_deferred_access_checks): Remove.
6084 (cp_parser_nested_name_specifier_opt): Use new deferred access
6085 functions.
6086 (cp_parser_simple_declaration): Likewise.
6087 (cp_parser_template_id): Likewise.
6088 (cp_parser_function_definition): Likewise.
6089 (cp_parser_class_specifier): Likewise.
6090 (cp_parser_lookup_name): Likewise.
6091 (cp_parser_single_declaration): Likewise.
6092 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
6093 (cp_parser_parse_tentatively): Likewise.
6094 (cp_parser_parse_definitely): Likewise.
6095 (yyparse): Likewise.
6096 (cp_parser_init_declarator): Remove access_checks parameter.
6097 Use new deferred access functions.
6098 (cp_parser_function_definition_from_specifiers_and_declarator):
6099 Likewise.
6100 (cp_parser_class_head): Remove deferring_access_checks_p and
6101 saved_access_checks parameters. Use new deferred access functions.
6102 (cp_parser_member_specification_opt): Don't call
6103 reset_type_access_control.
6104 * search.c (type_access_control): Remove.
6105 * semantics.c: Include "gt-cp-semantics.h".
6106 (deferred_type_access_control): Remove.
6107 (deferred_access_stack): New variable.
6108 (deferred_access_free_list): Likewise.
6109 (push_deferring_access_checks): New function.
6110 (resume_deferring_access_checks): Likewise.
6111 (stop_deferring_access_checks): Likewise.
6112 (pop_deferring_access_checks): Likewise.
6113 (get_deferred_access_checks): Likewise.
6114 (pop_to_parent_deferring_access_checks): Likewise.
6115 (perform_deferred_access_checks): New function, adapted from
6116 cp_parser_perform_deferred_access_checks.
6117 (perform_or_defer_access_check): New function, adapted from
6118 cp_parser_defer_access_check.
6119 (current_type_lookups): Remove.
6120 (deferred_type_access_control): Likewise.
6121 (decl_type_access_control): Likewise.
6122 (save_type_access_control): Likewise.
6123 (reset_type_access_control): Likewise.
6124 (begin_function_definition): Adjust.
6125 (begin_class_definiton): Likewise.
6126
6127 2003-01-13 Jason Merrill <jason@redhat.com>
6128
6129 PR c++/8748
6130 * class.c (build_base_path): Take the address before calling save_expr.
6131
6132 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6133 all the ambiguous conversions are bad.
6134
6135 * class.c (maybe_warn_about_overly_private_class): Don't stop
6136 searching when we find a nonprivate method.
6137
6138 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6139
6140 2003-01-12 Mark Mitchell <mark@codesourcery.com>
6141
6142 * cp-tree.h (get_arglist_len_in_bytes): Remove.
6143
6144 PR c++/9264
6145 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6146 typeame types more robustly.
6147
6148 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
6149
6150 * parser.c: Fix comment typos.
6151
6152 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6153
6154 PR c++/9099
6155 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6156 an object_type which is not a class type.
6157
6158 2003-01-10 Geoffrey Keating <geoffk@apple.com>
6159
6160 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6161 (cp_parser_late_parsing_default_args): Likewise.
6162
6163 2003-01-10 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
6169 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6170
6171 * cp-tree.h (reparse_absdcl_as_expr): Remove.
6172 (reparse_absdcl_as_casts): Likewise.
6173 (reparse_decl_as_expr): Likewise.
6174 (finish_decl_parsing): Likewise.
6175 * decl2.c (reparse_absdcl_as_expr): Remove.
6176 (reparse_absdcl_as_casts): Likewise.
6177 (repase_decl_as_expr): Likewise.
6178 (finish_decl_parsing): Likewise.
6179
6180 PR c++/9128
6181 PR c++/9153
6182 PR c++/9171
6183 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6184 function.
6185 (cp_parser_nested_name_specifier_opt): Correct the
6186 check_dependency_p false.
6187 (cp_parser_postfix_expression): Fix formatting.
6188 (cp_parser_decl_specifier_seq): Avoid looking for constructor
6189 declarators when possible.
6190 (cp_parser_template_id): Avoid performing name-lookup when
6191 possible.
6192 (cp_parser_class_head): Do not count specializations when counting
6193 levels of templates.
6194 (cp_parser_constructor_declarator_p): Return immediately if
6195 there's no chance that the tokens form a constructor declarator.
6196 * rtti.c (throw_bad_typeid): Add comment. Do not return an
6197 expression with reference type.
6198 (get_tinfo_decl_dynamic): Do not return an expression with
6199 reference type.
6200 (build_typeid): Add comment. Do not return an expression with
6201 reference type.
6202 * typeck.c (build_class_member_access_expr): Improve handling of
6203 conditionals and comma-expressions as objects.
6204
6205 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6206
6207 * cfns.gperf: ANSIfy function declarations.
6208 * cfns.h: Regenerate.
6209 * cp-tree.h: ANSIfy function declarations.
6210 * parser.c: ANSIfy function declarations & definitions.
6211
6212 * decl.c (bad_specifiers): Fix parameter order error I introduced.
6213
6214 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6215
6216 Merge from pch-branch:
6217
6218 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6219
6220 Merge to tag pch-merge-20030102:
6221
6222 * semantics.c (finish_translation_unit): Don't call finish_file.
6223 * parser.c: Don't include ggc.h.
6224 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6225 read first token here. Don't allow PCH files after the first
6226 token is read.
6227 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6228 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6229 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6230 (cp_parser_late_parsing_for_member): Don't duplicate call to
6231 cp_lexer_set_source_position_from_token.
6232 (cp_parser_late_parsing_default_args): Likewise.
6233 (yyparse): Call finish_file after clearing the_parser.
6234
6235 2002-12-11 Geoffrey Keating <geoffk@apple.com>
6236
6237 * Make-lang.in: Remove $(GGC_H) from all dependencies.
6238 (CXX_TREE_H): Add $(GGC_H).
6239 * class.c: Don't include ggc.h.
6240 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6241 (method_name_cmp): Likewise.
6242 (resort_data): New variable.
6243 (resort_field_decl_cmp): New.
6244 (resort_method_name_cmp): New.
6245 (resort_sorted_fields): New.
6246 (resort_type_method_vec): New.
6247 (finish_struct_methods): Delete cast.
6248 (finish_struct_1): Delete cast.
6249 * cp-tree.h: Include ggc.h.
6250 (struct lang_type_class): Add reorder attribute to field `methods'.
6251 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6252 (resort_sorted_fields): New prototype.
6253 (resort_type_method_vec): New prototype.
6254 * call.c: Don't include ggc.h.
6255 * decl.c: Likewise.
6256 * decl2.c: Likewise.
6257 * init.c: Likewise.
6258 * lex.c: Likewise.
6259 * method.c: Likewise.
6260 * optimize.c: Likewise.
6261 * parse.y: Likewise.
6262 * pt.c: Likewise.
6263 * repo.c: Likewise.
6264 * search.c: Likewise.
6265 * semantics.c: Likewise.
6266 * spew.c: Likewise.
6267 * tree.c: Likewise.
6268
6269 * lang-specs.h: Remove comment.
6270
6271 2002-12-03 Geoffrey Keating <geoffk@apple.com>
6272
6273 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6274 (operator_name_info): Mark to be saved for PCH, specify size.
6275 (assignment_operator_name_info): Likewise.
6276
6277 2002-11-19 Geoffrey Keating <geoffk@apple.com>
6278
6279 * decl.c (anon_cnt): Mark to be saved for PCH.
6280
6281 2002-10-25 Geoffrey Keating <geoffk@apple.com>
6282
6283 * lex.c (init_reswords): Delete now-untrue comment.
6284 Allocate ridpointers using GGC.
6285
6286 2002-10-04 Geoffrey Keating <geoffk@apple.com>
6287
6288 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6289
6290 * g++spec.c (lang_specific_driver): Don't include standard
6291 libraries in `added'.
6292
6293 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
6294
6295 * decl2.c (finish_file): Call c_common_write_pch.
6296 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6297
6298 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
6299
6300 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6301 files when using g++.
6302 * lang-specs.h: Handle compiling C++ header files.
6303
6304 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6305
6306 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6307
6308 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6309
6310 * pt.c (push_access_scope_real): Call push_to_top_level for
6311 function in namespace scope.
6312 (pop_access_scope): Call pop_from_top_level for function in
6313 namespace scope.
6314
6315 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6316
6317 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6318
6319 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6320
6321 * Make-lang.in (c++.install-common, c++.install-man,
6322 c++.uninstall): Prepend $(DESTDIR) to destination paths in
6323 all (un)installation commands.
6324 (c++.install-common): Rewrite $(LN) commands to support
6325 DESTDIR with "ln" as well as with "ln -s".
6326
6327 2003-01-08 Jason Merrill <jason@redhat.com>
6328
6329 * parser.c (cp_parser_primary_expression): See through explicitly
6330 scoped ALIAS_DECLs, too.
6331
6332 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6333
6334 * decl.c: Remove some #if 0 code.
6335
6336 * decl.c: ANSIfy function declarations.
6337
6338 2003-01-07 Mark Mitchell <mark@codesourcery.com>
6339
6340 * parser.c (cp_parser_asm_definition): Correct handling of omitted
6341 operands.
6342
6343 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6344
6345 PR c++/9030
6346 * decl.c (make_typename_type): Check access only when tf_error.
6347 (make_unbound_class_template): Likewise.
6348 * pt.c (saved_access_scope): New variable.
6349 (push_access_scope_real): New function.
6350 (push_access_scope): Likewise.
6351 (pop_access_scope): Likewise.
6352 (tsubst_default_argument): Use them.
6353 (instantiate_template): Likewise.
6354 (regenerate_decl_from_template): Likewise.
6355 (instantiate_decl): Likewise.
6356 (get_mostly_instantiated_function_type): Likewise.
6357
6358 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
6359
6360 * tree.c: Delete bogus #if 0 code.
6361
6362 2003-01-07 Andreas Schwab <schwab@suse.de>
6363
6364 * class.c (layout_class_type): Don't use
6365 PCC_BITFIELD_TYPE_MATTERS if not defined.
6366
6367 2003-01-06 Mark Mitchell <mark@codesourcery.com>
6368
6369 PR c++/9165
6370 * decl2.c (build_cleanup): Mark the object as used.
6371
6372 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6373 (hash_local_specialization): New function.
6374 (register_local_specialization): Revert 2003-01-05 change.
6375 (instantiate_decl): Use hash_local_specialization when creating
6376 the local_specializations table.
6377
6378 * decl2.c (mark_used): Do not synthesize thunks.
6379
6380 * class.c (layout_class_type): Correct handling of unnamed
6381 bitfields wider than their types.
6382
6383 PR c++/9189
6384 * parser.c (cp_parser): Remove default_arg_types. Update
6385 documentation for unparsed_functions_queues.
6386 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6387 parameter.
6388 (cp_parser_new): Don't set parser->default_arg_types.
6389 (cp_parser_function_definition): Adjust usage of
6390 unparsed_funtions_queues.
6391 (cp_parser_class_specifier): Don't mess with
6392 parser->default_arg_types. Handle default argument processing in
6393 a separate phase from function body processing.
6394 (cp_parser_template_declaration_after_export): Adjust usage of
6395 unparsed_functions_queues.
6396 (cp_parser_late_parsing_for_member): Do not handle default
6397 arguments.
6398
6399 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
6400
6401 PR c++/9109
6402 * parser.c (cp_parser_declarator_kind): New enum.
6403 (cp_parser_declarator): Adjust.
6404 (cp_parser_direct_declarator): Adjust. Allow for either named or
6405 abstract declarator. Prefer abstract, if possible. Allow
6406 parenthesized function name.
6407 (cp_parser_condition): Adjust cp_parser_declarator call.
6408 (cp_parser_explicit_instantiation): Likewise.
6409 (cp_parser_init_declarator): Likewise.
6410 (cp_parser_type_id): Likewise.
6411 (cp_parser_function_definition): Likewise.
6412 (cp_parser_member_declaration): Likewise.
6413 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6414 the tentative parsing.
6415 (cp_parser_exception_declaration): Likewise.
6416
6417 2003-01-05 Mark Mitchell <mark@codesourcery.com>
6418
6419 * parser.c (cp_parser_template_parameter): Adjust call to
6420 cp_parser_parameter_declaration.
6421 (cp_parser_parameter_declaration_list): Likewise.
6422 (cp_parser_parameter_declaration): Replace
6423 greater_than_is_operator_p with template_parm_p parameter. Do not
6424 cache tokens for template default arguments.
6425
6426 * pt.c (retrieve_local_specialization): Use htab_find, not
6427 htab_find_with_hash.
6428 (register_local_specialization): Use htab_find_slot, not
6429 htab_find_slot_with_hash.
6430 (instantiate_decl): Pass a hash function to htab_create.
6431
6432 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6433
6434 * parser.c (cp_parser_binary_expression,
6435 cp_parser_multiplicative_expression,
6436 cp_parser_additive_expression, cp_parser_shift_expression,
6437 cp_parser_relational_expression, cp_parser_equality_expression,
6438 cp_parser_and_expression, cp_parser_exclusive_or_expression,
6439 cp_parser_inclusive_or_expression,
6440 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6441 cp_parser_binary_expression): Const-ify.
6442
6443 2003-01-04 Mark Mitchell <mark@codesourcery.com>
6444
6445 * method.c (use_thunk): Disable access control while building the
6446 body of the thunk.
6447
6448 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
6449
6450 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6451 front end.
6452
6453 2003-01-03 Matt Austern <austern@apple.com>
6454
6455 * cp-tree.h (struct lang_type_class): add field for key method
6456 (cp_global_trees): rename dynamic_classes to keyed_classes
6457 (key_method): add definition
6458 * class.c (finish_struct_1): compute class's key method, and add
6459 the class to keyed_classes list if there is no key method.
6460 * decl.c (finish_function): add class to keyed_classes list if we
6461 see a definition of the class's key method.
6462 * pt.c (instantiate_class_template): add template specialization
6463 of a dynamic class to keyed_classes list.
6464 * decl2.c (key_method): remove
6465 (finish_file): iterate only through keyed_classes list when
6466 deciding whether to emit vtables, remove class from its list after
6467 we do the emission.
6468
6469 2003-01-02 Jason Merrill <jason@redhat.com>
6470
6471 * call.c (build_conditional_expr): Stabilize lvalues properly.
6472 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6473 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6474 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6475
6476 * call.c (convert_like_real): Call decl_constant_value for an
6477 IDENTITY_CONV even if there are no more conversions.
6478
6479 * cvt.c (build_up_reference): Don't push unnamed temps.
6480
6481 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6482
6483 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6484 for a backend struct.
6485
6486 * except.c (wrap_cleanups_r, build_throw): Make
6487 MUST_NOT_THROW_EXPRs void.
6488 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6489
6490 * init.c (build_vec_delete_1): Pre-evaluate the base address.
6491
6492 * init.c (get_temp_regvar): Simplify logic.
6493
6494 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6495 our replacement is a decl.
6496
6497 * decl.c (cp_make_fname_decl): Push the decls inside the
6498 outermost scope.
6499
6500 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
6501
6502 PR c++/45, c++/3784
6503 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6504 the same too.
6505
6506 2003-01-03 Graham Stott <graham.stott@btinternet.com>
6507
6508 * parser.c (struct cp_parser): Add access_checks_lists field
6509 (cp_parser_simple_declaration): Use.
6510 (cp_parser_init_declarator): Likewise.
6511
6512 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6513
6514 * parser.c (cp_parser_declaration): Accept the __extension__
6515 keyword before the declaration.
6516
6517 PR c++/2843
6518 * parser.c (cp_parser_parameter_declaration): Allow attributes to
6519 appear after the declarator.
6520
6521 * call.c (build_new_method_call): Fix typo in message format
6522 string.
6523
6524 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6525
6526 * parser.c (cp_lexer_next_token_is): Declare it inline.
6527 (cp_lexer_set_source_position_from_token): Likewise.
6528 (cp_lexer_debugging_p): Likewise.
6529 (cp_parser_parsing_tentatively): Likewise.
6530 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6531 to the cp_lexer_peek_token.
6532
6533 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6534 expression.
6535
6536 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6537
6538 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6539 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6540 cp/repo.c: Fix copyright years.
6541
6542 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
6543
6544 * lex.c: Remove superfluous include of cpplib.h.
6545 (CONSTRAINT): Define without conditions.
6546 (init_cp_pragma): Use c_register_pragma.
6547
6548 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6549
6550 * .cvsignore: Remove.
6551
6552 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
6553
6554 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6555 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6556 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6557 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6558 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6559 copyright header.
6560 * lex.h: parse.y is dead, so don't mention it. Also replace the
6561 copyright header with the default GNU copyright header.
6562
6563 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6564
6565 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6566 (lookup_name_namespace_only): Likewise.
6567 (begin_only_namespace_names): Likewise.
6568 (end_only_namespace_names): Likewise.
6569 * decl.c (only_namespace_names): Remove.
6570 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6571 (lookup_name_real): Do not check only_namespace_names.
6572 (lookup_name_namespace_only): Remove.
6573 (begin_only_namespace_names): Likewise.
6574 (end_only_namespace_names): Likewise.
6575 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6576 nested-name-specifiers more gracefully.
6577 (cp_parser_class_or_namespace_name): Avoid looking up namespace
6578 names when they cannot possibly appear.
6579 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6580 (cp_parser_elaborated_type_specifier): Likewise.
6581 (cp_parser_namespace_name): Only look for namespace names.
6582 (cp_parser_lookup_name): Add is_namespace parameter.
6583 (cp_parser_lookup_name_simple): Adjust call to
6584 cp_parser_lookup_name.
6585
6586 * parser.c (cp_parser_dependent_type_p): Fix thinko.
6587
6588 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6589
6590 * .cvsignore: Update.
6591
6592 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
6593
6594 * class.c (modify_vtable_entry): Remove unused variable.
6595 (get_vcall_index): Always expect a non-thunk.
6596 (update_vtable_entry_for_fn): Combine covariant adjustments, when
6597 overriding a thunk. Pass get_vcall_index a non-thunk.
6598
6599 * decl2.c (finish_file): Mark undefined inlines as extern.
6600
6601 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6602
6603 * cp-tree.def (RETURN_INIT): Remove.
6604 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6605 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6606 (note_level_for_for): Remove.
6607 (note_level_for_try): Likewise.
6608 (note_level_for_catch): Likewise.
6609 (finish_named_return_value): Likewise.
6610 (do_pushlevel): Change prototype.
6611 (pending_lang_change): Remove.
6612 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6613 sk_for.
6614 (note_level_for_for): Remove.
6615 (note_level_for_try): Likewise.
6616 (note_level_for_catch): Likewise.
6617 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6618 * parser.c (cp_parser_context_free_list): Make it "deletable".
6619 (cp_parser_template_argument): Remove misleading comment.
6620 * pt.c (tsubst_expr): Remove RETURN_INIT code.
6621 * semantics.c (genrtl_named_return_value): Remove.
6622 (do_pushlevel): Take a scope kind as an argument.
6623 (begin_if_stmt): Adjust.
6624 (begin_while_stmt): Likewise.
6625 (begin_for_stmt): Likewise.
6626 (finish_for_init_stmt): Likewise.
6627 (begin_switch_stmt): Likewise.
6628 (begin_handler): Likewise.
6629 (begin_compound_stmt): Likewise.
6630 (finish_named_return_value): Remove.
6631 (cp_expand_stmt): Remove RETURN_INIT case.
6632 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6633
6634 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6635
6636 PR c++/9112
6637 * parser.c (cp_parser_direct_declarator): Handle erroneous
6638 parenthesized declarators correctly.
6639
6640 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6641
6642 * cp-tree.h (pending_lang_change): Declare.
6643
6644 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6645
6646 * parser.c (cp_parser_context_free_list): New variable.
6647 (cp_parser_context_new): Use it.
6648 (cp_parser_error): Check return code from
6649 cp_parser_simulate_error.
6650 (cp_parser_simulate_error): Return a value.
6651 (cp_parser_id_expression): Optimize common case.
6652 (cp_parser_class_name): Likewise.
6653 (cp_parser_class_specifier): Adjust call to
6654 cp_parser_late_parsing_default_args.
6655 (cp_parser_lookup_name): Optimize common case.
6656 (cp_parser_late_parsing_for_member): Adjust call to
6657 cp_parser_late_parsing_default_args.
6658 (cp_parser_late_parsing_default_args): Add scope parameter.
6659 (cp_parser_require): Avoid creating the error message unless it's
6660 needed.
6661 (cp_parser_parse_definitely): Place free'd contexts on the free
6662 list.
6663
6664 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6665
6666 2002-12-30 David Edelsohn <edelsohn@gnu.org>
6667
6668 * parser.c (cp_parser_parameter_declaration_clause): Treat system
6669 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6670
6671 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6672
6673 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6674 GCC, not GNU CC.
6675
6676 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6677
6678 * parse.y: Remove.
6679 * spew.c: Likewise.
6680 * Make-lang.in (gt-cp-spew.h): Remove.
6681 * cp-tree.h (do_pending_lang_change): Remove.
6682 (do_identifier): Change prototype.
6683 (finish_id_expr): Remove.
6684 * decl.c (lookup_name_real): Remove yylex variable.
6685 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6686 * lex.c (init_cpp_parse): Remove.
6687 (reduce_cmp): Likewise.
6688 (token_cmp): Likewise.
6689 (yychar): Likewise.
6690 (lastiddecl): Likewise.
6691 (token_count): Likewise.
6692 (reduce_count): Likewise.
6693 (yyhook): Likewise.
6694 (print_parse_statistics): Likewise.
6695 (do_pending_lang_change): Likewise.
6696 (do_identifier): Remove parsing parameter.
6697 * lex.h (lastiddecl): Remove.
6698 (looking_for_typename): Remove.
6699 (looking_for_template): Likewise.
6700 (pending_lang_change): Likewise.
6701 (yylex): Likewise.
6702 * semantics.c (finish_id_expr): Remove.
6703
6704 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6705 thread" correctly.
6706
6707 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6708
6709 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
6710 end, not the C front end.
6711
6712 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
6713
6714 * cp-tree.h (THUNK_TARGET): New macro.
6715 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6716 (finish_thunk): Remove offset parms.
6717 * class.c (find_final_overrider): Look through thunks.
6718 (get_vcall_index): Use THUNK_TARGET.
6719 (update_vtable_entry_for_fn): Look through thunks. Set covariant
6720 fixed offset here. Adjust finish_thunk call.
6721 (build_vtbl_initializer): Adjust finish_thunk calls.
6722 * mangle.c (mangle_call_offset): Remove superfluous if.
6723 (mangle_thunk): Adjust.
6724 * method.c (make_thunk): Adjust.
6725 (finish_thunk): Adjust.
6726 (thunk_adjust): Remove assert.
6727 (use_thunk): Use THUNK_TARGET
6728 * dump1.c (cp_dump_tree): Adjust thunk dumping.
6729
6730 PR c++/9054
6731 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6732 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6733
6734 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6735
6736 Remove traditional C constructs 4/n.
6737 * decl2.c (grok_method_quals, warn_if_unknown_interface,
6738 grok_x_components, cp_build_parm_decl, build_artificial_parm,
6739 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6740 delete_sanity, check_member_template, check_java_method,
6741 check_classfn, finish_static_data_member_decl, grokfield,
6742 grokbitfield, grokoptypename, grok_function_init,
6743 cplus_decl_attributes, constructor_name, defer_fn,
6744 build_anon_union_vars, finish_anon_union, coerce_new_type,
6745 coerce_delete_type, comdat_linkage, maybe_make_one_only,
6746 key_method, import_export_vtable, import_export_class,
6747 output_vtable_inherit, import_export_decl, import_export_tinfo,
6748 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6749 set_guard, start_objects, finish_objects,
6750 start_static_storage_duration_function,
6751 finish_static_storage_duration_function, get_priority_info,
6752 start_static_initialization_or_destruction,
6753 finish_static_initialization_or_destruction,
6754 do_static_initialization, do_static_destruction,
6755 prune_vars_needing_no_initialization, write_out_vars,
6756 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6757 add_using_namespace, merge_functions, ambiguous_decl,
6758 lookup_using_namespace, lookup_using_namespace,
6759 qualified_lookup_using_namespace, set_decl_namespace,
6760 decl_namespace, current_decl_namespace, push_decl_namespace,
6761 pop_decl_namespace, push_scope, pop_scope, add_function,
6762 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6763 lookup_arg_dependent, do_namespace_alias,
6764 validate_nonmember_using_decl, do_nonmember_using_decl,
6765 do_toplevel_using_decl, do_local_using_decl,
6766 do_class_using_decl, do_using_directive, check_default_args,
6767 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
6768 * parser.c (cp_parser_class_head): Use booleanss.
6769 * decl.c (walk_globals, walk_vtables): Likewise.
6770 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6771 walk_globals): Change return type from 'int' to 'bool'.
6772 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6773 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6774 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6775 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6776 qualifier_flags, tinfo_base_init, generic_initializer,
6777 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6778 dfs_class_hint_unmark, class_hint_flags, class_initializer,
6779 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6780 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6781 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6782 * repo.c (repo_compile_flags, repo_template_declared,
6783 repo_template_defined, repo_class_defined, repo_get_id,
6784 repo_template_used, repo_vtable_used, repo_inline_used,
6785 repo_tinfo_used, repo_template_instantiated, extract_string,
6786 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6787 finish_repo): Likewise.
6788 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6789 cxx_print_xnode): Likewise..
6790 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6791 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6792 * cxxfilt.c (demangle_it, print_demangler_list, usage,
6793 standard_symbol_characters, hp_symbol_characters, main, fatal):
6794 Likewise.
6795 (strip_underscore): Change type from 'int' to 'bool'.
6796 (main): Use boolean constants.
6797
6798 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6799
6800 Remove traditional C constructs 3/n.
6801 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6802 build_up_reference, warn_ref_binding, convert_to_reference,
6803 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6804 convert_to_void, convert, convert_force, build_type_conversion,
6805 build_expr_type_conversion, type_promotes_to,
6806 perform_qualification_conversions): Use C90 prototyping style.
6807 * decl2.c (grok_array_decl): Use boolean constant.
6808 (delete_sanity): Likewise.
6809 * typeck.c (build_unary_op): Likewise.
6810 * semantics.c (finish_switch_cond): Likewise.
6811 * parser.c (cp_parser_direct_new_declarator): Likewise.
6812 * init.c (build_new): Likewise.
6813
6814 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6815
6816 * Make-lang.in (po-generated): Remove parse.c.
6817 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
6818 ($(srcdir)/cp/parse.h): Remove target.
6819 ($(srcdir)/cp/parse.c): Likewise.
6820 (gt-cp-parse.h): Likewise.
6821 (gt-cp-parser.h): New target.
6822 (c++.distclean): Do not remove parse.output.
6823 (c++.maintainer-clean): Do not remove parse.c or parse.h.
6824 (cp/spew.o): Remove target.
6825 (cp/lex.o): Adjust dependencies.
6826 (cp/pt.o): Likewise.
6827 (cp/parse.o): Likewise.
6828 (cp/TAGS): Do not mention parse.c.
6829 (cp/parser.o): New target.
6830 * NEWS: Mention the new parser.
6831 * call.c (build_scoped_method_call): Simplify.
6832 (build_method_call): Likewise.
6833 (build_new_function_call): Adjust calls to add_function_candidate
6834 and add_template_candidate.
6835 (build_new_op): Improve handling of erroroneous operands.
6836 (convert_default_arg): Remove circular argument processing.
6837 (name_as_c_string): New function.
6838 (build_new_method_call): Use it.
6839 (perform_implicit_conversion): Use error_operand_p.
6840 * class.c (finish_struct_anon): Use constructor_name_p.
6841 (check_field_decls): Likewise.
6842 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6843 (resolve_address_of_overloaded_function): Likewise.
6844 (instantiate_type): Tweak pointer-to-member handling.
6845 (get_primary_binfo): Remove incorrect assertion.
6846 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6847 * cp-tree.h (DEFARG_TOKENS): New macro.
6848 (default_arg): New structure.
6849 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6850 (lang_tree_node): Add default_arg.
6851 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6852 (type_info_ref_type): New macro.
6853 (saved_scope): Make processing_explicit_instantiation a boolean.
6854 (check_access): New field.
6855 (unparsed_text): Remove.
6856 (language_function): Remove unparsed_inlines.
6857 (error_operand_p): New macro.
6858 (lang_decl): Adjust pending_inline_info.
6859 (DEFARG_POINTER): Remove.
6860 (tag_types): Add typenames.
6861 (lookup_ualified_name): Declare.
6862 (lookup_name_real): Likewise.
6863 (shadow_tag): Adjust prototype.
6864 (get_scope_of_declarator): Declare it.
6865 (process_next_inline): Remove it.
6866 (check_for_missing_semicolon): Likewise.
6867 (maybe_get_template_decl_from_type_decl): Declare it.
6868 (finish_label_stmt): Adjust prototype.
6869 (finish_non_static_data_meber): Declare it.
6870 (finish_pseudo_destructor_call_expr): Rename to ...
6871 (finish_pseudo_destructor_expr): ... this.
6872 (finish_compound_literal): Declare it.
6873 (begin_inline_definitions): Remove it.
6874 (init_spew): Remove.
6875 (peekyylex): Likewise.
6876 (arbitrate_lookup): Likewise.
6877 (frob_opname): Likewise.
6878 (maybe_snarf_defarg): Likewise.
6879 (add_defarg_fn): Likewise.
6880 (do_pending_defargs): Likewise.
6881 (done_pending_defargs): Likewise.
6882 (unprocessed_defarg_fn): Likewise.
6883 (replace_defarg): Likewise.
6884 (end_input): Likewise.
6885 (get_overloaded_fn): Likewise.
6886 * cvt.c (convert_to_reference): Improve error handling.
6887 * decl.c (lookup_name_real): Do not declare it static.
6888 (maybe_push_to_top_level): Set check_access.
6889 (identifier_type_value): Adjust call to lookup_name_real.
6890 (lookup_qualified_name): New method.
6891 (lookup_name_real): Remove special-case parsing code.
6892 (lookup_name-nonclass): Adjust call to lookup_name_real.
6893 (lookup_name_namespace_only): Likewise.
6894 (lookup_name): Likewise.
6895 (check_tag_decl): Return the type declared.
6896 (shadow_tag): Likewise.
6897 (register_dtor_fn): Tweak check_access.
6898 (grokfndecl): Use constructor_name_p.
6899 (get_scope_of_declarator): New function.
6900 (grokdeclarator): Obscure tweaks for slightly different declarator
6901 representations.
6902 (start_method): Return error_mark_node to indicate failure.
6903 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6904 * decl2.c (constructor_name_full): Simplify.
6905 (constructor_name): Use it.
6906 (build_expr_from_tree): Adjust for changes to do new parser.
6907 (push_scope): Improve robustness.
6908 (validate_nonmember_using_decl): Process declarations, not names.
6909 (do_class_using_decl): Likewise.
6910 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6911 here.
6912 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6913 * expr.c (cxx_expand_expr): Handle BASELINKs.
6914 * init.c (member_init_ok_or_else): Issue more errors.
6915 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6916 * lex.c: Do not include parse.h.
6917 (yypring): Do not declare.
6918 (yylval): Likewise.
6919 (make_reference_declarator): Remove error-generating code.
6920 (rid_to_yy): Remove.
6921 (cxx_init): Do not call init_spew.
6922 (yypring): Remove.
6923 (check_for_missing_semicolon): Remove.
6924 * lex.h (got_scope): Remove.
6925 (got_object): Remove.
6926 * method.c (hack_identifier): Use finish_non_static_data_member.
6927 (implicitly_declare_fn): Adjust use of constructor_name.
6928 * parser.c: New file.
6929 * pt.c (parse.h): Do not include it.
6930 (maybe_get_template_decl_from_template): Do not declare it.
6931 (finish_member_template_decl): Tweak.
6932 (begin_explicit_instantiation): Adjust for
6933 processing_explicit_instantiation being boolean.
6934 (end_explicit_instantiation): Likewise.
6935 (maybe_process_partial_specialization): Tighten specialization
6936 test.
6937 (retrieve_local_specialization): Adjust ue of hash table.
6938 (eq_local_specializations): New function.
6939 (register_local_specialization): Likewise.
6940 (push_template_decl_real): Remove unnecessary test.
6941 (maybe_get_template_decl_from_type_decl): Don't make it static.
6942 (for_each_template_parm_r): Handle TYPEOF_TYPE.
6943 (tsubst_copy): Use retrieive_local_specialization to handle
6944 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
6945 Handle COMPONENT_REFs with pseudo-destructor-expressions.
6946 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6947 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6948 (unify): Tweak handling of CONST_DECLs.
6949 (regenerate_decl_from_template): Use push_nested_class.
6950 (template_for_substitution): New funciton.
6951 (instantiate_decl): Use it. Register parameters as local
6952 specializations.
6953 * rtti.c (init_rtti_processing): Set type_info_ref_type.
6954 (build_typeid): Use it.
6955 (get_typeid): Likeise.
6956 * search.c (accessible_p): Use check_access, not
6957 flag_access_control.
6958 (adjust_result_of_qualified_name_lookup): Pay attention to the
6959 context_class.
6960 * semantics.c (finish_asm_stmt): Adjust error handling.
6961 (finish_label_stmt): Return the statement.
6962 (finish_non_static_data_member): New function.
6963 (finish_class_expr): Handle BASELINKs.
6964 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6965 (finish_object_call_expr): Simplify handling during templates.
6966 (finish_pseudo_destructor_call_expr): Rename to ...
6967 (finish_pseudo_dtor_expr): ... this.
6968 (finish_compound_literal): New function.
6969 (begin_inline_definitions): Remove.
6970 (finish_sizeof): Remove special template handling.
6971 * spew.c: Do not include parse.h.
6972 * tree.c (get_overloaded_fn): Remove.
6973 * typeck.c (build_class_member_access_expr): Handle
6974 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
6975 (lookup_destructor): New function.
6976 (finish_class_member_access_expr): Use it.
6977 (convert_arguments): Simplify.
6978 (build_unary_op): Handle BASELINKs.
6979
6980 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
6981
6982 PR c++/4803
6983 * decl2.c (mark_used): Defer inline functions.
6984 (finish_file): Merge deferred_fns loops. Check all used
6985 inline functions have a definition.
6986 * method.c (make_thunk): Thunks are not inline.
6987
6988 PR c++/5116, c++/764
6989 * call.c (build_new_op): Make sure template class operands are
6990 instantiated.
6991
6992 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
6993
6994 PR C++/7964
6995 * cp-tree.h (resolve_scoped_fn_name): Prototype.
6996 * call.c (resolve_scoped_fn_name): New function. Deal with
6997 more template expansion. Broken out of ...
6998 * parse.y (parse_finish_call_expr): ... here. Call it.
6999 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
7000 resolve_scoped_fn_name and build_call_from_tree.
7001
7002 PR c++/9053
7003 * decl.c (duplicate_decls): Templates may be disambiguated by
7004 return type.
7005
7006 PR c++/8702
7007 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
7008 conversion operators on failure.
7009
7010 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7011
7012 Remove traditional C constructs 2/n.
7013 * call.c (tourney, build_field_call, equal_functions, joust,
7014 compare_ics, build_over_call, build_java_interface_fn_ref,
7015 convert_like_real, op_error, build_object_call, resolve_args,
7016 build_vfield_ref, check_dtor_name, build_scoped_method_call,
7017 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
7018 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
7019 standard_conversion, reference_related_p,
7020 reference_compatible_p, convert_class_to_reference,
7021 direct_reference_binding, reference_binding,
7022 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
7023 add_template_conv_candidate, any_viable, any_strictly_viable,
7024 build_this, splice_viable, print_z_candidates,
7025 build_user_type_conversion, build_new_function_call,
7026 conditional_conversion, build_conditional_expr, build_new_op,
7027 build_op_delete_call, enforce_access, call_builtin_trap,
7028 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
7029 convert_default_arg, type_passed_as, convert_for_arg_passing,
7030 in_charge_arg_for_name, is_properly_derived_from,
7031 maybe_handle_implicit_object, maybe_handle_ref_bind,
7032 source_type, add_warning, can_convert, can_convert_arg,
7033 perform_implicit_conversion, can_convert_arg_bad,
7034 initialize_reference, add_conv_candidate,
7035 add_template_candidate_real, add_template_candidate): Ansify.
7036
7037 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
7038
7039 PR c++/8572
7040 * cp-tree.h (grokoptypename): Add SCOPE parameter.
7041 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
7042 if in a template scope.
7043 * parse.y (unoperator): Return the scope.
7044 (operator_name): Adjust grokoptypename call.
7045
7046 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7047
7048 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
7049 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
7050 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
7051
7052 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
7053
7054 * ChangeLog: Fix a typo.
7055 * class.c: Fix comment typos.
7056 * cp-tree.h: Likewise.
7057
7058 2002-12-18 Jason Merrill <jason@redhat.com>
7059
7060 Handle anonymous unions at the tree level.
7061 C++ ABI change: Mangle anonymous unions using the name of their
7062 first named field (by depth-first search). Should not cause
7063 binary compatibility problems, though, as the compiler previously
7064 didn't emit anything for affected unions.
7065 * cp-tree.def (ALIAS_DECL): New tree code.
7066 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
7067 first field, not the largest.
7068 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
7069 push the decl, and write it out at namespace scope.
7070 * decl.c (lookup_name_real): See through an ALIAS_DECL.
7071 (pushdecl): Add namespace bindings for ALIAS_DECLs.
7072 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
7073 of a decl which doesn't have one.
7074 * typeck.c (build_class_member_access_expr): Don't recurse if
7075 we already have the type we want.
7076
7077 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7078
7079 PR c++/8099
7080 * friend.c (make_friend_class): Allow partial specialization
7081 when declaration is not a template friend.
7082
7083 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7084
7085 PR c++/3663
7086 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
7087 TREE_PROTECTED to created decl nodes.
7088
7089 2002-12-18 Mark Mitchell <mark@codesourcery.com>
7090
7091 * class.c (build_base_field): Do not set DECL_PACKED on the
7092 FIELD_DECL.
7093
7094 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
7095
7096 * cp-tree.h (struct tree_srcloc): Use location_t.
7097 (SOURCE_LOCUS): New.
7098 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
7099
7100 2002-12-17 Jason Merrill <jason@redhat.com>
7101
7102 * decl.c (finish_function): Also complain about no return in
7103 templates.
7104 * semantics.c (finish_return_stmt): Also call check_return_expr in
7105 templates.
7106 * typeck.c (check_return_expr): In a template, just remember that we
7107 saw a return.
7108
7109 2002-12-16 Jason Merrill <jason@redhat.com>
7110
7111 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
7112 of the CALL_EXPR.
7113
7114 * semantics.c (do_pushlevel): Call pushlevel after adding the
7115 SCOPE_STMT.
7116 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
7117 * parse.y (function_body): Go back to using compstmt.
7118 * decl.c (pushdecl): Skip another level to get to the parms level.
7119
7120 * call.c (build_new_method_call): Use is_dummy_object to determine
7121 whether or not to evaluate the object parameter to a static member
7122 function.
7123
7124 2002-12-14 Jason Merrill <jason@redhat.com>
7125
7126 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
7127 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
7128 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
7129 don't bother with an AGGR_INIT_EXPR.
7130 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
7131 just generate a new decl normally. Take return slot parm.
7132 * cp-tree.h: Adjust prototype.
7133
7134 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
7135
7136 PR C++/8031
7137 * cvt.c (convert_to_pointer_force): Don't try comparing against
7138 erronous type.
7139
7140 2002-12-13 Geoffrey Keating <geoffk@apple.com>
7141
7142 * cp-tree.h: Have the multiple-include guards around
7143 the entire file.
7144
7145 2002-12-10 David Edelsohn <edelsohn@gnu.org>
7146
7147 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
7148 for SPEW_DEBUG.
7149 (snarf_method): Same.
7150 (snarf_defarg): Same.
7151
7152 2002-12-10 Mark Mitchell <mark@codesourcery.com>
7153
7154 PR c++/8372
7155 * pt.c (tsubst_copy): Handle destructor names more correctly.
7156
7157 2002-12-10 Matt Austern <austern@apple.com>
7158
7159 * cp-tree.h: get rid of needs_virtual_reinit bit.
7160
7161 2002-12-09 Mark Mitchell <mark@codesourcery.com>
7162
7163 * NEWS: Document removal of in-class initialization extension for
7164 static data members of non-arithmetic, non-enumeration type.
7165 * decl.c (check_static_variable_definition): Do not allow that
7166 extension.
7167 * decl2.c (grokfield): Do not call digest_init when processing
7168 templates.
7169
7170 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7171
7172 * error.c (dump_expr): Fix format specifier warning.
7173
7174 2002-12-04 Geoffrey Keating <geoffk@apple.com>
7175
7176 * class.c (finish_struct_1): Correct comment.
7177 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
7178
7179 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7180
7181 PR C++/8799
7182 * error.c (dump_expr): Don't ever try to dump a non-existent
7183 expression.
7184
7185 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
7186
7187 Implement covariant returns.
7188 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
7189 (struct lang_decl_flags): Add this_thunk_p flag.
7190 Rename vcall_offset to virtual_offset.
7191 (struct lang_decl): Rename delta to fixed_offset.
7192 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
7193 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
7194 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
7195 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
7196 (make_thunk): Add this_adjusting arg.
7197 (finish_thunk): Declare.
7198 (mangle_thunk): Add this_adjusting arg.
7199 * class.c (get_vcall_index): Use base function for lookup.
7200 (update_vtable_entry_for_fn): Generate covariant thunk.
7201 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
7202 (build_vtbl_initializer): Use base function for lookup.
7203 Finish covariant thunk here. Adjust thunk generation.
7204 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
7205 Adjust thunk dumping.
7206 * mangle.c (mangle_call_offset): New function.
7207 (mangle_thunk): Adjust for covariant thunks.
7208 * method.c (make_thunk): Adjust. Do not set name here.
7209 (finish_thunk): New function. Set name here.
7210 (use_thunk): Generate covariant thunks too.
7211 (thunk_adjust): New function.
7212 * search.c (covariant_return_p): Remove. Fold into ...
7213 (check_final_overrider): ... here. Simplify.
7214 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7215
7216 2002-12-03 Jason Merrill <jason@redhat.com>
7217
7218 PR c++/8674
7219 * call.c (build_over_call): Check specifically for TARGET_EXPR
7220 when eliding.
7221
7222 PR c++/8461, c++/8625
7223 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7224 (cp_convert_parm_for_inlining): Remove.
7225 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7226 Remove.
7227 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7228 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7229
7230 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7231 an ambiguous conversion.
7232
7233 2002-12-03 Mark Mitchell <mark@codesourcery.com>
7234
7235 PR c++/8688
7236 * decl.c (reshape_init): Handle erroneous initializers.
7237
7238 2002-12-02 Mark Mitchell <mark@codesourcery.com>
7239
7240 PR c++/8720
7241 * spew.c (remove_last_token): Make sure that last_chunk is set
7242 correctly.
7243
7244 PR c++/8615
7245 * error.c (dump_expr): Handle character constants with
7246 TREE_OVERFLOW set.
7247
7248 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7249
7250 DR 180
7251 * decl.c (grokdeclarator): Require class-key for all friend class.
7252 Output the correct type and context in the error message.
7253
7254 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7255
7256 PR c++/5919
7257 * pt.c (unify): Use variably_modified_type_p to test validity of
7258 template argument types.
7259
7260 PR c++/8727
7261 * cp-tree.h (lang_type_class): Add typeinfo_var.
7262 (CLASSTYPE_TYPEINFO_VAR): New macro.
7263 * rtti.c (get_tinfo_decl): Use it.
7264
7265 PR c++/8663
7266 * init.c (expand_member_init): Always get the main variant of a
7267 base class.
7268
7269 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7270
7271 PR c++/8332
7272 PR c++/8493
7273 * decl.c (cxx_init_decl_processing): Use size_type_node, not
7274 c_size_type_node.
7275 * decl2.c (coerce_new_type): Likewise.
7276 * except.c (do_allocate_exception): Likewise.
7277
7278 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7279
7280 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7281 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7282 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7283 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7284 typeck2.c: Include coretypes.h and tm.h.
7285 * Make-lang.in: Update dependencies.
7286
7287 2002-11-30 Mark Mitchell <mark@codesourcery.com>
7288
7289 PR c++/8227
7290 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7291 (check_initializer): Validate the type of the initialized
7292 variable, even if the initializer is absent.
7293 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7294
7295 PR c++/8214
7296 * typeck.c (convert_for_assignment): Do not use
7297 decl_constant_value on the operand.
7298
7299 PR c++/8511
7300 * pt.c (instantiate_decl): Handle template friends defined outside
7301 of the class correctly.
7302
7303 2002-11-29 Joe Buck <jbuck@synopsys.com>
7304
7305 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7306 anonymous structs.
7307
7308 2002-11-29 Mark Mitchell <mark@codesourcery.com>
7309
7310 * class.c (walk_subobject_offsets): Recur on binfos as well as on
7311 types.
7312 (layout_nonempty_base_or_field): Pass it a binfo when processing a
7313 base class.
7314 (layout_empty_base): Likewise.
7315 (build_base_field): Likewise.
7316
7317 2002-11-27 Mark Mitchell <mark@codesourcery.com>
7318
7319 * class.c (build_base_field): Make sure we get the canonical base
7320 when descending through primary bases.
7321
7322 2002-11-26 Geoffrey Keating <geoffk@apple.com>
7323
7324 * decl.c (check_initializer): Don't error on initialisation of
7325 a scalar with a brace-enclosed expression.
7326
7327 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
7328
7329 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7330 (template_parms_equal): Remove prototype.
7331 * typeck.c (buuld_indirect_ref): Reformat.
7332
7333 2002-11-25 Jason Merrill <jason@redhat.com>
7334
7335 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7336 and a DO_STMT.
7337
7338 2002-11-25 Mark Mitchell <mark@codesourcery.com>
7339
7340 * tree.c (cp_build_qualified_type_real): Correct handling of
7341 array types.
7342 * class.c (walk_subobject_offsets): Fix thinko.
7343 (build_base_field): Record offsets of empty bases in primary
7344 virtual bases.
7345 (layout_class_type): Record offsets of empty bases in fields.
7346
7347 * search.c (is_subobject_of_p_1): Fix thinko.
7348 (lookup_field_queue_p): Likewise.
7349
7350 2002-11-24 Mark Mitchell <mark@codesourcery.com>
7351
7352 * class.c (layout_class_type): Reuse tail padding when laying out
7353 virtual bases.
7354
7355 2002-11-22 Mark Mitchell <mark@codesourcery.com>
7356
7357 * rtti.c (qualifier_flags): Fix thinko.
7358
7359 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7360
7361 Remove traditional C constructs 1/n.
7362 * cp-tree.h (init_method, set_mangled_name_for_decl,
7363 build_opfncall, hack_identifier, make_thunk, use_thunk,
7364 synthesize_method, implicitly_declare_fn,
7365 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7366 maybe_clone_body): Remove use of PARAMS.
7367
7368 * method.c (do_build_assign_ref, do_build_copy_constructor,
7369 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7370 Likewise.
7371 (synthesize_method): Use 'bool' type and constants instead of
7372 'int'.
7373 (locate_copy): Likewise.
7374 (implicitly_declare_fn): Likewise.
7375
7376 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7377 Remove old-style declaration.
7378 (maybe_clone_body): Use 'bool' type and constants.
7379
7380 2002-11-21 Glen Nakamura <glen@imodulo.com>
7381
7382 PR c++/8342
7383 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7384 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7385 of the branches of a COND_EXPR.
7386
7387 2002-11-19 Mark Mitchell <mark@codesourcery.com>
7388
7389 * pt.c (for_each_template_parm): Free allocated memory.
7390 * search.c (is_subobject_of_p_1): New function.
7391 (is_subobject_of_p): Avoid walking virtual bases multiple times.
7392
7393 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7394
7395 * g++spec.c (lang_specific_spec_functions): New.
7396
7397 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
7398
7399 * ChangeLog: Follow spelling conventions.
7400 * class.c: Likewise.
7401 * decl2.c: Likewise.
7402
7403 2002-11-14 Zack Weinberg <zack@codesourcery.com>
7404
7405 * search.c (dfs_push_decls): Do not try to reorder elements
7406 3..n of method_vec if method_vec has only two elements.
7407 Reverse order of two tests to avoid accessing unallocated
7408 memory.
7409
7410 2002-11-14 Mark Mitchell <mark@codesourcery.com>
7411
7412 * class.c (dfs_find_final_overrider): Adjust so that the most
7413 derived object is a binfo, rather than a class type.
7414 (find_final_overrider): Likewise.
7415 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7416 (add_vcall_offset): Likewise.
7417
7418 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7419
7420 PR c++/8389
7421 * pt.c (instantiate_template): Push class scope for member
7422 functions.
7423 (get_mostly_instantiated_function_type): Likewise. Don't call
7424 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
7425 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7426 * mangle.c (write_encoding, write_unqualified_name): Adjust.
7427
7428 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7429
7430 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7431 vcall offfsets. Split out ...
7432 (add_vcall_offset): ... new function.
7433
7434 PR c++/8338
7435 * pt.c (for_each_template_parm): Add htab parameter.
7436 (process_partial_specialization): Adjust call.
7437 (push_template_decl_real): Likewise.
7438 (pair_fn_data): Add visited.
7439 (for_each_template_parm_r): Avoid walking duplicates more than
7440 once.
7441 (uses_template_parms): Adjust call to for_each_template_parm.
7442
7443 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7444
7445 * class.c (add_implicitly_declared_members): Put implicitly
7446 declared functions at the end of TYPE_METHODs when -fabi-version
7447 is at least 2.
7448
7449 2002-11-05 Geoffrey Keating <geoffk@apple.com>
7450
7451 * decl2.c (finish_file): Correct spelling.
7452
7453 2002-11-03 Mark Mitchell <mark@codesourcery.com>
7454
7455 * call.c (build_special_member_call): Do not try to lookup VTTs by
7456 name.
7457 * class.c (vtbl_init_data): Add generate_vcall_entries.
7458 (get_vtable_decl): Do not look up virtual tables by name.
7459 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7460 (set_primary_base): Do not set CLASSTYPE_RTTI.
7461 (determine_primary_base): Likewise.
7462 (get_matching_virtual): Remove.
7463 (get_vcall_index): New function.
7464 (update_vtable_entry_for_fn): Do not try to use virtual thunks
7465 when they are not required. Assign vcall indices at this point.
7466 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7467 Do update dynamic_classes.
7468 (build_vtt): Do not add VTTs to the symbol table.
7469 (build_ctor_vtbl_group): Likewise.
7470 (build_vtbl_initializer): Simplify handling of vcall indices.
7471 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7472 for the most derived class.
7473 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7474 the vtable.
7475 * cp-tree.h (dynamic_classes): New macro.
7476 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
7477 (CLASSTYPE_RTTI): Remove.
7478 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7479 (CLASSTYPE_VCALL_INDICES): New macro.
7480 (CLASSTYPE_VTABLES): Likewise.
7481 (BV_USE_VCALL_INDEX_P): Remove.
7482 (build_vtable_path): Remove.
7483 * decl2.c (finish_vtable_vardecl): Remove.
7484 (key_method): Remove #if 0'd code.
7485 (finish_vtable_vardecl): Rename to ...
7486 (maybe_emit_vtables): ... this.
7487 (finish_file): Use it.
7488 * search.c (look_for_overrides_here): Update comment.
7489
7490 2002-11-01 Zack Weinberg <zack@codesourcery.com>
7491
7492 PR c/7353 redux
7493 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7494
7495 2002-10-30 Jason Merrill <jason@redhat.com>
7496
7497 PR c++/8186
7498 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7499 * call.c (convert_for_arg_passing): Set it.
7500 * except.c (stabilize_throw_expr): Recurse for such an arg.
7501
7502 2002-10-31 Mark Mitchell <mark@codesourcery.com>
7503
7504 * cp-tree.h (lang_decl_flags): Remove init_priority.
7505 (lang_decl): Add delta.
7506 (GLOBAL_INIT_PRIORITY): Remove.
7507 (THUNK_DELTA): Revise definition.
7508 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7509 * dump.c (cp_dump_tree): Don't dump it.
7510
7511 2002-10-30 Mark Mitchell <mark@codesourcery.com>
7512
7513 PR c++/8160
7514 * typeck2.c (process_init_constructor): Call complete_array_type.
7515
7516 PR c++/8149
7517 * decl.c (make_typename_type): Issue errors about invalid results.
7518
7519 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7520
7521 Core issue 287, PR c++/7639
7522 * cp-tree.h (lang_type_class): Add decl_list field.
7523 (CLASSTYPE_DECL_LIST): New macro.
7524 (maybe_add_class_template_decl_list): Add declaration.
7525 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7526 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7527 (maybe_add_class_template_decl_list): New function.
7528 (add_implicitly_declared_members): Use it.
7529 * decl.c (maybe_process_template_type_declaration): Likewise.
7530 (pushtag): Likewise.
7531 * friend.c (add_friend): Likewise.
7532 (make_friend_class): Likewise.
7533 * semantics.c (finish_member_declaration): Likewise.
7534 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7535 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7536 to process members and friends in the order of declaration.
7537
7538 2002-10-29 Mark Mitchell <mark@codesourcery.com>
7539
7540 PR c++/8287
7541 * decl.c (finish_destructor_body): Create the label to jump to
7542 when returning from a destructor here.
7543 (finish_function_body): Rather than here.
7544
7545 2002-10-25 Zack Weinberg <zack@codesourcery.com>
7546
7547 PR c++/7266
7548 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7549 SCOPE_REF is not null before dereferencing it.
7550
7551 2002-10-25 Mark Mitchell <mark@codesourcery.com>
7552
7553 * call.c (build_over_call): Use DECL_CONTEXT, not
7554 DECL_VIRTUAL_CONTEXT.
7555 * class.c (modify_vtable_entry): Don't mess with
7556 DECL_VIRTUAL_CONTEXT.
7557 (set_vindex): Remove.
7558 (set_primary_base): Remove vfuns_p parameter.
7559 (determine_primary_base): Likewise.
7560 (modify_all_vtables): Likewise.
7561 (layout_class_type): Likewise. Adjust calls to other functions
7562 accordingly.
7563 (finish_struct_1): Adjust calls to modified functions. Set
7564 DECL_VINDEX here.
7565 * cp-tree.h (lang_type_class): Remove vsize.
7566 (CLASSTYPE_VSIZE): Remove.
7567 (lang_decl): Remove thunks.
7568 (DECL_THUNKS): Adjust.
7569 (DECL_VIRTUAL_CONTEXT): Remove.
7570 (duplicate_decls): Don't copy it.
7571 * pt.c (build_template_decl): Don't set it.
7572 (tsubst_decl): Likewise.
7573 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7574
7575 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7576 (build_vtable_entry): Remove.
7577 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7578 (lang_decl): Add thunks.
7579 (DECL_THUNKS): New macro.
7580 * decl.c (duplicate_decls): Copy it.
7581 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7582 * semantics.c (emit_associated_thunks): Simplify.
7583
7584 2002-10-24 David Edelsohn <edelsohn@gnu.org>
7585
7586 PR c++/7228
7587 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7588 lang_type structure exists before accessing field.
7589 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7590 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7591 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7592 * class.c (check_field_decls): Use new macros.
7593 * typeck2.c (process_init_constructor): Remove redundant check for
7594 existence of lang_type structure.
7595
7596 2002-10-24 Mark Mitchell <mark@codesourcery.com>
7597
7598 * class.c (end_of_base): New method.
7599 (end_of_class): Use it. Check indirect virtual bases.
7600
7601 * class.c (check_field_decls): Fix typo.
7602
7603 2002-10-23 Mark Mitchell <mark@codesourcery.com>
7604
7605 PR c++/8067
7606 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7607 related variables.
7608
7609 PR c++/7679
7610 * spew.c (next_token): Do not return an endless stream of
7611 END_OF_SAVED_INPUT tokens.
7612 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7613 the cached token stream.
7614 (snarf_defarg): Likewise.
7615
7616 2002-10-23 Zack Weinberg <zack@codesourcery.com>
7617
7618 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7619 variably_modified_type_p.
7620 * cp-tree.h: Remove prototype of variably_modified_type_p.
7621 * tree.c (variably_modified_type_p): Remove; now implemented
7622 in language-independent code.
7623
7624 2002-10-22 Mark Mitchell <mark@codesourcery.com>
7625
7626 PR c++/6579
7627 * spew.c (snarf_parenthesized_expression): New function.
7628 (snarf_block): Use it.
7629
7630 2002-10-22 Richard Henderson <rth@redhat.com>
7631
7632 * method.c (use_thunk): Always compute vcall_value; assert that
7633 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
7634 for vcall thunks as well.
7635
7636 2002-10-21 Mark Mitchell <mark@codesourcery.com>
7637
7638 * class.c (empty_base_at_nonzero_offset_p): New function.
7639 (layout_nonempty_base_or_field): Do not check for conflicts when
7640 laying out a virtual base using the GCC 3.2 ABI.
7641 (build_base_field): Correct checking for presence of empty classes
7642 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7643
7644 * class.c (include_empty_classes): Use normalize_rli.
7645 (layout_class_type): Likewise.
7646
7647 * decl.c (reshape_init): Tweak handling of character arrays.
7648
7649 PR c++/8218
7650 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7651 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7652 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7653 (check_field_decls): Likewise.
7654 (layout_class_type): Likewise.
7655 (finish_struct_1): Initialize it.
7656 (walk_subobject_offsets): Use it to prune searches.
7657
7658 2002-10-20 Mark Mitchell <mark@codesourcery.com>
7659
7660 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7661 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7662 TARGET_ASM_OUTPUT_MI_THUNK in comments.
7663
7664 2002-10-18 Zack Weinberg <zack@codesourcery.com>
7665
7666 * decl.c (start_decl): Point users of the old initialized-
7667 typedef extension at __typeof__.
7668
7669 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7670
7671 * Make-lang.in (method.o): Depend on TARGET_H.
7672 * method.c (target.h): Include it.
7673 (use_thunk): Use target hooks. Use vcall thunks, if available.
7674
7675 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7676
7677 * class.c (base_derived_from): Make sure return value is a bool.
7678
7679 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7680
7681 * class.c (find_final_overrider_data_s): Remove overriding_fn and
7682 overriding_base.
7683 (dfs_base_derived_from): New function.
7684 (base_derived_from): Likewise.
7685 (dfs_find_final_overrider): Use base_derived_from.
7686 (find_final_overrider): Adjust.
7687
7688 2002-10-18 Jason Merrill <jason@redhat.com>
7689
7690 PR c++/8080
7691 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7692 with condition decls in a template.
7693
7694 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
7695
7696 * class.c (add_method): Compare template parms too.
7697
7698 2002-10-17 Mark Mitchell <mark@codesourcery.com>
7699
7700 PR c++/7584
7701 * class.c (handle_using_decl): Allow the declaration used to be
7702 from an ambiguous base.
7703
7704 * pt.c (convert_template_argument): Revert this change:
7705 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7706 * pt.c (convert_template_argument): Do not fold non-type
7707 template rguments when inside a template.
7708
7709 * init.c (expand_default_init): Handle brace-enclosed initializers
7710 correctly.
7711
7712 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7713
7714 * mangle.c (write_expression): Correct handling of enumeration
7715 constants.
7716 (write_template_arg): Likewise.
7717 * pt.c (convert_template_argument): Do not fold non-type template
7718 arguments when inside a template.
7719
7720 PR c++/7478
7721 * cvt.c (convert_to_reference): Allow references as the incoming
7722 type.
7723
7724 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7725
7726 PR c++/7524
7727 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7728 build_qualified_type.
7729
7730 2002-10-15 Richard Henderson <rth@redhat.com>
7731
7732 * error.c (dump_expr): Use real_to_decimal directly, and with
7733 the new arguments.
7734
7735 2002-10-15 Mark Mitchell <mark@codesourcery.com>
7736
7737 * decl.c (reshape_init): Fix typo.
7738
7739 * cp-tree.h (operator_name_info_t): Add arity.
7740 * lex.c (init_operators): Initialize it.
7741 * mangle.c (write_conversion_operator_name): New function.
7742 (write_unqualified_name): Use it.
7743 (write_template_args): Accept template arguments as a TREE_LIST.
7744 (write_expression): Adjust handling of qualified names to match
7745 specification.
7746
7747 2002-10-15 Jason Merrill <jason@redhat.com>
7748
7749 * call.c (call_builtin_trap): New fn.
7750 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
7751 (build_call): Don't set current_function_returns_abnormally outside
7752 a function.
7753
7754 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7755
7756 * class.c (check_field_decls): Remove empty_p parameter. Instead,
7757 clear CLASSTYPE_EMPTY_P.
7758 (build_base_field): Likewise.
7759 (build_base_fields): Likewise.
7760 (check_bases_and_members): Likewise.
7761 (create_vtbl_ptr): Likewise.
7762 (layout_class_type): Likewise. Ensure that empty classes have
7763 size zero when used as base classes in the 3.2 ABI.
7764 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7765 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
7766 parameter.
7767 (is_empty_class): Correct definition when using post-3.2 ABI.
7768 * cp-tree.h (lang_type_class): Add empty_p.
7769 (CLASSTYPE_EMPTY_P): New macro.
7770
7771 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
7772
7773 * init.c (build_delete): Do not apply save_expr for arrays.
7774 (build_vec_delete): Likewise.
7775
7776 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7777
7778 * decl.c (layout_var_decl): Call layout_decl even for variables
7779 whose type is an array with unspecified bounds.
7780
7781 PR c++/7176
7782 * lex.c (do_identifier): Add another option for the parsing
7783 parameter.
7784 * parse.y (do_id): Use it.
7785
7786 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
7787
7788 PRs C++/6803, C++/7721 and C++/7803
7789 * decl.c (grokdeclarator): Gracefully handle template-name as
7790 decl-specifier.
7791
7792 2002-10-11 Jason Molenda <jmolenda@apple.com>
7793
7794 * init.c (build_field_list): Provide uses_unions_p with a default
7795 value.
7796
7797 2002-10-11 Mark Mitchell <mark@codesourcery.com>
7798
7799 PR c++/5661
7800 * cp-tree.h (variably_modified_type_p): New function.
7801 (grokdeclarator) Tighten check for variably modified types as
7802 fields.
7803 * pt.c (convert_template_argument): Do not allow variably modified
7804 types as template arguments.
7805 * tree.c (variably_modified_type_p): New function.
7806
7807 * NEWS: Document removal of "new X = ..." extension.
7808 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7809 brace-enclosed initializers.
7810 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7811 (initialize_local_var): Remove declaration.
7812 (expand_static_init): Likewise.
7813 * decl.c (next_initializable_field): New function.
7814 (reshape_init): Likewise.
7815 (check_initializer): Use them. Build dynamic initializer for
7816 aggregates here too.
7817 (initialize_local_var): Simplify, and incorporate cleanup
7818 insertion code as well.
7819 (destroy_local_var): Remove.
7820 (cp_finish_decl): Tidy.
7821 (expand_static_init): Fold checks for whether or not a variable
7822 needs initialization into this function. Simplify.
7823 * decl2.c (do_static_initialization): Simplify.
7824 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7825 be done for us automatically.
7826 (expand_default_init): Handle brace-enclosed initializers
7827 correctly.
7828 (expand_aggr_init_1): Remove RTL-generation code.
7829 (build_vec_init): Remove "new X = ..." support.
7830 * parse.y (new_initializer): Likewise.
7831 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7832 brace-enclosed initializer.
7833 (create_pseudo_type_info): Likewise.
7834 * typeck2.c (store_init_value): Don't try to handle digest_init
7835 being called more than once.
7836 (digest_init): Tidy handling of brace-enclosed initializers.
7837
7838 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7839
7840 * decl.c (typename_hash): Use htab_hash_pointer.
7841
7842 2002-10-10 Jim Wilson <wilson@redhat.com>
7843
7844 * decl.c (duplicate_decls): Don't call decl_attributes.
7845
7846 2002-10-09 Zack Weinberg <zack@codesourcery.com>
7847
7848 PR c/7353
7849 * decl.c (start_decl): Unconditionally issue error for
7850 'typedef foo = bar'.
7851 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7852 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7853
7854 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7855
7856 * decl2.c (prune_vtable_vardecl): Delete unused function.
7857
7858 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7859
7860 PR c++/7754
7861 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7862 procesing template functions.
7863 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7864 type. Call layout_decl.
7865 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7866
7867 2002-10-07 Richard Henderson <rth@redhat.com>
7868
7869 * decl2.c, pt.c: Revert c++/7754 fix.
7870
7871 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7872
7873 PR c++/7804
7874 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7875
7876 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7877
7878 PR c++/7931
7879 * pt.c (for_each_template_parm_r): Handle BASELINKs.
7880
7881 PR c++/7754
7882 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7883 procesing template functions.
7884 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7885 type. Call layout_decl.
7886 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7887
7888 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7889
7890 PR c++/8006
7891 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7892 template parameters.
7893 (globals): Add entity and need_abi_warning.
7894 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7895 CLASSTYPE_TEMPLATE_INFO.
7896 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7897 TYPE_TI_TEMPLATE.
7898 (write_prefix): Handle typename types correctly.
7899 (write_template_prefix): Handle template template parameters
7900 correctly.
7901 (start_mangling): Add entity parameter.
7902 (finish_mangling): Warn about names whose mangling will change.
7903 (mangle_decl_string): Adjust.
7904 (mangle_type_string): Likewise.
7905 (mangle_special_for_type): Likewise.
7906 (mangle_ctor_vtbl_for_type): Likewise.
7907 (mangle_thunk): Likewise.
7908 (mangle_guard_variable): Likewise.
7909 (mangle_ref_init_variable): Likewise.
7910
7911 2002-10-02 Mark Mitchell <mark@codesourcery.com>
7912
7913 PR c++/7188.
7914 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7915 * cp-tree.h (emit_base_init): Rename to ....
7916 (emit_mem_initializers): ... this.
7917 (expand_member_init): Change prototype.
7918 * init.c (perform_member_init): Compute explicit, rather than
7919 requiring it as a parameter.
7920 (sort_member_init): Rename to ...
7921 (sort_mem_initializers): ... this. Process bases and data members
7922 together.
7923 (sort_base_init): Remove.
7924 (emit_base_init): Rename to ...
7925 (emit_mem_initializers): ... this.
7926 (expand_aggr_vbase_init_1): Remove.
7927 (construct_virtual_bases): Rename to ...
7928 (construct_virtual_base): ... this.
7929 (expand_member_init): Rework handling of base initializers.
7930 * method.c (do_build_copy_constructor): Use
7931 finish_mem_initializers.
7932 * parse.y (member_init): Adjust calls to expand_member_init.
7933 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7934 (tsubst_initializer_list): Use expand_member_init.
7935 * semantics.c (finish_mem_intiailizers): Simplify.
7936
7937 2002-10-02 Matt Austern <austern@apple.com>
7938 * decl.c (walk_vtables_r): Fixed typo that caused result to
7939 never get a nonzero value.
7940
7941 2002-10-02 Roger Sayle <roger@eyesopen.com>
7942
7943 PR optimization/6627
7944 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7945 from here, and move it to tree.h.
7946 * decl.c (cxx_init_decl_processing): If storing the vbit
7947 in function pointers, ensure that force_align_functions_log
7948 is atleast one.
7949
7950 2002-10-02 Matt Austern <austern@apple.com>
7951
7952 * class.c (check_field_decls): Changed warning about const member
7953 variables so that it doesn't get issued for a class aggregate.
7954
7955 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7956
7957 * decl.c (cp_finish_decl): Make sure array types are laid out,
7958 even if the array bounds are unknown.
7959
7960 2002-10-01 Steve Ellcey <sje@cup.hp.com>
7961
7962 * class.c (build_vtbl_initializer): Change build_c_cast
7963 to build1.
7964
7965 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7966
7967 * decl.c (cp_finish_decl): Make sure array types are laid out,
7968 even if the array bounds are unknown.
7969
7970 * decl.c (cp_finish_decl): Correct check for dynamic
7971 initialization of thread-local storage.
7972
7973 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
7974
7975 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7976 overloaded.
7977
7978 2002-09-30 Steve Ellcey <sje@cup.hp.com>
7979
7980 * class.c (build_vtbl_initializer): Add cast.
7981 (add_vcall_offset_vtbl_entries_1):
7982 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7983
7984 2002-09-30 Mark Mitchell <mark@codesourcery.com>
7985
7986 * class.c (walk_subobject_offsets): Correct the calculation of
7987 offsets for virtual bases. Correct the counting of array
7988 elements.
7989 (layout_nonempty_base_or_field): Simplify. Correct the
7990 calculation of offsets to be propagated through the binfo
7991 hierarchy.
7992 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7993 Add the FIELD_DECL to TYPE_FIELDS.
7994 (build_base_fields): Adjust accordingly.
7995 (layout_virtual_bases): Use build_base_field.
7996 (end_of_class): Return a tree, not an integer.
7997 (warn_about_ambiguous_direct_bases): Rename to ...
7998 (warn_about_ambiguous_bases): ... this.
7999 (include_empty_classes): New function.
8000 (layout_class_type): Create an alternative version of the type to
8001 be used when as a base class type. Do not call
8002 finish_record_layout until we are done laying out the class.
8003 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
8004 as_base.
8005 (CLASSTYPE_SIZE): Reimplement.
8006 (CLASSTYPE_SIZE_UNIT): Likewise.
8007 (CLASSTYPE_ALIGN): Likweise.
8008 (CLASSTYPE_USER_ALIGN): Likewise.
8009 (CLASSTYPE_AS_BASE): New macro.
8010 (DECL_INITIALIZED_P): Likewise.
8011 (extract_init): Remove prototype.
8012 (build_forced_zero_init): Rename to ...
8013 (build_zero_init): ... this.
8014 (force_store_init_value): Remove.
8015 * decl.c (obscure_complex_init): Remove.
8016 (duplicate_decls): Copy DECL_INITIALIZED_P.
8017 (check_initializer): Do not leave junk in DECL_INITIAL.
8018 (cp_finish_decl): Handle zero-initialization of entities with
8019 static storage duration.
8020 * expr.c (extract_init): Remove.
8021 * init.c (build_forced_zero_init): Remove.
8022 (build_zero_init): New function.
8023 (build_default_init): Use it.
8024 (build_field_list): Skip FIELD_DECLs for base subobjects.
8025 (push_base_cleanups): Likewise.
8026 * method.c (do_build_assign_ref): Likewise.
8027 (synthesize_exception_spec): Likewise.
8028 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
8029 (regenerate_decl_from_template): To not set DECL_INITIAL for a
8030 static data member whose initialization took place in its class.
8031 (instantiate_decl): Do not pass an initializer to cp_finish_decl
8032 in that situation.
8033 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
8034 (dfs_unuse_fields): Likewise.
8035 * tree.c (pod_type_p): Handle error_mark_node.
8036 (zero_init_p): Likewise.
8037 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
8038 subobjects.
8039 * typeck2.c (store_init_value): Remove #if 0'd code.
8040 (force_store_init_value): Remove.
8041 (process_init_constructor): Use build_zero_init.
8042
8043 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
8044
8045 PR c++/7788
8046 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
8047
8048 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
8049
8050 * cp-tree.h: Fix comment typos.
8051 * decl.c: Likewise.
8052 * pt.c: Likewise.
8053
8054 2002-09-25 Mark Mitchell <mark@codesourcery.com>
8055
8056 * cp/class.c (contains_empty_class_p): New method.
8057 (walk_subobject_offsets): Correct computation of field offset.
8058 (layout_empty_base): Correct placement of emtpy base classes.
8059 (layout_class_type): Warn about ABI changes.
8060
8061 2002-09-23 Mark Mitchell <mark@codesourcery.com>
8062
8063 * cp/class.c (layout_virtual_bases): Do not round the size of the
8064 type to a multiple of the alignment before laying out virtual bases.
8065 (layout_class_type): Correct handling of bit-fields that are wider
8066 than their type inside unions. Round the size of the type to a
8067 even number of bytes when computing the size without virtual
8068 bases.
8069 * cp/cp-tree.h (abi_version_at_least): New macro.
8070
8071 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
8072
8073 * ChangeLog: Follow spelling conventions.
8074 * ChangeLog.2: Likewise.
8075 * call.c: Likewise.
8076 * class.c: Likewise.
8077 * cp-tree.h: Likewise.
8078 * cvt.c: Likewise.
8079 * decl.c: Likewise.
8080 * decl2.c: Likewise.
8081 * except.c: Likewise.
8082 * friend.c: Likewise.
8083 * g++spec.c: Likewise.
8084 * init.c: Likewise.
8085 * lex.c: Likewise.
8086 * mangle.c: Likewise.
8087 * method.c: Likewise.
8088 * operators.def: Likewise.
8089 * optimize.c: Likewise.
8090 * pt.c: Likewise.
8091 * rtti.c: Likewise.
8092 * search.c: Likewise.
8093 * semantics.c: Likewise.
8094 * spew.c: Likewise.
8095 * tree.c: Likewise.
8096 * typeck.c: Likewise.
8097
8098 2002-09-18 Devang Patel <dpatel@apple.com>
8099
8100 * cp/cp-tree.h: New prototype for walk_vtabls().
8101 * cp/decl.c (walk_vtables_r): New function.
8102 (struct cp_binding_level): Add new members, namespaces,
8103 names_size and vtables.
8104 (add_decl_to_level): Add decl in namespaces or vtables
8105 chain, if conditions match.
8106 (walk_vtables): New function.
8107 (walk_namespaces_r): Travers separate namespace chain
8108 for namespace decls.
8109 (wrapup_globals_for_namespace): Use names_size instead
8110 of list_length().
8111 * cp/decl2.c (finish_file): Use walk_vtables() instead of
8112 walk_globals() to walk vtable decls.
8113
8114 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
8115
8116 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
8117 ICE with invalid pointers & references.
8118
8119 2002-09-17 Zack Weinberg <zack@codesourcery.com>
8120
8121 * Make-lang.in: Remove all references to the demangler.
8122 * cxxfilt.c: Moved to binutils.
8123
8124 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8125
8126 PR c++/7718
8127 * pt.c (tsubst_decl): Remove assert.
8128
8129 Remove DR 295 implementation.
8130 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
8131 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
8132 about ignoring volatile qualifiers.
8133
8134 * search.c (lookup_member): Correct documentation.
8135
8136 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8137
8138 * cp-tree.h (union lang_tree_node): Add chain_next option.
8139
8140 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8141
8142 * parse.y (parse_finish_call_expr): Check lookup_member result.
8143
8144 PR c++/7015
8145 * semantic.c (finish_asm_stmt): Fix operand/output_operands
8146 thinko.
8147 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
8148
8149 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
8150
8151 PR c++/7919
8152 * call.c (build_over_call): Convert this pointer for fns found by
8153 using decls.
8154
8155 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8156
8157 * ChangeLog: Follow spelling conventions.
8158 * ChangeLog.1: Likewise.
8159
8160 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
8161
8162 PR c++/7768
8163 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
8164
8165 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
8166
8167 * error.c: Fix comment formatting.
8168 * except.c: Likewise.
8169 * expr.c: Likewise.
8170 * friend.c: Likewise.
8171 * g++spec.c: Likewise.
8172 * init.c: Likewise.
8173 * lex.c: Likewise.
8174 * mangle.c: Likewise.
8175 * method.c: Likewise.
8176 * optimize.c: Likewise.
8177 * pt.c: Likewise.
8178 * rtti.c: Likewise.
8179 * search.c: Likewise.
8180 * semantics.c: Likewise.
8181 * spew.c: Likewise.
8182 * tree.c: Likewise.
8183 * typeck.c: Likewise.
8184 * typeck2.c: Likewise.
8185
8186 2002-09-13 Matt Austern <austern@apple.com>
8187
8188 PR C++/7828
8189 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
8190 * cp/call.c: Change call-by-const-reference mechanism to use
8191 non_cast_lvalue_p when deciding whether the create a temporary.
8192 We need a temporary when passing, e.g. (long) x by const ref.
8193
8194 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
8195
8196 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
8197
8198 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
8199
8200 * decl.c: Fix comment formatting.
8201 * decl2.c: Likewise.
8202
8203 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
8204
8205 * call.c: Fix comment formatting.
8206 * class.c: Likewise.
8207 * cp-lang.c: Likewise.
8208 * cp-tree.h: Likewise.
8209 * cvt.c: Likewise.
8210
8211 2002-09-11 Zack Weinberg <zack@codesourcery.com>
8212
8213 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8214 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8215 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8216 minor adjustments (use version_string, eliminate yet another
8217 duplicate of xmalloc)
8218
8219 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8220
8221 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8222
8223 2002-09-05 Jason Merrill <jason@redhat.com>
8224
8225 * typeck2.c (add_exception_specifier): Only pedwarn for an
8226 incomplete type.
8227 (require_complete_eh_spec_types): New fn.
8228 (cxx_incomplete_type_diagnostic): Also support pedwarning.
8229 * typeck.c (complete_type_or_diagnostic): Likewise.
8230 * call.c (build_call): Call require_complete_eh_spec_types.
8231 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8232 on an incomplete type.
8233
8234 2002-09-04 Jakub Jelinek <jakub@redhat.com>
8235
8236 * decl.c (start_cleanup_fn): Clear interface_only before
8237 start_function, restore it afterwards.
8238
8239 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
8240
8241 * cp-tree.h (finish_builtin_type): Remove.
8242 * decl2.c (finish_builtin_type): Move to common code.
8243 * decl.c (build_ptrmemfunc_type): Adjust.
8244 * rtti.c (create_pseudo_type_info): Adjust.
8245 (create_tinfo_types): Adjust.
8246
8247 2002-08-31 Jason Merrill <jason@redhat.com>
8248
8249 * cp-lang.c (cp_expr_size): Allow initialization from a
8250 CONSTRUCTOR.
8251
8252 2002-08-30 Richard Henderson <rth@redhat.com>
8253
8254 PR opt/7515
8255 * tree.c: Include target.h.
8256 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8257 don't bind locally.
8258 * Makefile.in (tree.o): Update.
8259
8260 2002-08-27 Mark Mitchell <mark@codesourcery.com>
8261
8262 * class.c (layout_virtual_bases): Warn about bugs in G++ that
8263 result in incorrect object layouts.
8264 (layout_class_type): Likewise.
8265
8266 2002-08-24 Matt Austern <austern@apple.com>
8267
8268 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8269 are allowable.
8270 (real_lvalue_p): Update caller.
8271 (lvalue_p): Ditto.
8272 (non_cast_lvalue_or_else): New.
8273 * tree.h: Declare it.
8274 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8275
8276 2002-08-22 Mark Mitchell <mark@codesourcery.com>
8277
8278 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8279 and COND_EXPR specially; fix error message output.
8280
8281 2002-08-22 Jason Merrill <jason@redhat.com>
8282
8283 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8284 * semantics.c (nullify_returns_r): Likewise.
8285
8286 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
8287
8288 Fix PR/7621
8289 * typeck.c (finish_class_member_access_expr): Diagnose cases where
8290 name lookup finds nothing.
8291
8292 2002-08-15 Jason Merrill <jason@redhat.com>
8293
8294 * semantics.c (finish_then_clause): Remove redundant assignment.
8295 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8296 extra binding level outside the if/switch statement.
8297 (finish_while_cond, finish_for_cond): Rewrite complex condition
8298 into the loop body.
8299
8300 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
8301
8302 * parse.y (sizeof, alignof, typeof): New non-terminals to
8303 increment skip_evaluation. Replace terminals with them and
8304 decrement skip_evaluation at the end of rules using them.
8305 * decl2.c (mark_used): Don't assemble_external if
8306 skipping evaluation.
8307
8308 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
8309
8310 Fix PR/7504
8311 * parse.y (parse_finish_call_expr): Handle incomplete
8312 type used to name a scope.
8313
8314 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
8315
8316 PR c++/7598
8317 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8318 regression caused by my 2002-08-08 patch.
8319
8320 2002-08-13 Mark Mitchell <mark@codesourcery.com>
8321
8322 * decl.c (pushdecl_class_level): Honor requests to bind names to
8323 OVERLOADs.
8324
8325 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8326
8327 * decl2.c (build_call_from_tree): Fix uninitialized variable.
8328 * parse.y (parse_finish_call_expr): Likewise.
8329 * repo.c (old_args, old_dir, old_main): Const-ify.
8330
8331 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
8332
8333 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8334 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8335 * optimize.c (maybe_clone_body): Likewise.
8336 * pt.c (tsubst_enum): Likewise.
8337 (lookup_template_class): Likewise.
8338 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8339
8340 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
8341
8342 * lang-specs.h: Remove -ansi.
8343
8344 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
8345
8346 * tree.c (maybe_dummy_object): Replace // with /* */
8347
8348 2002-08-09 Mark Mitchell <mark@codesourcery.com>
8349
8350 * call.c (standard_conversion): Use build_ptrmem_type.
8351 * cp-tree.h (build_ptrmem_type): New function.
8352 (adjust_result_of_qualified_name_lookup): Likewise.
8353 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8354 static data members.
8355 (build_ptrmem_type): New function.
8356 (grokdeclarator): Do not use build_offset_type when encountering a
8357 qualified name.
8358 * parse.y (parse_finish_call_expr): Use
8359 adjust_result_of_qualified_name_lookup.
8360 * search.c (adjust_result_of_qualified_name_lookup): New function.
8361 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8362 accessing OFFSET_TYPEs directly.
8363
8364 2002-08-08 Mike Stump <mrs@apple.com>
8365
8366 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8367 (type_decays_to): Likewise.
8368 * class.c (find_final_overrider): Likewise.
8369 (maybe_note_name_used_in_class): Likewise.
8370 * decl.c (current_tmpl_spec_kind): Likewise.
8371 (add_binding): Likewise.
8372 (push_class_binding): Likewise.
8373 (duplicate_decls): Likewise.
8374 (layout_var_decl): Likewise.
8375 (grokfndecl): Likewise.
8376 (grokdeclarator): Likewise.
8377 (check_default_argument): Likewise.
8378 * decl2.c (handle_class_head): Likewise.
8379 * error.c (dump_template_decl): Likewise.
8380 * init.c (build_offset_ref): Likewise.
8381 * pt.c (check_specialization_scope): Likewise.
8382 (determine_specialization): Likewise.
8383 (check_explicit_specialization): Likewise.
8384 (maybe_check_template_type): Likewise.
8385 (process_partial_specialization): Likewise.
8386 (check_default_tmpl_args): Likewise.
8387 (push_template_decl_real): Likewise.
8388 (convert_template_argument): Likewise.
8389 (try_class_unification): Likewise.
8390 (get_bindings_real): Likewise.
8391 (do_decl_instantiation): Likewise.
8392 * semantics.c (begin_function_definition): Likewise.
8393 (finish_member_declaration): Likewise.
8394 (check_multiple_declarators): Likewise.
8395 * typeck.c (comp_array_types): Likewise.
8396 (comptypes): Likewise.
8397 (expr_sizeof): Likewise.
8398 (build_binary_op): Likewise.
8399 (dubious_conversion_warnings): Likewise.
8400 (check_return_expr): Likewise.
8401
8402 2002-08-08 Mark Mitchell <mark@codesourcery.com>
8403
8404 * typeck.c (build_class_member_access_expr): Do not return
8405 error_mark_node when no error has occurred.
8406
8407 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8408
8409 * typeck.c (build_component_addr): Remove.
8410 (build_unary_op): Just check it's not a bitfield, and then build
8411 an ADDR_EXPR.
8412
8413 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8414
8415 * class.c (convert_to_base): Correct check for error_mark_node.
8416 (create_vtable_ptr): Remove unused VFUNS_P parm.
8417
8418 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8419
8420 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8421
8422 2002-08-07 Mark Mitchell <mark@codesourcery.com>
8423
8424 Rework build_component_ref.
8425 * call.c (build_vfield_ref): Do not go through build_component_ref.
8426 (build_field_call): Use build_class_member_access_expr.
8427 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8428 (build_object_call): Likewise.
8429 * class.c (convert_to_base): New function.
8430 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8431 (instantiate_type): Handle BASELINKs.
8432 * cp-tree.def (BASELINK): New tree code.
8433 * cp-tree.h (BASELINK_P): Reimplement.
8434 (SET_BASELINK_P): Remove.
8435 (BASELINK_BINFO): Reimplement.
8436 (BASELINK_FUNCTIONS): Likewise.
8437 (BASELINK_ACCESS_BINFO): Likewise.
8438 (BASELINK_OPTYPE): Likewise.
8439 (convert_to_base): New function.
8440 (name_p): Likewise.
8441 (build_object_ref): Remove.
8442 (build_component_ref_1): Likewise.
8443 (build_component_ref): Likewise.
8444 (build_x_component_ref): Likewise.
8445 (build_class_member_access_expr): New function.
8446 (finish_class_member_access_expr): Likewise.
8447 (build_ptrmemfunc_access_expr): Likewise.
8448 * decl.c (grokdeclarator): Handle BASELINKs.
8449 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8450 finish_class_member_access_expr.
8451 (arg_assoc): Handle BASELINKs.
8452 (do_class_using_decl): Likewise.
8453 * error.c (dump_decl): Likewise.
8454 (dump_expr): Use build_ptrmemfunc_access_expr.
8455 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8456 destructors.
8457 (build_throw): Use BASELINK_FUNCTIONS.
8458 * init.c (perform_member_init): Use
8459 build_class_member_access_expr.
8460 (build_offset_ref): Handle BASELINKs. Use
8461 build_class_member_access_expr.
8462 * method.c (hack_identifier): Likewise.
8463 * parse.y (do_id): Use BASELINK, not TREE_LIST.
8464 (primary): Remove uses of build_object_ref.
8465 * pt.c (lookup_template_function): Handle BASELINKs.
8466 (resolve_overloaded_unification): Likewise.
8467 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8468 (lookup_field): Use BASELINK, not TREE_LIST.
8469 (lookup_fnfiels): Likewise.
8470 (setup_class_bindings): Likewise.
8471 * semantics.c (finish_object_call_expr): Do not use
8472 build_method_call when we already know what function is being
8473 called.
8474 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8475 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8476 TREE_CHAIN.
8477 (name_p): New function.
8478 * typeck.c (build_object_ref): Remove.
8479 (build_component_ref_1): Likewise.
8480 (build_x_component_ref): Likewise.
8481 (build_class_member_access_expr): New function.
8482 (finish_class_member_access_expr): Likewise.
8483 (build_ptrmemfunc_access_expr): Likewise.
8484 (get_member_function_from_ptrfunc): Use
8485 build_ptrmemfunc_access_expr.
8486 (build_binary_op): Likewise.
8487 (build_unary_op): Likewise.
8488 (build_ptrmemfunc): Likewise.
8489 (pfn_from_ptrmemfunc): Likewise.
8490 * typeck2.c (build_m_component_ref): Adjust comment.
8491
8492 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
8493
8494 * Make-lang.in (CXX_C_OBJS): Update.
8495 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8496 * cp-tree.h (cxx_decode_option): Remove.
8497 * decl2.c (compare_options, lang_f_options, unsupported_options,
8498 cxx_decode_option): Remove.
8499
8500 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
8501
8502 * typeck.c (build_x_unary_op): Handle pointer-to-member.
8503
8504 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8505
8506 * class.c: Don't include obstack.h.
8507 (popclass):
8508 * decl2.c: Delete bogus comment.
8509 * error.c: Don't include obstack.h.
8510 * except.c: Likewise.
8511 (dump_type): Correct comment.
8512 * method.c: Don't include obstack.h.
8513 * tree.c: Likewise.
8514
8515 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
8516
8517 Fix PR/2213
8518 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8519 expressions to pointer-to-data-member of pointer-to-member-functions.
8520
8521 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8522
8523 * cvt.c (ocp_convert): Delete obsolete code.
8524 * parse.y (permanent_obstack): Delete declaration.
8525 * pt.c (permanent_obstack): Delete declaration.
8526 * repo.c (permanent_obstack): Delete declaration.
8527 (open_repo_file): Use xmalloc instead of permanent_obstack.
8528 (init_repo): Use xstrdup instead of permanent_obstack.
8529
8530 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
8531
8532 * cp-tree.h (VF_DERIVED_VALUE): Remove.
8533 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8534
8535 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
8536
8537 PR 7470.
8538 C++ ABI change - vfunc ordering.
8539 * class.c (add_virtual_function): Remove.
8540 (dfs_modify_all_vtables): Take list of all declared
8541 virtuals. Assign all that are not in primary base.
8542 (check_for_override): Adjust comments.
8543 (create_vtable_ptr): Take single list of virtuals. Build chain
8544 of declared virtuals here.
8545 (layout_class_type): Take single list of virtuals. Adjust.
8546 (finish_struct_1): Keep virtuals on single list. Adjust.
8547
8548 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8549
8550 * init.c (build_member_call): Use build_new_method_call, not
8551 build_method_call.
8552
8553 2002-08-02 Krister Walfridsson <cato@df.lth.se>
8554
8555 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8556
8557 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8558
8559 * call.c (build_method_call): Issue a more helpful error message
8560 about ambiguous method names.
8561
8562 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
8563
8564 * tree.c (build_shared_int_cst): Make cache file scope, and
8565 GTY it.
8566
8567 2002-08-02 Jason Merrill <jason@redhat.com>
8568
8569 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8570 (cp_expr_size): New fn.
8571 * call.c (build_over_call): Lose empty class hackery.
8572 (convert_arg_to_ellipsis): Promote non-POD warning to error.
8573 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8574
8575 * semantics.c (expand_body): Do tree optimization in the function
8576 context, too.
8577
8578 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
8579
8580 * cp-tree.h: Move all warning and flag declarations to c-common.h.
8581 * decl.c: Move all warning and flag variables to c-common.c.
8582 * decl2.c: Move all warning and flag variables to c-common.c.
8583 * lex.c (flag_digraphs): Remove.
8584 (warn_traditional): Now in c-common.c.
8585
8586 2002-07-31 Mark Mitchell <mark@codesourcery.com>
8587
8588 * call.c (build_field_call): Do not look up the field by name.
8589 (build_method_call): Simplify.
8590 (struct z_candidate): Add access_path and conversion_path. Remove
8591 basetype_path.
8592 (convert_class_to_reference): Adjust use of
8593 add_function_candidate.
8594 (add_candidate): Add conversion_path argument.
8595 (add_function_candidate): Use it.
8596 (add_conv_dndidate): Likewise.
8597 (build_builtin_candidate): Likewise.
8598 (add_template_candidate_real): Add conversion_path argument.
8599 (add_template_conv_candidate): Likewise.
8600 (add_template_candidate): Likewise.
8601 (build_user_type_conversion_1): Use it.
8602 (build_new_function_call): Remove name lookup code. Adjust use of
8603 add_template_candidate and add_function_candidate.
8604 (build_new_op): Likewise.
8605 (convert_like_real): Use build_special_member_call.
8606 (build_over_call): Use cand->conversion_path.
8607 (build_special_member_call): New method.
8608 (build_new_method_call): Remove name lookup code.
8609 * cp-tree.def (OFFSET_REF): Update documentation.
8610 (TEMPLATE_ID_EXPR): Likewise.
8611 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8612 (BASELINK_OPTYPE): Likewise.
8613 (build_new_method_call): Adjust prototype.
8614 (build_special_member_call): New method.
8615 (build_baselink): New method.
8616 (build_offset_ref_call_from_tree): Likewise.
8617 (build_call_from_tree): Likewise.
8618 (finish_qualified_call_expr): Remove.
8619 (finish_call_expr): Adjust prototype.
8620 (build_x_function_call): Remove.
8621 * cvt.c (ocp_convert): Use build_special_member_call.
8622 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8623 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8624 CALL_EXPR.
8625 (build_offset_ref_call_from_tree): New function.
8626 (build_call_from_tree): Likewise.
8627 * init.c (expand_cleanup): Use build_special_member_call.
8628 (expand_default_init): Likewise.
8629 (build_member_call): Use finish_call_expr.
8630 (build_new_1): Use build_special_member_call.
8631 (push_base_cleanups): Likewise.
8632 * method.c (do_build_assign_ref): Likewise.
8633 * parse.y (template_id): Do not pass a COMPONENT_REF to
8634 lookup_template_function.
8635 (primary): Use parse_finish_call_epxr, not finish_call_expr.
8636 (parse_finish_call_expr): New function.
8637 * pt.c (lookup_template_function): Add assertions.
8638 * search.c (lookup_base): Allow T to be a binfo.
8639 (build_baselink): New function.
8640 (lookup_member): Use it.
8641 * semantics.c (finish_call_expr): Do not do name lookup.
8642 (finish_object_call_expr): Remove #if 0'd code.
8643 (finish_qualified_call_expr): Remove.
8644 * typeck.c (build_x_function_call): Remove.
8645 (build_static_case): Use build_special_member_call.
8646 * typeck2.c (build_functional_cast): Likewise.
8647
8648 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8649
8650 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8651
8652 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
8653
8654 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8655
8656 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
8657
8658 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8659 documentation.
8660
8661 2002-07-29 Alan Modra <amodra@bigpond.net.au>
8662
8663 * cp-tree.h: Comment typo fix.
8664
8665 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
8666
8667 * spew.c (space_for_token): Allocate zeroed memory for a new token
8668 chunk.
8669
8670 2002-07-27 Roger Sayle <roger@eyesopen.com>
8671
8672 * decl.c (builtin_function_1): No need to explicitly mark
8673 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8674
8675 2002-07-27 Roger Sayle <roger@eyesopen.com>
8676
8677 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8678
8679 2002-07-26 Jason Merrill <jason@redhat.com>
8680
8681 * call.c (build_over_call): Likewise.
8682 (cp_convert_parm_for_inlining): New fn.
8683 (convert_for_arg_passing): New fn.
8684 (convert_default_arg, build_over_call): Use it.
8685 (type_passed_as): New fn.
8686 * pt.c (tsubst_decl): Use it.
8687 * decl2.c (cp_build_parm_decl): New fn.
8688 (build_artificial_parm): Use it.
8689 (start_static_storage_duration_function): Likewise.
8690 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8691 (grokparms): Don't mess with DECL_ARG_TYPE.
8692 * typeck.c (convert_arguments): Use convert_for_arg_passing.
8693 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8694 Define.
8695 * cp-tree.h: Declare new fns.
8696
8697 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
8698
8699 * cp-tree.h (flag_operator_names): Remove.
8700 * decl2.c (flag_operator_names): Remove.
8701 (lang_f_options): Remove operator-names.
8702 * lex.c (D_OPNAME): Remove.
8703 (reswords): Remove operator names.
8704 (rid_to_yy): Remove operator names.
8705 (init_reswords): No need to handle D_OPNAME.
8706 * spew.c (read_process_identifier): There are no operator
8707 names.
8708
8709 2002-07-26 Jason Merrill <jason@redhat.com>
8710
8711 * dump.c (cp_dump_tree): Call c_dump_tree.
8712 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8713
8714 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8715
8716 * error.c (print_whitespace): Remove.
8717 * g++spec.c (LIBUNWIND): Move.
8718 * mangle.c (mangled_position, write_signed_number): Remove.
8719
8720 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8721
8722 * decl2.c (cxx_decode_option): Similarly.
8723
8724 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
8725
8726 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8727 (cxx_sizeof_or_alignof_type): Take a third argument.
8728 (cxx_sizeof): Adjust definition.
8729 (cxx_alignof): Likewise.
8730 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8731 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8732 complaining.
8733 (c_sizeof_nowarn): Remove definition.
8734 (build_unary_op): Use cxx_sizeof_nowarn.
8735
8736 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
8737
8738 * tree.c (cp_build_qualified_type_real): When copying
8739 pointer-to-method types, unshare the record that holds
8740 the cached pointer-to-member-function type.
8741
8742 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8743
8744 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8745
8746 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
8747
8748 Fix PR/7363:
8749 * typeck.c (cxx_sizeof_or_alignof_type): New function.
8750 (c_sizeof): Remove definition.
8751 (expr_sizeof): Use cxx_sizeof.
8752 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8753 * decl.c (finish_destructor_body): Use cxx_sizeof.
8754 * semantics.c (finish_alignof): Likewise.
8755 (finish_alignof): Use cxx_alignof.
8756 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8757 (cxx_sizeof_or_alignof_type): Declare.
8758 (my_friendly_assert): Move to ../c-common.h.
8759
8760 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8761
8762 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8763
8764 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8765
8766 PR c++/7347, c++/7348
8767 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8768 * decl.c (make_typename_type): Use it.
8769 (make_unbound_class_template): Likewise.
8770 (lookup_name_real): Don't call type_access_control if scope is
8771 template parameter dependent.
8772 * parse.y (template_arg): Call make_unbound_class_template with
8773 tf_parsing set.
8774 (nest_name_specifier): Call make_typename_type with tf_parsing set.
8775 (typename_sub0): Likewise.
8776 (typename_sub1): Likewise.
8777 (instantiate_decl): Push class scope.
8778 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8779 for both static variable and member function template.
8780 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8781 and arguments.
8782 * search.c (type_access_control): Do type access for TEMPLATE_DECL
8783 too.
8784
8785 2002-07-20 Roger Sayle <roger@eyesopen.com>
8786
8787 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8788 test by using positive_option. Make whitespace consistent.
8789
8790 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
8791
8792 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8793 members with 'locus'. Adjust use throughout.
8794 (struct feed): Likewise.
8795 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8796 Adjust use.
8797 (snarf_defarg): Use error(), not error_with_file_and_line().
8798
8799 2002-07-19 Chris Demetriou <cgd@broadcom.com>
8800
8801 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8802 cpp_options is included.
8803
8804 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8805
8806 PR c++/2862, c++/2863
8807 * pt.c (determine_specialization): Compare the length of
8808 TYPE_ARG_TYPES. Tidy.
8809
8810 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8811
8812 PR c++/3797
8813 * decl.c (duplicate_decls): Don't propagate inlining parameters from
8814 olddecl to newdecl when newdecl is a specialization of the
8815 instantiation olddecl.
8816
8817 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8818
8819 PR c++/4802, c++/5387
8820 * decl.c (make_typename_type): Use enforce_access.
8821
8822 2002-07-17 Scott Snyder <snyder@fnal.gov>
8823
8824 PR c++/7320
8825 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8826
8827 2002-07-12 Mark Mitchell <mark@codesourcery.com>
8828
8829 * class.c (add_method): Correct handling of conversion operators.
8830
8831 2002-07-11 Mark Mitchell <mark@codesourcery.com>
8832
8833 PR c++/7224
8834 * class.c (add_method): Simplify.
8835
8836 2002-07-11 Jason Merrill <jason@redhat.com>
8837
8838 PR c++/7279
8839 * tree.c (cp_copy_res_decl_for_inlining): Also copy
8840 TREE_ADDRESSABLE.
8841
8842 2002-07-10 Graham Stott <graham.stott@btinternet.com>
8843
8844 * pt.c (template_parm_this_level_p, push_template_decl_real):
8845 Pass depth as int pointer.
8846
8847 2002-07-11 Tim Josling <tej@melbpc.org.au>
8848
8849 Remove front end hard coding from gengtype.c.
8850
8851 * config-lang.in (gtfiles): Add files needed for this front end.
8852
8853 2002-07-10 Mark Mitchell <mark@codesourcery.com>
8854
8855 * cp-tree.h (unqualified_name_lookup_error): Declare it.
8856 (begin_function_definition): Adjust prototype.
8857 * lex.c (unqualified_name_lookup_error): New function, split out
8858 from ...
8859 (do_identifier): ... here.
8860 * parse.y (parse_begin_function_definition): New function.
8861 (fn.def1): Use it.
8862 * semantics.c (begin_function_definition): Accept decl-specifiers
8863 and attributes as separate parameters.
8864
8865 2002-07-10 Jason Merrill <jason@redhat.com>
8866
8867 PR c++/6255
8868 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8869 modifying the old one.
8870
8871 2002-07-09 Mark Mitchell <mark@codesourcery.com>
8872
8873 * cp-tree.h (constructor_name_p): Declare it.
8874 (check_template_template_default_arg): Likewise.
8875 * class.c (handle_using_decl): Use constructor_name_p.
8876 * decl.c (grokdeclarator): Likewise.
8877 * decl2.c (constructor_name_p): Define it.
8878 * init.c (build_member_call): Use constructor_name_p.
8879 * parse.y (template_parm): Use check_template_template_default_arg.
8880 * pt.c (check_explicit_specialization): Use constructor_name_p.
8881 * semantics.c (check_template_template_default_arg): New function.
8882
8883 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8884
8885 * pt.c (can_complete_type_without_circularity): Add static to
8886 function definition.
8887
8888 2002-07-08 Mark Mitchell <mark@codesourcery.com>
8889
8890 * cp-tree.h (have_extern_spec): Declare it
8891 * decl.c (have_extern_spec): Define it.
8892 (start_decl): Eliminate use of used_extern_spec.
8893 (start_function): Likewise.
8894 * parse.y (have_extern_spec): Remove declaration.
8895 (used_extern_spec): Likewise.
8896 (frob_specs): Eliminate use of used_extern_spec.
8897 (.hush_warning): Likewise.
8898
8899 2002-07-07 Mark Mitchell <mark@codesourcery.com>
8900
8901 * Make-lang.in (cp/parse.o): Depend on decl.h.
8902 * cp-tree.h (do_decl_instantiation): Change prototype.
8903 * parse.y: Include decl.h.
8904 (parse_decl_instantiation): New function.
8905 (explicit_instantiation): Use it.
8906 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8907 and DECLSPECS.
8908
8909 2002-07-07 Roger Sayle <roger@eyesopen.com>
8910
8911 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8912 constructor and destructor tests when passed a TEMPLATE_DECL.
8913
8914 2002-07-05 Jason Merrill <jason@redhat.com>
8915
8916 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8917 pointers.
8918
8919 PR optimization/7145
8920 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8921
8922 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
8923
8924 Repair damage on weak-impared targets caused by my previous patch.
8925 * cp-tree.h (import_export_tinfo): Add parameter.
8926 * decl2.c (import_export_tinfo): Add parameter, post adjust
8927 DECL_COMDAT.
8928 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8929 import_export_tinfo.
8930
8931 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8932
8933 PR c++/6944
8934 * init.c (build_aggr_init): Remove qualifiers of init before calling
8935 build_vec_init.
8936 (build_vec_init): Flatten multi-dimensional array during cleanup.
8937 (build_vec_delete_1): Abort if the type of each element is array.
8938
8939 2002-07-03 Graham Stott <graham.stott@btinternet.com>
8940
8941 * pt.c (instantiate_class_template): Fix typo.
8942
8943 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8944
8945 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8946 by CVS conflict in my last patch.
8947
8948 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8949
8950 PR c++/6716
8951 * pt.c (can_complete_type_without_circularity): New function.
8952 (instantiate_class_template): Use it.
8953 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8954 message due to incomplete fields.
8955
8956 2002-07-01 Mark Mitchell <mark@codesourcery.com>
8957
8958 PR c++/7112
8959 * mangle.c (write_expression): Add mangling for sizeof when
8960 applied to a type.
8961 * operators.def: Remove stale comment.
8962
8963 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
8964
8965 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8966 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8967 (tinfo_decl_type): Replace with ...
8968 (type_info_ptr_type): ... this.
8969 (import_export_tinfo): Declare.
8970 (tinfo_decl_p): Rename to ...
8971 (unemitted_tinfo_decl_p): ... this.
8972 * decl2.c (import_export_decl): Break out tinfo handling into ...
8973 (import_export_tinfo): ... here. New function.
8974 (finish_file): Adjust.
8975 * rtti.c (TINFO_REAL_NAME): New macro.
8976 (init_rtti_processing): Create the tinfo types.
8977 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8978 (get_tinfo_decl): Adjust.
8979 (get_tinfo_ptr): New function.
8980 (get_type_id): Use it.
8981 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8982 (ptr_initializer): Use get_tinfo_ptr.
8983 (ptm_initializer): Likewise.
8984 (synthesize_tinfo_var): Break into ...
8985 (get_pseudo_ti_init): ... this. Just create the initializer.
8986 (get_pseudo_ti_desc): .. and this.
8987 (create_real_tinfo_var): Remove.
8988 (create_pseudo_type_info): Don't create the vtable decl here.
8989 (get_vmi_pseudo_type_info): Remove.
8990 (create_tinfo_types): Adjust.
8991 (tinfo_decl_p): Rename to ...
8992 (unemitted_tinfo_decl_p): ... here. Adjust.
8993 (emit_tinfo_decl): Adjust. Create the initializer.
8994
8995 2002-06-27 Mark Mitchell <mark@codesourcery.com>
8996
8997 PR c++/6695
8998 * pt.c (tsubst_friend_class): Substitute into the context of the
8999 friend before using it.
9000
9001 2002-06-26 Mark Mitchell <mark@codesourcery.com>
9002
9003 * cp-tree.h (xref_tag): Change prototype.
9004 (handle_class_head): Likewise.
9005 (build_x_component_ref): Likewise.
9006 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
9007 (xref_tag): Take attributes as a separate parameter.
9008 (xref_tag_from_type): Adjust call to xref_tag.
9009 * decl2.c (build_expr_from_tree): Adjust call to
9010 build_x_component_ref.
9011 (handle_class_head): Take attributes as a separate parameter.
9012 * parse.y (parse_xref_tag): New function.
9013 (parse_handle_class_head): Likewise.
9014 (primary): Use parse_xref_tag.
9015 (class_head_decl): Use parse_handle_class_head.
9016 (class_head_defn): Likewise.
9017 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
9018 (build_dynamic_cast_1): Likewise.
9019 (create_pseudo_type_info): Likewise.
9020 (emit_support_tinfos): Likewise.
9021 * typeck.c (build_object_ref): Adjust call to
9022 build_x_component_ref.
9023 (build_x_component_ref): Remove protect parameter.
9024
9025 2002-06-25 Mark Mitchell <mark@codesourcery.com>
9026
9027 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
9028 * class.c (handle_using_decl): Likewise.
9029 (instantiate_type): Likewise.
9030 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
9031 (xref_basetypes): Change prototype.
9032 (begin_mem_initializers): New function.
9033 (get_overloaded_fn): Likewise.
9034 * decl.c (xref_basetypes): Simplify.
9035 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
9036 * init.c (build_offset_ref): Likewise.
9037 * parse.y (base_init): Use begin_mem_initializers().
9038 (structsp): Adjust call to xref_basetypes.
9039 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
9040 (instantiate_class_template): Adjust call to xref_basetypes.
9041 * semantics.c (begin_mem_initializers): New function.
9042 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
9043 (really_overloaded_fn): Likewise.
9044 (get_overloaded_fn): New function.'
9045 (get_first_fn): USe BASELINK_FUNCTIONS.
9046
9047 2002-06-24 Mark Mitchell <mark@codesourcery.com>
9048
9049 * cp-tree.h (SCALAR_TYPE_P): New macro.
9050 (check_for_out_of_scope_variable): New function.
9051 (at_class_scope_p): Likewise.
9052 (finish_fname): Likewise.
9053 * class.c (finish_struct): Use at_function_scope_p.
9054 * decl.c (check_for_out_of_scope_variable): New function, split
9055 out from do_identifier.
9056 (finish_enum): Use at_function_scope_p.
9057 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
9058 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
9059 (primary): Use at_function_scope_p.
9060 * search.c (at_class_scope_p): New function.
9061 * semantics.c (finish_fname): Likewise.
9062 (check_multiple_declarators): Use at_function_scope_p.
9063
9064 2002-06-23 Mark Mitchell <mark@codesourcery.com>
9065
9066 * parse.y (parse_scoped_id): New function.
9067 (primary): Use it.
9068 * cp-tree.h (do_scoped_id): Adjust declaration.
9069 * lex.c (do_scoped_id): Remove call to yylex.
9070 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
9071 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
9072 expanding it inline.
9073
9074 2002-06-23 Matt Thomas <matt@3am-software.com>
9075
9076 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
9077 "#if VMS_TARGET".
9078
9079 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9080
9081 * mangle.c (integer_type_codes): Const-ify.
9082
9083 2002-06-20 Richard Henderson <rth@redhat.com>
9084
9085 PR c++/6747
9086 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
9087 Call put_var_into_stack.
9088
9089 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9090
9091 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
9092 array size calculation.
9093
9094 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9095
9096 PR c++/6892
9097 * pt.c (tsubst_expr): Handle FILE_STMT.
9098
9099 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9100
9101 PR c++/6723
9102 * pt.c (lookup_template_class): Don't build complete argument of
9103 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
9104 argument.
9105
9106 2002-06-19 Akim Demaille <akim@epita.fr>
9107
9108 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
9109 decl.h's TYPENAME.
9110 * spew.c, lex.c: Adjust.
9111 * parse.y (explicit_instantiation): Add empty action to override
9112 the default $$ = $1 where it introduces a type clash.
9113
9114 2002-06-14 Jason Merrill <jason@redhat.com>
9115
9116 * semantics.c (begin_for_stmt): Push the 'for' scope before
9117 adding the FOR_STMT.
9118
9119 C++ ABI changes.
9120 * class.c (build_base_field): Set DECL_PACKED.
9121 (layout_class_type): Don't use tail padding of PODs.
9122 * mangle.c (write_unqualified_name): Fix template conversion op
9123 mangling.
9124
9125 2002-06-16 Richard Henderson <rth@redhat.com>
9126
9127 PR opt/6793
9128 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
9129 after template instantiation.
9130
9131 2002-06-16 Richard Henderson <rth@redhat.com>
9132
9133 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
9134
9135 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
9136
9137 * cp-tree.h (compiler_error): Remove declaration.
9138 * lex.c (compiler_error): Remove definition.
9139
9140 2002-06-14 Steve Ellcey <sje@cup.hp.com>
9141
9142 * g++spec.c (LIBUNWIND): New.
9143 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
9144
9145 2002-06-13 Jessica Han <jessica@cup.hp.com>
9146
9147 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
9148 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
9149 (build_vbase_offset_vtbl_entries): Likewise.
9150 * rtti.c (build_headof): Likewise.
9151 (get_tinfo_decl_dynamic): Likewise.
9152 (create_pseudo_type_info): Likewise.
9153
9154 2002-06-12 Stan Shebs <shebs@apple.com>
9155
9156 * mpw-config.in: Remove file, no longer used.
9157 * mpw-make.sed: Ditto.
9158
9159 2002-06-07 Zack Weinberg <zack@codesourcery.com>
9160
9161 * decl2.c: Update call to cpp_handle_option.
9162
9163 2002-06-07 H.J. Lu (hjl@gnu.org)
9164
9165 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
9166
9167 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
9168
9169 * error.c (cp_error_at): Fix typo.
9170
9171 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
9172
9173 * error.c (cp_diagnostic_starter): Adjust call.
9174 (maybe_print_instantiation_context): Change prototype to take a
9175 'diagnostic_info *'.
9176 (print_instantiation_full_context): Likewise.
9177 (print_instantiation_partial_context): Likewise.
9178 (cp_diagnostic_starter): Likewise.
9179 (cp_diagnostic_finalizer): Likewise.
9180 (cp_print_error_function): Likewise.
9181 (cp_printer): Take a secondary parameter as a 'text_info *'.
9182 Remove output_state savings. Adjust calls.
9183
9184 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9185
9186 * pt.c (inline_parm_levels): Mark for GC.
9187
9188 * mangle.c (start_mangling): Allocate G.substitutions here...
9189 (init_mangle): ... rather than here.
9190 (finish_mangling): Clear the varray pointer when done with it.
9191 * spew.c (yylexstring): Don't use VARRAY_FREE.
9192 * search.c (bfs_walk): Don't use VARRAY_FREE.
9193 * decl2.c (pending_statics): Use gengtype to mark.
9194 (deferred_fns): Likewise.
9195 (ssdf_decls): Likewise.
9196 (init_decl2): Delete.
9197 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
9198 (cxx_init_decl_processing): Don't call init_decl2.
9199 (cxx_pop_function_context): Don't use VARRAY_FREE.
9200 * cp-tree.h (struct saved_scope): No need for special marking
9201 of varrays.
9202 (struct language_function): Likewise.
9203 (local_classes): Use gengtype to mark.
9204 (init_decl2): Delete prototype.
9205 * class.c (init_class_processing): Don't use
9206 ggc_add_tree_varray_root.
9207 (build_vtbl_initializer): Don't use VARRAY_FREE.
9208
9209 * decl.c (typename_compare): Don't use same_type_p.
9210
9211 * decl.c: Include hashtab.h instead of hash.h.
9212 (typename_hash): Update to use htab_h.
9213 (typename_compare): Likewise.
9214 (typename_htab): Use gengtype to mark.
9215 (build_typename_type): Update to use htab_h.
9216 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9217
9218 * Make-lang.in (gt-cp-tree.h): New rule.
9219 (cp/tree.o): Depend on gt-cp-tree.h.
9220 * config-lang.in (gtfiles): Add cp/tree.c.
9221 * tree.c: Include gt-cp-tree.h.
9222 (list_hash_table): Use gengtype to mark.
9223 (init_tree): Use gengtype to mark trees.
9224
9225 * Make-lang.in (cp/decl.o): Add debug.h dependency.
9226 * call.c (struct z_candidate): Use gengtype.
9227 (USER_CONV_CAND): Use WRAPPER_ZC.
9228 (convert_class_to_reference): Use build_zc_wrapper.
9229 (build_type_conversion_1): Likewise.
9230 (build_over_call): Use WRAPPER_ZC.
9231 (add_warning): Use build_zc_wrapper.
9232 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9233 * cp-tree.h (struct lang_identifier): Use gengtype.
9234 (struct template_parm_index_s): Likewise.
9235 (struct ptrmem_cst): Likewise.
9236 (struct tree_binding): Likewise.
9237 (struct tree_overload): Likewise.
9238 (struct tree_srcloc): Likewise.
9239 (struct tree_wrapper): Likewise. Also modify to have a pointer
9240 to struct z_candidate rather than void.
9241 (enum cp_tree_node_structure_enum): New.
9242 (union lang_tree_node): New.
9243 (cxx_mark_tree): Delete prototype.
9244 (cp_tree_node_structure): New prototype.
9245 (build_ptr_wrapper): Delete prototype.
9246 (build_int_wrapper): Delete prototype.
9247 (build_zc_wrapper): New prototype.
9248 * decl.c: Include debug.h
9249 (cxx_mark_tree): Delete.
9250 (cp_tree_node_structure): New.
9251 * tree.c (build_ptr_wrapper): Delete.
9252 (build_int_wrapper): Delete.
9253 (build_zc_wrapper): New.
9254
9255 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9256 Correct typo. Patch from k_fukui@highway.ne.jp.
9257
9258 * semantics.c (current_stmt_tree): Update for change to
9259 struct language_function.
9260 (finish_mem_initializers): Likewise.
9261 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9262 * cp-tree.h (struct language_function): Rename from
9263 cp_language_function. Change all uses.
9264 (cp_function_chain): Don't need to cast.
9265
9266 * class.c (duplicate_tag_error): Reset discriminator.
9267 (check_bases_and_members): Update for data structure changes.
9268 * cp-tree.h (struct lang_id2): Use gengtype.
9269 (flagged_type_tree): Likewise.
9270 (SET_LANG_ID): Use GGC on struct lang_id2.
9271 (struct cp_language_function): Use gengtype. Remove field
9272 'x_vcalls_possible_p'.
9273 (current_vcalls_possible_p): Delete.
9274 (struct lang_type_header): New.
9275 (struct lang_type_class): Rename from struct lang_type. Include
9276 struct lang_type_header.
9277 (struct lang_type_ptrmem): New.
9278 (struct lang_type): New.
9279 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
9280 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
9281 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9282 (struct lang_decl_flags): Use gengtype. Add discriminators.
9283 (struct lang_decl): Use gengtype. Add and use discriminators.
9284 Update the macros that reference moved fields.
9285 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
9286 (SET_DECL_THUNK_P): Set discriminator too.
9287 (clear_inline_text_obstack): Delete prototype.
9288 (finish_inline_definitions): Delete prototype.
9289 (mark_pending_inlines): Delete prototype.
9290 (lang_check_failed): New prototype.
9291 * decl.c (struct named_label_use_list): Use gengtype.
9292 (struct named_label_list): Likewise.
9293 (mark_binding_level): Delete.
9294 (mark_named_label_lists): Delete.
9295 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9296 (cxx_init_decl_processing): Use generated marker routine.
9297 (begin_destructor_body): Delete dead set to
9298 current_vcalls_possible_p.
9299 (mark_lang_function): Delete.
9300 (mark_cp_function_context): Delete.
9301 (lang_mark_tree): Use generated marker routines.
9302 * decl2.c (start_objects): Set discriminator when setting
9303 GLOBAL_INIT_PRIORITY.
9304 * lex.c (retrofit_lang_decl): Set discriminators.
9305 (copy_lang_type): Update for changes to lang_type structure.
9306 (cp_make_lang_type): Set discriminator.
9307 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
9308 * search.c: Include ggc.h.
9309 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9310 (finish_inline_definitions): Delete.
9311 * spew.c (struct token): Use gengtype.
9312 (struct token_chunk): New.
9313 (struct unparsed_text): Use gengtype. Store tokens in chunks.
9314 (struct feed): Use gengtype.
9315 (feed_obstack): Delete.
9316 (feed): Mark as GC root.
9317 (pending_inlines): Mark as GC root.
9318 (pending_inlines_tail): Likewise.
9319 (processing_these_inlines): Likewise.
9320 (token_obstack): Make static.
9321 (first_token): Likewise.
9322 (init_spew): Don't initialize deleted things; use gengtype for roots.
9323 (clear_inline_text_obstack): Delete.
9324 (feed_input): Use GC for struct feed. Update for changes to
9325 struct unparsed_text.
9326 (mark_pending_inlines): Delete.
9327 (next_token): Rename from add_token. Change all callers. Update
9328 for changes to struct unparsed_text.
9329 (space_for_token): New.
9330 (remove_last_token): New.
9331 (alloc_unparsed_text): New.
9332 (snarf_block): Take an unparsed_text. Update for changes to struct
9333 unparsed_text.
9334 (snarf_method): Update for changes to struct unparsed_text.
9335 (snarf_defarg): Update for changes to struct unparsed_text.
9336 * tree.c (lang_check_failed): New.
9337
9338 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9339 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9340 (cp/spew.o): Add dependency on gt-<filename>.h.
9341 (cp/decl2.o): Add dependency on gt-<filename>.h.
9342 (cp/call.o): Add dependency on gt-<filename>.h.
9343 (cp/pt.o): Add dependency on gt-<filename>.h.
9344 (cp/repo.o): Add dependency on gt-<filename>.h.
9345 (cp/parse.o): Add dependency on gt-<filename>.h.
9346 * call.c: Use gengtype for roots.
9347 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9348 decl2.c parse.y pt.c repo.c spew.c.
9349 * cp-tree.h: Use gengtype for roots.
9350 (struct saved_scope): Use GGC, gengtype.
9351 (cp_parse_init): Delete prototype.
9352 (init_pt): Delete prototype.
9353 * decl.c: Use gengtype for roots.
9354 (mark_saved_scope): Delete.
9355 (cxx_init_decl_processing): Don't call deleted initilisation
9356 routines.
9357 (signed_size_zero_node): Delete, unused.
9358 * decl.h: Use gengtype for roots.
9359 * decl2.c: Use gengtype for roots.
9360 * lex.h: Use gengtype for roots.
9361 * parse.y: Use gengtype for roots.
9362 (cp_parse_init): Delete.
9363 * pt.c: Use gengtype for roots.
9364 (init_pt): Delete.
9365 * repo.c: Use gengtype for roots.
9366 * spew.c: Use gengtype for roots.
9367
9368 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
9369 (cp/decl.o): Add dependency on gtype-cp.h.
9370 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9371 Include gtype-cp.h. Allow for filename changes.
9372
9373 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9374 (cp/decl.o): Add cp/gt-decl.h dependency.
9375 * config-lang.in (gtfiles): New.
9376 * tree.h: Rename struct binding_level to struct cp_binding_level.
9377 * decl.c: Rename struct binding_level to struct cp_binding_level.
9378 Include cp/gt-decl.h.
9379 (struct cp_binding_level): Use gengtype.
9380 (make_binding_level): Use GGC on struct cp_binding_level.
9381 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9382 (cxx_init_decl_processing): Mark free_binding_level as
9383 deletable.
9384
9385 * decl.c (mark_cp_function_context): Update calling sequence.
9386
9387 * decl.c (start_function): Don't free 'struct
9388 cp_language_function'.
9389 (pop_cp_function_context): Likewise.
9390 (save_function_data): Allocate it using GC.
9391 * semantics.c (genrtl_start_function): Don't free 'struct
9392 cp_language_function'.
9393
9394 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
9395
9396 * lang-specs.h: Use cpp_debug_options.
9397
9398 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9399
9400 * mangle.c, tree.c: Include real.h.
9401 * Make-lang.in: Update dependency lists.
9402
9403 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
9404
9405 * lex.c: Don't include c-lex.h.
9406 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9407
9408 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
9409
9410 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9411
9412 2002-05-22 Richard Henderson <rth@redhat.com>
9413
9414 * decl.c (obscure_complex_init): Check for VAR_DECL
9415 before using DECL_THREAD_LOCAL.
9416
9417 2002-05-22 Richard Henderson <rth@redhat.com>
9418
9419 * decl.c (check_tag_decl): Handle RID_THREAD.
9420 (obscure_complex_init): Reject run-time init of tls.
9421 (grokvardecl, grokdeclarator): Handle RID_THREAD.
9422 * lex.c (reswords): Add __thread.
9423 (rid_to_yy): Map RID_THREAD to SCSPEC.
9424
9425 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
9426
9427 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9428 * cp-tree.h (cxx_post_options): Kill.
9429 * cp-lex.c (cxx_post_options): Kill.
9430
9431 2002-05-21 Richard Henderson <rth@redhat.com>
9432
9433 * lex.c (rid_to_yy): Add RID_THREAD.
9434
9435 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
9436
9437 * init.c (build_vec_init): Test for trivial copy-assignment when
9438 copy-assigning arrays.
9439
9440 2002-05-20 Andreas Jaeger <aj@suse.de>
9441
9442 * init.c (build_default_init): Remove unused variable.
9443
9444 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
9445
9446 * call.c (any_strictly_viable): New.
9447 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9448
9449 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9450
9451 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9452
9453 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9454
9455 PR c++/186, DR 259
9456 * pt.c (do_decl_instantiation): Don't complain explicit
9457 instantiation after explicit specialization.
9458 (do_type_instantiation): Likewise.
9459
9460 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
9461
9462 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9463 renamed from...
9464 (complete_type_or_else): ... this. Redefined as macro.
9465 (cxx_incomplete_type_diagnostic): Declare.
9466 (cxx_incomplete_type_error): Define as macro.
9467 * init.c (build_delete): Warn about incomplete types other than
9468 void, and use the built-in operator delete for them.
9469 * typeck.c (complete_type_or_diagnostic): Renamed from
9470 complete_type_or_else. Added warn_only argument, passed to...
9471 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
9472 warnings or errors depending on new warn_only argument. Renamed
9473 from...
9474 (cxx_incomplete_type_error): ... this. New implementation in
9475 terms of cxx_incomplete_type_diagnostic.
9476
9477 2002-05-18 Jason Merrill <jason@redhat.com>
9478
9479 PR c++/6611
9480 * decl2.c (import_export_decl): If we clear
9481 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9482
9483 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9484
9485 PR c++/6620
9486 * pt.c (verify_class_unification): Don't check if PARM is template
9487 parameter dependent. Simplify.
9488 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9489 parameter dependent expression.
9490
9491 2002-05-14 Jason Merrill <jason@redhat.com>
9492
9493 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9494 Do set DECL_COMDAT.
9495 (synthesize_tinfo_var): Take the public decl.
9496 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
9497 (emit_tinfo_decl): Adjust. Call import_export_decl.
9498 * decl2.c (import_export_decl): Simplify tinfo decl handling.
9499
9500 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
9501
9502 * cp-tree.h (struct lang_type): Added non_zero_init.
9503 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9504 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9505 * class.c (check_field_decls): Test non_zero_init.
9506 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9507 zero-to-NULL conversions.
9508 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9509 type that needs zero-initialization without zeros.
9510 (check_initializer_decl): Compute zero-initializer for types
9511 that require a non-trivial one.
9512 * init.c (build_forced_zero_init): New function.
9513 (build_default_init): Use it.
9514 * tree.c (zero_init_p): New function.
9515 * typeck2.c (force_store_init_value): New function.
9516 (process_init_constructor): Create non-trivial zero-initializers
9517 for array members and class fields.
9518
9519 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
9520
9521 * lang-specs.h: Remove redundant -lang-c++.
9522
9523 2002-05-13 Jason Merrill <jason@redhat.com>
9524
9525 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9526 (fixed_type_or_null): See through reference vars.
9527 (build_base_path): Vtable contents are constant.
9528 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9529
9530 2002-05-12 Jason Merrill <jason@redhat.com>
9531
9532 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9533 structs are safe.
9534
9535 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
9536
9537 * cp-tree.h (flag_ansi): Remove.
9538 * decl2.c (flag_ansi): Remove.
9539 (cxx_decode_option): Set flag_iso and flag_undef.
9540
9541 2002-05-09 Jason Merrill <jason@redhat.com>
9542
9543 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9544 Use subtraction rather than a bitmask to get the index.
9545 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9546
9547 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9548
9549 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
9550
9551 * Make-lang.in (decl2.o): Update.
9552 * cp-tree.h (warn_multichar): Remove.
9553 * decl2.c: Include c-common.h.
9554 (warn_multichar): Remove.
9555
9556 2002-05-03 Jason Merrill <jason@redhat.com>
9557
9558 * tree.c (build_cplus_array_type): Only const and volatile get
9559 special handling.
9560
9561 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9562
9563 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9564
9565 ABI change, returning simple classes from functions.
9566 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9567 TYPE_HAS_TRIVIAL_INIT_REF is false or
9568 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9569
9570 2002-04-30 Jason Merrill <jason@redhat.com>
9571
9572 PR debug/6436
9573 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9574 anonymous class with a typedef if there are attributes.
9575
9576 2002-04-29 Paul Eggert <eggert@twinsun.com>
9577
9578 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9579
9580 2002-04-29 Jakub Jelinek <jakub@redhat.com>
9581
9582 PR c++/6477
9583 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9584 non-NULL first.
9585
9586 2002-04-29 Mark Mitchell <mark@codesourcery.com>
9587
9588 PR c++/6492
9589 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9590 enter that scope before name lookup.
9591
9592 PR c++/6486
9593 * method.c (do_build_copy_constructor): Avoid building
9594 cv-qualified reference types.
9595
9596 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
9597
9598 PR c++/5719
9599 * decl.c (grok_op_properties): Assignment ops don't have to return
9600 by value. operator% should.
9601
9602 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
9603
9604 PR c/6343
9605 * decl.c (duplicate_decls): Call merge_weak.
9606
9607 2002-04-26 Richard Henderson <rth@redhat.com>
9608
9609 * parse.y (malloced_yyss, malloced_yyvs): New.
9610 (yyoverflow): Re-add. Set them.
9611 (free_parser_stacks): New.
9612
9613 2002-04-26 Mark Mitchell <mark@codesourcery.com>
9614
9615 PR c++/6497
9616 * method.c (do_build_assign_ref): Pass a derivation to
9617 build_method_call when calling base class assignment operators.
9618
9619 2002-04-26 Richard Henderson <rth@redhat.com>
9620
9621 * parse.y (yyoverflow): Revert.
9622
9623 2002-04-26 Richard Henderson <rth@redhat.com>
9624
9625 PR c/3581
9626 * parse.y (string): Remove. Update all uses to use STRING
9627 instead, and not call combine_strings.
9628 * rtti.c (tinfo_name): Use fix_string_type.
9629 * semantics.c (finish_asm_stmt): Don't call combine_strings.
9630 * spew.c (yylexstring): New.
9631 (read_token): Use it.
9632
9633 2002-04-25 Richard Henderson <rth@redhat.com>
9634
9635 PR c/2161
9636 * parse.y (yyoverflow): New.
9637
9638 2002-04-25 Jason Merrill <jason@redhat.com>
9639
9640 PR c++/5607
9641 * search.c (check_final_overrider): No longer static.
9642 * class.c (update_vtable_entry_for_fn): Call it.
9643 * cp-tree.h: Adjust.
9644
9645 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9646
9647 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9648 * cp-tree.h (cxx_set_yydebug): Die.
9649 * lex.c (YYDEBUG): Get from c-lex.h.
9650 (cxx_set_yydebug): Remove.
9651 * parse.y: Include c-lex.h.
9652 (YYDEBUG): Get from c-lex.h.
9653
9654 2002-04-24 Mark Mitchell <mark@codesourcery.com>
9655
9656 PR c++/6438.
9657 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9658 void.
9659
9660 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
9661
9662 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9663 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9664 Redefine.
9665 * cp-tree.h (cp_attribute_table): Rename.
9666 * decl.c (lang_attribute_table): Remove declaration.
9667 (cxx_init_decl_processing): Don't set it.
9668 * tree.c (cp_attribute_table): Rename.
9669
9670 2002-04-24 Jason Merrill <jason@redhat.com>
9671
9672 PR c++/6331
9673 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9674 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9675 The pedwarn for array assignment is now unconditional.
9676 * tree.c (build_cplus_array_type_1): Still process simple array types
9677 normally in templates.
9678
9679 PR c++/6395
9680 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9681 stuff for comdats.
9682
9683 2002-04-23 Jakub Jelinek <jakub@redhat.com>
9684
9685 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9686 node with attributes.
9687
9688 2002-2-23 David O'Brien <obrien@FreeBSD.org>
9689
9690 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9691 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9692
9693 2002-04-23 Mark Mitchell <mark@codesourcery.com>
9694
9695 PR c++/6256:
9696 * pt.c (tsubst_friend_class): Handle templates with explicit
9697 nested names.
9698
9699 PR c++/6331:
9700 * typeck.c (merge_types): Remember the cv-qualification of pointer
9701 types when merging them.
9702
9703 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
9704
9705 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9706 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9707 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9708 cxx_mark_function_context): New.
9709 * decl.c (push_cp_function_context, pop_cp_function_context,
9710 mark_cp_function_context): Rename for consistency.
9711 (cxx_init_decl_processing): Don't set old hooks.
9712
9713 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
9714
9715 * call.c (convert_type_from_ellipsis): Rename, update.
9716 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9717 * cp-tree.h (convert_type_from_ellipsis): Rename.
9718 * decl.c (cxx_init_decl_processing): Don't set hook.
9719
9720 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9721
9722 * call.c (build_new_method_call): Update.
9723 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9724 * cp-tree.h (cxx_incomplete_type_error): New.
9725 * decl.c (grokdeclarator, grokparms): Update.
9726 * decl2.c (check_classfn): Update.
9727 * pt.c (tsubst): Update.
9728 * typeck.c (complete_type_or_else, expr_sizeof,
9729 decay_conversion): Update.
9730 * typeck2.c (incomplete_type_error): Rename.
9731 (add_exception_specifier): Update.
9732
9733 2002-04-18 Jason Merrill <jason@redhat.com>
9734
9735 PR c++/5658
9736 * search.c (setup_class_bindings): A class template qualifies as a
9737 type binding.
9738
9739 2002-04-17 Jakub Jelinek <jakub@redhat.com>
9740
9741 PR c++/6316
9742 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9743 before expanding.
9744
9745 2002-04-16 Mark Mitchell <mark@codesourcery.com>
9746
9747 * init.c (begin_init_stmts): Remove commented out code.
9748 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9749 * semantics.c (begin_gobal_stmt_expr): Adjust call to
9750 expand_start_stmt_expr.
9751
9752 2002-04-15 Mark Mitchell <mark@codesourcery.com>
9753
9754 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9755 dso_handle itself, to __cxa_atexit.
9756
9757 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9758
9759 * error.c (cxx_print_error_function): Adjust call to macros.
9760
9761 2002-04-14 Jakub Jelinek <jakub@redhat.com>
9762
9763 * class.c (layout_virtual_bases): Do all dsize computation on trees.
9764
9765 2002-04-14 Jason Merrill <jason@redhat.com>
9766
9767 * typeck.c (get_member_function_from_ptrfunc): Don't do
9768 gratuitious division and multiplication on
9769 ptrmemfunc_vbit_in_delta targets.
9770
9771 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9772
9773 PR c++/5373.
9774 * semantics.c (finish_expr_stmt): Remember the type of the
9775 expression before any conversions are performed.
9776
9777 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9778
9779 PR c++/5189.
9780 * call.c (add_template_candidate_real): Do not treat member
9781 templates as copy constructors.
9782
9783 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9784
9785 * decl.c (duplicate_decls): Do not copy the RTL for a variable
9786 declaration if the old variable had an incomplete type and the new
9787 variable does not.
9788 (complete_vars): Do not call layout_decl for completed variables.
9789
9790 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
9791
9792 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9793 with an explicit one.
9794 (follow_tag_typedef): New.
9795 (lookup_tag): Use it to extract the tag of an explicit typedef.
9796 (xref_tag): Likewise.
9797
9798 2002-04-11 Andrew Haley <aph@redhat.com>
9799
9800 * typeck.c (type_after_usual_arithmetic_conversions):
9801 If two types have the same variant, return immediately.
9802 When two floating-point operands are the same precision:
9803 convert to float if one of the operands is float;
9804 if neither operand is one of the standard types, return the type
9805 of the first operand.
9806
9807 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
9808
9809 PR c++/5507
9810 * decl.c (make_typename_type): Remove implicit typenameness.
9811
9812 2002-04-09 Jason Merrill <jason@redhat.com>
9813
9814 PR optimization/6189
9815 * semantics.c (genrtl_start_function): Don't free
9816 DECL_SAVED_FUNCTION_DATA for inline functions.
9817
9818 * init.c (build_member_call): For now, don't convert to
9819 intermediate base if it would cause an error.
9820
9821 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
9822
9823 * parse.y (namespace_qualifier, maybe_identifier,
9824 begin_explicit_instantiation, end_explicit_instantiation,
9825 apparent_template_type, .finish_template_type,
9826 do_id, maybe_init, defarg_again, component_decl_1):
9827 Add ending ';', in accordance with POSIX.
9828
9829 2002-04-06 Mark Mitchell <mark@codesourcery.com>
9830
9831 PR c++/5571
9832 * class.c (layout_class_type): Remember incomplete static
9833 variables.
9834 (finish_struct_1): Call complete_vars, not
9835 hack_incomplete_structures.
9836 * cp-tree.h (hack_incomplete_structures): Rename to ...
9837 (complete_vars): ... this.
9838 (struct saved_scope): Remove incomplete.
9839 (namespace_scope_incomplete): Remove.
9840 * decl.c (struct binding_level): Remove incomplete.
9841 (incomplete_vars): New variable.
9842 (mark_binding_level): Don't mark incomplete.
9843 (print_binding_level): Don't print it.
9844 (mark_saved_scope): Don't mark incomplete.
9845 (pushdecl): Use maybe_register_incopmlete_var.
9846 (cxx_init_decl_processing): Register incomplete_vars for GC.
9847 (start_decl_1): Clarify error message.
9848 (hack_incomplete_vars): Remove.
9849 (maybe_register_incomplete_var): New function.
9850 (complete_vars): Likewise.
9851
9852 2002-04-06 Jason Merrill <jason@redhat.com>
9853
9854 PR c++/4934
9855 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9856 set before checking it.
9857
9858 PR c++/525
9859 * init.c (build_member_call): Use build_scoped_ref.
9860 (resolve_offset_ref): Likewise.
9861 * call.c (build_scoped_method_call): Likewise.
9862 * tree.c (maybe_dummy_object): Kludge around current_class_type being
9863 wrong.
9864 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9865 * cp-tree.h: Adjust.
9866
9867 * init.c (push_base_cleanups): Just use build_scoped_method_call.
9868
9869 PR c++/6179
9870 * method.c (implicitly_declare_fn): Pass unqualified type to
9871 synthesize_exception_spec.
9872
9873 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9874
9875 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9876 * cvt.c: Update comment.
9877 * init.c (expand_cleanup_for_base): Update.
9878 * semantics.c (finish_parenthesized_expr): Update.
9879 * typeck.c (cp_truthvalue_conversion): Update.
9880
9881 2002-04-04 Jason Merrill <jason@redhat.com>
9882
9883 * semantics.c (finish_eh_cleanup): New fn.
9884 * cp-tree.h: Add prototype.
9885 * init.c (perform_member_init, expand_cleanup_for_base): Use
9886 finish_eh_cleanup.
9887 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9888 * cp-tree.h: Remove references.
9889 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9890 * dump.c (cp_dump_tree): Likewise.
9891 * pt.c (tsubst_expr): Likewise.
9892 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9893 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9894 * tree.c (cp_statement_code_p): Likewise.
9895
9896 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9897
9898 PR c++/5636
9899 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9900 cleanup for nrv.
9901
9902 PR c++/5104
9903 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9904 specifiers.
9905 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9906
9907 2002-04-03 Richard Henderson <rth@redhat.com>
9908
9909 * cp-lang.c (cxx_warn_unused_global_decl): New.
9910 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9911
9912 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
9913
9914 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9915 * tree.c (init_tree): Don't set hook.
9916
9917 2002-04-03 Roger Sayle <roger@eyesopen.com>
9918
9919 PR c++/5998:
9920 * decl.c (duplicate_decls): Don't mess with assembler names when
9921 redeclaring builtin functions as static.
9922
9923 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9924
9925 * call.c (build_addr_func): Update.
9926 * class.c (resolve_address_of_overloaded_function): Update.
9927 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9928 * cp-tree.h (cxx_mark_addressable): New.
9929 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9930 * decl2.c (build_cleanup): Update.
9931 * except.c (build_throw): Update.
9932 * init.c (resolve_offset_ref): Update.
9933 * pt.c (convert_nontype_argument): Update.
9934 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9935 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9936 unary_complex_lvalue): Update.
9937 (mark_addressable): Rename.
9938
9939 2002-04-01 Roger Sayle <roger@eyesopen.com>
9940
9941 PR c++/5998:
9942 * decl.c (duplicate_decls): Overwrite the RTL when (and only
9943 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
9944 but follow the SET_DECL_RTL idiom used elsewhere in the function.
9945
9946 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9947
9948 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9949 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9950 * decl.c (grokdeclarator): Update.
9951 * mangle.c (write_integer_cst): Update.
9952 * typeck.c (build_binary_op): Update.
9953
9954 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9955
9956 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9957 * lex.c (cxx_init): Don't set hook.
9958
9959 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9960
9961 * Make-lang.in (error.o): Update.
9962 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9963 * cp-tree.h (struct diagnostic_context): Predeclare.
9964 (cxx_print_error_function): New.
9965 * error.c: Include langhooks-def.h.
9966 (lang_print_error_function): Rename. Update.
9967 (init_error): Don't set hook.
9968
9969 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9970
9971 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9972 Redefine.
9973 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9974 * decl.c (finish_enum): Similarly.
9975 * error.c (dump_type): Similarly.
9976 * lex.c (cxx_init): Similarly.
9977 * mangle.c (write_builtin_type): Similarly.
9978 * typeck.c (comptypes): Similarly.
9979
9980 2002-03-28 Roger Sayle <roger@eyesopen.com>
9981
9982 PR c++/5998:
9983 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9984 in the g++ front-end.
9985 (duplicate_decl): Allow redefinition of anticipated built-ins.
9986 Fix inlining problem by over-writing the old DECL_RTL.
9987 (lookup_namespace_name): Fail to find an identifier in the
9988 specified namespace if its still anticipated.
9989 (builtin_function_1): New function split out from builtin_function
9990 to create a builtin in the current namespace with given context.
9991 (builtin_function): Call builtin_function_1 to define the
9992 appropriate builtins in both the std and global namespaces.
9993 (select_decl): Don't test for anticipated decls here.
9994 (unqualified_namespace_lookup): Instead ignore them whilst
9995 searching through scopes and namespaces.
9996 * decl2.c (do_nonmember_using_decl): If a using declaration
9997 specifies an anticipated built-in function, mark it as no longer
9998 anticipated in that scope.
9999 (ambiguous_decl): Avoid resolving to an anticipated decl.
10000 * lex.c (do_scoped_id): Fail to find an identifier in the global
10001 namespace if its still anticipated.
10002
10003 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
10004
10005 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
10006 * cp-tree.h (cp_make_lang_type): Rename.
10007 * lex.c (cp_make_lang_type): Rename.
10008 (make_aggr_type): Update.
10009 * tree.c (init_tree): Don't set make_lang_type_fn.
10010
10011 2002-03-29 Jakub Jelinek <jakub@redhat.com>
10012
10013 PR c++/6073
10014 * class.c (finish_struct_1): Update static field's DECL_MODE even
10015 if its type is a variant of t.
10016
10017 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
10018
10019 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
10020 * cp-tree.h (cxx_insert_default_attributes): New.
10021 * decl.c (insert_default_attributes): Rename.
10022
10023 2002-03-27 Mark Mitchell <mark@codesourcery.com>
10024
10025 PR c++/4884
10026 * call.c (build_op_delete_call): Allow for the fact the placement
10027 may be a COMPOUND_EXPR.
10028
10029 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
10030
10031 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
10032 * cp-tree.h (init_cplus_expand): Remove.
10033 (cxx_expand_expr): New.
10034 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
10035 fix prototype.
10036 (init_cplus_expand): Remove.
10037 * lex.c (cxx_init): Don't call init_cplus_expand.
10038
10039 2002-03-26 Mark Mitchell <mark@codesourcery.com>
10040
10041 PR c++/4884.
10042 * init.c (build_new_1): Allow for the fact the result of
10043 build_function_call may be a COMPOUND_EXPR.
10044
10045 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
10046
10047 PR c++/5682
10048 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
10049 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
10050 (dfs_skip_nonprimary_vbases_markedp): Remove.
10051 * search.c (get_shared_vbase_if_not_primary): Remove.
10052 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
10053 (dfs_skip_nonprimary_vbases_markedp): Remove.
10054 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
10055 (dfs_marked_real_bases_queue_p): Likewise.
10056
10057 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
10058
10059 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
10060 * cp-tree.h (cxx_mark_tree): New.
10061 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
10062
10063 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
10064
10065 * cp-tree.h (cxx_maybe_build_cleanup): New.
10066 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
10067 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
10068 * tree.c (build_target_expr): Update.
10069 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
10070
10071 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
10072
10073 * decl2.c (cxx_decode_option): Handle -E.
10074 * lang-specs.h (default_compilers): Preprocess with cc1plus.
10075 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
10076
10077 2002-03-23 Jakub Jelinek <jakub@redhat.com>
10078
10079 PR c++/6037
10080 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
10081
10082 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10083
10084 * error.c (dump_type): Be careful about implicit typenames.
10085
10086 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10087
10088 PR C++/3656
10089 * semantics.c (finish_base_specifier): Handle erronous base
10090 classes.
10091
10092 2002-03-22 Zack Weinberg <zack@codesourcery.com>
10093
10094 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
10095 REAL_IS_NOT_DOUBLE.
10096
10097 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
10098
10099 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
10100 an index into the vtable_entry array regardless of
10101 TARGET_PTRMEMFUNC_VBIT_LOCATION.
10102
10103 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
10104
10105 * tree.c (cp_cannot_inline_tree_fn): Same.
10106
10107 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
10108
10109 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
10110 insert_block, getdecls, global_bindings_p): New.
10111
10112 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
10113
10114 PR c++/4361
10115 * mangle.c (struct globals) Add internal_mangling_p member.
10116 (write_template_param): Do internal mangling, if needed.
10117 (mangle_conv_op_name_for_type): Request internal mangling.
10118
10119 2002-03-20 Jason Merrill <jason@redhat.com>
10120
10121 PR c++/2136
10122 * init.c (build_delete): Check access for a member op delete here.
10123 * decl2.c (delete_sanity): Not here.
10124
10125 2002-03-19 Jason Merrill <jason@redhat.com>
10126
10127 PR c++/5118
10128 * class.c (get_vfield_name): Use the constructor_name.
10129
10130 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
10131
10132 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
10133 * cp-tree.h (lang_printable_name): Rename.
10134 * error.c (lang_decl_name): Use new hook.
10135 * lex.c (cxx_init): Remove old hook.
10136 * pt.c (tsubst_decl): Use new hook.
10137 * tree.c (lang_printable_name): Rename.
10138
10139 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
10140
10141 PR c++/3882
10142 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
10143 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
10144 only after recording the declaration.
10145
10146 2002-03-18 Jason Merrill <jason@redhat.com>
10147
10148 PR c++/2039
10149 * init.c (resolve_offset_ref): Hand off to build_component_ref.
10150
10151 PR c++/4222, c++/5995
10152 * call.c (build_over_call): Fix empty class logic.
10153
10154 PR c++/3870
10155 * cp-tree.h (struct saved_scope): Add last_parms field.
10156 * decl.c (maybe_push_to_top_level): Save last_function_parms.
10157 (pop_from_top_level): Restore it.
10158
10159 PR c++/4377
10160 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
10161 NON_LVALUE_EXPRs.
10162
10163 PR c++/4003
10164 * pt.c (tsubst_friend_function): Use decl_namespace_context.
10165
10166 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
10167 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
10168 type with a nontrivial destructor.
10169
10170 2002-03-17 Jason Merrill <jason@redhat.com>
10171
10172 PR c++/4460
10173 * class.c (build_base_path): Virtual base layout is fixed in
10174 in-charge [cd]tors.
10175
10176 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
10177
10178 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
10179 * parse.y (yyparse): Remove macro.
10180
10181 2002-03-17 Jason Merrill <jason@redhat.com>
10182
10183 PR c++/5757
10184 * init.c (build_new_1): Pass the right pointer to op delete.
10185
10186 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
10187
10188 PR c++/4361
10189 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
10190 conversion operators go.
10191 (struct lang_decl_flags): Add template_conv_p and unused
10192 bitfields.
10193 (DECL_TEMPLATE_CONV_FN_P): New macro.
10194 * call.c (build_user_type_conversion_1): Don't check second type
10195 conversion of overload set first.
10196 * class.c (add_method): Make sure templated conversion operators
10197 all end up on slot 2.
10198 * lex.c (do_identifier): A conversion operator token might be
10199 satisfied by a templated conversion operator.
10200 * pt.c (check_explicit_specialization): Use
10201 CLASSTYPE_FIRST_CONVERSION_SLOT.
10202 (template_parm_this_level_p): New function.
10203 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
10204 * search.c (lookup_fnfields_1): Template conversions will be on
10205 the first slot.
10206 * typeck.c (build_component_ref): Preserve the type of an
10207 conversion operator name on the overload type.
10208 (build_x_function_call): Retrieve the conversion operator name.
10209
10210 2002-03-15 Richard Henderson <rth@redhat.com>
10211
10212 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10213
10214 2002-03-15 Mark Mitchell <mark@codesourcery.com>
10215
10216 * cp-tree.h (CLEANUP_DECL): Remove.
10217 (CLEANUP_EXPR): Likewise.
10218 * decl.c (destroy_local_var): Simplify.
10219 (maybe_build_cleanup): Tidy.
10220 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10221 * semantics.c (cp_expand_stmt): Likewise.
10222 * cp/tree.c (cp_statement_code_p): Likewise.
10223
10224 2002-03-15 Jason Merrill <jason@redhat.com>
10225
10226 PR c++/5857
10227 * decl.c (duplicate_decls): Use merge_types instead of common_type.
10228 * typeck.c (common_type): Just hand off to
10229 type_after_usual_arithmetic_conversions and
10230 composite_pointer_type.
10231 (merge_types): New fn.
10232 (commonparms): Use it instead of common_type.
10233 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10234 (composite_pointer_type): Also handle attributes.
10235 * cp-tree.h: Declare merge_types.
10236
10237 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10238 variables.
10239 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10240
10241 2002-03-14 Richard Henderson <rth@redhat.com>
10242
10243 * decl.c: Include c-pragma.h.
10244 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10245 * Make-lang.in: Update dependencies.
10246
10247 2002-03-14 Jakub Jelinek <jakub@redhat.com>
10248
10249 PR c++/5908
10250 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10251 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10252
10253 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10254
10255 * mangle.c (write_builtin_type): Handle 128-bit integers even if
10256 they are not a standard integer type.
10257
10258 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10259
10260 * cp-tree.h (init_init_processing): Remove declaration.
10261 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10262 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10263
10264 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10265
10266 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10267 Define.
10268 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10269 tree_code_length.
10270 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10271 cplus_tree_code_name): Delete.
10272 (cxx_init): Don't call add_c_tree_codes, instead set
10273 lang_unsafe_for_reeval. Don't try to copy into the various
10274 tree_code arrays.
10275
10276 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
10277
10278 PR c++/5659
10279 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10280 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10281 definitions.
10282
10283 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10284
10285 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
10286 DR209 is now not a defect.
10287 * cp-tree.h (skip_type_access_control): Remove.
10288 * decl.c (grokdeclarator): Do type access control for friend
10289 declarations.
10290 * semantics.c (decl_type_access_control): Don't reset
10291 current_type_lookups.
10292 (save_type_access_control): Always save the lookups.
10293 (skip_type_access_control): Remove.
10294 (finish_class_definition): Don't change type_lookups.
10295
10296 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10297
10298 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
10299 It is incorrect.
10300 * typeck.c (build_static_cast): Compare non-qualified types
10301 with pointer to member conversions.
10302
10303 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
10304 Daniel Berlin <dan@dberlin.org>
10305
10306 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10307 (cxx_get_alias_set): Use it.
10308
10309 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10310
10311 * cp-tree.h (stabilize_expr): Prototype.
10312
10313 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
10314
10315 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10316 conditional return void.
10317
10318 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
10319
10320 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10321 * cp-tree.h (cxx_unsave): New.
10322 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10323 (init_tree): Update.
10324
10325 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10326
10327 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10328 explicit sizeof/sizeof.
10329 * decl2.c (cxx_decode_option): Likewise.
10330 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10331
10332 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
10333
10334 PR c++/775
10335 * decl.c (lookup_tag): Only reject enum/class mismatch, not
10336 class/union mismatch.
10337 * parse.y (check_class_key): New function.
10338 (structsp): Call it.
10339
10340 2002-03-01 Michael Matz <matz@suse.de>
10341
10342 * typeck.c (cp_pointer_int_sum): Complete inner type which is
10343 used later by size_in_bytes().
10344
10345 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
10346
10347 * cp-tree.h: Require __GNUC__ to be #defined.
10348 (build_init): Add missing prototype.
10349
10350 2002-03-01 Jason Merrill <jason@redhat.com>
10351
10352 * except.c: Don't include decl.h or obstack.h. Do include
10353 tree-inline.h.
10354 (build_throw): Destroy temporaries from the thrown
10355 expression before calling __cxa_throw. Construct a thrown
10356 temporary directly into the exception object.
10357 (stabilize_throw_expr): New function.
10358 (wrap_cleanups_r): New function.
10359 * tree.c (stabilize_expr): New function.
10360 * init.c (build_init): New function.
10361 * Make-lang.in (cp/except.o): Adjust .h deps.
10362
10363 2002-02-28 Jason Merrill <jason@redhat.com>
10364
10365 * search.c (lookup_base_r): Don't clear is_non_public just because
10366 we found a friendly scope.
10367
10368 * decl.c (finish_function): Only warn about missing return
10369 statement with -Wreturn-type.
10370
10371 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
10372
10373 * class.c (build_clone): Update.
10374 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10375 * cp-tree.h (cxx_dup_lang_specific_decl): New.
10376 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10377 (copy_decl): Update.
10378 * method.c (make_thunk): Update.
10379
10380 2002-02-27 Zack Weinberg <zack@codesourcery.com>
10381
10382 * decl2.c: Delete traditional-mode-related code copied from
10383 the C front end but not used, or used only to permit the
10384 compiler to link.
10385
10386 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
10387
10388 PR c++/4093
10389 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10390 to void.
10391
10392 2002-02-22 Jakub Jelinek <jakub@redhat.com>
10393
10394 PR other/5746
10395 * semantics.c (finish_switch_cond): Don't call get_unwidened
10396 if error_mark_node.
10397
10398 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
10399
10400 PR c++/2645, DR 295
10401 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10402 tf_keep_type_decl.
10403 (make_typename_type): Use tsubst_flags_t.
10404 * decl.c (make_typename_type): Adjust. Return non-artificial
10405 TYPE_DECLs, if required.
10406 (grokdeclarator): Simplify CVR qualification handling. Allow bad
10407 qualifiers on typedef types.
10408 * decl2.c (handle_class_head): Adjust make_typename_type call.
10409 * parse.y (nested_name_specifier): Likewise.
10410 (typename_sub0): Likewise.
10411 (typename_sub1): Likewise.
10412 * pt.c (convert_template_argument): Adjust make_typename_type
10413 return value.
10414 (tsubst): Adjust cp_build_qualified_type_real calls.
10415 (check_cv_quals_for_unify): Cope with allowing bad qualifications
10416 on template type parms.
10417 (instantiate_decl): Recheck substitutions to give warnings on bad
10418 qualifications.
10419 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10420
10421 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
10422
10423 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10424
10425 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10426 unless DECL_ALWAYS_INLINE.
10427
10428 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10429
10430 * typeck.c (cp_pointer_int_sum): Renamed from
10431 pointer_int_sum, call pointer_int_sum.
10432
10433 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10434
10435 * decl.c (duplicate_decls): Return 0 if issued error about
10436 redeclaration.
10437
10438 2002-02-19 Jason Merrill <jason@redhat.com>
10439
10440 ABI change: Mangle `void (A::*)() const' as
10441 M1AKFvvE, not MK1AFvvE.
10442 * mangle.c (write_function_type): Write cv-quals for member
10443 function type here.
10444 (write_pointer_to_member_type): Not here.
10445
10446 2002-02-18 Jason Merrill <jason@redhat.com>
10447
10448 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10449 (do_decl_instantiation): Likewise.
10450
10451 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
10452
10453 PR c++/5685
10454 * decl.c (duplicate_decls): Make warning unconditional
10455 if duplicate default argument declarations are present.
10456
10457 2002-02-17 Jakub Jelinek <jakub@redhat.com>
10458
10459 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10460 shortening.
10461
10462 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
10463
10464 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10465 remove incorrect comment. Move #if 0'd code to common path. Use
10466 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10467
10468 2002-02-13 Jason Merrill <jason@redhat.com>
10469
10470 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10471 (finish_function): Don't warn if current_function_returns_null.
10472
10473 * typeck2.c (digest_init): Do handle values of vector type.
10474
10475 * typeck2.c (digest_init, process_init_constructor): Treat vectors
10476 like arrays.
10477
10478 2002-02-11 Jason Merrill <jason@redhat.com>
10479
10480 * parse.y (reserved_declspecs): Don't handle attributes.
10481 (reserved_typespecquals): Handle them here.
10482 * Make-lang.in (parse.c): Adjust expected conflicts.
10483
10484 2002-02-08 Jakub Jelinek <jakub@redhat.com>
10485
10486 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10487 instead of compstmt.
10488 (compstmt_or_stmtexpr): Renamed from compstmt.
10489 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10490
10491 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10492
10493 Rename instantiate_type_flags to tsubst_flags_t & expand use.
10494 * cp-tree.h (instantiate_type_flags): Rename to ...
10495 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10496 add tf_warning flag.
10497 (instantiate_type): Adjust prototype.
10498 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10499 do_type_instantiation, cp_build_qualified_type_real): Likewise.
10500 cp_build_qualified_type: Adjust.
10501 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10502 tf_*.
10503 * call.c (standard_conversion): Rename itf_* to tf_*.
10504 (reference_binding): Likewise.
10505 (convert_like_real): Likewise.
10506 * cvt.c (cp_convert_to_pointer): Likewise.
10507 (convert_to_reference): Likewise.
10508 * decl.c (lookup_namespace_name): Use tf_* flags.
10509 (make_typename_type): Likewise.
10510 (grokdeclarator): Likewise.
10511 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10512 (coerce_template_template_parms, convert_template_argument,
10513 coerce_template_parms, maybe_get_template_decl_from_type_decl,
10514 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10515 instantiate_class_template, tsubst_template_arg_vector,
10516 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10517 tsubst_decl, tsubst_arg_types, tsubst_function_type,
10518 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10519 instantiate_template, fn_type_unification,
10520 resolve_overloaded_unification, verify_class_unification,
10521 unify, get_bindings_real, do_type_instantiation,
10522 regenerate_decl_from_template, instantiate_decl,
10523 tsubst_initializer_list, tsubst_enum,
10524 get_mostly_instantiated_function_type,
10525 invalid_nontype_parm_type_p): Likewise.
10526 * tree.c (cp_build_qualified_type_real): Likewise.
10527 * typeck.c (build_binary_op): Rename itf_* to tf_*.
10528 (build_ptrmemfunc): Likewise.
10529 (convert_for_assignment): Likewise.
10530
10531 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10532
10533 PR c++/109
10534 * decl.c (grokdeclarator): Allow friend declarations from
10535 dependent types.
10536 * decl2.c (handle_class_head): Don't push into template parm contexts.
10537 * pt.c (push_template_decl_real): Template parm contexts are never
10538 being defined.
10539
10540 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
10541
10542 * class.c: Include target.h.
10543 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10544 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10545 bit-field layout.
10546 * Make-lang.in: Adjust deps.
10547
10548 2002-02-05 Jason Merrill <jason@redhat.com>
10549
10550 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10551
10552 2002-02-04 Jakub Jelinek <jakub@redhat.com>
10553
10554 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10555 (finish_switch_cond): Set SWITCH_TYPE.
10556
10557 2002-02-04 Richard Henderson <rth@redhat.com>
10558
10559 * method.c (use_thunk): Always initialize the block tree. Reindent.
10560 * semantics.c (expand_body): Emit thunks after function, not before.
10561
10562 2002-02-04 Jason Merrill <jason@redhat.com>
10563
10564 * decl.c (start_function): Call cplus_decl_attributes immediately
10565 after grokdeclarator.
10566
10567 * decl.c (start_function): Combine DECL_RESULT handling code.
10568
10569 2002-02-03 Jason Merrill <jason@redhat.com>
10570
10571 * xref.c: Remove.
10572 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10573 (cp/xref.o): Remove dependencies.
10574 * class.c (finish_struct_1, check_methods): Don't call xref fns.
10575 (finish_struct_1): Likewise.
10576 * friend.c (make_friend_class): Likewise.
10577 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10578 * spew.c (read_process_identifier): Likewise.
10579
10580 2002-02-01 Jason Merrill <jason@redhat.com>
10581
10582 PR c++/4872
10583 * decl.c (finish_function): Warn about a non-void function with
10584 no return statement and no abnormal exit.
10585 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10586 (current_function_returns_abnormally): New macro.
10587 * call.c (build_call): Set it.
10588
10589 * typeck.c (build_component_ref): Always complain about offsetof
10590 constructs on non-PODs. Only make it an error for members of
10591 virtual bases.
10592
10593 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10594 (dump_function_decl): Always dump parms.
10595
10596 * decl2.c (finish_static_data_member_decl): Complain about a local
10597 class with a static data member.
10598
10599 PR c++/4286
10600 * search.c (lookup_field_1): Don't xref a static data member
10601 just because we looked it up.
10602
10603 2002-01-31 Jason Merrill <jason@redhat.com>
10604
10605 * Make-lang.in (parse.c): Handle .output file.
10606
10607 PR c++/3395
10608 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10609 not TREE_TYPE.
10610 * semantics.c (finish_class_definition): Adjust.
10611
10612 Allow attributes in parms and casts.
10613 * parse.y (named_parm): Don't strip attrs.
10614 (declmods): Remove 'attributes' production.
10615 (nonempty_cv_qualifiers): Accept attributes.
10616 (ATTRIBUTE): Give precedence.
10617 * decl.c (groktypename): Handle attributes.
10618 (grokparms): Likewise.
10619
10620 2002-01-29 Jakub Jelinek <jakub@redhat.com>
10621
10622 * decl2.c (cxx_decode_option): Pass 0 as last argument to
10623 cpp_handle_option.
10624 * lang-specs.h: Use cpp_unique_options instead of cpp_options
10625 when used together with cc1_options.
10626
10627 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
10628
10629 PR c++/5132
10630 * typeck2.c (digest_init): Make sure non-array core type is
10631 instantiated.
10632 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10633 constructor, rather than build a new one.
10634 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10635 PURPOSE of constructor elts.
10636
10637 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10638
10639 * Make-lang.in (parse.c): Adjust expected number of
10640 shift-reduce conflicts.
10641 (decl.o): Depend on diagnostic.h.
10642 * decl.c: Include diagnostic.h.
10643 (grokdeclarator): Check for null pointer.
10644 (finish_function): Don't abort when
10645 current_binding_level->parm_flag != 1, if errors have
10646 occurred; throw away the statement tree and extra binding
10647 levels, and continue.
10648 * lex.c (note_list_got_semicolon): Check for null pointer.
10649 * method.c (hack_identifier): Just return error_mark_node if
10650 value is error_mark_node.
10651 * parse.y (primary: TYPEID(type_id)): No need to use
10652 TYPE_MAIN_VARIANT here.
10653 (handler_seq): Accept an empty list of catch clauses and
10654 generate a fake handler block to avoid later crashes.
10655 (ansi_raise_identifier): Accept the error token too.
10656 * semantics.c (begin_class_definition,
10657 finish_class_definition): Check for error_mark_node.
10658
10659 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10660
10661 * typeck2.c (friendly_abort): Delete definition.
10662 * cp-tree.h (friendly_abort): Don't prototype.
10663 (my_friendly_assert): Use fancy_abort.
10664
10665 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10666
10667 * cp-tree.h (my_friendly_abort): Remove.
10668
10669 2002-01-23 Jakub Jelinek <jakub@redhat.com>
10670
10671 * spew.c (pending_inlines, pending_inlines_tail,
10672 processing_these_inlines): Make static.
10673 (mark_pending_inlines): Remove static.
10674 (begin_parsing_inclass_inline): If in function, save pi
10675 for GC to cp_function_chain->unparsed_inlines instead.
10676 (process_next_inline): Likewise.
10677 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10678 (mark_pending_inlines): Add prototype.
10679 * decl.c (spew_debug): Remove unused extern.
10680 (mark_lang_function): Call mark_pending_inlines.
10681
10682 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10683
10684 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10685 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10686 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10687 Change my_fancy_abort() to abort().
10688
10689 2002-01-23 Jason Merrill <jason@redhat.com>
10690
10691 PR c++/5453
10692 * class.c (fixed_type_or_null): Fix thinko.
10693
10694 PR c++/3331
10695 * init.c (resolve_offset_ref): Use build_indirect_ref.
10696
10697 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10698
10699 2002-01-22 Jason Merrill <jason@redhat.com>
10700
10701 * parse.y (function_body): Suppress the block for the outermost
10702 curly braces.
10703 * decl.c (pushdecl): Don't try to skip it.
10704 (begin_function_body): Keep the block we create, not the next one.
10705 * init.c (emit_base_init): Don't mess with keep_next_level.
10706
10707 * class.c (build_base_path): Tweak formatting.
10708
10709 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
10710
10711 Fix regression introduced with patch for c++/775
10712 * parse.y (class_head_defn): Check for template specializations
10713 with a different class-key.
10714
10715 2002-01-17 Jason Merrill <jason@redhat.com>
10716
10717 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10718 (begin_function_body): Call them and keep_next_level.
10719 * init.c (emit_base_init): Call keep_next_level.
10720 * semantics.c (setup_vtbl_ptr): Lose.
10721 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10722 (vtbls_set_up_p): Lose.
10723 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10724 * method.c (do_build_copy_constructor): Likewise.
10725 (synthesize_method): Call finish_mem_initializers.
10726 * parse.y (nodecls): Likewise.
10727
10728 * error.c (dump_type_suffix): Print the exception specs before
10729 recursing.
10730 (dump_function_decl): Here, too.
10731
10732 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10733
10734 2002-01-10 Ira Ruben <ira@apple.com>
10735
10736 PR c++/907
10737 * decl.c (start_method): Handle attrlist.
10738
10739 2002-01-10 Jakub Jelinek <jakub@redhat.com>
10740
10741 * decl2.c (max_tinst_depth): Increase default limit to 500.
10742
10743 2002-01-10 Graham Stott <grahams@redhat.com>
10744
10745 * spew.c (YYCHAR): Uppercase macro parameter and add
10746 parenthesis.
10747 (YYCODE): Likewise.
10748 (NAME): Uppercase macro parameter.
10749
10750 2002-01-09 Graham Stott <grahams@redhat.com>
10751
10752 * decl.h (grokdeclarator): Wrap long line.
10753
10754 * semantics.c (FINISH_COND): Uppercase macro paramaters and
10755 add parenthesis.
10756
10757 2002-01-08 Graham Stott <grahams@redhat.com>
10758
10759 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10760 (PALLOC): Uppercase macro parameter and whitespace.
10761 (SALLOC): Uppercase macro parameter.
10762 (SFREE): Uppercase macros parameter, add parenthese and
10763 whitespace.
10764 (STREQL): Uppercase macro parameter and whitespace.
10765 (STRNEQ): Likewise.
10766 (STRLSS): Likewise.
10767 (STRLEQ): Likewise.
10768 (STRGTR): Likewise.
10769 (STRGEQ): Likewise.
10770
10771 * call.c (convert_like): Add parenthesis and wrap.
10772 (convert_like_with_context): Likewise.
10773 (ICS_RANK): Whitespace.
10774 (NEED_TEMPORARY_P): Remove parenthesis.
10775
10776 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10777 whitespace.
10778 (VTT_MARKED_BINFO_P): Likewise.
10779
10780 * decl.c (BINDING_LEVEL): Add parenthesis.
10781 (DEF_OPERATOR): Likewise.
10782
10783 * mangle.c (MANGLE_TRACE): Add parenthesis.
10784 (MANGLE_TRACE_TREE): Likewise.
10785 (write_signed_number): Likewise.
10786 (write_unsigned_number): Likewise.
10787
10788 * pt.c (ccat): Uppercase macro parameter.
10789 (cat): Likewise
10790
10791 * search.c (SET_BINFO_ACCESS): Add parenthesis.
10792
10793 2002-01-07 Jason Merrill <jason@redhat.com>
10794
10795 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10796 to pedwarn.
10797
10798 PR c++/3536
10799 * method.c (make_thunk): If !flag_weak, give the thunk the
10800 function's linkage.
10801 (use_thunk): Here, too.
10802
10803 2002-01-07 Graham Stott <grahams@redhat.com>
10804
10805 * error.c: Update copyright date.
10806 (print_scope_operator): Add parenthesis.
10807 (print_left_paren): Likewise.
10808 (print_right_paren): Likewise.
10809 (print_left_bracket): Likewise.
10810 (print_right_bracket): Likewise.
10811 (print_template_argument_list_start): Likewise.
10812 (print_template_argument_list_end): Likewise.
10813 (print_non_consecutive_character): Likewise.
10814 (print_tree_identifier): Likewise.
10815 (print_identifier): Likewise.
10816 (NEXT_CODE): Uppercase macro parameter.
10817 (ident_fndecl): Delete unused.
10818 (GLOBAL_THING): Likewise.
10819
10820 2002-01-06 Graham Stott <grahams@redhat.com>
10821
10822 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10823 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10824 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10825 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10826 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10827 (C_IS_RESERVED_WORD): Uppercase macro parameter.
10828 (C_RID_YYCODE) Likewise.
10829 (ptrmem_cst): Use rtx.
10830 (LOCAL_BINDING_P): Add whitespace.
10831 (INHERITED_VALUE_BINDING_P): Likewise.
10832 (BINDING_SCOPE): Wrap long line.
10833 (BINDING_HAS_LEVEL_P): Remove parenthesis.
10834 (BINDING_VALUE): Wrap long line.
10835 (BINDING_TYPE): Whitespace.
10836 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10837 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10838 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10839 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10840 (same_type_p): Uppercase macro parameters.
10841 (same_type_ignoring_top_level_qualifiers_p): Likewise.
10842 (OVL_FUNCTION): Wrap long line.
10843 (OVL_CHAIN): Whitespace.
10844 (OVL_CURRENT): Add parenthesis and whitespace.
10845 (OVL_NEXT): Whitespace.
10846 (OVL_USED): Likewise.
10847 (IDENTIFIER_TYPE_VALUE): Likewise.
10848 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10849 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10850 (LANG_ID_FIELD): Whitespace.
10851 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10852 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10853 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10854 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10855 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10856 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10857 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10858 (IDENTIFIER_VIRTUAL_P): Likewise.
10859 (IDENTIFIER_OPNAME_P): Likewise.
10860 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10861 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10862 (C_SET_EXP_ORIGINAL_CODE): Likewise.
10863 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10864 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10865 (IS_AGGR_TYPE): Uppercase macro parameter.
10866 (CLASS_TYPE_P): Likewise.
10867 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10868 (IS_AGGR_TYPE_2): Whitespace.
10869 (TAGGED_TYPE_P): Uppercase macro parameter.
10870 (TYPE_BUILT_IN): Whitespace.
10871 (TYPE_FOR_JAVA): Likewise.
10872 (FUNCTION_ARG_CHAIN): Remove parenthesis.
10873 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10874 (FUNCTION_FIRST_USER_PARAM): Likewise.
10875 (PROMOTES_TO_AGGR_TYPE): Whitespace.
10876 (DERIVED_FROM_P): Add parenthesis and wrap.
10877 (UNIQUELY_DERIVED_FROM_P): Likewise.
10878 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10879 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10880 (CLASSTYPE_USE_TEMPLATE): Whitespace.
10881 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10882 (TYPE_GETS_DELETE): Add parenthesis.
10883 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10884 (TYPE_HAS_ASSIGN_REF): Likewise,
10885 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10886 (TYPE_HAS_INIT_REF): Likewise.
10887 (TYPE_HAS_CONST_INIT_REF): Likewise.
10888 (TYPE_BEING_DEFINED): Likewise.
10889 (TYPE_LANG_SPECIFIC): Likewise.
10890 (CLASSTYPE_RTTI): Likewise.
10891 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10892 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10893 (TYPE_OVERLOADS_ARROW): Likewise.
10894 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10895 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10896 (CLASSTYPE_METHOD_VEC): Likewise.
10897 (CLASSTYPE_MARKED_N): Likewise.
10898 (CLASSTYPE_MARKED): Likewise.
10899 (CLASSTYPE_MARKED2): Likewise.
10900 (CLASSTYPE_MARKED3): Likewise.
10901 (CLASSTYPE_MARKED4): Likewise.
10902 (CLASSTYPE_MARKED5): Likewise.
10903 (CLASSTYPE_MARKED6): Likewise.
10904 (SET_CLASSTYPE_MARKED): Whitespace.
10905 (CLEAR_CLASSTYPE_MARKED): Likewise.
10906 (SET_CLASSTYPE_MARKED2): Likewise.
10907 (CLEAR_CLASSTYPE_MARKED2): Likewise.
10908 (SET_CLASSTYPE_MARKED3): Likewise.
10909 (CLEAR_CLASSTYPE_MARKED3): Likewise.
10910 (SET_CLASSTYPE_MARKED4): Likewise.
10911 (CLEAR_CLASSTYPE_MARKED4): Likewise.
10912 (SET_CLASSTYPE_MARKED5): Likewise.
10913 (CLEAR_CLASSTYPE_MARKED5): Likewise.
10914 (SET_CLASSTYPE_MARKED6): Likewise.
10915 (CLEAR_CLASSTYPE_MARKED6): Likewise.
10916 (CLASSTYPE_TAGS): Likewise.
10917 (CLASSTYPE_VSIZE): Likewise.
10918 (CLASSTYPE_VBASECLASSES): Likewise.
10919 (CANONICAL_BINFO): Add parenthesis.
10920 (CLASSTYPE_SIZE(NODE): Likewise.
10921 (CLASSTYPE_SIZE_UNIT): Likewise.
10922 (CLASSTYPE_ALIGN(NODE): Likewise.
10923 (CLASSTYPE_USER_ALIGN): Likewise.
10924 (TYPE_JAVA_INTERFACE): Likewise.
10925 (CLASSTYPE_PURE_VIRTUALS): Likewise.
10926 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10927 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10928 (CLASSTYPE_HAS_MUTABLE): Likewise.
10929 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10930 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10931 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10932 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10933 (CLASSTYPE_INTERFACE_ONLY): Likewise.
10934 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10935 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10936 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10937 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10938 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10939 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10940 (BINFO_UNSHARED_MARKED): Whitespace.
10941 (BINFO_MARKED): Whitespace and wrap.
10942 (SET_BINFO_MARKED): Likewise.
10943 (CLEAR_BINFO_MARKED): Likewise.
10944 (BINFO_VTABLE_PATH_MARKED): Likewise.
10945 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10946 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10947 (BINFO_SUBVTT_INDEX): Remove parenthesis.
10948 (BINFO_VPTR_INDEX): Likewise.
10949 (BINFO_PRIMARY_BASE_OF): Likewise,
10950 (CLASSTYPE_VFIELDS): Whitespace.
10951 (VF_DERIVED_VALUE): Wrap long line.
10952 (NAMESPACE_LEVEL): Whitespace.
10953 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10954 (DEFARG_POINTER): Whitespace.
10955 (DECL_NEEDED_P): Remove parenthesis.
10956 (DECL_LANGUAGE): Whitespace.
10957 (SET_DECL_LANGUAGE): Add parenthesis.
10958 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10959 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10960 (DECL_IN_AGGR_P): Whitespace.
10961 (DECL_FRIEND_P): Likewise.
10962 (DECL_BEFRIENDING_CLASSES): Likewise.
10963 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10964 (DECL_NONCONVERTING_P): Whitespace.
10965 (DECL_PURE_VIRTUAL_P): Likewise.
10966 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10967 (DECL_PENDING_INLINE_INFO): Whitespace.
10968 (DECL_SORTED_FIELDS): Likewise.
10969 (DECL_DEFERRED_FN): Likewise.
10970 (DECL_TEMPLATE_INFO): Likewise.
10971 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10972 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10973 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10974 (TMPL_ARGS_LEVEL): Likewise.
10975 (SET_TMPL_ARGS_LEVEL): Likewise.
10976 (INNERMOST_TEMPLATE_PARMS): Whitespace.
10977 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10978 (INTEGRAL_CODE_P(CODE): Add parenthesis.
10979 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10980 (TYPE_HAS_CONSTRUCTOR): Whitespace.
10981 (TREE_HAS_CONSTRUCTOR): Likewise.
10982 (TYPE_HAS_DESTRUCTOR): Likewise.
10983 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10984 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10985 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10986 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10987 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10988 (TYPE_PTRMEMFUNC_P): Likewise.
10989 (TYPE_PTRMEMFUNC_FLAG): Likewise.
10990 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10991 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10992 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10993 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10994 (DECL_ACCESS): Whitespace.
10995 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10996 (DECL_GLOBAL_DTOR_P): Likewise.
10997 (GLOBAL_INIT_PRIORITY): Likewise.
10998 (DECL_TEMPLATE_PARMS): Likewise.
10999 (DECL_TEMPLATE_RESULT): Likewise.
11000 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
11001 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
11002 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
11003 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
11004 (PRIMARY_TEMPLATE_P): Add parenthesis.
11005 (DECL_USE_TEMPLATE): Whitespace.
11006 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
11007 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
11008 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
11009 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
11010 (CALL_DECLARATOR_PARMS): Remove parenthesis.
11011 (CALL_DECLARATOR_QUALS): Likewise.
11012 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
11013 (TEMP_NAME_P): Wrap.
11014 (VFIELD_NAME_P): Likewise.
11015 (B_SET): Uppercase macro parameters and add parenthesis.
11016 (B_CLR): Likewise.
11017 (B_TST): Likewise.
11018 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
11019 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
11020 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
11021 (same_or_base_type_p): Likewise.
11022 (cp_deprecated): Likewise.
11023
11024 2002-01-05 Richard Henderson <rth@redhat.com>
11025
11026 * semantics.c (expand_body): Revert last change.
11027
11028 2002-01-04 Jason Merrill <jason@redhat.com>
11029
11030 PR c++/4122
11031 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
11032 lost primary.
11033
11034 * class.c (build_vtbl_initializer): Check for a lost primary
11035 before calculating the vtable entry to throw away.
11036
11037 2002-01-02 Jason Merrill <jason@redhat.com>
11038
11039 * semantics.c (expand_body): Call outlining_inline_function when
11040 emitting an inline function out of line.
11041
11042 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11043
11044 PR c++/5116, c++/764 reversion
11045 * call.c (build_new_op): Revert the instantiations. They are
11046 incorrect.
11047
11048 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11049
11050 PR c++/5089
11051 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
11052
11053 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11054
11055 PR c++/3716
11056 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
11057 (tsubst, case POINTER_TYPE): Handle pmfs here.
11058 (tsubst, case OFFSET_TYPE): Check it is not an offset to
11059 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
11060
11061 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11062
11063 PR c++/35
11064 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
11065 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
11066 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
11067 PARM_DECL.
11068 (tsubst_template_parms): Break up loop statements.
11069 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
11070 parm PARM_DECLs don't get promoted.
11071
11072 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11073
11074 PR c++/5123
11075 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
11076 (build_x_function_call): Cope with a COMPONENT_REF containing a
11077 TEMPLATE_ID_EXPR.
11078
11079 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11080
11081 PR c++/5213
11082 * pt.c (convert_template_argument): Be more careful determining
11083 when RECORD_TYPE templates are or are not templates.
11084
11085 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11086
11087 PR c++/775
11088 * cp-tree.h (handle_class_head): Adjust prototype.
11089 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
11090 parameters. Use for all class heads.
11091 * parse.y (named_class_head_sans_basetype, named_class_head,
11092 named_complex_class_head_sans_basetype,
11093 named_class_head_sans_basetype_defn,
11094 unnamed_class_head): Remove.
11095 (class_head, class_head_apparent_template): Recognize class heads
11096 (class_head_decl, class_head_defn): New reductions. Process class
11097 heads.
11098 (structsp): Adjust class definition and class declaration
11099 reductions.
11100 (maybe_base_class_list): Give diagnostic on empty list.
11101
11102 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11103
11104 PR c++/4379
11105 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
11106 single non-static member.
11107 (unary_complex_lvalue): If it cannot be a pointer to member, don't
11108 make it so. Check it is not pointer to reference.
11109
11110 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11111
11112 PR c++/5132
11113 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
11114 are processing a template decl.
11115
11116 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11117
11118 PR c++/5116, c++/764
11119 * call.c (build_new_op): Make sure template class operands are
11120 instantiated. Simplify arglist construction.
11121
11122 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11123
11124 * call.c (build_user_type_conversion_1): Use my_friendly_assert
11125 rather than if ... abort.
11126 * cvt.c (convert_to_reference): Likewise.
11127 * semantics.c (setup_vtbl_ptr): Likewise.
11128 * pt.c (lookup_template_class): Comment typo.
11129
11130 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11131
11132 PR c++/5125
11133 * pt.c (push_template_decl_real): Make sure DECL has
11134 DECL_LANG_SPECIFIC.
11135
11136 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11137
11138 PR c++/335
11139 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
11140 for non-reference fields.
11141 * typeck.c (require_complete_type): Use resolve_offset_ref).
11142
11143 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
11144
11145 PR c++/196
11146 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
11147
11148 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
11149
11150 PR c++/160
11151 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
11152 up. Don't stabilize_references when initializing a reference.
11153
11154 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11155
11156 * decl2.c (lang_f_options): Const-ify.
11157
11158 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
11159
11160 * config-lang.in (diff_excludes): Remove.
11161
11162 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
11163
11164 PR c++/90
11165 * typeck.c (build_function_call_real): Use original function
11166 expression for errors.
11167
11168 2001-12-18 Jason Merrill <jason@redhat.com>
11169
11170 PR c++/3242
11171 * class.c (add_method): Do compare 'this' quals when trying to match a
11172 used function. Don't defer to another used function.
11173
11174 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11175
11176 * pt.c (instantiate_clone): Remove, fold into ...
11177 (instantiate_template): ... here. Simplify by removing mutual
11178 recursion.
11179 * typeck2.c (build_m_component_ref): Don't cv qualify the function
11180 pointed to by a pointer to function.
11181 * class.c (delete_duplicate_fields_1): Typo.
11182
11183 2001-12-18 Jason Merrill <jason@redhat.com>
11184
11185 C++ ABI change: destroy value arguments in caller.
11186 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
11187 create an extra binding level for the parameters.
11188 * decl.c (store_parm_decls): Don't do parameter cleanups.
11189
11190 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11191
11192 * call.c (build_new_method_call): Use '%#V'.
11193 * error.c (cv_to_string): Use V parameter to determine padding.
11194
11195 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
11196
11197 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
11198 spellings in messages.
11199
11200 2001-12-17 Zack Weinberg <zack@codesourcery.com>
11201
11202 * cp-tree.h: Delete #defines for cp_error, cp_warning,
11203 cp_pedwarn, and cp_compiler_error.
11204 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
11205 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
11206 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
11207 typeck2.c: Change calls to the above macros to use their
11208 language-independent equivalents: error, warning, pedwarn, and
11209 internal_error respectively.
11210
11211 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
11212
11213 * decl2.c (finish_file): Remove back_end_hook.
11214
11215 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
11216
11217 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11218 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11219 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11220
11221 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
11222
11223 * lang-options.h: Use American spelling in messages.
11224
11225 2001-12-13 Jason Merrill <jason@redhat.com>
11226
11227 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11228
11229 Use cleanups to run base and member destructors.
11230 * init.c (push_base_cleanups): New function, split out from...
11231 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
11232 * decl.c (finish_destructor_body): Move vbase destruction code to
11233 push_base_cleanups.
11234 (begin_function_body, finish_function_body): New fns.
11235 (finish_function): Move [cd]tor handling and call_poplevel to
11236 finish_function_body.
11237 (pushdecl): Skip the new level.
11238 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11239 (setup_vtbl_ptr): Call push_base_cleanups.
11240 * method.c (synthesize_method): Call {begin,end}_function_body.
11241 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11242 * cp-tree.h: Declare new fns.
11243 * parse.y (function_body, .begin_function_body): New nonterminals.
11244 (fndef, pending_inline, function_try_block): Use function_body.
11245 (ctor_initializer_opt, function_try_block): No longer has a value.
11246 (base_init): Remove .set_base_init token.
11247 (.set_base_init, compstmt_or_error): Remove.
11248 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11249
11250 * optimize.c (maybe_clone_body): Fix parameter updating.
11251
11252 2001-12-12 Jason Merrill <jason@redhat.com>
11253
11254 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11255 * semantics.c (genrtl_start_function): Don't pass
11256 parms_have_cleanups or push an extra binding level.
11257 (genrtl_finish_function): Lose cleanup_label cruft.
11258
11259 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11260 (ctor_label): Remove.
11261 * semantics.c (finish_return_stmt): Lose ctor_label support.
11262 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11263 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11264 dtor_label.
11265
11266 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11267 check for [cd]tors.
11268 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11269
11270 * decl.c (finish_function): Check VMS_TARGET, not VMS.
11271
11272 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11273 (end_cleanup_fn): And poplevel.
11274
11275 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11276 if we're in a template.
11277
11278 2001-12-12 Jakub Jelinek <jakub@redhat.com>
11279
11280 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11281 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11282 THIS_NAME_P): Delete.
11283 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11284 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11285 with internal naming scheme.
11286 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11287
11288 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
11289
11290 * decl.c (grokdeclarator): Deprecated implicit typename use.
11291
11292 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
11293
11294 PR g++/51
11295 * parse.y (frob_specs): Indicate it is a language linkage which
11296 contained the extern.
11297 * decl.c (grokdeclarator): Allow extern language linkage with
11298 other specifiers.
11299
11300 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
11301
11302 PR g++/72
11303 * decl.c (add_binding): Don't reject duplicate typedefs involving
11304 template parameters.
11305
11306 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
11307
11308 * parse.y, semantics.c: Similarly.
11309
11310 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
11311
11312 PR g++/87
11313 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11314 (copy_args_p): Rename to ...
11315 (copy_fn_p): ... here.
11316 (grok_special_member_properties): New function.
11317 (grok_op_properties): Lose VIRTUALP parameter.
11318 (copy_assignment_arg_p): Remove.
11319 * call.c (build_over_call): Use copy_fn_p.
11320 * decl.c (grokfndecl): Reformat. Adjust call to
11321 grok_op_properties.
11322 (copy_args_p): Rename to ...
11323 (copy_fn_p): ... here. Reject template functions. Check for pass
11324 by value.
11325 (grok_special_member_properties): Remember special functions.
11326 (grok_ctor_properties): Don't remember them here, just check.
11327 (grok_op_properties): Likewise.
11328 (start_method): Call grok_special_member_properties.
11329 * decl2.c (grokfield): Likewise.
11330 (copy_assignment_arg_p): Remove.
11331 (grok_function_init): Don't remember abstract assignment here.
11332 * pt.c (instantiate_class_template): Call
11333 grok_special_member_properties.
11334 (tsubst_decl): Adjust grok_op_properties call.
11335
11336 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
11337
11338 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11339 RID_TYPES_COMPATIBLE_P.
11340
11341 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11342
11343 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11344 call to build_aggr_init.
11345 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11346
11347 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
11348
11349 * parse.y: Replace uses of the string non-terminal with STRING.
11350 Don't perform string concatentaion here.
11351 (string): Remove non-terminal.
11352 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11353
11354 2001-12-05 Jason Merrill <jason@redhat.com>
11355
11356 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11357 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11358 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11359 * pt.c (push_tinst_level): No longer static.
11360 * cp-tree.h: Declare them.
11361
11362 * init.c (resolve_offset_ref): Don't check access for the base
11363 conversion to access a FIELD_DECL.
11364
11365 * cp-tree.h (TYPE_REFFN_P): New macro.
11366 * decl.c (bad_specifiers): Check it, too.
11367
11368 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11369 on the __*_type_info type if we haven't seen a definition.
11370
11371 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
11372
11373 * decl.c: Include c-common.h.
11374 (shadow_warning): Move to c-common.c.
11375
11376 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11377
11378 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11379
11380 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11381
11382 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11383
11384 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11385
11386 PR g++/164
11387 * init.c (sort_base_init): Allow binfos to be directly specified.
11388 * method.c (do_build_copy_constructor): Explicitly convert to the
11389 base instance.
11390 (do_build_assign_ref): Likewise.
11391
11392 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
11393
11394 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11395 declaration and initialization.
11396
11397 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
11398
11399 * typeck2.c: Remove leading capital from diagnostic messages, as
11400 per GNU coding standards.
11401
11402 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
11403
11404 PR c++/3394
11405 * decl.c (xref_basetypes): Handle attributes between
11406 'class' and name.
11407
11408 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
11409
11410 PR g++/3381
11411 * parse.y (named_complex_class_head_sans_basetype): Add new
11412 reduction.
11413 * Make-lang.in (parse.c): Adjust expected conflict count.
11414
11415 2001-12-03 Jason Merrill <jason@redhat.com>
11416
11417 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11418 immediate binfos for our virtual bases.
11419
11420 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
11421
11422 * call.c (build_java_interface_fn_ref): Similarly.
11423 * except.c (is_admissible_throw_operand): Similarly.
11424 * init.c (build_java_class_ref): Similarly.
11425 * xref.c (open_xref_file): Similarly.
11426
11427 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
11428
11429 * class.c (finish_struct): Remove trailing periods from messages.
11430 * decl.c (check_tag_decl): Similarly.
11431 * lex.c (cxx_set_yydebug): Similarly.
11432 * typeck2.c (friendly_abort): Similarly.
11433
11434 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11435
11436 PR c++/3048
11437 * cp-tree.h (ovl_member): Remove.
11438 * decl2.c (merge_functions): Handle extern "C" functions
11439 specially.
11440 * tree.c (ovl_member): Remove.
11441
11442 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11443
11444 PR c++/4842
11445 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11446 FUNCTION_DECL, as input.
11447 (mark_overriders): Remove.
11448 (warn_hidden): Rework for the new ABI.
11449
11450 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11451
11452 PR c++/3471
11453 * call.c (convert_like_real): Do not build additional temporaries
11454 for rvalues of class type.
11455
11456 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
11457
11458 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11459 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11460 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11461 (DERIVED_FROM_P): Likewise.
11462 (enum base_access): Renumber, add ba_quiet bit mask.
11463 (get_binfo): Remove.
11464 (get_base_distance): Remove.
11465 (binfo_value): Remove.
11466 (ACCESSIBLY_DERIVED_FROM_P): Remove.
11467 * call.c (standard_conversion): Use lookup_base.
11468 * class.c (strictly_overrides): Likewise.
11469 (layout_virtual_bases): Likewise.
11470 (warn_about_ambiguous_direct_bases): Likewise.
11471 (is_base_of_enclosing_class): Likewise.
11472 (add_vcall_offset_vtbl_entries_1): Likewise.
11473 * cvt.c (build_up_reference): Adjust comment.
11474 * init.c (build_member_call): Reformat.
11475 * search.c (get_binfo): Remove.
11476 (get_base_distance_recursive): Remove.
11477 (get_base_distance): Remove.
11478 (lookup_base_r): Tweak.
11479 (lookup_base): Add ba_quiet control. Complete the types here.
11480 (covariant_return_p): Use lookup_base.
11481 * tree.c (binfo_value): Remove.
11482 (maybe_dummy_object): Use lookup_base.
11483 * typeck.c (build_static_cast): Use lookup_base.
11484 (get_delta_difference): Likewise.
11485 * typeck2.c (binfo_or_else): Use lookup_base.
11486 (build_scoped_ref): Add back error_mark_check.
11487 (build_m_component_ref): Use lookup_base.
11488
11489 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
11490
11491 * Make-lang.in (c++.generated-manpages): New dummy target.
11492
11493 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11494
11495 * Make-lang.in (cp-lang.o): Depends on c-common.h.
11496 * cp-lang.c (c-common.h): Include.
11497 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11498 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11499 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11500
11501 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
11502
11503 * decl2.c (c_language): Move to c-common.c.
11504 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11505 functions.
11506 (cxx_init): Update.
11507
11508 2001-11-26 Jason Merrill <jason@redhat.com>
11509
11510 * call.c (joust): Remove COND_EXPR hack.
11511
11512 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
11513
11514 * search.c (lookup_base_r): Declare bk in variable declaration
11515 space.
11516
11517 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
11518
11519 PR g++/3145
11520 * class.c (build_vbase_pointer): Remove.
11521 (build_vbase_path): Remove.
11522 (build_base_path): New function.
11523 * cp-tree.h (base_access, base_kind): New enumerations.
11524 (build_base_path): Declare.
11525 (convert_pointer_to_real): Remove.
11526 (convert_pointer_to): Remove.
11527 (lookup_base): Declare.
11528 (convert_pointer_to_vbase): Remove.
11529 * call.c (build_scoped_method_call): Use lookup_base &
11530 build_base_path instead of convert_pointer_to_real,
11531 get_base_distance & get_binfo.
11532 (build_over_call): Likewise.
11533 * cvt.c (cp_convert_to_pointer): Likewise.
11534 (convert_to_pointer_force): Likewise.
11535 (build_up_reference): Likewise.
11536 (convert_pointer_to_real): Remove.
11537 (convert_pointer_to): Remove.
11538 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11539 instead of convert_pointer_to_vbase & build_vbase_path.
11540 (emit_base_init): Use build_base_path instead of
11541 convert_pointer_to_real.
11542 (expand_virtual_init): Lose unrequired conversions.
11543 (resolve_offset_ref): Use lookup_base and build_base_path
11544 instead of convert_pointer_to.
11545 * rtti.c (build_dynamic_cast_1): Use lookup_base &
11546 build_base_path instead of get_base_distance & build_vbase_path.
11547 * search.c (get_vbase_1): Remove.
11548 (get_vbase): Remove.
11549 (convert_pointer_to_vbase): Remove.
11550 (lookup_base_r): New function.
11551 (lookup_base): New function.
11552 * typeck.c (require_complete_type): Use lookup_base &
11553 build_base_path instead of convert_pointer_to.
11554 (build_component_ref): Likewise.
11555 (build_x_function_call): Likewise.
11556 (get_member_function_from_ptrfunc): Likewise.
11557 (build_component_addr): Likewise.
11558 * typeck2.c (build_scoped_ref): Likewise.
11559
11560 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11561
11562 * cp-tree.h (CP_TYPE_QUALS): Removed.
11563 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11564 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11565 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11566 * dump.c (cp_dump_tree): Use void* dump_info argument to match
11567 lang-hooks prototype.
11568 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11569 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11570 CP_TYPE_QUALS changed to cp_type_quals.
11571 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11572 (CXX_C_OBJS): Remove c-dump.o.
11573
11574 2001-11-21 Mark Mitchell <mark@codesourcery.com>
11575
11576 PR c++/3637
11577 * pt.c (lookup_template_class): Ensure that all specializations
11578 are registered on the list corresponding to the most general
11579 template.
11580
11581 2001-11-20 Mark Mitchell <mark@codesourcery.com>
11582
11583 * call.c (non_reference): Add documentation.
11584 (convert_class_to_reference): Do not strip reference types
11585 from conversion operators.
11586 (maybe_handle_ref_bind): Simplify.
11587 (compare_ics): Correct handling of references.
11588
11589 2001-11-19 John Wilkinson <johnw@research.att.com>
11590
11591 * dump.c (dump_op): New function.
11592 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
11593 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11594 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11595
11596 2001-11-19 Mark Mitchell <mark@codesourcery.com>
11597
11598 PR4629
11599 * semantics.c (finish_sizeof): Make sure that expression created
11600 while processing a template do not have a type.
11601 (finish_alignof): Likewise.
11602 * typeck.c (c_sizeof): Likewise.
11603 (expr_sizeof): Likewise.
11604
11605 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
11606
11607 * lex.c (cxx_finish): Call c_common_finish.
11608 (finish_parse): Remove.
11609
11610 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11611
11612 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11613 when displaying error message about missing array bounds.
11614
11615 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11616
11617 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11618 CONST_CAST_EXPR.
11619 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11620
11621 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
11622
11623 * cp-tree.h (print_class_statistics): Restore.
11624
11625 2001-11-15 Jason Merrill <jason@redhat.com>
11626
11627 * method.c (use_thunk): Don't emit debugging information for thunks.
11628
11629 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11630 * decl.c (make_typename_type): Handle getting a class template.
11631 * search.c (lookup_field_r): A class template is good enough for
11632 want_type.
11633
11634 * call.c (convert_like_real): Only use cp_convert for the bad part.
11635 (standard_conversion): Also allow bad int->enum.
11636 * typeck.c (ptr_reasonably_similar): Also allow functions to
11637 interconvert. Pointers to same-size integers are reasonably
11638 similar.
11639
11640 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11641 give it void type.
11642
11643 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
11644
11645 PR g++/3154
11646 * init.c (sort_base_init): Remove unreachable code.
11647 (expand_member_init): Adjust comment to reflect reality. Simplify
11648 and remove unreachable code.
11649
11650 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
11651
11652 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11653 (cxx_init): Update prototype.
11654 * decl.c (init_decl_processing): Rename. Move null node init
11655 to its creation time.
11656 * lex.c (cxx_init_options): Update.
11657 (cxx_init): Combine with old init_parse; also call
11658 cxx_init_decl_processing.
11659
11660 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
11661
11662 * decl.c (check_initializer): Try to complete the type of an
11663 array element before checking whether it's complete. Don't
11664 complain about arrays with complete element types but an
11665 unknown size.
11666 (cp_finish_decl): Build the hierarchical constructor before
11667 calling maybe_deduce_size_from_array_init.
11668
11669 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
11670
11671 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11672
11673 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
11674
11675 PR g++/4206
11676 * parse.y (already_scoped_stmt): Remove.
11677 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11678
11679 2001-11-12 H.J. Lu <hjl@gnu.org>
11680
11681 * cvt.c (ocp_convert): Don't warn the address of a weak
11682 function is always `true'.
11683
11684 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11685
11686 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11687 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11688 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11689 * cp-tree.h (print_class_statistics): Remove.
11690 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11691 cxx_print_identifier, cxx_set_yydebug): New.
11692 * lex.c (set_yydebug): Rename c_set_yydebug.
11693 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11694 lang_print_xnode): Rename.
11695 * tree.c (print_lang_statistics): Rename.
11696
11697 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11698
11699 * class.c (dump_array): Fix format specifier warning.
11700
11701 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11702
11703 * cp-lang.c (LANG_HOOKS_NAME): Override.
11704 (struct lang_hooks): Constify.
11705 * lex.c (cxx_init_options): Update.
11706 (lang_identify): Remove.
11707 * parse.y (language_string): Remove.
11708
11709 2001-11-08 Andreas Franck <afranck@gmx.de>
11710
11711 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11712 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11713 suggested by autoconf.
11714 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11715 (c++.install-common): Use the transformed target alias names.
11716
11717 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11718
11719 * Make-lang.in: Update.
11720 * cp-lang.c: Include langhooks-def.h.
11721
11722 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11723
11724 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11725
11726 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11727
11728 * lex.c (copy_lang_type): Add static prototype.
11729
11730 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11731
11732 * pt.c (unify): Handle SCOPE_REF.
11733
11734 2001-11-01 Jakub Jelinek <jakub@redhat.com>
11735
11736 * tree.c (cp_copy_res_decl_for_inlining): Adjust
11737 DECL_ABSTRACT_ORIGIN for the return variable.
11738
11739 2001-10-31 Zack Weinberg <zack@codesourcery.com>
11740
11741 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11742
11743 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
11744
11745 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11746 semantics.c, spew.c: Fix spelling errors.
11747
11748 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11749
11750 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11751
11752 2001-10-25 Zack Weinberg <zack@codesourcery.com>
11753
11754 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11755 pop_everything.
11756
11757 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11758
11759 * cp-lang.c (cxx_get_alias_set): New function.
11760 Point LANG_HOOKS_GET_ALIAS_SET to it.
11761
11762 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11763
11764 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11765 * cp-tree.h (make_unbound_class_template): Prototype new function.
11766 * decl.c (make_unbound_class_template): New function.
11767 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11768 * error.c (dump_type): Likewise.
11769 * mangle.c (write_type): Likewise.
11770 * parse.y (template_parm): Likewise.
11771 (template_argument): Use make_unbound_class_template.
11772 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11773 (tsubst): Likewise.
11774 (tsubst_copy): Likewise.
11775 (unify): Likewise.
11776 * tree.c (walk_tree): Likewise.
11777 * typeck.c (comptypes): Likewise.
11778
11779 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11780
11781 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11782 extra calls into fewer ones.
11783
11784 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
11785
11786 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11787 Warn when merging inline with attribute noinline.
11788 (start_decl, start_function): Warn if inline and attribute
11789 noinline appear in the same declaration.
11790
11791 2001-10-16 H.J. Lu <hjl@gnu.org>
11792
11793 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11794 for tree checking disabled.
11795
11796 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
11797
11798 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11799 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11800
11801 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11802
11803 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11804 (unify): Only handle MINUS_EXPR specially if the above flag is set
11805 and the subtracted constant is 1. Clear the flag on recursive calls.
11806 Set it when unifying the maximum value in an INTEGER_TYPE's range.
11807
11808 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11809
11810 * decl.c (bad_specifiers): Don't allow exception specifications
11811 on any typedefs.
11812
11813 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
11814
11815 * cp/lex.c (init_cp_pragma): Similarly.
11816
11817 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11818
11819 * pt.c (lookup_template_class): Build complete template arguments
11820 for BOUND_TEMPLATE_TEMPLATE_PARM.
11821
11822 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11823
11824 * cp-tree.h (TYPE_BINFO): Update comment.
11825 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11826 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11827 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11828 (copy_type): Prototype new function.
11829 * lex.c (copy_lang_decl): Gather tree node statistics.
11830 (copy_lang_type): New function.
11831 (copy_type): Likewise.
11832 (cp_make_lang_type): Create lang_type for
11833 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
11834 and BOUND_TEMPLATE_TEMPLATE_PARM.
11835 * pt.c (tsubst): Use copy_type instead of copy_node.
11836 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11837
11838 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11839
11840 * pt.c (determine_specialization): Ignore functions without
11841 DECL_TEMPLATE_INFO.
11842
11843 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
11844
11845 PR g++/4476
11846 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11847
11848 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
11849
11850 * typeck2.c (store_init_value): Don't re-digest a bracketed
11851 initializer.
11852
11853 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11854 ANON_AGGR_TYPE_P.
11855
11856 2001-10-11 Richard Henderson <rth@redhat.com>
11857
11858 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11859 of an asm statement.
11860 (build_vtbl_ref_1): Split out from build_vtbl_ref.
11861 (build_vfn_ref): Use it to handle vtable descriptors before
11862 calling build_vtable_entry_ref.
11863 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11864
11865 2001-10-10 Richard Henderson <rth@redhat.com>
11866
11867 * parse.y (asm_operand): Allow named operands.
11868 * semantics.c (finish_asm_stmt): Tweek for changed location
11869 of the operand constraint.
11870
11871 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
11872
11873 * call.c (standard_conversion): Add bad conversion between
11874 integers and pointers.
11875 (convert_like_real): Don't use convert_for_initialization for bad
11876 conversions; complain here and use cp_convert.
11877 (build_over_call): Don't handle bad conversions specially.
11878 (perform_implicit_conversion): Allow bad conversions.
11879 (can_convert_arg_bad): New fn.
11880 * cp-tree.h: Declare it.
11881 * typeck.c (convert_for_assignment): Use it.
11882 (ptr_reasonably_similar): Any target type is similar to void.
11883
11884 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
11885
11886 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11887 (cp/cp-lang.o): New rule.
11888 * cp-tree.h: Declare hooks.
11889 * tree.c: Make hooks non-static.
11890 (init_tree): Don't initialize hooks here.
11891 * lex.c: Likewise. Move definition of lang_hooks to...
11892 * cp-lang.c: ... new file.
11893
11894 2001-10-08 Richard Henderson <rth@redhat.com>
11895
11896 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11897 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11898
11899 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11900
11901 * class.c (build_vtable_entry_ref): Const-ify.
11902 * decl.c (predefined_identifier,
11903 initialize_predefined_identifiers): Likewise.
11904 * init.c (build_new_1): Likewise.
11905 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11906 Likewise.
11907
11908 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
11909
11910 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11911 (INSNS_PER_STMT): Likewise.
11912 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11913 (copy_body, initialize_inlined_parameters): Likewise.
11914 (declare_return_variable, inlinable_function_p): Likewise.
11915 (expand_call_inline, expand_calls_inline): Likewise.
11916 (optimize_inline_calls, clone_body): Likewise.
11917 * tree.c (walk_tree): Moved to ../tree-inline.c.
11918 (walk_tree_without_duplicates): Likewise.
11919 (copy_tree_r, remap_save_expr): Likewise.
11920
11921 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
11922
11923 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11924 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11925 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11926 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11927 (flag_inline_trees): Moved declaration to ../tree-inline.h.
11928 (walk_tree): Moved declaration to ../tree-inline.h.
11929 (walk_tree_without_duplicates, copy_tree_r): Likewise.
11930 (remap_save_expr): Likewise.
11931 * decl.c: Include tree-inline.h.
11932 (lang_mark_tree): Don't mark inlined_fns.
11933 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11934 * optimize.c: Include tree-inline.h.
11935 (optimize_inline_calls): Move declaration to ../tree.h, as
11936 non-static.
11937 (remap_decl): Use language-independent constructs and hooks.
11938 (remap_block, copy_body_r, declare_return_variable): Likewise.
11939 (inlinable_function_p): Likewise. Don't test for
11940 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11941 no longer language-specific.
11942 (optimize_inline_calls): Likewise. Make it non-static. Moved
11943 call of dump_function to...
11944 (optimize_function): Here...
11945 (clone_body): New function, extracted from...
11946 (maybe_clone_body): ... here. Build decl_map locally and pass
11947 it on to clone_body.
11948 * pt.c, semantics.c: Include tree-inline.h.
11949 * tree.c: Likewise.
11950 (cp_walk_subtrees): New language-specific hook for tree inlining.
11951 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11952 cp_is_overload_p, cp_auto_var_in_fn_p,
11953 cp_copy_res_decl_for_inlining): Likewise.
11954 (walk_tree): Move language-specific constructs into...
11955 (cp_walk_subtrees): this new function.
11956 (copy_tree_r): Use language-independent constructs and hooks.
11957 (init_tree): Initialize tree inlining hooks.
11958 (remap_save_expr): Adjust prototype so that the declaration
11959 does not require the definition of splay_tree.
11960
11961 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
11962
11963 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11964 to build the declaration instead of the declaration itself.
11965
11966 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
11967
11968 * decl2.c (cxx_decode_option): Add 'else'.
11969
11970 * spew.c (end_input): No longer static.
11971 * cp-tree.h: Declare it.
11972 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11973
11974 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11975
11976 * call.c (build_over_call), typeck.c (build_function_call_real):
11977 Pass type attributes to check_function_format rather than name or
11978 assembler name. Don't require there to be a name or assembler
11979 name to check formats.
11980
11981 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11982
11983 * decl.c (init_decl_processing): Don't call
11984 init_function_format_info. Initialize lang_attribute_table
11985 earlier.
11986 (builtin_function): Call decl_attributes.
11987 (insert_default_attributes): New.
11988
11989 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
11990
11991 * decl.c (grokdeclarator): Copy array typedef handling from C
11992 frontend.
11993
11994 * decl.c (grokdeclarator): Copy too-large array handling from C
11995 frontend.
11996
11997 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
11998
11999 * config-lang.in (target_libs): Added target-gperf, so that we
12000 don't try to build it if C++ is disabled.
12001
12002 2001-09-23 Zack Weinberg <zack@codesourcery.com>
12003
12004 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
12005 (cp/errfn.o): Delete rule.
12006 (cp/error.o): Depend on flags.h.
12007 * errfn.c: Delete file.
12008 * cp-tree.h: Declare warn_deprecated. Remove definitions of
12009 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
12010 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
12011 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
12012 internal_error respectively. Make cp_deprecated into a macro.
12013 Don't define cp_printer typedef or declare cp_printers.
12014 * error.c: Include flags.h.
12015 Delete: struct tree_formatting_info, print_function_argument_list,
12016 print_declaration, print_expression, print_function_declaration,
12017 print_function_parameter, print_type_id, print_cv_qualifier_seq,
12018 print_type_specifier_seq, print_simple_type_specifier,
12019 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
12020 print_parameter_declaration_clause, print_exception_specification,
12021 print_nested_name_specifier, and definition of cp_printers.
12022 (locate_error): New function.
12023 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
12024 rewritten in terms of locate_error and diagnostic.c.
12025 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
12026 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
12027 (init_error): Adjust to match.
12028
12029 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12030
12031 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
12032
12033 2001-09-21 Richard Henderson <rth@redhat.com>
12034
12035 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
12036 (build_vtbl_initializer): Likewise.
12037 (build_vfn_ref): New.
12038 * cp-tree.h: Declare it.
12039 * call.c (build_over_call): Use it.
12040 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
12041 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
12042
12043 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
12044
12045 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
12046
12047 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
12048
12049 Table-driven attributes.
12050 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
12051 * decl2.c (cplus_decl_attributes): Only take one attributes
12052 parameter.
12053 * cp-tree.c (cplus_decl_attributes): Update prototype.
12054 * class.c (finish_struct), decl.c (start_decl, start_function),
12055 decl2.c (grokfield), friend.c (do_friend), parse.y
12056 (parse_bitfield): Update calls to cplus_decl_attributes.
12057 * decl.c (grokdeclarator): Take a pointer to a single ordinary
12058 attribute list.
12059 * decl.h (grokdeclarator): Update prototype.
12060 * decl2.c (grokfield): Take a single ordinary attribute list.
12061 * friend.c (do_friend): Likewise.
12062 * decl.c (shadow_tag, groktypename, start_decl,
12063 start_handler_parms, grokdeclarator, grokparms, start_function,
12064 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
12065 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
12066 (process_template_parm, do_decl_instantiation): Pass single
12067 ordinary attribute lists around.
12068 * decl.c (grokdeclarator): Correct handling of nested attributes.
12069 Revert the patch
12070 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
12071 * decl.c (grokdeclarator): Embedded attrs bind to the right,
12072 not the left.
12073 .
12074 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
12075 (cp_attribute_table): Declare.
12076 * decl.c (valid_lang_attribute): Don't define.
12077 (lang_attribute_table): Define.
12078 (init_decl_processing): Initialize lang_attribute_table instead of
12079 valid_lang_attribute.
12080 * tree.c (cp_valid_lang_attribute): Remove.
12081 (handle_java_interface_attribute, handle_com_interface_attribute,
12082 handle_init_priority_attribute): New functions.
12083 (cp_attribute_table): New array.
12084 * decl2.c (import_export_class): Don't use
12085 targetm.valid_type_attribute.
12086
12087 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12088
12089 * Make-lang.in (cp/error.o): Depend on real.h
12090 * error.c: #include "real.h"
12091
12092 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12093
12094 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
12095 xmalloc/strcpy/strcat.
12096
12097 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12098
12099 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
12100 Const-ification.
12101 * pt.c (tsubst_decl): Likewise.
12102
12103 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12104
12105 * decl2.c (lang_f_options): Const-ification.
12106 * lex.c (cplus_tree_code_name): Likewise.
12107 * spew.c (yyerror): Likewise.
12108
12109 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12110
12111 PR c++/3986
12112 * class.c (force_canonical_binfo_r): Check & move an indirect
12113 primary base first.
12114 (force_canonical_binfo): Check that it's not already
12115 canonical.
12116 (mark_primary_virtual_base): Remove BINFO parameter.
12117 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
12118
12119 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12120
12121 Remove TYPE_NONCOPIED_PARTS.
12122 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
12123 CLASSTYPE_PURE_VIRTUALS.
12124 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
12125 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
12126 (layout_class_type): Don't call fixup_inline_methods here ...
12127 (finish_struct_1): ... call it here.
12128
12129 2001-09-04 Mark Mitchell <mark@codesourcery.com>
12130
12131 * decl.c (duplicate_decls): Remove code deadling with
12132 DECL_SAVED_INSNS.
12133 * decl2.c (finish_file): Likewise.
12134 * pt.c (instantiate_decl): Likewise.
12135 * semantics.c (expand_body): Don't defer local functions if
12136 they wouldn't be deferred for some other reason. Don't
12137 generate RTL for functions that will not be emitted.
12138 (genrtl_start_function): Remove code deadling with
12139 DECL_SAVED_INSNS.
12140 (genrtl_finish_function): Likewise.
12141
12142 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
12143
12144 PR c++/4203
12145 * call.c (build_over_call): Do not optimize any empty base
12146 construction.
12147
12148 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12149
12150 * error.c (dump_template_decl): Output template parameters
12151 together with their specifiers.
12152 Output `class' prefix for template template parameter.
12153 (dump_decl): Fix formatting.
12154
12155 2001-08-30 Kurt Garloff <garloff@suse.de>
12156
12157 * optimize.c (inlinable_function_p): Allow only smaller single
12158 functions. Halve inline limit after reaching recursive limit.
12159
12160 2001-08-30 Joern Rennecke <amylaar@redhat.com>
12161 Jason Merrill <jason_merrill@redhat.com>
12162
12163 * class.c (build_vtable_entry_ref): Subtract in char*, not
12164 ptrdiff_t.
12165
12166 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
12167
12168 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
12169 (build_cplus_array_type): Use cp_build_qualified_type, not
12170 TYPE_MAIN_VARIANT, to get an unqualified version.
12171
12172 * decl2.c (grok_alignof): Lose.
12173 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
12174 * typeck.c (c_alignof): Lose.
12175 * semantics.c (finish_sizeof, finish_alignof): New.
12176 * parse.y: Use them.
12177 * cp-tree.h: Declare them.
12178
12179 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
12180
12181 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
12182 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
12183 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
12184
12185 2001-08-19 Jakub Jelinek <jakub@redhat.com>
12186
12187 * typeck2.c (add_exception_specifier): Only require complete type if
12188 not in processing template declaration.
12189
12190 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12191
12192 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
12193 GNU_xref_start_scope and GNU_xref_end_scope.
12194
12195 * tree.c (TYPE_HASH): Moved to ../tree.h.
12196
12197 2001-08-16 Mark Mitchell <mark@codesourcery.com>
12198
12199 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
12200 on COMPOUND_EXPRs.
12201
12202 2001-08-14 Richard Henderson <rth@redhat.com>
12203
12204 * class.c, cp-tree.h (build_vfn_ref): Remove.
12205 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
12206
12207 2001-08-13 Mark Mitchell <mark@codesourcery.com>
12208
12209 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12210 empty class assignment as having side-effects to avoid
12211 spurious warnings.
12212
12213 2001-08-13 Zack Weinberg <zackw@panix.com>
12214
12215 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12216 * except.c: Include libfuncs.h.
12217
12218 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12219
12220 * decl.c (grokdeclarator): Clarify diagnostic message.
12221
12222 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12223
12224 * decl2.c (do_nonmember_using_decl): Replace using directive
12225 with using declaration in the error message.
12226
12227 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12228
12229 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12230 criterion to avoid rebuilding expression tree instead of
12231 processing_template_decl.
12232
12233 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12234
12235 Support named return value optimization for inlines, too.
12236 * decl.c (finish_function): Nullify returns here.
12237 * semantics.c (genrtl_start_function): Not here.
12238 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12239 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
12240 Also nullify the CLEANUP_STMT for the nrv.
12241 * cp-tree.h: Declare it.
12242 * optimize.c (declare_return_variable): Replace the nrv with the
12243 return variable.
12244 * typeck.c (check_return_expr): Be more flexible on alignment check.
12245 Ignore cv-quals when checking for a matching type.
12246
12247 2001-08-09 Richard Henderson <rth@redhat.com>
12248
12249 * decl2.c (finish_objects): Use target hooks instead of
12250 assemble_constructor and assemble_destructor.
12251
12252 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
12253
12254 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12255
12256 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
12257
12258 PR c++/3820
12259 Stop using TYPE_NONCOPIED_PARTS.
12260 * call.c (build_over_call): Be careful when copy constructing
12261 or assigning to an empty class.
12262 * class.c (check_bases_and_members): It has a
12263 COMPLEX_ASSIGN_REF if it has a vptr.
12264 (layout_class_type): Don't add empty class padding to
12265 TYPE_NONCOPIED_PARTS.
12266 (finish_struct_1): Don't add the VFIELD either.
12267 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12268 initialization.
12269
12270 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12271
12272 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12273
12274 2001-08-06 Richard Henderson <rth@redhat.com>
12275
12276 * decl2.c (finish_objects): Pass a symbol_ref and priority to
12277 assemble_{constructor,destructor}. Remove priority handling.
12278
12279 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12280
12281 Don't allow template-id in using-declaration.
12282 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12283 (do_class_using_decl): Likewise.
12284
12285 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12286
12287 * cp/spew.c (read_token): No need to pop buffers.
12288
12289 2001-08-02 Stan Shebs <shebs@apple.com>
12290
12291 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12292 (fnaddr_from_vtable_entry): Remove decl.
12293 * method.c (use_thunk): Update comment.
12294
12295 2001-08-01 Andrew Cagney <ac131313@redhat.com>
12296
12297 * repo.c (get_base_filename): Change return value to const char
12298 pointer.
12299
12300 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
12301
12302 Kill -fhonor-std.
12303 * NEWS: Document.
12304 * cp-tree.h (flag_honor_std): Remove.
12305 (CPTI_FAKE_STD): Remove.
12306 (std_node): Remove comment about it being NULL.
12307 (fake_std_node): Remove.
12308 * decl.c (in_fake_std): Remove.
12309 (walk_namespaces_r): Remove fake_std_node check.
12310 (push_namespace): Remove in_fake_std code.
12311 (pop_namespace): Likewise.
12312 (lookup_name_real): Remove fake_std_node check.
12313 (init_decl_processing): Always create std_node. Always add
12314 std:: things there.
12315 (builtin_function): Always put non '_' fns in std.
12316 * decl2.c (flag_honor_std): Remove.
12317 (lang_f_options): Remove honor-std.
12318 (unsupported_options): Add honor-std.
12319 (set_decl_namespace): Remove fake_std_node check.
12320 (validate_nonmember_using_decl): Likewise.
12321 (do_using_directive): Likewise.
12322 (handle_class_head): Likewise.
12323 * dump.c (cp_dump_tree): Likewise.
12324 * except.c (init_exception_processing): Adjust.
12325 * init.c (build_member_call): Remove fake_std_node check.
12326 (build_offset_ref): Likewise.
12327 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12328 * rtti.c (init_rtti_processing): Adjust.
12329
12330 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
12331
12332 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12333 operand while calling cp_tree_equal.
12334
12335 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12336
12337 The 3.0 ABI no longer has vbase pointer fields.
12338 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12339 FORMAT_VBASE_NAME): Remove.
12340 * method.c (do_build_copy_constructor): Adjust.
12341 (do_build_assign_ref): Adjust.
12342 * search.c (lookup_field_r): Adjust.
12343 * typeck.c (build_component_ref): Adjust.
12344
12345 The 3.0 ABI always has a vtable pointer at the start of every
12346 polymorphic class.
12347 * rtti.c (build_headof_sub): Remove.
12348 (build_headof): Adjust.
12349 (get_tinfo_decl_dynamic): No need to check flag_rtti
12350 here. Adjust.
12351 (create_real_tinfo_var): Explain why we need a hidden name.
12352
12353 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12354
12355 PR c++/3631
12356 * class.c (update_vtable_entry_for_fn): The fixed adjustment
12357 of a virtual thunk should be from declaring base.
12358
12359 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12360
12361 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12362 the shared virtual base, so preserving inheritance graph order.
12363
12364 2001-07-30 Andreas Jaeger <aj@suse.de>
12365
12366 * decl2.c: Remove unused var global_temp_name_counter.
12367
12368 2001-07-28 Richard Henderson <rth@redhat.com>
12369
12370 * method.c (pending_inlines): Remove.
12371
12372 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12373
12374 * class.c (mark_primary_virtual_base): Don't adjust base
12375 offsets here.
12376 (dfs_unshared_virtual_bases): Adjust them here.
12377 (mark_primary_bases): Explain why we adjust at the end.
12378
12379 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12380
12381 * class.c (finish_struct_1): When copying the primary base's
12382 VFIELD, make sure we find it is at offset zero.
12383
12384 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12385
12386 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12387 tsubst_expr for default template arguments.
12388
12389 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12390
12391 PR c++/3621
12392 * spew.c (yylex): Only copy the token's lineno, if it is
12393 nonzero.
12394
12395 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12396
12397 PR c++/3624
12398 * call.c (resolve_args): Simplify, call
12399 convert_from_reference.
12400 (build_new_op): Resolve and convert from reference ARG1
12401 earlier. Adjust ARG2 & ARG3 resolve and conversion.
12402
12403 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12404
12405 * decl.c (last_function_parm_tags): Remove.
12406 (current_function_parm_tags): Remove.
12407 (init_decl_processing): Adjust.
12408 (start_function): Adjust.
12409 (store_parm_decls): Adjust.
12410
12411 PR c++/3152
12412 * decl.c (grokdeclarator): Detect when a function typedef is
12413 declaring a function, and create last_function_parms correctly.
12414
12415 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
12416
12417 * call.c (joust): Only prefer a non-builtin candidate to a builtin
12418 one if they have the same signature.
12419
12420 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
12421 it rather than toplevel_bindings_p. Give it a mangled name if static.
12422 (convert_to_reference): Adjust.
12423 * decl2.c (get_temp_name): Lose.
12424 * mangle.c (mangle_ref_init_variable): New fn.
12425 (mangle_guard_variable): Strip the ref-init header.
12426 * cp-tree.h: Adjust.
12427 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12428 initializer.
12429 (grok_reference_init): Always use DECL_INITIAL.
12430
12431 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12432
12433 PR c++/3416
12434 * call.c (build_conditional_expr): Recheck args after
12435 conversions.
12436 * cp-tree.h (build_conditional_expr): Move to correct file.
12437 * typeck.c (decay_conversion): Diagnose any unknown types
12438 reaching here.
12439 (build_binary_op): Don't do initial decay or default
12440 conversions on overloaded functions.
12441 (build_static_cast): Don't do a decay conversion here.
12442
12443 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12444
12445 PR c++/3543
12446 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12447 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12448
12449 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12450
12451 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12452 (create_vtbl_ptr): ... here.
12453
12454 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12455
12456 * class.c (build_vbase_offset_vbtl_entries): Look for
12457 non-primary base of which we are a sub vtable.
12458
12459 2001-07-24 Phil Edwards <pme@sources.redhat.com>
12460
12461 * semantics.c (finish_this_expr): Remove unused code.
12462
12463 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
12464
12465 Simplify rtti, now we've only one ABI.
12466 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12467 CPTI_TINFO_VAR_ID.
12468 (tinfo_decl_id, tinfo_var_id): Remove.
12469 (get_typeid_1): Remove.
12470 * rtti.c
12471 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12472 (typeid_ok_p): New function.
12473 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12474 (get_tinfo_decl): Remove old abi documentation.
12475 (tinfo_from_decl): Remove.
12476 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12477 (get_typeid_1): Remove.
12478 (get_base_offset): Remove.
12479 (synthesize_tinfo_var): Absorb get_base_offset.
12480 (create_real_tinfo_var): Don't use tinfo_decl_id.
12481
12482 2001-07-23 Graham Stott <grahams@redhat.com>
12483
12484 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12485 variable has_two_argument_delete_p.
12486
12487 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
12488
12489 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12490 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12491 (CPTI_INDEX_IDENTIFIER): Remove.
12492 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12493 (delta2_identifier): Remove.
12494 (index_identifier): Remove.
12495 (pfn_or_delta2_identifier): Remove.
12496 (flag_vtable_thunks): Remove.
12497 (VTABLE_DELTA2_NAME): Remove.
12498 (VTABLE_INDEX_NAME): Remove.
12499 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12500 (vfunc_ptr_type_node): Adjust.
12501 (VTABLE_NAME_PREFIX): Adjust.
12502 (build_vfn_ref): Lose first parameter.
12503 (fixup_all_virtual_upcast_offsets): Remove.
12504 * decl.c (initialize_predefined_identifiers): Remove
12505 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12506 (init_decl_processing): Remove no-vtable-thunk code.
12507 * decl2.c (flag_vtable_thunks): Remove.
12508 (mark_vtable_entries): Remove no-vtable-thunk code.
12509 * error.c (dump_decl): Remove no-vtable-thunk code.
12510 (dump_expr): Adjust ptr to member function code.
12511 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12512 code.
12513 * rtti.c (build_headof): Remove no-vtable-thunk code.
12514 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12515 * search.c (get_base_distance): Remove expand_upcast_fixups case.
12516 (virtual_context) Remove.
12517 (expand_upcast_fixups): Remove.
12518 (fixup_virtual_upcast_offsets): Remove.
12519 (fixup_all_virtual_upcast_offsets): Remove.
12520 * typeck.c (get_member_function_from_ptrfunc): Remove
12521 no-vtable-thunk code.
12522 * call.c (build_over_call): Adjust call to build_vfn_ref.
12523 * class.c (build_vfn_ref): Lose first parameter. Remove
12524 no-vtable-thunk code.
12525 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12526 (build_vtable_entry): Remove no-vtable-thunk code.
12527
12528 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
12529
12530 Remove old-abi remnants. Remove comments about old abi
12531 behavior. Remove references to 'new-abi' in comments.
12532 * cp-tree.h: Adjust comments.
12533 (vbase_offsets_in_vtable_p): Delete.
12534 (vcall_offsets_in_vtable_p): Delete.
12535 (vptrs_present_everywhere_p): Delete.
12536 (all_overridden_vfuns_in_vtables_p): Delete.
12537 (merge_primary_and_secondary_vtables_p): Delete.
12538 (TYPE_CONTAINS_VPTR_P): Adjust.
12539 (VTT_NAME_PREFIX): Remove.
12540 (CTOR_VTBL_NAME_PREFIX): Remove.
12541 (init_vbase_pointers): Remove.
12542 * class.c: Adjust coments.
12543 (build_vbase_pointer_fields): Delete.
12544 (build_vbase_pointer): Remove old-abi code.
12545 (build_secondary_vtable): Likewise.
12546 (modify_all_vtables): Likewise.
12547 (create_vtable_ptr): Likewise.
12548 (layout_class_type): Likewise.
12549 (finish_struct_1): Likewise.
12550 (finish_vtbls): Likewise.
12551 (dfs_finish_vtbls): Delete.
12552 (build_vbase_offset_vtbl_entries): Remove old-abi code.
12553 * cvt.c: Adjust comments.
12554 * decl.c: Adjust comments.
12555 * decl2.c: Adjust comments.
12556 * init.c: Adjust comments.
12557 (construct_virtual_bases): Remove old-abi code.
12558 * lang-specs.h: Remove -fno-new-abi.
12559 * mangle.c: Adjust comments.
12560 * rtti.c: Adjust comments.
12561 (get_base_offset): Remove old-abi-code.
12562 * search.c: Adjust comments.
12563 (dfs_init_vbase_pointers): Remove.
12564 (dfs_vtable_path_unmark): Remove.
12565 (init_vbase_pointers): Remove.
12566 * semantics.c: Adjust comments.
12567 (emit_associated_thunks): Remove old-abi code.
12568 * typeck.c: Adjust comments.
12569
12570 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
12571
12572 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12573 params.h.
12574
12575 2001-07-19 Mark Mitchell <mark@codesourcery.com>
12576
12577 * class.c (finish_struct_anon): Forbid nested classes.
12578
12579 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12580
12581 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12582 * optimize.c: Include debug.h.
12583 (maybe_clone_body): Use debug hook.
12584 * semantics.c: Include debug.h.
12585 (expand_body): Use debug hook.
12586
12587 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12588
12589 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12590
12591 2001-07-18 Mark Mitchell <mark@codesourcery.com>
12592
12593 * class.c (type_requires_array_cookie): New function.
12594 (check_methods): Don't try to figure out whether the type needs a
12595 cookie here.
12596 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12597 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12598 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12599 * pt.c (instantiate_class_template): Don't set
12600 TYPE_VEC_DELETE_TAKES_SIZE.
12601 * NEWS: Document ABI changes from GCC 3.0.
12602
12603 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
12604 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12605
12606 * NEWS (Changes in GCC 3.0): Fix typo.
12607
12608 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
12609
12610 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12611 which attributes are to be attached, and a flags argument. Update
12612 call to decl_attributes.
12613 (grokfield): Update call to decl_attributes.
12614 * class.c (finish_struct): Update call to cplus_decl_attributes.
12615 * cp-tree.h (cplus_decl_attributes): Update prototype.
12616 * decl.c (start_decl, grokdeclarator, start_function): Update
12617 calls to decl_attributes and cplus_decl_attributes.
12618 * friend.c (do_friend): Update call to cplus_decl_attributes.
12619 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12620
12621 2001-07-12 Mark Mitchell <mark@codesourcery.com>
12622
12623 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12624 for `register' variables with an asm-specification.
12625
12626 2001-07-11 Mark Mitchell <mark@codesourcery.com>
12627
12628 * semantics.c (finish_asm_stmt): Mark the output operands
12629 to an asm addressable, if necessary.
12630
12631 2001-07-11 Ben Elliston <bje@redhat.com>
12632
12633 * Revert this change -- there is a subtle bug.
12634
12635 PR c++/80
12636 * decl.c (finish_enum): New "attributes" argument; pass it to
12637 cplus_decl_attributes. Use a narrower type if the enum is packed.
12638 * cp-tree.h (finish_enum): Adjust prototype.
12639 * parse.y (enum_head): New non-terminal.
12640 (structsp): Use it. Enums now may be preceded or followed by
12641 optional attributes -- pass their chained tree to finish_enum().
12642 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12643
12644 2001-07-10 Mark Mitchell <mark@codesourcery.com>
12645
12646 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12647 variables.
12648
12649 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
12650
12651 * semantics.c (cp_expand_stmt): Fix for null
12652 current_function_return_value.
12653
12654 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
12655
12656 * call.c (build_op_delete_call): Initialize fn.
12657 (convert_like_real): Delete conditional.
12658 (joust): Initialize *w and *l.
12659 * class.c: Add prototype for binfo_ctor_vtable.
12660 (get_primary_binfo): Initialize result.
12661 * init.c (build_java_class_ref): Initialize name.
12662
12663 2001-07-09 Erik Rozendaal <dlr@acm.org>
12664
12665 * typeck.c (unary_complex_lvalue): Do not duplicate the
12666 argument to modify, pre-, or post-increment when used as an
12667 lvalue and when the argument has side-effects.
12668
12669 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12670
12671 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12672 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
12673 cplus_decl_attributes even if attrs is NULL.
12674 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12675
12676 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12677
12678 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12679 calls to decl_attributes.
12680
12681 2001-07-06 Ira Ruben <ira@apple.com>
12682
12683 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12684 be DECL_TEMPLATE_RESULT.
12685
12686 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12687
12688 * cp-tree.h (copy_template_template_parm): Rename to ...
12689 (bind_template_template_parm): ... here.
12690 * tree.c (copy_template_template_parm): Rename to ...
12691 (bind_template_template_parm): ... here. Remove the case when
12692 NEWARGS is NULL_TREE.
12693 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12694 BOUND_TEMPLATE_TEMPLATE_PARM.
12695 * pt.c (lookup_template_class): Adjust.
12696
12697 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
12698
12699 * cvt.c (convert_lvalue): New fn.
12700 * cp-tree.h: Declare it.
12701 * method.c (do_build_assign_ref): Use it.
12702 (do_build_copy_constructor): Convert parm to base types
12703 before calling base constructors.
12704
12705 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12706 DECL_USER_ALIGN. Check flag_elide_constructors instead of
12707 optimize.
12708 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12709
12710 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
12711
12712 * optimize.c (optimize_inline_calls): New function, broken out
12713 of ...
12714 (optimize_function): ... here. Call it. Don't inline if it is
12715 a thunk.
12716 (dump_function): Print name of dump flag causing this dump.
12717 * semantics.c (expand_body): Move thunk inline check to
12718 optimize_function.
12719
12720 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
12721
12722 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12723 (comptypes): Use target.comp_type_attributes.
12724
12725 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
12726
12727 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12728
12729 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12730
12731 * error.c (lang_print_error_function): Add a `diagnostic_context *'
12732 parameter. Tweak.
12733
12734 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12735
12736 * decl2.c (import_export_class): Update.
12737
12738 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12739
12740 * error.c (init_error): Adjust settings.
12741
12742 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12743
12744 * error.c (init_error): Adjust settings.
12745
12746 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
12747
12748 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12749 return pointers to data members by reference rather than by value.
12750
12751 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
12752
12753 Implement the Named Return Value optimization.
12754 * cp-tree.h (struct cp_language_function): Add x_return_value.
12755 (current_function_return_value): Now a macro.
12756 * decl.c: Don't define it.
12757 (define_label, finish_case_label): Don't clear it.
12758 (init_decl_processing): Don't register it with GC.
12759 * semantics.c (genrtl_finish_function): Don't check it for
12760 no_return_label. Copy the RTL from the return value to
12761 current_function_return_value and walk, calling...
12762 (nullify_returns_r): ...this new fn.
12763 * typeck.c (check_return_expr): Set current_function_return_value.
12764
12765 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
12766
12767 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12768 sharing a ctor vtable with. Merge code for cases 1 and 2.
12769 (binfo_ctor_vtable): New fn.
12770 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12771
12772 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
12773
12774 * class.c (dfs_find_final_overrider): Fix logic.
12775
12776 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12777 virtual thunk instead of non-virtual.
12778 (get_matching_virtual): Uncomment.
12779
12780 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12781 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
12782 PARM, not ARG.
12783
12784 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
12785
12786 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12787 we've not emerged from the hierarchy of RTTI_BINFO on reaching
12788 a non-virtual base.
12789
12790 2001-06-13 Mark Mitchell <mark@codesourcery.com>
12791
12792 * NEWS: Update release number.
12793
12794 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12795
12796 PR c++/3130, c++/3131, c++/3132
12797 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12798 * class.c (force_canonical_binfo_r): Move
12799 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12800 virtual bases unless they're primary and what they're primary
12801 too has been moved.
12802 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12803 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12804 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12805 derived binfo.
12806 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12807 (layout_nonempty_base_or_field): Add most derived type
12808 parameter. Adjust.
12809 (layout_empty_base): Likewise.
12810 (build_base_field): Likewise.
12811 (build_base_fields): Likewise.
12812 (propagate_binfo_offsets): Add most derived type
12813 parameter. Skip non canonical virtual bases too.
12814 (dfs_set_offset_for_unshared_vbases): Don't skip primary
12815 bases. Do skip canonical bases.
12816 (layout_virtual_bases): Adjust.
12817 (layout_class_type): Adjust.
12818 (dfs_get_primary_binfo): Build list of virtual primary base
12819 candidates.
12820 (get_primary_binfo): Check that the shared virtual primary
12821 base candidate was found first.
12822 (accumulate_vtbl_inits): Don't do anything for non-vptr
12823 containing binfos. For case 1 primary virtual bases, keep
12824 checking that we've not emerged from the hierarchy of RTTI_BINFO.
12825
12826 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12827
12828 PR c++/3089
12829 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12830 hierarchy looking for primary bases for a ctor
12831 vtable. Recursively call oneself, if we meet our primary via
12832 this route and haven't met it yet via inheritance graph order.
12833
12834 2001-06-11 Mark Mitchell <mark@codesourcery.com>
12835
12836 * lang-options.h: Emit documentation for -fno-honor-std, not
12837 -fhonor-std.
12838
12839 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
12840
12841 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12842 Don't clobber delta.
12843 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12844
12845 2001-06-10 Mark Mitchell <mark@codesourcery.com>
12846 Gabriel Dos Reis <gdr@codesourcery.com>
12847
12848 * Make-lang.in (cp/call.o): Depend on diagnostic.h
12849 (cp/typeck.o): Depend on diagnostic.h
12850 (cp/typeck2.o): Depend on diagnostic.h
12851 (cp/repo.o): Depend on dignostic.h
12852 * typeck.c: #include diagnostic.h
12853 (convert_for_initialization): Remove extern declaration for
12854 warningcount and errorcount.
12855
12856 * call.c: #include diagnostic.h
12857 (convert_like_real): Remove extern declaration for warnincount and
12858 errorcount.
12859
12860 * repo.c: #include diagnostic.h
12861 * typeck2.c: #include diagnostic.h
12862
12863 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12864
12865 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12866 in previous change.
12867
12868 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12869
12870 PR c++/2929
12871 * friend.c (do_friend): Use push_decl_namespace for classes at
12872 namespace scope.
12873
12874 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12875 Jason Merrill <jason_merrill@redhat.com>
12876
12877 PR c++/3061
12878 * class.c (build_secondary_vtable): Use assert, rather than an error
12879 message.
12880 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12881 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12882 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12883 Don't set BINFO_VTABLE for a primary virtual base.
12884
12885 2001-06-07 Mark Mitchell <mark@codesourcery.com>
12886
12887 * decl.c (duplicate_decls): Update source position information
12888 when a template function is defined.
12889
12890 2001-06-07 Phil Edwards <pme@sources.redhat.com>
12891
12892 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
12893
12894 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
12895
12896 PR c++/2914
12897 * decl.c (pushtag): Don't push into a complete type's scope.
12898
12899 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
12900
12901 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12902 (struct lang_decl_flags): Lose generate_with_vtable_p.
12903 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12904 * class.c (copy_virtuals): Adjust.
12905 * decl2.c (mark_vtable_entries): Adjust.
12906 * method.c (make_thunk, build_vtable_entry): Adjust.
12907 * class.c (update_vtable_entry_for_fn): Only look as far as the
12908 first defining class.
12909 (build_vtbl_initializer): Put nothing in the slot for a function only
12910 defined in a lost primary virtual base.
12911 (add_vcall_offset_vtbl_entries_1): Use the same code for
12912 the lost primary case and the normal case.
12913 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12914 (get_vfield_offset, get_derived_offset): Lose.
12915 (dfs_find_final_overrider): Use look_for_overrides_here.
12916 (get_matching_virtual): New fn.
12917 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12918 not BV_VCALL_INDEX.
12919 * search.c (look_for_overrides_here): Split out from...
12920 (look_for_overrides_r): Here.
12921
12922 * class.c (find_final_overrider): Return error_mark_node on error.
12923
12924 * decl2.c (key_method): #if 0 accidental change.
12925
12926 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
12927
12928 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12929 (build_over_call): Likewise.
12930 * decl.c (grokparms): Likewise.
12931 * pt.c (tsubst_decl): Likewise.
12932 * typeck.c (convert_arguments): Likewise.
12933
12934 2001-06-05 Mark Mitchell <mark@codesourcery.com>
12935
12936 * semantics.c (begin_class_definition): Robustify.
12937
12938 * pt.c (instantiate_decl): Tell the repository code about the
12939 clones, not the cloned functions.
12940 * repo.c (repo_template_used): Explicitly instantiate the cloned
12941 function, not the clones.
12942
12943 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12944
12945 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12946 ICS_BAD_FLAG on created conversion.
12947 (compare_ics): Break out rank.
12948
12949 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12950
12951 * decl.c (xref_tag): Remove extraneous %s on dependent name
12952 lookup warning.
12953
12954 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12955
12956 * class.c (layout_vtable_decl): Fix off by one error on
12957 build_index_type.
12958 (build_vtt): Likewise.
12959 (build_ctor_vtbl_group): Likewise.
12960
12961 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12962
12963 * class.c (maybe_indent_hierarchy): New function.
12964 (dump_class_hierarchy_r): Add flags. Dump extra binfo
12965 information, if enabled. Use maybe_indent_hierarchy. Adjust
12966 output format.
12967 (dump_class_hierarchy): Adjust prototype. Adjust output format.
12968 (dump_array, dump_vtable, dump_vtt): New functions.
12969 (finish_struct_1): Adjust hierarchy dumping.
12970 (initialize_vtable): Call dump_vtable.
12971 (build_vtt): Call dump_vtt.
12972 (build_ctor_vtbl_group): Call dump_vtable.
12973 * decl2.c (flag_dump_class_layout): Remove.
12974 (cxx_decode_option): Remove dump translation unit
12975 and dump class hierarchy check. Call dump_switch_p.
12976 (finish_file): Adjust dumping.
12977 (dump.c): Only dump base classes if not TDF_SLIM.
12978 Only dump namespace members if not TDF_SLIM.
12979 * optimize.c (dump_function): New function.
12980 (optimize_function): Call dump_function.
12981 * semantics.c (expand_body): Use dump_enabled_p.
12982
12983 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
12984
12985 PR g++/2936
12986 Part missed from first commit
12987 * decl2.c (finish_anon_union): Copy context.
12988
12989 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
12990
12991 PR g++/2936
12992 * optimize.c (remap_decl): Remap anonymous aggregate members too.
12993
12994 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
12995
12996 PR g++/2823
12997 * semantics.c (expand_body): Don't optimize thunks.
12998
12999 2001-05-25 Sam TH <sam@uchicago.edu>
13000
13001 * cp-tree.h lex.h: Fix header include guards.
13002
13003 2001-05-25 Mark Mitchell <mark@codesourcery.com>
13004
13005 * decl.c (init_decl_processing): Tweak.
13006
13007 2001-05-24 Mark Mitchell <mark@codesourcery.com>
13008
13009 * decl.c (duplicate_decls): Tidy.
13010 (init_decl_processing): Always set flag_no_builtin.
13011
13012 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
13013
13014 PR c++/2184
13015 * decl2.c (do_local_using_decl): Push the decls, even in a
13016 template.
13017
13018 2001-05-22 Mark Mitchell <mark@codesourcery.com>
13019
13020 * optimize.c (initialize_inlined_parameters): Don't set
13021 TREE_READONLY for a VAR_DECL taking the place of an inlined
13022 PARM_DECL.
13023
13024 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
13025
13026 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
13027 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
13028 attribute.
13029
13030 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
13031
13032 * parse.y: Refer to compound literals as such, not as
13033 constructor-expressions.
13034
13035 2001-05-21 Mark Mitchell <mark@codesourcery.com>
13036
13037 * call.c (build_op_delete_call): Ignore exception-specifications
13038 when looking for matching delete operators.
13039 * init.c (build_new_1): Compute whether or not the allocation
13040 function used is a placement allocation function or not, and
13041 communicate this information to build_op_delete_call.
13042
13043 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
13044
13045 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
13046 (build_vtbl_ref): Adjust.
13047 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
13048 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
13049 Re-add vtable-gc.
13050 (unsupported_options): Correspondingly.
13051
13052 * decl2.c (maybe_make_one_only): Check flag_weak, not
13053 supports_one_only().
13054
13055 * cp-tree.def (START_CATCH_STMT): Lose.
13056 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
13057 * tree.c (cp_statement_code_p): Don't case it.
13058 * semantics.c (cp_expand_stmt): Likewise.
13059 * cp-tree.h (START_CATCH_TYPE): Lose.
13060 (HANDLER_TYPE): New.
13061 * except.c (expand_start_catch_block): Don't start any blocks.
13062 Return the type.
13063 (expand_end_catch_block): Don't end any blocks.
13064 * parse.y (handler): Don't pass anything from finish_handler_parms
13065 to finish_handler.
13066 * pt.c (tsubst_expr): Likewise.
13067 * semantics.c (begin_handler): Call note_level_for_catch here.
13068 (finish_handler_parms): Don't return anything.
13069 (genrtl_catch_block, begin_catch_block): Lose.
13070 (genrtl_handler): Call expand_start_catch here.
13071
13072 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
13073
13074 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
13075 (get_vtable_decl, build_vtt): Not here.
13076
13077 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
13078
13079 PR c++/2781
13080 * optimize.c (update_cloned_parm): Copy addressability and other
13081 flags.
13082
13083 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13084
13085 * pt.c (determine_specialization): Ignore artificial functions.
13086
13087 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
13088
13089 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
13090 (C_RID_CODE): Remove.
13091 * lex.c (cxx_init_options): Call set_identifier_size. Update.
13092 (init_parse): Don't do it here.
13093
13094 2001-05-18 Diego Novillo <dnovillo@redhat.com>
13095
13096 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
13097 function declaration to avoid stripping the symbol's attributes.
13098
13099 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
13100
13101 * decl.c (pushdecl): Adjust error string.
13102 (xref_tag): Adjust friend class injection warning. Remove the
13103 inherited name from the class shadowed scope.
13104
13105 2001-05-17 Mark Mitchell <mark@codesourcery.com>
13106
13107 * except.c (cp_protect_cleanup_actions): New function.
13108 (init_exception_processing): Don't set protect_cleanup_actions
13109 here. Do set lang_protect_cleanup_actions.
13110
13111 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13112
13113 * spew.c (read_token): Call yyerror on all unexpected tokens.
13114
13115 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13116
13117 * init.c (member_init_ok_or_else): Take a tree rather than
13118 string for name.
13119 (expand_member_init): Adjust.
13120
13121 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
13122
13123 * decl.c (duplicate_decls): Suppress warning about duplicate
13124 decls if the first decl is a friend.
13125
13126 2001-05-12 Zack Weinberg <zackw@stanford.edu>
13127
13128 * except.c (choose_personality_routine): Export. Add
13129 explanatory comment. Take an enum languages, not a boolean.
13130 (initialize_handler_parm): Adjust to match.
13131 * cp-tree.h: Prototype choose_personality_routine.
13132 * lex.c (handle_pragma_java_exceptions): New function.
13133 (init_cp_pragma): Register #pragma GCC java_exceptions.
13134
13135 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
13136
13137 * method.c (build_mangled_C99_name): Remove unused prototype.
13138
13139 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
13140
13141 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
13142 * typeck.c (get_member_function_from_ptrfunc,
13143 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
13144 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
13145
13146 Reverted Geoff Keating's 2001-05-03's patch.
13147
13148 2001-05-11 Ira Ruben <ira@apple.com>
13149
13150 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
13151
13152 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
13153
13154 * cp-tree.h (finish_label_expr, lookup_label): Delete.
13155 * parse.y: Update for '&&'; don't issue warning here.
13156 * semantics.c (finish_label_expr): Delete.
13157
13158 2001-05-07 Mark Mitchell <mark@codesourcery.com>
13159
13160 * splay-tree.h (splay_tree_max): New function.
13161 (splay_tree_min): Likewise.
13162
13163 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
13164
13165 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
13166 (pfn_vflag_identifier): Define.
13167 Update comment about layout of pointer functions.
13168 (build_ptrmemfunc1): Update prototype.
13169 (expand_ptrmemfunc_cst): Update prototype.
13170 * decl.c (initialize_predefined_identifiers): Initialize
13171 pfn_vflag_identifier.
13172 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
13173 an extra field to the type.
13174 * expr.c (cplus_expand_constant): Pass 'flag' between
13175 expand_ptrmemfunc_cst and build_ptrmemfunc1.
13176 * typeck.c (get_member_function_from_ptrfunc): When
13177 FUNCTION_BOUNDARY < 16, look at additional field to determine
13178 if a pointer-to-member is a real pointer or a vtable offset.
13179 (build_ptrmemfunc1): Add new parameter to contain extra field.
13180 (build_ptrmemfunc): Pass the extra field around.
13181 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
13182 (pfn_from_ptrmemfunc): Ignore the extra field.
13183
13184 2001-05-03 Mark Mitchell <mark@codesourcery.com>
13185
13186 * cp-tree.h (flag_inline_trees): Update documentation.
13187 * decl.c (init_decl_processing): Adjust handling of
13188 flag_inline_functions and flag_inline_trees to support -O3.
13189 (grokfndecl): Set DECL_INLINE on all functions if that's what
13190 the user requested.
13191 (save_function_data): Clear DECL_INLINE in
13192 current_function_cannot_inline is non-NULL.
13193 * decl2.c (flag_inline_trees): Update documentation.
13194
13195 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
13196
13197 * dump.c (cp_dump_tree, USING_STMT case): New case.
13198 * tree.c (cp_statement_code_p): Add USING_STMT.
13199 * decl2.c (do_using_directive): Add the using directive statement.
13200
13201 * tree.c (walk_tree): Reformat an if block.
13202
13203 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13204
13205 * decl.c (compute_array_index_type): Don't try to do anything with
13206 the indices when processing a template.
13207
13208 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13209
13210 * call.c: NULL_PTR -> NULL.
13211 * class.c: Likewise.
13212 * cvt.c: Likewise.
13213 * decl.c: Likewise.
13214 * decl2.c: Likewise.
13215 * except.c: Likewise.
13216 * init.c: Likewise.
13217 * rtti.c: Likewise.
13218 * search.c: Likewise.
13219 * tree.c: Likewise.
13220 * typeck.c: Likewise.
13221 * typeck2.c: Likewise.
13222
13223 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13224
13225 * decl2.c (do_using_directive): Revert previous patch.
13226
13227 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13228
13229 * cp-tree.def (USING_STMT): New statement node.
13230 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13231 * decl2.c (do_using_directive): Add USING_STMT to statement
13232 tree. Don't emit errors when processing template decl.
13233 * pt.c (tsubst_expr, USING_STMT case): New case.
13234 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13235
13236 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13237
13238 * call.c (build_new_op): Convert args from reference here.
13239 (build_conditional_expr): Don't convert here.
13240
13241 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13242
13243 * spew.c (last_token_id): New static variable.
13244 (read_token): Set it here.
13245 (yyerror): Use it here.
13246
13247 2001-04-30 Richard Henderson <rth@redhat.com>
13248
13249 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13250 * decl.c: Likewise.
13251
13252 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13253
13254 * gxxint.texi: Remove.
13255 * Make-lang.in: Remove all traces of gxxint.texi.
13256
13257 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
13258
13259 * decl2.c (start_static_initialization_or_destruction): Correct
13260 logic to handle the -fno-use-cxa-atexit case.
13261
13262 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13263
13264 * optimize.c (update_cloned_parm): New function.
13265 (maybe_clone_body): Use it. Update the `this' parameter too.
13266
13267 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
13268
13269 * decl2.c (unsupported_options): Add new-abi.
13270 * lang-options.h: Remove no longer supported options.
13271
13272 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13273
13274 * except.c (can_convert_eh): Don't check template parms,
13275 typename types etc.
13276
13277 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13278
13279 * optimize.c (maybe_clone_body): Copy parameter names and locations.
13280
13281 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13282
13283 * cp-tree.h (adjust_clone_args): Prototype new function.
13284 * class.c (adjust_clone_args): New function.
13285 * decl.c (start_function): Call it for in charge ctors.
13286
13287 2001-04-26 Mark Mitchell <mark@codesourcery.com>
13288
13289 * method.c (use_thunk): Make sure that thunks really are emitted
13290 when requested.
13291
13292 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
13293
13294 * mangle.c (write_chars): New macro.
13295 (hwint_to_ascii): New function
13296 (write_number): Use it.
13297 (write_integer_cst): Deal with really big numbers.
13298
13299 2001-04-25 Mark Mitchell <mark@codesourcery.com>
13300
13301 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13302 the clone.
13303
13304 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
13305
13306 * decl.c (grokdeclarator): Set context of namespace scope
13307 TYPE_DECLS.
13308
13309 2001-04-24 Zack Weinberg <zackw@stanford.edu>
13310
13311 * cp/optimize.c: Include hashtab.h.
13312 (struct inline_data): Add tree_pruner.
13313 (expand_call_inline, expand_calls_inline): Use it when calling
13314 walk_tree.
13315 (optimize_function): Initialize and free tree_pruner.
13316
13317 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13318
13319 Lazy __FUNCTION__ generation.
13320 * cp-tree.def (FUNCTION_NAME): Remove.
13321 * cp-tree.h (function_name_declared_p): Remove.
13322 (cp_fname_init): Prototype.
13323 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13324 don't call declare_function_name. Call start_fname_decls.
13325 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13326 clobber the line number.
13327 (cp_fname_init): New function.
13328 (start_function): Call start_fname_decls.
13329 (finish_function): Call finish_fname_decls.
13330 * lex.c (reswords): Add slots for __FUNCTION__ et al.
13331 (rid_to_yy): Add mappings for __FUNCTION__ et al.
13332 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13333 * parse.y (VAR_FUNC_NAME): New token.
13334 (primary): Add VAR_FUNC_NAME.
13335 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13336 generation.
13337 (tsubst, FUNCTION_NAME case): Remove.
13338 (tsubst_copy, FUNCTION_NAME case): Remove.
13339 (tsubst_expr, DECL_STMT case): Be careful with a
13340 DECL_PRETTY_FUNCTION_P.
13341 (instantiate_decl): Remove function_name_declared_p.
13342 * semantics.c (begin_compound_statement): Don't call
13343 declare_function_name here.
13344 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13345 (finish_translation_unit): Call finish_fname_decls.
13346 (expand_body): Remove function_name_declared_p.
13347 * typeck2.c (digest_init): Allow any ERROR_MARK.
13348
13349 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13350
13351 * pt.c (tsubst_decl): Use VOID_TYPE_P.
13352 * semantics.c: Fix some typos.
13353
13354 2001-04-23 Phil Edwards <pme@sources.redhat.com>
13355
13356 * cp/decl2.c (flag_honor_std): Always initialize to 1.
13357
13358 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13359
13360 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13361
13362 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
13363
13364 * except.c (build_throw): Wrap the initialization of the exception
13365 object in a MUST_NOT_THROW_EXPR.
13366 (do_free_exception): #if 0.
13367
13368 2001-04-20 Mark Mitchell <mark@codesourcery.com>
13369
13370 * cp-tree.h (finish_enum): Change prototype.
13371 * decl.c (finish_enum): Reorganize.
13372 * parse.y (structsp): Adjust calls to finish_enum.
13373
13374 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13375
13376 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13377 't' case.
13378
13379 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13380
13381 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13382 (layout_empty_base): Return at end flag.
13383 (build_base_field): Likewise.
13384 (build_base_fields): Likewise.
13385 (layout_virtual_bases): Don't add 1 to eoc value.
13386 (end_of_class): Use full size for empty bases.
13387 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13388 empty bases. Don't add 1 to eoc value. Only add trailing padding
13389 if we're an empty class with no empty bases.
13390 (dump_class_hierarchy): Dump size and alignment.
13391
13392 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13393
13394 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13395 ICS_BAD_FLAG.
13396
13397 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13398
13399 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13400 is found, look first if name does not match the structure name.
13401
13402 2001-04-19 Mark Mitchell <mark@codesourcery.com>
13403
13404 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13405 set.
13406 (SET_DECL_LANGUAGE): New macro.
13407 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13408 (pushdecl): Likewise.
13409 (build_library_fn_1): Likewise.
13410 (build_cp_library_fn): Likewise.
13411 (grokfndecl): Likewise.
13412 (grokvardecl): Mark `extern "C"' variables as having C linkage.
13413 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13414 * lex.c (retrofit_lang_decl): Likewise.
13415 * mangle.c (mangle_decl_string): Don't mangle the names of
13416 variables declared with C language linkage.
13417 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13418
13419 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
13420
13421 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13422 flag_access_control from uninitialized storage.
13423
13424 2001-04-15 Mark Mitchell <mark@codesourcery.com>
13425
13426 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13427 * mangle.c (write_pointer_to_member_type): Fix mangling of
13428 pointers to cv-qualified member function types.
13429
13430 * init.c (build_delete): Create a SAVE_EXPR for the address if
13431 we're going to use it more than once.
13432
13433 2001-04-13 Mark Mitchell <mark@codesourcery.com>
13434
13435 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13436 (expand_ptremfunc_cst): Change prototype.
13437 (delta2_from_ptrmemfunc): Remove.
13438 * expr.c (cplus_expand_constant): Adjust call to
13439 expand_ptrmemfunc_cst.
13440 * typeck.c (build_ptrmemfunc1): Simplify.
13441 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13442 results in a constant.
13443 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13444 (delta2_from_ptrmemfunc): Remove.
13445 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13446
13447 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
13448
13449 * cp-tree.h (decl_namespace_list): New macro.
13450 (struct saved_scope): Add decl_ns_list.
13451 * decl.c (mark_saved_scope): Mark it.
13452 * decl2.c: Lose static decl_namespace_list.
13453 (init_decl2): Don't save it.
13454
13455 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13456
13457 * cp-tree.h (warn_return_type, yylex): Delete redundant
13458 declarations.
13459
13460 * decl.c (current_class_depth, global_namespace): Likewise.
13461
13462 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13463
13464 * repo.c (flag_use_repository): Likewise.
13465
13466 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13467
13468 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13469 set_block, pushdecl, getdecls, gettags, init_decl_processing,
13470 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13471 lvalue_or_else, print_lang_statistics, comp_target_types,
13472 unsigned_type, signed_type, signed_or_unsigned_type,
13473 build_function_call, mark_addressable, incomplete_type_error):
13474 Delete redundant declarations.
13475
13476 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
13477
13478 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13479 (TYPE_ANONYMOUS_P): New macro.
13480 (TAGGED_TYPE_P): New macro.
13481 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13482 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13483 * tree.c (no_linkage_helper): Likewise.
13484 * semantics.c (begin_class_definition): Likewise.
13485 * pt.c (convert_template_argument): Likewise.
13486 * lex.c (check_for_missing_semicolon): Likewise.
13487
13488 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13489
13490 * class.c (dfs_unshared_virtual_bases): New function.
13491 (mark_primary_bases): Call it.
13492 (check_bases): Ignore virtual bases when determining
13493 nearly-emptiness.
13494
13495 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13496
13497 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13498
13499 2001-04-11 Mark Mitchell <mark@codesourcery.com>
13500
13501 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13502 cloned function to the clone.
13503
13504 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13505
13506 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13507
13508 * semantics.c: Include expr.h.
13509
13510 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
13511
13512 * method.c (implicitly_declare_fn): Commonize code for copy ctor
13513 and assignment op. Set TREE_USED for parameter.
13514
13515 2001-04-10 Mark Mitchell <mark@codesourcery.com>
13516
13517 * class.c (find_final_overrider_data): Add `candidates'.
13518 (dfs_find_final_overrider): Don't issue error messages
13519 prematurely.
13520 (find_final_overrider): Issue error messages here.
13521 (build_base_field): Don't warn about amgibuous direct bases here.
13522 (warn_about_ambiguous_direct_bases): New function.
13523 (layout_class_type): Use it.
13524
13525 2001-04-10 Richard Henderson <rth@redhat.com>
13526
13527 * typeck.c (build_array_ref): Push the array reference inside
13528 COMPOUND_EXPR and COND_EXPR.
13529
13530 2001-04-05 Mark Mitchell <mark@codesourcery.com>
13531
13532 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13533 * decl.c (duplicate_decls): Adjust accordingly.
13534 (maybe_commonize_var): Likewise.
13535 (grokfndecl): Likewise.
13536 (start_function): Likewise.
13537 (start_method): Likewise.
13538 * decl2.c (key_method): Likewise.
13539 (import_export_decl): Likewise.
13540 * method.c (implicitly_declare_fn): Likewise.
13541 * optimize.c (maybe_clone_body): Likewise.
13542
13543 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
13544
13545 * lang-specs.h: Add __DEPRECATED.
13546
13547 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
13548
13549 * search.c (get_dynamic_cast_base_type): When building a new
13550 constant, set its type to ssizetype.
13551
13552 2001-04-04 Jakub Jelinek <jakub@redhat.com>
13553
13554 * optimize.c (expand_call_inline): Only add newly inlined statements
13555 into inlined_stmts.
13556
13557 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13558
13559 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13560 (OPERATOR_FORMAT): Likewise.
13561 (OPERATOR_TYPENAME_FORMAT): Likewise.
13562 * operators.def: Remove old name-mangling information.
13563 * decl.c (grok_op_properties): Adjust accordingly.
13564 * lex.c (init_operators): Likewise.
13565 * rtti.c (get_tinfo_decl): Issue error messages about types that
13566 have variable size.
13567
13568 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13569
13570 * decl2.c (import_export_decl): Don't call import_export_class
13571 when processing an inline member function.
13572 * semantics.c (expand_body): Call import_export_decl before
13573 emitting inline functions.
13574
13575 2001-03-28 Richard Henderson <rth@redhat.com>
13576
13577 IA-64 ABI Exception Handling:
13578 * cp-tree.def (EH_SPEC_BLOCK): New.
13579 (MUST_NOT_THROW_EXPR): New.
13580 * cp-tree.h: Update changed function declarations.
13581 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13582 (CPTI_CALL_UNEXPECTED): New.
13583 (struct cp_language_function): Rename x_eh_spec_try_block
13584 to x_eh_spec_block.
13585 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13586 * decl.c (current_binding_level): If no current function
13587 bindings, revert to scope_chain.
13588 (initialize_predefined_identifiers): Remove __cp_push_exception.
13589 (store_parm_decls): Use begin_eh_spec_block.
13590 (finish_function): Use finish_eh_spec_block.
13591 (mark_lang_function): Update for name changes.
13592 * decl2.c (finish_file): No mark_all_runtime_matches.
13593 * dump.c (cp_dump_tree): Handle new tree codes.
13594 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13595 * except.c (catch_language_init, catch_language): Remove.
13596 (init_exception_processing): Don't set language code.
13597 Initialize call_unexpected_node, protect_cleanup_actions,
13598 eh_personality_libfunc, lang_eh_runtime_type.
13599 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13600 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13601 (prepare_eh_type): Split out type canonicalizations ...
13602 (build_eh_type_type): ... from here.
13603 (build_eh_type_type_ref): Remove.
13604 (mark_all_runtime_matches): Remove.
13605 (build_exc_ptr): New.
13606 (do_begin_catch, do_end_catch): New.
13607 (do_pop_exception): Remove.
13608 (build_terminate_handler): Remove.
13609 (choose_personality_routine): Split out language choice from ...
13610 (initialize_handler_parm): ... here.
13611 Use MUST_NOT_THROW_EXPR.
13612 (expand_start_catch_block): Use do_begin_catch. Simplify Java
13613 exception object handling.
13614 (expand_start_eh_spec, expand_end_eh_spec): Remove.
13615 (expand_exception_blocks, alloc_eh_object): Remove.
13616 (begin_eh_spec_block, finish_eh_spec_block): New.
13617 (do_allocate_exception, do_free_exception): New.
13618 (expand_throw): Merge into ...
13619 (build_throw): ... here. Update for abi.
13620 * expr.c (cplus_expand_expr): No expand_internal_throw.
13621 Handle MUST_NOT_THROW_EXPR.
13622 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13623 * semantics.c (*) Update for except.h name changes.
13624 (genrtl_try_block): No protect_with_terminate.
13625 (genrtl_eh_spec_block): New.
13626 (genrtl_handler): Don't emit the goto here.
13627 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13628 (genrtl_finish_function): Don't expand_exception_blocks.
13629 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13630
13631 2001-03-28 Richard Henderson <rth@redhat.com>
13632
13633 * decl.c (struct named_label_list): Rename eh_region to
13634 in_try_scope, add in_catch_scope.
13635 (struct binding_level): Rename eh_region to is_try_scope,
13636 add is_catch_scope.
13637 (note_level_for_try): Rename from note_level_for_eh.
13638 (note_level_for_catch): New.
13639 (poplevel): Copy both is_try_scope and is_catch_scope to
13640 the named_label_list struct.
13641 (check_previous_goto_1): Don't check for catch block via
13642 DECL_ARTIFICIAL; use in_try_scope instead.
13643 (check_goto): Likewise.
13644 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13645 * except.c (expand_start_catch_block): Call note_level_for_catch.
13646 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13647
13648 2001-03-27 Richard Henderson <rth@redhat.com>
13649
13650 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13651 exceptions_via_longjmp.
13652
13653 2001-03-27 Phil Edwards <pme@sources.redhat.com>
13654
13655 * pt.c (check_default_tmpl_args): Make error messages clearer.
13656
13657 2001-03-26 Phil Edwards <pme@sources.redhat.com>
13658
13659 * error.c: Also undefine 'A' macro used for cp_printers definition.
13660
13661 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13662
13663 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13664
13665 2001-03-26 Mike Yang <yang@research.att.com>
13666 Mark Mitchell <mark@codesourcery.com>
13667
13668 * dump.c (dump_access): New function.
13669 (cp_dump_tree): Use it. Dump basetype information for class
13670 types.
13671
13672 2001-03-26 Mark Mitchell <mark@codesourcery.com>
13673
13674 * Makefile.in (optimize.o): Depend on params.h.
13675 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13676 (init_decl_processing): Set flag_no_inline when doing
13677 inlining-on-trees.
13678 * optimize.c: Include params.h.
13679 (struct inline_data): Improve documentation of FNS. Add
13680 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13681 (INSNS_PER_STMT): New macro.
13682 (remap_block): Use CLONING_P.
13683 (inlinable_function_p): Don't inline big functions.
13684 (expand_call_inline): Keep track of how much inlining we've done.
13685 (optimize_function): Set FIRST_INLINED_FN.
13686 (maybe_clone_body): Set CLONING_P.
13687 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13688 tree nodes.
13689 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13690 rest_of_compilation. Clear DECL_RTL for local variables
13691 afterwards.
13692 (clear_decl_rtl): New function.
13693
13694 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
13695
13696 Implement DR 209
13697 * cp-tree.h (skip_type_access_control,
13698 reset_type_access_control): Prototype.
13699 * decl.c (grokdeclarator): Access of friends is not checked.
13700 * parse.y (component_decl_list): Reset type access control.
13701 * semantics.c (decl_type_access_control): Clear
13702 current_type_lookups.
13703 (save_type_access_control): Don't save if not deferring.
13704 (skip_type_access_control, reset_type_access_control): New
13705 functions.
13706 (begin_class_definition): Do type access control for basetypes.
13707 Start deferred access control.
13708 (finish_class_definition): Resume immediate access control if
13709 this is a local class.
13710
13711 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13712
13713 * class.c (add_method): Use memcpy/memmove, not bcopy.
13714
13715 * decl.c (duplicate_decls): Likewise.
13716
13717 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13718
13719 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13720 not `_'.
13721
13722 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13723
13724 * decl.c (local_names): Define.
13725 (push_local_name): New.
13726 (grok_reference_init): Return init if initializing static reference
13727 variable with non-constant instead of emitting it.
13728 Move expand_static_init call to cp_finish_decl.
13729 (layout_var_decl): Call push_local_name.
13730 (maybe_commonize_var): Allow inlining functions even if they have
13731 static local variables, use comdat_linkage for them if flag_weak.
13732 (check_initializer): Call obscure_complex_init if
13733 grok_reference_init returned nonzero.
13734 (save_function_data): Clear x_local_names.
13735 (pop_cp_function_context): Free x_local_names.
13736 (mark_inlined_fns): Remove.
13737 (mark_lang_function): Mark x_local_names.
13738 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13739 Mark inlined_fns as tree, remove call to mark_inlined_fns.
13740 * class.c (alter_access): Ensure DECL_ACCESS is never set if
13741 DECL_DISCRIMINATOR_P.
13742 * cp-tree.h (cp_language_function): Add x_local_names.
13743 (lang_decl_flags): Add discriminator into u2.
13744 (lang_decl_inlined_fns): Remove.
13745 (lang_decl): inlined_fns is now a TREE_VEC.
13746 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13747 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13748 TREE_VEC, not a custom structure.
13749 (optimize_function): Likewise.
13750 * mangle.c (discriminator_for_local_entity): Discriminate among
13751 VAR_DECL local entities.
13752 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13753 is not valid.
13754
13755 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
13756
13757 Add support for Java interface method calls.
13758 * cp-tree.h (struct lang_type): Add java_interface flag.
13759 (TYPE_JAVA_INTERFACE): New macro.
13760 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13761 by setting TYPE_JAVA_INTERFACE.
13762 * call.c (java_iface_lookup_fn): New static.
13763 (build_over_call): If calling a method declared in a
13764 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13765 expression which resolves the function address.
13766 (build_java_interface_fn_ref): New function.
13767
13768 2001-03-22 Richard Henderson <rth@redhat.com>
13769
13770 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13771 * except.c: Don't include it.
13772
13773 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13774 based on an idea from Joe Buck <jbuck@synopsys.com>
13775
13776 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13777 New nonterminals.
13778 (data_def, component_decl): Add reductions to bad_decl.
13779
13780 2001-03-22 Jakub Jelinek <jakub@redhat.com>
13781
13782 * method.c (do_build_assign_ref): Don't use build_modify_expr for
13783 anonymous aggregates, since they don't have assignment operator
13784 method.
13785 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13786 assignment operators for anonymous structure fields.
13787
13788 2001-03-21 Jason Merrill <jason@redhat.com>
13789
13790 * pt.c (instantiate_decl): Abort if we see a member constant
13791 instantiation that doesn't already have its initializer.
13792 Downgrade explicit instantiation without definition to pedwarn.
13793
13794 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13795 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13796 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13797
13798 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13799 (pending_vtables): Remove.
13800 * decl2.c (pending_vtables): Remove.
13801 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13802 CLASSTYPE_VTABLE_NEEDS_WRITING.
13803 (import_export_class): Likewise.
13804 (init_decl2): Don't mark pending_vtables.
13805 * lex.c (handle_pragma_vtable): Just sorry.
13806 * pt.c (instantiate_class_template): Don't mess with
13807 CLASSTYPE_VTABLE_NEEDS_WRITING.
13808 (mark_class_instantiated): Likewise.
13809 * ptree.c (print_lang_type): Don't print it.
13810 * semantics.c (begin_class_definition): Don't set it.
13811
13812 * pt.c (template_tail): Replace with last_pending_template.
13813 (maybe_templates, maybe_template_tail): Remove.
13814 (add_pending_template): Adjust.
13815 (instantiate_pending_templates): Adjust.
13816
13817 * cp-tree.h (struct saved_scope): Remove lang_stack field.
13818 (current_lang_stack): Remove.
13819 * decl.c (maybe_push_to_top_level): Don't initialize it.
13820 (duplicate_decls): Use current_lang_depth.
13821 (xref_basetypes): Likewise.
13822 * class.c (current_lang_depth): New fn.
13823 (push_lang_context): Use more varray functionality.
13824 (pop_lang_context): Likewise.
13825
13826 * error.c (GLOBAL_THING): Always use '__'.
13827
13828 2001-03-21 Mark Mitchell <mark@codesourcery.com>
13829
13830 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13831
13832 * mangle.c (mangle_decl_string): Mangle the names of overloaded
13833 operators, even when they have `extern "C"' linkage.
13834
13835 2001-03-19 Mark Mitchell <mark@codesourcery.com>
13836
13837 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13838 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13839 where it's not necessary.
13840 (add_method): Remove optimization involving comparison of
13841 DECL_ASSEMBLER_NAME.
13842 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13843 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13844 where it's not necessary.
13845 (check_methods): Likewise.
13846 (build_clone): Likewise.
13847 (built_vtt): Likewise.
13848 * cp-tree.h (DECL_NEEDED_P): Likewise.
13849 * decl.c (pushtag): Likewise.
13850 (duplicate_decls): Likewise.
13851 (pushdecl): Likewise.
13852 (builtin_function): Likewise.
13853 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13854 (build_cp_library_fn): Likewise.
13855 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13856 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13857 where it's not necessary.
13858 (make_rtl_for_nonlocal_decl): Likewise.
13859 (cp_finish_decl): Likewise.
13860 (grokfndecl): Likewise.
13861 (grokvardecl): Likewise.
13862 (grokdeclarator): Likewise.
13863 (start_function): Likewise.
13864 (cp_missing_return_ok_p): Likewise.
13865 * decl2.c (grokclassfn): Likewise.
13866 (check_classfn): Likewise.
13867 (finish_static_data_member_decl): Likewise.
13868 (grokfield): Likewise.
13869 * error.c (GLOBAL_IORD_P): Remove.
13870 (dump_global_iord): Improve output.
13871 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13872 * except.c (nothrow_libfn_p): Summarily reject any function not in
13873 namespace-scope.
13874 * init.c (build_java_class_ref): Don't explicitly set
13875 DECL_ASSEMBLER_NAME after calling mangle_decl.
13876 * mangle.c (mangle_decl_string): Handle extern "C" functions.
13877 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13878 * method.c (set_mangled_name_for_decl): Don't explicitly set
13879 DECL_ASSEMBLER_NAME after calling mangle_decl.
13880 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13881 IDENTIFIER_GLOBAL_VALUE for the thunk.
13882 * pt.c (set_mangled_name_for_template_decl): Remove.
13883 (check_explicit_specialization): Don't use it.
13884 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13885 (tsubst_friend_function): Likewise.
13886 (tsubst_decl): Likewise.
13887 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13888 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13889 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13890 where it's not necessary.
13891 (tinfo_base_init): Likewise.
13892 (create_real_tinfo_var): Likewise.
13893 * search.c (looup_field_1): Likewise.
13894 * semantics.c (finish_named_return_value): Likewise.
13895 * tree.c (init_tree): Set lang_set_decl_assembler_name.
13896
13897 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
13898
13899 Correct semantics restrictions checking in throw-expression.
13900 * except.c (is_admissible_throw_operand): New function.
13901 (build_throw): Use it.
13902
13903 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13904
13905 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13906 and its ilk.
13907
13908 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13909
13910 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13911 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13912 * decl.c (duplicate_decls): Likewise.
13913 (builtin_function): Likewise.
13914 (build_library_fn): Likewise.
13915 (build_cp_library_fn): Likewise.
13916 (check_initializer): Likewise.
13917 (cp_finish_decl): Likewise.
13918 * decl2.c (grokfield): Likewise.
13919 (grok_function_init): Remove #if 0'd code.
13920 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13921 * friend.c (do_friend): Likewise.
13922 * init.c (get_temp_regvar): Likewise.
13923 * method.c (make_thunk): Likewise.
13924 * pt.c (tsubst_friend_function): Likewise.
13925 (tsubst_decl): Likewise.
13926 (regenerate_decl_from_template): Likewise.
13927 * semantics.c (genrtl_named_return_value): Likewise.
13928 (expand_body): Likewise.
13929 (genrtl_finish_function): Likewise.
13930 * tree.c (cp_tree_equal): Likewise.
13931
13932 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
13933
13934 * call.c (convert_like_real): Add extra semantics to INNER
13935 parameter. Don't convert to temporary if a user conversion
13936 gives us an lvalue that we're about to bind to a reference.
13937 Set INNER to indicate pending reference binding on recursive
13938 calls.
13939
13940 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13941
13942 * cp/lex.c: Delete duplicate pending_lang_change.
13943
13944 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13945
13946 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13947 Similarly.
13948 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13949 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13950
13951 2001-03-09 Zack Weinberg <zackw@stanford.edu>
13952
13953 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13954
13955 2001-03-08 Stan Shebs <shebs@apple.com>
13956
13957 * cp-tree.h (set_identifier_local_value): Remove unused decl.
13958
13959 2001-03-06 Zack Weinberg <zackw@stanford.edu>
13960
13961 * spew.c: Remove references to CPP_OSTRING.
13962
13963 2001-03-06 Andrew Haley <aph@redhat.com>
13964
13965 * typeck.c (convert_arguments): Check that we have an fndecl.
13966
13967 2001-03-05 Andrew Haley <aph@redhat.com>
13968
13969 * typeck.c (convert_arguments): Don't do ellipsis conversion for
13970 __built_in_constant_p.
13971
13972 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13973
13974 * typeck.c (build_static_cast): Allow enum to enum conversions
13975 as per DR 128.
13976
13977 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13978
13979 * class.c (check_field_decls): Pointers to member do not a
13980 non-pod struct make, as per DR 148.
13981
13982 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13983
13984 * call.c (joust): cp_pedwarn when using gnu extension concerning
13985 worst conversion sequences.
13986
13987 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13988
13989 * decl.c: Replace all uses of 'boolean' with 'bool'.
13990
13991 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13992
13993 * lang-specs.h: Add zero initializer for cpp_spec field to
13994 all array elements that need one. Don't put an #ifdef inside
13995 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13996 use it.
13997
13998 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13999
14000 Implement using decls inside template functions.
14001 * decl2.c (validate_nonmember_using_decl): Don't special case
14002 fake_std_node in the global namespace. Don't reject early when
14003 processing a template.
14004 (do_local_using_decl): Add to statement tree. Don't do further
14005 processing when building a template.
14006 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
14007
14008 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
14009
14010 * decl2.c (do_nonmember_using_decl): Don't complain if we find
14011 same function. Do complain about ambiguating extern "C"
14012 declarations.
14013
14014 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
14015
14016 Remove floating point and complex type template constant parms.
14017 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
14018 COMPLEX_TYPE extensions.
14019 (invalid_nontype_parm_type_p): Likewise.
14020
14021 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
14022
14023 * except.c (call_eh_info): Revert "match_function"'s type.
14024
14025 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
14026
14027 Fix ctor vtable vcall offsets.
14028 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
14029 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
14030 (get_matching_base): Remove.
14031 (get_original_base): New function.
14032 (build_vtbl_initializer): Initialize vid.rtti_binfo.
14033 Use a virtual thunk for a ctor vtable with an index
14034 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
14035 primary base within a constructor vtable. Only set
14036 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
14037 when primary base has been lost.
14038 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
14039
14040 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
14041
14042 * call.c (joust): Ensure more_specialized()'s argument length
14043 parameter has correct value for constructors.
14044
14045 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
14046
14047 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
14048
14049 * decl.c (mark_inlined_fns): Prototype.
14050
14051 2001-02-22 Mark Mitchell <mark@codesourcery.com>
14052
14053 * spew.c (yylex): Correct handling of friends.
14054
14055 2001-02-22 Mark Mitchell <mark@codesourcery.com>
14056
14057 * mangle.c (write_encoding): Pass write_function_type the
14058 FUNCTION_DECL for the function being encoded.
14059 (write_function_type): Pass it along to write_bare_function_type.
14060 (write_bare_function_type): Pass it along to write_method_parms.
14061 (write_method_parms): Don't mangle the compiler-generated
14062 parameters to a constructor or destructor.
14063
14064 2001-02-22 Andreas Jaeger <aj@suse.de>
14065
14066 * optimize.c: Include toplev.h for
14067 note_deferral_of_defined_inline_function prototype.
14068
14069 2001-02-22 Jakub Jelinek <jakub@redhat.com>
14070
14071 * cp-tree.h (struct lang_decl_inlined_fns): New.
14072 (struct lang_decls): Add inlined_fns.
14073 (DECL_INLINED_FNS): New macro.
14074 * optimize.c (struct inline_data): Add inlined_fns.
14075 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
14076 (inlinable_function_p): Likewise, fix typo in comment,
14077 function is not inlinable if it already inlined function currently
14078 being optimized.
14079 (expand_call_inline): Add fn to inlined_fns if necessary.
14080 (optimize_function): Initialize inlined_fns.
14081 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
14082 * decl.c (mark_inlined_fns): New function.
14083 (lang_mark_tree): Call it.
14084
14085 2001-02-21 Jason Merrill <jason@redhat.com>
14086
14087 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
14088 (DECL_UNINLINABLE): Move to middle-end.
14089
14090 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
14091 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
14092 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
14093 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
14094 parms and outer BLOCK. note_deferral_of_defined_inline_function.
14095
14096 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
14097 second parm of op=.
14098
14099 2001-02-19 Mark Mitchell <mark@codesourcery.com>
14100
14101 * decl2.c (set_decl_namespace): Allow explicit instantiations in
14102 any namespace.
14103
14104 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14105
14106 * optimize.c (expand_call_inline): Don't walk subtrees of type
14107 nodes.
14108
14109 2001-02-18 Mark Mitchell <mark@codesourcery.com>
14110
14111 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
14112 for a destructor.
14113
14114 2001-02-18 Jason Merrill <jason@redhat.com>
14115
14116 Do put the VTT parameter in DECL_ARGUMENTS.
14117 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
14118 (current_vtt_parm): New macro.
14119 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
14120 (DECL_HAS_VTT_PARM_P): New macro.
14121 (DECL_VTT_PARM): Remove.
14122 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
14123 * decl.c (duplicate_decls): Only copy the operator code if
14124 appropriate.
14125 (start_function): Set current_vtt_parm.
14126 (lang_mark_tree): Don't mark vtt_parm.
14127 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
14128 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
14129 * class.c (build_clone): Maybe remove the VTT parm.
14130 * optimize.c (maybe_clone_body): Set up the VTT parm.
14131 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
14132 * call.c (build_over_call): Just allow the VTT arg.
14133 * method.c (make_thunk): Don't set DECL_VTT_PARM.
14134 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
14135 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
14136 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
14137 * error.c (dump_function_decl): Likewise.
14138 * call.c (build_user_type_conversion_1, convert_like_real): Abort
14139 if we try to call a constructor with in-charge or VTT parms.
14140 * method.c (skip_artificial_parms_for): New fn.
14141 * call.c (add_function_candidate, build_over_call): Call it.
14142 * call.c (build_new_method_call): Use current_vtt_parm.
14143 * init.c (expand_virtual_init): Likewise.
14144 * class.c (same_signature_p): No longer static.
14145 * cp-tree.h: Declare it.
14146 * search.c (look_for_overrides_r): Use it.
14147
14148 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14149
14150 * cp-tree.h (new_abi_rtti_p): Remove.
14151 (name_mangling_version): Likewise.
14152 (flag_do_squangling): Likewise.
14153 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
14154 * decl.c (grokfndecl): Likewise.
14155 * decl2.c (name_mangling_version): Remove.
14156 (flag_do_squangling): Likewise.
14157 (lang_f_options): Remove `squangle'.
14158 (unsupported_options): Add `squangle'.
14159 (cxx_decode_option): Issue a warning about uses of
14160 -fname-mangling-version.
14161 (finish_file): Remove old ABI support.
14162 * pt.c (check_explicit_specialization): Likewise.
14163 (tsubst_decl): Likewise.
14164 * rtti.c (init_rtti_processing): Likewise.
14165 (build_headof): Likewise.
14166 (get_tinfo_decl_dynamic): Likewise.
14167 (tinfo_from_decl): Likewise.
14168 (build_dynamic_cast_1): Likewise.
14169 (synthesize_tinfo_var): Likewise.
14170 * init.c (build_new): Allow enumeration types for the array-bounds
14171 in a direct-new-declarator.
14172
14173 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
14174
14175 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
14176 TREE_PROTECTED from the template being specialized.
14177
14178 2001-02-17 Jason Merrill <jason@redhat.com>
14179
14180 * decl2.c (build_artificial_parm): Set TREE_READONLY.
14181
14182 * decl.c (bad_specifiers): Allow throw specs on things with
14183 pointer-to-function or -member-function type.
14184 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
14185 a pmf.
14186
14187 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14188
14189 * call.c (check_dtor_name): Handle template names correctly.
14190
14191 2001-02-16 Jason Merrill <jason@redhat.com>
14192
14193 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
14194 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
14195 * optimize.c (maybe_clone_body): Don't substitute it.
14196 * call.c (build_new_method_call): Check in_chrg instead.
14197 * init.c (expand_virtual_init): Likewise.
14198
14199 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
14200
14201 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
14202 class-type introduces at least a type-name.
14203
14204 2001-02-16 Jakub Jelinek <jakub@redhat.com>
14205
14206 * call.c (convert_like_real): Create a temporary for non-lvalue.
14207
14208 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
14209
14210 * cp-tree.h: Fix typos in comments.
14211
14212 2001-02-16 Jason Merrill <jason@redhat.com>
14213
14214 * optimize.c (remap_block): If we're compiling a clone, pass the
14215 new block to insert_block.
14216
14217 2001-02-16 Mark Mitchell <mark@codesourcery.com>
14218
14219 * semantics.c (finish_asm_stmt): Robustify.
14220
14221 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14222
14223 * pt.c (push_template_decl_real): Don't remangle the name of a
14224 class template.
14225
14226 2001-02-15 Jim Meyering <meyering@lucent.com>
14227
14228 * Make-lang.in (c++.install-common): Depend on installdirs.
14229 (c++.install-info): Likewise.
14230 (c++.install-man): Likewise.
14231
14232 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14233
14234 * typeck2.c (build_m_component_ref): Robustify.
14235
14236 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
14237
14238 * friend.c (do_friend): Don't take the nested [template] class
14239 into account when deciding whether to warn about the friend
14240 function not referring to a template function.
14241
14242 2001-02-14 Jakub Jelinek <jakub@redhat.com>
14243
14244 * typeck.c (build_unary_op): Clarify error message.
14245
14246 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
14247
14248 * parse.y (component_constructor_declarator): allow optional
14249 parentheses around constructor class name.
14250
14251 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14252
14253 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14254 section.
14255 * init.c (emit_base_init): Remove incorrect comment about
14256 virtual bases.
14257 * method.c (make_thunk): Fix comment alignment.
14258
14259 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14260
14261 Kill remnants of this is variable.
14262 * cp-tree.h (flag_this_is_variable): Remove.
14263 * decl2.c (flag_this_is_variable): Remove.
14264 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14265 (build_vbase_path): The path is non-static, even in a cdtor.
14266 (resolves_to_fixed_type_p): Add additional return value.
14267 * search.c (init_vbase_pointers): Adjust.
14268 * tree.c (lvalue_p_1): Adjust.
14269 * typeck.c (mark_addressable): Adjust.
14270
14271 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14272
14273 * pt.c (unify): Don't check cv quals of array types.
14274
14275 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14276
14277 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14278 check whether we already have the type.
14279
14280 2001-02-13 Mark Mitchell <mark@codesourcery.com>
14281
14282 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14283 * call.c (build_op_delete_call): Simplify to remove duplicate
14284 code.
14285 * class.c (clone_function_decl): Don't build the deleting variant
14286 of a non-virtual destructor.
14287 * decl.c (finish_destructor_body): Don't call delete if this is a
14288 non-virtual destructor.
14289 * init.c (build_delete): Explicitly call `operator delete' when
14290 deleting an object with a non-virtual destructor.
14291
14292 2001-02-13 Jason Merrill <jason@redhat.com>
14293
14294 * lang-specs.h: Add more __EXCEPTIONS.
14295
14296 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14297
14298 * typeck2.c (process_init_constructor): Check
14299 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14300
14301 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14302
14303 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14304 Remove spurious information in comment. Allow further
14305 adjustments of REFERENCE_TYPE args.
14306
14307 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14308
14309 * errfn.c (cp_deprecated): Tweak diagnostic text.
14310 * parse.y (new_initializer): Deprecate initializer lists
14311 extension.
14312
14313 2001-02-12 Mark Mitchell <mark@codesourcery.com>
14314
14315 Remove old ABI support.
14316
14317 2001-02-11 Mark Mitchell <mark@codesourcery.com>
14318
14319 * decl2.c (flag_vtable_thunks): Always set it to 1.
14320 (flag_new_abi): Likewise.
14321 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14322
14323 * Makefile.in (g++spec.o): Fix typo.
14324
14325 2001-02-09 Jason Merrill <jason@redhat.com>
14326
14327 * lang-specs.h: Restore definition of __EXCEPTIONS.
14328
14329 2001-02-08 Jason Merrill <jason@redhat.com>
14330
14331 * search.c (shared_member_p): New function.
14332 (lookup_field_r): Use it.
14333 * cp-tree.h (SHARED_MEMBER_P): Remove.
14334
14335 * method.c (process_overload_item): Handle template-dependent array
14336 bounds.
14337 * pt.c (type_unification_real): If we end up with undeduced nontype
14338 parms, try again.
14339
14340 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14341 types.
14342
14343 * typeck2.c (friendly_abort): Don't say anything if we have
14344 earlier errors or sorries.
14345
14346 * decl.c (check_tag_decl): Notice attempts to redefine bool and
14347 wchar_t. Ignore if in_system_header.
14348
14349 * decl.c (maybe_push_cleanup_level): New fn...
14350 (start_decl_1): ...split out from here.
14351 * cvt.c (build_up_reference): Use it.
14352 * cp-tree.h: Declare it.
14353
14354 2001-02-07 Mark Mitchell <mark@codesourcery.com>
14355
14356 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14357 spec.
14358
14359 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
14360
14361 * pt.c (lookup_template_class): Make sure it's a primary
14362 template or template_template_parm when called from the parser.
14363 (instantiate_template_class): Add assertion.
14364
14365 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
14366
14367 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14368 from error_mark_node.
14369
14370 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
14371
14372 Fix specification and implementation bugs in V3 ABI
14373 construction vtables.
14374 * cp-tree.h (flag_dump_class_layout): New flag.
14375 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14376 (BINFO_LOST_PRIMARY_P): New flag.
14377 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14378 (BINFO_PRIMARY_MARKED_P): Rename to ...
14379 (BINFO_PRIMARY_P): ... here.
14380 (binfo_via_virtual): New prototype.
14381 * decl2.c (flag_dump_class_layout): New flag.
14382 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14383 use `=' as a file name separator.
14384 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14385 bases.
14386 (build_vtbl_address): If this is a virtual primary base, then
14387 get the vtbl of what it is ultimately primary for.
14388 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14389 for BINFO_PRIMARY_P.
14390 (dfs_skip_nonprimary_vbases_markedp): Likewise.
14391 (get_shared_vbase_if_not_primary): Likewise.
14392 (dfs_get_pure_virtuals): Likewise.
14393 (expand_upcast_fixups): Likewise.
14394 (fixup_virtual_upcast_offsets): Likewise.
14395 (dfs_find_vbase_instance): Likewise.
14396 (find_vbase_instance): Likewise.
14397 (binfo_from_vbase): Adjust comment to reflect reality.
14398 (binfo_via_virtual): New function.
14399 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14400 for binfo walking during VTT construction.
14401 (dfs_mark_primary_bases): Remove.
14402 (force_canonical_binfo_r): New function.
14403 (force_canonical_binfo): New function.
14404 (mark_primary_virtual_base): New function.
14405 (mark_primary_bases): Walk in inheritance graph order, use
14406 mark_primary_virtual_base.
14407 (determine_primary_base): Use some more intermediate variables.
14408 (dfs_find_final_overrider): Don't check for overriding along a
14409 virtual path.
14410 (dfs_modify_vtables): Walk into primary virtual bases too.
14411 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14412 (build_base_fields): Likewise.
14413 (dfs_set_offset_for_unshared_vbases): Likewise.
14414 (layout_virtual_bases): Likewise.
14415 (end_of_class): Likewise.
14416 (finish_struct_1): Call dump_class_hierarchy, if requested.
14417 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14418 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14419 (dump_class_hierarchy): Add file parameter. Append to file, if
14420 required.
14421 (finish_vtbls): Adjust accumulate_vtbl_inits call.
14422 Use canonical base for virtual bases.
14423 (build_vtt): Add more comments. Adjust build_vtt_inits call.
14424 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14425 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14426 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14427 virtual VTTs.
14428 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14429 from DATA. We want virtual primary bases and all bases via virtual.
14430 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14431 virtual base when not a construction vtable.
14432 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14433 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14434 Use canonical bases when processing virtual bases.
14435 (accumulate_vtbl_inits): We're interested in any base via a
14436 virtual path.
14437 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14438 within a construction vtable, determine what is being overridden.
14439 (build_vtbl_initializer): Add more comments
14440 (add_vcall_offset_vtbl_entries_1): Adjust comment.
14441 (build_rtti_vtbl_entries): Check if the base has lost its
14442 primary.
14443
14444 2001-02-05 Mark Mitchell <mark@codesourcery.com>
14445
14446 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14447
14448 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14449
14450 * decl.c (pushdecl): Call abort instead of fatal.
14451 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14452 * init.c (build_new_1): Likewise.
14453 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14454 * decl.c (build_typename_type): hash_table_init now returns void.
14455 decl.c (init_decl_processing): Make an error non-fatal.
14456
14457 2001-02-04 Mark Mitchell <mark@codesourcery.com>
14458
14459 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14460 Document.
14461 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14462 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14463 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14464 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14465 * decl.c (maybe_commonize_var): Use the new name-mangling where
14466 appropriate.
14467 * decl2.c (comdat_linkage): Enhance comments. Make all
14468 compiler-generated things static, if COMDAT is not available.
14469 (get_tinfo_decl): Do not make typeinfo objects that belong in the
14470 library COMDAT.
14471 (tinfo_base_init): Use the correct mangled name for typeinfo
14472 strings, and push them into the global scope.
14473 (typeinfo_in_lib_p): New function.
14474 (synthesize_tinfo_var): Use it.
14475 (create_real_tinfo_var): Likewise.
14476
14477 2001-02-03 Jakub Jelinek <jakub@redhat.com>
14478
14479 * decl.c (push_class_binding): Use context_for_name_lookup instead
14480 of CP_DECL_CONTEXT.
14481 * search.c (context_for_name_lookup): Remove static. Check for NULL
14482 context in the loop.
14483 * cp-tree.h (context_for_name_lookup): Add prototype.
14484
14485 2001-02-02 Jakub Jelinek <jakub@redhat.com>
14486
14487 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14488 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14489 Remove.
14490 * call.c (convert_class_to_reference, build_user_type_conversion_1,
14491 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14492
14493 2001-02-02 Mark Mitchell <mark@codesourcery.com>
14494
14495 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14496 of macros used when compiling g++spec.c.
14497 * g++spec.c (lang_specific_driver): Link with the shared
14498 libgcc by default.
14499
14500 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
14501
14502 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14503 make_reference_declarator, make_call_declarator), method.c
14504 (implicitly_declare_fn), parse.y (namespace_using_decl,
14505 notype_unqualified_id, expr_or_declarator, new_type_id,
14506 after_type_declarator, direct_after_type_declarator,
14507 notype_declarator, complex_notype_declarator,
14508 complex_direct_notype_declarator, qualified_id,
14509 notype_qualified_id, overqualified_id, direct_new_declarator,
14510 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14511 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14512 instead of build_parse_node.
14513
14514 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14515
14516 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14517 (minus_one_node): Moved to top level gcc directory. Renamed
14518 to integer_minus_one_node.
14519
14520 * init.c (init_init_processing): Don't set minus_one_node.
14521 (build_vec_init): Use integer_minus_one_node.
14522
14523 * rtti.c (get_tinfo_decl_dynamic): Likewise.
14524
14525 2001-01-28 Jakub Jelinek <jakub@redhat.com>
14526
14527 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14528 identical and they would be replaced with constant, remove
14529 MODIFY_EXPR from the tree.
14530
14531 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14532
14533 * Make-lang.in: Remove all dependencies on defaults.h.
14534 * call.c: Don't include defaults.h.
14535 * decl.c: Likewise.
14536 * decl2.c: Likewise.
14537 * except.c: Likewise.
14538 * pt.c: Likewise.
14539 * rtti.c: Likewise.
14540 * tree.c: Likewise.
14541 * typeck.c: Likewise.
14542
14543 2001-01-25 Jakub Jelinek <jakub@redhat.com>
14544
14545 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14546 operators even in "C" linkage.
14547 * method.c (set_mangled_name_for_decl): Likewise.
14548 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14549 overloaded operators in "C" linkage.
14550
14551 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14552
14553 * pt.c (tsubst_decl): Remove IN_DECL parameter.
14554 (tsubst_arg_types): Check parameter is not void.
14555 (tsubst): Adjust tsubst_decl call.
14556
14557 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14558
14559 * call.c (add_builtin_candidate): Quote std properly, from
14560 previous change.
14561
14562 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14563
14564 * pt.c (check_explicit_specialization): Clone constructors and
14565 destructors.
14566
14567 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14568
14569 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14570 indicates anything special about template depth. Make sure we
14571 only count the user visible template classes.
14572
14573 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14574
14575 * call.c (build_conv): Typo in comment.
14576 (add_builtin_candidate): Add more explanation.
14577 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14578 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14579 when we have enumeral types.
14580 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14581 candidates for relops and eqops.
14582 (joust): Simplify control flow. Allow a non-template user
14583 function to hide a builtin.
14584
14585 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
14586
14587 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14588 (more_specialized): Add deduction parameter.
14589 * call.c (joust): Adjust more_specialized call.
14590 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14591 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14592 (get_bindings_order): Remove.
14593 (get_bindings_real): Add DEDUCE parameter.
14594 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14595 REFERENCE_TYPE jig for DEDUCE_ORDER.
14596 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14597 maybe_adjust_types_for_deduction.
14598 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14599 directly.
14600 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14601 (check_cv_quals_for_unify): Use new unify qualifier flags.
14602 (unify): Clear new unify qualifier flags.
14603 (get_bindings_real): Add DEDUCE parameter.
14604 (get_bindings): Adjust call to get_bindings_real.
14605 (get_bindings_overload): Likewise.
14606 (most_specialized_instantiation): Adjust call to
14607 more_specialized.
14608
14609 2001-01-19 Jason Merrill <jason@redhat.com>
14610
14611 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14612
14613 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14614 -fnew-abi.
14615
14616 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
14617
14618 * decl2.c (arg_assoc_class): Fix double iteration logic.
14619
14620 2001-01-19 Jason Merrill <jason@redhat.com>
14621
14622 * init.c (build_delete): Always call convert_force to strip cv-quals.
14623
14624 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14625 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14626 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14627
14628 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14629
14630 * search.c (get_vbase_1): Count only virtual bases.
14631
14632 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14633
14634 * class.c (duplicate_tag_error): Robustify flag clearing.
14635
14636 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14637
14638 * cp-tree.h (lookup_template_class): Add complain parm.
14639 * decl.c (lookup_namespace_name): Adjust call to
14640 lookup_template_class.
14641 (make_typename_type): Likewise.
14642 * semantics.c (finish_template_type): Likewise.
14643 * pt.c (lookup_template_class): Add complain parm. Adjust.
14644 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14645 (tsubst): Likewise.
14646
14647 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14648
14649 * pt.c (copy_default_args_to_explicit_spec): Preserve
14650 object's CV quals. Reorganize.
14651
14652 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14653
14654 * typeck.c (build_modify_expr): Say `initialization' for
14655 INIT_EXPRs.
14656 * init.c (build_default_init): Convert to enumeral type, if
14657 needed.
14658
14659 2001-01-18 Jakub Jelinek <jakub@redhat.com>
14660
14661 * parse.y (nomods_initdcl0): Properly set things up for
14662 initdcl0_innards.
14663
14664 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14665
14666 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14667 (type_unification_real): Set it.
14668 (unify): Use it.
14669
14670 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14671
14672 * decl.c (finish_destructor_body): Convert to vbase pointer here.
14673
14674 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14675
14676 * semantics.c (begin_class_definition): Check we're not inside a
14677 template parm list.
14678
14679 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14680
14681 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14682 BASELINK_P.
14683
14684 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14685
14686 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14687 * call.c (build_over_call): Add comment.
14688
14689 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14690
14691 * cvt.c (ocp_convert): Handle vector type conversion
14692 * typeck2.c (digest_init): Handle vector type initializations
14693
14694 2001-01-16 Phil Edwards <pme@sources.redhat.com>
14695
14696 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
14697 was given.
14698
14699 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14700
14701 * pt.c (check_nontype_parm): Rename to ...
14702 (invalid_nontype_parm_type_p): ... here.
14703 (process_template_parm): Adjust.
14704 (convert_template_argument): Adjust.
14705
14706 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14707
14708 * pt.c (check_nontype_parm): New function.
14709 (process_template_parm): Use it.
14710 (convert_template_argument): Use it.
14711 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14712 member.
14713
14714 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
14715
14716 * tree.c: Add defaults.h
14717 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14718 * Make-lang.in (cp/tree.o): Add defaults.h.
14719
14720 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14721
14722 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14723
14724 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14725
14726 * g++.1: Change to be ".so man1/gcc.1".
14727
14728 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14729
14730 * Make-lang.in (c++.info, c++.install-info): Build and install g++
14731 internals info.
14732 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14733 ($(srcdir)/cp/g++int.info): New target.
14734 * gxxint.texi: Add info directory entry. Use @@ in email address.
14735 * .cvsignore: Update.
14736
14737 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14738
14739 * typeck.c (build_c_cast): Do template processing earlier.
14740 Always pedwarn on array casts.
14741
14742 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14743
14744 * friend.c (make_friend_class): Make sure a templated class is
14745 actually a template.
14746
14747 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14748
14749 * decl2.c (get_guard): Set linkage from guarded decl.
14750
14751 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14752
14753 * call.c (convert_default_arg): Check for unprocessed
14754 DEFAULT_ARG.
14755 * cp-tree.h (replace_defarg): Move to spew.c.
14756 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14757 spew.c, which is where they really are.
14758 (done_pending_defargs): Declare.
14759 (unprocessed_defarg_fn): Declare.
14760 * decl.c (replace_defarg): Move to spew.c
14761 * parse.y (structsp): Call done_pending_defargs.
14762 * spew.c (defarg_fns): Rearrange list structure.
14763 (defarg_fnsdone): New static variable.
14764 (defarg_depfns): New static variable.
14765 (init_spew): Adjust.
14766 (add_defarg_fn): Store the type in TREE_TYPE.
14767 (do_pending_defargs): Detect and deal with ordering constraints
14768 and circularity.
14769 (done_pending_defargs): New function.
14770 (unprocessed_defarg_fn): New function.
14771 (replace_defarg): Moved from decl.c. Robustify. Don't save
14772 if circularity detected.
14773
14774 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14775
14776 * pt.c (unify): Check array has a domain, before checking
14777 whether it is variable sized.
14778
14779 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14780
14781 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14782 parameters with pointers to arrays of unknown bound.
14783
14784 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14785
14786 * parse.y (template_parm_header, template_spec_header): New
14787 reductions. Split out from ...
14788 (template_header): ... here. Use them.
14789 (template_template_parm): Use template_parm_header.
14790 * semantics.c (finish_template_template_parm): Add assert.
14791
14792 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14793
14794 * mangle.c (write_builtin_type): Fix thinko.
14795
14796 * pt.c (copy_default_args_to_explicit_spec_1): New function.
14797 (copy_default_args_to_explicit_spec): Likewise.
14798 (check_explicit_specialization): Use it.
14799
14800 * class.c (finish_struct_1): Remove last argument in call to
14801 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14802 * decl.c (builtin_function): Likewise.
14803 (build_cp_library_fn): Likewise.
14804 (check_initializer): Likewise.
14805 (make_rtl_for_nonlocal_decl): Likewise.
14806 (cp_finish_decl): Likewise.
14807 (start_function): Likewise.
14808 * decl2.c (finish_anon_union): Likewise.
14809 * friend.c (do_friend): Likewise.
14810 * init.c (build_java_class_ref): Likewise.
14811 * method.c (make_thunk): Likewise.
14812 * pt.c (tsubst_friend_function): Likewise.
14813 * semantics.c (expand_body): Likewise.
14814
14815 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14816
14817 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14818 looking at DECL_CLONED_FUNCTION for non-functions.
14819
14820 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14821
14822 * error.c (dump_template_parameter): Use parm to determine how
14823 to print default value.
14824
14825 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14826
14827 * class.c (duplicate_tag_error): Clear more flags.
14828
14829 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14830
14831 * call.c (build_new_method_call): Use binfo_for_vbase.
14832
14833 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
14834
14835 * cp-tree.h (flag_cond_mismatch): Don't declare.
14836 * decl2.c (flag_cond_mismatch): Don't define.
14837 (lang_f_options): Remove cond-mismatch.
14838 (unsupported_options): Add cond-mismatch.
14839
14840 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
14841
14842 * class.c (handle_using_decl): Reject using of constructor name
14843 of sourcing class. Allow injecting of a method with same name as
14844 nested class. Fixup error messages.
14845
14846 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
14847
14848 * decl2.c (lang_decode_option): Handle -Wformat=2.
14849
14850 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14851
14852 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14853 initialized_in_class.
14854 (DECL_DEFINED_IN_CLASS_P): Rename to ...
14855 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14856 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14857 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14858 * pt.c (check_default_tmpl_args): Adjust for
14859 DECL_INITIALIZED_IN_CLASS_P.
14860 (instantiate_class_template): Likewise.
14861 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14862
14863 * class.c (finish_struct): Constify saved_filename.
14864
14865 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14866
14867 * class.c (duplicate_tag_error): Adjust diagnostic.
14868 (finish_struct): Locally set location to start of struct.
14869 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14870
14871 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14872
14873 * decl.c (struct binding_level): Adjust class_shadowed comments
14874 to reflect reality.
14875 (push_class_level_binding): Adjust comments to reflect reality.
14876 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14877 Don't set TREE_VALUE on the class_shadowed list.
14878
14879 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14880
14881 * decl2.c (acceptable_java_type): Allow references too.
14882 * init.c (build_java_class_ref): When using the new ABI, search
14883 `class$' and have it mangled with `mangle_decl.'
14884 * mangle.c (write_java_integer_type_codes): New function.
14885 (write_builtin_type): Detect and mangle Java integer and real
14886 types.
14887
14888 2001-01-07 Mark Mitchell <mark@codesourcery.com>
14889
14890 * decl2.c (grokfield): Don't accept `asm' specifiers for
14891 non-static data members.
14892
14893 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14894
14895 * expr.c (cplus_expand_expr): Don't reset `target'.
14896
14897 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
14898
14899 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14900
14901 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14902
14903 * parse.y (template_datadef): Check for error_mark_node.
14904
14905 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14906
14907 * cp-tree.def (DEFAULT_ARG): Make `x' class.
14908
14909 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
14910
14911 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14912 (record_builtin_type): Make non-static.
14913 (flag_short_double): Don't declare.
14914 (init_decl_processing): Remove the creation of many tree nodes now
14915 in c_common_nodes_and_builtins.
14916 (build_void_list_node): New function.
14917 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14918 * cp-tree.h (flag_short_wchar): Don't declare.
14919
14920 2001-01-04 Mark Mitchell <mark@codesourcery.com>
14921
14922 * call.c (build_conv): Don't use build1 for USER_CONV.
14923 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14924
14925 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
14926
14927 * lex.c (lang_init): Call c_common_lang_init.
14928
14929 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14930
14931 * search.c (lookup_fnfields_here): Remove.
14932 (look_for_overrides_r): Use lookup_fnfields_1.
14933 Ignore functions from using declarations.
14934
14935 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14936
14937 Implement exceptions specifiers for implicit member functions.
14938 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14939 * method.c (synthesize_exception_spec): New function.
14940 (locate_dtor, locate_ctor, locate_copy): New functions.
14941 (implicitly_declare_fn): Generate the exception spec too.
14942 * search.c (check_final_overrider): Check artificial functions
14943 too.
14944 * typeck2.c (merge_exception_specifiers): New function.
14945
14946 2001-01-03 Jason Merrill <jason@redhat.com>
14947
14948 * init.c (build_default_init): New fn.
14949 (perform_member_init): Split out from here.
14950 (build_new_1): Use it. Simplify initialization logic.
14951 (build_vec_init): Take an array, rather than a pointer and maxindex.
14952 Speed up simple initializations. Don't clean up if we're assigning.
14953 * cp-tree.h: Adjust.
14954 * decl2.c (do_static_initialization): Remove TREE_VEC case.
14955 * parse.y (new_initializer): Return void_zero_node for ().
14956 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14957 * typeck2.c (digest_init): Only complain about user-written
14958 CONSTRUCTORs.
14959
14960 2000-12-22 Mike Stump <mrs@wrs.com>
14961
14962 * decl2.c: (max_tinst_depth): Increase to 50.
14963
14964 2001-01-02 Mark Mitchell <mark@codesourcery.com>
14965
14966 * class.c (invalidate_class_lookup_cache): Zero the
14967 previous_class_values.
14968 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14969 TREE_INT_CST_HIGH.
14970 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14971 * decl.c (free_bindings): New variable.
14972 (push_binding): Don't create a new binding if we have one on the
14973 free list.
14974 (pop_binding): Put old bindings on the free list.
14975 (init_decl_processing): Use size_int, not build_int_2.
14976 Register free_bindings as a GC root.
14977 (cp_make_fname_decl): Use size_int, not build_int_2.
14978 (push_inline_template_parms_recursive): Likewise.
14979 (end_template_parm_list): Likewise.
14980 (for_each_template_parm): Do not use walk_tree_without_duplicates.
14981 (tsubst_template_parms): Use size_int, not build_int_2.
14982 (tsubst): Likewise.
14983 * rtti.c (get_vmi_pseudo_type_info): Likewise.
14984
14985 2001-01-02 Richard Henderson <rth@redhat.com>
14986
14987 * parse.y (asm): Set ASM_INPUT_P.
14988
14989 2001-01-02 Jason Merrill <jason@redhat.com>
14990
14991 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14992 for v3 ABI.
14993
14994 * typeck.c (cp_truthvalue_conversion): New fn.
14995 * cvt.c (ocp_convert): Use it.
14996
14997 * cp-tree.h: Lose c-common.c decls.
14998
14999 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
15000 * cvt.c (convert_to_void): Use type_unknown_p.
15001
15002 * typeck.c (strip_all_pointer_quals): Also strip quals from
15003 pointer-to-member types.
15004
15005 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
15006 parse.y as C.
15007
15008 * call.c (build_new_method_call): Do evaluate the object parameter
15009 when accessing a static member.
15010 * typeck.c (build_component_ref): Likewise.
15011
15012 2001-01-02 Andreas Jaeger <aj@suse.de>
15013
15014 * decl.c (cp_missing_noreturn_ok_p): New.
15015 (init_decl_processing): Set lang_missing_noreturn_ok_p.
15016
15017 2000-12-29 Jakub Jelinek <jakub@redhat.com>
15018
15019 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
15020
15021 2000-12-29 Mark Mitchell <mark@codesourcery.com>
15022
15023 * class.c (pushclass): Remove #if 0'd code.
15024 * cp-tree.h (overload_template_name): Remove.
15025 * decl.c (store_bindings): Simplify.
15026 (pop_from_top_level): Likewise.
15027 * pt.c (overload_template_name): Remove.
15028 (instantiate_decl): Don't call push_to_top_level if it's not
15029 needed.
15030
15031 2000-12-28 Mark Mitchell <mark@codesourcery.com>
15032
15033 * pt.c (register_local_specialization): Don't return a value.
15034 (lookup_template_class): Use move-to-front heuristic when looking
15035 up template instantiations.
15036 (instantiate_decl): Only push_to_top_level when we're actually
15037 going to instantiate the template.
15038
15039 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
15040
15041 * search.c (binfo_for_vtable): Return least derived class, not
15042 most. Handle secondary vtables.
15043
15044 2000-12-22 Jason Merrill <jason@redhat.com>
15045
15046 * pt.c (more_specialized): Don't optimize len==0.
15047 (fn_type_unification): If we're adding the return type, increase len.
15048
15049 * typeck.c (build_binary_op): Fix pmf comparison logic.
15050
15051 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
15052 DECL_STATIC_FUNCTION_P.
15053
15054 * semantics.c (genrtl_finish_function): Don't try to jump to
15055 return_label unless it exists.
15056
15057 In partial ordering for a call, ignore parms for which we don't have
15058 a real argument.
15059 * call.c (joust): Pass len to more_specialized.
15060 (add_template_candidate_real): Strip 'this', pass len.
15061 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
15062 (get_bindings_order): New fn. Pass len down.
15063 (get_bindings_real): Strip 'this', pass len.
15064 (fn_type_unification): Likewise.
15065 (type_unification_real): Succeed after checking 'len' args.
15066 (most_specialized_instantiation): Lose explicit_args parm.
15067 * class.c (resolve_address_of_overloaded_function): Strip 'this',
15068 pass len.
15069
15070 2000-12-21 Jason Merrill <jason@redhat.com>
15071
15072 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
15073 DECL_TEMPLATE_RESULT.
15074
15075 * search.c (lookup_field_r): Call lookup_fnfields_1, not
15076 lookup_fnfields_here.
15077
15078 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
15079
15080 * call.c (build_object_call): Also allow conversions that return
15081 reference to pointer to function.
15082 (add_conv_candidate): Handle totype being ref to ptr to fn.
15083 (build_field_call): Also allow members of type reference to function.
15084 Lose support for calling pointer to METHOD_TYPE fields.
15085
15086 * error.c (dump_expr): Handle *_CAST_EXPR.
15087
15088 * typeck2.c (build_scoped_ref): Always convert to the naming class.
15089
15090 * tree.c (break_out_cleanups): Lose.
15091 * cp-tree.h: Remove prototype.
15092 * typeck.c (build_component_ref): Don't break_out_cleanups.
15093 (build_compound_expr): Likewise.
15094 * semantics.c (finish_expr_stmt): Likewise.
15095
15096 2000-12-20 Richard Henderson <rth@redhat.com>
15097
15098 * cp-tree.h: Update declarations.
15099 * decl.c (finish_case_label): Return the new stmt node.
15100 * semantics.c (finish_goto_stmt): Likewise.
15101 (finish_expr_stmt, finish_return_stmt): Likewise.
15102 (finish_break_stmt, finish_continue_stmt): Likewise.
15103 (finish_asm_stmt): Likewise.
15104 * parse.y (already_scoped_stmt): Set STMT_LINENO.
15105 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
15106 (simple_if, simple_stmt): Return the new stmt node.
15107 (save_lineno): New.
15108
15109 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
15110
15111 * cp-tree.h: Don't declare warn_long_long.
15112
15113 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15114
15115 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
15116 IS_AGGR_TYPE.
15117
15118 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15119
15120 * pt.c (unify): Handle when both ARG and PARM are
15121 BOUND_TEMPLATE_TEMPLATE_PARM.
15122
15123 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15124
15125 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
15126 DECL_TEMPLATE_PARM_P.
15127
15128 2000-12-15 Jason Merrill <jason@redhat.com>
15129
15130 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
15131
15132 * init.c (build_new_1): Don't strip quals from type.
15133
15134 * decl.c (pushdecl): Don't check for linkage on a non-decl.
15135
15136 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
15137
15138 * call.c (build_new_function_call): Lose space before paren in
15139 error message.
15140 (build_new_method_call): Likewise.
15141
15142 * typeck2.c (build_m_component_ref): Propagate quals from datum.
15143
15144 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15145
15146 * pt.c (check_explicit_specialization): Propagate default
15147 function arguments to explicit specializations.
15148
15149 2000-12-13 DJ Delorie <dj@redhat.com>
15150
15151 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
15152 and <? operators.
15153
15154 2000-12-08 Jason Merrill <jason@redhat.com>
15155
15156 * error.c (dump_function_name): Don't let the user see __comp_ctor.
15157
15158 Clean up copy-initialization in overloading code.
15159 * call.c (build_user_type_conversion_1): Die if we are asked to
15160 convert to the same or a base type.
15161 (implicit_conversion): Avoid doing so. Lose reference binding code.
15162 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
15163 direct-initialization. Also do direct-init part of copy-init.
15164 (build_user_type_conversion): Don't provide context to convert_like.
15165 * cvt.c (ocp_convert): build_user_type_conversion will now provide
15166 the constructor call for copy-init.
15167
15168 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
15169 instantiation of a member template.
15170 (do_decl_instantiation): Not here.
15171
15172 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15173
15174 * class.c (check_field_decls): Don't special case anonymous
15175 fields in error messages.
15176 (note_name_declared_in_class): Use %D on diagnostic.
15177
15178 * tree.c (pod_type_p): Use strip_array_types.
15179 (cp_valid_lang_attribute): Likewise.
15180 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
15181 multiple evaluations.
15182 (cp_has_mutable_p): Use strip_array_types.
15183
15184 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15185
15186 * cp-tree.h (sufficient_parms_p): Declare new function.
15187 * call.c (sufficient_parms_p): New function, broken out of ...
15188 (add_function_candidate): ... here. Use it.
15189 (add_conv_candidate): Use it.
15190 * decl.c (grok_ctor_properties): Use it.
15191
15192 2000-12-07 Jakub Jelinek <jakub@redhat.com>
15193
15194 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
15195
15196 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
15197
15198 * decl2.c (lang_decode_option): Handle -Wformat-security.
15199
15200 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15201
15202 * pt.c (verify_class_unification): New function.
15203 (get_class_bindings): Use it.
15204 (try_class_unification): Tidy.
15205 (unify): Handle when argument of a template-id is not
15206 template parameter dependent.
15207 (template_args_equal): Handle when TREE_CODE's do not match.
15208
15209 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
15210
15211 * lang-specs.h (c++): When invoking the stand-alone preprocessor
15212 for -save-temps, pass all relevant -Defines to it, and then don't
15213 pass them to cc1plus.
15214
15215 2000-12-05 Will Cohen <wcohen@redhat.com>
15216
15217 * decl.c (finish_case_label): Cleared
15218 more_cleanups_ok in surrounding function scopes.
15219 (define_label): Likewise.
15220
15221 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15222
15223 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15224 (get_matching_virtual): Remove.
15225 (look_for_overrides): Declare new function.
15226 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15227 DECL_VINDEX here.
15228 * class.c (check_for_override): Move base class iteration code
15229 to look_for_overrides.
15230 * search.c (next_baselink): Remove.
15231 (get_virtuals_named_this): Remove.
15232 (get_virtual_destructor): Remove.
15233 (tree_has_any_destructors_p): Remove.
15234 (struct gvnt_info): Remove.
15235 (check_final_overrider): Remove `virtual' from error messages.
15236 (get_matching_virtuals): Remove. Move functionality to ...
15237 (look_for_overrides): ... here, and ...
15238 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15239 to be overriding.
15240
15241 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15242
15243 * typeck.c (get_delta_difference): If via a virtual base,
15244 return zero.
15245 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15246 adjustment.
15247
15248 2000-12-04 Richard Henderson <rth@redhat.com>
15249
15250 * error.c (dump_tree): Use output_add_string not OB_PUTS.
15251
15252 2000-12-04 Jason Merrill <jason@redhat.com>
15253
15254 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15255 (write_builtin_type): Pass intSI_type_node and the like through
15256 type_for_mode.
15257 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15258 Pass intSI_type_node and the like through type_for_mode.
15259 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15260 * pt.c (tsubst, unify): Likewise.
15261 * tree.c (walk_tree): Likewise.
15262 * error.c (dump_type): Likewise.
15263 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15264
15265 * Make-lang.in: Tweak top comment for emacs.
15266 (cp/TAGS): Restore.
15267
15268 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15269
15270 * class.c (clone_function_decl): Robustify.
15271
15272 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
15273
15274 * decl.c (store_bindings): Only search in the non modified
15275 old_bindings for duplicates.
15276
15277 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
15278
15279 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15280 TYPE_POLYMORPHIC_P.
15281
15282 * typeck.c (build_static_cast): Remove unused variable.
15283
15284 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15285
15286 * pt.c: Fix typo in comment.
15287
15288 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15289
15290 * decl2.c (warn_format): Remove definition.
15291 (lang_decode_option): Handle -Wformat-nonliteral,
15292 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
15293
15294 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15295
15296 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15297 (init_decl_processing): Don't create string_type_node,
15298 const_string_type_node, wint_type_node, intmax_type_node,
15299 uintmax_type_node, default_function_type, ptrdiff_type_node and
15300 unsigned_ptrdiff_type_node. Adjust position of call to
15301 c_common_nodes_and_builtins.
15302 (identifier_global_value): New function.
15303
15304 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
15305
15306 * call.c (standard_conversion): Reject pointer to member
15307 conversions from ambiguous, inaccessible or virtual bases.
15308 * typeck.c (build_static_cast): Don't check pointers to members
15309 specially.
15310
15311 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15312
15313 * method.c (do_build_copy_constructor): Preserve cv
15314 qualifications when accessing source object members.
15315 (do_build_assign_ref): Likewise. Remove separate diagnostics for
15316 unnamed fields.
15317
15318 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15319
15320 * method.c (do_build_assign_ref): Construct appropriately
15321 CV-qualified base reference. Don't allow const casts in base
15322 conversion.
15323
15324 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15325
15326 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15327 incomplete return type.
15328
15329 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15330
15331 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15332 * semantics.c (finish_base_specifier): Accept a _TYPE not a
15333 _DECL.
15334
15335 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15336
15337 * spew.c (yyerror): Cope if yylval.ttype is NULL.
15338
15339 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15340
15341 * decl.c (grokdeclarator): Diagnose undefined template contexts.
15342
15343 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15344
15345 * decl.c (grokdeclarator): Do type access control on friend
15346 class.
15347
15348 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15349
15350 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15351 bison parser ickiness.
15352 * pt.c (tsubst_friend_function): Enter namespace scope when
15353 tsubsting the function name.
15354 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15355
15356 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15357
15358 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15359 * cvt.c (cp_convert_to_pointer): Add force parameter.
15360 Allow conversions via virtual base if forced.
15361 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15362 (ocp_convert): Likewise.
15363 * search.c (binfo_from_vbase): Return the virtual base's binfo.
15364 * typeck.c (get_delta_difference): Adjust handling of virtual
15365 bases.
15366
15367 2000-11-26 Mark Mitchell <mark@codesourcery.com>
15368
15369 * tree.c (struct list_hash): Remove.
15370 (list_hash_table): Make it be an htab.
15371 (struct list_proxy): New type.
15372 (list_hash_eq): New function.
15373 (list_hash_pieces): Renamed from ...
15374 (list_hash): ... this.
15375 (list_hash_lookup): Remove.
15376 (list_hash_add): Remove.
15377 (hash_tree_cons): Use the generic hashtable.
15378 (mark_list_hash): Remove.
15379 (init_tree): Create the hashtable.
15380
15381 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
15382
15383 * method.c (build_mangled_C9x_name): Rename to
15384 build_mangled_C99_name. Change C9X references in comments to
15385 refer to C99.
15386
15387 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15388
15389 * parse.y (unary_expr): Move VA_ARG from here ...
15390 (primary): ... to here.
15391
15392 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15393
15394 * semantics.c (finish_id_expr): If type is error_mark, return
15395 error_mark.
15396
15397 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
15398
15399 * pt.c (lookup_template_class): Simplify loop exit constructs.
15400 Cope when there is no partial instantiation of a template
15401 template member.
15402
15403 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
15404
15405 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15406
15407 2000-11-22 Mark Mitchell <mark@codesourcery.com>
15408
15409 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15410 prefix.
15411
15412 * pt.c (do_decl_instantiate): Explicitly clone constructors and
15413 destructors that haven't already been cloned.
15414
15415 2000-11-20 Richard Henderson <rth@redhat.com>
15416
15417 * parse.y (yyparse_1): Rename the parser entry point.
15418
15419 2000-11-20 Alex Samuel <samuel@codesourcery.com>
15420
15421 * mangle.c (write_name): Use <unscoped-name> for names directly in
15422 function scope.
15423 (write_unscoped_name): Accept names directly in function scope.
15424
15425 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
15426
15427 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15428 * parse.y (extdef): Add EXPORT reduction.
15429 * spew.c (yylex): Don't skip export here.
15430
15431 2000-11-19 Mark Mitchell <mark@codesourcery.com>
15432
15433 * decl.c (init_decl_processing): Correct name of pure virtual
15434 function under the new ABI.
15435 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15436 (throw_bad_typeid): Likewise for bad typeid function.
15437
15438 2000-11-18 Mark Mitchell <mark@codesourcery.com>
15439
15440 * decl.c (grokparms): Don't even function types of `void' type,
15441 either.
15442 * mangle.c (write_type): Don't crash when confronted with the
15443 error_mark_node.
15444
15445 * decl.c (grokparms): Don't create parameters of `void' type.
15446
15447 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
15448
15449 * lex.c (mark_impl_file_chain): Delete.
15450 (init_parse): Remove call to ggc_add_string_root. No need to
15451 ggc_strdup a string constant. Do not add impl_file_chain to GC
15452 roots.
15453 (handle_pragma_implementation): No need to ggc_strdup main_filename.
15454
15455 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15456
15457 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15458
15459 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15460
15461 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15462 * decl.c (grokdeclarator): Don't reject void parms here.
15463 (require_complete_types_for_parms): Simplify, use
15464 complete_type_or_else.
15465 (grokparms): Remove bitrot. Remove funcdef parm.
15466 Deal with ellipsis parm lists here.
15467 * semantics.c (finish_parmlist): Don't append void_list_node
15468 here. Set PARMLIST_ELLIPSIS_P.
15469
15470 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15471
15472 * typeck2.c (incomplete_type_error): Reorganize to avoid
15473 excessive diagnostics.
15474
15475 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
15476
15477 * lex.c (struct impl_files, internal_filename): Constify a char *.
15478
15479 2000-11-16 Mark Mitchell <mark@codesourcery.com>
15480
15481 * mangle.c (write_special_name_constructor): Don't generate
15482 assembler junk when confronted with an old-style constructor.
15483 (write_special_name_destructor): Likewise.
15484 (mangle_decl_string): Do it here instead.
15485
15486 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
15487
15488 * call.c (op_error): Make error messages clearer.
15489
15490 2000-11-15 Mark Mitchell <mark@codesourcery.com>
15491
15492 * decl.c (wrapup_globals_for_namespace): Don't mark things
15493 TREE_ASM_WRITTEN when they're not.
15494
15495 2000-11-15 Jason Merrill <jason@redhat.com>
15496
15497 * typeck2.c (friendly_abort): Uncount the error before handing
15498 off to fancy_abort.
15499
15500 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
15501
15502 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15503
15504 2000-11-14 Mark Mitchell <mark@codesourcery.com>
15505
15506 * class.c (build_vtbl_initializer): Fix typo in comment.
15507 * typeck.c (expr_sizeof): Don't crash on errors.
15508
15509 2000-11-14 Jim Wilson <wilson@redhat.com>
15510
15511 * lang-specs.h: Add %2 after %(cc1_options).
15512
15513 2000-11-14 Richard Henderson <rth@redhat.com>
15514
15515 * typeck.c (c_sizeof): Be strict about casting result value
15516 back to c_size_type_node.
15517 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15518
15519 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
15520
15521 * typeck.c (build_unary_op): Use boolean_increment from
15522 c-common.c, moving the relevant code there.
15523
15524 2000-11-11 Jason Merrill <jason@redhat.com>
15525
15526 * typeck.c (mark_addressable): Don't call put_var_into_stack.
15527
15528 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15529 in inlines.
15530
15531 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15532
15533 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15534 * lex.c (copy_lang_decl): Likewise.
15535
15536 2000-11-09 Mark Mitchell <mark@codesourcery.com>
15537
15538 * dump.c (cp_dump_tree): Don't dump function bodies here.
15539
15540 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15541 (dump.o): Update dependency list.
15542 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15543 (flag_dump_translation_unit): Likewise.
15544 (CP_TYPE_QUALS): Adjust definition.
15545 (DECL_C_BIT_FIELD): Remove.
15546 (SET_DECL_C_BIT_FIELD): Likewise.
15547 (CLEAR_DECL_C_BIT_FIELD): Likewise.
15548 (add_maybe_template): Likewise.
15549 (strip_array_types): Likewise.
15550 (dump_node_to_file): Likewise.
15551 (cp_dump_tree): New function.
15552 * decl.c (init_decl_processing): Set lang_dump_tree.
15553 * decl2.c (flag_dump_translation_unit): Remove.
15554 * dump.c: Move most of it to ../c-dump.c.
15555 (cp_dump_tree): New function.
15556 * pt.c (add_maybe_template): Remove.
15557 * typeck.c (strip_array_types): Likewise.
15558
15559 2000-11-07 Eric Christopher <echristo@redhat.com>
15560
15561 * decl.c (init_decl_processing): Change definition of
15562 __wchar_t to wchar_t. Remove artificial declaration of
15563 wchar_t.
15564 * lex.c: Change instances of __wchar_t to wchar_t.
15565
15566 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
15567
15568 * lex.c (do_identifier): Don't lookup_name for operators.
15569 * parse.y (operator): Save looking_for_typename.
15570 (unoperator): Restore it.
15571 * spew.c (frob_opname): Use nth_token for lookahead.
15572
15573 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
15574
15575 * decl.c (grok_op_properties): Always use coerce_new_type and
15576 coerce_delete_type.
15577 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15578 exception specification. Tidy up.
15579 (coerce_delete_type): Preserve exception specification. Tidy up.
15580
15581 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
15582
15583 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15584 (push_binding_level), error.c (cp_tree_printer), pt.c
15585 (process_partial_specialization, tsubst_template_arg_vector),
15586 search.c (lookup_member): Use memset () instead of bzero ().
15587
15588 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
15589
15590 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15591
15592 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
15593
15594 * Make-lang.in (c++.distdir): Remove.
15595
15596 2000-11-04 Mark Mitchell <mark@codesourcery.com>
15597
15598 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15599 declarations from different namespaces to be combined.
15600
15601 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
15602
15603 * decl.c: Include tm_p.h.
15604
15605 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
15606
15607 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15608
15609 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
15610
15611 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15612 (build_overload_value), repo.c (open_repo_file), xref.c
15613 (open_xref_file): Use strchr () and strrchr () instead of index ()
15614 and rindex ().
15615
15616 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
15617
15618 * call.c (build_over_call): Call fold on the CALL_EXPR.
15619
15620 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
15621
15622 * error.c (dump_template_decl): Separate template hearders with
15623 space not comma.
15624
15625 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
15626
15627 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
15628 TS_* flags with corresponding TFF_*. Adjust prototypes of
15629 functions (which used to take a tree_string_flags) to take an int.
15630
15631 * cp-tree.h (enum tree_string_flags): Remove
15632 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15633 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15634 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15635 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15636 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15637 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15638 (type_as_string, decl_as_string, expr_as_string,
15639 context_as_string): Adjust prototype.
15640
15641 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15642 instead of TS_PLAIN.
15643
15644 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15645 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15646 plain `0'.
15647
15648 2000-10-30 Mark Mitchell <mark@codesourcery.com>
15649
15650 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15651 (linkage_kind): New enumeration.
15652 (decl_linkage): New function.
15653 * decl2.c (comdat_linkage): Extend comment.
15654 * error.c (dump_function_decl): Print the arguments used to
15655 instantiate a template, even when not printing the type of the
15656 function.
15657 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15658 not TREE_PUBLIC, to test for external linkage.
15659 * tree.c (decl_linkage): New function.
15660
15661 2000-10-28 Mark Mitchell <mark@codesourcery.com>
15662
15663 * pt.c (instantiate_decl): Always instantiate static data members
15664 initialized in-class.
15665
15666 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
15667
15668 * Make-lang.in: Move all build rules here from Makefile.in,
15669 adapt to new context. Wrap all rules that change the current
15670 directory in parentheses. Expunge all references to $(P).
15671 When one command depends on another and they're run all at
15672 once, use && to separate them, not ;. Add OUTPUT_OPTION to
15673 all object-file generation rules. Delete obsolete variables.
15674
15675 * Makefile.in: Delete.
15676 * config-lang.in: Delete outputs= line.
15677
15678 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
15679
15680 * error.c (dump_function_decl): Print no space between
15681 `ptr-operator' the `type-specifier' of the return type.
15682 (dump_type_prefix): Make sure we put space at the appropriate
15683 place.
15684
15685 2000-10-23 Jason Merrill <jason@redhat.com>
15686
15687 * call.c (equal_functions): Also call decls_match for extern "C" fns.
15688
15689 2000-10-22 Jason Merrill <jason@redhat.com>
15690
15691 * call.c (build_conditional_expr): Use ocp_convert to force
15692 rvalue conversion.
15693
15694 2000-10-22 Mark Mitchell <mark@codesourcery.com>
15695
15696 * call.c (standard_conversion): Use RVALUE_CONVs for all
15697 expressions that satisfy lvalue_p, not just those that satisfy
15698 real_lvalue_p.
15699
15700 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15701
15702 * typeck.c (c_sizeof): Return an expression of `size_t' type,
15703 not one with TYPE_IS_SIZETYPE set.
15704 (dubious_conversion_warnings): Remove special-case code.
15705
15706 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
15707
15708 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15709 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15710 (dump_type_prefix): Print vector-of-int as 'int vector'.
15711 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15712 * tree.c (walk_tree): Handle VECTOR_TYPE.
15713
15714 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15715
15716 2000-10-21 Jason Merrill <jason@redhat.com>
15717
15718 * parse.y (operator): Set got_object from got_scope.
15719 Set looking_for_typename.
15720 * decl.c (lookup_name_real): Clear val after setting from_obj.
15721 Reorganize diagnostic.
15722
15723 2000-10-20 Jason Merrill <jason@redhat.com>
15724
15725 * tree.c (walk_tree): Don't walk into default args.
15726
15727 * error.c (dump_expr): Use host_integerp.
15728
15729 2000-10-20 David Edelsohn <edelsohn@gnu.org>
15730
15731 * typeck2.c (abstract_virtuals_error): Use "because" instead of
15732 "since" in error message.
15733
15734 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15735
15736 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15737
15738 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
15739
15740 * decl.c (revert_static_member_fn): Fixed typo.
15741
15742 2000-10-19 Mark Mitchell <mark@codesourcery.com>
15743
15744 * class.c (subobject_offset_fn): New type.
15745 (dfs_record_base_offsets): Remove.
15746 (record_base_offsets): Likewise.
15747 (dfs_search_base_offsets): Likewise.
15748 (record_subobject_offset): New function.
15749 (check_subobject_offset): Likewise.
15750 (walk_subobject_offsets): Likewise.
15751 (record_subobject_offsets): Likewise.
15752 (layout_conflict_p): Reimplement.
15753 (layout_nonempty_base_or_field): Correct handling of type
15754 conflicts during layout.
15755 (layout_empty_base): Likewise.
15756 (build_base_field): Adjust to handle new representation of empty
15757 base offset table.
15758 (build_base_fields): Likewise.
15759 (layout_virtual_bases): Likewise.
15760 (splay_tree_compare_integer_csts): New function.
15761 (layout_class_type): Use a splay_tree, rather than a varray, to
15762 represent the offsets of empty bases.
15763
15764 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15765 * decl.c (select_decl): Don't return declarations that are
15766 DECL_ANTICIPATED.
15767
15768 2000-10-18 Mark Mitchell <mark@codesourcery.com>
15769
15770 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15771 (fake_std_node): New macro.
15772 * decl.c (in_std): Rename to ...
15773 (in_fake_std): ... this.
15774 (flag_no_builtin): Remove.
15775 (flag_no_nonansi_builtin): Likewise.
15776 (walk_namespaces_r): Use fake_std_node.
15777 (push_namespace): Use std_identifier.
15778 (pop_namespace): Use in_fake_std.
15779 (lookup_name_real): Use fake_std_node.
15780 (init_decl_processing): When -fhonor-std, create the `std'
15781 namespace. Don't create a dummy fake_std_node in that case.
15782 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
15783 (builtin_function): Put builtins whose names don't begin
15784 with `_' in the std namespace.
15785 * decl2.c (flag_no_builtin): Remove.
15786 (flag_no_nonansi_builtin): Likewise.
15787 (set_decl_namespace): Use fake_std_node.
15788 (validate_nonmember_using_decl): Likewise.
15789 (do_using_directive): Likewise.
15790 (handle_class_head): Likewise.
15791 * dump.c (dequeue_and_dump): Likewise.
15792 * except.c (init_exception_processing): Use std_identifier.
15793 * init.c (build_member_call): Use fake_std_node.
15794 * rtti.c (init_rtti_processing): Use std_identifier.
15795
15796 2000-10-17 Mark Mitchell <mark@codesourcery.com>
15797
15798 * cp-tree.h (back_end_hook): Remove declaration.
15799 * decl2.c (back_end_hook): Remove definition.
15800
15801 * dump.c (dequeue_and_dump): Dump TREE_USED.
15802
15803 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
15804
15805 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15806
15807 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15808
15809 * decl.c (WINT_TYPE): Define.
15810 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15811 c_size_type_node, signed_size_type_node and wint_type_node.
15812
15813 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15814
15815 * decl2.c (warn_missing_format_attribute): New variable.
15816 (lang_decode_option): Decode -Wmissing-format-attribute.
15817
15818 2000-10-16 Mark Mitchell <mark@codesourcery.com>
15819
15820 * typeck.c (qualify_type): Remove.
15821 (composite_pointer_type): Fix handling of conversions to `cv void*'.
15822
15823 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15824
15825 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15826
15827 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15828
15829 * Makefile.in (parse.c, parse.h): Create atomically.
15830
15831 2000-10-12 Mark Mitchell <mark@codesourcery.com>
15832
15833 * class.c (current_obstack): Remove.
15834 * decl.c (ggc_p): Remove.
15835 (start_decl): Don't use decl_tree_cons.
15836 (grokdeclarator): Don't use build_decl_list.
15837 (start_function): Don't use decl_tree_cons.
15838 (finish_function): Don't mess with obstacks.
15839 * decl2.c (grok_x_components): Don't use build_decl_list.
15840 * lex.c (make_call_declarator): Don't call decl_tree_cons.
15841 (implicitly_declare_fn): Don't call build_decl_list.
15842 * parse.y (frob_specs): Don't call build_decl_list or
15843 decl_tree_cons.
15844 (expr_or_declarator_intern): Don't call decl_tree_cons.
15845 (primary): Don't call build_decl_list.
15846 (fcast_or_absdcl): Likewise.
15847 (typed_declspecs): Don't call decl_tree_cons.
15848 (reserved_declspecs): Don't call build_decl_list.
15849 (declmods): Likewise.
15850 (reserved_typespecquals): Likewise.
15851 (aggr): Likewise.
15852 (new_type_id): Likewise.
15853 (cv_qualifiers): Likewise.
15854 (after_type_declarator_intern): Likewise.
15855 (notype_declarator_intern): Likewise.
15856 (absdcl_intern): Likewise.
15857 (named_parm): Likewise.
15858 * pt.c (most_specialized_class): Likewise.
15859 * repo.c (temporary_obstack): Make it a structure, not a pointer.
15860 (init_repo): Initialize it.
15861 * search.c (current_obstack): Remove.
15862 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15863
15864 2000-10-09 Richard Henderson <rth@cygnus.com>
15865
15866 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15867 (c++ language support bits for libgcc): Remove.
15868 (c++.clean): Remove cplib2.txt cleanup.
15869 * config-lang.in (headers, lib2funcs): Remove.
15870
15871 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15872 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15873 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15874 * inc/new.h, inc/typeinfo: Remove files.
15875
15876 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
15877
15878 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15879 defined.
15880 (init_decl_processing): Initialize intmax_type_node and
15881 uintmax_type_node.
15882
15883 2000-10-06 Richard Henderson <rth@cygnus.com>
15884
15885 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15886 (original_result_rtx): Remove.
15887 * decl.c (save_function_data): Don't clear x_result_rtx.
15888 (mark_lang_function): Don't mark it either.
15889 * expr.c (fixup_result_decl): Remove.
15890 * semantics.c (genrtl_named_return_value): Frob the return decl
15891 before calling emit_local_var.
15892 (genrtl_finish_function): Don't call fixup_result_decl.
15893 Always emit the jump to return_label.
15894
15895 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
15896
15897 * pt.c (lookup_template_class): Set current access for enum.
15898 (tsubst_enum): Set file & line for enum decl.
15899
15900 * spew.c (yylex): Remove unused variable.
15901
15902 2000-10-05 Richard Henderson <rth@cygnus.com>
15903
15904 * semantics.c (genrtl_finish_function): Don't init or check
15905 can_reach_end; remove noreturn and return value checks.
15906
15907 2000-10-05 Tom Tromey <tromey@cygnus.com>
15908
15909 * init.c (build_java_class_ref): Use `build_static_name' with a
15910 suffix, not a prefix, to build the class object's name.
15911
15912 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15913
15914 * cp-tree.h (access_kind): Fix comment typo.
15915 * decl2.c (grokfield): Fix diagnostic typo.
15916 * semantics.c (finish_template_type): Fix comment typo.
15917 (finish_qualified_object_call_expr): Likewise.
15918
15919 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15920
15921 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15922 tsubsting fails.
15923
15924 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15925
15926 * spew.c (frob_id): New static function.
15927 (frob_opname): Use it.
15928 (yylex): Use it.
15929
15930 2000-10-01 Mark Mitchell <mark@codesourcery.com>
15931
15932 * decl.c (lang_mark_false_label_stack): Remove.
15933 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15934
15935 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
15936
15937 * gxxint.texi: Use @email for formatting email addresses.
15938
15939 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
15940
15941 * error.c: Remove direct obstack manipulation. Replace with
15942 output_buffer-based formatting. Adjust calls to removed macros.
15943 (obstack_chunk_alloc, obstack_chunk_free): Remove.
15944 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15945 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15946
15947 2000-09-24 Mark Mitchell <mark@codesourcery.com>
15948
15949 * ir.texi: Move to ../c-tree.texi.
15950
15951 2000-09-20 Jason Merrill <jason@redhat.com>
15952
15953 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15954
15955 2000-09-21 Andreas Jaeger <aj@suse.de>
15956
15957 * errfn.c: Move declaration of cp_printer and cp_printers to ...
15958 * cp-tree.h: ... here.
15959
15960 * error.c: Remove declaration of cp_printer.
15961
15962 2000-09-20 Mark Mitchell <mark@codesourcery.com>
15963
15964 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15965
15966 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
15967
15968 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15969 users.
15970
15971 2000-09-18 Mark Mitchell <mark@codesourcery.com>
15972
15973 * decl.c (start_function): Robustify.
15974
15975 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15976
15977 * cp-tree.h (check_function_format): Accept a `status' parameter.
15978
15979 * call.c, typeck.c: Updates calls to `check_function_format'.
15980
15981 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
15982
15983 * decl2.c (handle_class_head): Always push some scope even
15984 in the error case.
15985
15986 2000-09-16 Mark Mitchell <mark@codesourcery.com>
15987
15988 * cp-tree.h (struct cp_language_function): Remove
15989 x_scope_stmt_stack and name_declared.
15990 (current_scope_stmt_stack): Remove.
15991 (function_name_declared_p): New macro.
15992 (struct lang_decl_flags): Use c_lang_decl as a base class.
15993 (context): Remove.
15994 (struct lang_decl): Replace saved_tree with context.
15995 (DECL_FRIEND_CONTEXT): Adjust accordingly.
15996 (SET_DECL_FRIEND_CONTEXT): Likewise.
15997 (DECL_VIRTUAL_CONTEXT): Likewise.
15998 (DECL_SAVED_TREE): Remove.
15999 (C_DECLARED_LABEL_FLAG): Likewise.
16000 (cplus_expand_expr_stmt): Don't declare.
16001 (add_decl_stmt): Likewise.
16002 (add_scope_stmt): Likewise.
16003 * decl.c (mark_stmt_tree): Remove.
16004 (case_compare): Likewise.
16005 (finish_case_label): Use c_add_case_label.
16006 (init_decl_processing): Set more language-specific hooks.
16007 (build_enumerator): Fix typo in comment.
16008 (cplus_expand_expr_stmt): Remove.
16009 (mark_lang_function): Use mark_c_language_function.
16010 (lang_mark_tree): Use c_mark_lang_decl.
16011 * decl2.c: Change order of inclusion.
16012 * except.c: Likewise.
16013 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
16014 back on c_expand_expr.
16015 * friend.c: Include expr.h.
16016 * init.c: Change order of inclusion.
16017 * Makefile.in: Update dependencies.
16018 * lex.h (free_lang_decl_chain): Remove.
16019 * optimize.c (maybe_clone_body): Use function_name_declared_p.
16020 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
16021 it doesn't exist.
16022 (instantiate_decl): Use function_name_declared_p.
16023 * semantics.c (lang_expand_expr_stmt): Remove.
16024 (set_current_function_name_declared): Likewise.
16025 (current_function_name_declared): Likewise.
16026 (begin_compound_stmt): Use function_name_declared_p.
16027 (add_decl_stmt): Remove.
16028 (setup_vtbl_ptr): Use function_name_declared_p.
16029 (add_scope_stmt): Remove.
16030 (current_scope_stmt_stack): New function.
16031 (cp_expand_stmt): Don't handle SCOPE_STMTs.
16032 (expand_body): Use function_name_declared_p.
16033 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
16034 * typeck.c: Change order of includes.
16035 (convert_sequence): Remove.
16036
16037 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
16038
16039 * lex.c (reswords): Add _Complex.
16040
16041 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16042
16043 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
16044
16045 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
16046
16047 * init.c (begin_init_stmts): Don't use // comments.
16048
16049 2000-09-12 Jason Merrill <jason@redhat.com>
16050
16051 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
16052 all non-extern arrays.
16053
16054 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
16055 typenames, too. Downgrade complaint to pedwarn.
16056 (xref_tag): Warn about surprising behavior of 'friend struct T'.
16057 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
16058 'class This::Inherited'.
16059
16060 2000-09-12 Mark Mitchell <mark@codesourcery.com>
16061
16062 * decl.c (finish_case_label): Given the LABEL_DECL a
16063 DECL_CONTEXT.
16064
16065 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
16066
16067 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
16068 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
16069 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
16070 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
16071 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
16072 New macros.
16073 (sorry_for_unsupported_tree, print_scope_operator,
16074 print_left_paren, print_right_paren, print_left_bracket,
16075 print_right_bracket, print_whitespace): Likewise.
16076 (aggr_variety): Rename to class_key_or_enum.
16077 (print_type): Rename to print_type_id.
16078 (print_type_specifier_seq, print_simple_type_specifier,
16079 print_elaborated_type_specifier,
16080 print_rest_of_abstract_declarator,
16081 print_parameter_declaration_clause, print_exception_specification,
16082 print_nested_name_specifier, print_template_id,
16083 typedef_original_name, print_template_argument_list_start,
16084 print_template_argument_list_end): New functions.
16085
16086 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
16087
16088 * ir.texi: Add more documentation.
16089
16090 2000-09-11 Mark Mitchell <mark@codesourcery.com>
16091
16092 * cp-tree.h (struct saved_scope): Remove x_function_parms.
16093 (current_function_parms): Don't define.
16094 (struct cp_language_function): Remove parms_stored.
16095 (current_function_just_assigned_this): Don't define.
16096 (current_function_parms_stored): Likewise.
16097 (static_ctors): Declare.
16098 (static_dtors): Likewise.
16099 (SF_EXPAND): Don't define.
16100 (expand_start_early_try_stmts): Remove declaration.
16101 (store_parm_decls): Likewise.
16102 * decl.c (static_ctors): Don't declare.
16103 (static_dtors): Likewise.
16104 (struct binding_level): Remove this_block.
16105 (poplevel): Remove dead code.
16106 (set_block): Likewise.
16107 (mark_binding_level): Don't mark this_block.
16108 (mark_saved_scope): Don't mark x_function_parms.
16109 (init_decl_processing): Don't add current_function_parms as a GC
16110 root.
16111 (check_function_type): Change prototype.
16112 (start_function): Remove RTL-generation code.
16113 (expand_start_early_try_stmts): Remove.
16114 (store_parm_decls): Give it internal linkage. Remove
16115 RTL-generation code.
16116 (finish_function): Remove RTL-generation code.
16117 * decl2.c (static_ctors): Fix formatting.
16118 (static_dtors): Likewise.
16119 * method.c (use_thunk): Don't call store_parm_decls.
16120 (synthesize_method): Likewise.
16121 * optimize.c (maybe_clone_body): Likewise.
16122 * parse.y (fn.def2): Likewise.
16123 (.set_base_init): Likewise.
16124 (nodecls): Likewise.
16125 * pt.c (instantiate_decl): Likewise.
16126 * rtti.c (synthesize_tinfo_fn): Likewise.
16127 * semantics.c (genrtl_try_block): Simplify.
16128 (expand_body): Use genrtl_start_function and
16129 genrtl_finish_function.
16130 (genrtl_start_function): New function.
16131 (genrtl_finish_function): Likewise.
16132
16133 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16134
16135 * error.c (cp_tree_printer, case 'P'): Append break.
16136
16137 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16138
16139 * cp-tree.h (frob_opname): Declare.
16140 * parse.y (saved_scopes): New static variable.
16141 (cp_parse_init): Adjust.
16142 (do_id): If lastiddecl is NULL, do do_identifier.
16143 (operator): Save scope information.
16144 (unoperator): New reduction. Restore scope information.
16145 (operator_name): Append unoperator. Call frob_opname.
16146 * spew.c (frob_opname): Define.
16147
16148 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
16149
16150 * decl.c, rtti.c: Include defaults.h if not already included.
16151 Don't define the *_TYPE_SIZE macros.
16152
16153 2000-09-09 Mark Mitchell <mark@codesourcery.com>
16154
16155 * cp-tree.h (push_switch): Change prototype.
16156 (check_cp_case_value): Remove declaration.
16157 (decl_constant_value): Likewise.
16158 * decl.c (struct cp_switch): Add switch_stmt and cases.
16159 (case_compare): New function.
16160 (push_switch): Set switch_stmt. Initialize cases.
16161 (pop_switch): Clean up cases.
16162 (define_case_label): Rename to ...
16163 (finish_case_label): ... this. Do semantic analysis for case
16164 labels here.
16165 (start_function): Correct comment.
16166 * decl2.c (check_cp_case_value): Remove.
16167 * expr.c (do_case): Remove.
16168 * pt.c (tsubst_expr): Adjust call to finish_case_label.
16169 * semantics.c (genrtl_do_poplevel): Remove declaration.
16170 (RECHAIN_STMTS): Remove.
16171 (finish_break_stmt): Use build_break_stmt.
16172 (finish_continue_stmt): Use build_continue_stmt.
16173 (finish_switch_cond): Adjust condition here, rater than in
16174 c_expand_start_case.
16175 (finish_case_label): Remove.
16176 * typeck.c (c_expand_return): Remove.
16177 (c_expand_start_case): Likewise.
16178
16179 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
16180
16181 * ir.texi: Document type nodes.
16182
16183 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16184
16185 * cp-tree.h (init_cp_semantics): Declare.
16186 (genrtl_try_block): Don't declare.
16187 (genrtl_handler): Likewise.
16188 (genrtl_catch_block): Likewise.
16189 (genrtl_ctor_stmt): Likewise.
16190 (genrtl_subobject): Likewise.
16191 (genrtl_do_poplevel): Likewise.
16192 (genrtl_named_return_value): Likewise.
16193 * lex.c (init_parse): Call init_cp_semantics.
16194 * semantics.c (genrtl_try_block): Give it internal linkage.
16195 (genrtl_handler): Likewise.
16196 (genrtl_catch_block): Likewise.
16197 (genrtl_ctor_stmt): Likewise.
16198 (genrtl_subobject): Likewise.
16199 (genrtl_do_poplevel): Likewise.
16200 (genrtl_named_return_value): Likewise.
16201 (lang_expand_stmt): Rename to ...
16202 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
16203 (init_cp_semantics): Define.
16204
16205 * decl.c (initialize_local_var): Remove RTL-generating code.
16206 * semantics.c (genrtl_try_block): Fix formatting.
16207
16208 Move statement-tree facilities from C++ to C front-end.
16209 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16210 (void_zero_node): Remove.
16211 (stmt_tree): Likewise.
16212 (scope_chain): Adjust.
16213 (language_function): Rename to cp_language_function.
16214 (cp_function_chain): Adjust.
16215 (current_stmt_tree): Remove.
16216 (last_tree): Likewise.
16217 (last_expr_type): Likewise.
16218 (struct lang_decl): Adjust.
16219 (STMT_IS_FULL_EXPR_P): Remove.
16220 (add_tree): Remove.
16221 (begin_stmt_tree): Likewise.
16222 (finish_stmt_tree): Likewise.
16223 (walk_tree_fn): Likewise.
16224 (walk_stmt_tree): Likewise.
16225 * class.c (finish_struct): Replace use of add_tree with add_stmt.
16226 * decl.c (mark_stmt_tree): Adjust type.
16227 (init_decl_processing): Don't build void_zero_node.
16228 (initialize_local_var): Adjust usage of current_stmt_tree.
16229 (finish_enum): Use add_stmt, not add_tree.
16230 (save_function_data): Adjust use of language_function.
16231 (finish_constructor_body): Use add_stmt, not add_tree.
16232 (finish_destructor_body): Likewise.
16233 (push_cp_function_context): Adjust use of language_function.
16234 (pop_cp_function_context): Likewise.
16235 (mark_lang_function): Likewise.
16236 (mark_cp_function_context): Likewise.
16237 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16238 (build_vec_init): Likewise.
16239 * semantics.c (SET_LAST_STMT): Remove.
16240 (RECHAIN_STMTS): Don't use it.
16241 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16242 (current_stmt_tree): Define.
16243 (add_tree): Remove.
16244 (finish_goto_stmt): Use add_stmt, not add_tree.
16245 (finish_expr_stmt): Likewise.
16246 (begin_if_stmt): Likewise.
16247 (finish_then_clause): Likewise.
16248 (begin_while_stmt): Likewise.
16249 (begin_do_stmt): Likewise.
16250 (finish_return_stmt): Likewise.
16251 (begin_for_stmt): Likewise.
16252 (finish_break_stmt): Likewise.
16253 (finish_continue_stmt): Likewise.
16254 (begin_switch_stmt): Likewise.
16255 (finish_case_label): Likewise.
16256 (begin_try_block): Likewise.
16257 (begin_function_try_block): Likewise.
16258 (begin_handler): Likewise.
16259 (begin_catch_block): Likewise.
16260 (begin_compound_stmt): Likewise.
16261 (begin_asm_stmt): Likewise.
16262 (finish_asm_stmt): Likewise.
16263 (finish_label_stmt): Likewise.
16264 (add_decl_stmt): Likewise.
16265 (finish_subobject): Likewise.
16266 (finish_decl_cleanup): Likewise.
16267 (finish_named_return_value): Likewise.
16268 (setup_vtbl_ptr): Likewise.
16269 (add_scope_stmt): Likewise.
16270 (finish_stmt_expr): Likewise.
16271 (prune_unused_decls): Remove.
16272 (begin_stmt_tree): Likewise.
16273 (finish_stmt_tree): Likewise.
16274 (prep_stmt): Adjust use of current_stmt_tree.
16275 (lang_expand_stmt): Likewise.
16276 * tree.c (statement_code_p): Remove.
16277 (cp_statement_code_p): New function.
16278 (walk_stmt_tree): Remove.
16279 (init_tree): Set lang_statement_code_p.
16280
16281 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
16282
16283 Integrated preprocessor.
16284
16285 * Make-lang.in, Makefile.in: Remove all references to input.c,
16286 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
16287 * gxx.gperf, hash.h, input.c: Delete.
16288 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16289 initialized properly.
16290
16291 * class.c (fixup_pending_inline): Take a tree, not a
16292 struct pending_inline *. All callers changed.
16293 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16294 RID_PROTECTED entries in ridpointers[] array here.
16295 * decl.c (duplicate_decls): Do not refer to struct
16296 pending_inline.
16297 (record_builtin_type, init_decl_processing): Use RID_MAX not
16298 CP_RID_MAX.
16299 (grokdeclarator): Use C_IS_RESERVED_WORD.
16300 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16301 cpplib.
16302 (grok_x_components): Do not inspect pending_inlines chain.
16303
16304 * cp-tree.h (struct lang_identifier): Add rid_code entry.
16305 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16306 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16307 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16308 TIME_IDENTIFIER_FILEINFO): Kill.
16309 Update prototypes.
16310 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
16311 single 32-bit word.
16312 * parse.y: Call do_pending_inlines unconditionally.
16313 reinit_parse_for_method is now snarf_method. fn.defpen is no
16314 longer necessary. Remove unnecessary <itype> annotation on
16315 SCOPE. Do not refer to end_of_file or struct pending_inline.
16316 * semantics.c (begin_inline_definitions): Call
16317 do_pending_inlines unconditionally.
16318
16319 * lex.c: Remove all code now shared with C front end.
16320 Initialize cpplib properly if USE_CPPLIB. Put reserved words
16321 into the get_identifier table. Rewrite pragma handling to
16322 work with the registry. Move code to save tokens for later
16323 processing to spew.c.
16324
16325 * spew.c: Rewrite everything in terms of token streams instead
16326 of text. Move routines here from lex.c / input.c as
16327 appropriate. GC-mark trees hanging off the pending inlines
16328 chain.
16329
16330 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16331
16332 * NEWS: Mention that the named return value extension has been
16333 deprecated.
16334 * cp-tree.h (original_result_rtx): Define.
16335 (TREE_REFERENCE_EXPR): Remove.
16336 (DECL_VPARENT): Likewise.
16337 (pushdecl_nonclass_level): Likewise.
16338 (store_return_init): Likewise.
16339 (reinit_lang_specific): Likewise.
16340 (genrtl_named_return_value): Change prototype.
16341 * decl.c (original_result_rtx): Remove.
16342 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16343 Do not generate RTL for local variables here.
16344 (store_return_init): Remove.
16345 * semantics.c (genrtl_named_return_value): Simplify. Fold in
16346 store_return_init.
16347 (finish_named_return_value): Adjust accordingly. Warn that this
16348 extension is deprecated.
16349 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16350
16351 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16352
16353 * pt.c (type_unification_real): Replace switch with if.
16354 (unify): Tsubst non-type parms before comparing.
16355
16356 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16357
16358 * error.c (dump_typename): New function, broken out of ...
16359 (dump_type): ... here. Use it.
16360 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16361
16362 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16363
16364 * init.c (build_offset_ref): Deal with namespace scoped
16365 TEMPLATE_ID_EXPRs.
16366
16367 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16368
16369 * class.c (resolve_address_of_overloaded_function): Add
16370 explanation message.
16371 * decl.c (define_case_label): Reformat explanation.
16372 * decl2.c (finish_static_data_member_decl): Likewise.
16373 (grokfield): Likewise.
16374 * friend.c (do_friend): Likewise.
16375
16376 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
16377
16378 * tree.c (walk_tree): Expose tail recursion.
16379 (walk_stmt_tree): New function.
16380 * cp-tree.h: Prototype walk_stmt_tree.
16381 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16382 the BLOCKs directly. If a BLOCK has no variables after
16383 pruning, discard it.
16384 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
16385 restore the line number.
16386
16387 2000-09-05 Mark Mitchell <mark@codesourcery.com>
16388
16389 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16390 (pt.o): Remove dependency on HTAB_H.
16391 * cp-tree.h: Include hashtab.h.
16392 (walk_tree): Change prototype.
16393 (walk_tree_without_duplicates): New function.
16394 * decl.c (check_default_argument): Use it.
16395 * optimize.c (remap_decl): Adjust calls to walk_tree.
16396 (copy_body): Likewise.
16397 (expand_calls_inline): Likewise.
16398 (calls_setjmp_p): Use walk_tree_without_duplicates.
16399 * pt.c: Don't include hashtab.h.
16400 (for_each_template_parm): Use walk_tree_without_duplicates.
16401 * semantics.c (finish-stmt_tree): Likewise.
16402 (expand_body): Likewise.
16403 * tree.c (walk_tree): Add additional parameter.
16404 (walk_tree_without_duplicates): New function.
16405 (count_trees): Use it.
16406 (verify_stmt_tree): Adjust call to walk_tree.
16407 (find_tree): Use walk_tree_without_duplicates.
16408 (no_linkage_check): Likewise.
16409 (break_out_target_exprs): Adjust call to walk_tree.
16410 (cp_unsave): Likewise.
16411
16412 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16413
16414 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16415 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16416 * cp-tree.h (TYPE_BINFO): Adjust comment.
16417 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16418 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16419 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16420 (TYPE_TEMPLATE_INFO): Likewise.
16421 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16422 * class.c (push_nested_class): Likewise.
16423 * decl.c (lookup_name_real): Likewise.
16424 (grokdeclarator): Likewise.
16425 (grok_op_properties): Likewise.
16426 (xref_tag): Likewise.
16427 (xref_basetypes): Likewise.
16428 * decl2.c (constructor_name_full): Likewise.
16429 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16430 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16431 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16432 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16433 (dump_type_suffix): Likewise.
16434 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16435 instead.
16436 (get_aggr_from_typedef): Likewise.
16437 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16438 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16439 (write_template_parm): Likewise.
16440 (write_template_template_parm): Check tree code instead of
16441 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16442 * method.c (build_overload_nested_name): Add
16443 BOUND_TEMPLATE_TEMPLATE_PARM.
16444 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16445 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16446 * pt.c (convert_template_argument): Check tree code instead of
16447 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16448 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16449 (for_each_template_parm): Adjust comment.
16450 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
16451 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16452 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
16453 template_args_equal to compare template template parameter cases.
16454 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16455 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16456 instead.
16457 * tree.c (copy_template_template_parm): Decide whether to create
16458 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16459 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16460 (copy_tree_r): Likewise.
16461 * typeck.c (comptypes): Likewise. Check tree code instead of
16462 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16463
16464 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
16465
16466 * decl.c (finish_function): Move the code for handling functions
16467 marked with the constructor and destructor attributes inside the
16468 expand_p block.
16469
16470 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16471
16472 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16473
16474 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16475
16476 * pt.c (lookup_template_class): Remove abort.
16477 * tree.c (get_type_decl): Allow error_mark_node.
16478
16479 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16480
16481 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16482 TEMPLATE_ID_EXPRs.
16483
16484 2000-09-03 Mark Mitchell <mark@codesourcery.com>
16485
16486 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16487 new ABI mangling.
16488
16489 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16490
16491 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16492 union tag mismatch error reporting.
16493
16494 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16495
16496 * call.c (build_scoped_method_call): Check it is not a namespace.
16497
16498 2000-08-30 Jason Merrill <jason@redhat.com>
16499
16500 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16501
16502 * tree.c (bot_manip): Check TREE_CONSTANT rather than
16503 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
16504 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16505
16506 * decl.c (start_function): Always call make_function_rtl.
16507
16508 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16509
16510 * semantics.c (prune_unused_decls): New function.
16511 (finish_stmt_tree): Call it via walk_tree.
16512
16513 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16514
16515 * class.c (build_secondary_vtable): Constify a char *.
16516 * decl.c (init_decl_processing): Initialize function_id_node,
16517 pretty_function_id_node, and func_id_node.
16518 * input.c (struct input_source): Constify 'str'.
16519 (feed_input): Constify first argument.
16520 * mangle.c (write_identifier): Constify argument.
16521 * pt.c (mangle_class_name_for_template): Constify argument.
16522
16523 2000-08-29 Mark Mitchell <mark@codesourcery.com>
16524
16525 * typeck.c (mark_addressable): Remove code that pokes around in
16526 RTL.
16527
16528 2000-08-28 Jason Merrill <jason@redhat.com>
16529
16530 * lex.c (file_name_nondirectory): Move to toplev.c.
16531
16532 * cp-tree.h (LOCAL_CLASS_P): New macro.
16533 * class.c (finish_struct_1): Use it.
16534
16535 2000-08-27 Alex Samuel <samuel@codesourcery.com>
16536
16537 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16538 (write_encoding): Pass another argument to write_name.
16539 (write_name): Add ignore_local_scope parameter. Fix handling of
16540 local names.
16541 (write_nested_name): Use write_unqualified_name.
16542 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
16543 (write_template_prefix): Use write_unqualified_name.
16544 (write_component): Remove.
16545 (write_local_name): Add parameter. Use direct local entity to
16546 discriminator calculation.
16547 (write_class_enum_type): Pass another argument to write_name.
16548 (write_template_template_arg): Likewise.
16549 (make_guard_variable): Likewise.
16550
16551 2000-08-27 Jason Merrill <jason@redhat.com>
16552
16553 * decl.c (pushdecl): Matching decls for local externs are found in
16554 the current level. Propagate linkage information from previous
16555 declarations.
16556
16557 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
16558
16559 * ir.texi (Expressions): Fix typo.
16560
16561 2000-08-25 Greg McGary <greg@mcgary.org>
16562
16563 * tree.c (init_tree): Use ARRAY_SIZE.
16564
16565 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16566
16567 * error.c (cp_tree_printer): Rework.
16568
16569 2000-08-25 Mark Mitchell <mark@codesourcery.com>
16570
16571 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16572 dyn-string.o.
16573 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16574 (cp-demangle.o): Remove target.
16575 (dyn-string.o): Likewise.
16576
16577 * decl.c (grokfndecl): Require that `main' return an `int'.
16578 * mangle.c (write_encoding): Don't mangle return types for
16579 conversion functions.
16580
16581 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16582
16583 * error.c (tree_formatting_info): New data type.
16584 (tree_being_formatted): New macro.
16585 (tree_formatting_flags): Likewise.
16586 (put_whitespace): Likewise.
16587 (print_tree_identifier): Likewise.
16588 (print_identifier): Likewise.
16589 (cp_tree_printer, print_function_argument_list, print_declaration,
16590 print_expression, print_function_declaration,
16591 print_function_parameter, print_type, print_cv_qualifier): New
16592 functions.
16593 (init_error): Initialize lang_printer.
16594
16595 2000-08-24 Jason Merrill <jason@redhat.com>
16596
16597 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16598 adjustment necessary.
16599
16600 2000-08-24 Greg McGary <greg@mcgary.org>
16601
16602 * cp-tree.h (MAIN_NAME_P): Remove macro.
16603
16604 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
16605
16606 * error.c (print_instantiation_context): Don't forget to flush the
16607 buffer.
16608
16609 2000-08-23 Jason Merrill <jason@redhat.com>
16610
16611 * typeck.c (build_ptrmemfunc): Save the input pmf.
16612
16613 * method.c (process_modifiers): Use same_type_p.
16614
16615 2000-08-23 Mark Mitchell <mark@codesourcery.com>
16616
16617 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16618 * mangle.c (write_function_type): Change prototype.
16619 (write_encoding): Don't mangle return types for
16620 constructors or destructors.
16621 (write_type): Adjust call to write_function_type.
16622 * pt.c (instantiate_template): Instantiate alternate entry points
16623 when instantiating the main function.
16624
16625 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16626
16627 * error.c (cp_print_error_function): Don't use embedded '\n' in
16628 output_printf.
16629
16630 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16631
16632 * decl.c (init_decl_processing): Remove bogus initialization.
16633 * error.c (lang_print_error_function): Restore here.
16634 (init_error): Initialize print_error_function.
16635
16636 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16637
16638 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16639
16640 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
16641
16642 * Makefile.in (error.o): Depends on diagnostic.h
16643
16644 * cp-tree.h (problematic_instantiation_changed,
16645 record_last_problematic_instantiation, current_instantiation,
16646 print_instantiation_context): Declare.
16647 (maybe_print_template_context): Remove.
16648
16649 * decl.c (init_decl_processing): Set print_error_function to NULL.
16650 (lang_print_error_function): Remove, since we're using a new
16651 machinery.
16652
16653 * error.c: #include diagnostic.h
16654 (function_category): New function.
16655 (cp_diagnostic_starter): Likewise.
16656 (cp_diagnostic_finalizer): Likewise.
16657 (cp_print_error_function): Likewise.
16658 (maybe_print_instantiation_context): Likewise.
16659 (print_instantiation_full_context): Likewise.
16660 (print_instantiation_partial_context): Likewise.
16661 (print_instantiation_context): Define.
16662 (init_error): Initialize diagnostic pager and finalizer.
16663
16664 * pt.c (problematic_instantiation_changed): Define.
16665 (record_last_problematic_instantiation): Likewise.
16666 (current_instantiation): Likewise.
16667 (maybe_print_template_context): Remove.
16668 (print_template_context): Likewise.
16669 (current_tinst_level): Make static to reflect Brendan Kehoe's
16670 change of 1995-04-13.
16671 (push_tinst_level): Call print_instantiation_context.
16672
16673 2000-08-21 Nix <nix@esperi.demon.co.uk>
16674
16675 * lang-specs.h: Do not process -o or run the assembler if
16676 -fsyntax-only.
16677
16678 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
16679
16680 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16681 variables.
16682 * decl2.c (lang_decode_option): Disable gettext attributes for
16683 -ansi.
16684
16685 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
16686
16687 * lex.c (lang_init_options): Default diagnostic message maximum
16688 length to 80, when line-wrapping.
16689
16690 2000-08-20 Mark Mitchell <mark@codesourcery.com>
16691
16692 * class.c (build_vtbl_initializer): Clear the entire
16693 vtbl_init_data. Start keeping track of the functions for which we
16694 have created vcall offsets here.
16695 (dfs_build_vcall_offset_vtbl_entries): Remove.
16696 (build_vcall_offset_vtbl_entries): Reimplement.
16697 (add_vcall_offset_vtbl_entries_r): New function.
16698 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
16699 computing when vcall offsets are necessary.
16700
16701 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16702
16703 * decl.c (member_function_or_else): Use cp_error ... %T.
16704 (grokdeclarator): Likewise.
16705 (start_method): Likewise.
16706 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16707
16708 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16709
16710 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16711 TYPE_DECLs.
16712
16713 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16714
16715 * cp-tree.h (PTRMEM_OK_P): New macro.
16716 (itf_ptrmem_ok): New enumeration value.
16717 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16718 argument. Diagnose implicit pointer to member.
16719 (instantiate_type): Don't diagnose implicit pointer to member
16720 here. Pass itf_ptrmem_ok if ok. Adjust calls to
16721 resolve_address_of_overloaded_function.
16722 * init.c (build_offset_ref): Set PTRMEM_OK_P.
16723 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16724 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16725 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16726 (build_unary_op): Deal with single non-static member in
16727 microsoft-land.
16728
16729 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16730
16731 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16732
16733 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16734
16735 * cp-tree.h (enum_name_string): Remove prototype.
16736 (report_case_error): Remove prototype.
16737 * cp/typeck2.c (enum_name_string): Remove.
16738 (report_case_error): Remove.
16739 * error.c (dump_expr): Deal with enum values directly.
16740 Correctly negate integer constant.
16741
16742 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16743
16744 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16745 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16746 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16747 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16748 (__cxa_vec_new): Use __cxa_vec_new2.
16749 (__cxa_vec_delete): Use __cxa_vec_delete2.
16750
16751 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16752
16753 * vec.cc (__cxa_vec_new): Set "C" linkage.
16754 (__cxa_vec_ctor): Likewise.
16755 (__cxa_vec_cctor): Likewise.
16756 (__cxa_vec_dtor): Likewise.
16757 (__cxa_vec_delete): Likewise.
16758 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16759 (__cxa_vec_ctor): Likewise.
16760 (__cxa_vec_cctor): Likewise.
16761 (__cxa_vec_dtor): Likewise.
16762 (__cxa_vec_delete): Likewise.
16763
16764 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16765
16766 * class.c (instantiate_type): Reinstate local variable
16767 deleted in previous change.
16768
16769 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16770 itf_no_attributes.
16771
16772 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16773
16774 * cp-tree.h (instantiate_type_flags): New enumeration.
16775 (instantiate_type): Change parameter.
16776 * class.c (instantiate_type): Adjust prototype. Adjust.
16777 * call.c (standard_conversion): Adjust instantiate_type call.
16778 (reference_binding): Likewise.
16779 (build_op_delete_call): Likewise.
16780 (convert_like_real): Likewise.
16781 * cvt.c (cp_convert_to_pointer): Likewise.
16782 (convert_to_reference): Likewise.
16783 * pt.c (convert_nontype_argument): Likewise.
16784 * typeck.c (build_binary_op): Likewise.
16785 (build_ptrmemfunc): Likewise.
16786 (convert_for_assignment): Likewise.
16787
16788 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16789
16790 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16791 (current_aggr): Define.
16792 * decl.c (grokdeclarator): Make sure a friend class is an
16793 elaborated type specifier.
16794 * parse.y (current_aggr): Remove static definition.
16795 (cp_parse_init): Adjust.
16796 (structsp): Clear and restore current_aggr.
16797 (component_decl_list): Clear current_aggr.
16798
16799 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16800 aggregate tag on the typename's context.
16801
16802 * pt.c (tsubst_friend_class): Return error_mark_node, if
16803 parms becomes NULL.
16804 (instantiate_class_template): Ignore error_mark_node friend types.
16805
16806 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
16807
16808 * cvt.c (warn_ref_binding): New static function, broken out of ...
16809 (convert_to_reference): ... here. Use it.
16810
16811 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16812
16813 * parse.y (template_arg): Add rule for template qualified with
16814 global scope.
16815
16816 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16817
16818 * decl2.c (add_function): Reorganize.
16819 (arg_assoc): Do not consider function template decls.
16820
16821 2000-08-11 Jason Merrill <jason@redhat.com>
16822
16823 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16824 looking inside.
16825
16826 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16827
16828 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16829 (lookup_nested_tag): Likewise.
16830
16831 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16832 can be produced.
16833
16834 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16835
16836 * parse.y (named_complex_class_head_sans_basetype): Remove
16837 always true if.
16838
16839 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16840
16841 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16842 explicit TEMPLATE_ID_EXPR args.
16843 (build_expr_from_tree, case CALL_EXPR): Likewise.
16844
16845 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16846
16847 * decl.c (check_tag_decl): Diagnose typename's which don't
16848 declare anything.
16849
16850 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
16851
16852 * init.c (build_aggr_init): Reject bogus array initializers
16853 early.
16854
16855 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16856
16857 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16858 runtime.
16859 * cp/tinfo.cc (__dynamic_cast): Likewise.
16860 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16861
16862 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16863
16864 * cvt.c (convert_to_pointer_force): Fix error message when
16865 attempting to cast from ambiguous base.
16866
16867 2000-08-08 Jason Merrill <jason@redhat.com>
16868
16869 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16870 (tsubst_template_arg_vector): Likewise.
16871
16872 * decl2.c (build_anon_union_vars): Choose the largest field; don't
16873 assume that one will be as large as the union.
16874
16875 2000-08-07 Kazu Hirata <kazu@hxi.com>
16876
16877 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16878 * decl.c (pop_labels): Likewise.
16879
16880 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
16881
16882 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16883 specifications.
16884 (__pointer_to_member_type_info): Likewise.
16885 (__base_class_info): Likewise.
16886 (__class_type_info): Likewise.
16887 (__si_class_type_info): Likewise.
16888 (__vmi_class_type_info): Likewise.
16889 * tinfo.cc (__si_class_type_info::__do_find_public_src):
16890 Changed member names to match specifications.
16891 (__vmi_class_type_info::__do_find_public_src): Likewise.
16892 (__si_class_type_info::__do_dyncast): Likewise.
16893 (__vmi_class_type_info::__do_dyncast): Likewise.
16894 (__si_class_type_info::__do_upcast): Likewise.
16895 (__vmi_class_type_info::__do_upcast): Likewise.
16896 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16897 (__pbase_type_info::__pointer_catch): Likewise.
16898 (__pointer_type_info::__pointer_catch): Likewise.
16899 (__pointer_to_member_type_info::__pointer_catch): Likewise.
16900
16901 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
16902
16903 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16904 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16905 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16906
16907 2000-08-04 Mark Mitchell <mark@codesourcery.com>
16908
16909 * cp-tree.h (add_method): Change prototype.
16910 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
16911 Don't double the size of the method vector in the error case.
16912 (handle_using_decl): Adjust call to add_method.
16913 (add_implicitly_declared_members): Likewise.
16914 (clone_function_decl): Likewise.
16915 * decl2.c (check_classfn): Likewise.
16916 * semantics.c (finish_member_declaration): Likewise.
16917
16918 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
16919
16920 * decl.c (flag_isoc94): New variable.
16921
16922 2000-08-02 Jason Merrill <jason@redhat.com>
16923
16924 * pt.c (do_type_instantiation): Add complain parm; don't complain
16925 if called recursively.
16926 * cp-tree.h, parse.y: Adjust.
16927
16928 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
16929
16930 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16931 -Wno-strict-prototypes.
16932
16933 * g++spec.c: Adjust type of second argument to
16934 lang_specific_driver, and update code as necessary.
16935
16936 * cp-tree.h: Don't prototype min_precision here.
16937 (my_friendly_assert): Cast expression to void.
16938 * semantics.c (do_poplevel): Initialize scope_stmts.
16939
16940 2000-08-02 Mark Mitchell <mark@codesourcery.com>
16941
16942 * cp-tree.h (DECL_NEEDED_P): Tweak.
16943
16944 2000-07-28 Jason Merrill <jason@redhat.com>
16945
16946 * lang-specs.h: Use %i in rule for .ii files.
16947
16948 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
16949
16950 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16951
16952 2000-07-30 Mark Mitchell <mark@codesourcery.com>
16953
16954 Allow indirect primary bases.
16955 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
16956 primary_base.
16957 (CLASSTYPE_VFIELD_PARENT): Remove.
16958 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16959 (BINFO_PRIMARY_BINFO): Remove.
16960 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16961 (BINFO_VBASE_PRIMARY_P): Likewise.
16962 (BINFO_PRIMARY_BASE_OF): New macro.
16963 (BINFO_INDIRECT_PRIMARY_P): Likewise.
16964 (get_primary_binfo): New function.
16965 * decl.c (lang_mark_tree): Make lang_type::primary_base.
16966 * class.c (vcall_offset_data_s): Rename to ...
16967 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
16968 and add ctor_vtbl_p.
16969 (get_derived_offset): Use get_primary_binfo.
16970 (dfs_mark_primary_bases): Adjust handling of virtual primary
16971 bases.
16972 (mark_primary_bases): Likewise.
16973 (set_primary_base): Take a binfo, not an integer, as a
16974 representation of the primary base.
16975 (indirect_primary_base_p): Remove.
16976 (determine_primary_base): Adjust for indirect primary bases.
16977 (dfs_find_final_overrider): Fix typo in coment.
16978 (update_vtable_entry_for_fn): Use get_primary_binfo.
16979 (layout_nonempty_base_or_field): Tweak.
16980 (build_base_fields): Adjust for new primary base semantics.
16981 (dfs_propagate_binfo_offsets): Remove.
16982 (propagate_binfo_offsets): Rewrite.
16983 (dfs_set_offset_for_shared_vbases): Remove.
16984 (layout_virtual_bases): Don't use it.
16985 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16986 ABI.
16987 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16988 CLASSTYPE_VFIELD_PARENT.
16989 (dfs_get_primary_binfo): New function.
16990 (get_primary_binfo): Likewise.
16991 (dump_class_hierarchy_r): Tweak printing of primary bases.
16992 (build_vtbl_initializer): Fix typo in comments. Use
16993 vtbl_init_data.
16994 (build_vcall_and_vbase_vtbl_entries): Likewise.
16995 (build_vbaes_offset_vtbl_entries): Likewise.
16996 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16997 BV_VCALL_INDEX to handle indirect primary bases.
16998 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16999 (build_rtti_vtbl_entries): Likewise.
17000 * search.c (get_shared_vbase_if_not_primary): Tweak.
17001 (find_vbase_instance): Likewise.
17002 (binfo_for_vtable): Simplify.
17003 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
17004 (make_binfo): Make it have 11 entries.
17005
17006 2000-07-30 Alex Samuel <samuel@codesourcery.com>
17007
17008 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
17009 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
17010 ascertaining primaryness.
17011 (G): Remove template_args.
17012 (decl_is_template_id): New function.
17013 (write_encoding): Use decl_is_template_id.
17014 (write_name): Likewise. Handle type_decls. Get main variant of
17015 type decls.
17016 (write_nested_name): Likewise.
17017 (write_prefix): Likewise.
17018 (write_template_prefix): Likewise.
17019 (write_special_name_constructor): Remove defunct production from
17020 comment.
17021 (write_bare_function_type): Remove comment about absent parameter.
17022 (write_template_template_arg): Add missing grammar production to
17023 comment.
17024
17025 2000-07-27 Jason Merrill <jason@redhat.com>
17026
17027 * decl.c (duplicate_decls): If common_type produces a non-typedef
17028 type for a typedef, just use the old type.
17029
17030 2000-07-27 Mark Mitchell <mark@codesourcery.com>
17031
17032 * cp-tree.h (function_depth): Declare.
17033 (verify_stmt_tree): Likewise.
17034 (find_tree): Likewise.
17035 * decl.c (function_depth): Give it external linkage.
17036 * optimize.c (optimize_function): Increment and decrement it.
17037 * tree.c (verify_stmt_tree_r): New function.
17038 (verify_stmt_tree): Likewise.
17039 (find_tree_r): Likewise.
17040 (find_tree): Likewise.
17041
17042 2000-07-27 Jason Merrill <jason@redhat.com>
17043
17044 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
17045 TYPE_PTRMEMFUNC_P.
17046 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
17047
17048 2000-07-26 Mark Mitchell <mark@codesourcery.com>
17049
17050 * decl.c (start_cleanup_fn): Mark the function as `inline'.
17051 * decl2.c (get_guard): Call cp_finish_decl, not
17052 rest_of_decl_compilation, for local guards.
17053 * lex.c (do_identifier): Remove unused variable.
17054
17055 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
17056
17057 * parse.y: Add missing ';'.
17058
17059 2000-07-26 Mark Mitchell <mark@codesourcery.com>
17060
17061 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
17062 of `extern "C++"'.
17063
17064 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
17065
17066 Kill strict_prototype. Backwards compatibility only for
17067 non NO_IMPLICIT_EXTERN_C systems.
17068 * cp-tree.h (flag_strict_prototype): Remove.
17069 (strict_prototype): Remove.
17070 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
17071 * decl.c (maybe_push_to_top_level): Adjust.
17072 (pop_from_top_level): Adjust.
17073 (decls_match): Only allow sloppy parm matching for ancient
17074 system headers.
17075 (init_decl_processing): Adjust.
17076 (grokdeclarator): Adjust.
17077 * decl2.c (flag_strict_prototype): Remove.
17078 (strict_prototype): Remove.
17079 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
17080 (lang_f_options): Remove "strict-prototype".
17081 (unsupported-options): Add "strict-prototype".
17082 * lex.c (do_identifier): Adjust.
17083 (do_scoped_id): Adjust.
17084 * parse.y (empty_parms): Adjust.
17085 * class.c (push_lang_context): Adjust.
17086 (pop_lang_context): Adjust.
17087 * typeck.c (comp_target_parms): Adjust.
17088
17089 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
17090
17091 * decl.c (poplevel): Deal with anonymous variables at for scope.
17092 (maybe_inject_for_scope_var): Likewise.
17093
17094 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
17095
17096 * decl.c: Remove all signal handling code, now done in toplev.c.
17097
17098 2000-07-23 Mark Mitchell <mark@codesourcery.com>
17099
17100 * decl.c (make_rtl_for_nonlocal_decl): Rework.
17101
17102 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
17103 correctly.
17104
17105 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
17106
17107 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
17108 Define my_friendly_assert and my_friendly_abort as macros
17109 which may call friendly_abort. Prototype friendly abort, not
17110 my_friendly_abort or my_friendly_assert.
17111 * decl.c (signal_catch): Report the signal caught in the error
17112 message. Call fatal directly.
17113 * typeck2.c (ack, my_friendly_assert): Delete.
17114 (my_friendly_abort): Rename to friendly_abort. Expect file,
17115 line, and function parameters. Report the abort code, then
17116 call fancy_abort. Do not mask an abort if errors have
17117 already occurred.
17118
17119 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
17120
17121 * typeck.c (comp_target_parms): Remove obsolete parameter.
17122 (comp_target_types): Adjust.
17123
17124 2000-07-17 Jason Merrill <jason@redhat.com>
17125
17126 * typeck.c (mark_addressable): Never set TREE_USED.
17127 * call.c (build_call): Don't abort on calls to library functions
17128 that have been declared normally.
17129
17130 * typeck.c (build_binary_op): Fix grammar in warning.
17131
17132 * exception.cc (__eh_free): Fix prototype.
17133
17134 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
17135
17136 * decl.c (pushdecl): Handle seeing an OVERLOAD in
17137 IDENTIFIER_NAMESPACE_VALUE.
17138
17139 2000-07-16 Mark Mitchell <mark@codesourcery.com>
17140
17141 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
17142 * method.c (use_thunk): Correct handling of vcall offsets.
17143
17144 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
17145
17146 * .cvsignore: parse.h and parse.c have no cp- prefix.
17147
17148 2000-07-13 Mark Mitchell <mark@codesourcery.com>
17149
17150 * .cvsignore: New file.
17151
17152 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
17153
17154 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
17155
17156 2000-07-12 Mark Mitchell <mark@codesourcery.com>
17157
17158 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
17159 * parse.c: Remove.
17160 * parse.h: Likewise.
17161
17162 2000-07-11 Mark Mitchell <mark@codesourcery.com>
17163
17164 * class.c (layout_class_type): Add pointers to virtual bases after
17165 base classes under the old ABI.
17166
17167 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
17168
17169 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
17170 (finish_continue_stmt): Likewise.
17171 (begin_for_stmt): Remove call to note_level_for_for.
17172 (finish_goto_stmt): Change call from build_min_nt
17173 to build_stmt.
17174 (finish_expr_stmt): Likewise.
17175 (begin_if_stmt): Likewise.
17176 (begin_while_stmt): Likewise.
17177 (finish_while_stmt): Likewise.
17178 (finish_return_stmt): Likewise.
17179 (begin_for_stmt): Likewise.
17180 (finish_for_stmt): Likewise.
17181 (finish_break_stmt): Likewise.
17182 (begin_switch_stmt): Likewise.
17183 (finish_case_label): Likewise.
17184 (genrtl_try_block): Likewise.
17185 (begin_try_block): Likewise.
17186 (begin_handler): Likewise.
17187 (begin_compound_stmt): Likewise.
17188 (finish_asm_stmt): Likewise.
17189 (finish_label_stmt): Likewise.
17190 (add_decl_stmt): Likewise.
17191 (finish_subobject): Likewise.
17192 (finish_decl_cleanup): Likewise.
17193 (finish_named_return_value): Likewise.
17194 (setup_vtbl_ptr): Likewise.
17195 (add_scope_stmt): Likewise.
17196 * decl.c (finish_constructor_body): Likewise.
17197 (finish_destructor_body): Likewise.
17198 * optimize.c (copy_body_r): Likewise.
17199 (initialize_inlined_parameters): Likewise.
17200 (declare_return_variable): Likewise.
17201 (expand_call_inline): Likewise.
17202
17203 2000-07-10 Jakub Jelinek <jakub@redhat.com>
17204
17205 * semantics.c (expand_body): Sync interface information
17206 at the end of function body expansion.
17207
17208 2000-07-09 Jason Merrill <jason@redhat.com>
17209
17210 * init.c (build_new_1): Bail early if the call to new fails.
17211
17212 * decl.c (compute_array_index_type): Check specifically for
17213 an INTEGER_CST, not just TREE_CONSTANT.
17214
17215 * decl.c (duplicate_decls): Don't call duplicate_decls on
17216 the DECL_TEMPLATE_RESULT.
17217 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17218 codes.
17219
17220 * error.c (dump_template_bindings): Don't crash if we had an
17221 invalid argument list.
17222
17223 * typeck.c (c_expand_start_case): Do narrowing here.
17224 * semantics.c (finish_switch_cond): Not here.
17225
17226 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
17227
17228 * parse.y (asm_clobbers): Do string concatenation.
17229
17230 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17231
17232 * decl.c (pushtag): Don't put local classes in template functions
17233 on the local_classes list.
17234
17235 2000-07-04 Scott Snyder <snyder@fnal.gov>
17236
17237 * decl2.c (get_guard): Add missing return for old ABI local
17238 variable case.
17239
17240 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17241
17242 * cp-tree.h (char_type_p): New function.
17243 * decl.c (init_decl_processing): Don't initialize
17244 signed_wchar_type_node or unsigned_wchar_type_node.
17245 (complete_array_type): Handle brace-enclosed string-constants.
17246 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17247 * tree.c (char_type_p): New function.
17248 * typeck2.c (digest_init): Use char_type_p.
17249
17250 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17251
17252 * pt.c (tsubst): Don't layout type, if it's error_mark.
17253
17254 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17255
17256 * pt.c (instantiate_pending_templates): Reset template level.
17257
17258 2000-07-05 Jason Merrill <jason@redhat.com>
17259
17260 * call.c (joust): Don't complain about `operator char *()' beating
17261 `operator const char *() const'.
17262
17263 2000-07-04 scott snyder <snyder@fnal.gov>
17264 Jason Merrill <jason@redhat.com>
17265
17266 * repo.c (repo_get_id): Handle the case where a class with virtual
17267 bases has a null TYPE_BINFO_VTABLE.
17268
17269 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
17270 Jason Merrill <jason@redhat.com>
17271
17272 * parse.y (member_init): Just pass in the type.
17273 * init.c (expand_member_init): Handle getting a type.
17274
17275 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17276 Jason Merrill <jason@redhat.com>
17277
17278 * decl.c (finish_function): Warn if a function has no return
17279 statement.
17280 Suggested by Andrew Koenig.
17281 * typeck.c (check_return_expr): Do set current_function_returns_value
17282 if we got an error_mark_node.
17283
17284 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17285
17286 * decl2.c (push_decl_namespace): Push the original namespace.
17287
17288 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17289
17290 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17291 * semantics.c (begin_class_definition): Clear it.
17292
17293 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
17294
17295 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17296 (genrtl_expr_stmt): Likewise.
17297 (genrtl_decl_stmt): Likewise.
17298 (genrtl_if_stmt): Likewise.
17299 (genrtl_while_stmt): Likewise.
17300 (genrtl_do_stmt): Likewise.
17301 (genrtl_return_stmt): Likewise.
17302 (genrtl_for_stmt): Likewise.
17303 (genrtl_break_stmt): Likewise.
17304 (genrtl_continue_stmt): Likewise.
17305 (genrtl_scope_stmt): Likewise.
17306 (genrtl_switch_stmt): Likewise.
17307 (genrtl_case_label): Likewise.
17308 (genrtl_begin_compound_stmt): Likewise.
17309 (genrtl_finish_compound_stmt): Likewise.
17310 (genrtl_compound_stmt): Likewise.
17311 (genrtl_asm_stmt): Likewise.
17312
17313 * init.c (begin_init_stmts): Remove call to
17314 genrtl_begin_compound_stmt.
17315 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17316
17317 * semantics.c (lang_expand_stmt): Changed call to
17318 genrtl_compound_stmt to ignore return value.
17319
17320 2000-07-02 Mark Mitchell <mark@codesourcery.com>
17321
17322 * mangle.c (canonicalize_for_substitution): Return the canonical
17323 variant of a type.
17324
17325 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17326 TYPE_DECL.
17327 * typeck.c (commonparms): Remove obstack manipulations.
17328
17329 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
17330
17331 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17332
17333 * Makefile.in (OBJS): Added ../c-semantics.o.
17334 (OBJDEPS): Likewise.
17335
17336 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17337 ../c-common.h.
17338 (struct stmt_tree): Added comment.
17339 (current_function_name_declared): Removed.
17340 (stmts_are_full_exprs_p): Likewise.
17341 (genrtl_do_pushlevel): Likewise.
17342 (genrtl_clear_out_block): Likewise.
17343 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17344 (DECL_ANON_UNION_ELEMS): Likewise.
17345 (emit_local_var): Likewise.
17346 (make_rtl_for_local_static): Likewise.
17347 (do_case): Likewise.
17348 (expand_stmt): Likewise.
17349 (genrtl_decl_cleanup): Likewise.
17350 (c_expand_asm_operands): Likewise.
17351 (c_expand_return): Likewise.
17352 (c_expand_start_case): Likewise.
17353
17354 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17355 (emit_local_var): Likewise.
17356 (initialize_local_var): Change reference to
17357 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17358 Change reference to stmts_are_full_exprs_p to
17359 current_stmt_tree->stmts_are_full_exprs_p.
17360 (push_cp_function_context): Likewise.
17361
17362 * expect.c (expand_throw): Change reference to
17363 stmts_are_full_exprs_p.
17364
17365 * init.c (build_aggr_init): Change reference to
17366 stmts_are_full_exprs_p.
17367 (build_vec_init): Likewise.
17368
17369 * optimize.c (maybe_clone_body): Change reference to
17370 current_function_name_declared to
17371 cp_function_chain->name_declared.
17372
17373 * pt.c (instantiate_decl): Change reference to
17374 current_function_name_declared to
17375 cp_function_chain->name_declared.
17376
17377 * semantics.c (expand_cond): Moved declaration to c-common.h.
17378 (genrtl_do_pushlevel): Moved to c-semantics.c.
17379 (genrtl_clear_out_block): Likewise.
17380 (genrtl_goto_stmt): Likewise.
17381 (genrtl_expr_stmt): Likewise.
17382 (genrtl_decl_stmt): Likewise.
17383 (gerntl_if_stmt): Likewise.
17384 (genrtl_while_stmt): Likewise.
17385 (genrtl_do_stmt): Likewise.
17386 (genrtl_return_stmt): Likewise.
17387 (genrtl_for_stmt): Likewise.
17388 (genrtl_break_stmt): Likewise.
17389 (genrtl_continue_stmt): Likewise.
17390 (genrtl_scope_stmt): Likewise.
17391 (genrtl_switch_stmt): Likewise.
17392 (genrtl_case_label): Likewise.
17393 (genrtl_begin_compound_stmt): Likewise.
17394 (genrtl_finish_compound_stmt): Likewise.
17395 (genrtl_compound_stmt): Likewise.
17396 (genrtl_asm_stmt): Likewise.
17397 (genrtl_decl_cleanup): Likewise.
17398 (expand_cond): Likewise.
17399 (expand_stmt): Renamed to ...
17400 (lang_expand_stmt): ... this.
17401 (lang_expand_expr_stmt): Initialize.
17402 (set_current_function_name_declared): Likewise.
17403 (stmts_are_full_exprs_p): Likewise.
17404 (current_function_name_declared): Likewise.
17405 (anon_aggr_type_p): Likewise.
17406 (do_poplevel): Change reference to
17407 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17408 Change reference to stmts_are_full_exprs_p to
17409 current_stmt_tree->stmts_are_full_exprs_p.
17410 (add_tree): Likewise.
17411 (finish_expr_stmt): Likewise.
17412 (prep_stmt): Likewise.
17413 (lang_expand_stmt): Likewise.
17414 (begin_compound_stmt): Change reference to
17415 current_function_name_declared to
17416 cp_function_chain->name_declared and call to
17417 current_function_name_declared().
17418 (setup_vtbl_ptr): Likewise.
17419 (genrtl_do_poplevel): Removed.
17420
17421 2000-06-30 Jason Merrill <jason@redhat.com>
17422
17423 * init.c (init_init_processing): Go back to aligning like
17424 double_type_node for old ABI.
17425 (get_cookie_size): Make cookie larger if we get a type that needs
17426 more alignment.
17427 (build_vec_delete): Call it.
17428
17429 * typeck.c (qualify_type_recursive): New fn.
17430 (composite_pointer_type): Use it.
17431 (build_binary_op): Use composite_pointer_type.
17432
17433 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
17434 Jason Merrill <jason@redhat.com>
17435
17436 * typeck.c (check_return_expr): Don't complain about returning
17437 NULL from operator new if -fcheck-new.
17438 * cp-tree.h: Declare flag_check_new here.
17439 * init.c: Not here.
17440
17441 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17442
17443 * mangle.c (find_substitution): Use same_type_p.
17444 (write_encoding): Don't check for substitutions.
17445
17446 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17447
17448 * parse.y (expr_no_comma_rangle): New non-terminal.
17449 (template_parm): Use it for default parameter case.
17450 (template_arg): Use it.
17451 (expr_no_commas): Remove commented out undefined extensions.
17452 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17453 * parse.h, parse.c: Rebuilt.
17454
17455 2000-06-30 Mark Mitchell <mark@codesourcery.com>
17456
17457 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17458 (finish_asm_stmt): Do it here, instead.
17459
17460 * cp-tree.h (ridpointers): Don't declare.
17461 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17462 (record_builtin_java_type): Likewise.
17463 (init_decl_processing): Likewise.
17464 * lex.c: Move inclusion of lex.h.
17465 (ridpointers): Don't define.
17466 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
17467 RID_MAX.
17468 * lex.h (enum rid): Rename to ...
17469 (enum cp_rid): ... this.
17470 (ridpointers): Don't declare.
17471 * parse.y: Move inclusion of lex.h.
17472 * parse.c: Regenerated.
17473 * spew.c: Move inclusion of lex.h.
17474
17475 * cp-tree.h (struct language_function): Remove temp_name_counter.
17476 (temp_name_counter): Remove.
17477 (get_temp_name): Change prototype.
17478 (get_guard): New function.
17479 (get_guard_cond): Likewise.
17480 (set_guard): Likewise.
17481 * cvt.c (build_up_reference): Adjust call to get_temp_name.
17482 * decl.c (expand_static_init): Use get_guard and friends to
17483 implement guard variables.
17484 * decl2.c (get_temp_name): Assume that the variables created are
17485 always static.
17486 (get_sentry): Rename to ...
17487 (get_guard): ... this. Implement new ABI guard variables.
17488 (get_guard_bits): New function.
17489 (get_guard_cond): Likewise.
17490 (set_guard): Likewise.
17491 (start_static_initialization_or_destruction): Use them.
17492 (do_static_initialization): Replace sentry with guard throughout.
17493 (do_static_destruction): Likewise.
17494 * init.c (create_temporary_var): Add comment.
17495
17496 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17497
17498 * mangle.c (find_substitution): Use same_type_p.
17499 (write_encoding): Don't check for substitutions.
17500
17501 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17502
17503 * parse.y (expr_no_comma_rangle): New non-terminal.
17504 (template_parm): Use it for default parameter case.
17505 (template_arg): Use it.
17506 (expr_no_commas): Remove commented out undefined extensions.
17507 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17508 * parse.h, parse.c: Rebuilt.
17509
17510 2000-06-29 Mark Mitchell <mark@codesourcery.com>
17511
17512 * cp-tree.h (flag_const_strings): Remove.
17513 (warn_parentheses): Likewise.
17514 (warn_format): Likewise.
17515 (common_type): Likewise.
17516 (default_conversion): Likewise.
17517 (build_binary_op): Likewise.
17518 (cp_build_binary_op): New macro.
17519 * call.c (build_new_op): Use cp_build_binary_op instead of
17520 build_binary_op.
17521 * class.c (build_vtable_entry_ref): Likewise.
17522 * decl.c (expand_static_init): Likewise.
17523 (compute_array_index_type): Likewise.
17524 (build_enumerator): Likewise.
17525 * decl2.c (delete_sanity): Likewise.
17526 (start_static_initialization_or_destruction): Likewise.
17527 * error.c (dump_type_suffix): Likewise.
17528 * init.c (resolve_offset_ref): Likewise.
17529 (build_new): Likewise.
17530 (build_new_1): Likewise.
17531 (build_vec_delete_1): Likewise.
17532 (build_vec_init): Likewise.
17533 (build_delete): Likewise.
17534 * rtti.c (synthesize_tinfo_fn): Likewise.
17535 (synthesize_tinfo_var): Likewise.
17536 * search.c (expand_upcast_fixups): Likewise.
17537 (fixup_all_virtual_upcast_offsets): Likewise.
17538 * typeck.c (build_array_ref): Likewise.
17539 (get_member_function_from_ptrfunc): Likewise.
17540 (build_binary_op): Add parameter.
17541 (pointer_int_sum): Use cp_build_binary_op.
17542 (pointer_diff): Likewise.
17543 (build_modify_expr): Likewise.
17544 (get_delta_difference): Likewise.
17545 (build_ptrmemfunc): Likewise.
17546
17547 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
17548
17549 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17550 * decl.c (create_implicit_typedef): Adjust.
17551 * decl2.c (build_artificial_parm): Adjust.
17552 * method.c (implicitly_declare_fn): Adjust.
17553 * pt.c (push_inline_template_parms_recursive): Adjust.
17554 (process_template_parm): Adjust.
17555 (overloaded_template_name): Adjust.
17556 * semantics.c (finish_template_template_parm): Adjust.
17557
17558 2000-06-28 Mark Mitchell <mark@codesourcery.com>
17559
17560 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17561 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17562 where to emit thunks.
17563 (build_vtt): Adjust call to build_vtt_inits.
17564 (build_vtt_inits): Add parameter to indicate whether or not
17565 sub-VTTs for virtual bases should be included. Adjust handling of
17566 construction vtables.
17567 (get_matching_base): New function.
17568 (dfs_build_vtt_inits): Rename to ...
17569 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17570 construction vtables.
17571 (dfs_fixup_binfo_vtbls): Likewise.
17572 (build_ctor_vtbl_groups): Build construction vtables for virtual
17573 bases, too.
17574 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17575 to build construction vtbls.
17576 (dfs_accumulate_vtbl_inits): Adjust handling of
17577 construction vtables.
17578
17579 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17580 types correctly.
17581
17582 2000-06-27 Mark Mitchell <mark@codesourcery.com>
17583
17584 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17585
17586 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17587
17588 * search.c (hides): Remove.
17589 (is_subobject_of_p): Add most_derived parameter. Use
17590 CANONICAL_BINFO.
17591 (lookup_field_queue_p): Adjust.
17592 (lookup_field_r): Adjust.
17593
17594 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17595
17596 * decl2.c (handle_class_head): Bash typedefs to the type's main
17597 decl.
17598
17599 2000-06-25 Mark Mitchell <mark@codesourcery.com>
17600
17601 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17602 (begin_global_stmt_expr): ... this.
17603 (genrtl_finish_stmt_expr): Rename to ...
17604 (finish_global_stmt_expr): ... this.
17605 * init.c (begin_init_stmts): Adjust calls.
17606 (finish_init_stmts): Likewise.
17607 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17608 (begin_global_stmt_expr): ... this.
17609 (genrtl_finish_stmt_expr): Rename to ...
17610 (finish_global_stmt_expr): ... this.
17611
17612 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17613
17614 * search.c (lookup_member): Fix typo in comment.
17615
17616 2000-06-24 Jason Merrill <jason@redhat.com>
17617
17618 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17619 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17620
17621 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17622
17623 * parse.y (complex_direct_notype_declarator): Support global_scope.
17624 * Makefile.in: Adjust conflict count.
17625
17626 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17627
17628 * parse.y (template_arg): Convert TEMPLATE_DECL
17629 that is a template template parameter to
17630 TEMPLATE_TEMPLATE_PARM here.
17631
17632 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17633 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17634 (copy_template_template_parm): Adjust prototype.
17635 * decl.c (grokdeclarator): Remove dead code.
17636 * pt.c (process_template_parm): Tidy.
17637 (lookup_template_class): Construct nodes in
17638 copy_template_template_parm.
17639 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17640 lookup_template_class. Use TYPE_TI_TEMPLATE.
17641 * tree.c (copy_template_template_parm): Add NEWARGS
17642 parameter.
17643 (mapcar): Adjust call to copy_template_template_parm.
17644 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17645 * method.c (build_template_template_parm_names): Change error
17646 code to avoid compilation warning.
17647
17648 * gxxint.texi: Document template template parameter
17649 name mangling.
17650
17651 2000-06-21 Alex Samuel <samuel@codesourcery.com>
17652
17653 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17654 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17655 (cp-demangle.o): New rule.
17656 (dyn-string.o): Likewise.
17657 * inc/cxxabi.h (__cxa_demangle): New declaration.
17658
17659 2000-06-22 Mark Mitchell <mark@codesourcery.com>
17660
17661 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17662 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17663 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
17664 a tree, not an int.
17665 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17666 (make_thunk): Change prototype.
17667 (emit_thunk): Rename to use_thunk.
17668 (mangle_thunk): Change prototype.
17669 * class.c (get_derived_offset): Simplify.
17670 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17671 BV_GENERATE_THUNK_WITH_VTABLE_P.
17672 (build_primary_vtable): Simplify.
17673 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17674 (dfs_find_base): Remove.
17675 (update_vtable_entry_for_fn): Correct bug in finding the base
17676 where a virtual function was first declared. Figure out whether
17677 or not to emit a vcall-thunk with the vtables in which it appears.
17678 Correct logic for deciding whether to use an ordinary thunk, or a
17679 vcall thunk.
17680 (finish_struct_1): Remove unnecssary code.
17681 (build_vtbl_initializer): Use ssize_int for the running counter of
17682 negative indices.
17683 (build_vtbl_initializer): Only use vcall thunks where necessary.
17684 Mark thunks as needing to be emitted with their vtables, or not.
17685 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17686 indices. Use size_binop.
17687 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17688 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
17689 size_binop.
17690 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17691 (build_vtable_entry): Mark thunks as needing to be emitted with
17692 their vtables, or not.
17693 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17694 * decl2.c (mark_vtable_entries): Use use_thunk instead of
17695 emit_thunk.
17696 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
17697 information.
17698 * error.c (dump_expr): Use BV_FN.
17699 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17700 not an int.
17701 * method.c (make_thunk): Likewise.
17702 (emit_thunk): Rename to use_thunk. Allow callers to decide
17703 whether or not to actually emit the thunk. Adjust for changes in
17704 representation of vcall offsets.
17705 * search.c (dfs_get_pure_virtuals): Use BV_FN.
17706 * semantics.c (emit_associated_thunks): New function.
17707 (expand_body): Use it.
17708 * ir.texi: Adjust decriptions of thunks.
17709
17710 2000-06-22 Jason Merrill <jason@redhat.com>
17711
17712 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17713 (tsubst_friend_function): Copy it here.
17714
17715 * decl.c (grok_op_properties): Fix typo.
17716
17717 * decl2.c (delete_sanity): Clarify warning, avoid failure on
17718 deleting void*.
17719
17720 * pt.c (check_explicit_specialization): Clarify error.
17721
17722 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17723 an old OVERLOAD when we're declaring a non-function.
17724 (pushdecl, destroy_local_var): Check for error_mark_node.
17725 (warn_extern_redeclared_static): Also bail early if
17726 we're a CONST_DECL.
17727 (push_overloaded_decl): Ignore an old error_mark_node.
17728
17729 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
17730
17731 * call.c (build_x_va_arg): Check if in a template decl.
17732 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17733
17734 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17735
17736 * class.c (push_lang_context): TYPE_NAME gets you to the Java
17737 types DECLs.
17738 * decl.c (check_goto): Computed gotos assumed OK.
17739
17740 2000-06-20 Jason Merrill <jason@redhat.com>
17741
17742 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17743 for which we don't need to look for instantiations.
17744
17745 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
17746
17747 * parse.y (program): Always call finish_translation_unit.
17748 * parse.c, parse.h: Rebuilt.
17749
17750 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
17751
17752 * method.c: Don't include hard-reg-set.h.
17753
17754 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17755
17756 * rtti.c (get_base_offset): Cope when vbase field is in a base.
17757
17758 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17759
17760 * call.c (build_conditional_expr): Use VOID_TYPE_P.
17761 * cvt.c (cp_convert_to_pointer): Likewise.
17762 (convert_to_void): Likewise.
17763 * error.c (dump_expr): Likewise.
17764 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17765 * init.c (build_delete): Likewise.
17766 * method.c (emit_thunk): Likewise.
17767 * optmize.c (declare_return_variable): Likewise.
17768 * rtti.c (get_tinfo_decl_dynamic): Likewise.
17769 (get_typeid): Likewise.
17770 (build_dynamic_cast_1): Likewise.
17771 * typeck.c (composite_pointer_type): Likewise.
17772 (common_type): Likewise.
17773 (build_indirect_ref): Likewise.
17774 (build_binary_op): Likewise.
17775 (build_x_compound_expr): Likewise.
17776 (check_return_expr): Likewise.
17777 * typeck2.c (add_exception_specifier): Likewise.
17778
17779 * mangle.c (write_method_parms): Use direct comparison for end
17780 of parmlist.
17781
17782 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
17783
17784 * cp-tree.h (genrtl_try_block): Declare function.
17785 (genrtl_handler): Likewise.
17786 (genrtl_catch_block): Likewise.
17787 (genrtl_ctor_stmt): Likewise.
17788 (genrtl_subobject): Likewise.
17789 (genrtl_decl_cleanup): Likewise.
17790 (genrtl_do_poplevel): Likewise.
17791 (genrtl_do_pushlevel): Likewise.
17792 (genrtl_clear_out_block): Likewise.
17793 (genrtl_goto_stmt): Likewise.
17794 (genrtl_expr_stmt): Likewise.
17795 (genrtl_decl_stmt): Likewise.
17796 (genrtl_if_stmt): Likewise.
17797 (genrtl_while_stmt): Likewise.
17798 (genrtl_do_stmt): Likewise.
17799 (genrtl_return_stmt): Likewise.
17800 (genrtl_for_stmt): Likewise.
17801 (genrtl_break_stmt): Likewise.
17802 (genrtl_continue_stmt): Likewise.
17803 (genrtl_scope_stmt): Likewise.
17804 (genrtl_switch_stmt): Likewise.
17805 (genrtl_case_label): Likewise.
17806 (genrtl_begin_compound_stmt): Likewise.
17807 (genrtl_finish_compound_stmt): Likewise.
17808 (genrtl_compound_stmt): Likewise.
17809 (genrtl_asm_stmt): Likewise.
17810 (genrtl_named_return_value): Likewise.
17811 (genrtl_begin_stmt_expr): Likewise.
17812 (genrtl_finish_stmt_expr): Likewise.
17813 (finish_for_stmt): Removed first argument.
17814 (finish_switch_stmt): Likewise.
17815
17816 * semantics.c (genrtl_try_block): Define function.
17817 (genrtl_handler): Likewise.
17818 (genrtl_catch_block): Likewise.
17819 (genrtl_ctor_stmt): Likewise.
17820 (genrtl_subobject): Likewise.
17821 (genrtl_decl_cleanup): Likewise.
17822 (genrtl_do_poplevel): Likewise.
17823 (genrtl_do_pushlevel): Likewise.
17824 (genrtl_clear_out_block): Likewise.
17825 (genrtl_goto_stmt): Likewise.
17826 (genrtl_expr_stmt): Likewise.
17827 (genrtl_decl_stmt): Likewise.
17828 (genrtl_if_stmt): Likewise.
17829 (genrtl_while_stmt): Likewise.
17830 (genrtl_do_stmt): Likewise.
17831 (genrtl_return_stmt): Likewise.
17832 (genrtl_for_stmt): Likewise.
17833 (genrtl_break_stmt): Likewise.
17834 (genrtl_continue_stmt): Likewise.
17835 (genrtl_scope_stmt): Likewise.
17836 (genrtl_switch_stmt): Likewise.
17837 (genrtl_case_label): Likewise.
17838 (genrtl_begin_compound_stmt): Likewise.
17839 (genrtl_finish_compound_stmt): Likewise.
17840 (genrtl_compound_stmt): Likewise.
17841 (genrtl_asm_stmt): Likewise.
17842 (genrtl_named_return_value): Likewise.
17843 (genrtl_begin_stmt_expr): Likewise.
17844 (genrtl_finish_stmt_expr): Likewise.
17845 (finish_for_stmt): Removed first argument and generate rtl
17846 specific code.
17847 (finish_switch_stmt): Likewise.
17848 (do_poplevel): Removed generate rtl specific code.
17849 (do_pushlevel): Likewise.
17850 (add_tree): Likewise.
17851 (finish_goto_stmt): Likewise.
17852 (finish_expr_stmt): Likewise.
17853 (begin_if_stmt): Likewise.
17854 (finish_if_stmt_cond): Likewise.
17855 (finish_then_clause): Likewise.
17856 (begin_else_clause): Likewise.
17857 (finish_else_clause): Likewise.
17858 (finish_if_stmt): Likewise.
17859 (clear_out_block): Likewise.
17860 (begin_while_stmt): Likewise.
17861 (finish_while_stmt_cond): Likewise.
17862 (finish_while_stmt): Likewise.
17863 (begin_do_stmt): Likewise.
17864 (finish_do_body): Likewise.
17865 (finish_do_stmt): Likewise.
17866 (finish_return_stmt): Likewise.
17867 (begin_for_stmt): Likewise.
17868 (finish_for_init_stmt): Likewise.
17869 (finish_for_cond): Likewise.
17870 (finish_for_expr): Likewise.
17871 (finish_break_stmt): Likewise.
17872 (finish_continue_stmt): Likewise.
17873 (begin_switch_stmt): Likewise.
17874 (finish_switch_cond): Likewise.
17875 (finish_case_label): Likewise.
17876 (begin_try_block): Likewise.
17877 (begin_function_try_block): Likewise.
17878 (finish_try_block): Likewise.
17879 (finish_cleanup_try_block): Likewise.
17880 (finish_cleanup): Likewise.
17881 (finish_function_try_block): Likewise.
17882 (finish_handler_sequence): Likewise.
17883 (finish_function_handler_sequence): Likewise.
17884 (begin_handler): Likewise.
17885 (finish_handler_parms): Likewise.
17886 (begin_catch_block): Likewise.
17887 (finish_handler): Likewise.
17888 (begin_compound_stmt): Likewise.
17889 (finish_compound_stmt): Likewise.
17890 (finish_asm_stmt): Likewise.
17891 (finish_label_stmt): Likewise.
17892 (finish_label_decl): Likewise.
17893 (finish_subobject): Likewise.
17894 (finish_decl_cleanup): Likewise.
17895 (finish_named_return_value): Likewise.
17896 (begin_stmt_expr): Likewise.
17897 (finish_stmt_expr): Likewise.
17898
17899 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17900 to call genrtl_expr_stmt when appropriate.
17901
17902 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17903 begin_compound_expr to call genrtl_begin_stmt_expr and
17904 genrtl_begin_compound_expr when appropriate.
17905 (finish_init_stmts): Changed calls to finish_compound_expr and
17906 finish_stmt_expr to call genrtl_finish_compound_expr and
17907 genrtl_finish_stmt_expr when appropriate.
17908 (expand_default_init): Changed call to finish_expr_stmt to call
17909 genrtl_expr_stmt when appropriate.
17910 (build_vec_init): Likewise.
17911
17912 * parse.y (simple_stmt): Removed first argument from call to
17913 finish_for_stmt. Removed first argument from call to
17914 finish_switch_stmt.
17915
17916 * parse.c: Regenerated.
17917
17918 * pt.c (tsubst_expr): Removed first argument from call to
17919 finish_for_stmt. Removed first argument from call to
17920 finish_switch_stmt.
17921
17922 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
17923
17924 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17925 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17926
17927 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17928 (cplus_tree_code_length[]): Likewise.
17929 (cplus_tree_code_name[]): Likewise.
17930 (init_parse): Added call to add_c_tree_codes. Changed
17931 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17932
17933 2000-06-16 Mark Mitchell <mark@codesourcery.com>
17934
17935 * cp-tree.h (finish_mem_initializers): Declare.
17936 (count_trees): Likewise.
17937 * parse.y (base_init): Use finish_mem_initializers.
17938 * semantics.c (finish_mem_initializers): New function.
17939
17940 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
17941 the number of trees.
17942 (n_trees): Remove.
17943 (count_trees): Don't use it.
17944
17945 2000-06-15 Jason Merrill <jason@redhat.com>
17946
17947 * tree.c (count_trees): New debugging function.
17948
17949 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17950 * init.c (build_member_call): Pull out the name of a DECL.
17951
17952 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17953 * semantics.c (expand_body): Push to TV_INTEGRATION here.
17954 * optimize.c (optimize_function): Not here.
17955 * pt.c (instantiate_decl): Push to TV_PARSE.
17956
17957 2000-06-15 Mark Mitchell <mark@codesourcery.com>
17958
17959 * cp-tree.h (struct language_function): Remove x_base_init_list
17960 and x_member_init_list.
17961 (current_base_init_list): Remove.
17962 (current_member_init_list): Likewise.
17963 (setup_vtbl_ptr): Change prototype.
17964 (emit_base_init): Likewise.
17965 (expand_member_init): Likewise.
17966 (reinit_parse_for_function): Remove.
17967 * decl.c (save_function_data): Don't clear x_base_init_list and
17968 x_member_init_list.
17969 (mark_language_function): Don't mark them.
17970 * init.c (perform_member_init): Tweak comment.
17971 (sort_member_init): Take the list of initializers as an argument.
17972 (sort_base_init): Likewise.
17973 (emit_base_init): Likewise.
17974 (expand_member_init): Return the initializer. Don't use global
17975 variables.
17976 * lex.c (reinit_parse_for_function): Remove.
17977 * method.c (build_template_parm_names): Correct substitution.
17978 (do_build_copy_constructor): Don't use current_member_init_list
17979 and current_base_init_list.
17980 (synthesize_method): Likewise.
17981 * parse.y (base_init): Split mem-initializers into
17982 base-initializers and field-initializers.
17983 (member_init_list): Build up the list here.
17984 (member_init): Return the initializer.
17985 (fn.depfn): Don't use reinit_parse_for_function.
17986 * parse.c: Regenerated.
17987 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17988 ERROR_MARK.
17989 (tsubst_expr): Don't use current_member_init_list
17990 and current_base_init_list.
17991 (tsubst_expr_values): Rename to ...
17992 (tsubst_initializer_list): ... this. Use convert_from_reference.
17993 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17994 and current_base_init_list.
17995 (begin_function_definition): Don't call reinit_parse_for_function.
17996
17997 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17998
17999 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
18000 correctly.
18001
18002 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
18003
18004 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
18005
18006 * cp-tree.h (IF_COND): Move to c-common.h.
18007 (THEN_CLAUSE): Likewise.
18008 (ELSE_CLAUSE): Likewise.
18009 (WHILE_COND): Likewise.
18010 (WHILE_BODY): Likewise.
18011 (DO_COND): Likewise.
18012 (DO_BODY): Likewise.
18013 (RETURN_EXPR): Likewise.
18014 (EXPR_STMT_EXPR): Likewise.
18015 (FOR_INIT_STMT): Likewise.
18016 (FOR_COND): Likewise.
18017 (FOR_EXPR): Likewise.
18018 (FOR_BODY): Likewise.
18019 (SWITCH_COND): Likewise.
18020 (SWITCH_BODY): Likewise.
18021 (CASE_LOW): Likewise.
18022 (CASE_HIGH): Likewise.
18023 (GOTO_DESTINATION): Likewise.
18024 (COMPOUND_BODY): Likewise.
18025 (ASM_CV_QUAL): Likewise.
18026 (ASM_STRING): Likewise.
18027 (ASM_OUTPUTS): Likewise.
18028 (ASM_INPUTS): Likewise.
18029 (ASM_CLOBBERS): Likewise.
18030 (DECL_STMT_DECL): Likewise.
18031 (STMT_EXPR_STMT): Likewise.
18032 (LABEL_STMT_LABEL): Likewise.
18033 (SCOPE_BEGIN_P): Likewise.
18034 (SCOPE_END_P): Likewise.
18035 (SCOPE_STMT_BLOCK): Likewise.
18036 (SCOPE_NULLIFIED_P): Likewise.
18037 (SCOPE_NO_CLEANUPS_P): Likewise.
18038 (SCOPE_PARTIAL_P): Likewise.
18039 (ASM_VOLATILE_P): Likewise.
18040 (STMT_LINENO): Likewise.
18041 (STMT_LINENO_FOR_FN_P): Likewise.
18042
18043 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
18044 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
18045 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
18046 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
18047 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
18048
18049 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
18050
18051 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
18052 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
18053
18054 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
18055 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
18056 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
18057
18058 2000-06-14 Mark Mitchell <mark@codesourcery.com>
18059
18060 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
18061 * class.c (dfs_find_final_overrider): Set it appropriately.
18062 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
18063 avoid unneeded secondary vptrs.
18064
18065 2000-06-13 Jakub Jelinek <jakub@redhat.com>
18066
18067 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
18068 (check_bitfield_decl, check_field_decl): Likewise.
18069 (build_vtbl_or_vbase_field, build_base_field): Likewise.
18070 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
18071 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
18072 (xfer_tag, finish_enum): Likewise.
18073 * decl2.c (finish_builtin_type): Likewise.
18074 * init.c (init_init_processing): Likewise.
18075 * pt.c (instantiate_class_template): Likewise.
18076 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
18077 * cp-tree.h (struct lang_type): Add user_align member.
18078 (CLASSTYPE_USER_ALIGN): Define.
18079
18080 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
18081
18082 * Make-lang.in (c++.install-common): Install g++-cross in
18083 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
18084 $(target_alias)-g++ and $(target_alias)-c++.
18085
18086 2000-06-12 Mark Mitchell <mark@codesourcery.com>
18087
18088 * class.c (vcall_offset_data_s): Add last_init and fns.
18089 (overrides): Rename to same_signature_p.
18090 (dfs_find_final_overrider): Adjust accordingly.
18091 (mark_overriders): Likewise.
18092 (warn_hidden): Likewise.
18093 (build_vtbl_initializer): Reorganize machinery for building things
18094 at negative offsets.
18095 (build_vcall_and_vbase_vtbl_entries): Likewise.
18096 (build_vbase_offset_vtbl_entries): Likewise.
18097 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
18098 offset entries. Do not create two entries for functions with the
18099 same signature.
18100 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
18101 (build_rtti_vtbl_entries): Reorganize machinery for building things
18102 at negative offsets.
18103
18104 * optimize.c (expand_call_inline): Don't recurse into the code
18105 used to initialize the parameters more than once.
18106
18107 2000-06-11 Mark Mitchell <mark@codesourcery.com>
18108
18109 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
18110 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
18111 (find_substitution): Only use the `Sa' substitution for
18112 std::allocator, not instantiations of it.
18113 (write_template_prefix): Move comment. Only use a TREE_LIST to
18114 represent substitutions for a member template.
18115 (write_array_type): Mangle array dimensions correctly.
18116 * optimize.c (maybe_clone_body): Copy more information from the
18117 cloned function.
18118 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
18119 on the regenerated declaration.
18120
18121 2000-06-11 Chip Salzenberg <chip@valinux.com>
18122 Mark Mitchell <mark@codesourcery.com>
18123
18124 * class.c (build_vtable): Clarify comment.
18125 (build_ctor_vtbl_group): Pass the most derived type to
18126 build_vtable.
18127
18128 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18129
18130 * decl2.c (compare_options): Don't needlessly cast away const-ness.
18131
18132 2000-06-10 Mark Mitchell <mark@codesourcery.com>
18133
18134 * decl.c (add_binding): Handle duplicate declarations of external
18135 variables.
18136
18137 2000-06-09 Chip Salzenberg <chip@valinux.com>
18138 Mark Mitchell <mark@codesourcery.com>
18139
18140 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
18141 argument.
18142 (write_signed_number): New macro.
18143 (write_unsigned_number): Likewise.
18144 (write_source_name): Use them.
18145 (write_number): Handle signed and unsigned values.
18146 (write_integer_cst): Use tree_int_cst_sgn, and use
18147 write_unsigned_number or write_signed_number as appropriate.
18148 (write_discriminator): Use write_unsigned_number or
18149 write_signed_number as appropriate.
18150 (write_template_arg_literal): Likewise.
18151 (write_array_type): Use tree_low_cst.
18152 (write_template_parm): Use write_unsigned_number or
18153 write_signed_number as appropriate.
18154 (write_substitution): Adjust call to write_number.
18155 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
18156 (write_expression): Handle non-type template arguments of
18157 reference type correctly.
18158 (mangle_thunk): Use write_signed_number.
18159
18160 2000-06-09 Chip Salzenberg <chip@valinux.com>
18161
18162 * mangle.c (find_substition): Don't mangle objects with typename
18163 substitutions (e.g. "cin" as "Si").
18164
18165 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
18166
18167 * call.c (add_candidate): Use ggc_alloc_cleared.
18168 * decl.c (lookup_label): Likewise.
18169 * lex.c (retrofit_lang_decl): Likewise.
18170
18171 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
18172
18173 * semantics.c (expand_body): Push to TV_EXPAND.
18174 * optimize.c (optimize_function): Push to TV_INTEGRATION.
18175 * decl.c (start_function): Always call announce_function.
18176
18177 * tinfo2.cc: Just declare abort.
18178
18179 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
18180
18181 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
18182 whenever @ is a symbolic name.
18183
18184 2000-06-08 Jakub Jelinek <jakub@redhat.com>
18185
18186 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
18187
18188 2000-06-07 Mark Mitchell <mark@codesourcery.com>
18189
18190 * decl.c (pushdecl): Look up functions by DECL_NAME, not
18191 DECL_ASSEMBLER_NAME.
18192
18193 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18194
18195 * decl2.c (c_language): Define.
18196
18197 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
18198
18199 * lex.c (lang_init_options): Tweak.
18200
18201 * decl2.c: Remove #inclusion of diagnostic.h
18202 (lang_decode_option): Move diagnostic formatting options to
18203 toplevel.
18204
18205 * lang-options.h: Remove documentation for diagnostic options.
18206
18207 * Makefile.in (lex.o): Depends upon diagnostic.h
18208
18209 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18210
18211 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18212 the same DECL_RESULT, it's not a redefinition.
18213 * pt.c (tsubst_decl): Remove code to handle illegal
18214 specializations.
18215
18216 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
18217
18218 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18219
18220 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
18221
18222 * search.c (maybe_suppress_debug_info): Don't check
18223 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18224
18225 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18226 here if extern_p.
18227
18228 Remember instantiation context in deferred instantiations.
18229 * cp-tree.h (struct tinst_level): Remove.
18230 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18231 * pt.c (current_tinst_level): Now a tree.
18232 (print_template_context, push_tinst_level, pop_tinst_level,
18233 tinst_for_decl): Adjust.
18234 (reopen_tinst_level): New fn.
18235 (init_pt): Register current_tinst_level as a root.
18236 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18237 of the pending templates list.
18238 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
18239 * lex.c (extract_interface_info): Adjust.
18240 * decl2.c (warn_if_unknown_interface): Adjust.
18241
18242 2000-06-05 Mark Mitchell <mark@codesourcery.com>
18243
18244 * class.c (indirect_primary_base_p): New function.
18245 (determine_primary_base): Use it.
18246
18247 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
18248
18249 Update new-abi dynamic cast algorithm.
18250 * tinfo.cc (__class_type_info::__dyncast_result): Add
18251 whole_details. Adjust constructor.
18252 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18253 Avoid unnecessary searching.
18254 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18255
18256 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18257
18258 * decl.c (init_decl_processing): Don't call record_component_aliases.
18259 * tree.c (build_cplus_array_type_1): Likewise.
18260
18261 2000-06-04 Mark Mitchell <mark@codesourcery.com>
18262
18263 * ir.texi: Correct typo.
18264 * mangle.c (write_expression): Handle non-type template arguments
18265 with reference type.
18266 * method.c (build_overload_value): Likewise.
18267 * pt.c (convert_nontype_argument): Explicitly represent conversion
18268 to a reference with an ADDR_EXPR.
18269 (unify): Always unify arguments in left-to-right order.
18270
18271 2000-06-03 Alex Samuel <samuel@codesourcery.com>
18272 Mark Mitchell <mark@codesourcery.com>
18273
18274 * Make-lang.in (CXX_SRCS): Add mangle.c.
18275 * Makefile.in (CXX_OBJS): Add mangle.o.
18276 (mangle.o): New rule.
18277
18278 * class.c (local_classes): New variable.
18279 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18280 (get_vtt_name): Use mangle_vtt_name for new ABI.
18281 (init_class_processing): Initialize local_classes.
18282 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18283 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18284 (std_identifier): New macro.
18285 (DECL_VOLATILE_MEMFUNC_P): New macro.
18286 (DECL_NAMESPACE_STD_P): Likewise.
18287 (local_classes): Declare.
18288 (get_mostly_instantiated_function_type): Declare.
18289 (init_mangle): Declare.
18290 (mangle_decl): Likewise.
18291 (mangle_type_string): Likewise.
18292 (mangle_type): Likewise.
18293 (mangle_typeinfo_for_type): Likewise.
18294 (mangle_typeinfo_string_for_type): Likewise.
18295 (mangle_vtbl_for_type): Likewise.
18296 (mangle_vtt_for_type): Likewise.
18297 (mangle_ctor_vtbl_for_type): Likewise.
18298 (mangle_thunk): Likewise.
18299 (mangle_conv_op_name_for_type): Likewise.
18300 (mangle_guard_variable): Likewise.
18301 * decl.c (pushtag): Keep track of local classes.
18302 (initialize_predefined_identifiers): Initialize std_identifier.
18303 (init_decl_processing): Use std_identifier.
18304 (start_decl): Don't treat instantiations as specializations.
18305 (grokdeclarator): Likewise.
18306 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
18307 name for fully-instantiated templates.
18308 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18309 destructors with the new ABI.
18310 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18311 (grokfield): Use mangle_type for new ABI.
18312 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18313 (get_sentry): Use mangle_guard_variable for new ABI.
18314 (start_static_initialization_or_destruction): Likewise.
18315 * expr.c (extract_aggr_init): Remove.
18316 (extract_scalar_init): Likewise.
18317 (extract_init): Remove #if 0'd code.
18318 * mangle.c: New function.
18319 * method.c (build_mangled_name): Assert not flag_new_abi.
18320 (build_static_name): Likewise.
18321 (build_decl_overload_real): Likewise.
18322 (build_typename_overload): Likewise.
18323 (build_overload_with_type): Likewise.
18324 (build_overload_name): Likewise.
18325 (get_ctor_vtbl_name): Likewise.
18326 (start_squangling): Likewise.
18327 (get_id_2): Likewise.
18328 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18329 (init_method): Call init_mangle for new ABI.
18330 (make_thunk): Call mangle_thunk for new ABI.
18331 * operators.def: Correct new ABI manglings for the `%' operator.
18332 Add `::' operator.
18333 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18334 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18335 (lookup_template_class): Call mangle_decl for new ABI.
18336 (get_mostly_instantiated_function_type): New function.
18337 (set_mangled_name_for_template_decl): Use it.
18338 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18339 the new ABI. Use mangle_conv_op_name_for_type for instantiated
18340 conversion op names.
18341 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18342 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18343 (tinfo_base_init): Likewise. Mangle typeinfo string name with
18344 mangle_typeinfo_string_for_type.
18345
18346 2000-06-03 Mark Mitchell <mark@codesourcery.com>
18347
18348 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18349 (INNERMOST_TEMPLATE_ARGS): New macro.
18350 (innermost_args): Remove.
18351 (get_innermost_template_args): New function.
18352 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18353 * error.c (dump_function_decl): Be caution when using
18354 most_general_template.
18355 * method.c (build_template_parm_names): Use
18356 INNERMOST_TEMPLATE_ARGS.
18357 * pt.c (add_to_template_args): Tidy comment
18358 (get_innermost_template_args): New function.
18359 (check_explicit_specialization): Clear DECL_INITIAL for a new
18360 specialization.
18361 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18362 Tidy.
18363 (push_template_decl): Always register specializations of the most
18364 general template.
18365 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18366 (coerce_template_parms): Likewise.
18367 (lookup_template_class): Likewise.
18368 (innermost_args): Remove.
18369 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18370 (tsubst_decl): Handle tricky specializations. Use
18371 get_innermost_template_args.
18372 (instantiate_template): Simplify handling of partial
18373 instantiations.
18374 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18375 (most_general_template): Reimplement, in a more straightforward
18376 manner.
18377 (regenerate_decl_from_template): Tweak formatting. Use
18378 TMPL_ARGS_DEPTH for clarity.
18379 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18380
18381 * dump.c (dequeue_and_dump): Dump information about thunks.
18382
18383 2000-06-01 Richard Henderson <rth@cygnus.com>
18384
18385 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18386
18387 2000-06-01 Richard Henderson <rth@cygnus.com>
18388
18389 * decl2.c (unsupported_options): Fix typo, make const.
18390 (lang_decode_option): Fix bsearch argument order.
18391
18392 2000-06-01 Mark Mitchell <mark@codesourcery.com>
18393
18394 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18395 on FIELD_DECLs.
18396
18397 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18398
18399 * cp-tree.h (c_get_alias_set): Deleted.
18400 * Makefile.in (decl.o): Include ../expr.h.
18401 * decl.c (expr.h): Include.
18402 (init_decl_processing): Call record_component_aliases for arrays.
18403 (grokdeclarator): Likewise.
18404 Set TREE_ADDRESSABLE for fields that aren't bitfields.
18405 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18406
18407 2000-05-31 Mark Mitchell <mark@codesourcery.com>
18408
18409 Remove guiding declaration support.
18410 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18411 (flag_guiding_decls): Remove.
18412 * call.c (build_user_type_conversion_1): Remove support for
18413 guiding decls.
18414 (build_new_function_call): Likewise.
18415 (build_new_op): Likewise.
18416 (build_new_method_call): Likewise.
18417 * decl.c (start_function): Likewise.
18418 * friend.c (is_friend): Likewise.
18419 (do_friend): Likewise.
18420 * decl2.c ((flag_dump_translation_unit): Make it const.
18421 (flag_guiding_decls): Remove.
18422 (unsupported_options): New variable
18423 (compare_options): New function.
18424 (lang_decode_option): Use them.
18425
18426 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18427
18428 * method.c (mangle_expression): Adjust test for legal expression
18429 operators.
18430
18431 * pt.c (instantiate_decl): Save and restore the local
18432 specializations list.
18433
18434 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
18435
18436 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18437
18438 2000-05-30 Mark Mitchell <mark@codesourcery.com>
18439
18440 * call.c (add_template_candidate_real): Handle member template
18441 constructors for classes with virtual bases.
18442 (build_user_type_conversion_1): Use in_charge_arg_for_name.
18443 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18444
18445 * ir.texi: Update thunk documentation.
18446
18447 * call.c (joust): Fix handling of overloaded builtin operators.
18448
18449 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
18450
18451 * cp-tree.h (DECL_ANTICIPATED): New macro.
18452 Document new use of DECL_LANG_FLAG_7.
18453 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18454 in the user namespace.
18455 * lex.c (do_identifier): If the identifier's declaration has
18456 DECL_ANTICIPATED on, it has not yet been declared. But do not
18457 replace it with an ordinary implicit declaration.
18458
18459 * tinfo2.cc: Include stdlib.h.
18460
18461 2000-05-29 Mark Mitchell <mark@codesourcery.com>
18462
18463 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18464 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18465 CLASSTYPE_ALIGN.
18466
18467 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
18468
18469 * decl2.c (lang_decode_option): Use skip_leading_substring instead
18470 of plain strncmp.
18471
18472 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
18473
18474 * operators.def (<?): Duplicated, should have been...
18475 (>?): this. Fixed.
18476
18477 2000-05-27 Alex Samuel <samuel@codesourcery.com>
18478 Mark Mitchell <mark@codesourcery.com>
18479
18480 * cp-tree.h (ansi_opname): Make it a macro.
18481 (ansi_assopname): Likewise.
18482 (struct lang_decl_flags): Add assignment_operator_p.
18483 (struct lang_decl): Add operator_code.
18484 (DECL_VTT_PARM): Adjust.
18485 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18486 overloaded operator.
18487 (SET_OVERLOADED_OPERATOR_CODE): New macro.
18488 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18489 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18490 (opname_tab): Remove.
18491 (assignop_tab): Likewise.
18492 (operator_name_info_t): New type.
18493 (operator_name_info): New variable.
18494 (assignment_operator_name_info): Likewise.
18495 (build_cp_library_fn): Remove declaration.
18496 (push_cp_library_fn): Likewise.
18497 (operator_name_string): Likewise.
18498 (build_decl_overload): Likewise.
18499 * call.c (print_z_candidates): Simplify.
18500 (build_object_call): Adjust usage of ansi_opname. Use
18501 DECL_OVERLOADED_OPERATOR_P.
18502 (op_error): Adjust operator name lookup.
18503 (build_conditional_expr): Adjust usage of ansi_opname.
18504 (build_new_op): Likewise.
18505 (build_op_delete_call): Likewise.
18506 (build_over_call): Likewise.
18507 (joust): Use DECL_OVERLOADED_OPERATOR_P.
18508 * decl.c (duplicate_decls): Copy operator_code.
18509 (init_decl_processing): Adjust parameters to push_cp_library_fn.
18510 (builtin_function): Adjust parameters to build_library_fn_1.
18511 (build_library_fn_1): Accept an overloaded operator code.
18512 (build_library_fn): Pass ERROR_MARK.
18513 (build_cp_library_fn): Accept an overloaded operator code.
18514 (push_cp_library_fn): Likewise.
18515 (grokfndecl): Tweak.
18516 (grokdeclarator): Simplify code to compute names of overloaded
18517 operators. Adjust use of ansi_opname.
18518 (ambi_op_p): Work on tree_codes, not identifiers.
18519 (unary_op_p): Likewise.
18520 (grok_op_properties): Likewise.
18521 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18522 (lang_mark_tree): Don't try to mark the operator_code.
18523 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18524 * error.c (dump_decl): Remove special handling for operator
18525 names.
18526 (dump_function_name): Likewise.
18527 (dump_expr): Adjust name lookup of operators.
18528 (op_to_string): Simplify.
18529 (assop_to_string): Likewise.
18530 * init.c (build_new_1): Adjust use of ansi_opname.
18531 * lex.c (opname_tab): Remove.
18532 (assignop_tab): Likewise.
18533 (ansi_opname): Likewise.
18534 (ansi_assopname): Likewise.
18535 (operator_name_string): Likewise.
18536 (reinit_lang_specific): Likewise.
18537 (operator_name_info): New variable.
18538 (assignment_operator_name_info): Likewise.
18539 (init_operators): New function.
18540 (init_parse): Use it.
18541 (do_identifier): Adjust use of ansi_opname.
18542 * method.c (mangle_expression): Don't use ansi_opname for
18543 mangling.
18544 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18545 (build_decl_overload): Remove.
18546 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18547 (do_build_assign_ref): Adjust use of ansi_opname.
18548 (synthesize_method): Likewise.
18549 (implicitly_declare_fn): Likewise.
18550 * operators.def: New file.
18551 * parse.y (operator): Adjust use of ansi_opname.
18552 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18553 (set_mangled_name_for_template_decl): Don't play games with
18554 current_namespace.
18555 (special_function_p): Adjust use of ansi_opname.
18556 * typeck.c (check_return_expr): Likewise.
18557 * Make-lang.in (cc1plus): Depend on operators.def.
18558 * Makefile.in (lex.o): Likewise.
18559 (decl.o): Likewise.
18560
18561 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
18562
18563 * Make-lang.in (cplib2.ready): Eradicate.
18564
18565 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18566
18567 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18568 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18569 (built_min, cp_tree_equal): Likewise.
18570
18571 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18572
18573 * class.c (layout_nonempty_base_or_field): Replace
18574 `record_layout_info' with `record_layout_info_s'.
18575
18576 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
18577
18578 Fix goto checking.
18579 * cp-tree.h (struct language_function): x_named_labels is now
18580 a struct named_label_list*.
18581 * decl.c (struct named_label_use_list): Renamed from...
18582 (struct named_label_list): ...this. New struct.
18583 (push_binding_level): Don't set eh_region.
18584 (note_level_for_eh): New fn.
18585 (pop_label): Take label and old value directly.
18586 (pop_labels): Adjust for new named_labels format.
18587 (lookup_label): Likewise.
18588 (poplevel): Note characteristics of a binding level containing a
18589 named label. Mess with named label lists earlier.
18590 (mark_named_label_lists): New fn.
18591 (mark_lang_function): Call it.
18592 (use_label): New fn, split out from...
18593 (make_label_decl): ...here. Don't call it.
18594 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18595 check_previous_gotos): New fns, split out from...
18596 (define_label): ...here.
18597 (check_switch_goto): New fn.
18598 (define_case_label): Call it.
18599 (check_goto): New fn.
18600 * semantics.c (finish_goto_stmt): Call it and use_label.
18601 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18602 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18603
18604 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18605
18606 * class.c (build_vtable_entry_ref): Correct usage of
18607 get_vtbl_decl_for_binfo.
18608
18609 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18610 * method.c (implicitly_declare_fn): Not here.
18611
18612 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
18613
18614 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18615 (CPTI_PTMD_DESC_TYPE): ... here.
18616 (ptmd_desc_type_node): Rename to ...
18617 (ptm_desc_type_node): ... here.
18618 * decl.c: Likewise.
18619 * rtti.c (ptmd_initializer): Rename to ...
18620 (ptm_initializer): ... here.
18621 (sythesize_tinfo_var): Adjust. Deal with pointer to member
18622 function.
18623 (create_tinfo_types): Adjust.
18624
18625 2000-05-25 Mark Mitchell <mark@codesourcery.com>
18626
18627 Finish implementation of VTTs.
18628 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18629 CPTI_VTT_PARM_IDENTIFIER.
18630 (vtt_parm_identifier): New macro.
18631 (vtt_parm_type): Likewise.
18632 (BINFO_SUBVTT_INDEX): Likewise.
18633 (BINFO_VPTR_INDEX): Likewise.
18634 (struct lang_decl): Add vtt_parm.
18635 (DECL_VTT_PARM): New macro.
18636 (DECL_USE_VTT_PARM): Likewise.
18637 (DECL_NEEDS_VTT_PARM_P): Likewise.
18638 (get_vtt_name): Declare.
18639 (build_artificial_parm): Likewise.
18640 (fixup_all_virtual_upcast_offsets): Likewise.
18641 (expand_indirect_vtbls_init): Remove.
18642 * call.c (build_new_method_call): Pass the vtt to subobject
18643 constructors and destructors.
18644 * class.c (get_vtt_name): Give it external linkage.
18645 (build_clone): Handle the magic VTT parameters for clones.
18646 (clone_function_decl): Fix typo in comment.
18647 (build_vtt): Keep track of the indices in the VTTs where various
18648 entities are stored.
18649 (build_vtt_inits): Likewise.
18650 (dfs_build_vtt_inits): Likewise.
18651 (build_ctor_vtbl_group): Tweak type of construction vtables.
18652 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18653 primary bases, when building construction vtables.
18654 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18655 (initialize_predefined_identifiers): Add vtt_parm_identifier.
18656 (init_decl_processing): Initialize vtt_parm_type.
18657 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18658 (lang_mark_tree): Make vtt_parm.
18659 * decl2.c (build_artificial_parm): New function.
18660 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
18661 (grokclassfn): Use build_artificial_parm.
18662 * init.c (initialize_vtbl_ptrs): Call
18663 fixup_all_virtual_upcast_offsets directly.
18664 (perform_member_init): Use the complete subobject destructor for
18665 member cleanups.
18666 (build_vtbl_address): New function.
18667 (expand_virtual_init): Handle VTTs.
18668 * optimize (maybe_clone_body): Likewise.
18669 * search.c (fixup_all_virtual_upcast_offsets): Give it external
18670 linkage.
18671 (expand_indirect_vtbls_init): Remove.
18672 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18673 * tree.c (make_binfo): Make them bigger.
18674
18675 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18676
18677 * inc/cxxabi.h (__pbase_type_info): Define, based on
18678 __pointer_type_info.
18679 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18680 (__pointer_to_member_type_info): Likewise.
18681 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18682 (__pointer_to_member_type_info::__is_pointer_p): Remove.
18683 (__pointer_type_info::__do_catch): Rename to ...
18684 (__pbase_type_info::__do_catch): ... here. Adjust.
18685 (__pbase_type_info::__pointer_catch): Implement.
18686 (__pointer_type_info::__pointer_catch): Adjust.
18687 (__pointer_to_member_type_info::__pointer_catch): Adjust.
18688
18689 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18690
18691 * tinfo.h (__user_type_info::contained_virtual_p): New
18692 predicate.
18693 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18694 shaped hierarchy.
18695 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18696 diamond shaped hierarchy. Add early out for mixed diamond and
18697 duplicate shaped hierarchy.
18698
18699 2000-05-24 Mark Mitchell <mark@codesourcery.com>
18700
18701 * cp-tree.h (build_delete): Change prototype.
18702 (build_vec_delete): Likewise.
18703 * call.c (build_scoped_method_call): Use special_function_kind
18704 values to indicate the kind of destruction to be done.
18705 (build_method_call): Likewise.
18706 * decl.c (finish_destructor_body): Likewise.
18707 (maybe_build_cleanup_1): Likewise. Rename to ...
18708 (maybe_build_cleanup): ... this.
18709 * decl2.c (delete_sanity): Use special_function_kind
18710 values to indicate the kind of destruction to be done.
18711 (build_cleanup): Likewise.
18712 * init.c (perform_member_init): Likewise.
18713 (build_vec_delete_1): Likewise.
18714 (build_dtor_call): Simplify.
18715 (build_delete): Use special_function_kind
18716 values to indicate the kind of destruction to be done.
18717 (build_vbase_delete): Likewise.
18718 (build_vec_delete): Likewise.
18719
18720 * init.c (sort_member_init): Fix typo in error message generation
18721 code.
18722
18723 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
18724
18725 * semantics.c (begin_class_definition): make the packed
18726 attribute be sensitive to the "-fpack-struct" command line flag
18727
18728 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
18729
18730 Update new-abi upcast algorithm.
18731 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18732 prototype and meaning of return value.
18733 (__si_class_type_info::__do_upcast): Likewise.
18734 (__vmi_class_type_info::__do_upcast): Likewise.
18735 * tinfo.cc (__class_type_info::__upcast_result): Replace
18736 whole2dst with part2dst. Adjust ctor.
18737 (__class_type_info::__do_upcast): Adjust call of worker function.
18738 (__class_type_info::__do_upcast): Adjust.
18739 (__si_class_type_info::__do_upcast): Adjust. Use parent's
18740 __do_upcast.
18741 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18742 virtual base in diamond hierarchy bug.
18743
18744 2000-05-23 Mark Mitchell <mark@codesourcery.com>
18745
18746 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18747 and bitfield to tinfo_fn_p.
18748 (DECL_TINFO_FN_P): Adjust.
18749 (SET_DECL_TINFO_FN_P): Likewise.
18750 (DECL_MUTABLE_P): Likewise.
18751 (DECL_C_BIT_FIELD): Likewise.
18752 (SET_DECL_C_BIT_FIELD): Likewise.
18753 (CLEAR_DECL_C_BIT_FIELD): Likewise.
18754 (DECL_UNINLINABLE): Likewise.
18755 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18756 (handle_using_decl): Remove assertion.
18757 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18758 to build FIELD_DECLs.
18759 (build_base_field): Likewise.
18760 (layout_class_type): Likewise.
18761 * decl.c (init_decl_processing): Likewise.
18762 (build_ptrmemfunc_type): Likewise.
18763 (grokdeclarator): Likewise.
18764 * decl2.c (grok_x_components): Likewise.
18765 * except.c (call_eh_info): Likewise.
18766 * init.c (init_init_processing): Likewise.
18767 * rtti.c (expand_class_desc): Likewise.
18768 (create_pseudo_type_info): Likewise.
18769 (get_vmi_pseudo_type_info): Likewise.
18770 (create_tinfo_types): Likewise.
18771 * ptree.c (print_lang_decl): Adjust.
18772 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18773 before checking DECL_MUTABLE_P.
18774
18775 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18776 parameters for template functions.
18777 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18778 destructors as well as constructors.
18779
18780 2000-05-22 Mark Mitchell <mark@codesourcery.com>
18781
18782 * class.c (build_ctor_vtbl_group): Set inits.
18783 * optimize.c (maybe_clone_body): Set DECL_INLINE and
18784 DECL_THIS_INLINE appropriately for clones.
18785
18786 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18787 (DECL_CONV_FN_P): Simplify.
18788 (DECL_OPERATOR): Remove.
18789 (language_to_string): Declare.
18790 * decl.c (duplicate_decls): Fix typo in comment.
18791 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18792 (grok_op_properties): Use DECL_CONV_FN_P instead of
18793 IDENTIFIER_TYPENAME_P.
18794 * dump.c (dequeue_and_dump): Dump the language linkage of
18795 declarations.
18796 * error.c (language_to_string): Give it external linkage.
18797 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18798 (implicitly_declare_fn): Set DECL_LANGUAGE.
18799 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18800 IDENTIFIER_TYPENAME_P.
18801 (tsubst_decl): Likewise.
18802 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18803 * semantics.c (finish_member_declaration): Don't mark members of
18804 classes declared in an extern "C" region as extern "C".
18805
18806 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18807
18808 * decl2.c (qualified_lookup_using_namespace): Look through
18809 namespace aliases.
18810
18811 * decl.c (push_using_decl): Return the old decl on namespace level.
18812
18813 2000-05-21 Mark Mitchell <mark@codesourcery.com>
18814
18815 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18816 (VTT_NAME_PREFIX): New macro.
18817 (CTOR_VTBL_NAME_PREFIX): Likewise.
18818 (get_ctor_vtbl_name): New function.
18819 * class.c (get_vtable_name): Simplify.
18820 (get_vtt_name): New function.
18821 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18822 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18823 when a virtual base becomes primary.
18824 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
18825 VTTs.
18826 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18827 additional parameters.
18828 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18829 (initialize_array): New function.
18830 (build_vtt): Likewise.
18831 (build_vtt_inits): Likewise.
18832 (dfs_build_vtt_inits): Likewise.
18833 (dfs_fixup_binfo_vtbls): Likewise.
18834 (build_ctor_vtbl_group): Likewise.
18835 (initialize_vtable): Use initialize_array.
18836 (accumulate_vtbl_inits): Reimplement to handle construction
18837 vtables.
18838 (dfs_accumulate_vtbl_inits): Likewise.
18839 (bulid_vtbl_initializer): Adjust parameter name.
18840 * method.c (build_typename_overload): Remove #if 0'd code.
18841 (get_ctor_vtbl_name): New function.
18842 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18843 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18844
18845 * cp-tree.h (struct lang_type): Remove search_slot.
18846 (CLASSTYPE_SEARCH_SLOT): Remove.
18847 (emit_base_init): Change prototype.
18848 (initialize_vtbl_ptrs): Likewise.
18849 (expand_indirect_vtbls_init): Likewise.
18850 (clear_search_slots): Remove.
18851 * decl.c (lang_mark_tree): Don't mark search_slot.
18852 * init.c (initialize_vtbl_ptrs): Simplify.
18853 (emit_base_init): Likewise.
18854 * search.c (struct vbase_info): Document decl_ptr.
18855 (convert_pointer_to_single_level): Remove.
18856 (dfs_find_vbases): Remove.
18857 (dfs_init_base_pointers): Simplify.
18858 (dfs_clear_vbase_slots): Remove.
18859 (dfs_vtable_path_unmark): New function.
18860 (init_vbase_pointers): Simplify.
18861 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18862 (expand_indirect_vtbls_init): Simplify. Don't call
18863 mark_all_temps_used.
18864 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18865 initialize_vtbl_ptrs.
18866
18867 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
18868
18869 * except.c: Add static prototypes.
18870
18871 2000-05-20 H.J. Lu <hjl@gnu.org>
18872
18873 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18874
18875 2000-05-19 Mark Mitchell <mark@codesourcery.com>
18876
18877 Don't create a separate copy of virtual bases for the
18878 CLASSTYPE_VBASECLASSES list.
18879 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18880 (BINFO_FOR_VBASE): Remove.
18881 (CANONICAL_BINFO): Adjust.
18882 (binfo_for_vbase): New function.
18883 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18884 instead of BINFO_FOR_VBASE.
18885 (build_vbase_pointer): Likewise.
18886 (build_secondary_vtable): Likewise.
18887 (dfs_mark_primary_bases): Likewise.
18888 (mark_primary_bases): Likewise.
18889 (layout_nonempty_base_or_field): Likewise.
18890 (dfs_set_offset_for_shared_vbases): Likewise.
18891 (dfs_set_offset_for_unshared_vbases): Likewise.
18892 (layout_virtual_bases): Likewise. Adjust for changes to the
18893 CLASSTYPE_VBASECLASSES list.
18894 (dump_class_hierarchy_r): Use binfo_for_vbase
18895 instead of BINFO_FOR_VBASE.
18896 (dump_class_hierarchy): Likewise.
18897 (finish_vtbls): Likewise.
18898 (build_vtbl_initializer): Adjust for changes to the
18899 CLASSTYPE_VBASECLASSES list.
18900 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18901 * decl.c (finish_destructor_body): Adjust for changes to the
18902 CLASSTYPE_VBASECLASSES list.
18903 * init.c (sort_base_init): Use binfo_for_vbase.
18904 (construct_virtual_bases): Adjust for changes to the
18905 CLASSTYPE_VBASECLASSES list.
18906 (expand_member_init): Use binfo_for_vbase.
18907 (build_vbase_delete): Adjust for changes to the
18908 CLASSTYPE_VBASECLASSES list.
18909 * method.c (do_build_copy_constructor): Likewise.
18910 * rtti.c (get_base_offset): Use binfo_for_vbase.
18911 (expand_class_desc): Remove #if 0'd code.
18912 * search.c (struct vbase_info): Remove vbase_types.
18913 (get_base_distance): Use binfo_for_vbase.
18914 (lookup_field_queue_p): Use CANONICAL_BINFO.
18915 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18916 (get_pure_virtuals): Adjust for changes to the
18917 CLASSTYPE_VBASECLASSES list.
18918 (dfs_find_vbases): Use binfo_for_vbase.
18919 (dfs_init_vbase_pointers): Likewise.
18920 (init_vbase_pointers): Don't initialize vi.vbase_types.
18921 (virtual_context): Use binfo_for_vbase.
18922 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18923 CLASSTYPE_VBASECLASSES list.
18924 (expand_indirect_vtbls_init): Simplify.
18925 (dfs_get_vbase_types): Don't replicate virtual bases.
18926 (find_vbase_instance): Use binfo_for_vbase.
18927 (binfo_for_vbase): New function.
18928 * typeck.c (get_delta_difference): Use binfo_for_vbase.
18929
18930 2000-05-17 Mark Mitchell <mark@codesourcery.com>
18931
18932 * decl2.c (finish_anon_union): Generalize error messages to handle
18933 anonymous structures.
18934 * init.c (perform_member_init): Remove `name' parameter.
18935 (build_field_list): New function.
18936 (sort_member_init): Handle anonymous union initialization order
18937 correctly. Check for multiple initializations of the same union.
18938 (emit_base_init): Don't look up fields by name here.
18939 (expand_member_init): Record the result of name lookup for future
18940 reference.
18941 * typeck.c (build_component_ref): Fix formatting.
18942
18943 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
18944
18945 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18946 * typeck.c (build_x_compound_expr): Replace warn_unused with
18947 warn_unused_value.
18948
18949 * decl2.c (lang_decode_option): Update -Wall unused flags by
18950 calling set_Wunused.
18951
18952 2000-05-16 Mark Mitchell <mark@codesourcery.com>
18953
18954 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18955 * init.c (dfs_vtable_path_unmark): Remove.
18956 * search.c (marked_new_vtable_p): Likewise.
18957 (unmarked_new_vtable_p): Likewise.
18958 (dfs_search_slot_nonempty_p): Likewise.
18959 (dfs_mark): Likewise.
18960 (dfs_vtable_path_unmark): Likewise.
18961 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18962 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18963 (dfs_init_vbase_pointers): Remove special-case new ABI code.
18964 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18965 (init_vbase_pointers): Simplify.
18966 (expand_indirect_vtbls_init): Likewise.
18967
18968 * class.c (copy_virtuals): New function.
18969 (build_primary_table): Use it.
18970 (build_secondary_vtable): Likewise.
18971 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18972 indicate that no vcall offset is required.
18973 (add_virtual_function): Likewise.
18974 (modify_all_vtables): Likewise.
18975 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18976 (dfs_accumulate_vtbl_inits): Likewise.
18977 (build_vtbl_initializer): Make changes to handle construction
18978 vtables.
18979 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18980 (build_rtti_vtbl_entries): Likewise.
18981 (build_vtable_entries): Handle a NULL vcall_index.
18982
18983 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
18984
18985 * decl2.c (lang_decode_option): Fix thinko.
18986
18987 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
18988
18989 * except.c (check_handlers): New fn.
18990 * cp-tree.h: Declare it.
18991 * semantics.c (finish_handler_sequence): Call it.
18992 (finish_function_handler_sequence): Likewise.
18993 (finish_handler_parms): Set TREE_TYPE on the handler.
18994 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18995 * search.c (get_base_distance_recursive): If protect>1, ignore
18996 special access.
18997 (get_base_distance): Don't reduce watch_access.
18998
18999 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
19000
19001 * lex.c: #include diagnostic.h.
19002 (lang_init_options): Set default prefixing rules.
19003
19004 * lang-options.h: Add -fdiagnostics-show-location=.
19005
19006 * decl2.c: #include diagnostic.h.
19007 (lang_decode_option): Handle -fdiagnostics-show-location=.
19008
19009 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
19010
19011 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
19012 * vec.cc: Revert my 2000-05-07 change.
19013
19014 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
19015
19016 * class.c (check_field_decls): Complain about non-static data
19017 members with same name as class in class with constructor.
19018
19019 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
19020
19021 * decl.c (grokdeclarator): Allow non-static data members with
19022 same name as class.
19023
19024 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
19025
19026 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
19027 and pending_inline.filename. Update prototypes.
19028 * decl.c (define_label): Constify filename parameter.
19029 * decl2.c (warn_if_unknown_interface): Constify local char *.
19030 * input.c Constify input_source.filename. Don't declare
19031 input_filename or lineno. Constify filename parameter to feed_input.
19032 * lex.c (init_parse): Constify parameter and return value.
19033 (cp_pragma_interface, cp_pragma_implementation): Constify
19034 filename argument.
19035 (reinit_parse_for_method, reinit_parse_for_block,
19036 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
19037 Constify local char *.
19038 * pt.c: Don't declare lineno or input_filename.
19039 (print_template_context, tsubst_friend_function, tsubst_decl,
19040 tsubst, instantiate_decl): Constify local char *.
19041 * semantics.c (expand_body): Constify local char *.
19042 * tree.c (build_srcloc): Constify filename parameter.
19043 * typeck.c (c_expand_asm_operands): Constify filename
19044 parameter.
19045
19046 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
19047
19048 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
19049 offsetof expansion.
19050
19051 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
19052
19053 * inc/cxxabi.h: Fix typos in comment.
19054 (__base_class_info::__offset): Use a static_cast.
19055
19056 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
19057
19058 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
19059 of std::size_t and std::ptrdiff_t respectively.
19060 * tinfo.cc: Likewise.
19061 * vec.cc: Likewise.
19062
19063 2000-05-06 Richard Henderson <rth@cygnus.com>
19064
19065 * typeck.c (build_c_cast): Don't warn integer->pointer size
19066 mismatch for constants.
19067
19068 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
19069
19070 * rtti.c (ptmd_initializer): Set non-public, if class is
19071 incomplete.
19072
19073 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
19074 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19075 __cxa_vec_delete): Likewise.
19076 * tinfo.cc (__dynamic_cast): Likewise.
19077 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19078 __cxa_vec_delete): Likewise.
19079
19080 2000-05-04 Mark Mitchell <mark@codesourcery.com>
19081
19082 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
19083 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
19084 (lang_decl_flags): Add vcall_offset.
19085 (THUNK_VCALL_OFFSET): Use it.
19086 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
19087 * method.c (make_thunk): Create the lang_decl here, not in
19088 emit_thunk.
19089 (emit_thunk): Make generic thunks into ordinary functions once
19090 they have been fed to expand_body.
19091 * semantics.c (expand_body): Set current_function_is_thunk here.
19092
19093 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19094
19095 * class.c (update_vtable_entry_for_fn): Prototype.
19096
19097 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
19098 and `tmpl'.
19099
19100 * search.c (dfs_build_inheritance_graph_order): Prototype.
19101
19102 2000-05-04 Mark Mitchell <mark@codesourcery.com>
19103
19104 * cp-tree.h (special_function_kind): Add various kinds of
19105 destructors.
19106 (special_function_p): New function.
19107 * class.c (overrides): Don't let one kind of destructor override
19108 another.
19109 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
19110 whether or not to instantiate a template.
19111 * tree.c (special_function_p): Define.
19112
19113 2000-05-03 Mark Mitchell <mark@codesourcery.com>
19114
19115 * cp-tree.def (THUNK_DECL): Remove.
19116 * cp-tree.h (DECL_THUNK_P): New macro.
19117 (DECL_NON_THUNK_FUNCTION_P): Likewise.
19118 (DECL_EXTERN_C_FUNCTION_P): Likewise.
19119 (SET_DECL_THUNK_P): Likewise.
19120 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
19121 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
19122 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
19123 * decl.c (decls_match): Use DECL_EXTERN_C_P.
19124 (duplicate_decls): Likewise.
19125 (pushdecl): Likewise. Adjust thunk handling.
19126 (grokfndecl): Use DECL_EXTERN_C_P.
19127 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
19128 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
19129 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
19130 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
19131 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
19132 DECL_NO_STATIC_CHAIN.
19133 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
19134 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
19135 * search.c (covariant_return_p): Remove THUNK_DECL handling.
19136 * ir.texi: Update.
19137
19138 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19139
19140 * tree.c (walk_tree): Set lineno.
19141
19142 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19143
19144 * exception.cc: Update license notice.
19145 * new.cc: Likewise.
19146 * new1.cc: Likewise.
19147 * new2.cc: Likewise.
19148 * tinfo.cc: Likewise.
19149 * tinfo2.cc: Likewise.
19150 * vec.cc: Likewise.
19151 * inc/cxxabi.h: Likewise.
19152 * inc/exception: Likewise.
19153 * inc/new: Likewise.
19154 * inc/new.h: Likewise.
19155 * inc/typeinfo: Likewise.
19156
19157 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19158
19159 * tree.c (build_target_expr_with_type): If we already have a
19160 TARGET_EXPR, just return it.
19161
19162 * optimize.c (initialize_inlined_parameters): Don't generate an
19163 EXPR_STMT if we can just use DECL_INITIAL.
19164 * decl.c (emit_local_var): Only make the initialization a
19165 full-expression if stmts_are_full_exprs_p.
19166
19167 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19168
19169 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
19170 macro.
19171 * call.c (standard_conversion): Use it.
19172 (direct_reference_binding): Likewise.
19173 (build_over_call): Likewise.
19174 (is_properly_derived_from): Likewise.
19175 (compare_ics): Likewise.
19176 * class.c (resolves_to_fixed_type_p): Likewise.
19177 * optimize.c (declare_return_variable): Likewise.
19178 * pt.c (is_specialization_of): Likewise.
19179 (unify): Likewise.
19180 * typeck.c (comp_target_parms): Likeiwse.
19181 (build_static_cast): Likewise.
19182 (build_reinterpret_cast): Likewise.
19183 (build_const_cast): Likewise.
19184 (comp_ptr_ttypes_real): Likewise.
19185 (comp_ptr_ttypes_const): Likewise.
19186 * typeck2.c (process_init_constructor): Likewise.
19187
19188 2000-04-30 Scott Snyder <snyder@fnal.gov>
19189
19190 * decl.c (finish_destructor_body): Use the base destructor when
19191 destroying virtual bases.
19192
19193 2000-04-30 Mark Mitchell <mark@codesourcery.com>
19194
19195 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
19196 STMT_EXPRs.
19197 * optimize.c (struct inline_data): Add target_exprs field.
19198 (declare_return_variable): When a function returns an aggregate,
19199 use the variable declared in the TARGET_EXPR as the remapped
19200 DECL_RESULT.
19201 (expand_call_inline): Update the pending target_exprs stack.
19202 (optimize_function): Initialize the stack.
19203
19204 * decl2.c (finish_file): Fix typo in comment.
19205
19206 * method.c (emit_thunk): Don't try to return a `void' value.
19207
19208 * optimize.c (initialize_inlined_parameters): If the parameter is
19209 addressable, we need to make a new VAR_DECL, even if the
19210 initializer is constant.
19211
19212 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
19213
19214 * decl.c (grok_op_properties): Add an extra check of argtypes.
19215
19216 2000-04-27 Mark Mitchell <mark@codesourcery.com>
19217
19218 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19219 variables.
19220 (initialize_inlined_parameters): Try to avoid creating new
19221 VAR_DECLs.
19222
19223 2000-04-27 Alex Samuel <samuel@codesourcery.com>
19224
19225 * lex.c (my_get_run_time): Remove.
19226 (init_filename_times): Use get_run_time instead of my_get_run_time.
19227 (check_newline): Likewise.
19228 (dump_time_statistics): Likewise.
19229 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19230 of computing elapsed time explicitly.
19231
19232 2000-04-26 Mark Mitchell <mark@codesourcery.com>
19233
19234 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19235 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19236 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19237 before calling decl_constant_value.
19238 * class.c (check_bitfield_decl): Likewise.
19239 * cvt.c (ocp_convert): Likewise.
19240 (convert): Likewise.
19241 * decl.c (compute_array_index_type): Likewise.
19242 (build_enumerator): Likewise.
19243 * decl2.c (check_cp_case_value): Likewise.
19244 * pt.c (convert_nontype_argument): Likewise.
19245 (tsubst): Likewise.
19246 * typeck.c (decay_conversion): Likewise.
19247 (build_compound_expr): Likewise.
19248 (build_reinterpret_cast): Likewise.
19249 (build_c_cast): Likewise.
19250 (convert_for_assignment): Likewise.
19251
19252 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
19253
19254 * decl.c (finish_function): Don't play games with DECL_INLINE.
19255
19256 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
19257
19258 * ir.texi: Correct typo.
19259
19260 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19261
19262 * decl.c (grokdeclarator): Reject VLAs as members.
19263
19264 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
19265
19266 * call.c (standard_conversion): Accept conversion between
19267 COMPLEX_TYPEs.
19268
19269 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19270
19271 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
19272
19273 * decl2.c (finish_file): Remove double setup for accounting
19274 compile time.
19275
19276 2000-04-24 Robert Lipe <robertlipe@usa.net>
19277
19278 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19279
19280 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
19281
19282 * new.cc (set_new_handler): Needs to be in std::.
19283
19284 2000-04-23 Mark Mitchell <mark@codesourcery.com>
19285
19286 * cp-tree.h (lang_decl): Remove pretty_function_p.
19287 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19288 language-specific node.
19289 * decl.c (cp_make_fname_decl): Use build_decl, not
19290 build_lang_decl, to build the variables.
19291 (grokvardecl): Don't call build_lang_decl for local variables in
19292 templates.
19293 (grokdeclarator): Don't call build_lang_decl for local type
19294 declarations in templates.
19295 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19296 zero'd memory, rather than calling memset.
19297 * pt.c: Include hashtab.h.
19298 (local_specializations): New variable.
19299 (retrieve_local_specialization): Use it.
19300 (register_local_specialization): Likewise.
19301 (tsubst_decl): Don't assume local variables have
19302 DECL_LANG_SPECIFIC.
19303 (instantiate_decl): Set up local_specializations.
19304 * Makefile.in (HTAB_H): New variable.
19305
19306 2000-04-23 Richard Henderson <rth@cygnus.com>
19307
19308 * typeck.c (c_expand_asm_operands): Restore the original
19309 contents of the output list.
19310
19311 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
19312
19313 * ir.texi: Document complex number representation.
19314
19315 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
19316
19317 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19318 (target_incomplete_p): New function.
19319 (tinfo_base_init): Create comdat NTBS name variable.
19320 (ptr_initializer): Add non_public parameter. Calculate it.
19321 (ptmd_initializer): Likewise.
19322 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19323 (create_real_tinfo_var): Add non_public parameter. Use it.
19324 Push proxy into global namespace.
19325 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19326 New enumeration.
19327 * inc/typeinfo (type_info::before, type_info::operator==):
19328 Compare __name addresses.
19329
19330 * tinfo2.cc: Remove new-abi builtins comment.
19331
19332 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
19333
19334 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19335
19336 * call.c (joust): Exit early if we get the same function, too.
19337
19338 * decl2.c (key_method): Return NULL_TREE for template classes.
19339 (import_export_class): Don't need to check for template classes.
19340
19341 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
19342
19343 * lex.c: Remove references to cccp.c.
19344
19345 2000-04-18 Mark Mitchell <mark@codesourcery.com>
19346
19347 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19348 volatile_memfunc. Add destructor_attr. Adjust dummy.
19349 (DECL_DESTRUCTOR_P): Use destructor_attr.
19350 (DECL_CONST_MEMFUNC_P): Reimplement.
19351 (DECL_VOLATILE_MEMFUNC_P): Remove.
19352 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19353 (overrides): Use DECL_DESTRUCTOR_P.
19354 (check_for_override): Likewise.
19355 * decl.c (start_function): Likewise.
19356 * decl2.c (grokfclassfn): Likewise.
19357 (check_classfn): Likewise.
19358 (grok_function_init): Likewise.
19359
19360 2000-04-17 Mark Mitchell <mark@codesourcery.com>
19361
19362 * decl2.c (grokfield): Issue error on illegal data member
19363 declaration.
19364
19365 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
19366
19367 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19368
19369 2000-04-16 Mark Mitchell <mark@codesourcery.com>
19370
19371 * class.c (build_vtable_entry): Don't build thunks for type-info
19372 functions.
19373
19374 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
19375
19376 * decl.c (decls_match): Allow a redeclaration of a builtin to
19377 specify args while the builtin did not.
19378
19379 2000-04-15 Mark Mitchell <mark@codesourcery.com>
19380
19381 * cp-tree.def (THUNK_DECL): Add to documentation.
19382 * cp-tree.h (flag_huge_objects): Declare.
19383 * class.c (modify_vtable_entry): Tidy.
19384 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19385 Calculate delta appropriately for the new ABI.
19386 (dfs_modify_vtables): Use it.
19387 (modify_all_vtables): Fix thinko in code to add overriding copies
19388 of functions to primary vtables.
19389 (build_clone): Fix typo in comment.
19390 (clone_function_decl): Correct order of destructors in vtable.
19391 (build_vbase_offset_vtbl_entries): Adjust comment.
19392 (dfs_vcall_offset_queue_p): Remove.
19393 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19394 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19395 (build_vtable_entry): Correct check for pure virtual functions.
19396 Don't declare flag_huge_objects.
19397 * decl.c (flag_huge_objects): Remove declaration.
19398 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19399 Use int_size_in_bytes.
19400 (emit_thunk): Handle vcall offset thunks.
19401
19402 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19403
19404 * decl2.c (parse_time, varconst_time): Delete declarations.
19405 (finish_file): Delete LINENO declaration.
19406 START_TIME and THIS_TIME now long.
19407
19408 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
19409
19410 * class.c (build_base_field): Reformat comment.
19411
19412 * inc/cxxabi.h (stddef.h): Comment inclusion.
19413 (__base_class_info::__offset): Comment shift.
19414
19415 2000-04-12 Mark Mitchell <mark@codesourcery.com>
19416
19417 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19418 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19419 (cp_push_exception_identifier): New macro.
19420 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19421 (DECL_BASE_DESTRUCTOR_P): Likewise.
19422 (DECL_DELETING_DESTRUCTOR_P): Likewise.
19423 (get_vtbl_decl_for_binfo): Fix formatting.
19424 (in_charge_arg_for_name): New macro.
19425 (maybe_build_cleanup_and_delete): Remove declaration.
19426 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19427 (in_charge_arg_for_name): New function.
19428 (build_new_method_call): Use it. Handle cloned destructors.
19429 (build_clone): Don't make the base constructor virtual.
19430 Automatically defer generated functions.
19431 (clone_function_decl): Handle destructors, too.
19432 (clone_constructors_and_destructors): Likewise.
19433 (create_vtable_ptr): Don't create a vtable entry for a cloned
19434 function.
19435 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19436 (initialize_predefined_identifiers): Update appropriately.
19437 (finish_destructor_body): Simplify.
19438 (maybe_build_cleanup_and_delete): Remove.
19439 * except.c (expand_throw): Handle new-ABI destructors.
19440 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19441 (build_dtor_call): New function.
19442 (build_delete): Use it. Simplify.
19443 * optimize.c (maybe_clone_body): Handle destructors.
19444 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19445
19446 * exception.cc (cleanup_fn): New typedef.
19447 (CALL_CLEANUP): New macro.
19448 (cp_eh_info): Use them.
19449 (__cp_push_exception): Likewise.
19450 (__cp_pop_exception): Likewise.
19451
19452 2000-04-11 Mark Mitchell <mark@codesourcery.com>
19453
19454 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19455 (complete_dtor_identifier): New macro.
19456 (CLASSTYPE_FIRST_CONVERSION): Remove.
19457 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19458 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19459 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19460 (CLASSTYPE_CONSTRUCTORS): Likewise.
19461 (CLASSTYPE_DESTRUCTORS): Likewise.
19462 (lang_decl): Add cloned_function.
19463 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19464 (DECL_BASE_CONSTRUCTOR_P): Likewise.
19465 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19466 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19467 (DECL_CLONED_FUNCTION_P): Likewise.
19468 (DECL_CLONED_FUNCTION): Likewise.
19469 (clone_function_decl): Declare.
19470 (maybe_clone_body): Likewise.
19471 * call.c (build_user_type_conversion_1): Call complete object
19472 constructors in the new ABI.
19473 (build_new_method_call): Don't add in-charge parameters under the
19474 new ABI.
19475 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19476 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19477 CLASSTYPE_DESTRUCTOR_SLOT.
19478 (build_clone): New function.
19479 (clone_function_decl): Likewise.
19480 (clone_constructors_and_destructors): Likewise.
19481 (check_bases_and_members): Use it.
19482 * decl.c (iniitialize_predefined_identifiers): Initialize
19483 complete_dtor_identifier.
19484 (finish_function): Don't add extra code to a clone.
19485 (lang_mark_tree): Mark cloned_function.
19486 * decl2.c (mark_used): Don't bother trying to instantiate things
19487 we synthesized.
19488 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19489 * method.c (set_mangled_name_for_decl): Don't treat clones as
19490 constructors.
19491 (synthesize_method): Sythesize cloned functions, not the clones.
19492 * optimize.c (inline_data): Update comment on ret_label.
19493 (remap_block): Don't assume DECL_INITIAL exists.
19494 (copy_body_r): Allow ret_label to be NULL.
19495 (maybe_clone_body): Define.
19496 * pt.c (tsubst_decl): Handle clones.
19497 (instantiate_clone): New function.
19498 (instantiate_template): Use it.
19499 (set_mangled_name_for_template_decl): Don't treat clones as
19500 constructors.
19501 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19502 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19503 * semantics.c (expand_body): Clone function bodies as necessary.
19504
19505 * optimize.c (remap_decl): Avoid sharing structure for arrays
19506 whose size is only known at run-time.
19507 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19508
19509 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19510 to has_in_charge_parm_p.
19511 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19512 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19513 (DECL_COPY_CONSTRUCTOR_P): New macro.
19514 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19515 (build_user_type_conversion_1): Likewise.
19516 (convert_like_real): Likewise.
19517 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
19518 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19519 (copy_args_p): Likewise.
19520 (grok_ctor_properties): Likewise.
19521 (start_function): Likewise.
19522 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
19523 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19524 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19525 * method.c (do_build_copy_constructor): Use
19526 DECL_HAS_IN_CHARGE_PARM_P.
19527 (synthesize_method): Likewise.
19528 * pt.c (instantiate_template): Remove goto.
19529 * tree.c (build_cplus_method_type): Remove mention of obstacks in
19530 comment.
19531
19532 * cp-tre.h (finish_function): Change prototype.
19533 * decl.c (end_cleanup_fn): Adjust caller.
19534 (finish_function): Take only one parameter.
19535 * decl2.c (finish_objects): Adjust caller.
19536 (finish_static_storage_duration_function): Likewise.
19537 * method.c (emit_thunk): Likewise.
19538 * parse.y: Likewise.
19539 * parse.c: Regenerated.
19540 * pt.c (instantiate_decl): Likewise.
19541 * rtti.c (synthesize_tinfo_fn): Likewise.
19542 * semantics.c (expand_body): Likewise.
19543
19544 * cp-tree.h (copy_decl): New function.
19545 * class.c (finish_struct_1): Use it.
19546 * lex.c (copy_decl): Define it.
19547 * pt.c (tsubst_decl): Likewise.
19548 * tree.c (copy_template_template_parm): Likewise.
19549
19550 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19551 has_nonpublic_assign_ref.
19552 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19553 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19554 * class.c (finish_struct_methods): Don't set
19555 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19556 (interface_only): Don't declare.
19557 (interface_unknown): Likewise.
19558
19559 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19560
19561 * tree.h (HAVE_TEMPLATES): Remove definition.
19562 * lang-options.h (-fthis-is-variable): Remove documentation.
19563
19564 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
19565
19566 * class.c (instantiate_type): Handle object-relative template-id.
19567
19568 * semantics.c (finish_expr_stmt): Call convert_to_void here.
19569 * decl.c (cplus_expand_expr_stmt): Not here.
19570
19571 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19572 Initialize exprtype earlier.
19573
19574 * parse.y (fn.def1): Check for defining types in return types.
19575
19576 * decl.c (check_tag_decl): Notice extra fundamental types.
19577 Diagnose empty decls in classes, too.
19578
19579 * decl.c (grokdeclarator): Don't override an anonymous name if no
19580 declarator was given.
19581
19582 * cvt.c (convert_to_void): Call resolve_offset_ref.
19583
19584 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19585
19586 * decl2.c (decl_namespace): Handle getting a type.
19587
19588 * typeck.c (build_c_cast): Re-enable warning for cast between
19589 pointer and integer of different size.
19590
19591 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
19592
19593 * inc/cxxabi.h (__pointer_type_info): Add restrict and
19594 incomplete flags.
19595 (__pointer_type_info::__pointer_catch): New virtual function.
19596 (__pointer_to_member_type_info): Derive from
19597 __pointer_type_info. Adjust.
19598 (__pointer_to_member_type_info::__do_catch): Remove.
19599 (__pointer_to_member_type_info::__is_pointer_p): Declare.
19600 (__pointer_to_member_type_info::__pointer_catch): Declare.
19601 * rtti.c (qualifier_flags): Add restrict flag.
19602 (ptmd_initializer): Reorder members.
19603 (create_tinfo_types): Expand comments. Reorder
19604 ptmd_desc_type_node members.
19605 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19606 Implement.
19607 (__pointer_type_info::__do_catch): Move specific code into
19608 __pointer_catch. Call it.
19609 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19610 specific catch checking. Fix void conversion check.
19611 (__pointer_to_member_type_info::__do_catch): Remove.
19612 (__pointer_to_member_type_info::__pointer_catch): Implement.
19613
19614 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19615
19616 * lex.c (init_parse): Remove traces of classof and headof.
19617 * decl2.c (flag_operator_names): Default to 1.
19618 (lang_decode_option): Do not set it for -ansi.
19619
19620 2000-04-09 Mark Mitchell <mark@codesourcery.com>
19621
19622 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19623 (DECL_MAIN_VARIANT): Remove.
19624 * decl.c (duplicate_decls): Don't set it.
19625 (start_function): Likewise.
19626 (lang_mark_tree): Don't mark it.
19627 * decl2.c (defer_fn): Don't use it.
19628 * lex.c (retrofit_lang_decl): Don't set it.
19629 * pt.c (tsubst_decl): Likewise.
19630 * ptree.c (print_lang_decl): Don't print it.
19631 * typeck.c (mark_addressable): Don't use it.
19632
19633 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19634
19635 * vec.cc: Include <new> and <exception>.
19636 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19637 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19638 terminate.
19639 (__cxa_vec_delete): Catch dtor exceptions.
19640
19641 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19642
19643 Prepend __ to implementation defined names.
19644 * inc/typeinfo (type_info): Rename _name to __name.
19645 (type_info::type_info): Rename parameter.
19646 (type_info::operator==, type_info::operator!=,
19647 type_info::before): Likewise.
19648 (type_info::is_pointer_p, type_info::is_function_p,
19649 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19650 parameters.
19651 * inc/cxxabi.h
19652 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19653 (__pointer_type_info::__pointer_type_info): Likewise.
19654 (__pointer_type_info::is_pointer_p,
19655 __pointer_type_info::do_catch): Prepend __. Rename parameters.
19656 (__array_type_info::__array_type_info): Rename parameters.
19657 (__function_type_info::__function_type_info): Likewise.
19658 (__function_type_info::is_function_p): Prepend __.
19659 (__enum_type_info::__enum_type_info): Rename parameters.
19660 (__pointer_to_member_type_info::__pointer_to_member_type_info):
19661 Likewise.
19662 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19663 parameters.
19664 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19665 (__class_type_info::__class_type_info): Rename parameters.
19666 (__class_type_info::sub_kind): Prepend __. Adjust member names.
19667 (__class_type_info::upcast_result,
19668 __class_type_info::dyncast_result): Prepend __. Move definition
19669 into tinfo.cc.
19670 (__class_type_info::do_upcast, __class_type_info::do_catch,
19671 __class_type_info::find_public_src,
19672 __class_type_info::do_dyncast,
19673 __class_type_info::do_find_public_src): Prepend __. Rename
19674 parameters.
19675 (__si_class_type_info::__si_class_type_info): Rename parameters.
19676 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19677 __si_class_type_info::do_find_public_src): Prepent __. Rename
19678 parameters.
19679 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19680 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19681 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19682 parameters.
19683 (__dynamic_cast): Rename parameters.
19684 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19685 type_info::do_catch, type_info::do_upcast): Prepend __.
19686 (contained_p, public_p, virtual_p, contained_public_p,
19687 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19688 (__class_type_info::do_catch,
19689 __class_type_info::do_upcast): Prepend __. Adjust.
19690 (__class_type_info::__upcast_result,
19691 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19692 Adjust.
19693 (__class_type_info::find_public_src): Prepend __. Adjust.
19694 (__class_type_info::do_find_public_src,
19695 __si_class_type_info::do_find_public_src,
19696 __vmi_class_type_info::do_find_public_src): Likewise.
19697 (__class_type_info::do_dyncast,
19698 __si_class_type_info::do_dyncast,
19699 __vmi_class_type_info::do_dyncast): Likewise.
19700 (__class_type_info::do_upcast,
19701 __si_class_type_info::do_upcast,
19702 __vmi_class_type_info::do_upcast): Likewise.
19703 (__dynamic_cast): Adjust.
19704 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19705 (__function_type_info::is_function_p): Likewise.
19706 (__pointer_type_info::do_catch): Likewise. Adjust.
19707 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19708 (__throw_type_match_rtti_2): Adjust.
19709 (__is_pointer): Adjust.
19710
19711 2000-04-08 Mark Mitchell <mark@codesourcery.com>
19712
19713 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19714 (complete_ctor_identifier): New macro.
19715 (special_function_kind): Add sfk_copy_constructor and
19716 sfk_assignment_operator.
19717 (LOOKUP_HAS_IN_CHARGE): Remove.
19718 (cons_up_default_function): Rename to ...
19719 (implicitly_declare_fn): ... this.
19720 * call.c (build_new_method_call): Add in-charge parameters for
19721 constructors here.
19722 * class.c (add_implicitly_declared_members): Change parameter name
19723 from cant_have_assignment to cant_have_const_assignment.
19724 Replace calls to cons_up_default_function to implicitly_declare_fn.
19725 * cvt.c (ocp_convert): Use complete_ctor_identifier.
19726 * decl.c (initialize_predefined_identifiers): Initialize it.
19727 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19728 complex expression.
19729 * init.c (expand_default_init): Don't calculate the in-charge
19730 parameter here.
19731 (build_new_1): Likewise.
19732 * lex.c (cons_up_default_function): Move to method.c.
19733 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19734 (implicitly_declare_fn): New function.
19735 * typeck.c (build_static_cast): Use complete_ctor_identifier.
19736 (build_modify_expr): Likewise.
19737 * typeck2.c (build_functional_cast): Likewise.
19738
19739 Under the new ABI, constructors don't return `this'.
19740 * cp-tree.h (warn_reorder): Declare.
19741 (special_function_kind): New enum.
19742 (global_base_init_list): Remove declaration.
19743 (emit_base_init): Don't return a value.
19744 (check_base_init): Don't declare.
19745 (is_aggr_typedef): Likewise.
19746 * decl.c (check_special_function_return_type): New function.
19747 (return_types): Remove.
19748 (grokdeclarator): Use check_special_function_return_type.
19749 (start_function): Don't initialize ctor_label under the new ABI.
19750 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19751 * init.c (begin_init_stmts): Move to top of file.
19752 (finish_init_stmts): Likewise.
19753 (warn_reorder): Don't declare.
19754 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
19755 value.
19756 (check_base_init): Remove.
19757 (is_aggr_typedef): Likewise.
19758 (build_new_1): Don't use the return value of a constructor.
19759 * semantics.c (setup_vtbl_ptr): Don't use the return value
19760 of emit_base_init.
19761 * typeck.c (check_return_expr): Don't magically convert return
19762 statements into `return this' in constructors under the new ABI.
19763
19764 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19765 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19766 (base_ctor_identifier): New macro.
19767 (base_dtor_identifier): Likewise.
19768 (deleting_dtor_identifier): Likewise.
19769 * decl.c: Don't include obstack.h.
19770 (obstack_chunk_alloc): Don't define.
19771 (obstack_chunk_free): Likewise.
19772 (struct predefined_identifier): New type.
19773 (initialize_predefined_identifiers): New function.
19774 (init_decl_processing): Use it.
19775 (debug_temp_inits): Remove.
19776 (start_method): Don't call preserve_data.
19777 (hack_incomplete_structures): Update comment.
19778 * init.c (init_init_processing): Don't initialize
19779 nelts_identifier.
19780 (build_offset_rf): Remove dead code.
19781 (build_delete): Use CLASSTYPE_N_BASECLASSES.
19782 * search.c (init_search_processing): Don't initialize
19783 vptr_identifier.
19784
19785 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19786
19787 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19788 some sign_compare warnings.
19789
19790 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19791
19792 Rename abi::__vmi_class_type_info members.
19793 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19794 base_list, detail_masks members to vmi_flags, vmi_base_count,
19795 vmi_bases and vmi_flags_masks respectively.
19796 (__vmi_class_type_info::vmi_flags_masks): Rename
19797 details_unknown_mask to flags_unknown_mask.
19798 * tinfo.cc (__class_type_info::do_upcast): Adjust.
19799 (__vmi_class_type_info::do_find_public_src): Adjust.
19800 (__vmi_class_type_info::do_dyncast): Adjust.
19801 (__vmi_class_type_info::do_upcast): Adjust.
19802
19803 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19804
19805 * tinfo.cc (convert_to_base): New function.
19806 (get_vbase_offset): Remove. Move into convert_to_base.
19807 (__vmi_class_type_info::do_find_public_src): Adjust.
19808 (__vmi_class_type_info::do_dyncast): Adjust.
19809 (__vmi_class_type_info::do_upcast): Adjust.
19810
19811 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
19812
19813 * tinfo.cc (operator=): Use __builtin_strcmp.
19814 * tinfo2.cc (before): Likewise.
19815
19816 2000-04-06 Mark Mitchell <mark@codesourcery.com>
19817
19818 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19819 (DECL_SAVED_INLINE): Rename to ...
19820 (DECL_DEFERRED_FN): ... this.
19821 (in_function_p): Remove declaration.
19822 (mark_inline_for_output): Rename to ...
19823 (defer_fn): ... this.
19824 * decl.c (finish_function): Adjust call to mark_inline_for_output.
19825 (in_function_p): Remove definition.
19826 * decl2.c (saved_inlines): Rename to ...
19827 (deferred_fns): ... this.
19828 (saved_inlines_used): Rename to ...
19829 (deferred_fns_used): ... this.
19830 (mark_inline_for_output): Rename to ...
19831 (defer_fn): ... this.
19832 (finish_file): Adjust accordingly.
19833 (init_decl2): Likewise.
19834 * lex.c (cons_up_default_function): Likewise.
19835 * pt.c (mark_decl_instantiated): Likewise.
19836 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19837 circumstances.
19838 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19839 * semantics.c (expand_body): Defer more functions.
19840
19841 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19842
19843 * vec.cc: New file.
19844 * Make-lang.in (CXX_LIB2FUNCS): Add it.
19845 (vec.o): Build it.
19846 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19847 __cxa_vec_delete): Declare.
19848
19849 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19850
19851 * rtti.c (dfs_class_hint_mark): New static function.
19852 (dfs_class_hint_unmark): New static function.
19853 (class_hint_flags): Use them.
19854
19855 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
19856
19857 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19858
19859 2000-04-05 Mark Mitchell <mark@codesourcery.com>
19860
19861 * cp-tree.h (instantiate_decl): Change prototype.
19862 * decl2.c (mark_used): Adjust call.
19863 * optimize.c (inlinable_function_p): Adjust handling of templates.
19864 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19865 (do_type_instantiation): Likewise.
19866 (instantiate_decl): Defer more templates.
19867 (instantiate_pending_templates): Adjust logic to handle inline
19868 friend functions.
19869
19870 * Makefile.in (GGC_H): New variable. Use it throughout in place
19871 of ggc.h.
19872
19873 * call.c: Don't include obstack.h. Include ggc.h.
19874 (obstack_chunk_alloc): Don't define.
19875 (obstack_chunk_free): Likewise.
19876 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19877 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19878 (pop_switch): Free it.
19879
19880 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19881
19882 * dump.c (dequeue_and_dump): Don't try to print the bit_position
19883 if we don't have a DECL_FIELD_OFFSET.
19884
19885 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
19886
19887 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19888 special_function_p.
19889
19890 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19891
19892 * cfns.gperf (hash, libc_name_p): Prototype.
19893
19894 * rtti.c (build_dynamic_cast_1): Constification.
19895
19896 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19897
19898 * semantics.c (deferred_type_access_control): Prototype.
19899
19900 2000-04-04 Mark Mitchell <mark@codesourcery.com>
19901
19902 Correct many new ABI issues regarding vbase and vcall offset
19903 layout.
19904 * cp-tree.h (BINFO_VTABLE): Document.
19905 (struct lang_type): Tweak formatting.
19906 (BINFO_PRIMARY_BINFO): Add to documentation.
19907 (CLASSTYPE_VSIZE): Fix typo in comment.
19908 (CLASSTYPE_VBASECLASSES): Update documentation.
19909 (BINFO_VBASE_MARKED): Remove.
19910 (SET_BINFO_VBASE_MARKED): Likewise.
19911 (CLEAR_BINFO_VBASE_MARKED): Likewise.
19912 (BINFO_FIELDS_MARKED): Remove.
19913 (SET_BINFO_FIELDS_MARKED): Likewise.
19914 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19915 (enum access_kind): New enumeration.
19916 (num_extra_vtbl_entries): Remove declaration.
19917 (size_extra_vtbl_entries): Likewise.
19918 (get_vtbl_decl_for_binfo): New function.
19919 (dfs_vbase_unmark): Remove declaration.
19920 (mark_primary_bases): Likewise.
19921 * class.c (SAME_FN): Remove.
19922 (struct vcall_offset_data_s): Move definition.
19923 (build_vbase_pointer): Use `build', not `build_binary_op', to
19924 access the vbase pointer under the new ABI.
19925 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19926 (build_primary_vtable): Likewise.
19927 (dfs_mark_primary_bases): Move here from search.c.
19928 (mark_primary_bases): Likewise.
19929 (determine_primary_bases): Under the new ABI, don't make a base
19930 class a primary base just because we don't yet have any virtual
19931 functions.
19932 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19933 (num_vfun_entries): Remove.
19934 (dfs_count_virtuals): Likewise.
19935 (num_extra_vtbl_entries): Likewise.
19936 (size_extra_vtbl_entries): Likewise.
19937 (layout_virtual_bases): Iterate in inheritance graph order under
19938 the new ABI.
19939 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19940 indicate that a vfield is present.
19941 (init_class_processing): Initialize access_public_node, etc., from
19942 ak_public, etc.
19943 (get_vtbl_decl_for_binfo): New function.
19944 (dump_class_hierarchy_r): Likewise.
19945 (dump_class_hierarchy): Use it.
19946 (finish_vtbls): Build the vtbls in inheritance graph order.
19947 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19948 (initialize_vtable): Use get_vtbl_decl_for_binfo.
19949 (accumulate_vtbl_inits): Add comments explaining why a pre-order
19950 walk is required.
19951 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19952 where the vptr points, even for primary vtables.
19953 (build_vtbl_initializer): Adjust handling of vbase and vcall
19954 offsets.
19955 (build_vcall_and_vbase_vtable_entries): New function.
19956 (dfs_build_vbase_offset_vtbl_entries): Remove.
19957 (build_vbase_offset_vtbl_entries): Reimplement.
19958 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19959 were already handled in a primary base class vtable.
19960 (build_vcall_offset_vtbl_entries): Adjust.
19961 (build_rtti_vtbl_entries): Adjust.
19962 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19963 * init.c (expand_virtual_init): Simplify.
19964 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19965 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19966 * search.c (BINFO_ACCESS): New macro.
19967 (SET_BINFO_ACCESS): Likewise.
19968 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19969 (access_in_type): Likewise.
19970 (dfs_accessible_p): Likewise.
19971 (protected_accessible_p): Likewise.
19972 (lookup_fnfields_1): Adjust documentation.
19973 (dfs_mark_primary_bases): Move to class.c
19974 (mark_primary_bases): Likewise.
19975 (dfs_vbase_unmark): Remove.
19976 (virtual_context): Use BINFO_FOR_VBASE.
19977 (dfs_get_vbase_types): Simplify.
19978 (dfs_build_inheritance_graph_order): New function.
19979 (get_vbase_types): Use it.
19980 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19981
19982 * tinfo.cc (get_vbase_offset): New function.
19983 (__vmi_class_type_info::do_find_public_src): Use it.
19984 (__vmi_class_type_info::do_dyncast): Likewise.
19985 (__vmi_class_type_info::do_upcast): Likewise.
19986
19987 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
19988
19989 * lang-specs.h: Pass -fno-show-column to the preprocessor.
19990
19991 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
19992
19993 * rtti.c (class_hint_flags): Rename flags.
19994 (class_initializer): Remove flags.
19995 (synthesize_tinfo_var): Combine offset and flags. Add flags
19996 for __vmi_class_type_info.
19997 (create_tinfo_types): Remove flags from __class_type_info and
19998 __si_class_type_info. Merge flags and offset from
19999 base_class_type_info.
20000 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
20001 (__base_class_info::is_virtual_p): Adjust.
20002 (__base_class_info::is_public_p): Adjust.
20003 (__base_class_info::offset): New accessor.
20004 (__class_type_info::details): Remove member.
20005 (__class_type_info::__class_type_info): Lose details.
20006 (__class_type_info::detail_masks): Remove.
20007 (__si_class_type_info::__si_class_type_info): Lose details.
20008 (__vmi_class_type_info::details): New member.
20009 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
20010 (__vmi_class_type_info::detail_masks): New member.
20011 * tinfo.cc (__class_type_info::do_upcast): Initialize result
20012 with unknown_details_mask.
20013 (__vmi_class_type_info::do_find_public_src): Adjust
20014 (__vmi_class_type_info::do_dyncast): Adjust.
20015 (__vmi_class_type_info::do_upcast): Set result details, if
20016 needed. Adjust.
20017 (__dynamic_cast): Temporarily #if out optimization.
20018
20019 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
20020
20021 * rtti.c (get_tinfo_decl): Mark used.
20022 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
20023 mark as dealt with, if we output it.
20024
20025 2000-03-28 Mark Mitchell <mark@codesourcery.com>
20026
20027 * class.c: Reorganize to put virtual function table initialization
20028 machinery at the end of the file.
20029
20030 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
20031
20032 * class.c (finish_struct): Use bitsize_zero_node.
20033 * pt.c (instantiate_class_template): Likewise.
20034
20035 2000-03-28 Mark Mitchell <mark@codesourcery.com>
20036
20037 Put RTTI entries at negative offsets in new ABI.
20038 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
20039 vbase offset at index -3, not -1.
20040 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
20041 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
20042 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
20043 (build_rtti_vtbl_entries): New function.
20044 (set_rtti_entry): Remove.
20045 (build_primary_vtable): Don't use it.
20046 (build_secondary_vtable): Likewise.
20047 (start_vtable): Remove.
20048 (first_vfun_index): New function.
20049 (set_vindex): Likewise.
20050 (add_virtual_function): Don't call start_vtable. Do call
20051 set_vindex.
20052 (set_primary_base): Rename parameter.
20053 (determine_primary_base): Likewise.
20054 (num_vfun_entries): Don't use skip_rtti_stuff.
20055 (num_extra_vtbl_entries): Include RTTI information.
20056 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
20057 (skip_rtti_stuff): Remove.
20058 (dfs_modify_vtables): Don't use it.
20059 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
20060 (layout_nonempty_base_or_field): Update size handling.
20061 (create_vtable_ptr): Tweak.
20062 (layout_class_type): Adjust parameter names.
20063 (finish_struct_1): Simplify.
20064 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
20065 (skip_rtti_stuff): Remove.
20066 (first_vfun_index): New function.
20067 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
20068 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
20069 (marked_vtable_pathp): Declare.
20070 (unmarked_vtable_pathp): Likewise.
20071 * error.c (dump_expr): Use first_vfun_index to calculate vtable
20072 offsets.
20073 * rtti.c (build_headof): Look for RTTI at negative offsets.
20074 (get_tinfo_decl_dynamic): Likewise.
20075 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
20076 here.
20077 (create_pseudo_type_info): Do it here instead. Adjust so that
20078 vptr points at first virtual function.
20079 * search.c (marked_vtable_pathp): Make it global.
20080 (unmarked_vtable_pathp): Likewise.
20081 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
20082 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20083 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
20084 (get_pure_virtuals): Likewise.
20085 (expand_upcast_fixups): Likewise.
20086 * tree.c (debug_binfo): Likewise.
20087 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
20088 negative offset.
20089
20090 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20091
20092 * class.c (check_field_decl): Fix typo.
20093 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
20094 (check_methods): Likewise.
20095 (check_field_decls): Likewise.
20096 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
20097 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
20098 Use DECL_RESULT_FLD, not DECL_RESULT.
20099 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
20100 * lex.c (identifier_type): Likewise.
20101 * pt.c (determine_specialization, lookup_template_class): Likewise.
20102 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
20103 (resolve_overloaded_unification, more_specialized): Likewise.
20104 * semantics.c (finish_member_declaration): Likewise.
20105 * typeck.c (build_x_function_call): Likewise.
20106
20107 2000-03-26 Mark Mitchell <mark@codesourcery.com>
20108
20109 * class.c (layout_empty_base): Handle empty bases with non-byte
20110 alignment.
20111 (build_base_field): Likewise.
20112 (layout_virtual_bases): Likewise.
20113
20114 * class.c (finish_struct_1): Fix typo in this change:
20115
20116 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20117
20118 2000-03-25 Mark Mitchell <mark@codesourcery.com>
20119
20120 * decl.c (grokdeclarator): Count partial specializations when
20121 keeping track of how many template classes have been seen.
20122
20123 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
20124
20125 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20126
20127 * class.c (build_vbase_pointer_fields): layout_field now place_field.
20128 (get_vfield_offset): Use byte_position.
20129 (set_rtti_entry): Set OFFSET to ssizetype zero.
20130 (get_binfo_offset_as_int): Deleted.
20131 (dfs_record_base_offsets): Use tree_low_cst.
20132 (dfs_search_base_offsets): Likewise.
20133 (layout_nonempty_base_or_field): Reflect changes in RLI format
20134 and call byte_position.
20135 (layout_empty_base): Convert offset to ssizetype.
20136 (build_base_field): use rli_size_unit_so_far.
20137 (dfs_propagate_binfo_offsets): Do computation in proper type.
20138 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
20139 (layout_class_type): Reflect changes in RLI names and fields.
20140 (finish_struct_1): Set DECL_FIELD_OFFSET.
20141 * dump.c (dequeue_and_dump): Call bit_position.
20142 * expr.c (cplus_expand_constant): Use byte_position.
20143 * rtti.c (expand_class_desc): Use bitsize_one_node.
20144 * typeck.c (build_component_addr): Use byte_position and don't
20145 special case for zero offset.
20146
20147 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
20148
20149 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
20150
20151 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
20152 tinfo object.
20153 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
20154 vtable.
20155
20156 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20157
20158 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
20159 DECL_P macros.
20160 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
20161 make_typename_type, check_initializer, cp_finish_decl,
20162 xref_tag): Likewise.
20163 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
20164 decl_namespace, arg_assoc_template_arg, arg_assoc,
20165 validate_nonmember_using_decl, do_class_using_decl): Likewise.
20166 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
20167 args_to_string): Likewise.
20168 * friend.c (is_friend): Likewise.
20169 * lex.c (note_got_semicolon, note_list_got_semicolon,
20170 is_global): Likewise.
20171 * method.c (build_overload_nested_name, build_overload_value,
20172 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
20173 * parse.y (typename_sub, typename_sub1): Likewise.
20174 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
20175 process_partial_specialization, convert_template_argument,
20176 template_args_equal, add_pending_template, lookup_template_class,
20177 for_each_template_parm_r, maybe_fold_nontype_arg,
20178 tsubst, instantiate_template, type_unification_real, unify,
20179 instantiate_pending_templates, set_mangled_name_for_template_decl):
20180 Likewise.
20181 * repo.c (repo_get_id, repo_template_used): Likewise.
20182 * search.c (lookup_field_1): Likewise.
20183 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
20184 * xref.c (classname): Likewise.
20185
20186 2000-03-22 Mark Mitchell <mark@codesourcery.com>
20187
20188 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
20189 (CANONICAL_BINFO): New macro.
20190 (BINFO_NEW_VTABLE_MARKED): Use it.
20191 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
20192 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
20193 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
20194 not TREE_TYPE.
20195 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20196 (build_secondary_vtable): Likewise.
20197 (dfs_finish_vtbls): Likewise.
20198 (dfs_accumulate_vtbl_inits): Likewise.
20199 (accumulate_vtbl_inits): New function.
20200 (finish_vtbls): Make sure that virtual bases come after
20201 non-virtual bases in the vtable group.
20202 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
20203 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20204 * search.c (struct vbase_info): Move definition.
20205 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20206 (unmarked_new_vtable_p): Likewise.
20207 (dfs_mark_vtable_path): Remove.
20208 (dfs_mark_new_vtable): Remove.
20209 (dfs_unmark_new_vtable): Likewise.
20210 (dfs_clear_search_slot): Likewise.
20211 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20212 (dfs_clear_vbase_slots): Likewise.
20213 (init_vbase_pointers): LIkewise.
20214
20215 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
20216
20217 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20218 SIZETYPE to a non-SIZETYPE.
20219
20220 2000-03-21 Mark Mitchell <mark@codesourcery.com>
20221
20222 * class.c (layout_virtual_bases): Adjust names in conditionally
20223 compiled code.
20224
20225 * class.c (record_base_offsets): New function.
20226 (layout_conflict_p): Likewise.
20227 (layout_nonempty_base_or_field): Use it.
20228 (layout_empty_base): New function.
20229 (build_base_field): Use it.
20230 (build_base_fields): Update comment.
20231 (layout_virtual_bases): Fold in a little code form
20232 layout_basetypes. Use layout_empty_base.
20233 (layout_basetypes): Remove.
20234 (end_of_class): New function.
20235 (layout_class_type): Use it. Adjust.
20236
20237 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20238 (fntype_p): Remove.
20239 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20240 comment.
20241 (dfs_skip_nonprimary_vbases_markedp): Likewise.
20242 * typeck.c (fntype_p): Remove.
20243
20244 * cp-tree.h (TI_SPEC_INFO): Remove.
20245 (CLASSTYPE_TI_SPEC_INFO): Likewise.
20246 * pt.c (process_partial_specialization): Likewise.
20247
20248 * class.c (build_base_field): Fix thinko in computation of binfo
20249 offsets.
20250
20251 * tree.c (mark_local_for_remap_p): Mark variables declared in
20252 TARGET_EXPRs as well.
20253
20254 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20255
20256 * typeck.c (require_complete_type, complete_type,
20257 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20258 build_array_ref, convert_arguments, pointer_diff,
20259 build_x_unary_op, build_unary_op, build_c_cast,
20260 build_modify_expr): Use COMPLETE_TYPE_P etc.
20261 * call.c (is_complete, convert_like_real,
20262 build_new_method_call): Likewise.
20263 * class.c (build_vbase_pointer_fields, check_bases,
20264 build_base_field, finish_struct_1, pushclass): Likewise.
20265 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20266 * decl.c (maybe_process_template_type_declaration, pushtag,
20267 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20268 layout_var_decl, check_initializer, cp_finish_decl,
20269 grokdeclarator, require_complete_types_for_parms,
20270 grok_op_properties, xref_tag, xref_basetypes,
20271 check_function_type): Likewise.
20272 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20273 * friend.c (do_friend): Likewise.
20274 * init.c (build_offset_ref): Likewise.
20275 * parse.y (structsp): Likewise.
20276 * pt.c (maybe_process_partial_specialization,
20277 tsubst_friend_function, instantiate_class_template, tsubst,
20278 do_type_instantiation, instantiate_pending_templates): Likewise.
20279 * repo.c (repo_get_id): Likewise.
20280 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20281 synthesize_tinfo_var, emit_support_tinfos): Likewise.
20282 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20283 * semantics.c (begin_class_definition): Likewise.
20284 * tree.c (build_cplus_method_type): Likewise.
20285 * typeck2.c (digest_init, build_functional_cast,
20286 add_exception_specifier): Likewise.
20287 * parse.h, parse.c: Regenerated.
20288
20289 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20290
20291 * inc/cxxabi.h: New header file. Define new-abi entry points.
20292 (__pointer_type_info::target): Rename member to ...
20293 (__pointer_type_info::type): ... here.
20294 (__base_class_info::type): Rename member to ...
20295 (__base_class_info::base): ... here.
20296 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20297 * cp-tree.h (CPTI_ABI): New global tree enumeration.
20298 (abi_node): New global tree node.
20299 * decl.c (abi_node): Document.
20300 (init_decl_processing): Initialize abi_node.
20301 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20302 (get_vmi_pseudo_type_info): Likewise.
20303 (create_tinfo_types): Likewise.
20304 (emit_support_tinfos): Likewise.
20305 * tinfo.h (cxxabi.h): Include for new-abi.
20306 Move rtti class definitions to new header file.
20307 * tinfo.cc (abi): Use the namespace.
20308 (std): Move new abi rtti classes from here ...
20309 (__cxxabiv1): ... to here.
20310 * tinfo2.cc (cxxabi.h): Include for new-abi.
20311 Move rtti class definitions to new header file.
20312 (std): Move new abi rtti classes from here ...
20313 (__cxxabiv1): ... to here.
20314 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20315 namespace.
20316
20317 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20318 Jason Merrill <jason@casey.cygnus.com>
20319
20320 * method.c (build_overload_int): Use host_integerp.
20321
20322 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20323
20324 * init.c (build_offset_ref): Handle the case of a templated member
20325 function.
20326
20327 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20328
20329 * except.c (expand_exception_blocks): Clear catch_clauses_last.
20330
20331 2000-03-18 Mark Mitchell <mark@codesourcery.com>
20332
20333 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20334 * class.c (check_bitfield_decl): Turn illegal bitfields into
20335 non-bitfields.
20336 (dfs_propagate_binfo_offsets): Adjust for new size_binop
20337 semantics.
20338 (dfs_offset_for_unshared_vbases): Likewise.
20339 * cvt.c (cp_convert_to_pointer): Convert NULL to a
20340 pointer-to-member correctly under the new ABI.
20341 * expr.c (cplus_expand_constant): Don't use cp_convert when
20342 turning an offset into a pointer-to-member.
20343 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20344 when dereferencing them under the new ABI.
20345 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20346 of pointers-to-members under the new ABI.
20347
20348 * class.c (check_bitfield_decl): Remove restriction on really long
20349 bitfields.
20350 (layout_class_type): Implement new ABI handling of bitfields
20351 longer than their types.
20352
20353 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20354
20355 * parse.y (extdefs): Call ggc_collect.
20356 * parse.c: Regenerated.
20357
20358 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
20359
20360 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20361 (note_name_declared_in_class): Use OVL_CURRENT to get at a
20362 potential overload.
20363
20364 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20365
20366 * class.c (build_vbase_path): Use integer_zerop.
20367 (build_vtable_entry): Use tree_low_cst.
20368 (get_vfield_offset): Use bit_position.
20369 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20370 Use tree_low_cst.
20371 (check_bitfield_decl): Set DECL_SIZE using convert.
20372 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20373 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20374 Use tree_low_cst.
20375 (finish_struct_1): Use bit_position.
20376 (dump_class_hierarchy): Use tree_low_cst.
20377 * cp-tree.h (min_precision): Add declaration.
20378 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20379 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20380 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20381 * expr.c (cplus_expand_constant): Use bit_position.
20382 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20383 * rtti.c (get_base_offset): Use bit_position.
20384 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20385 host_integerp, and tree_low_cst.
20386 (pointer_int_sum): Use integer_zerop.
20387 (build_component_addr): Use bit_position.
20388
20389 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
20390
20391 * typeck.c (require_complete_type): Don't assume size_zero_node.
20392 (complete_type_or_else): Likewise.
20393
20394 2000-03-16 Steven Grady <grady@digitaldeck.com>
20395 Jason Merrill <jason@casey.cygnus.com>
20396
20397 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20398
20399 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
20400
20401 * decl2.c (grokfield): Bail out if type is error_mark_node.
20402
20403 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20404
20405 * tinfo2.cc (__ptr_to_member_data): Rename to ...
20406 (__pointer_to_member_data): ... here. Adjust.
20407 * rtti.c (create_tinfo_types): Adjust.
20408
20409 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20410
20411 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20412 * decl.c (ref_desc_type_node): Undocument.
20413 * rtti.c (ptr_ref_initializer): Rename to ...
20414 (ptr_initializer): ... here. Adjust comments.
20415 (ptmd_initializer): Fix comment thinko.
20416 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20417 (create_tinfo_types): Remove ref_desc_type_node init.
20418 * tinfo2.cc (__reference_type_info): Remove.
20419
20420 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20421
20422 * decl.c (cp_finish_decl): Remove obsolete comment.
20423
20424 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20425
20426 2000-03-14 Mark Mitchell <mark@codesourcery.com>
20427
20428 * cp-tree.h: Tweak documentation.
20429 * class.c (build_vbase_pointer_fields): Layout the fields, too.
20430 (avoid_overlap): Remove.
20431 (get_binfo_offset_as_int): New function.
20432 (dfs_serach_base_offsets): Likewise.
20433 (layout_nonempty_base_or_field): Likewise.
20434 (build_base_field): Layout fields here. Avoid placing two objects
20435 of the same type at the same address, under the new ABI.
20436 (build_base_fields): Adjust accordingly.
20437 (create_vtable_ptr): Return the new field, but don't attach it to
20438 TYPE_FIELDS.
20439 (remove_base_field): Remove.
20440 (remove_base_fields): Remove.
20441 (layout_basetypes): Adjust accordingly.
20442 (layout_class_type): Call layout_field for each field, rather than
20443 just making a wholesale call to layout_type.
20444
20445 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
20446
20447 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20448
20449 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
20450
20451 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20452
20453 * except.c (dtor_nothrow): New fn.
20454 (do_pop_exception): Use it. Take type parm.
20455 (push_eh_cleanup): Take type parm.
20456 (expand_start_catch_block): Pass it.
20457 (build_eh_type_type_ref): Accept null type.
20458
20459 2000-03-12 Mark Mitchell <mark@codesourcery.com>
20460
20461 * cp-tree.h (revert_static_member_fn): Change prototype.
20462 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20463 (grok_op_properties): Likewise.
20464 (start_function): Likewise.
20465 (revert_static_member_fn): Simplify.
20466 * pt.c (check_explicit_specialization): Adjust call to
20467 revert_static_member_fn.
20468
20469 2000-03-11 Mark Mitchell <mark@codesourcery.com>
20470
20471 * cp-tree.h (scope_kind): New type.
20472 (tmpl_spec_kind): Likewise.
20473 (declare_pseudo_global_level): Remove.
20474 (pseudo_global_level_p): Rename to template_parm_scope_p.
20475 (pushlevel): Remove declaration.
20476 (begin_scope): New function.
20477 (finish_scope): Likewise.
20478 (current_tmpl_spec_kind): Likewise.
20479 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20480 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
20481 Add template_spec_p.
20482 (toplevel_bindings_p): Adjust.
20483 (declare_pseudo_global_level): Remove.
20484 (pseudo_global_level_p): Rename to template_parm_scope_p.
20485 (current_tmpl_spec_kind): New function.
20486 (begin_scope): Likewise.
20487 (finish_scope): Likewise.
20488 (maybe_push_to_top_level): Adjust.
20489 (maybe_process_template_type_declaration): Likewise.
20490 (pushtag): Likewise.
20491 (pushdecl_nonclass_level): Likewise.
20492 (lookup_tag): Likewise.
20493 (grokfndecl): Handle member template specializations. Share
20494 constructor and non-constructor code.
20495 * decl2.c (check_classfn): Handle member template specializations.
20496 * pt.c (begin_template_parm_list): Use begin_scope.
20497 (begin_specialization): Likewise.
20498 (end_specialization): Likewise.
20499 (check_explicit_specialization): Use current_tmpl_spec_kind.
20500 Handle member template specializations.
20501 (end_template_decl): Use finish_scope. Remove call to
20502 get_pending_sizes.
20503 (push_template_decl_real): Remove bogus error message.
20504 (tsubst_decl): Fix typo in code contained in comment.
20505 (instantiate_template): Handle member template specializations.
20506 (most_general_template): Likewise.
20507
20508 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
20509
20510 * lex.c (whitespace_cr): Compress consecutive calls to warning().
20511 (do_identifier): Ditto for error().
20512
20513 * pt.c (convert_nontype_argument): Ditto for cp_error().
20514 (convert_template_argument): Ditto for cp_pedwarn().
20515
20516 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
20517
20518 * exception.cc (__check_null_eh_spec): New fn.
20519 * except.c (expand_end_eh_spec): Call it if the spec is throw().
20520
20521 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20522
20523 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20524 * except.c (expand_end_eh_spec): Add the return type.
20525 * rtti.c (throw_bad_cast): Add the parmtypes.
20526 (throw_bad_typeid): Likewise.
20527
20528 * semantics.c (expand_stmt): Only leave out rtl for unused
20529 artificials, and set DECL_IGNORED_P on them as well.
20530 * decl.c (wrapup_globals_for_namespace): Likewise.
20531
20532 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
20533
20534 * decl.c (maybe_commonize_var): Skip all artificial decls.
20535 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20536
20537 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20538
20539 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20540 * cp-tree.h: Declare flag_enforce_eh_specs.
20541 * decl.c (store_parm_decls, finish_function): Check it.
20542
20543 C library functions don't throw.
20544 * Makefile.in (cfns.h): New target.
20545 (except.o): Depend on it.
20546 * Make-lang.in (cc1plus): Depend on cfns.gperf.
20547 * cfns.gperf: New file.
20548 * cfns.h: Generated.
20549 * except.c: Include it.
20550 (nothrow_libfn_p): New fn.
20551 * decl.c (grokfndecl): Use it.
20552 * cp-tree.h: Declare it.
20553
20554 * decl.c (push_overloaded_decl_1, auto_function,
20555 define_function): Lose.
20556 (build_library_fn_1): New static fn.
20557 (builtin_function): Use it.
20558 (get_atexit_node): Use build_library_fn_ptr.
20559 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20560 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20561 push_void_library_fn, push_throw_library_fn): New fns.
20562 * cp-tree.h: Declare them.
20563 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20564 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20565 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20566 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20567 * rtti.c (build_runtime_decl): Lose.
20568 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20569 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20570 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20571
20572 * call.c (build_call): Remove result_type parm.
20573 Call mark_used on unused artificial fns.
20574 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20575
20576 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
20577
20578 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20579 appropriate.
20580 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20581 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20582 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20583 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20584 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20585 expand_generic_desc): Likewise.
20586
20587 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20588
20589 * exception.cc (__cp_pop_exception): Cleanup the original object.
20590
20591 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20592
20593 * decl.c (grok_op_properties): Merge conversion to void warning
20594 with other silly op warnings.
20595
20596 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
20597
20598 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20599 array CONSTRUCTOR elements. Don't use expr_tree_cons.
20600
20601 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20602
20603 * decl.c (cp_make_fname_decl): New function.
20604 (wrapup_globals_for_namespace): Don't emit unused static vars.
20605 (init_decl_processing): Remove comment about use of
20606 array_domain_type. Set make_fname_decl.
20607 (cp_finish_decl): Remove __FUNCTION__ nadgering.
20608 * semantics.c (begin_compound_stmt): Remove
20609 current_function_name_declared flagging.
20610 (expand_stmt): Don't emit unused local statics.
20611 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20612 specially.
20613
20614 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20615
20616 * typeck.c (convert_for_assignment): Don't look at array
20617 initializer.
20618 * call.c (convert_like_real): Likewise.
20619
20620 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
20621
20622 Add initial support for '\uNNNN' specifier.
20623 * lex.c (read_ucs): New fn.
20624 (readescape, skip_white_space): Call it.
20625 (is_extended_char, is_extended_char_1): New fns.
20626 (utf8_extend_token): New fn, #if 0'd out.
20627 (real_yylex): Treat extended chars like letters.
20628
20629 * search.c (note_debug_info_needed): Walk the bases even if we
20630 weren't deferring the type itself.
20631
20632 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20633
20634 * decl2.c (finish_objects): Constify a char*.
20635
20636 * method.c (emit_thunk): Likewise.
20637
20638 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
20639
20640 * typeck.c (dubious_conversion_warnings): Look through
20641 REFERENCE_TYPE.
20642
20643 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20644
20645 * class.c (dfs_modify_vtables): I is now unsigned.
20646 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20647 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20648 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20649 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20650 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20651 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20652 Call integer_all_onesp.
20653 * typeck2.c (process_init_constructor): Use compare_tree_int.
20654
20655 * lang-specs.h (as): Don't call if -syntax-only.
20656
20657 2000-03-06 Mark Mitchell <mark@codesourcery.com>
20658
20659 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20660 RTL_EXPR_HAS_NO_SCOPE after all.
20661
20662 2000-03-05 Mark Mitchell <mark@codesourcery.com>
20663
20664 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20665 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
20666 RTL_EXPR_HAS_NO_SCOPE.
20667
20668 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20669 later.
20670
20671 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20672
20673 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
20674
20675 * call.c (convert_like): Macrofy.
20676 (convert_like_with_context): New macro.
20677 (convert_like_real): Renamed from convert_like. Add calling
20678 context parameters, for diagnostics. Add recursive flag. Call
20679 dubious_conversion_warnings for outer conversion.
20680 (build_user_type_conversion): Use convert_like_with_context.
20681 (build_over_call): Likewise. Don't warn about dubious
20682 conversions here. Adjust convert_default_arg calls.
20683 (convert_default_arg): Add context parameters for diagnostics.
20684 Pass through to convert_like_with_context.
20685 * cp-tree.h (convert_default_arg): Add context parameters.
20686 (dubious_conversion_warnings): Prototype new function.
20687 * typeck.c (convert_arguments): Adjust convert_default_arg call.
20688 (dubious_conversion_warnings): New function, broken
20689 out of convert_for_assignment.
20690 (convert_for_assignment): Adjust.
20691
20692 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
20693
20694 * decl2.c (key_method): Break out from...
20695 (import_export_vtable, import_export_class): ...here.
20696
20697 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20698 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20699
20700 * search.c (note_debug_info_needed, dfs_debug_mark,
20701 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
20702 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20703
20704 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
20705
20706 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20707 typos.
20708
20709 2000-03-02 Mark Mitchell <mark@codesourcery.com>
20710
20711 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20712 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20713 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20714 (lang_type): Split gets_new into has_new and has_array_new.
20715 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20716 (TYPE_GETS_NEW): Split into ...
20717 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20718 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20719 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20720 (build_op_new_call): Don't declare.
20721 (build_new_1): Likewise.
20722 * call.c (build_op_new_call): Remove.
20723 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20724 instead of TYPE_NEEDS_DESTRUCTOR.
20725 (finish_struct_bits): Likewise.
20726 (add_implicitly_declared_members): Likewise.
20727 (check_field_decl): Likewise.
20728 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20729 correctly under the new ABI.
20730 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20731 instead of TYPE_NEEDS_DESTRUCTOR.
20732 (initialize_local_var): Likewise.
20733 (destroy_local_var): Likewise.
20734 (cp_finish_decl): Likewise.
20735 (register_dtor_fn): Likewise.
20736 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20737 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
20738 TYPE_VEC_DELETE_TAKES_SIZE here.
20739 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20740 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20741 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20742 (finish_destructor_body): Likewise.
20743 (maybe_build_cleanup_1): Likewise.
20744 * decl2.c (do_static_destruction): Likewise.
20745 * init.c (build_new_1): Make it static.
20746 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20747 (expand_cleanup_for_base): Likewise.
20748 (get_cookie_size): New function.
20749 (build_new_1): Handle array-new cookies correctly under the new
20750 ABI.
20751 (build_vec_delete_1): Likewise.
20752 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20753 (build_delete): Likewise.
20754 (build_vec_delete): Handle array-new cookies correctly under the new
20755 ABI.
20756 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20757 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20758 TYPE_HAS_ARRAY_NEW_OPERATOR.
20759 * ptree.c (print_lang_type): Check them.
20760 * search.c (context_for_name_lookup): Fix typo in comment.
20761 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20762 * tree.c (break_out_cleanups): Likewise.
20763 (build_cplus_array_test_1): Likewise.
20764 (cp_build_qualified_type_real): Likewise.
20765 * typeck.c (complete_type): Likewise.
20766
20767 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20768 the command-line, not the end.
20769
20770 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
20771
20772 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20773
20774 2000-03-02 Tom Tromey <tromey@cygnus.com>
20775
20776 * cp-tree.h (build_java_class_ref): Declare.
20777 * init.c (build_java_class_ref): No longer static.
20778 * except.c (expand_throw): Generate a Java-style `throw' if the
20779 thrown object is a "Java" object.
20780 (initialize_handler_parm): Generate a Java-style lookup of
20781 exception info if the caught object is a "Java" object.
20782 (catch_language, catch_language_init): New globals.
20783 (decl_is_java_type): New function.
20784 (expand_start_catch_block): Don't call push_eh_info() or
20785 push_eh_cleanup() when handling a Java-style "catch". Pass Java
20786 class reference to build_catch_block.
20787
20788 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20789
20790 * typeck.c (comptypes): Treat sizetype like its language equivalent.
20791
20792 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
20793
20794 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20795 to merge reference/pointer code and fix incorrect warnings.
20796
20797 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
20798
20799 * search.c (protected_accessible_p): Use context_for_name_lookup.
20800
20801 * init.c (construct_virtual_bases): Fix thinko.
20802 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20803
20804 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
20805
20806 * decl.c (current_function_decl): Move to toplev.c.
20807
20808 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
20809
20810 * pt.c (fn_type_unification): Unify return type, whenever
20811 provided.
20812 (get_bindings_real): Only pass return type when necessary.
20813 Remove explicit return type check.
20814 * class.c (resolve_address_of_overloaded_function): Pass desired
20815 return type to fn_type_unification.
20816
20817 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20818
20819 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20820 DECL_FIELD_SIZE.
20821 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20822 DECL_FIELD_SIZE.
20823 * rtti.c (expand_class_desc): Likewise.
20824 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20825 (THUNK_VCALL_OFFSET): Likewise.
20826 (THUNK_DELTA): Reflect changes in ../tree.h.
20827
20828 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
20829
20830 * search.c (protected_accessible_p): Also allow the access if
20831 the member is public in DERIVED. Lose TYPE parm.
20832 (friend_accessible_p): Lose TYPE parm.
20833 (accessible_p): Adjust.
20834
20835 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20836
20837 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20838 on things that are not sizes; ssize_binop deleted.
20839 Call size_diffop when appropriate.
20840 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20841 (build_primary_vtable, build_secondary_vtable): Likewise.
20842 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20843 Variable I is HOST_WIDE_INT.
20844 (get_vfield_offset): Pass proper types to size_binop.
20845 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20846 (finish_struct_1): Likewise.
20847 (skip_rtti_stuff): Arg N is now pointer to signed.
20848 (layout_class_type): Use size_zero_node.
20849 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20850 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20851 * decl.c (complete_arry_type): Pass proper types to size_binop.
20852 (xref_basetypes): BINFO_OFFSET is sizetype.
20853 * error.c (dump_expr): Don't use size_binop non-sizes.
20854 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20855 * init.c (construct_virtual_bases): Fix type error.
20856 (build_vec_delete_1): Pass proper type to size_binop and don't
20857 fold result.
20858 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20859 * rtti.c (get_base_offset): Pass proper type to size_binop.
20860 * search.c (dfs_find_vbases): Fix type error.
20861 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20862 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20863 * tree.c (debug_binfo): Variable N is signed.
20864 Use HOST_WIDE_INT_PRINT_DEC.
20865 * typeck.c (comptypes): sizetype is same as equivalent integer type.
20866 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20867 size_one_node and size_zero_node.
20868 (c_alignof): Use size_one_node.
20869 (build_component_addr): Pass proper types to size_binop.
20870 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20871
20872 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
20873
20874 Implement class scope using-declarations for functions.
20875 * class.c (handle_using_decl): Call add_method for used functions.
20876 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20877 (add_method): Used functions are hidden by local functions.
20878 (check_bases_and_members): Handle using-decls before finalizing
20879 CLASSTYPE_METHOD_VEC.
20880 * call.c (add_function_candidate): Add ctype parm; if nonzero,
20881 override the type of 'this' accordingly.
20882 (add_template_candidate, add_template_candidate_real): Add ctype parm.
20883 (convert_class_to_reference, build_user_type_conversion_1,
20884 build_new_function_call, build_object_call, build_new_op,
20885 build_new_method_call): Pass ctype parm.
20886
20887 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20888 the baselink.
20889 * call.c (convert_class_to_reference, build_user_type_conversion_1,
20890 build_new_function_call, build_object_call, build_new_op,
20891 build_new_method_call, build_op_delete_call): Don't get basetype_path
20892 from a baselink.
20893 * typeck.c (build_component_ref): Likewise.
20894 * init.c (build_offset_ref): Likewise.
20895 (resolve_offset_ref): Don't call enforce_access.
20896 Call build_scoped_ref.
20897 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
20898 would cause an error or if -pedantic.
20899 * class.c (alter_access): Lose binfo parm.
20900
20901 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20902
20903 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20904 types.
20905
20906 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
20907
20908 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20909 pseudo_type_info creation into the std namespace
20910
20911 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20912
20913 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20914 (import_export_class): Remove declaration.
20915 * decl2.c (import_export_class): Make it static.
20916 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20917 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20918 EXPR_WITH_FILE_LOCATION.
20919 * lex.c (check_newline): Tweak filename/lineno setting.
20920 * semantics.c (begin_while_stmt): Fix typo in comment.
20921
20922 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20923
20924 * lang-options.h (-fmessage-length=): Add missing option.
20925
20926 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20927
20928 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
20929
20930 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20931
20932 2000-02-25 Jim Wilson <wilson@cygnus.com>
20933
20934 * optimize.c (expand_call_inline): Emit the return label before
20935 evaluating the return value.
20936
20937 2000-02-24 Mark Mitchell <mark@codesourcery.com>
20938
20939 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20940 than duplicating functionality here.
20941 * optimize.c: Include input.h.
20942 (expand_call_inline): Use push_srcloc and pop_srcloc.
20943 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20944 * parse.c: Regenerated.
20945 * Makefile.in (lex.o): Depend on input.h.
20946 (optimize.o): Likewise.
20947
20948 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
20949
20950 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20951 function type, rather than ICE.
20952
20953 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
20954
20955 * decl.c (grokdeclarator): Call decl_type_access_control.
20956 * parse.y (parse_end_decl): Don't call decl_type_access_control if
20957 decl is null.
20958
20959 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
20960
20961 * decl.c (decls_match): Remove obsolete static member nadgering.
20962
20963 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20964
20965 * decl.c (grokdeclarator): Change ANSI to ISO.
20966 * lex.c (consume_string, readescape, do_identifier): Likewise.
20967 (parse_float, real_yylex): Likewise.
20968 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20969 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20970 new_type_id, maybe_label_decls, simple_stmt,
20971 for.init.statement): Likewise.
20972 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20973 * semantics.c (finish_named_return_value): Likewise.
20974 * parse.c: Regenerate.
20975
20976 2000-02-21 Mark Mitchell <mark@codesourcery.com>
20977
20978 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20979 (CPTI_CLASS_STAR_TYPE): Remove.
20980 (vtable_index_type): Likewise.
20981 (class_star_type_node): Remove.
20982 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20983 (build_binary_op_nodefault): Remove.
20984 * call.c (build_new_op): Use build_binary_op instead of
20985 build_binary_op_nodefault.
20986 * decl.c (init_decl_processing): Remove class_star_type_node
20987 initialization. Make delta_type_node ptrdiff_type_node under the
20988 new ABI. Initialize vtable_index_type.
20989 (build_ptrmemfunc_type): Build different structures for the new
20990 ABI.
20991 (build_enumerator): Use build_binary_op instead of
20992 build_binary_op_nodefault.
20993 * method.c (build_overload_value): Mangle pointers-to-members
20994 appropriately under the new ABI.
20995 * typeck.c (build_array_ref): Use build_binary_op instead of
20996 build_binary_op_nodefault.
20997 (get_member_function_from_ptrfunc): Adjust for the new ABI.
20998 (build_binary_op_nodefault): Rename to ...
20999 (build_binary_op): ... this. Remove old version. Adjust for
21000 pointer-to-member comparisons under the new ABI.
21001 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
21002 (build_ptrmemfunc): Adjust for the new ABI.
21003 (expand_ptrmemfunc_cst): Likewise.
21004 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
21005 (pfn_from_ptrmemfunc): Adjust for the new ABI.
21006
21007 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
21008
21009 * call.c (build_object_call): Compress consecutive calls to
21010 cp_error.
21011 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
21012 (build_op_delete_call): Adjust message formatting.
21013
21014 * class.c (check_bases): Compress consecutive calls to
21015 cp_pedwarn.
21016 (finish_struct_anon): Say 'ISO C++'.
21017
21018 * decl.c (start_decl): Same here.
21019 (grok_reference_init): Likewise.
21020 (grokfndecl): Correct message formatting.
21021 (grokfndecl): Improve diagnostic.
21022 (check_static_variable_definition): Likewise. Say 'ISO C++'
21023 (compute_array_index_type): Say 'ISO C++'
21024 (create_array_type_for_decl): Compress consecutive calls to
21025 cp_error.
21026 (grokdeclarator): Say 'ISO C++'
21027 (grok_op_properties): Likewise.
21028
21029 * decl2.c (delete_sanity): Clairify diagnostic.
21030 (check_member_template): Same here.
21031 (grok_function_init): Use consistent terminology.
21032
21033 * expr.c (do_case): Say 'ISO C++'
21034
21035 * friend.c (do_friend): Compress consecutive calls to warning.
21036
21037 2000-02-20 Mark Mitchell <mark@codesourcery.com>
21038
21039 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
21040 * class.c (build_secondary_vtable): Reorganize. Don't create a
21041 new vtable under the new ABI.
21042 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
21043 computing the size.
21044 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
21045 the initializing elements.
21046 (initialize_vtable): New function.
21047 (dfs_finish_vtbls): Use it.
21048 (dfs_accumulate_vtbl_inits): New function.
21049 (finish_vtbls): Merge primary and secondary vtables under the new
21050 ABI.
21051 (finish_struct_1): Remove redundant call to layout_vtable_decl.
21052 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
21053 aren't VAR_DECLs.
21054
21055 * class.c (build_vtable): New function, split out from ...
21056 (get_vtable_decl): ... here, and ...
21057 (build_secondary_vtable): ... here.
21058
21059 * pt.c (tsubst_decl): Fix formatting.
21060
21061 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
21062
21063 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
21064 (avoid_overlap, build_base_field): Likewise.
21065 (build_base_field, build_base_fields, is_empty_class):
21066 Test DECL_SIZE with integer_zero.
21067 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
21068 * cp-tree.h (struct lang_type): New field size_unit.
21069 (CLASSTYPE_SIZE_UNIT): New macro.
21070 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
21071 (cp_finish_decl): Delete -Wlarger-than processing.
21072 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
21073 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
21074 * tree.c (make_binfo): binfo vector is one entry longer.
21075 (walk_tree): Walk DECL_SIZE_UNIT.
21076
21077 2000-02-19 Mark Mitchell <mark@codesourcery.com>
21078
21079 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
21080 comment.
21081 (build_vtable_entry): Don't assume all vtable entries are
21082 functions.
21083 (build_vtbl_initializer): Adjust accordingly.
21084 (get_vtable_decl): Fix formatting.
21085
21086 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
21087
21088 * semantics.c (deferred_type_access_control): Walk the entire
21089 type_lookups list.
21090 (save_type_access_control): Rename from
21091 initial_deferred_type_access_control. Just remember the value.
21092 (decl_type_access_control): New fn.
21093 (begin_function_definition): Use deferred_type_access_control, after
21094 we've started the function. Set type_lookups to error_mark_node.
21095 * parse.y (frob_specs, fn.def1): Adjust.
21096 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
21097 (parse_end_decl, parse_bitfield0, parse_method): New fns.
21098 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
21099 (after_type_component_declarator0): Likewise.
21100 (after_type_component_declarator): Likewise.
21101 (notype_component_declarator): Likewise.
21102 * cp-tree.h: Adjust.
21103
21104 * decl.c (redeclaration_error_message): Allow redeclaration of
21105 namespace-scope decls.
21106
21107 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
21108
21109 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
21110
21111 2000-02-17 Mark Mitchell <mark@codesourcery.com>
21112
21113 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
21114 * decl2.c (grokclassfn): Likewise.
21115
21116 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
21117
21118 * decl2.c (lang_decode_option): Don't set default message length
21119 here.
21120 * lex.c (lang_init_options): Set it here.
21121
21122 2000-02-16 Mark Mitchell <mark@codesourcery.com>
21123
21124 Make DECL_CONTEXT mean the class in which a member function was
21125 declared, even for a virtual function.
21126 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
21127 (DECL_FRIEND_CONTEXT): New macro.
21128 (DECL_REAL_CONTEXT): Remove.
21129 (SET_DECL_FRIEND_CONTEXT): Likewise.
21130 (DECL_VIRTUAL_CONTEXT): Adjust.
21131 (DECL_CLASS_SCOPE_P): Use TYPE_P.
21132 (add_friends): Remove.
21133 (hack_decl_function_context): Likewise.
21134 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
21135 CP_DECL_CONTEXT.
21136 (build_over_call): Fix indentation. Use DECL_CONTEXT
21137 instead of DECL_CLASS_CONTEXT.
21138 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
21139 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21140 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21141 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
21142 (build_base_field): Likewise.
21143 (finish_struct_1): Likewise.
21144 (build_self_reference): Likewise.
21145 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
21146 DECL_REAL_CONTEXT.
21147 (pushtag): Use decl_function_context, not
21148 hack_decl_function_context.
21149 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21150 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
21151 (pushdecl): Remove bogus code.
21152 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
21153 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21154 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21155 Use decl_function_context, nothack_decl_function_context.
21156 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
21157 (grokdeclarator): Likewise. Use decl_function_context, not
21158 hack_decl_function_context.
21159 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
21160 (start_function): Use DECL_FRIEND_CONTEXT, not
21161 DECL_CLASS_CONTEXT. Use decl_function_context, not
21162 hack_decl_function_context.
21163 (finish_function): Use decl_function_context, not
21164 hack_decl_function_context.
21165 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
21166 DECL_CLASS_CONTEXT.
21167 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
21168 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
21169 (grokfield): Likewise.
21170 (finish_builtin_type): Likewise.
21171 (finish_vtable_vardec): Use decl_function_context, not
21172 hack_decl_function_context.
21173 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21174 (start_static_initialization_or_destruction): Likewise.
21175 (finish_static_initialization_or_destruction): Likewise.
21176 (mark_used): Adjust logic for deciding when to synthesize methods.
21177 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
21178 DECL_REAL_CONTEXT.
21179 * error.c (dump_function_decl): Use DECL_CONTEXT, not
21180 DECL_CLASS_CONTEXT.
21181 * friend.c (is_friend): Likewise.
21182 (add_friends): Remove.
21183 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
21184 * lex.c (begin_definition_of_inclass_inline): Use
21185 decl_function_context, not hack_decl_function_context.
21186 (process_next_inline): Likewise.
21187 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21188 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
21189 DECL_CLASSS_CONTEXT.
21190 (hack_identifier): Likewise.
21191 (synthesize_method): Use decl_function_context, not
21192 hack_decl_function_context.
21193 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
21194 DECL_REAL_CONTEXT.
21195 (is_member_template): Use decl_function_context, not
21196 hack_decl_function_context. Use DECL_CONTEXT, not
21197 DECL_CLASS_CONTEXT.
21198 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
21199 DECL_CLASS_CONTEXT.
21200 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
21201 DECL_REAL_CONTEXT.
21202 (push_template_decl_real): Likewise.
21203 (instantiate_class_template): Don't call add_friends.
21204 (tsubst_default_argument): Use DECL_CONTEXT, not
21205 DECL_REAL_CONTEXT.
21206 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21207 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21208 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
21209 DECL_CLASS_CONTEXT.
21210 * repo.c (repo_inline_used): Likewise.
21211 * search.c (current_scope): Adjust for new _CONTEXT macros.
21212 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21213 DECL_REAL_CONTEXT.
21214 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21215 (lookup_fnfields_here):Likewise.
21216 (check_final_overrider): Likewise.
21217 (init_vbase_pointers): Likewise.
21218 (virtual_context): Likewise.
21219 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21220 (expand_body): Use decl_function_context, not
21221 hack_decl_function_context.
21222 * tree.c (hack_decl_function_context): Remove.
21223 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21224 DECL_CLASS_CONTEXT.
21225 * typeck2.c (error_not_base_type): Likewise.
21226
21227 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
21228
21229 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21230
21231 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21232
21233 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21234
21235 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
21236
21237 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21238
21239 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
21240
21241 * decl2.c (lang_decode_option): Enable automatic line wrapping.
21242
21243 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
21244
21245 * parse.y (frob_specs): Split out...
21246 (parse_decl): From here.
21247 (fn.def2): Call initial_deferred_type_access_control.
21248 (after_type_component_declarator0): Call frob_specs.
21249 (notype_component_declarator0): Likewise.
21250 * search.c (friend_accessible_p): Nested classes are friends of their
21251 enclosing classes.
21252
21253 2000-02-10 Mark Mitchell <mark@codesourcery.com>
21254
21255 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21256 used to create an implicit temporary.
21257
21258 * class.c (dfs_modify_vtables): Tweak calculation of functions to
21259 override.
21260
21261 2000-02-08 Nathan Sidwell <nathan@acm.org>
21262
21263 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21264 strip array element qualifiers too.
21265
21266 2000-02-07 Mark Mitchell <mark@codesourcery.com>
21267
21268 * decl.c (store_parm_decls): Don't build cleanups for parameters
21269 while processing_template_decl.
21270
21271 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
21272
21273 * cp-tree.h (struct saved_scope): Add incomplete field.
21274 (namespace_scope_incomplete): New macro.
21275 * decl.c (pushdecl): Use it.
21276 (hack_incomplete_structures): Use it. See through artificial
21277 binding levels.
21278 (mark_saved_scope): Mark it.
21279
21280 Implement access control for nested types.
21281 * search.c (type_access_control): New fn.
21282 (accessible_p): Now we do perform access control for types.
21283 * semantics.c (deferred_type_access_control): New fn.
21284 (initial_deferred_type_access_control): New fn.
21285 (begin_function_definition): Call it. Add lookups parm.
21286 * decl.c (struct binding_level): Add this_class field.
21287 (pushlevel_class): Set it.
21288 (mark_binding_level): Mark it.
21289 (lookup_name_real): Use it. Call type_access_control.
21290 (mark_saved_scope): Mark lookups field.
21291 * cp-tree.h (flagged_type_tree): Add lookups field.
21292 (struct saved_scope): Add lookups field.
21293 (type_lookups): New macro.
21294 * parse.y (declmods): Now <ftype>.
21295 (parse_decl): Add lookups parm. Call
21296 initial_deferred_type_access_control.
21297 (lang_extdef): Clear type_lookups.
21298 (typed_declspecs, declmods, typespec): Set lookups field.
21299 (initdcl): Call deferred_type_access_control.
21300 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21301 component_decl_1, named_parm): Adjust.
21302 * friend.c (is_friend): Nested classes are friends of their
21303 enclosing classes.
21304
21305 * class.c (currently_open_derived_class): New fn.
21306 * method.c (hack_identifier): Use it.
21307
21308 * lex.c (do_identifier): Remove obsolete code.
21309
21310 * parse.y (typed_typespecs): Propagate new_type_flag properly.
21311
21312 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
21313
21314 * tinfo.h: Remove apostrophes from C++ comment (xgettext
21315 thinks this file is plain C).
21316
21317 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21318
21319 * Makefile.in (call.o): Depend on $(EXPR_H).
21320
21321 * call.c: Include "expr.h".
21322
21323 * class.c (dump_class_hierarchy): Add prototype.
21324
21325 * search.c (dfs_get_pure_virtuals): Likewise.
21326
21327 2000-02-1 Ulrich Drepper <drepper@redhat.com>
21328
21329 * parse.y (simple_stmt): Allow :: token in asm parameter list.
21330 * parse.c: Rebuilt.
21331
21332 2000-01-31 Jim Wilson <wilson@cygnus.com>
21333
21334 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21335 Store it in DECL_FCONTEXT.
21336 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21337
21338 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
21339
21340 * tinfo.h (old abi): #include "tconfig.h".
21341 * tinfo.cc (convert_to_base): Move into old abi section.
21342
21343 2000-01-31 Mark Mitchell <mark@codesourcery.com>
21344
21345 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21346 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21347 (BINFO_PRIMARY_BINFO): New macro.
21348 (BF_DELTA): Rename to ...
21349 (BV_DELTA): ... this.
21350 (BF_VCALL_INDEX): Rename to ...
21351 (BV_VCALL_INDEX): ... this.
21352 (BF_FN): Rename to ...
21353 (BV_FN): ... this.
21354 * class.c (build_vbase_path): Adjust for changes to reverse_path.
21355 (set_rtti_entry): Rename BF_ macros to BV_ variants.
21356 (modify_vtable_entry): Simplify.
21357 (add_virtual_function): Rename BF_ macros to BV_ variants.
21358 (build_vtable_initializer): Likewise.
21359 (get_class_offset_1): Remove.
21360 (dfs_get_class_offset): Likewise.
21361 (get_class_offset): Likewise.
21362 (dfs_find_final_overrider): New function.
21363 (find_final_overrider): Likewise.
21364 (modify_one_vtable): Remove.
21365 (dfs_find_base): New function.
21366 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
21367 find_final_overrider.
21368 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
21369 virtuals.
21370 (dfs_fixup_vtable_deltas): Remove.
21371 (override_one_vtable): Remove.
21372 (merge_overrides): Likewise.
21373 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21374 unreal chilren of virtual bases.
21375 (finish_struct_1): Don't use merge_overrides. Don't use
21376 dfs_fixup_vtable_deltas.
21377 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21378 BINFOs.
21379
21380 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21381 Jason Merrill <jason@yorick.cygnus.com>
21382
21383 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21384
21385 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
21386
21387 * exception.cc (__throw_bad_typeid): Add missing std::.
21388
21389 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21390
21391 * cp-tree.h (make_thunk): PROTO -> PARAMS.
21392
21393 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
21394
21395 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21396
21397 Runtime support for new-abi rtti.
21398 * inc/typeinfo (type_info::operator!=): Define in class.
21399 (type_info::before, type_info::name, type_info::operator==,
21400 type_info::operator!=): Define new ABI implementations.
21401 (type_info::is_pointer_p, type_info::is_function_p): Declare
21402 new virtual functions.
21403 (type_info::do_catch, type_info::do_upcast): Likewise.
21404
21405 * tinfo.h (__base_class_info): Define new class.
21406 (__class_type_info): Likewise.
21407 (__si_class_type_info): Likewise.
21408 (__vmi_class_type_info): Likewise.
21409 (__dynamic_cast): Prototype.
21410
21411 * tinfo.cc: Conditionalize old and new rtti mechanisms.
21412 (type_info::is_pointer_p): Define new function.
21413 (type_info::is_function_p): Likewise.
21414 (type_info::do_catch): Likewise.
21415 (type_info::do_upcast): Likewise.
21416 (vtable_prefix): New structure for vtable access.
21417 (adjust_pointer): Define new template function.
21418 (contained_p, public_p, virtual_p, contained_public_p,
21419 contained_nonpublic_p, contained_nonvirtual_p): Define new
21420 functions.
21421 (nonvirtual_base_type): New local variable.
21422 (__class_type_info::~__class_type_info): Define.
21423 (__si_class_type_info::~__si_class_type_info): Likewise.
21424 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21425 (__class_type_info::do_catch): Define new function.
21426 (__class_type_info::do_upcast): Likewise.
21427 (__class_type_info::find_public_src): Likewise.
21428 (__class_type_info::do_find_public_src): Likewise.
21429 (__si_class_type_info::do_find_public_src): Likewise.
21430 (__vmi_class_type_info::do_find_public_src): Likewise.
21431 (__class_type_info::do_dyncast): Likewise.
21432 (__si_class_type_info::do_dyncast): Likewise.
21433 (__vmi_class_type_info::do_dyncast): Likewise.
21434 (__class_type_info::do_upcast): Likewise.
21435 (__si_class_type_info::do_upcast): Likewise.
21436 (__vmi_class_type_info::do_upcast): Likewise.
21437 (__dynamic_cast): Likewise.
21438
21439 * tinfo2.cc (__fundamental_type_info): Define new class.
21440 (__pointer_type_info): Likewise.
21441 (__reference_type_info): Likewise.
21442 (__array_type_info): Likewise.
21443 (__function_type_info): Likewise.
21444 (__enum_type_info): Likewise.
21445 (__ptr_to_member_type_info): Likewise.
21446 (__fundamental_type_info::~__fundamental_type_info): Define.
21447 (__pointer_type_info::~__pointer_type_info): Likewise.
21448 (__reference_type_info::~__reference_type_info): Likewise.
21449 (__array_type_info::~__array_type_info): Likewise.
21450 (__function_type_info::~__function_type_info): Likewise.
21451 (__enum_type_info::~__enum_type_info): Likewise.
21452 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21453 (__pointer_type_info::do_catch): Define new function.
21454 (__ptr_to_member_type_info::do_catch): Define new function.
21455
21456 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21457 (__is_pointer): Likewise.
21458
21459 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21460
21461 2000-01-30 Mark Mitchell <mark@codesourcery.com>
21462
21463 * cp/class.c (build_vtable): Rename to build_primary_vtable.
21464 (prepare_fresh_vtable): Rename to build_secondary_vtable.
21465 (make_new_vtable): New function.
21466 (modify_vtable_entry): Handle generation of new vtables correctly.
21467 (modify_one_vtable): Remove unused parameter.
21468 (dfs_fixup_vtable_deltas): Likewise.
21469 (override_one_vtable): Use build_secondary_vtable.
21470 (finish_struct_1): Use build_primary_vtable and
21471 build_secondary_vtable.
21472
21473 2000-01-28 Ulrich Drepper <drepper@redhat.com>
21474
21475 * cp/decl.c: Adjust variable names, comments, help strings.
21476
21477 2000-01-29 Nathan Sidwell <nathan@acm.org>
21478
21479 * new2.cc (operator delete[]): Use operator delete, don't assume
21480 implementation.
21481
21482 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
21483
21484 * class.c (build_vtbl_initializer): Add argument to
21485 build_vtable_entry call.
21486
21487 2000-01-27 Mark Mitchell <mark@codesourcery.com>
21488
21489 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21490 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21491 (BF_DELTA): New macro.
21492 (BF_VCALL_INDEX): Likewise.
21493 (BF_FN): Likewise.
21494 (THUNK_VCALL_OFFSET): Likewise.
21495 (make_thunk): Change prototype.
21496 * class.c (build_vtable_entry): Integrate
21497 build_vtable_entry_for_fn. Handle vcall indices.
21498 (build_vtable_entry_for_fn): Remove.
21499 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
21500 BF_VCALL_INDEX, BF_FN.
21501 (modify_vtable_entry): Integrate common code from
21502 modify_one_vtable and dfs_fixup_vtable_deltas.
21503 (add_virtual_function): Set BF_VCALL_INDEX.
21504 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
21505 and BF_FN.
21506 (modify_one_vtable): Simplify.
21507 (dfs_fixup_vtable_deltas): Likewise.
21508 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21509 * method.c (make_thunk): Handle vcall indices.
21510
21511 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
21512
21513 Compiler side new abi rtti (not enabled).
21514 * cp-tree.h (new_abi_rtti_p): New macro.
21515 (emit_support_tinfos): Prototype new function.
21516 (tinfo_decl_p): Likewise.
21517 (emit_tinfo_decl): Likwise.
21518 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21519 macros.
21520 (doing_runtime): New local static.
21521 (init_rtti_processing): Add new-abi initializer.
21522 (get_tinfo_decl): Add new-abi logic.
21523 (tinfo_from_decl): Likewise.
21524 (build_dynamic_cast_1): Likewise.
21525 (qualifier_flags): New static function.
21526 (tinfo_base_init): Likewise.
21527 (generic_initializer): Likewise.
21528 (ptr_ref_initializer): Likewise.
21529 (ptmd_initializer): Likewise.
21530 (class_hint_flags): Likewise.
21531 (class_initializer): Likewise.
21532 (synthesize_tinfo_var): Likewise.
21533 (create_real_tinfo_var): Likewise.
21534 (create_pseudo_type_info): Likewise.
21535 (get_vmi_pseudo_type_info): Likewise.
21536 (create_tinfo_types): Likewise.
21537 (emit_support_tinfos): New global function.
21538 (tinfo_decl_p): New global predicate.
21539 (emit_tinfo_decl): New global function.
21540 * class.c (set_rtti_entry): Generalize for old and new rtti.
21541 (build_vtbl_initializer): Likewise.
21542 * decl2.c (finish_file): Likewise.
21543
21544 2000-01-27 Jim Wilson <wilson@cygnus.com>
21545
21546 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21547 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21548
21549 2000-01-27 Mike Stump <mrs@wrs.com>
21550
21551 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21552 for scopes.
21553
21554 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
21555
21556 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21557
21558 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
21559
21560 * optimize.c (calls_setjmp_r): Supply new argument
21561 to special_function_p.
21562
21563 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21564
21565 * call.c: PROTO -> PARAMS.
21566 * class.c: Likewise.
21567 * cp-tree.h: Likewise.
21568 * cvt.c: Likewise.
21569 * decl.c: Likewise.
21570 * decl.h: Likewise.
21571 * decl2.c: Likewise.
21572 * dump.c: Likewise.
21573 * errfn.c: Likewise.
21574 * error.c: Likewise.
21575 * except.c: Likewise.
21576 * expr.c: Likewise.
21577 * init.c: Likewise.
21578 * input.c: Likewise.
21579 * lex.c: Likewise.
21580 * lex.h: Likewise.
21581 * method.c: Likewise.
21582 * optimize.c: Likewise.
21583 * parse.y: Likewise.
21584 * pt.c: Likewise.
21585 * repo.c: Likewise.
21586 * rtti.c: Likewise.
21587 * search.c: Likewise.
21588 * semantics.c: Likewise.
21589 * spew.c: Likewise.
21590 * tree.c: Likewise.
21591 * typeck.c: Likewise.
21592 * typeck2.c: Likewise.
21593 * xref.c: Likewise.
21594
21595 2000-01-25 Richard Henderson <rth@cygnus.com>
21596
21597 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21598
21599 2000-01-25 Mark Mitchell <mark@codesourcery.com>
21600
21601 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21602 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21603 (struct vcall_offset_data_s): New type.
21604 (dfs_vcall_offset_queue_p): New function.
21605 (dfs_build_vcall_offset_vtbl_entries): Likewise.
21606 (build_vcall_offset_vtbl_entries): Likewise.
21607 (layout_vtable_decl): Likewise.
21608 (num_vfun_entries): Likewise.
21609 (num_extra_vtbl_entries): Add the entries for vcall offsets.
21610 (build_vtbl_initializer): Likewise.
21611 (dfs_finish_vtabls): Use layout_vtable_decl.
21612 (modify_one_vtables): Always duplicate vtables under the new ABI.
21613 (finish_struct_1): Use layout_vtable_decl.
21614
21615 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21616
21617 * decl.c (member_function_or_else): Change third arg from a format
21618 specifier to an `enum overload_flags'. Callers changed.
21619
21620 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
21621
21622 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21623 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21624 build_const_cast, get_delta_difference, check_return_expr): Avoid
21625 ANSI string concatenation usage.
21626
21627 2000-01-24 Mark Mitchell <mark@codesourcery.com>
21628
21629 * class.c (layout_class_type): Put the fields required to make a
21630 class non-empty at the end, not the beginning, of the TYPE_FIELDs
21631 list.
21632
21633 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
21634
21635 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21636 template.
21637
21638 * decl2.c (mark_used): Do instantiate inlines that have been
21639 explicitly instantiated.
21640
21641 2000-01-24 Richard Henderson <rth@cygnus.com>
21642
21643 * call.c (build_over_call): Use expand_tree_builtin.
21644 * typeck.c (build_function_call_real): Likewise.
21645 (build_binary_op_nodefault): Handle unordered compares.
21646
21647 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21648
21649 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21650 cp_tree_index values.
21651 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21652 New global node #defines for them.
21653 * rtti.c (call_void_fn): Replace with ...
21654 (build_runtime_decl): ... new static function.
21655 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21656 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21657 (build_dynamic_cast_1): Always produce correctly typed result.
21658 Explicitly produce type_info addresses. Use dynamic_cast_node.
21659 * exception.cc (__throw_bad_cast): Return `void *'.
21660 (__throw_bad_typeid): Return `const type_info &'.
21661
21662 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21663
21664 * cp-tree.h (get_vtable_decl): Prototype new function.
21665 * class.c (get_vtable_decl): New function. Broken out from ...
21666 (build_vtable): ... here. Use it.
21667 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21668 by get_vtable_decl.
21669
21670 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21671
21672 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21673 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21674 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21675 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21676 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21677 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21678 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21679 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21680 (CPTI_TINFO_VAR_ID): New enumeration.
21681 (__tp_desc_type_node, __access_mode_type_node,
21682 __bltn_desc_type_node, __user_desc_type_node,
21683 __class_desc_type_node, __ptr_desc_type_node,
21684 __attr_desc_type_node, __func_desc_type_node,
21685 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21686 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21687 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21688 enum_desc_type_node, class_desc_type_node,
21689 si_class_desc_type_node, vmi_class_desc_type_node,
21690 ptmd_desc_type_node, base_desc_type_node): New #defines.
21691 (tinfo_fn_id, tinfo_fn_type): Rename to ...
21692 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21693 (tinfo_var_id): New enumeration.
21694 (DECL_TINFO_FN_P): Augment comment.
21695 * decl.c (cp_global_trees): Adjust documentation.
21696 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21697 tinfo_decl_type and tinfo_var_id.
21698 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21699 (build_typeid): Remove unused variable.
21700 (get_tinfo_var): Use tinfo_var_id.
21701 (tinfo_name): New static function.
21702 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21703 (tinfo_from_decl): Likewise.
21704 (get_base_offset): New static function, broken out of
21705 expand_class_desc.
21706 (expand_si_desc): Use tinfo_name.
21707 (expand_class_desc): Likewise. Lose local static variable.
21708 Use base_desc_type_node. Use get_base_offset.
21709 (expand_ptr_desc): Use tinfo_name.
21710 (expand_attr_desc): Likewise.
21711 (expand_generic_desc): Likewise.
21712
21713 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21714 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21715
21716 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21717
21718 * cp-tree.h (__eprintf): Remove declaration.
21719 * tree.c (__eprintf): Remove definition.
21720
21721 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
21722 Mark Mitchell <mark@codesourcery.com>
21723
21724 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21725 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21726
21727 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
21728
21729 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21730
21731 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21732
21733 * cp-tree.h (register_dtor_fn): New function.
21734 * decl.c (destroy_local_static): Rename to ...
21735 (register_dtor_fn): ... this. Give it external linkage.
21736 (expand_static_init): Use it.
21737 * decl2.c (do_static_initialization): Likewise, if using
21738 __cxa_atexit.
21739 (do_static_destruction): Check that __cxa_atexit is not in use.
21740 (finish_file): Don't call do_static_destruction if using
21741 __cxa_atexit.
21742
21743 * typeck.c (convert_arguments): Restore two-message error
21744 reporting.
21745
21746 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
21747
21748 Remap dynamic cast hint values to be consistent across ABIs.
21749 * search.c (dynamic_cast_base_recurse): Remap generated value.
21750 (get_dynamic_cast_base_type): Adjust documentation.
21751 * tinfo.h (__user_type_info::dyncast): Likewise.
21752 (__user_type_info::find_public_subobj): Remap BOFF meaning.
21753 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21754 (__class_type_info::do_dyncast): Likewise.
21755 (__class_type_info::do_find_public_subobj): Likewise.
21756 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21757
21758 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21759
21760 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21761
21762 * typeck2.c (incomplete_type_error): Restore previous
21763 cp_error and cp_error_at call sequence.
21764
21765 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
21766
21767 * class.c (dump_class_hierarchy): Make format agree with argument;
21768 cast pointer to unsigned long and print with %lx.
21769
21770 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21771
21772 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21773
21774 * typeck.c (composite_pointer_type, common_type,
21775 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21776 build_function_call_real, convert_arguments,
21777 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21778 build_unary_op, mark_addressable, build_compound_expr,
21779 build_static_cast, build_reinterpret_cast, build_const_cast,
21780 build_c_cast, build_modify_expr, get_delta_difference,
21781 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21782 'ISO C++'. Fusion consecutive calls to diagnostic message routines
21783 into a single one.
21784 * typeck2.c (readonly_error, abstract_virtuals_error,
21785 process_init_constructor, check_for_new_type): Likewise.
21786
21787 2000-01-19 Mark Mitchell <mark@codesourcery.com>
21788
21789 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21790 VAR_DECLs.
21791
21792 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
21793
21794 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21795 (build_x_typeid): Likewise.
21796 (get_tinfo_fn): Likewise.
21797 (get_tinfo_fn_unused): Rename to ...
21798 (get_tinfo_decl): ... here.
21799 * rtti.c (build_headof): Replace logic error with assertion.
21800 (get_tinfo_fn_dynamic): Rename to ...
21801 (get_tinfo_decl_dynamic): ... here. Make static. Use
21802 complete_type_or_else.
21803 (build_x_typeid): Move into ...
21804 (build_typeid): ... here. Adjust call to
21805 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21806 throw_bad_typeid expression.
21807 (get_tinfo_fn_unused): Rename to ...
21808 (get_tinfo_decl): ... here. Adjust comment.
21809 (get_tinfo_fn): Delete.
21810 (tinfo_from_decl): New static function.
21811 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21812 (get_typeid): Use complete_type_or_else.
21813 (build_dynamic_cast_1): Adjust calls to
21814 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21815 * parse.y (primary): Adjust call to build_typeid.
21816 * except.c (build_eh_type_type_ref): Adjust call to
21817 get_tinfo_decl. Mark as used.
21818 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21819 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21820 * parse.c: Regenerated.
21821
21822 2000-01-17 Mark Mitchell <mark@codesourcery.com>
21823
21824 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
21825 calling convention.
21826 (resolves_to_fixed_type_p): Document calling convention.
21827 * rtti.c (build_x_typeid): Initialize NONNULL.
21828
21829 * cp-tree.h (build_shared_int_cst): New function.
21830 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21831 * class.c (modify_vtable_entry): Likewise.
21832 (add_virtual_function): Split out code to generated shared
21833 INTEGER_CSTs to build_share_int_cst.
21834 (modify_all_vtables): Handle all the overridden functions here.
21835 Add overridden functions from non-primary virtual bases to the
21836 primary vtable.
21837 (finish_struct_1): Adjust call to modify_all_vtables. Add
21838 overridden functions from non-primary bases to the vtable.
21839 * tree.c (build_shared_int_cst): New function.
21840
21841 * cp-tree.h (scratchalloc): Remove.
21842 (build_scratch_list): Likewise.
21843 * call.c (convert_class_to_reference): Replace build_scratch_list
21844 and build_expr_list with build_tree_list.
21845 (add_candidate): Replace scratchalloc with expralloc. Note memory
21846 leak.
21847 (build_user_type_conversion_1): Replace build_scratch_list
21848 and build_expr_list with build_tree_list.
21849 (build_new_op): Likewise.
21850 (build_op_delete_call): Likewise.
21851 (convert_like): Likewise.
21852 * cvt.c (ocp_convert): Likewise.
21853 * decl.c (start_decl): Likewise.
21854 (start_function): Likewise.
21855 (finish_destructor_body): Likewise.
21856 (maybe_build_cleanup_1): Likewise.
21857 * decl2.c (reparse_decl_as_expr): Likewise.
21858 * init.c (perform_member_init): Likewise.
21859 (expand_cleanup_for_base): Likewise.
21860 (build_builtin_delete_call): Likewise.
21861 (build_new_1): Likewise.
21862 (build_delete): Likewise.
21863 * method.c (do_build_assign_ref): Likewise.
21864 * parse.y (already_scoped_stmt): Likewise.
21865 (nontrivial_exprlist): Likewise.
21866 (net_initializer): Likewise.
21867 (initlist): Likewise.
21868 * parse.c: Regenerated.
21869 * rtti.c (build_x_typeid): Likewise.
21870 (build_dynamic_cast_1): Likewise.
21871 * typeck.c (build_x_compound_expr): Likewise.
21872 (build_static_cast): Likewise.
21873 (build_modify_expr): Likewise.
21874
21875 * cp-tree.h (DECL_VINDEX): Add documentation.
21876 * class.c (build_vtable_entry): Likewise.
21877 (start_vtable): Add comment.
21878 (add_virtual_function): Replace pending_hard_virtuals with
21879 overridden_virtuals and pending_virtuals with new_virtuals.
21880 Replace redundant assignments with assertions.
21881 (check_for_override): Add comment.
21882 (check_bases_and_members): Replace pending_hard_virtuals with
21883 overridden_virtuals and pending_virtuals with new_virtuals.
21884 (create_vtbl_ptr): Likewise.
21885 (layout_class_type): Likewise.
21886 (finish_struct_1): Likewise. Add comments.
21887
21888 2000-01-16 Mark Mitchell <mark@codesourcery.com>
21889
21890 * class.c (finish_struct_1): Replace redundant code with
21891 assertions.
21892
21893 * cp-tree.h (flag_new_abi): Move.
21894 (flag_use_cxa_atexit): Likewise.
21895 (flag_honor_std): Likewise.
21896 (flag_rtti): Likewise.
21897 (vbase_offsets_in_vtable_p): Define.
21898 (vptrs_present_everywhere_p): Likewise.
21899 (TYPE_CONTAINS_VPTR_P): Likewise.
21900 (dfs_walk_real): Declare.
21901 * class.c (build_vbase_pointer_fields): Check
21902 vbase_offsets_in_vtable_p.
21903 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21904 BINFO_VPTR_FIELD.
21905 (build_vbase_offset_vtbl_entries): Simplify.
21906 (build_vbase_offset_vtbl_entries): Adjust.
21907 (build_vbase_pointer): Add ability to look up vbase offsets in
21908 vtable.
21909 (start_vtable): New function.
21910 (add_virtual_function): Use it.
21911 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21912 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21913 (build_vtbl_initializer): Take the type of the complete object as
21914 input. Use it to correctly calculate vbase offsets.
21915 (dfs_finish_vtbls): Pass the complete type to
21916 build_vtbl_initializer.
21917 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21918 (create_vtable_ptr): Create a vtable even if there are no
21919 new virtual functions, under the new ABI.
21920 (finish_struct_1): Likewise.
21921 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21922 * decl.c (exapnd_static_init): Remove call to
21923 preserve_initializer.
21924 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21925 vtables.
21926 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21927 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21928 (construct_virtual_bases): Don't initialize virtual base pointers
21929 under the new ABI.
21930 (build_aggr_init): Clean up comment.
21931 (expand_aggr_init_1): Likewise.
21932 * rtti.c (expand_class_desc): Store the virtual function table
21933 index where the vbase offset lives in the offset field.
21934 * search.c (dfs_walk_real): Make it global.
21935 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21936 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21937
21938 * tinfo.h (USItype): Make it signed under the new ABI.
21939 * tinfo.cc (convert_to_base): New function. Encapsulate base
21940 conversion logic here.
21941 (__class_type_info::do_upcast): Use it.
21942 (__class_type_info::do_dyncast): Likewise.
21943 (__class_type_info::do_find_public_subobj): Likewise.
21944
21945 * init.c (construct_virtual_bases): Don't look up the addresses of
21946 virtual bases at run-time.
21947
21948 * class.c (build_vbase_pointer): Relocate.
21949 (build_vbase_pointer_fields): Likewise.
21950 (dfs_build_vbase_offset_vtbl_entries): Likewise.
21951 (build_vbase_offset_vtbl_entries): Likewise.
21952
21953 * decl.c (init_decl_processing): Complain if -fnew-abi
21954 -fno-vtable-thunks is used.
21955
21956 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21957 flag_new_abi.
21958
21959 2000-01-15 Mark Mitchell <mark@codesourcery.com>
21960
21961 * cp-tree.h (num_extra_vtbl_entries): New function.
21962 (size_extra_vtbl_entries): Likewise.
21963 (dfs_vtable_path_unmark): Likewise.
21964 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21965 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21966 * class.c (num_extra_vtbl_entries): New function.
21967 (size_extra_vtbl_entries): Likewise.
21968 (dfs_build_vbase_offset_vtbl_entries): New function.
21969 (build_vbase_offset_vtbl_entries): Likewise.
21970 (build_vtbl_initializer): Use it.
21971 (finish_struct_1): Adjust vtable sizes (using
21972 num_extra_vtbl_entries).
21973 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21974 THUNK_DECL is non-NULL before expanding it.
21975 * init.c (expand_virtual_init): Adjust the vtable pointer by
21976 size_extra_vtbl_entries before storing it.
21977 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21978 Handle TREE_LIST parameters here, not in the dfs_* functions.
21979 (dfs_unmarked_real_bases_queue_p): Adjust.
21980 (dfs_marked_real_bases_queue_p): Likewise.
21981 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21982 (dfs_vtable_path_marked_real_bases_queue_p): New function.
21983 (dfs_vtable_path_unmark): Likewise.
21984
21985 2000-01-14 Mark Mitchell <mark@codesourcery.com>
21986
21987 * optimize.c (copy_body_r): Clear the operand three of a
21988 TARGET_EXPR when copying it.
21989
21990 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21991
21992 * method.c (build_decl_overload_real): Check whether we are in ::
21993 before returning __builtin_new/delete.
21994
21995 2000-01-13 Mark Mitchell <mark@codesourcery.com>
21996
21997 * pt.c (tsubst_friend_function): Improve comment.
21998 (instantiate_decl): Avoid crashing when a "nested" function is
21999 instantiated from the top level.
22000
22001 * dump.c (dqeueue_and_dump): Dump
22002 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
22003
22004 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22005
22006 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
22007
22008 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
22009
22010 * g++spec.c (lang_specific_driver): Add -fnew-abi if
22011 ENABLE_NEW_GXX_ABI defined.
22012 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
22013 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
22014 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
22015
22016 2000-01-12 Mark Mitchell <mark@codesourcery.com>
22017
22018 * decl.c (start_cleanup_fn): Call pushdecl.
22019
22020 * call.c (convert_class_to_reference): Fix typos.
22021 (build_conditional_expr): Handle errors gracefully.
22022 * class.c (push_nested_class): Likewise.
22023 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
22024 (DECL_THIS_EXTERN): Use it.
22025 (DECL_THIS_STATIC): Likewise.
22026 * cvt.c (convert_to_void): Handle errors gracefully.
22027 (build_expr_type_conversion): Likewise.
22028 * decl.c (maybe_push_decl): Likewise.
22029 (start_decl_1): Likewise.
22030 (require_complete_types_for_parms): Likewise.
22031 * parse.y (structsp): Likewise.
22032 (base_class): Likewise.
22033 * parse.c: Regenerated.
22034 * pt.c (finish_member_template_decl): Likewise.
22035 * typeck.c (decay_conversion): Likewise.
22036
22037 * cp-tree.h (dfs_skip_vbases): New function.
22038 (find_vbase_instance): Likewise.
22039 * class.c (determine_primary_base): Allow a nearly empty base to
22040 serve as a primary base class under the new ABI.
22041 (get_class_offset_1): Rename to ...
22042 (dfs_get_class_offset): ... this. Simplify. Don't issue error
22043 messages here.
22044 (get_class_offset): Use it. Issue error messages here.
22045 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
22046 find the right copies of virtual bases.
22047 (fixup_vtable_deltas1): Rename to ...
22048 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
22049 bases as primary bases.
22050 (fixup_vtable_deltas): Remove.
22051 (override_one_vtable): Handle virtual bases as primary bases.
22052 (merge_overrides): Likewise.
22053 (finish_struct_1): Likewise.
22054 (dump_class_hierarchy): Dump primary-ness of bases as well.
22055 * search.c (mark_primary_bases): Use a pre-order traversal to
22056 handle primary virtual bases.
22057 (dfs_skip_vbases): New fiunction.
22058 (expand_upcast_fixups): Adjust to handle primary virtual bases.
22059 (fixup_virtual_upcast_offsets): Likewise.
22060 (fixup_all_virtual_upcast_offsets): Likewise.
22061 (dfs_find_vbase_instances): New function.
22062 (find_vbase_instance): Likewise.
22063
22064 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
22065
22066 * lex.c (DIR_SEPARATOR): Delete macro.
22067
22068 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
22069
22070 * decl2.c (lang_decode_option): Handle automatic line wrapping
22071 option.
22072
22073 2000-01-11 Mark Mitchell <mark@codesourcery.com>
22074
22075 * friend.c (do_friend): Don't resolve scopes when processing
22076 template declarations, even if the qualifying scope doesn't
22077 involve template parameters.
22078
22079 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
22080
22081 * class.c (dfs_modify_vtables_queue_p): Remove.
22082 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
22083 and dfs_marked_real_bases_queue_p instead of
22084 dfs_modify_vtables_queue_p.
22085
22086 * class.c (build_vbase_path): Simplify.
22087 (dfs_propagate_binfo_offsets): New function.
22088 (propagate_binfo_offsets): Use it.
22089 (remove_base_field): Simplify.
22090 (dfs_set_offset_for_vbases): Remove.
22091 (dfs_set_offset_for_shared_vbases): New function.
22092 (dfs_set_offset_for_unshared_vbases): Likewise.
22093 (layout_virtual_bases): Use them.
22094 (layout_basetypes): Don't call propagate_binfo_offsets.
22095 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
22096 for the vbases.
22097
22098 * class.c (build_base_field): New function, split out from ...
22099 (build_base_fields): ... here. Use it. Allocate primary bases
22100 first, under the new ABI.
22101 (get_vtable_entry): Remove.
22102 (remove_base_field): New function, split out from ...
22103 (remove_base_fields): ... here. Adjust since primary bases come
22104 first under the new ABI.
22105
22106 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
22107 (initialize_vtbl_ptrs): New function.
22108 (expand_indirect_vtbls_init): Change prototype.
22109 (convert_pointer_to_vbase): Declare.
22110 * init.c (expand_direct_vtbls_init): Remove.
22111 (dfs_initialize_vtbl_ptrs): New function.
22112 (initialize_vtbl_ptrs): Likewise.
22113 (emit_base_init): Use initialize_vtbl_ptrs.
22114 * search.c (convert_pointer_to_vbase): Make it global.
22115 (expand_indirect_vtbls_init): Remove vtable initialization code.
22116 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
22117
22118 * class.c (dfs_finish_vtbls): New function.
22119 (finish_vtbls): Use it.
22120 (dump_class_hierarchy): New function.
22121
22122 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
22123 (BINFO_VBASE_PRIMARY_P): New macro.
22124 (BINFO_VIRTUALS): Add to documentation.
22125 (SET_BINFO_PRIMARY_MARKED_P): Remove.
22126 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22127 (dfs_mark_primary_bases_queue_p): Likewise.
22128 (dfs_unmarked_real_bases_queue_p): New function.
22129 (dfs_marked_real_bases_queue_p): Likewise.
22130 * search.c (dfs_mark_primary_bases): Adjust.
22131 (mark_primary_bases): Likewise.
22132 (get_shared_vbase_if_not_primary): New function.
22133 (dfs_unmarked_real_bases_queue_p): Likewise.
22134 (dfs_marked_real_bases_queue_p): Likewise.
22135 (dfs_get_pure_virtuals): Simplify.
22136 (get_pure_virtuals): Likewise.
22137
22138 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22139
22140 * lex.c: Include tm_p.h.
22141
22142 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
22143
22144 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
22145
22146 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
22147
22148 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
22149 * pt.c (instantiate_decl): Defer comdat templates that might not be
22150 needed.
22151
22152 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
22153 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
22154 (finish_file): Likewise.
22155
22156 * decl2.c (import_export_class): Undo 12/14 change.
22157
22158 * error.c (dump_decl): operator new, not operatornew.
22159
22160 * class.c (field_decl_cmp): A nontype is "greater" than a type.
22161 * search.c (lookup_field_1): Look for the last field with the
22162 desired name.
22163
22164 2000-01-05 Nathan Sidwell <nathan@acm.org>
22165
22166 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
22167 FUNCTION_DECL.
22168
22169 2000-01-05 Nathan Sidwell <nathan@acm.org>
22170
22171 * typeck.c (build_static_cast): Don't strip target qualifiers
22172 when casting from a class.
22173
22174 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22175
22176 * class.c (warn_hidden): Initialize variable `fndecl'.
22177
22178 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
22179
22180 * decl.c (flag_isoc9x): New variable to be able to use code in
22181 c-common.c. For now always zero.
22182
22183 2000-01-03 Mark Mitchell <mark@codesourcery.com>
22184
22185 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
22186 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
22187 or unshare_base_binfos for virtual bases here.
22188 * search.c (dfs_get_vbase_types): Do it here.
22189 (get_vbase_types): Adjust.
22190
22191 2000-01-02 Mark Mitchell <mark@codesourcery.com>
22192
22193 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
22194 (BINFO_PRIMARY_MARKED_P): Use flag 5.
22195 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22196 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22197 (unmark_primary_bases): Remove declaration.
22198 (unmarkedp): Declare.
22199 (dfs_vbase_unmark): Likewise.
22200 * class.c (determine_primary_base): Return immediately if there
22201 are no base classes. Call mark_primary_bases here.
22202 (modify_all_direct_vtables): Remove.
22203 (modify_all_indirect_vtables): Remove.
22204 (dfs_modify_vtables_queue_p): New function.
22205 (dfs_modify_vtables): New function.
22206 (modify_all_vtables): Use them.
22207 (build_base_fields): Build FIELD_DECLs for primary virtual base
22208 classes.
22209 (create_vtable_ptr): Don't call determine_primary_base here.
22210 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22211 (dfs_set_offset_for_vbases): ... this.
22212 (layout_virtual_bases): Use it.
22213 (layout_class_type): Call determine_primary_base here.
22214 * search.c (unmarkedp): Make it global.
22215 (shared_marked_p): Simplify.
22216 (shared_unmarked_p): Likewise.
22217 (dfs_primary_bases_queue_p): Remove.
22218 (dfs_unmark_primary_bases): Likewise.
22219 (unmark_primary_bases): Likewise.
22220 (mark_primary_bases): Simplify.
22221 (get_pure_virtuals): Don't call mark_primary_bases here.
22222 (dfs_vbase_unmark): New function.
22223 (get_vbase_types): Simplify.
22224
22225 * class.c (struct base_info): Remove.
22226 (determine_primary_base): Take has_virtual_p rather than a
22227 base_info as input. Don't calculate max_has_virtual.
22228 (finish_struct_bits): Remove max_has_virtual argument.
22229 (create_vtable_ptr): Remove max_has_virtual_p argument.
22230 (layout_virtual_bases): Remove max argument.
22231 (layout_basetypes): Likewise.
22232 (layout_class_type): Remove max_has_virtual_p argument.
22233 (finish_struct_1): Remove max_has_virtual.
22234
22235 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22236 (layout_basetypes): Remove.
22237 * class.c (propagate_binfo_offsets): Moved here from tree.c.
22238 Update to handle primary virtual bases.
22239 (remove_base_fields): New function, split out from
22240 layout_basetypes.
22241 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22242 (layout_virtual_bases): New function, split out from
22243 layout_basetypes. Update to handle primary virtual bases.
22244 (layout_basetypes): Moved here from tree.c. Use
22245 remove_base_fields and layout_virtual_bases.
22246 * search.c (dfs_mark_primary_bases_queue_p): New function.
22247 (mark_primary_bases): Use it.
22248 * tree.c (CEIL): Remove.
22249 (propagate_binfo_offsets): Remove.
22250 (layout_basetypes): Remove.
22251
22252 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22253
22254 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22255 (BINFO_PRIMARY_MARKED_P): New macro.
22256 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22257 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22258 (mark_primary_bases): New function.
22259 (unmark_primary_bases): Likewise.
22260 * search.c (get_abstract_virtuals_1): Remove.
22261 (dfs_mark_primary_bases): New function.
22262 (mark_primary_bases): Likewise.
22263 (dfs_unmark_primary_bases): Likewise.
22264 (unmark_primary_bases): Likewise.
22265 (dfs_get_pure_virtuals): Likewise.
22266
22267 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22268
22269 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22270 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22271 (modify_one_vtable): Adjust.
22272 (fixup_vtable_deltas1): Likewise.
22273 (override_one_vtable): Likewise.
22274 * search.c (get_abstract_virtuals_1): Likewise.
22275 (get_pure_virtuals): Likewise.
22276 (expand_upcast_fixups): Likewise.
22277 * tree.c (debug_binfo): Likewise.
22278
22279 * class.c (build_vtable): Don't return a value. Don't rebuild
22280 vtables for bases that have already been handled.
22281 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22282 already been handled.
22283 (modify_one_vtable): Adjust accordingly.
22284 (fixup_vtable_deltas1): Likewise.
22285 (finish_struct_1): Likewise.
22286
22287 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
22288
22289 * call.c (build_new_method_call): Also check destructors.