re PR c++/13241 ([ABI] Incorrect mangling of template arguments)
[gcc.git] / gcc / cp / ChangeLog
1 2003-12-15 Nathan Sidwell <nathan@codesourcery.com>
2
3 PR c++/13241
4 C++ ABI change. Mangling of symbols in expressions.
5 * mangle.c (write_mangled_name): Add top_level flag. Rework for
6 nested and unnested mangling. Deal with abi version 1 and version
7 2 differences.
8 (write_expression): Adjust write_mangled_name call.
9 (mangle_decl_string): Use write_mangled_name for all non-type decls.
10
11 2003-12-14 Mark Mitchell <mark@codesourcery.com>
12
13 PR c++/10779
14 PR c++/12160
15 * parser.c (struct cp_parser): Add in_template_argument_list_p.
16 (cp_parser_error): Use c_parse_error.
17 (cp_parser_name_lookup_error): New function.
18 (cp_parser_new): Initialize it.
19 (cp_parser_declarator): Add parenthesized_p parameter.
20 (cp_parser_nested_name_specifier_opt): Use
21 cp_parser_name_lookup_error.
22 (cp_parser_parenthesized_expression_list): Improve comments.
23 (cp_parser_condition): Adjust call to cp_parser_declarator.
24 (cp_parser_template_parameter): Adjust call to
25 cp_parser_parameter_declaration.
26 (cp_parser_template_argument_list): Set
27 in_template_argument_list_p.
28 (cp_parser_explicit_instantiation): Adjust call to
29 cp_parser_declarator.
30 (cp_parser_simple_type_specifier): Remove unncessary code.
31 (cp_parser_using_declaration): Use cp_parser_name_lookup_error.
32 (cp_parser_init_declarator): Handle member function definitions.
33 (cp_parser_direct_declarator): Adjust call to
34 cp_parser_declarator.
35 (cp_parser_type_id): Adjust call to cp_parser_declarator.
36 (cp_parser_parameter_declaration_list): Avoid backtracking where
37 possible.
38 (cp_parser_parameter_declaration): Add parenthesized_p parameter.
39 (cp_parser_function_definition): Remove.
40 (cp_parser_member_declaration): Do not backtrack to look for
41 function definitions.
42 (cp_parser_exception_declaration): Adjust call to
43 cp_parser_declarator.
44 (cp_parser_single_declaration): Handle function definitions via
45 cp_parser_init_declarator.
46 (cp_parser_save_member_function_body): New function.
47
48 2003-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
49
50 PR c++/13106
51 * decl.c (finish_function): Check if return type is dependent before
52 issuing no return statement warning.
53
54 2003-12-12 Nathan Sidwell <nathan@codesourcery.com>
55
56 PR c++/13118
57 * cp-tree.h (lang_decl_u): Add thunk_alias member.
58 (THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL.
59 (THUNK_ALIAS_P): Remove.
60 (THUNK_ALIAS): Adjust.
61 * class.c (update_vtable_entry_for_fn): Get the vbase within the
62 overriding function's return type.
63 (dump_thunk): Adjust THUNK_ALIAS printing.
64 (build_vtbl_initializer): Adjust THUNK_ALIAS use.
65 * method.c (make_thunk): Revert 12881 test change. Clear
66 THUNK_ALIAS.
67 (finish_thunk): Adjust THUNK_ALIAS setting.
68 (use_thunk): Adjust THUNK_ALIAS use.
69 * semantics.c (emit_associated_thunks): Likewise.
70
71 PR c++/13114, c++/13115
72 * class.c (layout_empty_base): Propagate the move of an empty base
73 to offset zero.
74
75 PR c++/12881
76 * method.c (make_thunk): Deal with thunk aliases when searching
77 for a thunk. Robustify assertion.
78
79 2003-12-11 Nathan Sidwell <nathan@codesourcery.com>
80
81 * mangle.c (conv_type_names): Holds IDENTIFIER_NODEs only.
82 (hash_type): Use TYPE_UID of the identifier's type.
83 (compare_type): Adjust.
84 (mangle_conv_op_name_for_type): Store identifier nodes only, use
85 TYPE_UID has hash value.
86
87 2003-12-10 Mark Mitchell <mark@codesourcery.com>
88
89 * cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL.
90
91 2003-12-08 Matt Austern <austern@apple.com>
92
93 PR c/13134
94 * decl.c (duplicate_decls): Copy visibility flag when appropriate.
95
96 2003-12-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
97
98 * init.c (build_new_1): Deal with an OVERLOAD set when
99 looking up for _Jv_AllocObject.
100 * except.c (build_throw): Likewise for _Jv_Throw.
101
102 2003-12-08 Jason Merrill <jason@redhat.com>
103
104 PR c++/11971
105 * tree.c (build_local_temp): Split out from build_cplus_new.
106 (force_target_expr): New fn.
107 * call.c (call_builtin_trap): Call it. Take a type parm.
108 (convert_arg_to_ellipsis): Pass it.
109 (build_x_va_arg): Use call_builtin_trap.
110
111 PR c++/11929
112 * call.c (magic_varargs_p): New fn.
113 (build_over_call): Do no ellipsis conversions for arguments to
114 functions with magic varargs.
115
116 * name-lookup.c, init.c, except.c: Revert Giovanni's patch from
117 yesterday.
118
119 Give the anonymous namespace a null DECL_NAME.
120 * cp-tree.h: Don't declare anonymous_namespace_name.
121 * decl.c: Don't define it.
122 * dump.c (cp_dump_tree): Don't check for it.
123 * cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise.
124 * error.c (dump_decl): Likewise.
125 * name-lookup.c: Define it here.
126 (push_namespace): Put it in DECL_ASSEMBLER_NAME instead.
127 * mangle.c (write_unqualified_name): Adjust.
128
129 2003-12-07 Giovanni Bajo <giovannibajo@gcc.gnu.org>
130
131 PR c++/2294
132 * name-lookup.c (push_overloaded_decl): Always construct an
133 OVERLOAD unless the declaration is a built-in.
134 (set_namespace_binding): While binding OVERLOADs with only one
135 declaration, we still need to call supplement_binding.
136 * init.c (build_new_1): Deal with an OVERLOAD set when
137 looking up for _Jv_AllocObject.
138 * except.c (build_throw): Likewise for _Jv_Throw.
139
140 2003-12-06 Mark Mitchell <mark@codesourcery.com>
141
142 PR c++/13323
143 * class.c (same_signature_p): Handle conversion operators
144 correctly.
145 (check_for_override): Likewise.
146
147 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
148
149 * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
150 (c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
151 (c++.uninstall): Likewise.
152
153 2003-12-05 Danny Smith <dannysmith@gcc.gnu.org>
154 Mark Mitchell <mark@codesourcery.com>
155
156 PR c++/13305
157 * parser.c (cp_parser_elaborated_type_specifier): Accept
158 attributes.
159
160 2003-12-05 Mark Mitchell <mark@codesourcery.com>
161
162 PR c++/13314
163 * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
164 calls.
165 (cp_parser_class_head): Likewise.
166
167 2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
168
169 PR c++/13166
170 * parser.c (cp_parser_late_parsing_default_args): Make sure the
171 context is a class before calling push_nested_class and
172 pop_nested_class.
173
174 2003-12-03 James E Wilson <wilson@specifixinc.com>
175
176 * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
177 support.
178
179 2003-12-03 Mark Mitchell <mark@codesourcery.com>
180
181 PR c++/9127
182 * cp-tree.h (at_namespace_scope_p): New function.
183 * parser.c (cp_parser_class_head): Handle invalid explicit
184 specializations.
185 * search.c (at_namespace_scope_p): New function.
186
187 PR c++/13179
188 * semantics.c (finish_handler_parms): Do not call eh_type_info for
189 types used in templates.
190
191 PR c++/10771
192 * parser.c (cp_parser_check_for_invalid_template_id): New
193 function.
194 (cp_parser_simple_type_specifier): Use it.
195 (cp_parser_elaborated_type_specifier): Likewise.
196 (cp_parser_class_head): Likewise.
197
198 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
199
200 PR c++/10126
201 * pt.c (convert_nontype_argument): Handle default conversions
202 while converting a pointer to member function.
203
204 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
205
206 PR c++/12573
207 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
208 looking into them recursively.
209
210 2003-12-02 Richard Henderson <rth@redhat.com>
211
212 * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
213 * parser.c (struct cp_token): Likewise.
214 (struct cp_parser_token_tree_map_node): Likewise.
215 * lex.c (struct resword): Move const after ENUM_BITFIELD.
216
217 2003-11-30 Mark Mitchell <mark@codesourcery.com>
218
219 PR c++/9849
220 * parser.c (cp_lexer_prev_token): New function.
221 (cp_parser_skip_to_closing_parenthesis): Add consume_paren
222 parameter.
223 (cp_parser_nested_name_specifier_opt): Add is_declaration
224 parameter.
225 (cp_parser_nested_name_specifier): Likewise.
226 (cp_parser_class_or_namespace_name): Likewise.
227 (cp_parser_class_name): Likewise.
228 (cp_parser_template_id): Likewise.
229 (cp_parser_template_name): Likewise.
230 (cp_parser_id_expression): Adjust calls to
231 cp_parser_nested_name_specifier_op, cp_parser_template_id,
232 cp_parser_class_name.
233 (cp_parser_unqualified_id): Likewise.
234 (cp_parser_postfix_expression): Likewise.
235 (cp_parser_pseudo_destructor_name): Likewise.
236 (cp_parser_cast_expression): Likewise.
237 (cp_parser_mem_initializer_id): Likewise.
238 (cp_parser_simple_type_specifier): Likewise.
239 (cp_parser_type_name): Likewise.
240 (cp_parser_elaborated_type_specifier): Likewise.
241 (cp_parser_qualified_namespace_specifier): Likewise.
242 (cp_parser_using_declaration): Likewise.
243 (cp_parser_using_directive): Likewise.
244 (cp_parser_ptr_operator): Likewise.
245 (cp_parser_declarator_id): Likewise.
246 (cp_parser_class_head): Likewise.
247 (cp_parser_base_specifier): Likewise.
248 (cp_parser_constructor_declarator_p): Likewise.
249 (cp_parser_direct_declarator): Fix typo in comment.
250 (cp_parser_parenthesized_expression_list): Adjust call to
251 cp_parser_skip_to_closing_parenthesis.
252 (cp_parser_selection_statement): Likewise.
253
254 2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
255
256 PR c++/12924
257 * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
258 with OVERLOAD and DECL nodes as the first operand.
259
260 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
261
262 * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
263
264 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
265
266 PR c++/5369
267 * friend.c (is_friend): Handle member function of a class
268 template as template friend.
269 (do_friend): Likewise.
270 * decl2.c (check_classfn): Add template_header_p parameter.
271 * decl.c (start_decl): Adjust check_classfn call.
272 (grokfndecl): Likewise.
273 * pt.c (is_specialization_of_friend): New function.
274 (uses_template_parms_level): Likewise.
275 (push_template_decl_real): Use uses_template_parms_level.
276 (tsubst_friend_function): Adjust check_classfn call.
277 * cp-tree.h (check_classfn): Adjust declaration.
278 (uses_template_parms_level): Add declaration.
279 (is_specialization_of_friend): Likewise.
280
281 2003-11-21 Mark Mitchell <mark@codesourcery.com>
282
283 PR c++/12515
284 * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
285 operator.
286
287 2003-11-21 Jan Hubicka <jh@suse.cz>
288
289 * parser.c (cp_parser_postfix_expression): Initialize 's' to
290 NULL_TREE.
291
292 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
293
294 * Make-lang.in (c++.extraclean): Delete.
295
296 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
297
298 * Make-lang.in (check-g++, lang_checks): Add.
299
300 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
301
302 PR c++/12932
303 * class.c (currently_open_derived_class): Check if
304 current_class_type is NULL_TREE.
305 * semantics.c (finish_call_expr): Check if
306 currently_open_derived_class returns NULL_TREE.
307 * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
308 parameter.
309
310 2003-11-17 Jason Merrill <jason@redhat.com>
311
312 * init.c (build_new_1): Preevaluate placement args.
313 * call.c (build_op_delete_call): Don't expose placement args to
314 overload resolution.
315
316 2003-11-16 Jason Merrill <jason@redhat.com>
317
318 * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
319 and TAGS files that include them for each front end.
320
321 2003-11-15 Bernardo Innocenti <bernie@develer.com>
322
323 PR c++/2294
324 * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
325 build failure on libjava.
326
327 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
328
329 PR c++/2294
330 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
331 unless the declaration is a built-in.
332 (set_namespace_binding): While binding OVERLOADs with only one
333 declaration, we still need to call supplement_binding.
334
335 2003-11-14 Mark Mitchell <mark@codesourcery.com>
336
337 PR c++/12762
338 * parser.c (cp_parser_enclosed_template_argument_list): New
339 function.
340 (cp_parser_template_id): Use it.
341 (cp_parser_simple_type_specifier): Recognize invalid template
342 syntax.
343
344 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
345
346 PR c++/2094
347 * pt.c (unify): Add support for PTRMEM_CST and
348 FIELD_DECL unification.
349
350 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
351
352 * decl.c (grokfndecl): Change OK to type tree.
353
354 2003-11-12 Mark Mitchell <mark@codesourcery.com>
355
356 * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
357 CONSTRUCTOR.
358
359 * decl.c (cp_make_fname_decl): When creating a top-level
360 __FUNCTION__-like symbol, do register it with pushdecl.
361
362 * decl.c (finish_case_label): Do not check that we are within a
363 switch statement here.
364 * parser.c (struct cp_parser): Add in_iteration_statement_p and
365 in_switch_statement_p.
366 (cp_parser_new): Initialize them.
367 (cp_parser_labeled_statement): Check validity of case labels
368 here.
369 (cp_parser_selection_statement): Set in_switch_statement_p.
370 (cp_parser_iteration_statement): Set in_iteration_statement_p.
371 (cp_parser_jump_statement): Check validity of break/continue
372 statements here.
373
374 PR c++/12735
375 * cp-tree.h (duplicate_decls): Return a tree.
376 * decl.c (duplicate_decls): Clarify documentation. Return
377 error_mark_node to indicate a failed redeclaration.
378 * friend.c (do_friend): Handle that case.
379 * name-lookup.c (pushdecl): Likewise.
380
381 2003-11-11 Jason Merrill <jason@redhat.com>
382
383 * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
384 * name-lookup.c (parse_using_directive): New fn.
385 (is_associated_namespace): New fn.
386 (arg_assoc_namespace): Also check associated namespaces.
387 * name-lookup.h: Declare new fns.
388 * pt.c (maybe_process_partial_specialization): Allow
389 specialization in associated namespace.
390 * parser.c (cp_parser_using_directive): Accept attributes. Use
391 parse_using_directive.
392
393 2003-11-10 Richard Henderson <rth@redhat.com>
394
395 * cvt.c (convert_to_void): Use void_zero_node after overload failure.
396
397 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
398
399 PR c++/12832
400 * name-lookup.c (supplement_binding): Gracefully handle names
401 used at non-class scope prior declaration.
402
403 2003-11-06 Matt Austern <austern@apple.com>
404
405 * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
406 * method.c (use_thunk): give thunk same visibility as function.
407 * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
408
409 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
410
411 PR c++/11616
412 * pt.c (instantiate_pending_templates): Save and restore
413 input_location.
414
415 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
416
417 PR c++/2019
418 * friend.c (add_friend): Don't display previous declaration in
419 case of duplicate friend warning.
420
421 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
422
423 PR c++/9810
424 * call.c (build_over_call): Check access using primary template
425 if FN is a member function template.
426
427 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
428
429 PR c++/12796
430 * class.c (handle_using_decl): Set input_location before calling
431 error_not_base_type.
432
433 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
434
435 PR c++/10371
436 * semantics.c (finish_non_static_data_member): Handle when
437 both processing_template_decl and qualifying_scope are true.
438
439 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
440
441 PR c++/11076
442 * class.c (handle_using_decl): Swap arguments of error_not_base_type.
443 * parser.c (cp_parser_direct_declarator): Only resolve typename for
444 namespace scope declarations.
445
446 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
447
448 PR c++/12698, c++/12699, c++/12700, c++/12566
449 * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
450 (debug_class, debug_thunks): New.
451 * class.c (dump_class_hierarchy_1): New break out from ...
452 (dump_class_hierarchy): ... here.
453 (dump_thunk, debug_thunks, debug_class): New.
454 (update_vtable_entry_for_fn): Add ssizetype casts. Correct
455 continued search for primary binfo via virtual.
456 (build_vtbl_initializer): Follow covariant thunk alias.
457 * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
458 (finish_thunk): Look for an alias of the covariant thunk and point
459 to it.
460 (use_thunk): We should never use an alias.
461 * semantics.c (emit_associated_thunks): Do not emit aliases.
462
463 PR c++/12566
464 * cp-tree.h (cp_fname_init): Add TYPE pointer param.
465 * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
466 create an ad-hoc ERROR_MARK.
467 (cp_make_fname_decl): Adjust.
468 * pt.c (tsubst_expr): Adjust.
469
470 2003-10-23 Jason Merrill <jason@redhat.com>
471
472 PR c++/12726
473 * tree.c (build_target_expr_with_type): Don't call force_rvalue
474 for CONSTRUCTORs.
475
476 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
477
478 * call.c: Fix comment formatting.
479 * class.c: Likewise.
480 * cxx-pretty-print.c: Likewise.
481 * init.c: Likewise.
482 * parser.c: Likewise.
483 * pt.c: Likewise.
484 * semantics.c: Likewise.
485 * tree.c: Likewise.
486 * typeck.c: Likewise.
487 * typeck2.c: Likewise.
488
489 2003-10-21 Mark Mitchell <mark@codesourcery.com>
490
491 PR c++/11962
492 * typeck.c (build_x_conditional_expr): Handle missing middle
493 operands in templates.
494 * mangle.c (write_expression): Issue errors about attempts to
495 mangle a non-existant middle operator to the ?: operator.
496
497 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
498 * decl.c (cp_finish_decl): Remove clause intended for asm directives
499 in struct or class fields: this code is never executed.
500
501 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
502
503 * decl.c (start_decl): Exit if push_template_decl returns
504 error_mark_node.
505
506 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
507
508 * ChangeLog: Fix typos.
509 * call.c: Fix comment typos.
510 * class.c: Likewise.
511 * cp-tree.h: Likewise.
512 * cvt.c: Likewise.
513 * cxx-pretty-print.c: Likewise.
514 * decl.c: Likewise.
515 * decl2.c: Likewise.
516 * init.c: Likewise.
517 * mangle.c: Likewise.
518 * name-lookup.c: Likewise.
519 * parser.c: Likewise.
520 * search.c: Likewise.
521 * semantics.c: Likewise.
522 * tree.c: Likewise.
523 * typeck.c: Likewise.
524
525 2003-10-20 Jan Hubicka <jh@suse.cz>
526
527 * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
528 the expansion.
529
530 2003-10-20 Mark Mitchell <mark@codesourcery.com>
531
532 * Make-lang.in (c++.install-info): Remove.
533
534 2003-10-20 Jason Merrill <jason@redhat.com>
535
536 * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
537 field.
538
539 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
540
541 PR c++/9781, c++/10583, c++/11862
542 * decl.c (cp_finish_decl): Exit immediately if decl is an
543 error_mark_node.
544 * pt.c (push_template_decl_real): Return error_mark_node for
545 invalid template declaration of variable.
546
547 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
548
549 PR c++/12495
550 * pt.c (lookup_template_class): Handle when current_class_type
551 is a local class.
552
553 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
554
555 PR c++/2513
556 * decl.c (make_typename_type): Use dependent_type_p.
557 (make_unbound_class_template): Likewise.
558 * pt.c (instantiate_class_template): Increment
559 processing_template_decl during substitution of template friend
560 function. Preincrement processing_template_decl rather than
561 postincrement.
562 (get_mostly_instantiated_function_type): Increment
563 processing_template_decl during partial substitution of function
564 type.
565
566 2003-10-15 Jan Hubicka <jh@suse.cz>
567
568 PR c++/12574
569 * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
570
571 2003-10-14 Jason Merrill <jason@redhat.com>
572
573 PR c++/11878
574 * tree.c (build_target_expr_with_type): Call force_rvalue for
575 classes with non-trivial copy ctors.
576
577 PR c++/11063
578 * typeck.c (build_modify_expr): Call convert rather than abort.
579
580 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
581
582 Breack out decl.c (3/n)
583 * name-lookup.c: Include flags.h
584 (lookup_name_current_level): Make static.
585 (add_decl_to_level): Likewise.
586 (push_local_binding): Likewise.
587 (push_overloaded_decl): Likewise.
588 (lookup_using_namespace): Likewise.
589 (qualified_lookup_using_namespace): Likewise.
590 (lookup_type_current_level): Likewise.
591 (unqualified_namespace_lookup): Likewise.
592 (namespace_ancestor): Likewise.
593 (push_using_directive): Likewise.
594 * decl.c (pushdecl): Move to name-lookup.c.
595 (pushdecl_top_level_1): Likewise.
596 (pushdecl_top_level): Likewise.
597 (pushdecl_top_level_and_finish): Likewise.
598 (maybe_push_decl): Likewise.
599 (push_using_decl): Likewise.
600 (push_overloaded_decl): Likewise.
601 (make_anon_name): Likewise.
602 (anon_cnt): Likewise.
603 (clear_anon_tags): Likewise.
604 (maybe_inject_for_scope_var): Likewise.
605 (check_for_out_of_scope_variable): Likewise.
606 * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
607 * decl.c (warn_extern_redeclared_static): Export.
608 * cp-tree.h (warn_extern_redeclared_static): Declare.
609
610 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
611
612 * Make-lang.in: Replace uses of $(target_alias) with
613 $(target_noncanonical).
614
615 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
616
617 * ChangeLog: Add PR number to patch for PR c++/12370.
618
619 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
620
621 * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
622 (binding_for_name): Likewise.
623 (cxx_binding_clear): Move to name-lookup.c.
624 * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
625 (binding_for_name): Likewise.
626 * decl2.c (is_ancestor): Move to name-lookup.c
627 (namespace_ancestor): Likewise.
628 (add_using_namespace): Likewise.
629 (ambiguous_decl): Likewise.
630 (lookup_using_namespace): Likewise.
631 (qualified_lookup_using_namespace): Likewise.
632 (set_decl_namespace): Likewise.
633 (decl_namespace): Likewise.
634 (current_decl_namespace): Likewise.
635 (push_decl_namespace): Likewise.
636 (pop_decl_namespace): Likewise.
637 (push_scope): Likewise.
638 (pop_scope): Likewise.
639 (struct arg_lookup): Likewise.
640 (arg_assoc): Likewise.
641 (arg_assoc_args): Likewise.
642 (arg_assoc_type): Likewise.
643 (add_function): Likewise.
644 (arg_assoc_namespace): Likewise.
645 (arg_assoc_class): Likewise.
646 (arg_assoc_template_arg): Likewise.
647 (do_namespace_alias): Likewise.
648 (validate_nonmember_using_decl): Likewise.
649 (do_nonmember_using_decl): Likewise.
650 (do_toplevel_using_decl): Likewise.
651 (do_local_using_decl): Likewise.
652 (do_class_using_decl): Likewise.
653 (do_using_directive): Likewise.
654 (constructor_name_full): Likewise.
655 (constructor_name): Likewise.
656 (constructor_name_p): Likewise.
657
658 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
659
660 Break out decl.c (2/n)
661 * name-lookup.c: Include diagnostic.h
662 (cxx_binding_free): Make static.
663 (cxx_binding_make): Likewise.
664 (binding_table_new): Likewise
665 (binding_table_free): Likewise.
666 (binding_table_insert): Likewise.
667 (binding_table_find_anon_type): Likewise.
668 (binding_table_reverse_maybe_remap): Likewise.
669 (supplement_binding): Likewise.
670 * name-lookup.h (global_scope_name): Declare extern.
671 (global_type_node): Likewise.
672 (cxx_binding_free): Don't export.
673 (cxx_binding_make): Likewise.
674 (binding_table_new): Likewise.
675 (binding_table_free): Likewise.
676 (binding_table_insert): Likewise.
677 (binding_table_find_anon_type): Likewise.
678 (binding_table_reverse_maybe_remap): Likewise.
679 * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
680 * decl.c (lookup_namespace_name): Move to name-lookup.c
681 (select_decl): Likewise.
682 (unqualified_namespace_lookup): Likewise.
683 (lookup_qualified_name): Likewise.
684 (lookup_name_real): Likewise.
685 (lookup_name_nonclass): Likewise.
686 (lookup_function_nonclass): Likewise.
687 (lookup_name): Likewise.
688 (lookup_name_current_level): Likewise.
689 (lookup_type_current_level): Likewise.
690 (lookup_flags): Likewise.
691 (qualify_lookup): Likewise.
692 (lookup_tag): Likewise.
693 (lookup_tag_reverse): Likewise.
694 (getdecls): Likewise.
695 (storedecls): Remove.
696 (cxx_remember_type_decls): Move to name-lookup.c.
697 (global_bindings_p): Likewise.
698 (innermost_nonclass_level): Likewise.
699 (toplevel_bindings_p): Likewise.
700 (namespace_bindings_p): Likewise.
701 (kept_level_p): Likewise.
702 (innermost_scope_kind): Likewise.
703 (template_parm_scope_p): Likewise.
704 (push_binding): Likewise.
705 (push_local_binding): Likewise.
706 (add_decl_to_level): Likewise. Make extern.
707 (push_class_binding): Move to name-lookup.c.
708 (resume_level): Likewise. Rename to resume_scope.
709 (begin_scope): Move to name-lookup.c.
710 (indent): Likewise.
711 (binding_depth): Likewise.
712 (is_class_level): Likewise.
713 (cxx_scope_descriptor): Likewise.
714 (cxx_scope_debug): Likewise.
715 (namespace_scope_ht_size): Likewise.
716 (leave_scope): Likewise.
717 (pushlevel_class): Likewise.
718 (poplevel_class): Likewise.
719 (clear_identifier_class_values): Likewise.
720 (pushdecl_with_scope): Likewise.
721 (pushdecl_namespace_level): Likewise.
722 (pushdecl_class_level): Likewise.
723 (push_class_level_binding): Likewise.
724 (push_using_directive): Likewise.
725 (identifier_global_value): Likewise.
726 (keep_next_level_flag): Likewise.
727 (keep_next_level): Likewise.
728 (free_binding_level): Likewise.
729 (set_class_shadows): Likewise.
730 (maybe_push_cleanup_level): Likewise.
731 (cp_namespace_decls): Likewise.
732 (bt_print_entry): Likewise.
733 (print_binding_level): Likewise.
734 (print_other_binding_stack): Likewise.
735 (print_binding_stack): Likewise.
736 (push_namespace): Likewise.
737 (pop_namespace): Likewise.
738 (push_nested_namespace): Likewise.
739 (pop_nested_namespace): Likewise.
740 (cxx_saved_binding_make): Likewise.
741 (struct cxx_saved_binding_make): Likewise.
742 (store_bindings): Likewise.
743 (maybe_push_to_top_level): Likewise.
744 (push_to_top_level): Likewise.
745 (pop_from_top_level): Likewise.
746 (identifier_type_value): Likewise.
747 (set_identifier_type_value): Likewise.
748 (set_identifier_type_value_with_scope): Likewise.
749 (pop_everything): Likewise.
750 (pushtag): Likewise.
751 (follow_tag_typedef): Likewise.
752 (maybe_process_template_type_declaration): Likewise.
753 (pop_binding): Likewise.
754 * cp-tree.h: Move corresponding declarations to name-lookup.h
755
756 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
757
758 * cvt.c (ocp_convert): Move warning to C common code.
759
760 2003-10-09 Jason Merrill <jason@redhat.com>
761
762 PR c++/6392
763 * tree.c (build_cplus_array_type): Handle all quals the same.
764 (cp_build_qualified_type_real): Look through arrays first.
765
766 * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
767 (build_target_expr_with_type): Likewise.
768
769 * pt.c (instantiate_class_template): Sanity check that our
770 enclosing class has been instantiated.
771
772 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
773
774 * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
775 * error.c (dump_function_decl): Use it to skip the dump of the
776 arguments.
777 (dump_expr): When dumping a declaration found within an
778 expression, always set TFF_NO_FUNCTION_ARGUMENTS
779 in the flags.
780
781 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
782
783 PR c++/11097
784 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
785 USING_DECL.
786
787 2003-10-06 Mark Mitchell <mark@codesourcery.com>
788
789 PR c++/10147
790 * call.c (initialize_reference): Tweak error message.
791 * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
792 pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
793 * cxx-pretty-print.c (pp_cxx_id_expression): Always display
794 qualified entities using qualified names.
795
796 PR c++/12337
797 * init.c (build_new_1): Make sure that the expression returned is
798 not an lvalue.
799
800 PR c++/12344, c++/12236, c++/8656
801 * decl.c (start_function): Do not ignore attributes embedded in a
802 function declarator.
803
804 2003-10-06 Mark Mitchell <mark@codesourcery.com>
805
806 * Make-lang.in (c++.info): Remove.
807 (c++.dvi): Remove.
808 (c++.generated-manpages): Replace with ...
809 (generated-manpages): ... this.
810
811 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
812
813 * decl.c (struct cp_binding_level): Move to name-lookup.h
814 (current_binding_level): Likewise.
815 (class_binding_level): Likewise.
816 * cp-tree.h (enum scope_kind): Likewise.
817
818 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
819
820 * name-lookup.c (binding_entry_free): Nullify name and type
821 fields.
822
823 2003-10-02 Mark Mitchell <mark@codesourcery.com>
824
825 PR c++/12486
826 * typeck.c (finish_class_member_access_expr): Issue diagnostic
827 on erroneous use of qualified name.
828
829 2003-09-30 Richard Henderson <rth@redhat.com>
830
831 PR c++/12370
832 * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
833
834 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
835
836 * g++spec.c: Convert to ISO C90 prototypes.
837 * parser.c: Likewise.
838
839 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
840
841 * decl.c (pop_binding): Don't mess with nullifying binding->scope
842 here.
843 * name-lookup.c: Re-format.
844 (cxx_binding_free): Nullify binding->scope.
845
846 2003-09-29 Jan Hubicka <jh@suse.cz>
847
848 PR C++/12047
849 * except.c (build_eh_type_type): Call mark_used on the type.
850
851 2003-09-28 Richard Henderson <rth@redhat.com>
852
853 * typeck.c (c_expand_asm_operands): Take location_t, instead of
854 individual file and line.
855
856 2003-09-28 Andreas Jaeger <aj@suse.de>
857
858 * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
859 definition.
860 * init.c (push_base_cleanups): Likewise.
861 * decl2.c (finish_file): Likewise.
862 * mangle.c (init_mangle): Likewise.
863 (dump_substitution_candidates): Likewise.
864 * search.c: Likewise.
865
866 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
867
868 * name-lookup.h (get_global_value_if_present): New function.
869 (is_typename_at_global_scope): Likewise.
870 * except.c (do_begin_catch): Use get_global_value_if_present.
871 (do_end_catch): Likewise.
872 (do_allocate_exception): Likewise.
873 (do_free_exception): Likewise.
874 (build_throw): Likewise.
875 * parser.c (cp_parser_member_declaration): Likewise.
876 * rtti.c (throw_bad_cast): Likewise.
877 (throw_bad_typeid): Likewise.
878 * decl.c (check_tag_decl): Use is_typename_at_global_scope.
879 (grokdeclarator): Likewise.
880 * cp-tree.h (global_namespace): Move to name-lookup.h
881 * call.c (call_builtin_trap): Tidy.
882
883 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
884
885 PR c++/11415
886 * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
887 error message when parser->scope is global_namespace.
888
889 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
890
891 * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
892 macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
893
894 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
895
896 * decl.c (pop_binding_level, suspend_binding_level,
897 find_class_binding_level): Merge into leave_scope. Remove.
898 (leave_scope): New function.
899 (poplevel): Update.
900 (poplevel_class): Likewise.
901 (pop_namespace): Likewise.
902
903 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
904
905 PR c++/5655
906 * parser.c (cp_parser_check_access_in_redeclaration): New function.
907 (cp_parser_member_declaration): Use it.
908 (cp_parser_template_declaration_after_export): Likewise.
909
910 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
911
912 * cp-tree.h (scope_kind): Add new enumerator.
913 (keep_next_level): Change parameter type to bool.
914 (begin_scope): Change prototype.
915 (pushlevel): Remove declaration.
916 * decl.c (push_binding_level): Fold in begin_scope. Remove.
917 (struct cp_binding_level): Remove tag_tranparent field. Make keep
918 of bitsize one.
919 (keep_next_level_flag): Make a bool.
920 (cxx_scope_descriptor): Update scope names table
921 (make_cxx_scope): Fold in begin_scope. Remove..
922 (namespace_scope_ht_size): New function.
923 (begin_scope): Change prototype. Return a scope. Tidy.
924 (kept_level_p): Update.
925 (pushlevel): Remove.
926 (maybe_push_cleanup_level): Simplify.
927 (poplevel): Update for sk_cleanup and keep change.
928 (print_binding_level): Likewise.
929 (initial_push_namespace_scope): Fold in begin_scope. Remove.
930 (push_namespace): Update.
931 (pushtag): Likewise.
932 (lookup_tag): Likewise.
933 (lookup_name_current_level): Likewise.
934 (lookup_type_current_level): Likewise.
935 (cxx_init_decl_processing): Likewise.
936 (start_function): Likewise.
937 (begin_function_body): Likewise.
938 (start_method): Likewise.
939 * pt.c (push_inline_template_parms_recursive): Likewise.
940 (begin_template_parm_list): Likewise.
941 (begin_specialization): Likewise.
942 * semantics.c (do_pushlevel): Likewise.
943 (begin_compound_stmt): Likewise.
944 (begin_stmt_expr): Likewise.
945
946 2003-09-21 Richard Henderson <rth@redhat.com>
947
948 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
949 method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
950
951 2003-09-21 Richard Henderson <rth@redhat.com>
952
953 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
954 method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
955 DECL_SOURCE_LOCATION rename and change to const.
956
957 2003-09-20 Richard Henderson <rth@redhat.com>
958
959 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
960
961 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
962
963 PR c++/157
964 * parser.c (cp_parser_direct_declarator): Clear
965 parser->num_template_parameter_lists when parsing function
966 parameters.
967 (cp_parser_constructor_declarator_p): Likewise.
968
969 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
970
971 PR c++/495
972 * pt.c (tsubst_friend_class): Only use innermost template
973 arguments for the injected friend class template.
974
975 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
976
977 PR c++/12332
978 * pt.c (instantiate_class_template): Increment
979 processing_template_decl around the tsubst of a template member
980 function.
981
982 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
983
984 * decl.c (cxx_scope_descriptor): Fix thinko.
985 (struct cp_binding_level): Adjust type of binding_depth field.
986
987 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
988
989 PR c++/12320
990 * call.c (type_passed_as): Check for incomplete type.
991 (convert_for_arg_passing): Likewise.
992
993 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
994
995 PR c++/9848
996 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
997 here.
998 * semantics.c (expand_body): Set it here on the remaining clones.
999
1000 2003-09-18 Roger Sayle <roger@eyesopen.com>
1001
1002 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
1003 * class.c (instantiate_type): Remove FFS_EXPR case.
1004
1005 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1006
1007 * ChangeLog: Fix recent commit.
1008
1009 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1010
1011 * ChangeLog: Add PR number to patch for PR c++/12316.
1012
1013 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
1014
1015 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
1016 "C" types.
1017 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
1018
1019 2003-09-17 Richard Henderson <rth@redhat.com>
1020
1021 * semantics.c (expand_body): Don't save/restore input_location.
1022
1023 2003-09-17 Mark Mitchell <mark@codesourcery.com>
1024
1025 PR c++/12266
1026 * cp-tree.h (tsubst_flags_t): Add tf_conv.
1027 * class.c (standard_conversion): Pass tf_conv to
1028 instantiate_type.
1029 (resolve_address_of_overloaded_function): Do not call mark_used
1030 when just checking conversions.
1031
1032 PR debug/12066
1033 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
1034 * cp-tree.h (cxx_builtin_type_decls): Declare.
1035 * decl.c (builtin_type_decls): New variables.
1036 (cxx_builtin_type_decls): New function.
1037 (record_builtin_type): Add to builtin_type_decls.
1038
1039 2003-09-17 Richard Henderson <rth@redhat.com>
1040
1041 PR c++/12316
1042 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
1043
1044 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1045
1046 PR c++/7939
1047 * typeck.c (comptypes): Don't ICE when its first argument is
1048 error_mark_node.
1049 (compparms): Reverse the arguments of same_type_p.
1050
1051 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
1052
1053 PR c++/12184
1054 * typeck.c (convert_arguments): Return error_mark_node for an
1055 incomplete parameter. Make error message more informative.
1056
1057 2003-09-12 Mark Mitchell <mark@codesourcery.com>
1058
1059 PR c++/3907
1060 * class.c (maybe_note_name_used_in_class): Refine test for whether
1061 or not we are in a class scope.
1062
1063 * cp-tree.h (language_function): Remove x_expanding_p.
1064 (expanding_p): Remove.
1065 (doing_semantic_analysis_p): Remove.
1066 (scope_kind): Add sk_function_parms, sk_class,
1067 sk_namespace.
1068 (innermost_scope_kind): New method.
1069 * call.c (cxx_type_promotes_to): Use type_decays_to.
1070 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
1071 (LANG_HOOKS_POPLEVEL): Likewise.
1072 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
1073 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
1074 is_catch_scope. Add kind and explicit_spec_p.
1075 (cxx_scope_descriptor): Use a lookup table.
1076 (find_class_binding_level): Use "kind" field in binding_level, not
1077 the various flags.
1078 (pop_binding_level): Likewise.
1079 (innermost_nonclass_level): Likewise.
1080 (toplevel_bindings_p): Likewise.
1081 (namespace_bindings_p): Likewise.
1082 (template_parm_scope_p): Likewise.
1083 (innermost_scope_kind): New method.
1084 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
1085 the various flags.
1086 (pushlevel): Remove check for doing_semantic_analysis_p.
1087 (begin_scope): Simplify.
1088 (add_decl_to_level): Use "kind" field in binding_level, not
1089 the various flags.
1090 (push_local_binding): Likewise.
1091 (pop_label): Remove check for doing_semantic_analysis_p.
1092 (poplevel): Use "kind" field in binding_level, not
1093 the various flags.
1094 (set_block): Remove check for doing_semantic_analysis_p.
1095 (pushlevel_class): Use "kind" field in binding_level, not
1096 the various flags.
1097 (poplevel_class): Likewise.
1098 (initial_push_namespace_scope): Likewise.
1099 (maybe_push_to_top_level): Likewise.
1100 (set_identifier_type_value_with_scope): Likewise.
1101 (pop_everything): Likewise.
1102 (maybe_process_template_type_declaration): Likewise.
1103 (pushtag): Likewise.
1104 (pushdecl): Likewise.
1105 (pushdecl_with_scope): Likewise.
1106 (check_previous_goto_1): Likewise.
1107 (define_label): Likewise.
1108 (finish_case_label): Likewise.
1109 (lookup_tag): Likewise.
1110 (unqualified_namespace_lookup): Likewise.
1111 (lookup_name_real): Likewise.
1112 (lookup_name_current_level): Likewise.
1113 (lookup_type_current_level): Likewise.
1114 (record_builtin_type): Likewise.
1115 (cp_make_fname_decl): Likewise.
1116 (maybe_inject_for_scope_var): Likewise.
1117 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
1118 (start_function): Use begin_scope, not pushlevel.
1119 (finish_function): Use "kind" field in binding_level, not
1120 the various flags.
1121 (start_method): Use begin_scope, not pushlevel.
1122 (make_label_decl): Do not check expanding_p.
1123 (save_function-data): Do not set expanding_p.
1124 (cxx_push_function_context): Do not clear expanding_p.
1125 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
1126
1127 2003-09-14 Mark Mitchell <mark@codesourcery.com>
1128
1129 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
1130 an bit-field whose width exceeds that of its type.
1131
1132 2003-09-14 Geoffrey Keating <geoffk@apple.com>
1133
1134 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
1135
1136 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
1137
1138 * ChangeLog: Follow spelling conventions.
1139 * parser.c: Likewise.
1140
1141 2003-09-13 Richard Henderson <rth@redhat.com>
1142
1143 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
1144 during relaxation loop.
1145
1146 2003-09-11 David Edelsohn <edelsohn@gnu.org>
1147
1148 * decl2.c (var_finalized_p): Swap arms of conditional.
1149
1150 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
1151
1152 PR c++/11788
1153 * typeck.c (build_address): If it is a function, mark it used.
1154 (build_unary_op): Do not lose object's side-effects when taking
1155 address of static member function.
1156 * class.c (resolve_address_of_overloaded_function): Use
1157 tsubst_flags_t parameter. Only expect overload sets. Adjust.
1158 (instantiate_type): Adjust flags passing. Do not lose object's
1159 side-effects when taking address of static member function.
1160
1161 2003-09-11 Richard Henderson <rth@redhat.com>
1162
1163 * semantics.c (expand_or_defer_fn): Update for new
1164 cgraph_finalize_function argument.
1165
1166 2003-09-10 Richard Henderson <rth@redhat.com>
1167
1168 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
1169
1170 2003-09-10 Jan Hubicka <jh@suse.cz>
1171
1172 * decl2.c (var_finalized_p): New.
1173 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
1174
1175 2003-09-10 Richard Henderson <rth@redhat.com>
1176
1177 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
1178 mark_member_pointers.
1179 (lower_function): Remove.
1180 * cp-tree.h: Update to match.
1181 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
1182 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
1183
1184 2003-09-09 Richard Henderson <rth@redhat.com>
1185
1186 * semantics.c (expand_or_defer_fn): Update call to
1187 cgraph_finalize_function.
1188
1189 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1190 always.
1191
1192 * decl2.c (finish_file): Avoid out-of-bounds array reference
1193 during memmove.
1194
1195 2003-09-09 Richard Henderson <rth@redhat.com>
1196
1197 * decl2.c (mark_member_pointers): Rename from
1198 mark_member_pointers_and_eh_handlers and don't check eh handlers.
1199
1200 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
1201
1202 PR bootstrap/12168
1203 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1204
1205 2003-09-08 Mark Mitchell <mark@codesourcery.com>
1206
1207 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1208 c_register_builtin_type.
1209
1210 PR c++/11786
1211 * decl2.c (add_function): Do not complain about seeing the same
1212 non-function twice.
1213 * semantics.c (perform_koenig_lookup): Improve documentation.
1214
1215 PR c++/5296
1216 * pt.c (try_one_overload): Add addr_p parameter.
1217 (resolve_overloaded_unification): Pass it.
1218
1219 2003-09-08 Richard Henderson <rth@redhat.com>
1220
1221 * optimize.c (maybe_clone_body): Inc/dec function_depth.
1222
1223 2003-09-08 Richard Henderson <rth@redhat.com>
1224
1225 * decl.c (finish_function): Clear current_function_decl.
1226 * decl2.c (mark_used): Don't push/pop gc context.
1227 * optimize.c (optimize_function): Likewise.
1228 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1229 * pt.c (instantiate_decl): Inc/dec function_depth instead.
1230 * semantics.c (expand_body): Update for tree_rest_of_compilation
1231 nested argument.
1232
1233 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
1234
1235 PR c++/11762
1236 * error.c (dump_decl): Handle namespace-alias-definition.
1237 * decl.c (warn_extern_redeclared_static): There is no point in
1238 checking changes in storage class specifier for a namespace
1239 declaration.
1240 (duplicate_decls): Tidy diagnostic message.
1241 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1242 (pp_cxx_right_brace): Likewise.
1243 (pp_cxx_original_namespace_definition): New function.
1244 (pp_cxx_namespace_alias_definition): Likewise.
1245 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
1246
1247 2003-09-07 Jan Hubicka <jh@suse.cz>
1248
1249 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1250 Avoid re-emitting variables in unit-at-a-time mode.
1251
1252 2003-09-06 Mark Mitchell <mark@codesourcery.com>
1253
1254 PR c++/11867
1255 * call.c (standard_conversion): Improve comments.
1256 (perform_direct_initialization): Make sure we return an expression
1257 of the correct type.
1258 * typeck.c (build_static_cast): Check for ambiguity and
1259 accessibility when performing conversions.
1260
1261 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
1262
1263 * cp-tree.h (add_binding): Remove declaration.
1264 * name-lookup.h (supplement_binding): Declare.
1265 * decl.c (add_binding): Move to name-lookup.c.
1266 (push_local_binding): Adjust.
1267 (push_class_binding): Likewise.
1268 (set_identifier_type_value_with_scope): Likewise.
1269 * name-lookup.c (supplement_binding): Rename from add_binding.
1270 Return a bool. Improve documentation.
1271 (set_namespace_binding): Adjust.
1272 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1273
1274 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1275
1276 PR c++/11794
1277 * class.c (pushclass): Push dependent using decls for nested
1278 classes of templates too.
1279
1280 2003-09-06 Roger Sayle <roger@eyesopen.com>
1281
1282 PR c++/11409
1283 * class.c (resolve_address_of_overloaded_function): When building
1284 list of matching non-template function decls, ignore anticipated
1285 declarations of undeclared or shadowed GCC builtins.
1286
1287 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
1288
1289 PR c++/11595
1290 * decl.c (define_label): Remove unreachable timevar pop.
1291 Always return the decl, even if the definition is invalid.
1292
1293 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
1294
1295 PR c++/12167
1296 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1297 unparsed functions queue.
1298
1299 2003-09-05 Mark Mitchell <mark@codesourcery.com>
1300
1301 PR c++/12163
1302 * call.c (perform_direct_initialization): Correct logic for
1303 direct-initialization of a class type.
1304
1305 PR c++/12146
1306 * pt.c (lookup_template_function): Robustify.
1307
1308 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
1309
1310 PR c++/11922
1311 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1312 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1313 is_type_p to lookup_qualified_name.
1314
1315 * semantics.c (finish_call_expr): Refactor some code.
1316
1317 PR c++/12037
1318 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1319 (build_min_non_dep): Declare.
1320 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1321 (build_min_non_dep): New.
1322 * cvt.c (convert_to_void): Don't explicitly copy
1323 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1324 * call.c (build_new_method_call): Use build_min_non_dep.
1325 * decl2.c (grok_array_decl): Likewise.
1326 (build_offset_ref_call_from_tree): Likewise.
1327 * typeck.c (finish_class_member_access_expr,
1328 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1329 build_x_conditional_expr, build_x_compound_expr): Likewise.
1330 (build_static_cast, build_reinterpret_cast,
1331 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1332 * typeck2.c (build_x_arrow): Use build_min_non_dep.
1333 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1334 template.
1335 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1336 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1337 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1338
1339 2003-09-04 Richard Henderson <rth@redhat.com>
1340
1341 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1342 change in cgraph_mark_needed_node arguments.
1343
1344 2003-09-02 Geoffrey Keating <geoffk@apple.com>
1345
1346 PR 12161
1347 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1348 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1349
1350 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
1351
1352 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1353 (expr_sizeof): Replace with ...
1354 (cxx_sizeof_or_alignof_expr): ... here.
1355 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1356 * parser.c (cp_parser_unary_expression): Commonize alignof and
1357 sizeof handling.
1358 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1359 substitution.
1360 * semantics.c (finish_sizeof, finish_alignof): Remove.
1361 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1362 becomes bool. Set TREE_READONLY.
1363 (expr_sizeof): Replace with ...
1364 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1365
1366 2003-09-04 Mark Mitchell <mark@codesourcery.com>
1367
1368 Remove cast-as-lvalue extension.
1369 * call.c (build_conditional_expr): Correct formatting.
1370 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1371 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1372 * cp-tree.h (non_cast_lvalue_p): Remove.
1373 (real_non_cast_lvalue_p): Remove.
1374 (non_cast_lvalue_or_else): Remove.
1375 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1376 (real_lvalue_p): Adjust call to lvalue_p_1.
1377 (non_cast_lvalue_p): Remove.
1378 (non_cast_lvalue_or_else): Remove.
1379 (lvalue_p): Adjust call to lvalue_p_1.
1380 (lvalue_or_else): Simplify.
1381 * typeck.c (build_unary_op): Use lvalue_or_else, not
1382 non_cast_lvalue_or_else.
1383 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1384
1385 2003-09-03 DJ Delorie <dj@redhat.com>
1386
1387 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1388
1389 2003-09-03 Mark Mitchell <mark@codesourcery.com>
1390
1391 PR c++/12053
1392 * class.c (include_empty_classes): Correct logic for ABI version 1.
1393
1394 2003-09-03 Richard Henderson <rth@redhat.com>
1395
1396 * optimize.c (optimize_function): Push/pop ggc context around
1397 the call to optimize_inline_calls.
1398
1399 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
1400
1401 PR c++/11553
1402 * parser.c (cp_parser_decl_specifier_seq): Add check for a
1403 duplicate friend decl-specifier.
1404
1405 2003-09-02 Mark Mitchell <mark@codesourcery.com>
1406
1407 PR c++/11847
1408 * pt.c (convert_nontype_argument): Correct representation of
1409 REFERENCE_TYPE expressions.
1410
1411 PR c++/11808
1412 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1413 (finish_call_expr): Change prototype.
1414 * parser.c (cp_parser_postfix_expression): Adjust call to
1415 finish_call_expr.
1416 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1417 * semantics.c (finish_call_expr): Add koenig_p parameter.
1418
1419 2003-09-01 Mark Mitchell <mark@codesourcery.com>
1420
1421 PR c++/12114
1422 * cp-tree.h (initialize_reference): Change prototype.
1423 * call.c (initialize_reference): Add cleanup parameter.
1424 * decl.c (grok_reference_init): Likewise.
1425 (check_initializer): Likewise.
1426 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1427 (duplicate_decls): When replacing an anticipated builtin, do not
1428 honor TREE_NOTHROW.
1429 * typeck.c (convert_for_initialization): Correct call to
1430 initialize_reference.
1431
1432 PR c++/11972
1433 * pt.c (dependent_type_p_r): Pass only the innermost template
1434 arguments to any_dependent_template_arguments_p.
1435
1436 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
1437
1438 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1439 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1440 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1441 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1442 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1443
1444 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1445
1446 PR c++/12093
1447 * pt.c (build_non_dependent_expr): Do not build a
1448 NON_DEPENDENT_EXPR for a STRING_CST.
1449
1450 PR c++/11928
1451 * search.c (add_conversions): Avoid adding two conversion
1452 operators for the same type.
1453
1454 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1455
1456 PR c++/6196
1457 * pt.c (tsubst_copy_and_build): Correct handling of
1458 address-of-label extension.
1459 * semantics.c (finish_goto_stmt): The address of a label must go
1460 through the lvalue-to-rvalue conversion.
1461
1462 2003-08-29 Richard Henderson <rth@redhat.com>
1463 Jason Merrill <jason@redhat.com>
1464
1465 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1466 (LANG_HOOKS_RTL_EXPAND_STMT): New.
1467 * cp-tree.h (cxx_expand_function_start): Declare.
1468 * decl.c (start_function): Use allocate_struct_function.
1469 Move stmts_are_full_exprs_p assertion from expand_body.
1470 Do not free_after_parsing or free_after_compilation.
1471 (cxx_push_function_context): Move code to set struct function
1472 data from genrtl_start_function.
1473 * optimize.c (optimize_function): Don't inc/dec function_depth.
1474 * semantics.c (expand_body): Use tree_rest_of_compilation.
1475 (cxx_expand_function_start): Rename from genrtl_start_function,
1476 omit bits done by tree_rest_of_compilation.
1477 (genrtl_finish_function): Remove.
1478 (clear_decl_rtl): Move to ../tree-optimize.c.
1479
1480 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1481
1482 PR c++/11811
1483 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1484 function.
1485 * cxx-pretty-print.h: Declare.
1486 * error.c (dump_template_parameter): Use it.
1487 (dump_type): Likewise.
1488
1489 2003-08-28 Mark Mitchell <mark@codesourcery.com>
1490
1491 * init.c (decl_constant_value): Deal with COND_EXPR specially.
1492 * call.c (build_conditional_expr): Revert previous patch.
1493
1494 PR optimization/5079
1495 * call.c (build_conditional_expr): Use decl_constant_value to
1496 simplify the arguments.
1497
1498 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
1499
1500 * parser.c (struct cp_token): Use enum bitfields.
1501 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1502 512B allocation unit.
1503 (cp_parser_token_tree_map_node): Use enum bitfields.
1504
1505 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
1506
1507 PR c++/11871
1508 * decl.c (push_class_level_binding): Correct old_decl value from
1509 my 2003-07-29 reorganization.
1510
1511 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1512 (build_new_method_call): Add goto finish.
1513 * semantics.c (simplify_aggr_init_exprs_r): Don't set
1514 TREE_SIDE_EFFECTS on a call.
1515
1516 2003-08-25 Richard Henderson <rth@redhat.com>
1517
1518 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1519
1520 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1521
1522 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1523 (cxx_pretty_printer): Adjust base type.
1524 (pp_cxx_function_specifier): Declare.
1525 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1526 (pp_cxx_left_paren): Likewise.
1527 (pp_cxx_right_paren): Likewise.
1528 (pp_cxx_dot): Likewise.
1529 (pp_cxx_arrow): Likewise.
1530 (pp_cxx_semicolon): Likewise.
1531 (pp_cxx_identifier): Likewise.
1532 (pp_cxx_cv_qualifier_seq): Likewise.
1533 (pp_cxx_storage_class_specifier): Likewise.
1534 (pp_cxx_expression_list): Likewise.
1535 (pp_cxx_space_for_pointer_operator): Likewise.
1536 (pp_cxx_init_declarator): Likewise.
1537 (pp_cxx_call_argument_list): Likewise.
1538 (pp_cxx_nonconsecutive_character): Tidy.
1539 (pp_cxx_conversion_function_id): New function.
1540 (pp_cxx_template_id): Likewise.
1541 (pp_cxx_template_keyword_if_needed): Likewise.
1542 (pp_cxx_nested_name_specifier): Likewise.
1543 (pp_cxx_unqualified_id): Tidy
1544 (pp_cxx_qualified_id): Handle more nodes.
1545 (pp_cxx_primary_expression): Tidy.
1546 (pp_cxx_postfix_expression): Likewise.
1547 (pp_cxx_new_expression): Tidy.
1548 (pp_cxx_delete_expression): Likewise.
1549 (pp_cxx_cast_expression): New function.
1550 (pp_cxx_pm_expression): Tidy.
1551 (pp_cxx_conditional_expression): Likewise.
1552 (pp_cxx_assignment_operator): New function.
1553 (pp_cxx_assignment_expression): Tidy.
1554 (pp_cxx_expression): New function.
1555 (pp_cxx_function_specifier): Likewise.
1556 (pp_cxx_decl_specifier_seq): Likewise.
1557 (pp_cxx_simple_type_specifier): Tidy.
1558 (pp_cxx_type_specifier_seq): Likewise.
1559 (pp_cxx_ptr_operator): New function.
1560 (pp_cxx_implicit_parameter_type): Likewise.
1561 (pp_cxx_parameter_declaration): Tidy.
1562 (pp_cxx_parameter_declaration_clause): New function.
1563 (pp_cxx_exception_specification): Likewise.
1564 (pp_cxx_direct_declarator): Tidy.
1565 (pp_cxx_declarator): Likewise.
1566 (pp_cxx_ctor_initializer): New function.
1567 (pp_cxx_function_definition): Likewise.
1568 (pp_cxx_abstract_declarator): Tidy.
1569 (pp_cxx_direct_abstract_declarator): Likewise.
1570 (pp_cxx_type_id): Likewise.
1571 (pp_cxx_exception_declaration): New function.
1572 (pp_cxx_statement): Likewise.
1573 (pp_cxx_simple_declaration): Likewise.
1574 (pp_cxx_template_parameter_list): Likewise.
1575 (pp_cxx_template_parameter): Likewise.
1576 (pp_cxx_template_declaration): Likewise.
1577 (pp_cxx_explicit_specialization): Likewise.
1578 (pp_cxx_explicit_instantiation): Likewise.
1579 (pp_cxx_declaration): Tidy.
1580 (pp_cxx_pretty_printer_init): Initialize more fields.
1581
1582 2003-08-25 Mark Mitchell <mark@codesourcery.com>
1583
1584 PR c++/8795
1585 * cp-tree.h (build_cplus_method_type): Remove.
1586 * call.c (standard_conversion): Use build_method_type_directly
1587 instead of build_cplus_method_type.
1588 * class.c (build_clone): Likewise.
1589 (adjust_clone_args): Likewise.
1590 * decl.c (build_ptrmem_type): Likewise.
1591 (grokdeclarator): Likewise.
1592 (check_function_type): Likewise.
1593 * decl2.c (grok_method_quals): Likewise.
1594 (maybe_retrofit_in_chrg): Likewise.
1595 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1596 (tsubst_function_type): Likewise.
1597 (tsubst): Likewise.
1598 * tree.c (build_cplus_method_type): Remove.
1599 * typeck.c (merge_types): Use build_method_type_directly.
1600
1601 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1602
1603 PR c++/3765
1604 * search.c (dfs_access_in_type): Fix typo in comment.
1605 (dfs_accessible_queue_p): Likewise.
1606 (dfs_accessible_p): Only terminate when a friend is found.
1607 (accessible_p): Return immediately if access_in_type allows
1608 access.
1609
1610 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1611
1612 PR c++/641, c++/11876
1613 * friend.c (add_friend): Add complain parameter.
1614 (make_friend_class): Likewise.
1615 (do_friend): Adjust add_friend call.
1616 * decl.c (grokdeclarator): Adjust make_friend_class call.
1617 * parser.c (cp_parser_member_declaration): Likewise.
1618 (cp_parser_template_declaration_after_export): Likewise.
1619 * pt.c (instantiate_class_template): Adjust make_friend_class
1620 and add_friend call.
1621 * cp-tree.h (make_friend_class): Adjust declaration.
1622 (add_friend): Likewise.
1623
1624 2003-08-21 Jason Merrill <jason@redhat.com>
1625
1626 PR c++/11283
1627 * call.c (build_conditional_expr): Ignore cv-qual differences for
1628 non-class types.
1629
1630 2003-08-21 Mark Mitchell <mark@codesourcery.com>
1631
1632 PR c++/11551
1633 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1634 (cp_parser_primary_expression): Adjust call to
1635 cp_parser_id_expression.
1636 (cp_parser_unqualified_id): Complain about the use of
1637 typedef-names in a destructor declarator.
1638 (cp_parser_postfix_expression): Adjust call to
1639 cp_parser_id_expression.
1640 (cp_parser_type_parameter): Likewise.
1641 (cp_parser_template_argument): Likewise.
1642 (cp_parser_declarator_id): Likewise.
1643
1644 PR c++/11919
1645 * call.c (standard_conversion): Use same_type_p, not pointer
1646 equality, to compare types.
1647
1648 PR c++/10762
1649 * parser.c (cp_parser_using_declaration): Check for invalid uses
1650 of template-ids here...
1651 * decl2.c (do_class_using_decl): ... rather than here.
1652
1653 2003-08-20 Mark Mitchell <mark@codesourcery.com>
1654
1655 PR c++/11834
1656 * pt.c (more_specialized): Bump processing_template_decl.
1657
1658 2003-08-21 Jason Merrill <jason@redhat.com>
1659
1660 PR c++/11614
1661 * decl.c (grokdeclarator): Recognize a flexible array based on the
1662 type, not the form of the declarator.
1663
1664 2003-08-20 Jason Merrill <jason@redhat.com>
1665
1666 * semantics.c (simplify_aggr_init_expr): Split out from
1667 simplify_aggr_init_exprs_r. Convert slot address to match
1668 the return type.
1669 * cp-tree.h: Declare it.
1670 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1671 DECL_NAME of a user variable.
1672
1673 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
1674
1675 PR c++/11945
1676 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1677 COMPOUND_EXPR.
1678 * semantics.c (finish_expr_stmt): Always convert to void.
1679 * typeck.c (build_x_compound_exp): Always convert to void.
1680
1681 2003-08-19 Mark Mitchell <mark@codesourcery.com>
1682
1683 PR c++/11684
1684 * cp-tree.h (grok_op_properties): Change prototype.
1685 * decl.c (grok_op_properties): Add complain parameter.
1686 (grokfndecl): Pass it.
1687 * pt.c (tsubst_decl): Adjust accordingly.
1688
1689 PR c++/10926
1690 * decl.c (start_method): Return immediately if push_template_decl
1691 does not like the declaration.
1692 * pt.c (push_template_decl_real): Disallow member template
1693 destructors.
1694
1695 PR c++/11036
1696 * cp-tree.h (add_binding): Add prototype.
1697 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1698 (maybe_warn_about_overly_private_class): Use
1699 CLASSTYPE_DESTRUCTORS.
1700 (pushclass): Adjust call to set_identifier_type_value.
1701 * decl.c (add_binding): Give it external linkage.
1702 (push_local_binding): Adjust call to add_binding.
1703 (push_class_binding): Likewise.
1704 (set_identifier_type_value_with_scope): Change prototype. Use
1705 add_binding for global bindings.
1706 (set_identifier_type_value): Adjust accordingly.
1707 (pushtag): Likewise.
1708 (pushdecl): Use set_identifier_type_value, not
1709 set_identifier_type_value_with_scope.
1710 (pushdecl_namespace_level): Adjust calls to
1711 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1712 (pushdecl_class_level): Likewise.
1713 (lookup_tag): Use select_decl.
1714 (select_decl): Improve comment.
1715 (record_builtin_type): Do not call pushdecl.
1716 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1717 (cp_finish_decl): Adjust call to set_identifier_type_value.
1718 (check_elaborated_type_specifier): Improve checks for invalid uses
1719 of typedefs.
1720 (xref_tag): Adjust call to check_elaborated_type_specifier.
1721 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1722 * name-lookup.c (set_namespace_binding): Use add_binding.
1723 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1724 rather than an IDENTIFIER_NODE, to represent built-in types, if
1725 requested by the caller.
1726 (cp_parser_postfix_expression): Adjust call.
1727 (cp_parser_type_specifier): Likewise.
1728 (cp_parser_elaborated_type_specifier): Adjust call to
1729 check_elaborated_type_specifier.
1730 * typeck2.c (build_functional_cast): Do not perform name lookups.
1731
1732 PR c++/10717
1733 * decl.c (expand_static_init): Remove unnecessary code.
1734
1735 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
1736
1737 PR c++/10538, PR c/5582
1738 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1739
1740 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1741
1742 PR c++/11174
1743 * init.c (build_offset_ref): Perform access checking for
1744 pointer to member correctly.
1745
1746 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
1747
1748 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1749
1750 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
1751
1752 PR c++/11957
1753 * cp-tree.h (finish_stmt_expr): Add bool parameter.
1754 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1755 adjust the stmt_expr here.
1756 (build_vec_init): Use finish_stmt_expr_expr, convert result to
1757 array type.
1758 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1759 call.
1760 * pt.c (tsubst_copy): Likewise.
1761 * semantics.c (finish_stmt_expr): Add parameter.
1762
1763 * pt.c (instantiate_class_template): Push to class's scope before
1764 tsubsting base.
1765
1766 2003-08-17 Jan Hubicka <jh@suse.cz>
1767
1768 PR C++/11702
1769 * semantics.c (finish_id_expression): Mark all functions as used.
1770
1771 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
1772
1773 PR c++/11512
1774 * cvt.c (convert_to_void): Indicate which side of conditional has
1775 no effects, and rhs of comma operator. Test for no sideeffect
1776 expressions here and always build a convert expr.
1777 * init.c (expand_default_init): Convert the init to void.
1778 * typeck.c (build_x_compound_expr): Do not check for side effects
1779 here.
1780 (build_compound_expr): Do not convert lhs when building a
1781 template.
1782
1783 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1784
1785 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1786 * decl2.c (build_offset_ref_call_from_tree): Use
1787 build_non_dependent_expr.
1788 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1789 * pt.c (build_non_dependent_expr): Set operand.
1790
1791 2003-08-14 Jan Hubicka <jh@suse.cz>
1792
1793 * decl2.c (mark_member_pointers): Rename to...
1794 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1795 (lower_function): Update call.
1796 * except.c (eh_type_info): Break out from ...
1797 (build_eh_type): ... here; tinfo is already used.
1798 (finish_eh_spec_block): Mark tinfos as used.
1799 * semantics.c (finish_handler_params): Mark tinfo as used.
1800 * cp-tree.h (eh_type_info): Declare.
1801
1802 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1803
1804 * pt.c (instantiate_class_template): Set location before
1805 substuting bases.
1806
1807 * decl.c (make_typename_type): Use my_friendly_assert.
1808 * pt.c (tsubst_aggr_type): Rearrange context substitution.
1809
1810 2003-08-14 Jan Hubicka <jh@suse.cz>
1811
1812 * method.c (use_thunk): Expand body directly.
1813
1814 2003-08-12 Mark Mitchell <mark@codesourcery.com>
1815
1816 PR c++/11703
1817 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1818 determine whether or not to promote types.
1819 (convert_for_arg_passing): Likewise.
1820 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1821 templates.
1822 * pt.c (tsubst_decl): Do not expect it to be set.
1823
1824 PR c++/9512
1825 PR c++/10923
1826 * cp-tree.h (check_elaborated_type_specifier): Declare.
1827 (handle_class_head): Remove.
1828 (note_got_semicolon): Likewise.
1829 (note_list_got_semicolon): Likewise.
1830 (finish_class_definition): Likewise.
1831 * decl.c (check_elaborated_type_specifier): Make it public.
1832 Robustify.
1833 (handle_class_head): Remove.
1834 * parser.c (cp_parser_elaborated_type_specifier): Use
1835 check_elaborated_type_specifier.
1836 (cp_parser_class_specifier): Do not call finish_class_definition.
1837 (cp_parser_class_head): Or handle_class_head. Check for
1838 over-qualified names.
1839 * semantics.c (finish_class_definition): Remove.
1840
1841 * parser.c (cp_parser_check_for_definition_in_return_type): New
1842 function.
1843 (cp_parser_simple_declaration): Adjust call to
1844 cp_parser_init_declarator.
1845 (cp_parser_decl_specifier_seq): Change type of
1846 declares_class_or_enum parameter.
1847 (cp_parser_explicit_instantiation): Adjust accordingly.
1848 (cp_parser_type_specifier): Change type of
1849 declares_class_or_enum parameter.
1850 (cp_parser_init_declarator): Add declares_class_or_enum
1851 parameter.
1852 (cp_parser_parameter_declaration): Adjust call to
1853 cp_parser_decl_specifier_seq.
1854 (cp_parser_function_definition): Likewise.
1855 (cp_parser_member_declaration): Likewise.
1856 (cp_parser_single_declaration): Likewise.
1857
1858 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1859 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1860 (TYPE_OVERLOADS_CALL_EXPR): Remove.
1861 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1862 (TYPE_OVERLOADS_ARROW): Likewise.
1863 (CLASSTYPE_GOT_SEMICOLON): Likewise.
1864 * class.c (check_bases): Do not set them.
1865 (finish_struct_1): Likewise.
1866 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1867 (build_ptrmemfunc_type): Likewise.
1868 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1869 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1870 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1871 * lex.c (note_got_semicolon): Remove.
1872 (note_list_got_semicolon): Likewise.
1873 * parser.c (cp_parser_simple_declaration): Do not call
1874 note_list_got_semicolon.
1875 * pt.c (list_eq): Remove.
1876 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1877 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1878 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1879 * ptree.c (cxx_print_type): Do not print them.
1880 * semantics.c (finish_member_class_template): Do not call
1881 note_list_got_semicolon.
1882
1883 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
1884
1885 * call.c (standard_conversion): Opaque pointers interconvert.
1886
1887 * testsuite/g++.dg/other/opaque-3.C: New.
1888
1889 2003-08-11 Mark Mitchell <mark@codesourcery.com>
1890
1891 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1892 types correctly.
1893
1894 2003-08-10 Mark Mitchell <mark@codesourcery.com>
1895
1896 PR c++/11789
1897 * cp-tree.h (get_vbase): Remove.
1898 (get_vbase_types): Remove.
1899 * init.c (expand_member_init): Correct logic for looking up base
1900 classes.
1901
1902 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1903
1904 * error.c (dump_expr): Tidy.
1905 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1906 (pp_cxx_begin_template_argument_list): Likewise.
1907 (pp_cxx_end_template_argument_list): Likewise.
1908 (is_destructor_name): Likewise.
1909 (pp_cxx_unqualified_id): Likewise.
1910 (pp_cxx_qualified_id): Likewise.
1911 (pp_cxx_id_expression): Likewise.
1912 (pp_cxx_new_expression): Likewise.
1913 (pp_cxx_delete_expression): Likewise.
1914 (pp_cxx_pm_expression): Likewise.
1915 (pp_cxx_type_specifier): Rework.
1916 (pp_cxx_type_id): Likewise.
1917 (pp_cxx_primary_expression): Likewise.
1918 (pp_cxx_postfix_expression): Likewise.
1919 (pp_cxx_unary_expression): Likewise.
1920 (pp_cxx_multiplicative_expression): Likewise.
1921 (pp_cxx_conditional_expression): Likewise.
1922 (pp_cxx_assignment_expression): Likewise.
1923 (pp_cxx_pretty_printer_init): Tidy.
1924
1925 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
1926
1927 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1928 NODE is always a TREE_VEC of nonzero size.
1929 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1930 * decl2.c (arg_assoc): Template args will be a vec.
1931 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1932 dump_template_argument_list.
1933 (dump_template_parms): Args will be a vec.
1934 * parser.c (cp_parser_template_argument_list): Produce a
1935 vector, not a list.
1936 * pt.c (coerce_template_parms): Args are always vectors.
1937 (mangle_class_name_for_template): Likewise.
1938 (lookup_template_function): Likewise.
1939 (lookup_template_class): Likewise.
1940 (tsubst_template_args): Likewise.
1941 (tsubst_baselink): Use tsubst_template_args.
1942 (tsubst_qualified_id): Likewise.
1943 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1944 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1945 (any_dependent_template_args_p): Args are always vectors.
1946 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1947
1948 PR c++/11670
1949 * call.c (convert_like_real): Add rvalue binding error message.
1950 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1951 really a cast.
1952
1953 PR c++/10530
1954 * pt.c (dependent_type_p_r): A dependent template-id is a class
1955 type with dependent template arguments, or a bound template
1956 template parameter.
1957 (type_dependent_expression_p): A template function decl cannot
1958 have a dependent context.
1959
1960 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1961
1962 PR c++/5767
1963 * parser.c (cp_parser_class_name): Return immediately when scope
1964 is error_mark_node.
1965
1966 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
1967
1968 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1969
1970 * cp/call.c (standard_conversion): Support opaque types.
1971 Include target.h.
1972 (strip_top_quals): Use cp_build_qualified_type instead of
1973 TYPE_MAIN_VARIANT.
1974
1975 * cp/typeck.c (convert_for_assignment): Support opaque types.
1976
1977 * testsuite/g++.dg/other/opaque-1.C: New.
1978
1979 * testsuite/g++.dg/other/opaque-2.C: New.
1980
1981 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
1982
1983 * decl.c (grokparms): Use cp_build_qualified_type instead
1984 TYPE_MAIN_VARIANT.
1985
1986 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1987
1988 * cxx-pretty-print.h: New file.
1989 * cxx-pretty-print.c: Likewise.
1990 * error.c (scratch_pretty_printer): Change type.
1991 (init_error): Tidy.
1992 (dump_aggr_type): Likewise.
1993 (dump_global_iord): Likewise.
1994 (dump_expr): Likewise.
1995 (dump_char): Remove.
1996 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1997 (cxx_initialize_diagnostics): New function.
1998 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1999 (CXX_PRETTY_PRINT_H): New variable.
2000 (cp/cxx-pretty-print.o): New rule.
2001 (cp/cp-lang.o): Update dependence.
2002 (cp/error.o): Likewise.
2003
2004 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
2005
2006 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
2007 (DECL_DECLARED_INLINE_P): Remove.
2008 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
2009 if decl is a FUNCTION_DECL. This never made sense, but now it is
2010 required to avoid a tree check failure.
2011 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
2012 * optimize.c (maybe_clone_body): Likewise.
2013
2014 2003-08-04 Roger Sayle <roger@eyesopen.com>
2015
2016 * decl.c (cxx_insert_default_attributes): Delete.
2017 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
2018 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
2019
2020 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
2021
2022 PR c++/11704
2023 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
2024 unknown type.
2025
2026 PR c++/11766
2027 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
2028 member functions.
2029
2030 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
2031
2032 PR c++/9447
2033 * cp-tree.def (USING_DECL): Document its type.
2034 * class.c (pushclass): If we're entering a template, push any
2035 dependent using decls it has.
2036 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
2037 a dependent scope.
2038 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
2039 (tsubst): Remove USING_DECL checks.
2040 (type_dependent_expression_p): Remove USING_DECL case.
2041 * semantics.c (finish_member_declaration): A USING_DECL's type
2042 indicates whether it is dependent.
2043
2044 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
2045
2046 * cp-tree.h (pushclass): Remove unneeded parameter.
2047 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
2048 (push_nested_class): Adjust pushclass call.
2049 * pt.c (instantiate_class_template): Likewise.
2050 * semantics.c (begin_class_definition): Likewise.
2051
2052 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
2053
2054 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
2055
2056 2003-08-01 Mark Mitchell <mark@codesourcery.com>
2057
2058 PR c++/11697
2059 * decl.c (decls_match): Don't ignore the types of template
2060 classes.
2061
2062 PR c++/11744
2063 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
2064
2065 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2066
2067 PR c++/8442, c++/8806
2068 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
2069 preferred.
2070 (check_elaborated_type_specifier): Add allow_template_p
2071 parameter. Check tag mismatch and class template.
2072 (xref_tag): Add template_header_p parameter. Add assertion
2073 that name is an IDENTIFIER_NODE. Remove implicit typename
2074 warning. Simplify lookup process if globalize is true.
2075 (cxx_init_decl_processing): Adjust call to xref_tag.
2076 (xref_tag_from_type): Likewise.
2077 * decl2.c (handle_class_head): Likewise.
2078 * parser.c (cp_parser_elaborated_type_specifier,
2079 cp_parser_class_head): Likewise.
2080 * rtti.c (init_rtti_processing, build_dynamic_cast1,
2081 tinfo_base_init, emit_support_tinfos): Likewise.
2082 * class.c (is_base_of_enclosing_class): Remove.
2083 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
2084 template template argument.
2085 * cp-tree.h (xref_tag): Adjust declaration.
2086 (is_base_of_enclosing_class): Remove.
2087 * NEWS: Document template template argument change.
2088
2089 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
2090
2091 * parser.c (cp_parser_init_declarator,
2092 cp_paser_member_declaration): Reformat.
2093 * pt.c (lookup_template_class, type_unification_real, unify,
2094 type_dependent_expression_p): Reformat.
2095
2096 PR c++/11295
2097 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
2098 tf_stmt_expr_body.
2099 (finish_stmt_expr_expr): Declare.
2100 * parser.c (cp_parser_primary_expression): Tell
2101 cp_parser_compount_statement that it is a statement expression.
2102 (cp_parser_statement, cp_parser_labeled_statement,
2103 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
2104 in_statement_expr_p parameter.
2105 (cp_parser_expression_statement): Likewise. Call
2106 finish_stmt_expr_expr for final expression of a statement
2107 expression.
2108 (cp_parser_for_init_statement,
2109 cp_parser_implicitly_scoped_statement,
2110 cp_parser_already_scoped_statement, cp_parser_function_definition,
2111 cp_parser_try_block, cp_parser_handled): Adjust.
2112 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
2113 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
2114 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
2115 * semantics.c (finish_expr_stmt): Do not deal with statement
2116 expressions.
2117 (begin_stmt_expr): Clear last_expr_type.
2118 (finish_stmt_expr_expr): New.
2119 (finish_stmt_expr): Process the value expression.
2120
2121 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
2122 compound expr inside the target's initializer.
2123
2124 PR c++/11525
2125 * parser.c (cp_parser_primary_expression): Do not set
2126 non-constant-p merely because it is a dependent scope.
2127
2128 PR c++/9447
2129 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
2130 * semantics.c (finish_expr_stmt): Do not convert to void in a
2131 template.
2132
2133 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
2134
2135 * pt.c (coerce_template_parms): Refactor.
2136 (fn_type_unification): Increment processing_template_decl when
2137 tsubsting an incomplete set of explicit args.
2138
2139 PR c++/11347
2140 * pt.c (instantiate_class_template): Increment
2141 processing_template_decl around the tsubst of a template member
2142 class.
2143 (tsubst_qualified_id): Assert we do not have a dependent scope.
2144
2145 * pt.c (coerce_template_template_parms, lookup_template_class,
2146 can_complete_type_without_circularity, instantiate_class_template,
2147 tsubst_decl, unify): Reformat.
2148
2149 2003-07-31 Jan Hubicka <jh@suse.cz>
2150
2151 * decl2.c (maybe_make_one_only): Use mark_referenced.
2152 * method.c (use_thunk): Likewsie.
2153
2154 2003-07-30 Jan Hubicka <jh@suse.cz>
2155
2156 * class.c (build_vtable_entry_ref): Kill.
2157 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
2158 (build_vfn_ref): Do not call build_vtable_entry_ref.
2159 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
2160 * cp-tree.h (prepare_assemble_variable): Kill.
2161 * cp-decl.c (prepare_assemble_variable): Kill.
2162
2163 2003-07-29 Geoffrey Keating <geoffk@apple.com>
2164
2165 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
2166 of setting valid_pch by hand.
2167
2168 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2169
2170 * decl.c (finish_enum): Initialize underlying_type.
2171
2172 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
2173
2174 PR c++/9447
2175 * decl.c (add_binding): Add bval local variable.
2176 (push_class_level_binding): Likewise. Allow a USING_DECL to be
2177 pushed.
2178 * decl2.c (do_class_using_decl): The type of a using decl is
2179 unknown.
2180 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
2181 function call lookup code.
2182 * pt.c (tsubst): A USING_DECL will have unknown type.
2183 (tsubst_copy_and_build): Allow a using decl.
2184 (type_dependent_expression_p): A USING_DECL will make it
2185 dependent.
2186 * semantics.c (finish_member_declaration): Push a dependent using
2187 declaration.
2188
2189 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2190
2191 PR c++/11530
2192 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2193 * semantics.c (finish_id_expression): Call mark_used for all
2194 declarations.
2195
2196 2003-07-28 Mark Mitchell <mark@codesourcery.com>
2197
2198 PR c++/11667
2199 * call.c (standard_conversion): Allow all integral->enumeral
2200 conversions, after marking them as bad.
2201 * decl.c (finish_enum): Make sure that all enumerators are
2202 properly converted to the underlying type.
2203 (build_enumerator): Set DECL_CONTEXT for namespace-scope
2204 enumeration types.
2205 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2206 (tsubst_enum): Tidy.
2207
2208 * Make-lang.in (typeck.o): Depend on convert.h.
2209 (class.o): Likewise.
2210 (rtti.o): Likewise.
2211 * call.c: Include convert.h.
2212 (convert_arg_to_ellipsis): Use convert_to_real.
2213 * class.c: Include convert.h.
2214 (build_base_path): Use convert_to_integer.
2215 * rtti.c: Include convert.h.
2216 (build_headof): Use convert_to_integer.
2217 * typeck.c: Include convert.h.
2218 (decay_conversion): Use convert_to_integer.
2219 (build_unary_op): Use build_nop.
2220 (get_delta_difference): Use convert_to_integer.
2221 (build_ptrmemfunc): Avoid unnecessary conversions.
2222
2223 2003-07-28 Jan Hubicka <jh@suse.cz>
2224
2225 * decl2.c (mark_member_pointers): Verify that member pointer points to
2226 the function.
2227
2228 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
2229
2230 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2231 (finish_compound_stmt): Remove no scope arg.
2232 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2233 end_compound_stmt calls.
2234 (expand_static_init, begin_destructor_body, begin_function_body,
2235 finish_function_body): Likewise.
2236 * decl2.c (start_objects, finish_objects,
2237 start_static_storage_duration_function,
2238 finish_static_storage_duration_function): Likewise.
2239 * init.c (begin_init_stmts, finish_init_stmts,
2240 construct_virtual_base, build_vec_init): Likewise.
2241 * method.c (do_build_assign_ref, synthesize_method): Likewise.
2242 * parser.c (cp_parser_compound_statement,
2243 cp_parser_implicitly_scoped_statement,
2244 cp_parser_already_scoped_statement): Likewise.
2245 * pt.c (tsubst_expr): Likewise.
2246 * semantics.c (begin_compound_stmt): No scope arg is a bool.
2247 (finish_compound_stmt): Remove no scope arg.
2248
2249 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2250 always dyadic.
2251
2252 2003-07-27 Mark Mitchell <mark@codesourcery.com>
2253
2254 * call.c (standard_conversion): Tweak handling of
2255 pointer-to-member types.
2256 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2257 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2258 pointer-to-data member types.
2259
2260 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
2261
2262 * parser.c (cp_parser_type_parameter): Reformat.
2263 (cp_parser_parameter_declaration): Deprecate default args where
2264 not allowed.
2265
2266 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
2267
2268 * cfns.h: Rebuilt.
2269
2270 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2271 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2272 * init.c (begin_init_stmts): Make static. Return is_global
2273 value. Always call begin_stmt_expr.
2274 (finish_init_stmts): Make static. Add is_global parm. Always
2275 building a stmt tree.
2276 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2277 (build_vec_init): Likewise. Always building a stmt tree.
2278 (expand_default_init): Always building a stmt tree.
2279 (get_temp_regvar): Likewise.
2280 * semantics.c (begin_global_stmt_expr,
2281 finish_global_stmt_expr): Remove.
2282
2283 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2284
2285 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2286 (build_x_compound_expr_from_list): Declare.
2287 * typeck.c (build_x_compound_expr_from_list): New.
2288 (build_x_compound_expr): Adjust.
2289 (build_compound_expr): Remove unreachable code. Take two
2290 parameters, adjust.
2291 * decl.c (grok_reference_init): Use
2292 build_x_compound_expr_from_list.
2293 (expand_static_init): Adjust build_compound_expr call.
2294 (cxx_maybe_build_cleanup): Likewise.
2295 * init.c (perform_member_init): Use
2296 build_x_compound_expr_from_list.
2297 (build_new_1): Likewise.
2298 (build_vec_delete): Adjust build_compound_expr calls.
2299 (build_vbase_delete): Likewise.
2300 * typeck2.c (store_init_value): Use
2301 build_x_compound_expr_from_list.
2302 (build_functional_cast): Likewise.
2303
2304 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2305
2306 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2307 * decl.c (make_typename_type): Pass it.
2308 * pt.c (lookup_template_class): Use it.
2309 (resolve_typename_type): Pass it.
2310 * semantics.c (finish_template_type): Pass it.
2311
2312 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2313
2314 PR c++/11617
2315 * cp-tree.h (qualified_name_lookup_error): Declare.
2316 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2317 errors.
2318 (tsubst_expr) <DECL_STMT case>: Likewise.
2319 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2320 * semantics.c (qualified_name_lookup_error): New, broken out of ...
2321 (finish_id_expression): ... here. Use it.
2322
2323 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
2324
2325 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2326
2327 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2328
2329 PR c++/11596
2330 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2331 (tsubst_template_arg): New.
2332 (tsubst_template_arg_vector): Rename to ...
2333 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2334 tsubst_template_arg.
2335 (coerce_template_parms): Use tsubst_template_arg for default
2336 value.
2337 (tsubst_template_parms): Likewise.
2338 (tsubst_aggr_type): Adjust.
2339 (tsubst_decl): Likewise.
2340 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2341 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2342
2343 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2344
2345 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2346 * error.c: Use the new pretty-printer framework.
2347
2348 2003-07-24 Per Bothner <pbothner@apple.com>
2349
2350 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2351 which causes errors messages to incorrectly mention included files.
2352
2353 2003-07-24 Mark Mitchell <mark@codesourcery.com>
2354
2355 * cp-tree.h (convert_to_base_statically): Declare.
2356 * call.c (build_special_member_call): Convert INSTANCE to the base
2357 type.
2358 * class.c (convert_to_base_statically): New method.
2359 * init.c (construct_virtual_base): Use it.
2360 * method.c (do_build_assign_ref): Fix typo in comment.
2361
2362 2003-07-24 Jason Merrill <jason@redhat.com>
2363
2364 * decl.c: Just set truthvalue_* to boolean_*.
2365
2366 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
2367
2368 * decl.c (reshape_init): Remove unreachable code.
2369
2370 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2371
2372 PR c++/11513
2373 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2374
2375 2003-07-23 Mark Mitchell <mark@codesourcery.com>
2376
2377 PR c++/11645
2378 * cp-tree.h (accessible_base_p): Declare.
2379 * call.c (build_over_call): Use it.
2380 * search.c (accessible_base_p): New function, split out from ...
2381 (lookup_base): ... here.
2382
2383 PR c++/11517
2384 * call.c (build_conditional_expr): Use perform_implicit_conversion
2385 and error_operand_p. Robustify.
2386 * typeck.c (build_unary_op): Use perform_implicit_conversion.
2387
2388 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
2389
2390 PR c++/10953
2391 * parser.c (cp_parser_nested_name_specifier): Reset scope on
2392 failure.
2393 (cp_parser_elaborated_type_specifier): Likewise.
2394
2395 2003-07-22 Mark Mitchell <mark@codesourcery.com>
2396
2397 Eliminate use of POINTER_TYPE for pointers-to-members.
2398 * call.c (standard_conversion): Rework pointer-to-member handling.
2399 Add comments.
2400 (add_builtin_candidate): Likewise.
2401 (resolve_scoped_fn_name): Remove.
2402 (build_conditional_expr): Rework pointer-to-member handling.
2403 (compare_ics): Likewise.
2404 * class.c (check_field_decls): Use TYPE_PTR_P.
2405 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2406 handling.
2407 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2408 (TYPE_PTRMEM_P): Add comment.
2409 (TYPE_PTR_P): Simplify.
2410 (TYPE_PTROB_P): Correct definition.
2411 (TYPE_PTR_TO_MEMBER_P): New macro.
2412 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2413 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2414 (resolved_scoped_fn_name): Remove declaration.
2415 (build_offset_ref): Change prototype.
2416 (resolve_offset_ref): Remove.
2417 (comp_target_types): Remove.
2418 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2419 handling.
2420 (convert_to_reference): Use can_convert.
2421 (ocp_convert): Improve error handling. Rework pointer-to-member
2422 handling.
2423 (perform_qualification_conversions): Rework pointer-to-member
2424 handling.
2425 * decl.c (build_ptrmem_type): Handle functions too.
2426 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2427 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2428 (grokparms): Remove OFFSET_TYPE error message.
2429 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2430 * error.c (dump_type_prefix): Likewise.
2431 * expr.c (cplus_expand_constant): Use build_nop.
2432 * init.c (build_offset_ref): Add address_p parameter. Fold in
2433 necessary bits from resolve_offset_ref.
2434 (resolve_offset_ref): Remove.
2435 * parser.c (cp_parser_postfix_expression): Remove special case
2436 code for OFFSET_TYPE.
2437 * pt.c (convert_nontype_argument): Rework pointer-to-member
2438 handling.
2439 (convert_template_argument): Likewise.
2440 (unify): Likewise.
2441 (invalid_nontype_parm_type_p): Likewise.
2442 (dependent_type_p_r): Likewise.
2443 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2444 (target_incomplete_p_): Rework pointer-to-member
2445 handling.
2446 (get_pseudo_ti_init): Likewise.
2447 (get_pseudo_ti_desc): Likewise.
2448 * semantics.c (finish_qualified_id_expr): Adjust call to
2449 build_offset_ref. Remove use of resolve_offset_ref.
2450 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2451 * typeck.c (target_type): Use TYPE_PTRMEM_P.
2452 (type_unknown_p): Remove obsolete code about the time before
2453 non-dependent expressions were handled correctly.
2454 (qualify_type_recursive): Remove.
2455 (composite_pointer_type_r): New function.
2456 (composite_pointer_type): Use it.
2457 (merge_types): Remove dead comments.
2458 (comp_cv_target_types): Remove.
2459 (comp_target_types): Likewise.
2460 (comp_target_parms): Likewise.
2461 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2462 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2463 (build_binary_op): Do not use of comp_target_types.
2464 (pointer_diff): Remove OFFSET_TYPE case.
2465 (build_unary_op): Adjust pointer-to-member handling.
2466 (unary_complex_lvalue): Likewise.
2467 (check_for_casting_away_constness): Add description parameter.
2468 (build_static_cast): Pass it.
2469 (build_reinterpret_cast): Use check_for_casting_away_constness.
2470 (build_const_cast): Adjust pointer-to-member handling.
2471 (build_c_cast): Likewise.
2472 (convert_for_assignment): Remove OFFSET_TYPE error message.
2473 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2474 (comp_ptr_ttypes_reinterpret): Remove.
2475 (casts_away_constness_r): Adjust pointer-to-member handling.
2476 (casts_away_constness): Liekwise.
2477 (strip_all_pointer_quals): Remove.
2478 * typeck2.c (digest_init): Adjust pointer-to-member handling.
2479 (build_m_component_ref): Likewise.
2480
2481 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
2482
2483 * lex.c (unqualified_fn_lookup_error): Mention that the error
2484 message needs to be kept in synch with the manual.
2485
2486 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2487
2488 PR c++/11614
2489 * decl.c (grokdeclarator): An array member is only a flexible
2490 array member if the field itself is the array.
2491
2492 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2493
2494 PR c++/10793
2495 * decl.c (xref_basetypes): Handle error_mark_node.
2496
2497 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2498
2499 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2500 * tree.c (lvalue_p_1): Set it.
2501 * class.c (check_field): Don't allow non-packed non-POD fields to
2502 be packed.
2503 * call.c (reference_binding): Need a temporary for all bitfield
2504 and packed fields.
2505 (convert_like_real): Check it is ok to make a temporary here.
2506
2507 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
2508
2509 * cp-tree.h (hack_identifier): Remove.
2510 * method.c (hack_identifier): Remove.
2511 * semantics.c (finish_id_expression): Expand hack_identifier
2512 here. Simplify.
2513
2514 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2515
2516 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2517 semantics.c typeck.c: Remove unnecessary casts.
2518
2519 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2520
2521 * cp-tree.h (hack_identifier): Remove.
2522 * method.c (hack_identifier): Remove.
2523 * semantics.c (finish_id_expression): Expand hack_identifier
2524 here. Simplify.
2525
2526 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2527
2528 * cp-tree.h (finish_non_static_data_member): Add object param.
2529 * method.c (hack_identifier): Adjust.
2530 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2531 again for a FIELD_DECL.
2532 * semantics.c (finish_non_static_data_member): Add object
2533 parameter. Always save the DECL in the COMPONENT_REF.
2534 * call.c (resolve_scoped_fn_name): Adjust.
2535
2536 2003-07-17 Zack Weinberg <zack@codesourcery.com>
2537
2538 * pt.c (get_bindings): Make definition consistent with
2539 forward declaration.
2540
2541 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2542
2543 PR c++/7809
2544 * friend.c (add_friend): Check access for member functions
2545 and templates.
2546
2547 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2548
2549 PR c++/10668
2550 * typeck.c (build_class_member_access_expr): Improve diagnostic.
2551
2552 2003-07-16 Mark Mitchell <mark@codesourcery.com>
2553
2554 PR c++/11547
2555 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2556 macro.
2557 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2558 * decl.c (duplicate_decls): Merge
2559 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2560 * parser.c (cp_parser_postfix_expression): Adjust call to
2561 cp_parser_initializer_list and
2562 cp_parser_parenthesized_expression_list.
2563 (cp_parser_parenthesized_expression_list): Add non_constant_p.
2564 (cp_parser_new_placement): Adjust call to
2565 cp_parser_parenthesized_expression_list.
2566 (cp_parser_direct_new_declarator): Likewise.
2567 (cp_parser_conditional_expression): Remove.
2568 (cp_parser_constant_expression): Parse an assignment-expression,
2569 not a conditional-expression.
2570 (cp_parser_simple_declaration): Resolve expression/declaration
2571 ambiguity more quickly.
2572 (cp_parser_mem_initializer): Adjust call to
2573 cp_parser_parenthesized_expression_list.
2574 (cp_parser_init_declarator): Keep track of whether or not the
2575 initializer is a constant-expression.
2576 (cp_parser_initializer): Add non_constant_p parameter.
2577 (cp_parser_initializer_clause): Likewise.
2578 (cp_parser_initializer_list): Likewise.
2579 (cp_parser_attribute_list): Adjust call to
2580 cp_parser_parenthesized_expression_list.
2581 (cp_parser_functional_cast): Likewise.
2582 * pt.c (tsubst_decl): Copy
2583 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2584 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2585 * semantics.c (finish_id_expression): Use
2586 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2587
2588 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
2589
2590 * lang-options.h: Remove.
2591
2592 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
2593
2594 PR c/10962
2595 * class.c (field_decl_cmp): Remove.
2596 (resort_field_decl_cmp): Remove.
2597 (resort_sorted_fields): Remove.
2598 (add_fields_to_vec): Rename to ...
2599 (add_fields_to_record_type): this.
2600 (finish_struct_1): Change to be using
2601 sorted_fields_type's fields.
2602 * cp-tree.h (lang_decl): In lang_decl_u3
2603 change sorted_fields to be a pointer to
2604 sorted_fields_type.
2605 (resort_sorted_fields): Remove prototype.
2606 * search.c (lookup_field_1): Change to be using
2607 sorted_fields_type's fields.
2608
2609 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2610
2611 PR c++/5421
2612 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2613 is a member of other class.
2614 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2615 is a specialization of function template.
2616
2617 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2618
2619 PR c++/10903
2620 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2621 Improve.
2622
2623 2003-07-15 Mark Mitchell <mark@codesourcery.com>
2624
2625 * cp-tree.def (LOOKUP_EXPR): Remove.
2626 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2627 (LOOKUP_EXPR_GLOBAL): Remove.
2628 (get_bindings): Remove.
2629 (is_aggr_type_2): Remove.
2630 * call.c (resolved_scoped_fn_name): Remove support for
2631 LOOKUP_EXPR.
2632 * decl.c (grokfndecl): Likewise.
2633 (grokdeclarator): Likewise.
2634 * error.c (dump_decl): Likewise.
2635 (dump_expr): Likewise.
2636 * friend.c (do_friend): Likewise.
2637 * init.c (build_offset_ref): Likewise.
2638 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
2639 LOOKUP_EXPRs
2640 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2641 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2642 test.
2643 * pt.c (get_bindings): Give it internal linkage.
2644 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2645 (lookup_template_function): Likewise.
2646 (for_each_tempalte_parm_r): Likewise.
2647 (tsubst_decl): Likewise.
2648 (tsubst_qualified_id): Handle template template parameters.
2649 (tsubst_copy): Remove support for LOOKUP_EXPR.
2650 (tsubst_copy_and_build): Likewise.
2651 (most_general_template): Likewise.
2652 (value_dependent_expression_p): Likewise.
2653 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2654 always dependent.
2655 * semantics.c (perform_koenig_lookup): Do not create
2656 IDENTIFIER_NODEs.
2657 (finish_fname): Likewise.
2658 (finish_id_expression): Likewise.
2659 * tree.c (is_aggr_type_2): Remove.
2660
2661 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2662
2663 PR c++/11531
2664 * typeck.c (check_return_expr): Fix thinko in diagnostic.
2665
2666 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2667
2668 PR c++/10108
2669 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2670 error_mark_node.
2671
2672 2003-07-14 Mark Mitchell <mark@codesourcery.com>
2673
2674 PR c++/11509
2675 * pt.c (dependent_scope_ref_p): New function.
2676 (value_dependent_expression_p): Use it.
2677 (type_dependent_expression_p): Likewise.
2678
2679 * pt.c (tsubst_friend_function): Use reregister_specialization.
2680
2681 PR c++/7019
2682 * cp-tree.h (lookup_qualified_name): Adjust prototype.
2683 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
2684 call to is_aggr_type.
2685 * parser.c (cp_parser_lookup_name): Adjust call to
2686 lookup_qualified_name.
2687 * pt.c (tsubst_qualified_id): Likewise.
2688 (tsubst_copy_and_build): Likewise.
2689 * semantics.c (finish_qualified_id_expr): Deal with erroneous
2690 expressions.
2691
2692 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2693
2694 PR c++/11510
2695 * call.c (op_error): Properly format REALPART_EXPR and
2696 IMAGPART_EXPR.
2697 * error.c (dump_expr): Likewise.
2698
2699 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2700
2701 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2702
2703 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2704
2705 PR c++/5293
2706 * call.c (initialize_reference): Improve diagnostic.
2707
2708 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2709
2710 PR c++/11154
2711 * pt.c (more_specialized_class): Add full_args parameter.
2712 (most_specialized_class): Adjust calls to more_specialized_class.
2713 * cp-tree.h (more_specialized_class): Adjust declaration.
2714
2715 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
2716
2717 * lex.c (enum tree_node_kind): Delete.
2718
2719 2003-07-13 Mark Mitchell <mark@codesourcery.com>
2720
2721 PR c++/11503
2722 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2723 (SET_DECL_SELF_REFERENCE_P): Likewise.
2724 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2725 * pt.c (tsubst_decl): Copy it.
2726 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2727
2728 * pt.c (reregister_specialization): Fix thinko in previous change.
2729
2730 * cp-tree.h (cp_id_kind): New type.
2731 (unqualified_name_lookup_error): Change prototype.
2732 (unqualified_fn_lookup_error): New function.
2733 (do_identifier): Remove.
2734 (do_scoped_id): Likewise.
2735 (tsubst_copy_and_build): Change prototype.
2736 (reregister_specialization): New function.
2737 (perform_koenig_lookup): Likewise.
2738 (finish_id_expression): Likewise.
2739 * call.c (build_method_call): Adjust call to
2740 unqualified_name_lookup_error.
2741 * decl.c (duplicate_decls): Use reregister_specialization.
2742 * lex.c (is_global): Remove.
2743 (unqualified_name_lookup_error): Return a value.
2744 (do_identifier): Remove.
2745 (do_scoped_id): Likewise.
2746 (identifier_typedecl_value): Remove.
2747 (unqualified_fn_lookup_error): New function.
2748 * parser.c (cp_parser_id_kind): Remove.
2749 (cp_parser_non_constant_id_expression): Remove.
2750 (cp_parser_primary_expression): Use finish_id_expression.
2751 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2752 cp_parser_id_kind.
2753 (cp_parser_postfix_expression): Use perform_koenig_lookup.
2754 (cp_parser_template_argument): Use cp_id_kind.
2755 (cp_parser_fold_non_dependent_expr): Adjust call to
2756 tsubst_copy_and_build.
2757 * pt.c (unregister_specialization): Rename to ...
2758 (reregister_specialization): This.
2759 (tsubst_friend_function): Use it.
2760 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2761 (tsubst_qualified_id): Likewise.
2762 (tsubst_expr): Likewise.
2763 (tsubst_copy_and_build): Add function_p parameter. Use
2764 finish_id_expression. Introduce RECUR macro.
2765 (tsubst_non_call_postfix_expression): New function.
2766 (regenerate_decl_from_template): Use reregister_specialization.
2767 * semantics.c (perform_koenig_lookup): New function.
2768 (finish_id_expression): Likewise.
2769
2770 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2771
2772 * pt.c (push_access_scope_real): Remove.
2773 (push_access_scope): Move code from push_access_scope_real.
2774 (pop_access_scope): Don't check for TEMPLATE_DECL.
2775 (instantiate_template): Defer access checking during template
2776 substitution.
2777 (regenerate_decl_from_template): Tidy.
2778
2779 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
2780
2781 PR c++/11437
2782 * operators.def: Add definitions for __imag__, __real__.
2783
2784 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
2785
2786 PR c++/11050
2787 * parser.c (cp_parser_expression_list): Rename to ...
2788 (cp_parser_parenthesized_expression_list): ... here. Add attribute
2789 parameter, parse the surounding parentheses.
2790 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2791 parameters. Return int.
2792 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2793 (cp_parser_postfix_expression): Adjust function call parsing.
2794 (cp_parser_new_placement): Adjust.
2795 (cp_parser_new_initializer): Likewise.
2796 (cp_parser_cast_expression): Likewise.
2797 (cp_parser_selection_statement): Likewise.
2798 (cp_parser_mem_initializer): Likewise.
2799 (cp_parser_asm_definition): Likewise.
2800 (cp_parser_init_declarator): Likewise.
2801 (cp_parser_declarator): Make
2802 cdtor_or_conv_p an int ptr.
2803 (cp_parser_direct_declarator): Likewise. Check for a parameter
2804 list on cdtors & conv functions.
2805 (cp_parser_initializer): Adjust.
2806 (cp_parser_member_declaration): Adjust.
2807 (cp_parser_attribute_list): Move code into
2808 cp_parser_parens_expression_list.
2809 (cp_parser_functional_cast): Adjust.
2810 * pt.c (type_dependent_expression_p): Erroneous expressions are
2811 non-dependent.
2812
2813 2003-07-11 Geoffrey Keating <geoffk@apple.com>
2814
2815 * decl.c (cp_finish_decl): Handle 'used' attribute.
2816
2817 * cp-lang.c (c_reset_state): New dummy routine.
2818 * cp-tree.h (finish_file): Move prototype to c-common.h.
2819 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2820
2821 2003-07-11 Mark Mitchell <mark@codesourcery.com>
2822
2823 PR c++/8327
2824 * pt.c (tsubst_qualified_id): Implement suggested resolution for
2825 Core Issue 2.
2826 (type_dependent_expression_p): Likewise.
2827
2828 2003-07-10 Mark Mitchell <mark@codesourcery.com>
2829
2830 * typeck.c (build_binary_op): Do not warn about signed
2831 vs. unsigned comparisons in the bodies of templates.
2832
2833 PR c++/9411
2834 * parser.c (cp_parser_postfix_expression): Check dependency of
2835 functions.
2836
2837 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2838
2839 PR c++/10032
2840 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2841 still errors.
2842
2843 PR c++/10527
2844 * error.c (decl_to_string): Do not print default argument
2845 expressions.
2846
2847 * cp-tree.h (break_out_calls): Remove declaration.
2848 * tree.c (break_out_calls): Remove.
2849 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2850
2851 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
2852
2853 PR c++ 9483
2854 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2855 * decl2.c (constructor_name_p): Avoid repeated constructor_name
2856 calls.
2857 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2858
2859 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2860
2861 * typeck.c (build_x_unary_op): Take note of the fact that
2862 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2863 trees.
2864
2865 * parser.c (cp_parser_primary_expression): Preserve the form of
2866 qualified expressions in templates, even if they are not
2867 dependent.
2868 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2869 (tsubst_qualified_id): Likewise.
2870 * search.c (accessible_p): Treat everything in the body of a
2871 template as accessible.
2872
2873 2003-07-08 Mark Mitchell <mark@codesourcery.com>
2874
2875 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2876 * cp-tree.h (build_call_from_tree): Remove.
2877 (build_member_call): Likewise.
2878 (dependent_template_arg_p): Remove.
2879 (any_dependent_template_arguments_p): New function.
2880 (dependent_template_id_p): Likewise.
2881 (any_type_dependent_arguments_p): Likewise.
2882 (build_non_dependent_expr): Likewise.
2883 (build_non_dependent_args): Likewise.
2884 (build_x_compound_expr): Adjust prototype.
2885 * call.c (build_new_method_call): Handle non-dependent expressions
2886 correctly.
2887 * decl2.c (grok_array_decl): Likewise.
2888 (build_offset_ref_call_from_tree): Likewise.
2889 (build_call_from_tree): Remove.
2890 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2891 (dump_expr): Likewise.
2892 * init.c (build_member_call): Remove.
2893 * mangle.c (write_expression): Update handling for template-ids.
2894 * parser.c (cp_parser_primary_expression): Use
2895 any_dependent_template_arguments_p. Update constant-expression
2896 handling.
2897 (cp_parser_postfix_expression): Use
2898 any_type_dependent_arguments_p. Simplify call processing.
2899 (cp_parser_unary_expression): Simplify.
2900 (cp_parser_expression): Adjust for changes to
2901 build_x_compound_expr.
2902 (cp_parser_template_argument): Implement standard-conforming
2903 parsing of non-type template arguments.
2904 (cp_parser_direct_declarator): Use
2905 cp_parser_fold_non_dependent_expr.
2906 (cp_parser_fold_non_dependent_expr): New function.
2907 (cp_parser_next_token_ends_template_argument_p): Likewise.
2908 * pt.c (convert_template_argument): Do not call
2909 maybe_fold_nontype_arg.
2910 (tsubst_baselink): Likewise.
2911 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
2912 processing work correctly for non-dependent expressions. Adjust
2913 handling of COMPOUND_EXPR. Simplify call processing.
2914 (value_dependent_expression_p): Deal with functional casts and
2915 sizeof/alignof correctly.
2916 (type_dependent_expression_p): Handle overloaded functions.
2917 (any_type_dependent_arguments_p): New function.
2918 (any_dependent_template_arguments_p): Likewise.
2919 (dependent_template_p): Treat SCOPE_REFs as dependent.
2920 (dependent_template_id_p): Simplify.
2921 (build_non_dependent_expr): New function.
2922 (build_non_dependent_args): Likewise.
2923 * semantics.c (finish_stmt_expr): Don't make dependent
2924 statement-expresions have void type.
2925 (finish_call_expr): Handle non-dependent expressions
2926 correctly.
2927 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2928 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2929 type size_t, even in templates.
2930 (expr_sizeof): Likewise.
2931 (finish_class_member_access_expr): Handle non-dependent expressions
2932 correctly.
2933 (build_x_indirect_ref): Likewise.
2934 (build_x_binary_op): Likewise.
2935 (build_x_unary_op): Likewise.
2936 (build_x_conditional_expr): Likewise.
2937 (build_x_compound_expr): Likewise.
2938 * typeck2.c (build_x_arrow): Likewise.
2939
2940 2003-07-09 Jan Hubicka <jh@suse.cz>
2941
2942 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2943 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2944 (start_function): Use DECL_ESTIMATED_INSNS.
2945 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2946
2947 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2948 unit-at-a-time
2949
2950 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2951
2952 PR c++/11030
2953 * pt.c (instantiate_class_template): Don't call xref_tag to
2954 inject name when the friend class is a specialization.
2955
2956 2003-07-07 Mark Mitchell <mark@codesourcery.com>
2957
2958 * cp-tree.h (build_scoped_method_call): Remove.
2959 (lookup_qualified_name): Remove parameter.
2960 (tsubst_copy_and_build): Declare.
2961 (finish_qualified_object_call_expr): Remove.
2962 (check_accessibility_of_qualified_id): New function.
2963 (finish_qualified_id_expr): Likewise.
2964 (non_reference): Likewise.
2965 (build_expr_from-tree): Remove.
2966 * call.c (non_reference): Remove.
2967 (build_scoped_method_call): Likewise.
2968 (build_method_call): Use error_operand_p. Assert that we are not
2969 processing a template.
2970 (standard_conversion): Use non_reference.
2971 * class.c (build_vtbl_entry_ref): Likewise.
2972 (build_vtbl_ref_1): Likewise.
2973 * cvt.c (build_expr_type_conversion): Use non_reference.
2974 * decl.c (lookup_qualified_name): Remove flags parameter.
2975 (grok_op_properties): Use non_reference.
2976 * decl2.c (grok_array_decl): Likewise.
2977 (build_expr_from_tree): Remove.
2978 (build_offset_ref_call_from_tree): Update comment.
2979 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2980 * except.c (prepare_eh_types): Use non_reference.
2981 (can_convert_eh): Likewise.
2982 * init.c (build_dtor_call): Avoid using build_method_call.
2983 * mangle.c (write_template_param): Remove misleading comment.
2984 * method.c (locate_copy): Use non_reference.
2985 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2986 (cp_parser_primary_expression): Do not create SCOPE_REFs is
2987 non-dependent contexts.
2988 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2989 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2990 build_expr_from_tree.
2991 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2992 Use check_accessibility_of_qualified_id.
2993 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2994 build_expr_from_tree.
2995 (tsubst_baselink): New function.
2996 (tsubst_qualified_id): Likewise.
2997 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
2998 (tsubst_expr): Adjust call to lookup_qualified_name.
2999 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
3000 handling of CALL_EXPRs.
3001 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
3002 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
3003 * search.c (check_final_overrider): Likewise.
3004 * semantics.c (check_accessibility_of_qualified_id): New function.
3005 (finish_qualified_object_call_expr): Remove.
3006 * typeck.c (target_type): Use non_reference.
3007 (cxx_sizeof_or_alignof_type): Likewise.
3008 (dubious_conversion_warnings): Likewise.
3009 (convert_for_initialization): Likewise.
3010 (non_reference): New function.
3011
3012 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3013
3014 * decl.c (print_binding_level, print_other_binding_stack,
3015 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
3016 stdio calls.
3017 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
3018
3019 2003-07-07 Andreas Jaeger <aj@suse.de>
3020
3021 * friend.c: Convert to ISO C90 prototypes.
3022
3023 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
3024 language.
3025 * cfns.h: Regenerate.
3026
3027 * typeck.c: Convert remaining prototypes to ISO C90.
3028 * search.c: Likewise.
3029
3030 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
3031 * semantics.c (expand_or_defer_fn): Likewise
3032 * mangle.c (discriminator_for_string_literal): Likewise.
3033 * g++spec.c (lang_specific_driver): Likewise.
3034
3035 * search.c (lookup_base_r): Remove unused variable.
3036
3037 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
3038
3039 * semantics.c: (genrtl_try_block) Adjust emit_line_note
3040 calls.
3041
3042 2003-07-07 Andreas Jaeger <aj@suse.de>
3043
3044 * search.c (lookup_base_r): Remove unused variable.
3045
3046 2003-07-06 Michael Chastain <mec@shout.net>
3047
3048 PR debug/10055
3049 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
3050 assigning to input_filename directly.
3051
3052 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
3053
3054 * call.c: Fix comment formatting.
3055 * class.c: Likewise.
3056 * cp-tree.h: Likewise.
3057 * decl.c: Likewise.
3058 * decl2.c: Likewise.
3059 * error.c: Likewise.
3060 * method.c: Likewise.
3061 * name-lookup.c: Likewise.
3062 * parser.c: Likewise.
3063 * pt.c: Likewise.
3064 * rtti.c: Likewise.
3065 * search.c: Likewise.
3066 * typeck.c: Likewise.
3067
3068 2003-07-06 Mark Mitchell <mark@codesourcery.com>
3069
3070 PR c++/11345
3071 * search.c (lookup_base_r): Remove is_non_public and
3072 within_current_scope parameters. Remove other dead code.
3073 (lookup_base): Adjust call to lookup_base_r.
3074 (adjust_result_of_qualified_name_lookup): Improve comment.
3075 * semantics.c (finish_call_expr): Use maybe_dummy_object.
3076
3077 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
3078
3079 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
3080 LANG_HOOKS_MISSING_ARGUMENT): Override.
3081
3082 2003-07-05 Mark Mitchell <mark@codesourcery.com>
3083
3084 PR c++/11431
3085 * typeck.c (build_static_cast): Check for reference conversions
3086 earlier.
3087
3088 2003-07-04 Mark Mitchell <mark@codesourcery.com>
3089
3090 * cp-tree.h (perform_integral_promotions): Declare.
3091 * call.c (build_addr_func): Use decay_conversion.
3092 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
3093 (convert_for_arg_passing): Use perform_integral_promotions.
3094 * cvt.c (build_expr_type_conversion): Use decay_conversion.
3095 (type_promotes_to): Do not return a cv-qualified type.
3096 * decl.c (grok_reference_init): Fix formatting.
3097 (get_atexit_node): Use decay_conversion.
3098 (build_enumerator): Use perform_integral_promotions.
3099 * init.c (build_vec_init): Use decay_conversion.
3100 * semantics.c (finish_expr_stmt): Likewise.
3101 (finish_switch_cond): Use perform_integral_promotions.
3102 * typeck.c (default_conversion): Likewise.
3103 (perform_integral_promotions): New function.
3104 (build_indirect_ref): Use decay_conversion.
3105 (build_array_ref): Use perform_integral_promotions.
3106 (convert_arguments): Use decay_conversion.
3107 (build_unary_op): Use perform_integral_promotions.
3108 (build_c_cast): Use decay_conversion.
3109 (build_modify_expr): Likewise.
3110 (convert_for_initialization): Likewise.
3111 * typeck2.c (build_x_arrow): Likewise.
3112
3113 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
3114
3115 * call.c: Fix comment typos.
3116 * class.c: Likewise.
3117 * cp-tree.h: Likewise.
3118 * cvt.c: Likewise.
3119 * decl2.c: Likewise.
3120 * decl.c: Likewise.
3121 * init.c: Likewise.
3122 * mangle.c: Likewise.
3123 * parser.c: Likewise.
3124 * pt.c: Likewise.
3125 * search.c: Likewise.
3126 * semantics.c: Likewise.
3127 * tree.c: Likewise.
3128 * typeck.c: Likewise.
3129
3130 2003-07-04 Zack Weinberg <zack@codesourcery.com>
3131
3132 * parser.c (cp_lexer_read_token): No need to handle string
3133 constant concatenation.
3134
3135 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3136
3137 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
3138 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
3139 ATTRIBUTE_GCC_CXXDIAG.
3140
3141 2003-07-03 Mark Mitchell <mark@codesourcery.com>
3142
3143 * call.c (build_addr_func): Handle bound pointers-to-members.
3144 (build_method_call): Do not call resolve_offset_ref.
3145 (implicit_conversion): Likewise.
3146 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
3147 resolve_offset_ref.
3148 (resolve_args): Do not call resolve_offset_ref.
3149 (build_conditional_expr): Likewise.
3150 (build_new_method_call): Likewise.
3151 * cp-tree.def (OFFSET_REF): Update documentation.
3152 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
3153 pointers to members to pointers.
3154 (ocp_convert): Do not call resolve_offset_ref.
3155 (convert_to_void): Likewise.
3156 (build_expr_type_conversion): Likewise.
3157 * decl2.c (delete_sanity): Likewise.
3158 * init.c (resolve_offset_ref): Simplify greatly.
3159 (build_vec_delete): Do not call resolve_offset_ref.
3160 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
3161 if appropriate.
3162 (cp_parser_unary_expression): Use
3163 cp_parser_simple_cast_expression.
3164 (cp_parser_delete_expression): Likewise.
3165 (cp_parser_cast_expression): Likewise.
3166 (cp_parser_pm_expression): Use cp_parser_binary_op.
3167 (cp_parser_simple_cast_expression): New function.
3168 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
3169 * semantics.c (finish_increment_expr): Likewise.
3170 (finish_typeof): Likewise.
3171 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
3172 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
3173 (decay_conversion): Do not call resolve_offset_ref.
3174 (finish_class_member_access_expr): Likewise.
3175 (convert_arguments): Likewise.
3176 (build_x_binary_op): Handle DOTSTAR_EXPR.
3177 (condition_conversion): Do not call resolve_offset_ref.
3178 (unary_complex_lvalue): Likewise.
3179 (build_static_cast): Likewise.
3180 (build_reinterpret_cast): Likewise.
3181 (build_const_cast): Likewise.
3182 (build_c_cast): Likewise.
3183 (build_modify_expr): Likewise.
3184 (convert_for_assignment): Likewise.
3185 (convert_for_initialization): Likewise.
3186 * typeck2.c (build_x_arrow): Likewise.
3187 (build_m_component_ref): Simplify.
3188
3189 * call.c (build_scoped_method_call): Use convert_to_void.
3190 (build_method_call): Likewise.
3191 * class.c (check_field_decls): Remove dead code.
3192 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3193 * decl2.c (grok_array_decl): Remove dead code.
3194 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3195 as pointer-to-member representation.
3196 * init.c (build_offset_ref): Tidy.
3197 (build_vec_delete_1): Use convert_to_void.
3198 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3199 as pointer-to-member representation.
3200
3201 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
3202
3203 PR c++/9162
3204 * decl.c (grokdeclarator): Return friend decls, not
3205 void_type_node.
3206 * decl2.c (grokfield): Alter friend decl check.
3207 * parser.c (struct cp_parser): Document default_arg chain on
3208 unparsed_functions_queue.
3209 (cp_parser_save_default_args): New.
3210 (cp_parser_init_declarator, cp_parser_function_definition,
3211 cp_parser_member_declaration): Call it.
3212 (cp_parser_class_specifier): Remove unused variable. Alter
3213 processing of unparsed_functions_queue.
3214
3215 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3216
3217 * class.c (add_method, check_field_decl): Fix format specifier.
3218 * decl.c (duplicate_decls, pushdecl, check_goto,
3219 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3220 start_enum): Likewise.
3221 * decl2.c (ambiguous_decl): Likewise.
3222 * pt.c (redeclare_class_template): Likewise.
3223
3224 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
3225
3226 PR c++/10219
3227 * pt.c (type_unification_real): Don't unify exprs of error type.
3228 * tree.c (error_type): Don't die on error_type.
3229
3230 PR c++/9779
3231 * decl2.c (arg_assoc_class): Don't die on NULL type.
3232 * typeck.c (type_unknown_p): Don't die on untyped expressions.
3233
3234 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3235
3236 PR c++/6949
3237 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3238 classes.
3239
3240 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3241
3242 * error.c (locate_error): %P takes an `int', not a `tree'.
3243
3244 2003-07-02 Jan Hubicka <jh@suse.cz>
3245
3246 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3247 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3248 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3249 massaging.
3250
3251 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3252 (expand_or_defer_fn): Declare.
3253 (lower_function): Declare.
3254 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3255 * decl2.c: Include cgraph.h and varpool.h
3256 (maybe_emit_vtables): Make explicit instantations as needed.
3257 (mark_member_pointers, lower_function): New functions.
3258 (finish_file): Do unit-at-a-time.
3259 * method.c (synthesize_method): Use expand_or_defer_fn.
3260 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3261 * parser.c (cp_parser_function_definition_after_decl): Use
3262 expand_or_defer_fn.
3263 * pt.c (instantiate_decl): Likewise.
3264 * semantics.c: Include cgraph.h
3265 (expand_or_defer_fn): Break out from ...
3266 (expand_body): ... here; deal with unit-at-a-time.
3267 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3268 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3269
3270 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3271
3272 * call.c (resolve_scoped_fn_name): Return error_mark_node for
3273 erroneous cases.
3274
3275 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3276
3277 PR c++/11149
3278 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3279 is a class type.
3280
3281 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
3282
3283 PR c++/8046
3284 * error.c (dump_decl): Handle BIT_NOT_EXPR as
3285 pseudo destructor calls.
3286
3287 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3288
3289 * cp-tree.h (define_label): Replace filename and lineno
3290 arguments with a location_t.
3291 * decl.c (pop_label): Adjust define_label call.
3292 (define_label): Replace filename and lineno arguments with a
3293 location_t.
3294 * semantics.c (finish_label): Adjust define_label call.
3295
3296 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3297
3298 PR c++/9559
3299 * decl2.c (grokfield): Do not build NOP_EXPRs around the
3300 error_mark_node.
3301
3302 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
3303
3304 * Make-lang.in: Update.
3305 * cp-lang.c (c_language): Define.
3306 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3307 * cp-tree.h (cxx_init_options): Remove.
3308 * lex.c: Don't include diagnostic.h.
3309 (cxx_init_options): Remove.
3310
3311 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3312
3313 PR c++/4933
3314 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3315 tree generated within a template. Use dump_expr to dump an
3316 expression sizeof.
3317
3318 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3319
3320 * mangle.c (write_expression): Exit gracefully when trying to
3321 mangle a CALL_EXPR.
3322
3323 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3324
3325 PR c++/10750
3326 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3327 (value- or type-) dependent expression as DECL_INITIAL is a
3328 valid constant-expression (at parser time).
3329
3330 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3331
3332 PR c++/11106
3333 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3334 USING_DECL, instead of print_tree_identifier.
3335
3336 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3337
3338 * cp-tree.h (language_to_string): Adjust declaration.
3339 * dump.c (cp_dump_tree): Adjust usage.
3340 * error.c (dump_char): Use output_formatted_scalar. Tidy.
3341 (parm_to_string): Lose unused parameter. Tidy.
3342 (expr_to_string): Likewise.
3343 (code_to_string): Likewise.
3344 (language_to_string): Likewise.
3345 (op_to_string): Likewise.
3346 (assop_to_string): Likewise.
3347 (digit_buffer): Remove.
3348 (dump_type): Format builtin vector type as __vector__.
3349
3350 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3351
3352 * error.c (print_integer): Remove.
3353 (dump_type_suffix): Adjust.
3354 (dump_expr): Likewise.
3355
3356 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3357
3358 * error.c (print_instantiation_partial_context): Take a
3359 location_t.
3360 (print_instantiation_full_context): Adjust.
3361 (print_instantiation_context): Adjust.
3362
3363 * cp-tree.h (cp_line_of, cp_file_of): Remove.
3364 * error.c (cp_line_of, cp_file_of): Merge into ...
3365 (location_of): ... here. Make static, return a location_t.
3366 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3367
3368 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3369
3370 PR c++/10784
3371 * call.c (joust): Move warn_conversion check outwards.
3372
3373 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3374
3375 * decl.c (build_typename_type)
3376 * mangle.c (write_template_template_arg)
3377 * parser.c (cp_parser_scope_through_which_access_occurs)
3378 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3379 * repo.c (get_base_filename)
3380 * semantics.c (maybe_convert_cond):
3381 Mark the definition static, matching the forward declaration.
3382
3383 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3384
3385 PR c++/10468
3386 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3387
3388 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3389
3390 PR c++/10796
3391 * decl.c (finish_enum): Implement DR377.
3392
3393 * decl.c (cp_finish_decl): Don't make variables with reference
3394 type readonly while they are being initialized.
3395
3396 2003-06-26 Mark Mitchell <mark@codesourcery.com>
3397
3398 PR c++/11332
3399 * typeck.c (build_static_cast): Avoid returning expressions with
3400 reference type.
3401
3402 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
3403
3404 * call.c (build_op_delete_call): Use strip_array_call. Correct
3405 error message to say 'delete' or 'delete[]'.
3406
3407 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
3408
3409 PR c++/8266
3410 * pt.c (check_explicit_specialization): When looking up a
3411 template function from an identifier outside class-scope, bind
3412 it to CP_DECL_CONTEXT.
3413
3414 2003-06-25 Mark Mitchell <mark@codesourcery.com>
3415
3416 PR c++/10990
3417 * search.c (lookup_base_r): Rely on accessible_p, rather than
3418 trying to emulate that logic here.
3419
3420 PR c++/10931
3421 * call.c (convert_like): Pass issue_conversion_warnings.
3422 (convert_like_with_context): Likewise.
3423 (convert_like_real): Add issue_conversion_warnings parameter.
3424 (perform_direct_initialization_if_possible): New function.
3425 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3426 * typeck.c (check_for_casting_away_constness): New function.
3427 (build_static_cast): Rewrite.
3428
3429 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
3430
3431 * call.c (enforce_access): Assert we get a binfo.
3432 (build_op_delete_call): Pass a binfo to
3433 perform_or_defer_access_check.
3434 * class.c (alter_access): Likewise.
3435 * decl.c (make_typename_type): Likewise.
3436 (make_unbound_class_template): Likewise.
3437 * lex.c (do_identifier): Likewise.
3438 * method.c (hack_identifier): Likewise.
3439 * parser.c (cp_parser_lookup_name): Likewise.
3440 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3441 test.
3442 * semantics.c (finish_non_static_data_member): Likewise.
3443 (perform_or_defer_access_check): Expect a binfo.
3444 * typeck.c (comptypes): Expect types.
3445
3446 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3447 * friend.c (make_friend_class): Likewise.
3448 * pt.c (check_default_tmpl_args): Likewise.
3449 (lookup_template_class): Likewise.
3450
3451 2003-06-24 Jan Hubicka <jh@suse.cz>
3452
3453 * method.c (thunk_labelno): Move outside ifdef block to make garbage
3454 collector happy.
3455
3456 2003-06-24 Jan Hubicka <jh@suse.cz>
3457
3458 * class.c (build_vtable): Make vtables.
3459 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3460 * decl2.c (output_vtable_inherit): Rename to ...
3461 (prepare_assemble_variable): ... this one; change interface.
3462 (maybe_emit_vtables): Do not call output_vtable_inherit.
3463 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3464 * cp-tree.h (prepare_assemble_variable): New.
3465
3466 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
3467
3468 * method.c: add prototype for make_alias_for_thunk.
3469 (thunk_labelno, make_alias_for_thunk): only define
3470 if ASM_OUTPUT_DEF is defined.
3471
3472 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3473
3474 * method.c (thunk_labelno): New variable.
3475 (make_alias_for_thunk): New function.
3476 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
3477 into the same section as the function it is calling.
3478 Include gt-cp-method.h.
3479 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3480 (cp/method.o): Depend on gt-cp-method.h.
3481 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3482
3483 2003-06-23 Jan Hubicka <jh@suse.cz>
3484
3485 * decl.c (register_dtor_fn): Mark cleanup as used.
3486 * decl2.c (mark_vtable_entries): Skip nops.
3487 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3488 (build_dynamic_cast_1): Likewise.
3489 (tinfo_base_init): Likewise.
3490 (emit_tinfo_decl): Likewise.
3491
3492 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3493
3494 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3495 to it.
3496
3497 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3498
3499 PR c++/10784
3500 * call.c (joust): Warn about choosing conversion sequence only if
3501 -Wconversion.
3502
3503 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3504
3505 PR c++/10864
3506 * call.c (op_error): Tidy.
3507 * error.c (dump_expr): Properly format 'T()' when T is an
3508 aggregate type.
3509
3510 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3511
3512 PR c++/10915
3513 * decl.c (grok_op_properties): Warn possible confusing conversion
3514 only if -Wconversion.
3515
3516 2003-06-20 Mark Mitchell <mark@codesourcery.com>
3517
3518 PR c++/10749
3519 * parser.c (cp_parser_class_head): See through dependent names
3520 when parsing a class-head.
3521
3522 PR c++/10845
3523 * pt.c (try_class_unification): Correct handling of member class
3524 templates.
3525
3526 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3527
3528 * semantics.c (genrtl_finish_function): Adjust
3529 expand_function_end call.
3530
3531 2003-06-19 Mark Mitchell <mark@codesourcery.com>
3532
3533 PR c++/10939
3534 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3535 functions.
3536 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3537
3538 PR c++/9649
3539 * cp-tree.h (pushdecl_class_level): Change prototype.
3540 (push_class_level_binding): Likewise.
3541 * decl.c (add_binding): Reject duplicate static data members.
3542 (pushdecl_class_level): Return a value indicating whether or not
3543 the binding was valid.
3544 (push_class_level_binding): Likewise.
3545 * semantics.c (finish_member_declaration): Don't keep invalid
3546 declarations.
3547
3548 PR c++/11041
3549 * call.c (initialize_reference): Do not use cp_finish_decl to emit
3550 temporary variables.
3551 * cp-tree.h (static_aggregates): Declare.
3552 (pushdecl_top_level_and_finish): Likewise.
3553 * decl.c (pushdecl_top_level_1): New function.
3554 (pushdecl_top_level): Use it.
3555 (pushdecl_top_level_and_finish): New function.
3556 (initialize_local_var): Remove redundant code.
3557 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
3558 building_stmt_tree.
3559 * decl.h (static_aggregates): Remove.
3560 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3561 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3562 (tinfo_base_init): Likewise.
3563
3564 2003-06-19 Matt Austern <austern@apple.com>
3565
3566 PR c++/11228
3567 * init.c (build_zero_init): Assert that number of array elements
3568 is an integer constant.
3569 (build_default_init) Don't use build_zero_init for arrays with
3570 variable number of elements.
3571
3572 2003-06-19 Andreas Jaeger <aj@suse.de>
3573
3574 * cp-tree.h: Remove duplicated declarations.
3575
3576 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
3577
3578 * pt.c: Convert to ISO C.
3579 * semantics.c: Convert to ISO C.
3580
3581 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3582
3583 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3584 at_least_as_qualified_p, more_qualified_p): Return bool.
3585 * typeck.c: ANSIFY function definitions.
3586 (comp_array_types): Take redeclaration bool parameter.
3587 (comptypes): Rearrange STRICT handling.
3588 (at_least_as_qualified_p, more_qualified_p,
3589 comp_cv_qualification): Cache cv quals.
3590 (compparms): Rearrange loop.
3591
3592 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3593
3594 * cp-tree.h (COMPARE_RELAXED): Rename to ...
3595 (COMPARE_DERIVED): ... here. Adjust comment.
3596 (resolve_typename_type_in_current_instantiation): Remove.
3597 (cp_tree_equal, comptypes): Return a bool.
3598 * cvt.c (convert_to_reference): Adjust comptypes call.
3599 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3600 (resolve_typename_type_in_current_instantiation): Remove.
3601 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3602 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3603 calls. Refactor code.
3604 * typeck.c (comp_array_types): Return bool. Lose callback.
3605 parameter. Adjust cp_tree_equal calls.
3606 (comptypes): Return bool. Adjust strict handling. Remove relaxed
3607 enumeration and java type handling. Deal with typename types here.
3608 Adjust recursive and cp_tree_equals calls. Adjust base and derived
3609 checking.
3610 (comp_target_types): Remove unreachable code. Adjust
3611 same_or_base_type_p calls.
3612 (ptr_reasonably_similar): Adjust base and derived check.
3613
3614 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3615 unused calculation.
3616 (check_return_expr): Adjust error messages.
3617 * cp-tree.def (SCOPE_REF): Correct comment.
3618
3619 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3620
3621 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3622 string again.
3623
3624 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3625
3626 * optimize.c (dump_function): Form complete flag name by
3627 prefixing 'fdump-' to string returned by dump_flag_name().
3628
3629 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3630
3631 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3632 string.
3633
3634 2003-06-17 Jason Merrill <jason@redhat.com>
3635
3636 PR c++/10929
3637 * decl.c (grokfndecl): Don't mark a function inline for
3638 -finline-functions if it isn't defined.
3639
3640 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3641
3642 PR c++/10712
3643 * class.c (handle_using_decl): Robustify.
3644
3645 PR c++/11105
3646 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3647 * mangle.c (struct globals): Remove internal_mangling_p.
3648 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3649 (write_template_parm): Don't write out the level number.
3650 (conv_type_names): New variable.
3651 (hash_type): New function.
3652 (compare_type): Likewise.
3653 (mangle_conv_op_name_for_type): Don't try to mangle conversion
3654 operator names.
3655 * search.c (lookup_conversion_operator): New function.
3656 (lookup_fnfields_1): Use it.
3657
3658 2003-06-17 Andreas Jaeger <aj@suse.de>
3659
3660 * except.c: Remove duplicate declaration of push_eh_cleanup.
3661
3662 * call.c: Remove extra declaration of inhibit_warnings.
3663
3664 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3665
3666 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
3667 * mangle.c: Convert to ISO C.
3668
3669 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3670
3671 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3672 macro.
3673
3674 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3675
3676 * tree.c: Convert to ISO C.
3677
3678 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
3679
3680 * cp-tree.h: Follow spelling conventions.
3681 * mangle.c: Likewise.
3682 * method.c: Likewise.
3683 * parser.c: Likewise.
3684
3685 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3686
3687 * decl.c (start_function): Adjust init_function_start call.
3688 * method.c (use_thunk): Likewise.
3689 * semantics.c (genrtl_start_function): Likewise.
3690
3691 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3692
3693 * Make-lang.in: Remove c-options.o.
3694
3695 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
3696
3697 * lex.c: Convert to ISO C.
3698
3699 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
3700 * init.c: removes use of PARAMS macro. Use ISO style function
3701 declarations. (Not copyright-significant change.)
3702
3703 * rtti.c: Remove PARAMS.
3704
3705 * typeck2.c: Convert to ISO C.
3706
3707 2003-06-12 Mark Mitchell <mark@codesourcery.com>
3708
3709 PR c++/10635
3710 * typeck.c (build_c_cast): Check that the destination type is
3711 complete.
3712
3713 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3714
3715 PR c++/10432
3716 * cp-tree.h (finish_declarator): Remove.
3717 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3718 erroneous declarations.
3719 * semantics.c (finish_declarator): Remove.
3720
3721 2003-06-11 Roger Sayle <roger@eyesopen.com>
3722
3723 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3724 global static constructor/destructor if it will be empty, i.e.
3725 either doesn't call any ctors/dtors or only calls pure or const
3726 ctors/dtors.
3727
3728 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3729
3730 * mangle.c (tm_p.h): Include it.
3731 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3732
3733 PR c++/11131
3734 * tree.c (cp_cannot_inline_fn): Check for "inline" before
3735 instantiation.
3736
3737 2003-06-10 Jason Merrill <jason@redhat.com>
3738
3739 PR c++/10968
3740 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3741
3742 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
3743
3744 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3745 (start_cleanup_cnt): New.
3746
3747 2003-06-10 Mark Mitchell <mark@codesourcery.com>
3748
3749 PR c++/11131
3750 * cp-tree.h (template_for_substitution): Declare.
3751 * decl2.c (mark_used): Use it when figuring out whether or not a
3752 function is inline.
3753 * pt.c (template_for_substitution): Give it external linkage.
3754 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3755 possible.
3756
3757 2003-06-09 Zack Weinberg <zack@codesourcery.com>
3758
3759 PR 8861
3760 * mangle.c (write_real_cst): New function. Implement
3761 ABI-compliant mangling of floating-point literals when
3762 -fabi-version>=2; provide backward compatibility with 3.3 when
3763 -fabi-version=1 (with warning). Clarify commentary.
3764 (write_template_arg_literal): Use write_real_cst.
3765
3766 2003-06-07 Andreas Jaeger <aj@suse.de>
3767
3768 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3769
3770 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3771
3772 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3773 (LANG_HOOKS_HANDLE_OPTION): Override.
3774 * cp-tree.h (cxx_init_options): Update.
3775 * lex.c (cxx_init_options): Update.
3776
3777 2003-06-05 Jan Hubicka <jh@suse.cz>
3778
3779 * Make-lang.in: Add support for stageprofile and stagefeedback
3780
3781 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
3782
3783 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3784
3785 2003-06-04 Andreas Jaeger <aj@suse.de>
3786
3787 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3788
3789 2003-06-03 Jason Merrill <jason@redhat.com>
3790
3791 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3792
3793 * cp/decl.c (reshape_init): Handle vectors.
3794
3795 * testsuite/g++.dg/init/array10.C: New.
3796
3797 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3798
3799 PR c++/10940
3800 * pt.c (check_explicit_specialization): Check for 'static'
3801 earlier.
3802
3803 2003-05-31 Diego Novillo <dnovillo@redhat.com>
3804
3805 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3806 the operand of a CONSTRUCTOR node.
3807
3808 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3809
3810 * decl.c (cp_binding_level::this_entity): Rename from this_class.
3811 (cxx_scope_descriptor): New function.
3812 (cxx_scope_debug): Likewise.
3813 (push_binding_level): Use it.
3814 (pop_binding_level): Likewise.
3815 (suspend_binding_level): Likewise.
3816 (resume_binding_level): Likewise.
3817 (pushlevel_class): Adjust use of this_class.
3818 (pushtag): Likewise.
3819 (lookup_name_real): Likewise.
3820 (global_scope_name): New variable.
3821 (initialize_predefined_identifiers): Initialize it.
3822 (push_namespace): Use it.
3823 (make_cxx_scope): New function.
3824 (pushlevel): Use it.
3825 (pushlevel_class): Likewise.
3826 (push_binding_level): Simplify. Loose the last two arguments.
3827 (make_binding_level): Remove.
3828 (initial_push__namespace_scope): New function.
3829 (push_namespace): Use it. Simplify.
3830 (cxx_init_decl_processing): Likewise.
3831 (declare_namespace_level): Remove.
3832
3833 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3834
3835 PR c++/10956
3836 * pt.c (instantiate_decl): Don't use full template arguments if
3837 we are dealing with specializations.
3838
3839 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3840
3841 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3842 (binding_depth): Unconditionally define.
3843 (is_class_level): Likewise.
3844 (indent): Likewise. Take an indenting parameter.
3845 (push_binding_level): Remove conditional definittion.
3846 (pop_binding_level): Likewise.
3847 (suspend_binding_level): Likewise.
3848 (resume_binding_level): Likewise.
3849 (pushlevel): Likewise.
3850 (pushlevel_class): Likewise.
3851 (poplevel_class): Likewise.
3852 (pop_everything): Likewise.
3853
3854 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3855
3856 * name-lookup.h (global_scope_p): New macro.
3857 * decl.c (pop_binding_level): Use it. Don't refer directly to
3858 global_binding_level.
3859 (suspend_binding_level): Likewise.
3860 (global_bindings_p): Likewise.
3861 (print_other_binding_stack): Likewise.
3862 (print_binding_stack): Likewise.
3863 (maybe_push_to_top_level): Likewise.
3864 (pushdecl_namespace_level): Likewise.
3865 (cxx_init_decl_processing): Likewise.
3866 (start_decl): Likewise.
3867 (cp_finish_decl): Likewise.
3868 (start_function): Likewise.
3869 (global_binding_level): Remove.
3870
3871 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3872
3873 * parser.c (cp_parser_explicit_instantiation): Restore old
3874 access before template instantiation.
3875
3876 2003-05-23 Geoffrey Keating <geoffk@apple.com>
3877
3878 * lang-specs.h: Use -o to specify preprocessor's output file.
3879 Make -no-integrated-cpp work when building PCH files.
3880
3881 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3882
3883 PR c++/10682
3884 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3885 check for implicitly created typedef to an enum.
3886
3887 2003-05-21 Jason Merrill <jason@redhat.com>
3888
3889 * init.c (build_vec_delete): Copy the address into a temporary
3890 variable before calling build_vec_delete_1.
3891 * decl2.c (delete_sanity): Don't call stabilize_reference.
3892
3893 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
3894
3895 * pt.c (register_specialization): Update the decl's location,
3896 if necessary.
3897 (check_explicit_specialization): Likewise.
3898
3899 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3900
3901 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3902
3903 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
3904
3905 PR c++/9738
3906 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3907 if the old decl had instantiated DECL_RTL.
3908 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3909
3910 2003-05-19 Matt Austern <austern@apple.com>
3911
3912 * lang-options.h: Document -Wno-invalid-offsetof
3913 * typeck.c (build_class_member_access_expr): Don't complain about
3914 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3915
3916 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3917
3918 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3919 (binding_entry_make): Make entry->chain NULL after getting an entry.
3920 fix the spelling of chain in a comment.
3921 (binding_table_free): speed up by having temporary variable.
3922 (binding_table_new): set table->chain to be NULL after allocating
3923 a table.
3924 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3925 binding->previous to NULL after getting an binding for speed.
3926
3927 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3928
3929 * cp-tree.h (struct lang_type_class): Replace data member tags
3930 with hash-table nested_udts.
3931 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3932 * class.c (unreverse_member_declarations): Don't touch
3933 CLASSTYPE_TAGS.
3934 (pushclass): Use cxx_remember_type_decls.
3935 * decl.c (struct cp_binding_level): Replace data member tags with
3936 hash-table type_decls.
3937 (pop_binding_level): Handle level->type_decls.
3938 (kept_level_p): Adjust.
3939 (poplevel): Remove unused local variable.
3940 (bt_print_entry): New function.
3941 (print_binding_level): Use it.
3942 (push_namespace): Build current_binding_level->type_decls.
3943 (maybe_process_template_type_declaration): Adjust.
3944 (pushtag): Likewise.
3945 (clear_anon_tags): Use binding_table_remove_anonymous_types.
3946 (gettags): Remove.
3947 (cxx_remember_type_decls): Rename from storetags. Adjust.
3948 (lookup_tag): Use binding_table_find_anon_type. Tidy.
3949 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3950 (cxx_init_decl_processing): Build global_binding_level->type_decls.
3951 (store_parm_decls): Remove pointless code.
3952 * name-lookup.c (free_binding_entry): New variable.
3953 (ENTRY_INDEX): New macro.
3954 (struct binding_table_s): New datatype.
3955 (binding_entry_make): New function.
3956 (binding_entry_free): Likewise.
3957 (binding_table_construct): Likewise.
3958 (binding_table_free): Likewise.
3959 (binding_table_new): Likewise.
3960 (binding_table_expand): Likewise.
3961 (binding_table_insert): Likewise.
3962 (binding_table_find): Likewise.
3963 (binding_table_find_anon_type): Likewise.
3964 (binding_table_reverse_maybe_remap): Likewise.
3965 (binding_table_remove_anonymous_types): Likewise.
3966 (binding_table_foreach): Likewise.
3967 * name-lookup.h (binding_table): New type.
3968 (binding_entry): Likewise.
3969 (bt_foreach_proc): Likewise.
3970 (struct binding_entry_s): New datatype.
3971 (SCOPE_DEFAULT_HT_SIZE): New macro.
3972 (CLASS_SCOPE_HT_SIZE): Likewise.
3973 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3974 (NAMESPACE_STD_HT_SIZE): Likewise.
3975 (GLOBAL_SCOPE_HT_SIZE): Likewise.
3976 (binding_table_new): Declare.
3977 (binding_table_free): Likewise.
3978 (binding_table_insert): Likewise.
3979 (binding_table_find_anon_type): Likewise.
3980 (binding_table_reverse_maybe_remap): Likewise.
3981 (binding_table_remove_anonymous_types): Likewise.
3982 (binding_table_foreach): Likewise.
3983 (binding_table_find): Likewise.
3984 (cxx_remember_type_decls): Likewise.
3985 * pt.c (bt_instantiate_type_proc): New function.
3986 (do_type_instantiation): Use it.
3987 * search.c (lookup_field_r): Use binding_table_find.
3988
3989 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3990
3991 * semantics.c (perform_deferred_access_checks): Don't discard
3992 checked access.
3993
3994 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3995
3996 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3997 libiberty VA_ macros, always use stdarg.
3998 * rtti.c (create_pseudo_type_info): Likewise.
3999 * tree.c (build_min_nt, build_min): Likewise.
4000
4001 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4002
4003 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
4004 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
4005 collapse multiple function calls into one.
4006 * tree.c (debug_binfo): Likewise.
4007
4008 2003-05-15 Jason Merrill <jason@redhat.com>
4009
4010 PR c++/5388
4011 * call.c (conditional_conversion): Don't consider implicit
4012 conversions if T2 is a base of T1.
4013 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
4014 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
4015
4016 * parser.c (cp_parser_primary_expression): Convert a static data
4017 member from reference.
4018
4019 2003-05-15 Mark Mitchell <mark@codesourcery.com>
4020
4021 * call.c (build_op_delete_call): Avoid creating unnecessary types.
4022 * class.c (instantiate_type): Remove tests for tf_no_attributes.
4023 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
4024 (COMPARE_NO_ATTRIBUTES): Remove.
4025 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
4026
4027 PR c++/8385
4028 * semantics.c (finish_typeof): Refine type-dependency check.
4029
4030 2003-05-13 Jason Merrill <jason@redhat.com>
4031
4032 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
4033 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
4034
4035 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4036
4037 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
4038
4039 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4040
4041 PR c++/10230, c++/10481
4042 * semantics.c (finish_non_static_data_member): Handle when the
4043 non-static member is not from a base of the current class type.
4044
4045 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4046
4047 PR c++/10552
4048 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
4049 template and has dependent context.
4050
4051 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4052
4053 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
4054
4055 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4056
4057 PR c++/9252
4058 * cp-tree.h (saved_scope): Remove check_access field.
4059 (tsubst_flags_t): Remove tf_parsing.
4060 * decl.c (maybe_push_to_top_level): Don't initialize
4061 scope_chain->check_access.
4062 (make_typename_type, make_unbound_class_template): Don't use
4063 tf_parsing.
4064 (register_dtor_fn): Use push/pop_deferring_access_checks
4065 instead of scope_chain->check_access.
4066 * method.c (use_thunk): Likewise.
4067 * parser.c (cp_parser_explicit_instantiation
4068 (cp_parser_constructor_declarator_p): Don't call
4069 push/pop_deferring_access_checks here.
4070 (cp_parser_template_argument, cp_parser_class_name): Don't use
4071 tf_parsing.
4072 (yyparse): Check flag_access_control.
4073 * pt.c (instantiate_class_template): Call
4074 push/pop_deferring_access_checks.
4075 * semantics.c (push_deferring_access_checks): Propagate
4076 dk_no_check.
4077 (perform_or_defer_access_check): Make sure basetype_path is
4078 a type before comparison.
4079 * call.c (build_op_delete_call, build_over_call): Use
4080 perform_or_defer_access_check.
4081 * class.c (alter_access): Likewise.
4082 * init.c (build_offset_ref): Likewise.
4083 * lex.c (do_identifier): Likewise.
4084 * method.c (hack_identifier): Likewise.
4085 * search.c (lookup_member): Likewise.
4086 * semantics.c (finish_non_static_data_member): Likewise.
4087 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
4088 instead of flag_access_control.
4089
4090 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4091
4092 PR c++/9554
4093 * parser.c (cp_parser_class_name): Remove check_access parameter.
4094 All caller adjusted. Update declaration.
4095 (cp_parser_lookup_name): Likewise.
4096 * semantics.c (push_deferring_access_checks): Change parameter type
4097 to enum deferring_kind. All caller adjusted.
4098 (resume_deferring_access_checks): Adjust to use new enum.
4099 (stop_deferring_access_checks): Likewise.
4100 (perform_or_defer_access_check): Likewise.
4101 * cp-tree.h (deferring_kind): New enum.
4102 (deferred_access): Adjust field type.
4103 (push_deferring_access_checks): Update declaration.
4104
4105 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4106
4107 PR c++/10555, c++/10576
4108 * pt.c (lookup_template_class): Handle class template with
4109 multiple levels of parameters when one of the levels contain
4110 errors.
4111
4112 2003-05-08 Jason Merrill <jason@redhat.com>
4113
4114 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
4115 expression. Undo some of the recent reorg.
4116
4117 2003-05-07 Richard Henderson <rth@redhat.com>
4118
4119 PR c++/10570
4120 * cfns.gperf: Comment out POSIX thread cancellation points,
4121 plus abort and raise.
4122 * cfns.h: Regenerate.
4123
4124 2003-05-07 Jason Merrill <jason@redhat.com>
4125
4126 * call.c (build_conditional_expr): Don't assume that the folded
4127 expression has result_type.
4128
4129 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4130
4131 * typeck.c (build_unary_op): Deal with const qualifier in
4132 invalid pointer-to-member earlier.
4133
4134 2003-05-05 Jason Merrill <jason@redhat.com>
4135
4136 PR c++/9537
4137 * call.c (conditional_conversion): Build an RVALUE_CONV if
4138 we're just changing the cv-quals.
4139 (build_conditional_expr): Don't call convert to change
4140 cv-quals.
4141
4142 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4143
4144 PR c++/10496
4145 * typeck.c (build_unary_op): Don't output const qualifier when
4146 output invalid pointer-to-member diagnostics.
4147
4148 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4149
4150 * decl.c: Fix typos.
4151
4152 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4153
4154 PR c++/4494
4155 * decl.c (start_function): Use same_type_p to check return type
4156 of main.
4157
4158 2003-05-03 Zack Weinberg <zack@codesourcery.com>
4159
4160 PR c/10604
4161 * cp/typeck.c (build_x_compound_expr): No need to check
4162 extra_warnings as well as warn_unused_value.
4163
4164 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4165
4166 PR c++/9364, c++/10553, c++/10586
4167 * decl.c (make_typename_type): Don't crash on illegal code.
4168
4169 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
4170
4171 * class.c (finish_struct): Use location_t and input_location
4172 directly.
4173 * decl.c (make_label_decl): Likewise.
4174 (use_label): Likewise.
4175 * decl2.c (warn_if_unknown_interface): Likewise.
4176 (start_static_initialization_or_destruction): Likewise.
4177 (generate_ctor_or_dtor_function): Likewise.
4178 (finish_file): Likewise.
4179 * error.c (print_instantiation_full_context): Likewise.
4180 * init.c (create_temporary_var): Likewise.
4181 * method.c (synthesize_method): Likewise.
4182 * parser.c (cp_token): Likewise.
4183 (cp_lexer_set_source_position_from_token): Likewise.
4184 (cp_lexer_get_preprocessor_token): Likewise.
4185 (cp_parser_statement): Likewise.
4186 * pt.c (tsubst_friend_function): Likewise.
4187 (instantiate_class_template): Likewise.
4188 (tsubst_decl): Likewise.
4189 (tsubst): Likewise.
4190 (instantiate_decl): Likewise.
4191 * semantics.c (begin_class_definition): Likewise.
4192 (expand_body): Likewise.
4193
4194 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
4195
4196 * class.c (finish_struct): Rename lineno to input_line.
4197 * decl.c (push_binding_level, pop_binding_level,
4198 suspend_binding_level, resume_binding_level, make_label_decl,
4199 use_label, start_function): Likewise.
4200 * decl2.c (warn_if_unknown_interface,
4201 start_static_initialization_or_destruction,
4202 generate_ctor_or_dtor_function, finish_file): Likewise.
4203 * error.c (cp_line_of, print_instantiation_full_context,
4204 print_instantiation_context): Likewise.
4205 * except.c (check_handlers_1, check_handlers): Likewise.
4206 * init.c (create_temporary_var): Likewise.
4207 * method.c (use_thunk, synthesize_method): Likewise.
4208 * parser.c (cp_lexer_set_source_position_from_token,
4209 cp_lexer_get_preprocessor_token): Likewise.
4210 * pt.c (push_tinst_level, pop_tinst_level,
4211 tsubst_friend_function, instantiate_class_template, tsubst_decl,
4212 tsubst, tsubst_expr, instantiate_decl): Likewise.
4213 * semantics.c (genrtl_try_block, finish_label_stmt,
4214 begin_class_definition, expand_body,
4215 genrtl_finish_function): Likewise.
4216 * tree.c (build_min_nt, build_min): Likewise.
4217
4218 2003-05-01 Mark Mitchell <mark@codesourcery.com>
4219
4220 * decl2.c (comdat_linkage): Don't externalize explicit
4221 instantiations.
4222
4223 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4224
4225 PR c++/10554
4226 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4227 is not NULL.
4228
4229 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
4230
4231 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
4232 (struct lang_identifier): ... to here.
4233 (LANG_ID_FIELD): Remove.
4234 (SET_LANG_ID): Remove.
4235 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4236 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4237 (IDENTIFIER_IMPLICIT_DECL): Likewise.
4238 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4239 (IDENTIFIER_ERROR_LOCUS): Likewise.
4240 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4241
4242 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4243
4244 PR c++/8772
4245 * pt.c (convert_template_argument): Correct diagnostic.
4246
4247 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4248
4249 PR c++/9432, c++/9528
4250 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4251
4252 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
4253
4254 * decl.c (check_previous_goto_1): Adjust prototype.
4255 (check_previous_goto): Adjust use.
4256 (check_switch_goto): Likewise.
4257 (use_label): Adjust.
4258 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4259 (struct named_label_use_list): Use location_t datatype.
4260
4261 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4262
4263 PR c++/10551
4264 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4265 that have not yet been written out.
4266
4267 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4268
4269 PR c++/10549
4270 * class.c (layout_class_type): Mark overlong bitfields as having
4271 the maximum size permitted by their type, after layout.
4272
4273 PR c++/10527
4274 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4275
4276 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4277
4278 * call.c (build_operator_new_call): Fix typo.
4279 * lang-options.h: Likewise.
4280
4281 2003-04-29 Mark Mitchell <mark@codesourcery.com>
4282
4283 PR c++/10515
4284 * cp-tree.h (lookup_field_1): Declare it.
4285 * search.c (lookup_field_1): Make it public.
4286 * decl.c (reshape_init): Handle designated initializers.
4287
4288 * decl.c (maybe_commonize_var): Further tweak support for systems
4289 without weak symbols.
4290
4291 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4292
4293 * decl.c (maybe_commonize_var): Fix thinko in last patch.
4294
4295 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4296
4297 PR c++/10506
4298 * method.c (use_thunk): Decrement immediate_size_expand.
4299
4300 PR c++/10503
4301 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4302 (DECL_MAYBE_TEMPLATE): Remove.
4303 * class.c (fixed_type_or_null): Avoid infinite recursion.
4304
4305 * decl.c (maybe_commonize_var): Make the code match the comments.
4306 * pt.c (instantiate_decl): Move call to import_export_decl.
4307
4308 2003-04-26 Mark Mitchell <mark@codesourcery.com>
4309
4310 * decl2.c (finish_file): Fix merge botch.
4311
4312 2003-04-25 Mark Mitchell <mark@codesourcery.com>
4313
4314 * decl2.c (finish_file): Don't call import_export_decl for
4315 functions that are not defined.
4316 (handle_class_head): Robustify.
4317 * pt.c (instantiate_decl): Do not call cp_finish_decl for
4318 variables that are not defined.
4319
4320 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
4321
4322 * call.c (print_z_candidates): Fix off by one error.
4323
4324 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
4325
4326 PR c++/10337
4327 * call.c (joust): Don't warn about conversion ops that are exact
4328 or cv-conversions. Rearrange to avoid multiple type comparisons.
4329
4330 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4331
4332 PR c++/10471
4333 * call.c (build_cxx_call): Robustify.
4334
4335 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
4336
4337 * Make-lang.in (lex.o): Remove mbchar.h.
4338 * lex.c (MULTIBYTE_CHARS): Lose.
4339 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4340 in c-lex.c.
4341
4342 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4343
4344 PR c++/9847
4345 * cp-tree.h (duplicate_tag_error): Remove.
4346 * class.c (duplicate_tag_error): Remove.
4347 * semantics.c (begin_class_definition): Return immediately for a
4348 duplicate class definition.
4349
4350 PR c++/10451
4351 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4352
4353 2003-04-22 Mark Mitchell <mark@codesourcery.com>
4354
4355 PR c++/10446
4356 * search.c (lookup_fnfields_1): Handle empty slots in the method
4357 vector.
4358
4359 PR c++/10428
4360 * decl.c (check_elaborated_type_specifier): New function, split
4361 out from ...
4362 (xref_tag): ... here. Use the new function in more places.
4363
4364 * rtti.c (throw_bad_typeid): Use build_cxx_call.
4365
4366 2003-04-21 Mark Mitchell <mark@codesourcery.com>
4367
4368 * call.c (build_over_call): Use build_cxx_call.
4369 (build_cxx_call): New method, split out of build_over_call.
4370 * cp-tree.h (language_function): Add can_throw.
4371 (build_cxx_call): Declare it.
4372 * decl.c (finish_function): If a function does not contain any
4373 calls to functions that can throw an exception, indicate that
4374 fact.
4375 * decl2.c (mark_used): Do not defer the instantiation of
4376 functions, if the current function does not throw.
4377 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4378 * pt.c (instantiate_decl): Make sure import_export_decl is called
4379 before emitting things.
4380 * rtti.c (throw_bad_cast): Use build_cxx_call.
4381 (build_dynamic_cast_1): Likewise.
4382 * typeck.c (build_function_call): Likewise.
4383
4384 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
4385
4386 PR c++/9881
4387 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4388 expressions. Reverts my 2002-08-08 patch.
4389
4390 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4391 cheaper early exit.
4392
4393 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4394
4395 * cp/decl2.c (start_static_storage_duration_function): Take count
4396 arg, don't check if it wraps round.
4397 (generate_ctor_or_dtor_function): Add locus arg, use it.
4398 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4399 locus.
4400 (finish_file): Set line numbers to past EOF for synthesized
4401 functions.
4402
4403 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4404
4405 PR c++/10405
4406 * search.c (lookup_field_1): Final scan goes backwards for
4407 types, forwards for non-types.
4408
4409 2003-04-17 Roger Sayle <roger@eyesopen.com>
4410
4411 PR c/10375
4412 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4413 "nothrow" function attributes.
4414
4415 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4416
4417 PR c++/10347
4418 * pt.c (type_dependent_expression_p): Handle array new.
4419
4420 2003-04-15 Mark Mitchell <mark@codesourcery.com>
4421
4422 PR c++/10381
4423 * parser.c (cp_parser_primary_expression): Reorganize logic for
4424 dealing with name lookup failures.
4425
4426 2003-04-15 Jason Merrill <jason@redhat.com>
4427
4428 * decl2.c (mark_used): Don't instantiate anything if
4429 skip_evaluation.
4430
4431 2003-04-14 Ziemowit Laski <zlaski@apple.com>
4432
4433 * tree.c (build_cplus_array_type_1): Do not call
4434 uses_template_parms() on a NULL index_type.
4435
4436 2003-04-13 Roger Sayle <roger@eyesopen.com>
4437
4438 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4439
4440 2003-04-12 Mark Mitchell <mark@codesourcery.com>
4441
4442 PR c++/10300
4443 * init.c (build_new_1): Reorganize.
4444
4445 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4446
4447 * class.c (initialize_array)
4448 * decl.c (reshape_init)
4449 * decl2.c (build_expr_from_tree)
4450 * init.c (build_zero_init)
4451 * pt.c (tsubst_copy, tsubst_copy_and_build)
4452 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4453 (ptm_initializer, class_initializer, get_pseudo_ti_init)
4454 * semantics.c (finish_compound_literal)
4455 * typeck.c (build_ptrmemfunc1)
4456 * typeck2.c (store_init_value, process_init_constructor)
4457 (build_functional_cast): Use build_constructor.
4458
4459 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4460
4461 * call.c (print_z_candidates): Use gcc_gettext_width, not
4462 strlen, to determine how much padding to use.
4463
4464 2003-04-10 Zack Weinberg <zack@codesourcery.com>
4465
4466 * decl.c: Update all calls to shadow_warning.
4467
4468 2003-04-10 Mark Mitchell <mark@codesourcery.com>
4469
4470 * class.c (layout_class_type): Correct handling for overlong
4471 bit-fields whose width is the same as an integer type.
4472
4473 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4474
4475 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4476 * cp-lang.c (cp_tree_size): New function.
4477 (LANG_HOOKS_TREE_SIZE): Override.
4478
4479 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4480 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4481 (union lang_tree_node): Remove common and srcloc members.
4482 (build_srcloc_here): Don't prototype.
4483 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4484 * pt.c (pending_templates): Correct comment.
4485 * tree.c (build_srcloc, build_srcloc_here): Kill.
4486
4487 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4488
4489 * call.c: Include intl.h.
4490 (print_z_candidate): Always use inform; get rid of errfn
4491 argument. Reorganize so that all the strings get picked up
4492 by xgettext. Note obligation of caller to pass first argument
4493 through gettext.
4494 (print_z_candidates): Update to match. Indent second and
4495 successive candidates by strlen() of translated message.
4496 (joust): Restructure ambiguous-conversion pedwarn so that
4497 translators see a complete sentence. Update calls to
4498 print_z_candidate.
4499
4500 * Make-lang.in (cp/call.o): Update dependencies.
4501
4502 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4503
4504 * decl.c (set_current_binding_level): Delete, revert last change.
4505 (current_binding_level): Modify to allow it as as lvalue.
4506
4507 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4508
4509 * name-lookup.c (find_binding): Pass appropriate pointer type to
4510 POP_TIMEVAR_AND_RETURN.
4511
4512 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4513
4514 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4515 * cp-tree.h: Don't insist on having GNUC.
4516
4517 2003-04-03 Jason Merrill <jason@redhat.com>
4518
4519 * cvt.c (ocp_convert): Only abort if we try to convert an object
4520 of TREE_ADDRESSABLE type.
4521
4522 * class.c (build_vtable): Set DECL_ALIGN here.
4523 (get_vtable_decl): Not here.
4524 (layout_vtable_decl): Or here.
4525 (create_vtable_ptr): Or here.
4526 (layout_class_type): Or here.
4527 (check_bitfield_decl): Don't mess with field alignment.
4528
4529 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4530
4531 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4532 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4533 * rtti.c (dfs_class_hint_mark): Likewise.
4534
4535 * decl.c (push_local_name, push_class_level_binding,
4536 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4537 functions returning void.
4538 * decl2.c (add_using_namespace): Likewise.
4539
4540 * decl.c (print_binding_level, print_other_binding_stack,
4541 print_binding_stack): Cast argument of %p specifier to void*.
4542 * ptree.c (cxx_print_decl): Likewise.
4543
4544 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4545 VAR_FUNCTION_OR_PARM_DECL_CHECK,
4546 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4547 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4548 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4549
4550 * decl.c (set_current_binding_level): New macro. Use throughout
4551 when setting the current binding level.
4552
4553 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4554 in enum.
4555 * method.c (mangling_flags): Likewise.
4556
4557 * cp-tree.h (lang_type_header): Add __extension__ and use
4558 CHAR_BITFIELD for members.
4559
4560 2003-04-02 Geoffrey Keating <geoffk@apple.com>
4561
4562 PR other/9274
4563 * mangle.c: Include gt-cp-mangle.h.
4564 (subst_identifiers): Mark with GTY.
4565 * config-lang.in (gtfiles): Add cp/mangle.c.
4566 * Make-lang.in: (gt-cp-mangle.h): New rule.
4567 (cp/mangle.o): Depends on gt-cp-mangle.h.
4568
4569 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
4570
4571 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4572 after \$(srcdir)/cp/name-lookup.h.
4573 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4574 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
4575 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4576 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4577
4578 2003-03-31 Jason Merrill <jason@redhat.com>
4579
4580 PR java/10145
4581 * class.c (check_field_decl): Don't set DECL_ALIGN.
4582
4583 2003-03-30 Mark Mitchell <mark@codesourcery.com>
4584
4585 PR c++/7647
4586 * decl.c (grokdeclarator): Tidy, slightly.
4587 * search.c (lookup_field_1): Add want_type parameter.
4588 (lookup_field_r): Adjust call to lookup_field_1.
4589
4590 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4591
4592 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4593
4594 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4595
4596 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
4597 prototype.
4598 (cxx_scope_find_binding_for_name): Likewise.
4599 * decl.c (find_binding: Move to name-lookup.c.
4600 (binding_for_name): Likewise.
4601 (cxx_scope_find_binding_for_name): Likewise.
4602 (BINDING_LEVEL): Remove.
4603 (push_binding): Tidy.
4604 (push_class_binding): Likewise.
4605 (pop_binding): Likewise.
4606 (poplevel): Likewise.
4607 (poplevel_class): Likewise.
4608 (set_identifier_type_value_with_scope): Likewise.
4609 (push_overloaded_decl): Likewise.
4610 (lookup_tag): Likewise.
4611 (unqualified_namespace_lookup): Likewise.
4612 (lookup_name_current_level): Likewise.
4613 (maybe_inject_for_scope_var): Likewise.
4614 (namespace_binding): Move to name-lookup.c.
4615 (set_namespace_binding): Likewise.
4616 * decl2.c (lookup_using_namespace): Tidy.
4617 (qualified_lookup_using_namespace): Likewise.
4618 (do_toplevel_using_decl): Likewise.
4619 * name-lookup.c: Include "timevar.h"
4620 * name-lookup.h (cxx_scope): Declare.
4621 (struct cxx_binding): Lose member "has_level". Adjust "scope"
4622 member declaration.
4623 (BINDING_SCOPE): Adjust definition.
4624 (BINDING_HAS_LEVEL_P): Remove.
4625
4626 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4627
4628 * name-lookup.c: New file.
4629 * name-lookup.h: Likewise..
4630 * decl.c (push_binding): Adjust use cxx_binding_make.
4631 (free_bindings): Move to name-lookup.c
4632 (pop_binding): Use cxx_binding_free.
4633 (binding_for_name): Tidy.
4634 * cp-tree.h: Include "name-lookup.h"
4635 (cxx_binding_make): Move to name-lookup.h
4636 (cxx_binding_clear): Likewise.
4637 (struct cxx_binding): Likewise.
4638 (LOCAL_BINDING_P): Likewise.
4639 (INHERITED_VALUE_BINDING_P): Likewise.
4640 (BINDING_SCOPE): Likewise.
4641 (BINDING_HAS_LEVEL_P): Likewise.
4642 (BINDING_VALUE): Likewise.
4643 (BINDING_TYPE): Likewise.
4644 * config-lang.in (gtfiles): Add cp/name-lookup.h
4645 * Make-lang.in (cp/name-lookup.o): New rule.
4646 (CXX_OBJS): Add cp/name-lookup.o
4647 (CXX_TREE_H): Add cp/name-lookup.h
4648
4649 2003-03-28 Jason Merrill <jason@redhat.com>
4650
4651 PR c++/10245
4652 * cvt.c (force_rvalue): New fn.
4653 * call.c (build_conditional_expr): Use it.
4654 * cp-tree.h: Declare it.
4655
4656 2003-03-28 Mike Stump <mrs@apple.com>
4657
4658 * error.c (dump_expr): Add 0x to printed hex numbers to make
4659 output match source code better.
4660
4661 2003-03-28 Mark Mitchell <mark@codesourcery.com>
4662
4663 PR c++/10218
4664 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4665 definitions.
4666
4667 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4668 non-existant ssdf_decls array.
4669 (finish_file): Call generator_ctor_or_dtor_function when there are
4670 static constructors or destructors and no other static
4671 initializations.
4672
4673 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
4674
4675 PR c++/10047
4676 * decl2.c (finish_file): Don't warn about explicitly instantiated
4677 inline decls.
4678
4679 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4680
4681 PR c++/10224
4682 * pt.c (lookup_template_class): Only check instantiated args if
4683 they do not contain template parameters.
4684
4685 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4686
4687 PR c++/10158
4688 * parser.c (cp_parser_function_definition): Set
4689 DECL_INITIALIZED_IN_CLASS for members.
4690 * pt.c (instantiate_decl): Only reduce the template args for
4691 friends that are not defined in class.
4692
4693 2003-03-25 Jason Merrill <jason@redhat.com>
4694
4695 * call.c (print_z_candidate): Change name of first arg to msgid.
4696 (joust): Add comment for translators.
4697
4698 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4699
4700 PR c++/9898, PR c++/383, DR 322
4701 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4702 through reference types on both PARM and ARG.
4703
4704 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4705
4706 PR c++/10119
4707 * error.c (dump_expr) <BASELINK>: Use dump_expr.
4708 * pt.c (maybe_fold_nontype_args): New function.
4709 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4710 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4711 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4712 maybe_fold_nontype_args.
4713
4714 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4715
4716 PR c++/10026
4717 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4718
4719 2003-03-23 Mark Mitchell <mark@codesourcery.com>
4720
4721 PR c++/7086
4722 * typeck.c (cxx_mark_addressable): Adjust call to
4723 gen_mem_addressof or put_var_into_stack.
4724
4725 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
4726
4727 PR c++/9978, c++/9708
4728 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4729 * call.c (add_template_candidate_real): Adjust
4730 instantiate_template call.
4731 * class.c (resolve_address_of_overloaded_function): Likewise.
4732 * decl.c (build_enumerator): Set TREE_CONSTANT.
4733 * pt.c (check_instantiated_args): New.
4734 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4735 TREE_READONLY.
4736 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4737 (reduce_template_parm_level): Likewise.
4738 (process_template_parm): Likewise.
4739 (check_explicit_specialization): Adjust instantiate_template call.
4740 (convert_template_argument): Don't check non-type argument here.
4741 (lookup_template_class): Check them here.
4742 (tsubst_friend_function): Adjust instantiate_template call.
4743 (instantiate_template): Add tsubst_flags parameter, use it. Check
4744 instantiated args.
4745
4746 2003-03-21 Zack Weinberg <zack@codesourcery.com>
4747
4748 * decl.c: Update calls to shadow_warning.
4749
4750 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
4751
4752 PR c++/9898
4753 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4754 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4755
4756 2003-03-20 Mark Mitchell <mark@codesourcery.com>
4757
4758 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4759 friends.
4760 * cp/pt.c (instantiate_class_template): Fix formatting.
4761
4762 2003-03-14 Matt Austern <austern@apple.com>
4763
4764 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4765 (unemitted_tinfo_decl_p): Remove.
4766 (emit_tinfo_decl): Change declaration to remove unused parameter.
4767 * decl2.c (finish_file): Change tinfo emission to loop through
4768 unemitted_tinfo_decls array instead of looping through all decls.
4769 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4770 unused second parameter.
4771 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4772 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4773 (emit_tinfo_decl): remove unused second parameter, add assertion
4774 that decl hasn't already been emitted.
4775
4776 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
4777
4778 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4779 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4780 return statements.
4781
4782 2003-03-19 Jason Merrill <jason@redhat.com>
4783
4784 PR c++/8316, c++/9315, c++/10136
4785 * call.c (print_z_candidate): Split out from...
4786 (print_z_candidiates): ...here.
4787 (joust): Use it.
4788
4789 2003-03-17 Roger Sayle <roger@eyesopen.com>
4790
4791 PR c++/10031
4792 * decl.c (duplicate_decls): Use the new type when prototyping
4793 anticipated decls, even when the types match. This defines the
4794 exception list for the built-in function.
4795
4796 2003-03-17 Jason Merrill <jason@redhat.com>
4797
4798 PR c++/10091
4799 * typeck.c (build_class_member_access_expr): Compare
4800 TYPE_MAIN_VARIANTs.
4801
4802 2003-03-17 Mark Mitchell <mark@codesourcery.com>
4803
4804 PR c++/9639
4805 * parser.c (cp_parser_declarator_id): Clear parser->scope.
4806
4807 2003-03-16 Jason Merrill <jason@redhat.com>
4808
4809 PR c++/9993
4810 * decl.c (finish_function): Only allow the NRVO to use variables
4811 declared at function scope.
4812
4813 2003-03-17 Andreas Jaeger <aj@suse.de>
4814
4815 * Make-lang.in (cp/TAGS): Remove.
4816
4817 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
4818
4819 PR c++/9629
4820 * cp-tree.h (struct language_function): Add in_base_initializer.
4821 (in_base_initializer): define it.
4822 (expand_member_init): Remove INIT param.
4823 * init.c (expand_member_init): Remove INIT param, return the member.
4824 (emit_mem_initializers): Set in_base_initializer.
4825 * class.c (build_base_path): Check in_base_initializer.
4826 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4827 * pt.c (tsubst_initializer_list): Likewise.
4828
4829 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
4830
4831 * decl.c (binding_for_name): Fix initialization thinko.
4832
4833 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4834
4835 Compile-time improvement: 2/n.
4836 * cp-tree.h (struct cxx_binding): New datatype;
4837 (struct lang_identifier): Use it.
4838 (LOCAL_BINDING_P): Adjust definition.
4839 (INHERITED_VALUE_BINDING_P): Likewise.
4840 (BINDING_SCOPE): Likewise.
4841 (BINDING_HAS_LEVEL_P): Likewise.
4842 (BINDING_VALUE): Likewise.
4843 (BINDING_TYPE): Likewise.
4844 (IDENTIFIER_VALUE): Likewise.
4845 (struct tree_binding): Remove.
4846 (TS_CP_BINDING): Likewise.
4847 ((union lang_tree_node): Remove field "binding".
4848 (cxx_binding_clear): New macro.
4849 (binding_for_name): Adjust return type.
4850 (qualified_lookup_using_namespace): Adjust prototype.
4851 (lookup_using_namespace): Adjust prototype.
4852 (cxx_scope_find_binding_for_name): Declare.
4853 * cp-tree.def: Remove CPLUS_BINDING definition.
4854 * decl.c (push_binding): Adjust local variable type.
4855 (add_binding): Likewise.
4856 (push_class_binding): Likewise.
4857 (pop_binding): Likewise.
4858 (poplevel): Likewise.
4859 (poplevel_class): Likewise.
4860 (free_bindings): Adjust type.
4861 (find_binding): Adjust return type, add a third parameter. Remove
4862 non-useful assertion now that we use static typing.
4863 (cxx_scope_find_binding_for_name): New function.
4864 (binding_for_name): Use it. Adjust local variable type. Simplify.
4865 (namespace_binding): Simplify.
4866 (set_namespace_binding): Likewise.
4867 (set_identifier_type_value_with_scope): Adjust local variable type.
4868 (lookup_tag): Don't type-abuse of local variable 'old'.
4869 (lookup_namespace_name): Likewise. Allocate binding on stack.
4870 (select_decl): Adjust prototype.
4871 (unqualified_namespace_lookup): Allocate binding on stack.
4872 Don't type-abuse of local variable 'val'.
4873 (lookup_name_real): Likewise.
4874 (maybe_inject_for_scope_var): Adjust local variable type.
4875 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4876 (namespace_binding): Adjust logic, simplify.
4877 (BINDING_LEVEL): Adjust definition.
4878 (push_class_level_binding): Adjust local variable type.
4879 (struct cxx_saved_binding): Adjust field 'binding' type.
4880 * decl2.c (ambiguous_decl): Adjust prototype.
4881 (lookup_using_namespace): Adjust local variable type.
4882 (qualified_lookup_using_namespace): Catch type error and correct
4883 ensueing logic error.
4884 (do_nonmember_using_decl): Adjust local variable type. Allocate
4885 temporary cxx_binding on stack.
4886 (do_toplevel_using_decl): Adjust local variable type.
4887 * ptree.c (cxx_print_cxx_binding): New function.
4888 (cxx_print_identifier): Use it.
4889 (cxx_print_xnode): Delete CPLUS_BINDING case label.
4890
4891 2003-03-15 Roger Sayle <roger@eyesopen.com>
4892
4893 * tree.c (count_functions): Fix whitespace.
4894
4895 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
4896
4897 * Make-lang.in: Update.
4898
4899 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4900
4901 PR c++/6440
4902 * pt.c (maybe_process_partial_specialization): Handle
4903 member class template when enclosing class template is
4904 explicit specialized.
4905 (most_general_template): Stop looking when DECL is already
4906 specialized.
4907
4908 2003-03-13 Jason Merrill <jason@redhat.com>
4909
4910 PR c++/9420
4911 * search.c (lookup_conversions): Call complete_type here.
4912 * call.c (implicit_conversion): Not here.
4913
4914 2003-03-13 Mark Mitchell <mark@codesourcery.com>
4915
4916 * decl2.c (do_nonmember_using_decl): Correct handling of
4917 simultaneous type/non-type bindings.
4918
4919 * call.c (initialize_reference): Remove bogus assertion.
4920 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4921
4922 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
4923
4924 PR c++/7050
4925 * expr.c (cxx_expand_expr): Return const0_rtx for throw
4926 expressions.
4927
4928 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4929
4930 PR c++/9474
4931 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4932 to merge old and new declarations.
4933
4934 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4935
4936 * g++.1: Remove.
4937 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4938 (cp/g++.1): Build it from scratch in the build tree.
4939 (c++.install-man): Depend on it. Install it from the build tree.
4940 (c++.mostlyclean): Clean it.
4941
4942 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4943
4944 PR c++/9474
4945 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4946 to merge old and new declarations.
4947
4948 PR c++/9924
4949 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4950
4951 2003-03-11 Jason Merrill <jason@redhat.com>
4952
4953 PR c++/9820
4954 * search.c (lookup_member): Fix handling of functions in a class
4955 being defined.
4956
4957 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4958
4959 PR c++/8700
4960 * call.c (convert_class_to_reference): Adjust usage of
4961 splice_viable.
4962 (any_viable): Remove.
4963 (splice_viable): Combine with any_viable.
4964 (print_z_candidates): Avoid printing duplicates.
4965 (build_user_type_conversion_1): Adjust usage of splice_viable.
4966 (build_new_function_call): Likewise.
4967 (build_operator_new_call): Likewise.
4968 (build_object_call): Likewise.
4969 (build_conditional_expr): Likewise.
4970 (build_new_op): Likewise.
4971 (build_new_method_call): Likewise.
4972 (joust): Remove spurious comment.
4973 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4974 * decl2.c (arg_assoc_class): Simplify.
4975 * friend.c (add_friend): Likewise.
4976
4977 2003-03-11 Jason Merrill <jason@redhat.com>
4978
4979 PR c++/8660
4980 * decl2.c (check_classfn): A member template only matches a
4981 member template.
4982
4983 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
4984
4985 * Make-lang.in (CXX_C_OBJS): Update.
4986 * lang-specs.h: Don't define __GNUG__ here.
4987
4988 2003-03-10 Mark Mitchell <mark@codesourcery.com>
4989
4990 * call.c (perform_overload_resolution): New function.
4991 (build_new_function_call): Use it.
4992 (build_operator_new_call): Likewise.
4993 (add_candidates): Add explicit_targs and template_only parameters.
4994 (build_new_op): Adjust accordingly.
4995 * cp-tree.h (build_operator_new_call): New function.
4996 (build_function_call_real): Remove.
4997 (build_function_call_maybe): Likewise.
4998 * init.c (build_new_1): Use build_operator_new_call.
4999 * typeck.c (build_function_call_real): Rename to ...
5000 (build_function_call): ... this.
5001
5002 2003-03-10 Devang Patel <dpatel@apple.com>
5003
5004 PR c++/9394
5005 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
5006
5007 2003-03-10 Jason Merrill <jason@redhat.com>
5008
5009 PR c++/9798
5010 * decl.c (push_using_directive): Push before recursing.
5011
5012 PR c++/9868, c++/9524
5013 * call.c (resolve_scoped_fn_name): Handle the case of a function
5014 pointer member.
5015
5016 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
5017 argument in the pointer-to-member case.
5018
5019 2003-03-09 Mark Mitchell <mark@codesourcery.com>
5020
5021 PR c++/9373
5022 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
5023 pointers to member functions.
5024
5025 PR c++/8534
5026 * decl.c (build_ptrmemfunc_type): Do not allow default arguments
5027 in pointer-to-member-function types.
5028
5029 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5030
5031 * expr.c (cplus_expand_constant): Use C90 prototype style.
5032 (cxx_expand_expr): Likewise.
5033
5034 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5035
5036 PR c++/9970
5037 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
5038 functions.
5039
5040 2003-03-08 Geoffrey Keating <geoffk@apple.com>
5041
5042 * lang-specs.h (c++-header): Change .pch to .gch.
5043
5044 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
5045
5046 * cp-tree.h (cxx_init): Update prototype.
5047 * lex.c (cxx_init): Similarly.
5048
5049 2003-03-08 Mark Mitchell <mark@codesourcery.com>
5050
5051 PR c++/9823
5052 * cp-tree.h (begin_mem_initializers): Remove.
5053 * parser.c (cp_parser_mem_initializer_list): Inline it here.
5054 Do not call finish_mem_initializers if not in a constructor.
5055 (cp_parser_class_head): Fix typo in error message.
5056 * semantics.c (begin_mem_initializers): Remove.
5057 * testsuite/g++.dg/parser/constructor1.C: New test.
5058
5059 PR c++/9809
5060 * call.c (add_function_candidate): Skip builtin fuctions that have
5061 not yet been declared.
5062
5063 PR c++/9982
5064 * init.c (build_new_1): Correct logic for determining whether or
5065 not to use an array cookie.
5066
5067 PR c++/9524
5068 * parser.c (cp_parser_postfix_expression): Call
5069 finish_non_static_data_member, even when processing_template_decl.
5070
5071 PR c++/9912
5072 * cp-tree.h (is_ancestor): New function.
5073 (handle_class_head): Change prototype.
5074 * decl2.c (is_namespace_ancestor): Rename to ...
5075 (namespace_anecestor): ... this.
5076 (set_decl_namespace): Adjust accordingly.
5077 (handle_class_head): Remove unnecessary parameters.
5078 * parser.c (cp_parser_class_head): Check that
5079 nested-name-specifiers are used appropriately.
5080
5081 2003-03-07 Mark Mitchell <mark@codesourcery.com>
5082
5083 * call.c (reference_binding): Remove REF_IS_VAR parameter.
5084 (implicit_conversion): Adjust call to reference_binding.
5085 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
5086 (initialize_reference): Adjust handling for references bound to
5087 rvalues.
5088 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
5089 prototype.
5090 (real_non_cast_lvalue_p): New method.
5091 * cvt.c (build_up_reference): Adjust use of
5092 make_temporary_var_for_ref_to_temp.
5093 * tree.c (real_non_cast_lvalue_p): New method.
5094
5095 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
5096
5097 * except.c (init_exception_processing): Use C90 prototype style.
5098 (cp_protect_cleanup_actions): Likewise.
5099 (prepare_eh_type): Likewise.
5100 (build_eh_type_type): Likewise.
5101 (build_exc_ptr): Likewise.
5102 (do_begin_catch): Likewise.
5103 (dtor_nothrow): Likewise.
5104 (do_end_catch): Likewise.
5105 (push_eh_cleanup): Likewise.
5106 (decl_is_java_type): Likewise.
5107 (choose_personality_routine): Likewise.
5108 (initialize_handler_parm): Likewise.
5109 (expand_start_catch_block): Likewise.
5110 (expand_end_catch_block): Likewise.
5111 (begin_eh_spec_block): Likewise.
5112 (finish_eh_spec_block): Likewise.
5113 (do_allocate_exception): Likewise.
5114 (do_free_exception): Likewise.
5115 (wrap_cleanups_r): Likewise.
5116 (stabilize_throw_expr): Likewise.
5117 (build_throw): Likewise.
5118 (complete_ptr_ref_or_void_ptr_p): Likewise.
5119 (is_admissible_throw_operand): Likewise.
5120 (nothrow_libfn_p): Likewise.
5121 (can_convert_eh): Likewise.
5122 (check_handlers_1): Likewise.
5123 (check_handlers): Likewise.
5124
5125 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5126
5127 * call.c (merge_conversion_sequences): New function.
5128 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
5129 (convert_class_to_reference): Correct handling of second
5130 standard conversion sequence in a user-defined conversion
5131 sequence.
5132 (build_user_type_conversion_1): Use merge_conversion_sequences.
5133 * cp-tree.def: Add comments for CONV nodes.
5134 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
5135
5136 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
5137
5138 * error.c (init_error): Use C90 prototype style.
5139 (dump_scope): Likewise.
5140 (dump_qualifiers): Likewise.
5141 (dump_template_argument): Likewise.
5142 (dump_template_argument_list): Likewise.
5143 (dump_template_parameter): Likewise.
5144 (dump_template_bindings): Likewise.
5145 (dump_type): Likewise.
5146 (dump_typename): Likewise.
5147 (class_key_or_enum): Likewise.
5148 (dump_aggr_type): Likewise.
5149 (dump_type_prefix): Likewise.
5150 (dump_type_suffix): Likewise.
5151 (dump_global_iord): Likewise.
5152 (dump_simple_decl): Likewise.
5153 (dump_decl): Likewise.
5154 (dump_template_decl): Likewise.
5155 (dump_function_decl): Likewise.
5156 (dump_parameters): Likewise.
5157 (dump_exception_spec): Likewise.
5158 (dump_function_name): Likewise.
5159 (dump_template_parms): Likewise.
5160 (dump_char): Likewise.
5161 (dump_expr_list): Likewise.
5162 (dump_expr): Likewise.
5163 (dump_binary_op): Likewise.
5164 (dump_unary_op): Likewise.
5165 (type_as_string): Likewise.
5166 (expr_as_string): Likewise.
5167 (decl_as_string): Likewise.
5168 (context_as_string): Likewise.
5169 (lang_decl_name): Likewise.
5170 (cp_file_of): Likewise.
5171 (cp_line_of): Likewise.
5172 (decl_to_string): Likewise.
5173 (expr_to_string): Likewise.
5174 (fndecl_to_string): Likewise.
5175 (code_to_string): Likewise.
5176 (language_to_string): Likewise.
5177 (parm_to_string): Likewise.
5178 (op_to_string): Likewise.
5179 (type_to_string): Likewise.
5180 (assop_to_string): Likewise.
5181 (args_to_string): Likewise.
5182 (cv_to_string): Likewise.
5183 (cxx_print_error_function): Likewise.
5184 (cp_diagnostic_starter): Likewise.
5185 (cp_diagnostic_finalizer): Likewise.
5186 (cp_print_error_function): Likewise.
5187 (function_category): Likewise.
5188 (print_instantiation_full_context): Likewise.
5189 (print_instantiation_partial_context): Likewise.
5190 (maybe_print_instantiation_context): Likewise.
5191 (print_instantiation_context): Likewise.
5192 (cp_printer): Likewise.
5193 (print_integer): Likewise.
5194 (print_non_consecutive_character): Likewise.
5195 (locate_error): Likewise.
5196
5197 2003-03-06 Mark Mitchell <mark@codesourcery.com>
5198
5199 PR c++/9965
5200 * call.c (reference_binding): Add ref_is_var parameter.
5201 (implicit_conversion): Adjust call to reference_binding.
5202 (initialize_reference): Likewise.
5203
5204 PR c++/9400
5205 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5206 PARM_DECLs.
5207
5208 PR c++/9791
5209 * class.c (get_basefndecls): Use lookup_fnfields_1.
5210
5211 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5212
5213 PR c++/9188
5214 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5215 in error message.
5216 (cp_parser_single_declaration): Likewise.
5217
5218 2003-03-05 Jason Merrill <jason@redhat.com>
5219
5220 PR c++/9440
5221 * call.c (build_conditional_expr): Use convert rather than an
5222 explicit NOP_EXPR.
5223
5224 2003-03-02 Matt Austern <austern@apple.com>
5225
5226 * decl.c (cp_binding_level): Add static_decls varray member.
5227 (add_decl_to_level): Add static/inline namespace scope
5228 declarations to static_decls array.
5229 (wrapup_global_for_namespace): Pass static_decls only, instead of
5230 all decls, to wrapup_global_declarations/check_global_declarations.
5231 (push_namespace): Initialize static_decls for ordinary namespaces.
5232 (cxx_init_decl_processing): Initialize static_decls for global
5233 namespace.
5234
5235 2003-03-05 Mark Mitchell <mark@codesourcery.com>
5236
5237 * class.c (end_of_class): Correct thinko.
5238
5239 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
5240
5241 * config-lang.in: Replace ${libstdcxx_version} by its value.
5242
5243 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5244
5245 * cp-tree.h (cxx_saved_binding): Declare.
5246 (struct saved_scope): Adjust type of field 'old_binding'.
5247 * decl.c (cxx_saved_binding_make): New macro.
5248 (struct cxx_saved_binding): Define.
5249 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
5250 C++ bindings.
5251 (maybe_push_to_top_level): Adjust local variable type.
5252 (pop_from_top_level): Likewise.
5253
5254 2003-03-04 Tom Tromey <tromey@redhat.com>
5255
5256 * Make-lang.in (c++.tags): New target.
5257
5258 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
5259
5260 * Make-lang.in: Update.
5261
5262 2003-03-03 Jason Merrill <jason@redhat.com>
5263
5264 * decl.c (finish_enum): Do set the type in a template. Simplify.
5265 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5266
5267 2003-03-03 Mark Mitchell <mark@codesourcery.com>
5268
5269 PR c++/9878
5270 * call.c (convert_class_to_reference): Correct conversion
5271 sequences.
5272 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5273 (implicit_conversion): Adjust call to reference_binding.
5274 (add_candidate): Change type of candidates parameter.
5275 (add_function_candidate): Likewise.
5276 (add_conv_candidate): Likewise.
5277 (build_builtin_candidate): Likewise.
5278 (add_builtin_candidate): Likewise.
5279 (add_builtin_candidates): Likewise.
5280 (add_template_candidate_real): Likewise.
5281 (add_template_candidate): Likewise.
5282 (add_template_conv_candidate): Likewise.
5283 (build_user_type_conversion_1): Adjust accordingly.
5284 (build_object_call): Likewise.
5285 (build_conditional_expr): Likewise.
5286 (add_candidates): Likewise.
5287 (build_new_op): Likewise.
5288 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
5289 (build_new_method_call): Adjust calls to add_function_candidate.
5290 (make_temporary_var_for_ref_to_temp): New function.
5291 (initialize_reference): Add decl parameter.
5292 * class.c (build_rtti_vtbl_entries): Use build_address and
5293 build_nop.
5294 * cp-tree.h (initialize_reference): Change prototype.
5295 (make_temporary_var_for_ref_to_temp): New function.
5296 (build_type_conversion): Change prototype.
5297 (build_address): New function.
5298 (build_nop): Likewise.
5299 * cvt.c (cp_convert_to_pointer): Adjust call to
5300 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
5301 Use build_nop.
5302 (convert_to_pointer_force): Use build_nop.
5303 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5304 (convert_to_reference): Adjust call to build_type_conversion.
5305 (ocp_convert): Likewise.
5306 (build_type_conversion): Remove for_sure parameter.
5307 * decl.c (grok_reference_init): Use initialize_reference.
5308 * typeck.c (build_address): New function.
5309 (build_nop): Likewise.
5310 (build_unary_op): Use them.
5311 (build_ptrmemfunc): Tidy slightly.
5312 (convert_for_initialization): Adjust call to
5313 initialize_reference.
5314 * typeck2.c (store_init_value): Remove #if 0'd code.
5315
5316 2003-03-03 Jason Merrill <jason@redhat.com>
5317
5318 * decl.c (start_function): Clear DECL_NUM_STMTS.
5319
5320 * class.c (get_vtable_decl): Use vtbl_type_node.
5321 (build_primary_vtable): Check for it.
5322
5323 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
5324
5325 * decl.c (check_initializer): Check for vector_opaque_p.
5326
5327 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
5328
5329 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5330 invoke an external cpp during compilation.
5331
5332 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5333
5334 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5335 that of warning().
5336 (start_decl): Likewise.
5337 (start_function): Likewise.
5338
5339 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
5340
5341 * Make-lang.in (CXX_C_OBJS): Update.
5342
5343 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5344
5345 PR c++/9892
5346 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5347 instantiating it.
5348
5349 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
5350
5351 * parser.c (cp_parser_init_declarator): Revert opaque
5352 vector_opaque_p change.
5353 Do not include target.h.
5354
5355 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5356
5357 PR c++/9879
5358 * cp-tree.h (build_zero_init): Add parameter.
5359 * decl.c (cp_finish_decl): Adjust call.
5360 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
5361 calls.
5362 (build_default_init): Add nelts parameter. Adjust calls to
5363 build_zero_init.
5364 (build_new_1): Adjust call to build_default_init.
5365 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5366
5367 2003-02-26 Devang Patel <dpatel@apple.com>
5368
5369 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5370 required. Postpone enum setting for template decls.
5371 (build_enumerator): Delay copying value node until finish_enum
5372 (). Remove #if 0'ed code.
5373 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5374 (tsubst_copy): Add check for enum type.
5375
5376 2003-02-25 Mark Mitchell <mark@codesourcery.com>
5377
5378 PR c++/9683
5379 * decl2.c (prune_vars_needing_no_initialization): Do not throw
5380 away initializations for DECL_EXTERNAL VAR_DECLs.
5381 (finish_file): Adjust accordingly.
5382 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5383
5384 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5385
5386 * decl.c (add_binding): Time TV_NAME_LOOKUP.
5387 (push_class_binding): Likewise.
5388 (set_namespace_binding): Likewise.
5389
5390 2003-02-24 Mark Mitchell <mark@codesourcery.com>
5391
5392 PR c++/9836
5393 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5394 specializations back to the main template.
5395 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5396 * pt.c (resolve_typename_type): Likewise.
5397
5398 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
5399
5400 PR c++/9778
5401 * pt.c (tsubst_copy_and_build): For a templated function inside a
5402 scope, process template arguments.
5403
5404 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5405
5406 PR c++/9602
5407 * typeck2.c (abstract_virtuals_error): Don't check when
5408 TYPE is still template parameter dependent.
5409
5410 2003-02-23 Mark Mitchell <mark@codesourcery.com>
5411
5412 PR c++/5333
5413 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5414 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5415 * pt.c (instantiate_class_template): Don't try to instantiate
5416 dependent types.
5417 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5418
5419 2003-02-21 Mark Mitchell <mark@codesourcery.com>
5420
5421 PR c++/9749
5422 * decl.c (grokdeclarator): Do not allow parameters with variably
5423 modified types.
5424
5425 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
5426
5427 * search.c (grow_bfs_bases): Remove. Fold into ...
5428 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5429 in previous patch.
5430
5431 2003-02-20 Mark Mitchell <mark@codesourcery.com>
5432
5433 PR c++/9729
5434 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5435 when the G++ 3.2 ABI prevents correct compilation.
5436
5437 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
5438
5439 Change base class access representation. Share virtual base
5440 binfos.
5441 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5442 call.
5443 * cp/class.c (build_base_path): Likewise.
5444 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5445 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5446 (make_new_vtable): Adjust.
5447 (force_canonical_binfo_r): Delete.
5448 (force_canonical_binfo): Delete.
5449 (mark_primary_virtual_base): Delete.
5450 (dfs_unshared_virtual_bases): Delete.
5451 (mark_primary_bases): Adjust.
5452 (maybe_warn_about_overly_private_class): Adjust.
5453 (dfs_base_derived_from): Delete.
5454 (base_derived_from): Follow the inheritance chain.
5455 (struct find_final_overrider_data): Add vpath member.
5456 (dfs_find_final_overrider): Adjust.
5457 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5458 (find_final_overrider): Adjust.
5459 (update_vtable_entry_for_fn): Adjust.
5460 (modify_all_vtables): Adjust.
5461 (walk_subobject_offsets): Adjust.
5462 (layout_nonempty_base_or_field): Adjust.
5463 (layout_empty_base): Remove last parameter. Adjust.
5464 (build_base_field): Adjust.
5465 (build_base_fields): Adjust.
5466 (propagate_binfo_offsets): Remove last parameter. Adjust.
5467 (dfs_set_offset_for_unshared_vbases): Delete.
5468 (layout_virtual_bases): Adjust.
5469 (finish_struct_1): Adjust.
5470 (init_class_processing): Don't init access nodes.
5471 (dfs_get_primary_binfo): Delete.
5472 (get_primary_binfo): Adjust.
5473 (dump_class_hierarchy_r): Remove most derived arg, add IGO
5474 parameter. Adjust.
5475 (dump_class_hierarchy): Adjust.
5476 (finish_vtbls): Adjust.
5477 (get_original_base): Delete.
5478 (build_vtt_inits): Adjust.
5479 (dfs_build_secondary_vptr_vtt_inits): Adjust.
5480 (dfs_ctor_vtable_bases_queue_p): Adjust.
5481 (build_ctor_vtbl_group): Adjust.
5482 (dfs_accumulate_vtbl_inits): Adjust.
5483 (build_vtbl_initializer): Adjust.
5484 (build_vbase_offset_vtbl_entries): Adjust.
5485 (add_vcall_offset_vtbl_entries_1): Adjust.
5486 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5487 (access_*_node): Remove.
5488 (CANONICAL_BINFO): Delete.
5489 (BINFO_UNSHARED_MARKED): Remove.
5490 (BINFO_MARKED): Set LANG_FLAG_0 directly.
5491 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5492 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5493 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5494 Delete.
5495 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5496 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5497 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5498 Delete.
5499 (BINFO_DEPENDENT_BASE_P): New.
5500 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5501 index.
5502 (markedp, unmarkedp): Adjust.
5503 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5504 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5505 find_vbase_instance, binfo_for_vbase): Delete.
5506 (copied_binfo, original_binfo): Declare.
5507 (finish_base_specifier): Add virtual_p arg.
5508 (unshare_base_binfos): Delete.
5509 (copy_base_binfos): Declare.
5510 (reverse_path): Delete.
5511 * cp/decl.c (xref_basetypes): Access and virtuality passed
5512 differently. Don't copy direct base binfos here. Call
5513 copy_base_binfos.
5514 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5515 (initialize_vtbl_ptrs): Adjust.
5516 (expand_member_init): Adjust.
5517 * cp/parser.c (cp_parser_base_specifier): Adjust.
5518 * cp/pt.c (instantiate_class_template): Adjust.
5519 (get_template_base_recursive): Adjust.
5520 * cp/rtti.c (get_pseudo_ti_init): Adjust.
5521 (get_pseudo_ti_desc): Adjust.
5522 * cp/tree.c (unshare_base_binfos): Rename to ...
5523 (copy_base_binfos): ... here, reimplement.
5524 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5525 (reverse_path): Remove.
5526 * cp/typeck.c (get_delta_difference): Adjust error messages.
5527 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5528 * cp/search.c (lookup_base_r): Adjust.
5529 (dynamic_cast_base_recurse): Adjust.
5530 (canonical_binfo): Remove.
5531 (dfs_canonical_queue): Remove.
5532 (dfs_assert_unmarked_p): Remove.
5533 (assert_canonical_unmarked): Remove.
5534 (shared_marked_p, shared_unmarked_p): Remove.
5535 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5536 (dfs_access_in_type): Adjust.
5537 (access_in_type): Adjust.
5538 (dfs_accessible_queue_p): Adjust.
5539 (dfs_accessible_p): Adjust.
5540 (is_subobject_of_p_1, is_subobject_of_p): Remove.
5541 (struct lookup_field_info): Remove from_dep_base_p field.
5542 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5543 (lookup_field_r): Remove dependent base code.
5544 (lookup_member): Likewise.
5545 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5546 (dfs_unmarked_real_bases_queue_p): Remove.
5547 (dfs_marked_real_bases_queue_p): Remove.
5548 (dfs_skip_vbases): Remove.
5549 (dfs_get_pure_virtuals): Adjust.
5550 (markedp, unmarkedp): Adjust.
5551 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5552 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5553 (dfs_unmark): Adjust.
5554 (dfs_get_vbase_types):Remove.
5555 (dfs_build_inheritance_graph_order): Remove.
5556 (get_vbase_types): Remove
5557 (dfs_find_vbase_instance): Remove.
5558 (find_vbase_instance): Remove.
5559 (dfs_debug_unmarkedp): Adjust.
5560 (dependent_base_p): Remove.
5561 (dfs_push_type_decls): Adjust.
5562 (dfs_push_decls): Adjust.
5563 (dfs_no_overlap_yet): Adjust.
5564 (copied_binfo): New function.
5565 (original_binfo): New function.
5566 (binfo_for_vbase): Remove.
5567
5568 2003-02-18 Zack Weinberg <zack@codesourcery.com>
5569
5570 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5571 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5572 vectors, for speed.
5573
5574 2003-02-18 Mark Mitchell <mark@codesourcery.com>
5575
5576 PR c++/9704
5577 * class.c (layout_class_type): In the 3.2 ABI, take into account
5578 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5579
5580 2003-02-18 Matt Austern <austern@apple.com>
5581
5582 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5583 nothing for C++.
5584 * cp/decl.c (wrapup_globals_for_namespace): Remove special
5585 handling of global namespace.
5586
5587 2003-02-18 Geoffrey Keating <geoffk@apple.com>
5588
5589 * cp-tree.h (rid_to_yy): Delete.
5590 (C_RID_YYCODE): Delete.
5591 (finish_file): Delete redundant declaration.
5592
5593 2003-02-18 Jason Merrill <jason@redhat.com>
5594
5595 PR c++/9623
5596 * decl.c (reshape_init): Don't mess with initializer labels.
5597
5598 PR c++/9485
5599 * parser.c (cp_parser_postfix_expression): Set idk properly for
5600 object->scope::member.
5601
5602 2003-02-18 Ben Elliston <bje@redhat.com>
5603
5604 PR other/7350
5605 * decl.c (duplicate_decls): Fix typo in comment.
5606
5607 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
5608
5609 PR debug/9717
5610 * class.c (build_base_field): Mark fields for base classes with
5611 DECL_IGNORED_P.
5612
5613 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5614
5615 PR c++/9457
5616 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5617 CONSTRUCTOR_ELTS only once.
5618
5619 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5620
5621 PR c++/9459
5622 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5623 (dump_type_suffix): Likewise.
5624
5625 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
5626
5627 * search.c: ANSIfy function declarations and definitions.
5628 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5629 * call.c (build_method_call, resolve_scoped_fn_name,
5630 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5631 calls.
5632 * class.c (handle_using_decl): Likewise.
5633 * decl.c (make_typename_type, make_unmound_class_template,
5634 start_decl, compute_array_index_type): Likewise.
5635 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5636 * init.c (expand_member_init, build_member_call): Likewise.
5637 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5638 resolve_typename_type): Likewise.
5639 * typeck.c (lookup_destructor, finish_class_member_access_exprm
5640 build_prememfunc_access_expr): Likewise.
5641
5642 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5643
5644 * decl2.c: Include "timevar.h".
5645 (namespace_ancestor): Time name lookup.
5646 (add_using_namespace): Likewise.
5647 (lookup_using_namespace): Likewise.
5648 (qualified_lookup_using_namespace): Likewise.
5649 (decl_namespace): Likewise.
5650 (lookup_arg_dependent): Likewise.
5651 * lex.c (do_identifier): Likewise.
5652 (do_scoped_id): Likewise.
5653 * pt.c (lookup_template_class): Likewise.
5654
5655 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
5656
5657 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5658
5659 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5660
5661 * decl.c: Include "timevar.h".
5662 (poplevel): Time name lookup.
5663 (find_binding): Likewise.
5664 (push_namespace): Likewise.
5665 (pop_nested_namespace): Likewise.
5666 (store_bindings): Likewise.
5667 (maybe_push_to_top_level): Likewise.
5668 (pop_from_top_level): Likewise.
5669 (push_local_name): Likewise.
5670 (pushtag): Likewise.
5671 (pushdecl): Likewise.
5672 (pushdecl_with_scope): Likewise.
5673 (pushdecl_namespace_level): Likewise.
5674 (pushdecl_top_level): Likewise.
5675 (pushdecl_class_level): Likewise.
5676 (push_class_level_binding): Likewise.
5677 (push_using_decl): Likewise.
5678 (push_using_directive): Likewise.
5679 (push_overloaded_decl): Likewise.
5680 (lookup_label): Likewise.
5681 (define_label): Likewise.
5682 (lookup_tag): Likewise.
5683 (lookup_tag_reverse): Likewise.
5684 (lookup_namespace_name): Likewise.
5685 (select_decl): Likewise.
5686 (unqualified_namespace_lookup): Likewise.
5687 (lookup_name_real): Likewise.
5688 (lookup_name_current_level): Likewise.
5689 (lookup_type_current_level): Likewise.
5690 (maybe_inject_for_scope_var): Likewise.
5691 (xref_tag): Likewise.
5692
5693 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5694
5695 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
5696
5697 * decl.c (build_enumerator): Remove unneeded test.
5698
5699 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
5700
5701 * cp-tree.h (struct lang_type_header): Make all fields unsigned
5702 char.
5703
5704 2003-02-03 Mark Mitchell <mark@codesourcery.com>
5705
5706 PR c++/7129
5707 * call.c (z_candidate): Add args.
5708 (convert_class_to_reference): Set it.
5709 (implicit_conversion): Tidy.
5710 (add_candidate): Add args parameter.
5711 (add_function_candidate): Adjust call to add_candidate.
5712 (add_conv_candidate): Likewise.
5713 (build_builtin_candidate): Likewise.
5714 (build_user_type_conversion_1): Eliminate wasteful tree_cons
5715 usage.
5716 (build_new_function_call): Likewise.
5717 (build_object_call): Likewise.
5718 (add_candidates): New function.
5719 (build_new_op): Use it.
5720 (covert_like_real): Adjust call to build_over_call.
5721 (build_over_call): Remove args parameter.
5722 * operators.def: Add <?= and >?=.
5723
5724 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
5725
5726 * typeck.c (build_indirect_ref): Don't check flag_volatile.
5727
5728 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5729
5730 PR c++/8849
5731 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5732
5733 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
5734
5735 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5736 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5737 (BINFO_LANG_ELTS): New #define.
5738 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5739
5740 2003-01-30 Geoffrey Keating <geoffk@apple.com>
5741
5742 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5743
5744 2003-01-30 Mark Mitchell <mark@codesourcery.com>
5745
5746 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5747 for class types.
5748 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5749 rather than TYPE_LANG_FLAG_0.
5750 (TYPE_BUILT_IN): Remove.
5751 (TYPE_DEPENDENT_P): New macro.
5752 (TYPE_DEPENDENT_P_VALID): Likewise.
5753 (lang_type_class): Add fields_readonly.
5754 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5755 * pt.c (dependent_type_p_r): New function, split out from ...
5756 (dependent_type_p): ... here. Memoize results.
5757 * search.c (dependent_base_p): Use dependent_type_p, not
5758 uses_template_parms.
5759 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5760 for class types.
5761
5762 2003-01-29 Mark Mitchell <mark@codesourcery.com>
5763
5764 * call.c (build_field_call): Use build_new_op, not build_opfncall.
5765 (prep_operand): New function.
5766 (build_new_op): Use it. Remove dead code.
5767 * class.c (pushclass): Change "modify" parameter type from int to
5768 bool.
5769 (currently_open_class): Use same_type_p, not pointer equality.
5770 (push_nested_class): Adjust calls to pushclass, remove modify
5771 parameter.
5772 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5773 (pushclass): Change prototype.
5774 (push_nested_class): Likewise.
5775 (grokoptypename): Remove.
5776 (build_opfncall): Remove.
5777 (value_dependent_expression_p): Declare.
5778 (resolve_typename_type): Likewise.
5779 (resolve_typename_type_in_current_instantiation): Likewise.
5780 (enter_scope_of): Remove.
5781 (tsubst): Remove.
5782 (tsubst_expr): Likewise.
5783 (tsubst_copy): Likewise.
5784 (tsubst_copy_and_build): Likewise.
5785 * decl.c (warn_about_implicit_typename_lookup): Remove.
5786 (finish_case_label): Return error_mark_node for erroneous labels.
5787 (start_decl): Adjust calls to push_nested_class.
5788 (grokfndecl): Call push_scope/pop_scope around call to
5789 duplicate_decls.
5790 (grokdeclarator): Do not call tsubst.
5791 (start_function): Adjust calls to push_nested_class.
5792 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5793 (check_classfn): Use push_scope/pop_scope around type comparisions.
5794 (grokoptypename): Remove.
5795 (push_sscope): Adjust call to push_nested_class.
5796 * error.c (dump_type): Show cv-qualification of typename types.
5797 * init.c (build_member_call): Use build_new_op, not
5798 build_opfncall.
5799 * method.c (build_opfncall): Remove.
5800 * parser.c (cp_parser): Add allow_non_constant_expression_p and
5801 non_constant_expression_p.
5802 (cp_parser_constant_expression): Adjust prototype.
5803 (cp_parser_resolve_typename_type): Remove.
5804 (cp_parser_non_constant_expression): New function.
5805 (cp_parser_non_constant_id_expression): Likewise.
5806 (cp_parser_new): Set allow_non_constant_expression_p and
5807 non_constant_expression_p.
5808 (cp_parser_primary_expression): Reject `this' and `va_arg' in
5809 constant-expressions. Note that dependent names aren't really
5810 constant.
5811 (cp_parser_postfix_expression): Reject conversions to non-integral
5812 types in constant-expressions. Neither are increments or
5813 decrements.
5814 (cp_parser_unary_expression): Reject increments and decrements in
5815 constant-expressions.
5816 (cp_parser_direct_new_declarator): Adjust call to
5817 cp_parser_constant_expression.
5818 (cp_parser_cast_expression): Reject conversions to non-integral
5819 types in constant-expressions.
5820 (cp_parser_assignment_expression): Rejects assignments in
5821 constant-expressions.
5822 (cp_parser_expression): Reject commas in constant-expressions.
5823 (cp_parser_labeled_statement): Adjust call to
5824 cp_parser_constant_expression.
5825 (cp_parser_direct_declarator): Simplify array bounds, even in
5826 templates, when they are non-dependent. Use
5827 resolve_typename_type, not cp_parser_resolve_typename_type.
5828 (cp_parser_class_head): Use resolve_typename_type, not
5829 cp_parser_resolve_typename_type.
5830 (cp_parser_member_declaration): Adjust call to
5831 cp_parser_constant_expression.
5832 (cp_parser_constant_initializer): Likewise.
5833 (cp_parser_constructor_declarator): Use resolve_typename_type, not
5834 cp_parser_resolve_typename_type.
5835 (cp_parser_late_parsing_default_args): Adjust call to
5836 push_nested_class.
5837 * pt.c (tsubst): Give it internal linkage.
5838 (tsubst_expr): Likewise.
5839 (tsubst_copy): Likewise.
5840 (tsubst_copy_and_build): Likewise.
5841 (push_access_scope_real): Likewise.
5842 (tsubst_friend_class): Likewise.
5843 (instantiate_class_template): Adjust call to pushclass.
5844 (value_dependent_expression_p): Give it external linkage.
5845 Robustify.
5846 (resolve_typename_type): New function.
5847 * semantics.c (finish_call_expr): Use build_new_op, not
5848 build_opfncall.
5849 (begin_constructor_declarator): Remove.
5850 (begin_class_definition): Adjust call to pushclass.
5851 (enter_scope_of): Remove.
5852 * typeck.c (comptypes): Resolve typename types as appropriate.
5853 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5854 (build_x_compound_expr): Likewise.
5855 (build_modify_expr): Likewise.
5856 (build_x_modify_expr): Likewise.
5857 * typeck2.c (build_x_arrow): Likewise.
5858
5859 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
5860
5861 * pt.c (last_pending_template) Declare GTY().
5862
5863 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5864
5865 PR c++/8591
5866 * parser.c (cp_parser_elaborated_type_specifier): Convert
5867 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5868 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5869
5870 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
5871
5872 PR c++/9437
5873 * pt.c (unify): Don't unify '*T' with 'U C::*'.
5874
5875 PR c++/3902
5876 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5877 inside a declarator.
5878
5879 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
5880
5881 * class.c (update_vtable_entry_for_fn): Add index parameter.
5882 Generate vcall thunk for covariant overriding from a virtual
5883 primary base.
5884 (dfs_modify_vtables): Adjust.
5885
5886 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
5887
5888 PR c++/9403
5889 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5890 template keyword.
5891 (cp_parser_base_specifier): Look for and consume a
5892 TEMPLATE keyword. Replace switch with array index.
5893
5894 PR c++/795
5895 * semantics.c (finish_non_static_data_member): Remember the
5896 field's type even in a template.
5897
5898 PR c++/9415
5899 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5900 already scoped.
5901
5902 PR c++/8545
5903 * parser.c (cp_parser_cast_expression): Be more tentative.
5904
5905 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5906
5907 * cp-tree.h (flagged_type_tree_s): Remove.
5908 (check_for_new_type): Likewise.
5909 * typeck2.c (check_for_new_type): Likewise.
5910
5911 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
5912
5913 * dump.c: ANSIfy function declarations and definitions.
5914
5915 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
5916
5917 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5918
5919 PR c++/9354
5920 * init.c (build_new): Set the type of the new-expression, even
5921 when processing_templte_decl.
5922
5923 PR c++/9216
5924 * parser.c (cp_parser_primary_expression): Improve error message
5925 for templates used in an expression context.
5926
5927 PR c++/8696
5928 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5929 parse when encountering "typedef".
5930
5931 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
5932
5933 * class.c, parser.c: ANSIfy function definitions and declarations.
5934
5935 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5936
5937 PR c++/9328
5938 * error.c (dump_decl): For an OVERLOAD, just print the name of the
5939 function; it doesn't make sense to try to print its type.
5940 * semantics.c (finish_typeof): Issue errors about invalid uses.
5941
5942 PR c++/9298
5943 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5944 function.
5945 (cp_parser_expression_statement): Use it.
5946 (cp_parser_explicit_instantiation): Likewise.
5947 * pt.c (do_decl_instantiation): Improve error handling logic.
5948
5949 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5950
5951 PR c++/9384
5952 * parser.c (cp_parser_using_declaration): Issue error messages
5953 about name resolution failures here.
5954
5955 PR c++/9388
5956 * class.c (currently_open_derived_class): Use dependent_type_p.
5957 * cp-tree.h (dependent_type_p): New function.
5958 (dependent_template_arg_p): Likewise.
5959 (dependent_template_p): Likewise.
5960 (type_dependent_expression_p): Likewise.
5961 * parser.c (cp_parser_dependent_type_p): Remove.
5962 (cp_parser_value_dependent_type_p): Likewise.
5963 (cp_parser_type_dependent_expression_p): Likewise.
5964 (cp_parser_dependent_template_arg_p): Likewise.
5965 (cp_parser_dependent_template_id_p): Likewise.
5966 (cp_parser_dependent_template_p): Likewise.
5967 (cp_parser_diagnose_invalid_type_name): Replace
5968 cp_parser_dependent_type_p with dependent_type_p, etc.
5969 (cp_parser_primary_expresion): Likewise.
5970 (cp_parser_nested_name_specifier_opt): Likewise.
5971 (cp_parser_postfix_expression): Likewise.
5972 (cp_parser_unary_expression): Likewise.
5973 (cp_parser_template_name): Likewise.
5974 (cp_parser_class_name): Likewise.
5975 (cp_parser_lookup_name): Likewise.
5976 * pt.c (dependent_type_p): New function.
5977 (value_dependent_expression_p): Likewise.
5978 (type_dependent_expression_p): Likewise.
5979 (dependent_template_arg_p): Likewise.
5980 (dependent_template_id_p): Likewise.
5981 (dependent_template_p): Likewise.
5982
5983 PR c++/9285
5984 PR c++/9294
5985 * parser.c (cp_parser_simple_declaration): Return quickly when
5986 encountering errors.
5987
5988 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5989
5990 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5991
5992 2003-01-17 Jason Merrill <jason@redhat.com>
5993
5994 PR c++/9167, c++/9358
5995 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5996
5997 2003-01-17 Jason Merrill <jason@redhat.com>
5998
5999 PR c++/9342
6000 * call.c (build_conditional_expr): Always do lvalue-rvalue
6001 conversion.
6002
6003 2003-01-17 Mark Mitchell <mark@codesourcery.com>
6004
6005 PR c++/9294
6006 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
6007 * cp-tree.h (BASELINK_BINFO): Adjust.
6008 (BASELINK_FUNCTIONS): Likewise.
6009 (BASELINK_ACCESS_BINFO): Likewise.
6010 (tree_baselink): New structure.
6011 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
6012 (lang_tree_node): Add baselink.
6013 * decl.c (cp_tree_node_structure): Add BASELINK case.
6014 * search.c (build_baselink): Adjust.
6015 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
6016 test from TREE_LIST case.
6017
6018 PR c++/9272
6019 * parser.c (cp_parser_constructor_declarator_p): Do not assume
6020 that a constructor cannot be declared outside of its own class.
6021
6022 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
6023 be resolved, neither can the qualified name.
6024
6025 * rtti.c (get_pseudo_ti_desc): Fix thinko.
6026
6027 2003-01-16 Jason Merrill <jason@redhat.com>
6028
6029 PR c++/8564
6030 * init.c (build_vec_init): Re-add maxindex parm.
6031 (perform_member_init, build_aggr_init): Pass it.
6032 (build_new_1): Pass it. Use an incomplete array type for full_type.
6033 * typeck.c (build_modify_expr): Pass it.
6034 * cp-tree.h: Adjust.
6035
6036 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
6037
6038 * cp-tree.h (tsubst_copy_and_build): New declaration.
6039 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
6040 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
6041 (tsubst_copy_and_build): New function.
6042
6043 2003-01-16 Mark Mitchell <mark@codesourcery.com>
6044
6045 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
6046 (PARTIAL_INSTANTIATION_P): Remove.
6047 (IMPLICIT_TYPENAME_P): Likewise.
6048 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
6049 (build_typename_type): Remove declaration.
6050 (parmlist_is_exprlist): Likewise.
6051 * decl.c (build_typename_type): Make it static, remove third
6052 parameter.
6053 (push_class_binding): Don't do implicit typename stuff.
6054 (make_typename_type): Likewise.
6055 (lookup_name_real): Likewise.
6056 (grokdeclarator): Don't try to convert declarations into
6057 initializations. Don't do implicit typename stuff.
6058 (parmlist_is_exprlist): Remove.
6059 (xref_basetypes): Simplify.
6060 * decl2.c (grokfield): Don't try to convert declarations into
6061 initializations.
6062 (build_anon_union_vars): Do this while processing templates, too.
6063 (finish_anon_union): Likewise.
6064 * error.c (dump_type): Remove implicit typename handling.
6065 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
6066 (cp_parser_primary_expression): Correct handling of names not
6067 found by unqualified name lookup in templates.
6068 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
6069 of types when possible.
6070 (cp_parser_simple_declaration): Complain intelligently about some
6071 invalid declarations.
6072 (cp_parser_member_declaration): Likewise.
6073 (cp_parser_constructor_declarator_p): Don't check when we're in a
6074 function scope.
6075 * pt.c (instantiate_class_template): Remove
6076 PARTIAL_INSTANTIATION_P gunk.
6077 * search.c (lookup_field_r): Don't build implicit typenames.
6078 (marked_pushdecls_p): Don't enter dependent base types.
6079 (unmarked_pushdecls_p): Likewise.
6080 * semantics.c (begin_class_definition): Remove implicit typename
6081 stuff.
6082
6083 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
6084
6085 PR c++/9212
6086 * parser.c (cp_parser_direct_declarator): If accepting either
6087 abstract or named, the name must be an unqualified-id.
6088
6089 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6090
6091 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
6092
6093 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6094
6095 * decl2.c (check_classfn): Fix uninitialized warning.
6096 (build_anon_union_vars): Likewise.
6097 * pt.c (tsubst_copy): Likewise.
6098
6099 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
6100
6101 Further conform g++'s __vmi_class_type_info to the C++ ABI
6102 specification.
6103 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
6104 the specification.
6105 (class_hint_flags): Likewise.
6106
6107 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6108
6109 * config-lang.in: Add semantics.c to gtfiles.
6110 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
6111 (saved_scope): Likewise.
6112 (type_lookups): Remove.
6113 (deferred_access): New structure.
6114 (type_access_control): Remove.
6115 (save_type_access_control): Likewise.
6116 (reset_type_access_control): Likewise.
6117 (decl_type_access_control): Likewise.
6118 (push_deferring_access_checks): Declare.
6119 (resume_deferring_access_checks): Likewise.
6120 (stop_deferring_access_checks): Likewise.
6121 (pop_deferring_access_checks): Likewise.
6122 (get_deferred_access_checks): Likewise.
6123 (pop_to_parent_deferring_access_checks): Likewise.
6124 (perform_deferred_access_checks): Likewise.
6125 (perform_or_defer_access_check): Likewise.
6126 * decl.c (make_typename_type): Use perform_or_defer_access_check.
6127 (make_unbound_class_template): Likewise.
6128 (grokdeclarator): Don't call decl_type_access_control.
6129 * parser.c (cp_parser_context): Remove deferred_access_checks
6130 and deferring_access_checks_p fields.
6131 (cp_parser_context_new): Adjust.
6132 (cp_parser): Remove access_checks_lists.
6133 (cp_parser_defer_access_check): Remove.
6134 (cp_parser_start_deferring_access_checks): Remove.
6135 (cp_parser_stop_deferring_access_checks): Remove.
6136 (cp_parser_perform_deferred_access_checks): Remove.
6137 (cp_parser_nested_name_specifier_opt): Use new deferred access
6138 functions.
6139 (cp_parser_simple_declaration): Likewise.
6140 (cp_parser_template_id): Likewise.
6141 (cp_parser_function_definition): Likewise.
6142 (cp_parser_class_specifier): Likewise.
6143 (cp_parser_lookup_name): Likewise.
6144 (cp_parser_single_declaration): Likewise.
6145 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
6146 (cp_parser_parse_tentatively): Likewise.
6147 (cp_parser_parse_definitely): Likewise.
6148 (yyparse): Likewise.
6149 (cp_parser_init_declarator): Remove access_checks parameter.
6150 Use new deferred access functions.
6151 (cp_parser_function_definition_from_specifiers_and_declarator):
6152 Likewise.
6153 (cp_parser_class_head): Remove deferring_access_checks_p and
6154 saved_access_checks parameters. Use new deferred access functions.
6155 (cp_parser_member_specification_opt): Don't call
6156 reset_type_access_control.
6157 * search.c (type_access_control): Remove.
6158 * semantics.c: Include "gt-cp-semantics.h".
6159 (deferred_type_access_control): Remove.
6160 (deferred_access_stack): New variable.
6161 (deferred_access_free_list): Likewise.
6162 (push_deferring_access_checks): New function.
6163 (resume_deferring_access_checks): Likewise.
6164 (stop_deferring_access_checks): Likewise.
6165 (pop_deferring_access_checks): Likewise.
6166 (get_deferred_access_checks): Likewise.
6167 (pop_to_parent_deferring_access_checks): Likewise.
6168 (perform_deferred_access_checks): New function, adapted from
6169 cp_parser_perform_deferred_access_checks.
6170 (perform_or_defer_access_check): New function, adapted from
6171 cp_parser_defer_access_check.
6172 (current_type_lookups): Remove.
6173 (deferred_type_access_control): Likewise.
6174 (decl_type_access_control): Likewise.
6175 (save_type_access_control): Likewise.
6176 (reset_type_access_control): Likewise.
6177 (begin_function_definition): Adjust.
6178 (begin_class_definiton): Likewise.
6179
6180 2003-01-13 Jason Merrill <jason@redhat.com>
6181
6182 PR c++/8748
6183 * class.c (build_base_path): Take the address before calling save_expr.
6184
6185 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6186 all the ambiguous conversions are bad.
6187
6188 * class.c (maybe_warn_about_overly_private_class): Don't stop
6189 searching when we find a nonprivate method.
6190
6191 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6192
6193 2003-01-12 Mark Mitchell <mark@codesourcery.com>
6194
6195 * cp-tree.h (get_arglist_len_in_bytes): Remove.
6196
6197 PR c++/9264
6198 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6199 typeame types more robustly.
6200
6201 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
6202
6203 * parser.c: Fix comment typos.
6204
6205 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6206
6207 PR c++/9099
6208 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6209 an object_type which is not a class type.
6210
6211 2003-01-10 Geoffrey Keating <geoffk@apple.com>
6212
6213 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6214 (cp_parser_late_parsing_default_args): Likewise.
6215
6216 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
6217
6218 * cfns.gperf: ANSIfy function declarations.
6219 * cfns.h: Regenerate.
6220 * cp-tree.h: ANSIfy function declarations.
6221
6222 2003-01-10 Mark Mitchell <mark@codesourcery.com>
6223
6224 * cp-tree.h (reparse_absdcl_as_expr): Remove.
6225 (reparse_absdcl_as_casts): Likewise.
6226 (reparse_decl_as_expr): Likewise.
6227 (finish_decl_parsing): Likewise.
6228 * decl2.c (reparse_absdcl_as_expr): Remove.
6229 (reparse_absdcl_as_casts): Likewise.
6230 (repase_decl_as_expr): Likewise.
6231 (finish_decl_parsing): Likewise.
6232
6233 PR c++/9128
6234 PR c++/9153
6235 PR c++/9171
6236 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6237 function.
6238 (cp_parser_nested_name_specifier_opt): Correct the
6239 check_dependency_p false.
6240 (cp_parser_postfix_expression): Fix formatting.
6241 (cp_parser_decl_specifier_seq): Avoid looking for constructor
6242 declarators when possible.
6243 (cp_parser_template_id): Avoid performing name-lookup when
6244 possible.
6245 (cp_parser_class_head): Do not count specializations when counting
6246 levels of templates.
6247 (cp_parser_constructor_declarator_p): Return immediately if
6248 there's no chance that the tokens form a constructor declarator.
6249 * rtti.c (throw_bad_typeid): Add comment. Do not return an
6250 expression with reference type.
6251 (get_tinfo_decl_dynamic): Do not return an expression with
6252 reference type.
6253 (build_typeid): Add comment. Do not return an expression with
6254 reference type.
6255 * typeck.c (build_class_member_access_expr): Improve handling of
6256 conditionals and comma-expressions as objects.
6257
6258 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6259
6260 * cfns.gperf: ANSIfy function declarations.
6261 * cfns.h: Regenerate.
6262 * cp-tree.h: ANSIfy function declarations.
6263 * parser.c: ANSIfy function declarations & definitions.
6264
6265 * decl.c (bad_specifiers): Fix parameter order error I introduced.
6266
6267 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6268
6269 Merge from pch-branch:
6270
6271 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6272
6273 Merge to tag pch-merge-20030102:
6274
6275 * semantics.c (finish_translation_unit): Don't call finish_file.
6276 * parser.c: Don't include ggc.h.
6277 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6278 read first token here. Don't allow PCH files after the first
6279 token is read.
6280 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6281 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6282 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6283 (cp_parser_late_parsing_for_member): Don't duplicate call to
6284 cp_lexer_set_source_position_from_token.
6285 (cp_parser_late_parsing_default_args): Likewise.
6286 (yyparse): Call finish_file after clearing the_parser.
6287
6288 2002-12-11 Geoffrey Keating <geoffk@apple.com>
6289
6290 * Make-lang.in: Remove $(GGC_H) from all dependencies.
6291 (CXX_TREE_H): Add $(GGC_H).
6292 * class.c: Don't include ggc.h.
6293 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6294 (method_name_cmp): Likewise.
6295 (resort_data): New variable.
6296 (resort_field_decl_cmp): New.
6297 (resort_method_name_cmp): New.
6298 (resort_sorted_fields): New.
6299 (resort_type_method_vec): New.
6300 (finish_struct_methods): Delete cast.
6301 (finish_struct_1): Delete cast.
6302 * cp-tree.h: Include ggc.h.
6303 (struct lang_type_class): Add reorder attribute to field `methods'.
6304 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6305 (resort_sorted_fields): New prototype.
6306 (resort_type_method_vec): New prototype.
6307 * call.c: Don't include ggc.h.
6308 * decl.c: Likewise.
6309 * decl2.c: Likewise.
6310 * init.c: Likewise.
6311 * lex.c: Likewise.
6312 * method.c: Likewise.
6313 * optimize.c: Likewise.
6314 * parse.y: Likewise.
6315 * pt.c: Likewise.
6316 * repo.c: Likewise.
6317 * search.c: Likewise.
6318 * semantics.c: Likewise.
6319 * spew.c: Likewise.
6320 * tree.c: Likewise.
6321
6322 * lang-specs.h: Remove comment.
6323
6324 2002-12-03 Geoffrey Keating <geoffk@apple.com>
6325
6326 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6327 (operator_name_info): Mark to be saved for PCH, specify size.
6328 (assignment_operator_name_info): Likewise.
6329
6330 2002-11-19 Geoffrey Keating <geoffk@apple.com>
6331
6332 * decl.c (anon_cnt): Mark to be saved for PCH.
6333
6334 2002-10-25 Geoffrey Keating <geoffk@apple.com>
6335
6336 * lex.c (init_reswords): Delete now-untrue comment.
6337 Allocate ridpointers using GGC.
6338
6339 2002-10-04 Geoffrey Keating <geoffk@apple.com>
6340
6341 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6342
6343 * g++spec.c (lang_specific_driver): Don't include standard
6344 libraries in `added'.
6345
6346 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
6347
6348 * decl2.c (finish_file): Call c_common_write_pch.
6349 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6350
6351 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
6352
6353 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6354 files when using g++.
6355 * lang-specs.h: Handle compiling C++ header files.
6356
6357 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6358
6359 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6360
6361 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6362
6363 * pt.c (push_access_scope_real): Call push_to_top_level for
6364 function in namespace scope.
6365 (pop_access_scope): Call pop_from_top_level for function in
6366 namespace scope.
6367
6368 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6369
6370 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6371
6372 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6373
6374 * Make-lang.in (c++.install-common, c++.install-man,
6375 c++.uninstall): Prepend $(DESTDIR) to destination paths in
6376 all (un)installation commands.
6377 (c++.install-common): Rewrite $(LN) commands to support
6378 DESTDIR with "ln" as well as with "ln -s".
6379
6380 2003-01-08 Jason Merrill <jason@redhat.com>
6381
6382 * parser.c (cp_parser_primary_expression): See through explicitly
6383 scoped ALIAS_DECLs, too.
6384
6385 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6386
6387 * decl.c: Remove some #if 0 code.
6388
6389 * decl.c: ANSIfy function declarations.
6390
6391 2003-01-07 Mark Mitchell <mark@codesourcery.com>
6392
6393 * parser.c (cp_parser_asm_definition): Correct handling of omitted
6394 operands.
6395
6396 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6397
6398 PR c++/9030
6399 * decl.c (make_typename_type): Check access only when tf_error.
6400 (make_unbound_class_template): Likewise.
6401 * pt.c (saved_access_scope): New variable.
6402 (push_access_scope_real): New function.
6403 (push_access_scope): Likewise.
6404 (pop_access_scope): Likewise.
6405 (tsubst_default_argument): Use them.
6406 (instantiate_template): Likewise.
6407 (regenerate_decl_from_template): Likewise.
6408 (instantiate_decl): Likewise.
6409 (get_mostly_instantiated_function_type): Likewise.
6410
6411 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
6412
6413 * tree.c: Delete bogus #if 0 code.
6414
6415 2003-01-07 Andreas Schwab <schwab@suse.de>
6416
6417 * class.c (layout_class_type): Don't use
6418 PCC_BITFIELD_TYPE_MATTERS if not defined.
6419
6420 2003-01-06 Mark Mitchell <mark@codesourcery.com>
6421
6422 PR c++/9165
6423 * decl2.c (build_cleanup): Mark the object as used.
6424
6425 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6426 (hash_local_specialization): New function.
6427 (register_local_specialization): Revert 2003-01-05 change.
6428 (instantiate_decl): Use hash_local_specialization when creating
6429 the local_specializations table.
6430
6431 * decl2.c (mark_used): Do not synthesize thunks.
6432
6433 * class.c (layout_class_type): Correct handling of unnamed
6434 bitfields wider than their types.
6435
6436 PR c++/9189
6437 * parser.c (cp_parser): Remove default_arg_types. Update
6438 documentation for unparsed_functions_queues.
6439 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6440 parameter.
6441 (cp_parser_new): Don't set parser->default_arg_types.
6442 (cp_parser_function_definition): Adjust usage of
6443 unparsed_funtions_queues.
6444 (cp_parser_class_specifier): Don't mess with
6445 parser->default_arg_types. Handle default argument processing in
6446 a separate phase from function body processing.
6447 (cp_parser_template_declaration_after_export): Adjust usage of
6448 unparsed_functions_queues.
6449 (cp_parser_late_parsing_for_member): Do not handle default
6450 arguments.
6451
6452 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
6453
6454 PR c++/9109
6455 * parser.c (cp_parser_declarator_kind): New enum.
6456 (cp_parser_declarator): Adjust.
6457 (cp_parser_direct_declarator): Adjust. Allow for either named or
6458 abstract declarator. Prefer abstract, if possible. Allow
6459 parenthesized function name.
6460 (cp_parser_condition): Adjust cp_parser_declarator call.
6461 (cp_parser_explicit_instantiation): Likewise.
6462 (cp_parser_init_declarator): Likewise.
6463 (cp_parser_type_id): Likewise.
6464 (cp_parser_function_definition): Likewise.
6465 (cp_parser_member_declaration): Likewise.
6466 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6467 the tentative parsing.
6468 (cp_parser_exception_declaration): Likewise.
6469
6470 2003-01-05 Mark Mitchell <mark@codesourcery.com>
6471
6472 * parser.c (cp_parser_template_parameter): Adjust call to
6473 cp_parser_parameter_declaration.
6474 (cp_parser_parameter_declaration_list): Likewise.
6475 (cp_parser_parameter_declaration): Replace
6476 greater_than_is_operator_p with template_parm_p parameter. Do not
6477 cache tokens for template default arguments.
6478
6479 * pt.c (retrieve_local_specialization): Use htab_find, not
6480 htab_find_with_hash.
6481 (register_local_specialization): Use htab_find_slot, not
6482 htab_find_slot_with_hash.
6483 (instantiate_decl): Pass a hash function to htab_create.
6484
6485 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6486
6487 * parser.c (cp_parser_binary_expression,
6488 cp_parser_multiplicative_expression,
6489 cp_parser_additive_expression, cp_parser_shift_expression,
6490 cp_parser_relational_expression, cp_parser_equality_expression,
6491 cp_parser_and_expression, cp_parser_exclusive_or_expression,
6492 cp_parser_inclusive_or_expression,
6493 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6494 cp_parser_binary_expression): Const-ify.
6495
6496 2003-01-04 Mark Mitchell <mark@codesourcery.com>
6497
6498 * method.c (use_thunk): Disable access control while building the
6499 body of the thunk.
6500
6501 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
6502
6503 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6504 front end.
6505
6506 2003-01-03 Matt Austern <austern@apple.com>
6507
6508 * cp-tree.h (struct lang_type_class): add field for key method
6509 (cp_global_trees): rename dynamic_classes to keyed_classes
6510 (key_method): add definition
6511 * class.c (finish_struct_1): compute class's key method, and add
6512 the class to keyed_classes list if there is no key method.
6513 * decl.c (finish_function): add class to keyed_classes list if we
6514 see a definition of the class's key method.
6515 * pt.c (instantiate_class_template): add template specialization
6516 of a dynamic class to keyed_classes list.
6517 * decl2.c (key_method): remove
6518 (finish_file): iterate only through keyed_classes list when
6519 deciding whether to emit vtables, remove class from its list after
6520 we do the emission.
6521
6522 2003-01-02 Jason Merrill <jason@redhat.com>
6523
6524 * call.c (build_conditional_expr): Stabilize lvalues properly.
6525 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6526 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6527 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6528
6529 * call.c (convert_like_real): Call decl_constant_value for an
6530 IDENTITY_CONV even if there are no more conversions.
6531
6532 * cvt.c (build_up_reference): Don't push unnamed temps.
6533
6534 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6535
6536 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6537 for a backend struct.
6538
6539 * except.c (wrap_cleanups_r, build_throw): Make
6540 MUST_NOT_THROW_EXPRs void.
6541 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6542
6543 * init.c (build_vec_delete_1): Pre-evaluate the base address.
6544
6545 * init.c (get_temp_regvar): Simplify logic.
6546
6547 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6548 our replacement is a decl.
6549
6550 * decl.c (cp_make_fname_decl): Push the decls inside the
6551 outermost scope.
6552
6553 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
6554
6555 PR c++/45, c++/3784
6556 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6557 the same too.
6558
6559 2003-01-03 Graham Stott <graham.stott@btinternet.com>
6560
6561 * parser.c (struct cp_parser): Add access_checks_lists field
6562 (cp_parser_simple_declaration): Use.
6563 (cp_parser_init_declarator): Likewise.
6564
6565 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6566
6567 * parser.c (cp_parser_declaration): Accept the __extension__
6568 keyword before the declaration.
6569
6570 PR c++/2843
6571 * parser.c (cp_parser_parameter_declaration): Allow attributes to
6572 appear after the declarator.
6573
6574 * call.c (build_new_method_call): Fix typo in message format
6575 string.
6576
6577 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6578
6579 * parser.c (cp_lexer_next_token_is): Declare it inline.
6580 (cp_lexer_set_source_position_from_token): Likewise.
6581 (cp_lexer_debugging_p): Likewise.
6582 (cp_parser_parsing_tentatively): Likewise.
6583 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6584 to the cp_lexer_peek_token.
6585
6586 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6587 expression.
6588
6589 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6590
6591 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6592 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6593 cp/repo.c: Fix copyright years.
6594
6595 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
6596
6597 * lex.c: Remove superfluous include of cpplib.h.
6598 (CONSTRAINT): Define without conditions.
6599 (init_cp_pragma): Use c_register_pragma.
6600
6601 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6602
6603 * .cvsignore: Remove.
6604
6605 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
6606
6607 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6608 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6609 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6610 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6611 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6612 copyright header.
6613 * lex.h: parse.y is dead, so don't mention it. Also replace the
6614 copyright header with the default GNU copyright header.
6615
6616 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6617
6618 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6619 (lookup_name_namespace_only): Likewise.
6620 (begin_only_namespace_names): Likewise.
6621 (end_only_namespace_names): Likewise.
6622 * decl.c (only_namespace_names): Remove.
6623 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6624 (lookup_name_real): Do not check only_namespace_names.
6625 (lookup_name_namespace_only): Remove.
6626 (begin_only_namespace_names): Likewise.
6627 (end_only_namespace_names): Likewise.
6628 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6629 nested-name-specifiers more gracefully.
6630 (cp_parser_class_or_namespace_name): Avoid looking up namespace
6631 names when they cannot possibly appear.
6632 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6633 (cp_parser_elaborated_type_specifier): Likewise.
6634 (cp_parser_namespace_name): Only look for namespace names.
6635 (cp_parser_lookup_name): Add is_namespace parameter.
6636 (cp_parser_lookup_name_simple): Adjust call to
6637 cp_parser_lookup_name.
6638
6639 * parser.c (cp_parser_dependent_type_p): Fix thinko.
6640
6641 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6642
6643 * .cvsignore: Update.
6644
6645 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
6646
6647 * class.c (modify_vtable_entry): Remove unused variable.
6648 (get_vcall_index): Always expect a non-thunk.
6649 (update_vtable_entry_for_fn): Combine covariant adjustments, when
6650 overriding a thunk. Pass get_vcall_index a non-thunk.
6651
6652 * decl2.c (finish_file): Mark undefined inlines as extern.
6653
6654 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6655
6656 * cp-tree.def (RETURN_INIT): Remove.
6657 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6658 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6659 (note_level_for_for): Remove.
6660 (note_level_for_try): Likewise.
6661 (note_level_for_catch): Likewise.
6662 (finish_named_return_value): Likewise.
6663 (do_pushlevel): Change prototype.
6664 (pending_lang_change): Remove.
6665 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6666 sk_for.
6667 (note_level_for_for): Remove.
6668 (note_level_for_try): Likewise.
6669 (note_level_for_catch): Likewise.
6670 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6671 * parser.c (cp_parser_context_free_list): Make it "deletable".
6672 (cp_parser_template_argument): Remove misleading comment.
6673 * pt.c (tsubst_expr): Remove RETURN_INIT code.
6674 * semantics.c (genrtl_named_return_value): Remove.
6675 (do_pushlevel): Take a scope kind as an argument.
6676 (begin_if_stmt): Adjust.
6677 (begin_while_stmt): Likewise.
6678 (begin_for_stmt): Likewise.
6679 (finish_for_init_stmt): Likewise.
6680 (begin_switch_stmt): Likewise.
6681 (begin_handler): Likewise.
6682 (begin_compound_stmt): Likewise.
6683 (finish_named_return_value): Remove.
6684 (cp_expand_stmt): Remove RETURN_INIT case.
6685 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6686
6687 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6688
6689 PR c++/9112
6690 * parser.c (cp_parser_direct_declarator): Handle erroneous
6691 parenthesized declarators correctly.
6692
6693 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6694
6695 * cp-tree.h (pending_lang_change): Declare.
6696
6697 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6698
6699 * parser.c (cp_parser_context_free_list): New variable.
6700 (cp_parser_context_new): Use it.
6701 (cp_parser_error): Check return code from
6702 cp_parser_simulate_error.
6703 (cp_parser_simulate_error): Return a value.
6704 (cp_parser_id_expression): Optimize common case.
6705 (cp_parser_class_name): Likewise.
6706 (cp_parser_class_specifier): Adjust call to
6707 cp_parser_late_parsing_default_args.
6708 (cp_parser_lookup_name): Optimize common case.
6709 (cp_parser_late_parsing_for_member): Adjust call to
6710 cp_parser_late_parsing_default_args.
6711 (cp_parser_late_parsing_default_args): Add scope parameter.
6712 (cp_parser_require): Avoid creating the error message unless it's
6713 needed.
6714 (cp_parser_parse_definitely): Place free'd contexts on the free
6715 list.
6716
6717 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6718
6719 2002-12-30 David Edelsohn <edelsohn@gnu.org>
6720
6721 * parser.c (cp_parser_parameter_declaration_clause): Treat system
6722 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6723
6724 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6725
6726 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6727 GCC, not GNU CC.
6728
6729 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6730
6731 * parse.y: Remove.
6732 * spew.c: Likewise.
6733 * Make-lang.in (gt-cp-spew.h): Remove.
6734 * cp-tree.h (do_pending_lang_change): Remove.
6735 (do_identifier): Change prototype.
6736 (finish_id_expr): Remove.
6737 * decl.c (lookup_name_real): Remove yylex variable.
6738 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6739 * lex.c (init_cpp_parse): Remove.
6740 (reduce_cmp): Likewise.
6741 (token_cmp): Likewise.
6742 (yychar): Likewise.
6743 (lastiddecl): Likewise.
6744 (token_count): Likewise.
6745 (reduce_count): Likewise.
6746 (yyhook): Likewise.
6747 (print_parse_statistics): Likewise.
6748 (do_pending_lang_change): Likewise.
6749 (do_identifier): Remove parsing parameter.
6750 * lex.h (lastiddecl): Remove.
6751 (looking_for_typename): Remove.
6752 (looking_for_template): Likewise.
6753 (pending_lang_change): Likewise.
6754 (yylex): Likewise.
6755 * semantics.c (finish_id_expr): Remove.
6756
6757 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6758 thread" correctly.
6759
6760 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6761
6762 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
6763 end, not the C front end.
6764
6765 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
6766
6767 * cp-tree.h (THUNK_TARGET): New macro.
6768 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6769 (finish_thunk): Remove offset parms.
6770 * class.c (find_final_overrider): Look through thunks.
6771 (get_vcall_index): Use THUNK_TARGET.
6772 (update_vtable_entry_for_fn): Look through thunks. Set covariant
6773 fixed offset here. Adjust finish_thunk call.
6774 (build_vtbl_initializer): Adjust finish_thunk calls.
6775 * mangle.c (mangle_call_offset): Remove superfluous if.
6776 (mangle_thunk): Adjust.
6777 * method.c (make_thunk): Adjust.
6778 (finish_thunk): Adjust.
6779 (thunk_adjust): Remove assert.
6780 (use_thunk): Use THUNK_TARGET
6781 * dump1.c (cp_dump_tree): Adjust thunk dumping.
6782
6783 PR c++/9054
6784 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6785 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6786
6787 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6788
6789 Remove traditional C constructs 4/n.
6790 * decl2.c (grok_method_quals, warn_if_unknown_interface,
6791 grok_x_components, cp_build_parm_decl, build_artificial_parm,
6792 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6793 delete_sanity, check_member_template, check_java_method,
6794 check_classfn, finish_static_data_member_decl, grokfield,
6795 grokbitfield, grokoptypename, grok_function_init,
6796 cplus_decl_attributes, constructor_name, defer_fn,
6797 build_anon_union_vars, finish_anon_union, coerce_new_type,
6798 coerce_delete_type, comdat_linkage, maybe_make_one_only,
6799 key_method, import_export_vtable, import_export_class,
6800 output_vtable_inherit, import_export_decl, import_export_tinfo,
6801 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6802 set_guard, start_objects, finish_objects,
6803 start_static_storage_duration_function,
6804 finish_static_storage_duration_function, get_priority_info,
6805 start_static_initialization_or_destruction,
6806 finish_static_initialization_or_destruction,
6807 do_static_initialization, do_static_destruction,
6808 prune_vars_needing_no_initialization, write_out_vars,
6809 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6810 add_using_namespace, merge_functions, ambiguous_decl,
6811 lookup_using_namespace, lookup_using_namespace,
6812 qualified_lookup_using_namespace, set_decl_namespace,
6813 decl_namespace, current_decl_namespace, push_decl_namespace,
6814 pop_decl_namespace, push_scope, pop_scope, add_function,
6815 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6816 lookup_arg_dependent, do_namespace_alias,
6817 validate_nonmember_using_decl, do_nonmember_using_decl,
6818 do_toplevel_using_decl, do_local_using_decl,
6819 do_class_using_decl, do_using_directive, check_default_args,
6820 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
6821 * parser.c (cp_parser_class_head): Use booleanss.
6822 * decl.c (walk_globals, walk_vtables): Likewise.
6823 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6824 walk_globals): Change return type from 'int' to 'bool'.
6825 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6826 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6827 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6828 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6829 qualifier_flags, tinfo_base_init, generic_initializer,
6830 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6831 dfs_class_hint_unmark, class_hint_flags, class_initializer,
6832 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6833 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6834 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6835 * repo.c (repo_compile_flags, repo_template_declared,
6836 repo_template_defined, repo_class_defined, repo_get_id,
6837 repo_template_used, repo_vtable_used, repo_inline_used,
6838 repo_tinfo_used, repo_template_instantiated, extract_string,
6839 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6840 finish_repo): Likewise.
6841 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6842 cxx_print_xnode): Likewise..
6843 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6844 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6845 * cxxfilt.c (demangle_it, print_demangler_list, usage,
6846 standard_symbol_characters, hp_symbol_characters, main, fatal):
6847 Likewise.
6848 (strip_underscore): Change type from 'int' to 'bool'.
6849 (main): Use boolean constants.
6850
6851 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6852
6853 Remove traditional C constructs 3/n.
6854 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6855 build_up_reference, warn_ref_binding, convert_to_reference,
6856 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6857 convert_to_void, convert, convert_force, build_type_conversion,
6858 build_expr_type_conversion, type_promotes_to,
6859 perform_qualification_conversions): Use C90 prototyping style.
6860 * decl2.c (grok_array_decl): Use boolean constant.
6861 (delete_sanity): Likewise.
6862 * typeck.c (build_unary_op): Likewise.
6863 * semantics.c (finish_switch_cond): Likewise.
6864 * parser.c (cp_parser_direct_new_declarator): Likewise.
6865 * init.c (build_new): Likewise.
6866
6867 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6868
6869 * Make-lang.in (po-generated): Remove parse.c.
6870 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
6871 ($(srcdir)/cp/parse.h): Remove target.
6872 ($(srcdir)/cp/parse.c): Likewise.
6873 (gt-cp-parse.h): Likewise.
6874 (gt-cp-parser.h): New target.
6875 (c++.distclean): Do not remove parse.output.
6876 (c++.maintainer-clean): Do not remove parse.c or parse.h.
6877 (cp/spew.o): Remove target.
6878 (cp/lex.o): Adjust dependencies.
6879 (cp/pt.o): Likewise.
6880 (cp/parse.o): Likewise.
6881 (cp/TAGS): Do not mention parse.c.
6882 (cp/parser.o): New target.
6883 * NEWS: Mention the new parser.
6884 * call.c (build_scoped_method_call): Simplify.
6885 (build_method_call): Likewise.
6886 (build_new_function_call): Adjust calls to add_function_candidate
6887 and add_template_candidate.
6888 (build_new_op): Improve handling of erroroneous operands.
6889 (convert_default_arg): Remove circular argument processing.
6890 (name_as_c_string): New function.
6891 (build_new_method_call): Use it.
6892 (perform_implicit_conversion): Use error_operand_p.
6893 * class.c (finish_struct_anon): Use constructor_name_p.
6894 (check_field_decls): Likewise.
6895 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6896 (resolve_address_of_overloaded_function): Likewise.
6897 (instantiate_type): Tweak pointer-to-member handling.
6898 (get_primary_binfo): Remove incorrect assertion.
6899 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6900 * cp-tree.h (DEFARG_TOKENS): New macro.
6901 (default_arg): New structure.
6902 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6903 (lang_tree_node): Add default_arg.
6904 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6905 (type_info_ref_type): New macro.
6906 (saved_scope): Make processing_explicit_instantiation a boolean.
6907 (check_access): New field.
6908 (unparsed_text): Remove.
6909 (language_function): Remove unparsed_inlines.
6910 (error_operand_p): New macro.
6911 (lang_decl): Adjust pending_inline_info.
6912 (DEFARG_POINTER): Remove.
6913 (tag_types): Add typenames.
6914 (lookup_ualified_name): Declare.
6915 (lookup_name_real): Likewise.
6916 (shadow_tag): Adjust prototype.
6917 (get_scope_of_declarator): Declare it.
6918 (process_next_inline): Remove it.
6919 (check_for_missing_semicolon): Likewise.
6920 (maybe_get_template_decl_from_type_decl): Declare it.
6921 (finish_label_stmt): Adjust prototype.
6922 (finish_non_static_data_meber): Declare it.
6923 (finish_pseudo_destructor_call_expr): Rename to ...
6924 (finish_pseudo_destructor_expr): ... this.
6925 (finish_compound_literal): Declare it.
6926 (begin_inline_definitions): Remove it.
6927 (init_spew): Remove.
6928 (peekyylex): Likewise.
6929 (arbitrate_lookup): Likewise.
6930 (frob_opname): Likewise.
6931 (maybe_snarf_defarg): Likewise.
6932 (add_defarg_fn): Likewise.
6933 (do_pending_defargs): Likewise.
6934 (done_pending_defargs): Likewise.
6935 (unprocessed_defarg_fn): Likewise.
6936 (replace_defarg): Likewise.
6937 (end_input): Likewise.
6938 (get_overloaded_fn): Likewise.
6939 * cvt.c (convert_to_reference): Improve error handling.
6940 * decl.c (lookup_name_real): Do not declare it static.
6941 (maybe_push_to_top_level): Set check_access.
6942 (identifier_type_value): Adjust call to lookup_name_real.
6943 (lookup_qualified_name): New method.
6944 (lookup_name_real): Remove special-case parsing code.
6945 (lookup_name-nonclass): Adjust call to lookup_name_real.
6946 (lookup_name_namespace_only): Likewise.
6947 (lookup_name): Likewise.
6948 (check_tag_decl): Return the type declared.
6949 (shadow_tag): Likewise.
6950 (register_dtor_fn): Tweak check_access.
6951 (grokfndecl): Use constructor_name_p.
6952 (get_scope_of_declarator): New function.
6953 (grokdeclarator): Obscure tweaks for slightly different declarator
6954 representations.
6955 (start_method): Return error_mark_node to indicate failure.
6956 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6957 * decl2.c (constructor_name_full): Simplify.
6958 (constructor_name): Use it.
6959 (build_expr_from_tree): Adjust for changes to do new parser.
6960 (push_scope): Improve robustness.
6961 (validate_nonmember_using_decl): Process declarations, not names.
6962 (do_class_using_decl): Likewise.
6963 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6964 here.
6965 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6966 * expr.c (cxx_expand_expr): Handle BASELINKs.
6967 * init.c (member_init_ok_or_else): Issue more errors.
6968 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6969 * lex.c: Do not include parse.h.
6970 (yypring): Do not declare.
6971 (yylval): Likewise.
6972 (make_reference_declarator): Remove error-generating code.
6973 (rid_to_yy): Remove.
6974 (cxx_init): Do not call init_spew.
6975 (yypring): Remove.
6976 (check_for_missing_semicolon): Remove.
6977 * lex.h (got_scope): Remove.
6978 (got_object): Remove.
6979 * method.c (hack_identifier): Use finish_non_static_data_member.
6980 (implicitly_declare_fn): Adjust use of constructor_name.
6981 * parser.c: New file.
6982 * pt.c (parse.h): Do not include it.
6983 (maybe_get_template_decl_from_template): Do not declare it.
6984 (finish_member_template_decl): Tweak.
6985 (begin_explicit_instantiation): Adjust for
6986 processing_explicit_instantiation being boolean.
6987 (end_explicit_instantiation): Likewise.
6988 (maybe_process_partial_specialization): Tighten specialization
6989 test.
6990 (retrieve_local_specialization): Adjust ue of hash table.
6991 (eq_local_specializations): New function.
6992 (register_local_specialization): Likewise.
6993 (push_template_decl_real): Remove unnecessary test.
6994 (maybe_get_template_decl_from_type_decl): Don't make it static.
6995 (for_each_template_parm_r): Handle TYPEOF_TYPE.
6996 (tsubst_copy): Use retrieive_local_specialization to handle
6997 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
6998 Handle COMPONENT_REFs with pseudo-destructor-expressions.
6999 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
7000 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
7001 (unify): Tweak handling of CONST_DECLs.
7002 (regenerate_decl_from_template): Use push_nested_class.
7003 (template_for_substitution): New funciton.
7004 (instantiate_decl): Use it. Register parameters as local
7005 specializations.
7006 * rtti.c (init_rtti_processing): Set type_info_ref_type.
7007 (build_typeid): Use it.
7008 (get_typeid): Likeise.
7009 * search.c (accessible_p): Use check_access, not
7010 flag_access_control.
7011 (adjust_result_of_qualified_name_lookup): Pay attention to the
7012 context_class.
7013 * semantics.c (finish_asm_stmt): Adjust error handling.
7014 (finish_label_stmt): Return the statement.
7015 (finish_non_static_data_member): New function.
7016 (finish_class_expr): Handle BASELINKs.
7017 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
7018 (finish_object_call_expr): Simplify handling during templates.
7019 (finish_pseudo_destructor_call_expr): Rename to ...
7020 (finish_pseudo_dtor_expr): ... this.
7021 (finish_compound_literal): New function.
7022 (begin_inline_definitions): Remove.
7023 (finish_sizeof): Remove special template handling.
7024 * spew.c: Do not include parse.h.
7025 * tree.c (get_overloaded_fn): Remove.
7026 * typeck.c (build_class_member_access_expr): Handle
7027 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
7028 (lookup_destructor): New function.
7029 (finish_class_member_access_expr): Use it.
7030 (convert_arguments): Simplify.
7031 (build_unary_op): Handle BASELINKs.
7032
7033 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
7034
7035 PR c++/4803
7036 * decl2.c (mark_used): Defer inline functions.
7037 (finish_file): Merge deferred_fns loops. Check all used
7038 inline functions have a definition.
7039 * method.c (make_thunk): Thunks are not inline.
7040
7041 PR c++/5116, c++/764
7042 * call.c (build_new_op): Make sure template class operands are
7043 instantiated.
7044
7045 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
7046
7047 PR C++/7964
7048 * cp-tree.h (resolve_scoped_fn_name): Prototype.
7049 * call.c (resolve_scoped_fn_name): New function. Deal with
7050 more template expansion. Broken out of ...
7051 * parse.y (parse_finish_call_expr): ... here. Call it.
7052 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
7053 resolve_scoped_fn_name and build_call_from_tree.
7054
7055 PR c++/9053
7056 * decl.c (duplicate_decls): Templates may be disambiguated by
7057 return type.
7058
7059 PR c++/8702
7060 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
7061 conversion operators on failure.
7062
7063 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7064
7065 Remove traditional C constructs 2/n.
7066 * call.c (tourney, build_field_call, equal_functions, joust,
7067 compare_ics, build_over_call, build_java_interface_fn_ref,
7068 convert_like_real, op_error, build_object_call, resolve_args,
7069 build_vfield_ref, check_dtor_name, build_scoped_method_call,
7070 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
7071 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
7072 standard_conversion, reference_related_p,
7073 reference_compatible_p, convert_class_to_reference,
7074 direct_reference_binding, reference_binding,
7075 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
7076 add_template_conv_candidate, any_viable, any_strictly_viable,
7077 build_this, splice_viable, print_z_candidates,
7078 build_user_type_conversion, build_new_function_call,
7079 conditional_conversion, build_conditional_expr, build_new_op,
7080 build_op_delete_call, enforce_access, call_builtin_trap,
7081 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
7082 convert_default_arg, type_passed_as, convert_for_arg_passing,
7083 in_charge_arg_for_name, is_properly_derived_from,
7084 maybe_handle_implicit_object, maybe_handle_ref_bind,
7085 source_type, add_warning, can_convert, can_convert_arg,
7086 perform_implicit_conversion, can_convert_arg_bad,
7087 initialize_reference, add_conv_candidate,
7088 add_template_candidate_real, add_template_candidate): Ansify.
7089
7090 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
7091
7092 PR c++/8572
7093 * cp-tree.h (grokoptypename): Add SCOPE parameter.
7094 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
7095 if in a template scope.
7096 * parse.y (unoperator): Return the scope.
7097 (operator_name): Adjust grokoptypename call.
7098
7099 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7100
7101 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
7102 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
7103 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
7104
7105 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
7106
7107 * ChangeLog: Fix a typo.
7108 * class.c: Fix comment typos.
7109 * cp-tree.h: Likewise.
7110
7111 2002-12-18 Jason Merrill <jason@redhat.com>
7112
7113 Handle anonymous unions at the tree level.
7114 C++ ABI change: Mangle anonymous unions using the name of their
7115 first named field (by depth-first search). Should not cause
7116 binary compatibility problems, though, as the compiler previously
7117 didn't emit anything for affected unions.
7118 * cp-tree.def (ALIAS_DECL): New tree code.
7119 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
7120 first field, not the largest.
7121 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
7122 push the decl, and write it out at namespace scope.
7123 * decl.c (lookup_name_real): See through an ALIAS_DECL.
7124 (pushdecl): Add namespace bindings for ALIAS_DECLs.
7125 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
7126 of a decl which doesn't have one.
7127 * typeck.c (build_class_member_access_expr): Don't recurse if
7128 we already have the type we want.
7129
7130 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7131
7132 PR c++/8099
7133 * friend.c (make_friend_class): Allow partial specialization
7134 when declaration is not a template friend.
7135
7136 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7137
7138 PR c++/3663
7139 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
7140 TREE_PROTECTED to created decl nodes.
7141
7142 2002-12-18 Mark Mitchell <mark@codesourcery.com>
7143
7144 * class.c (build_base_field): Do not set DECL_PACKED on the
7145 FIELD_DECL.
7146
7147 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
7148
7149 * cp-tree.h (struct tree_srcloc): Use location_t.
7150 (SOURCE_LOCUS): New.
7151 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
7152
7153 2002-12-17 Jason Merrill <jason@redhat.com>
7154
7155 * decl.c (finish_function): Also complain about no return in
7156 templates.
7157 * semantics.c (finish_return_stmt): Also call check_return_expr in
7158 templates.
7159 * typeck.c (check_return_expr): In a template, just remember that we
7160 saw a return.
7161
7162 2002-12-16 Jason Merrill <jason@redhat.com>
7163
7164 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
7165 of the CALL_EXPR.
7166
7167 * semantics.c (do_pushlevel): Call pushlevel after adding the
7168 SCOPE_STMT.
7169 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
7170 * parse.y (function_body): Go back to using compstmt.
7171 * decl.c (pushdecl): Skip another level to get to the parms level.
7172
7173 * call.c (build_new_method_call): Use is_dummy_object to determine
7174 whether or not to evaluate the object parameter to a static member
7175 function.
7176
7177 2002-12-14 Jason Merrill <jason@redhat.com>
7178
7179 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
7180 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
7181 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
7182 don't bother with an AGGR_INIT_EXPR.
7183 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
7184 just generate a new decl normally. Take return slot parm.
7185 * cp-tree.h: Adjust prototype.
7186
7187 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
7188
7189 PR C++/8031
7190 * cvt.c (convert_to_pointer_force): Don't try comparing against
7191 erronous type.
7192
7193 2002-12-13 Geoffrey Keating <geoffk@apple.com>
7194
7195 * cp-tree.h: Have the multiple-include guards around
7196 the entire file.
7197
7198 2002-12-10 David Edelsohn <edelsohn@gnu.org>
7199
7200 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
7201 for SPEW_DEBUG.
7202 (snarf_method): Same.
7203 (snarf_defarg): Same.
7204
7205 2002-12-10 Mark Mitchell <mark@codesourcery.com>
7206
7207 PR c++/8372
7208 * pt.c (tsubst_copy): Handle destructor names more correctly.
7209
7210 2002-12-10 Matt Austern <austern@apple.com>
7211
7212 * cp-tree.h: get rid of needs_virtual_reinit bit.
7213
7214 2002-12-09 Mark Mitchell <mark@codesourcery.com>
7215
7216 * NEWS: Document removal of in-class initialization extension for
7217 static data members of non-arithmetic, non-enumeration type.
7218 * decl.c (check_static_variable_definition): Do not allow that
7219 extension.
7220 * decl2.c (grokfield): Do not call digest_init when processing
7221 templates.
7222
7223 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7224
7225 * error.c (dump_expr): Fix format specifier warning.
7226
7227 2002-12-04 Geoffrey Keating <geoffk@apple.com>
7228
7229 * class.c (finish_struct_1): Correct comment.
7230 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
7231
7232 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7233
7234 PR C++/8799
7235 * error.c (dump_expr): Don't ever try to dump a non-existent
7236 expression.
7237
7238 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
7239
7240 Implement covariant returns.
7241 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
7242 (struct lang_decl_flags): Add this_thunk_p flag.
7243 Rename vcall_offset to virtual_offset.
7244 (struct lang_decl): Rename delta to fixed_offset.
7245 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
7246 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
7247 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
7248 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
7249 (make_thunk): Add this_adjusting arg.
7250 (finish_thunk): Declare.
7251 (mangle_thunk): Add this_adjusting arg.
7252 * class.c (get_vcall_index): Use base function for lookup.
7253 (update_vtable_entry_for_fn): Generate covariant thunk.
7254 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
7255 (build_vtbl_initializer): Use base function for lookup.
7256 Finish covariant thunk here. Adjust thunk generation.
7257 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
7258 Adjust thunk dumping.
7259 * mangle.c (mangle_call_offset): New function.
7260 (mangle_thunk): Adjust for covariant thunks.
7261 * method.c (make_thunk): Adjust. Do not set name here.
7262 (finish_thunk): New function. Set name here.
7263 (use_thunk): Generate covariant thunks too.
7264 (thunk_adjust): New function.
7265 * search.c (covariant_return_p): Remove. Fold into ...
7266 (check_final_overrider): ... here. Simplify.
7267 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7268
7269 2002-12-03 Jason Merrill <jason@redhat.com>
7270
7271 PR c++/8674
7272 * call.c (build_over_call): Check specifically for TARGET_EXPR
7273 when eliding.
7274
7275 PR c++/8461, c++/8625
7276 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7277 (cp_convert_parm_for_inlining): Remove.
7278 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7279 Remove.
7280 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7281 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7282
7283 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7284 an ambiguous conversion.
7285
7286 2002-12-03 Mark Mitchell <mark@codesourcery.com>
7287
7288 PR c++/8688
7289 * decl.c (reshape_init): Handle erroneous initializers.
7290
7291 2002-12-02 Mark Mitchell <mark@codesourcery.com>
7292
7293 PR c++/8720
7294 * spew.c (remove_last_token): Make sure that last_chunk is set
7295 correctly.
7296
7297 PR c++/8615
7298 * error.c (dump_expr): Handle character constants with
7299 TREE_OVERFLOW set.
7300
7301 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7302
7303 DR 180
7304 * decl.c (grokdeclarator): Require class-key for all friend class.
7305 Output the correct type and context in the error message.
7306
7307 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7308
7309 PR c++/5919
7310 * pt.c (unify): Use variably_modified_type_p to test validity of
7311 template argument types.
7312
7313 PR c++/8727
7314 * cp-tree.h (lang_type_class): Add typeinfo_var.
7315 (CLASSTYPE_TYPEINFO_VAR): New macro.
7316 * rtti.c (get_tinfo_decl): Use it.
7317
7318 PR c++/8663
7319 * init.c (expand_member_init): Always get the main variant of a
7320 base class.
7321
7322 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7323
7324 PR c++/8332
7325 PR c++/8493
7326 * decl.c (cxx_init_decl_processing): Use size_type_node, not
7327 c_size_type_node.
7328 * decl2.c (coerce_new_type): Likewise.
7329 * except.c (do_allocate_exception): Likewise.
7330
7331 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7332
7333 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7334 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7335 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7336 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7337 typeck2.c: Include coretypes.h and tm.h.
7338 * Make-lang.in: Update dependencies.
7339
7340 2002-11-30 Mark Mitchell <mark@codesourcery.com>
7341
7342 PR c++/8227
7343 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7344 (check_initializer): Validate the type of the initialized
7345 variable, even if the initializer is absent.
7346 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7347
7348 PR c++/8214
7349 * typeck.c (convert_for_assignment): Do not use
7350 decl_constant_value on the operand.
7351
7352 PR c++/8511
7353 * pt.c (instantiate_decl): Handle template friends defined outside
7354 of the class correctly.
7355
7356 2002-11-29 Joe Buck <jbuck@synopsys.com>
7357
7358 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7359 anonymous structs.
7360
7361 2002-11-29 Mark Mitchell <mark@codesourcery.com>
7362
7363 * class.c (walk_subobject_offsets): Recur on binfos as well as on
7364 types.
7365 (layout_nonempty_base_or_field): Pass it a binfo when processing a
7366 base class.
7367 (layout_empty_base): Likewise.
7368 (build_base_field): Likewise.
7369
7370 2002-11-27 Mark Mitchell <mark@codesourcery.com>
7371
7372 * class.c (build_base_field): Make sure we get the canonical base
7373 when descending through primary bases.
7374
7375 2002-11-26 Geoffrey Keating <geoffk@apple.com>
7376
7377 * decl.c (check_initializer): Don't error on initialisation of
7378 a scalar with a brace-enclosed expression.
7379
7380 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
7381
7382 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7383 (template_parms_equal): Remove prototype.
7384 * typeck.c (buuld_indirect_ref): Reformat.
7385
7386 2002-11-25 Jason Merrill <jason@redhat.com>
7387
7388 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7389 and a DO_STMT.
7390
7391 2002-11-25 Mark Mitchell <mark@codesourcery.com>
7392
7393 * tree.c (cp_build_qualified_type_real): Correct handling of
7394 array types.
7395 * class.c (walk_subobject_offsets): Fix thinko.
7396 (build_base_field): Record offsets of empty bases in primary
7397 virtual bases.
7398 (layout_class_type): Record offsets of empty bases in fields.
7399
7400 * search.c (is_subobject_of_p_1): Fix thinko.
7401 (lookup_field_queue_p): Likewise.
7402
7403 2002-11-24 Mark Mitchell <mark@codesourcery.com>
7404
7405 * class.c (layout_class_type): Reuse tail padding when laying out
7406 virtual bases.
7407
7408 2002-11-22 Mark Mitchell <mark@codesourcery.com>
7409
7410 * rtti.c (qualifier_flags): Fix thinko.
7411
7412 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7413
7414 Remove traditional C constructs 1/n.
7415 * cp-tree.h (init_method, set_mangled_name_for_decl,
7416 build_opfncall, hack_identifier, make_thunk, use_thunk,
7417 synthesize_method, implicitly_declare_fn,
7418 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7419 maybe_clone_body): Remove use of PARAMS.
7420
7421 * method.c (do_build_assign_ref, do_build_copy_constructor,
7422 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7423 Likewise.
7424 (synthesize_method): Use 'bool' type and constants instead of
7425 'int'.
7426 (locate_copy): Likewise.
7427 (implicitly_declare_fn): Likewise.
7428
7429 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7430 Remove old-style declaration.
7431 (maybe_clone_body): Use 'bool' type and constants.
7432
7433 2002-11-21 Glen Nakamura <glen@imodulo.com>
7434
7435 PR c++/8342
7436 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7437 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7438 of the branches of a COND_EXPR.
7439
7440 2002-11-19 Mark Mitchell <mark@codesourcery.com>
7441
7442 * pt.c (for_each_template_parm): Free allocated memory.
7443 * search.c (is_subobject_of_p_1): New function.
7444 (is_subobject_of_p): Avoid walking virtual bases multiple times.
7445
7446 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7447
7448 * g++spec.c (lang_specific_spec_functions): New.
7449
7450 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
7451
7452 * ChangeLog: Follow spelling conventions.
7453 * class.c: Likewise.
7454 * decl2.c: Likewise.
7455
7456 2002-11-14 Zack Weinberg <zack@codesourcery.com>
7457
7458 * search.c (dfs_push_decls): Do not try to reorder elements
7459 3..n of method_vec if method_vec has only two elements.
7460 Reverse order of two tests to avoid accessing unallocated
7461 memory.
7462
7463 2002-11-14 Mark Mitchell <mark@codesourcery.com>
7464
7465 * class.c (dfs_find_final_overrider): Adjust so that the most
7466 derived object is a binfo, rather than a class type.
7467 (find_final_overrider): Likewise.
7468 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7469 (add_vcall_offset): Likewise.
7470
7471 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7472
7473 PR c++/8389
7474 * pt.c (instantiate_template): Push class scope for member
7475 functions.
7476 (get_mostly_instantiated_function_type): Likewise. Don't call
7477 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
7478 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7479 * mangle.c (write_encoding, write_unqualified_name): Adjust.
7480
7481 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7482
7483 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7484 vcall offfsets. Split out ...
7485 (add_vcall_offset): ... new function.
7486
7487 PR c++/8338
7488 * pt.c (for_each_template_parm): Add htab parameter.
7489 (process_partial_specialization): Adjust call.
7490 (push_template_decl_real): Likewise.
7491 (pair_fn_data): Add visited.
7492 (for_each_template_parm_r): Avoid walking duplicates more than
7493 once.
7494 (uses_template_parms): Adjust call to for_each_template_parm.
7495
7496 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7497
7498 * class.c (add_implicitly_declared_members): Put implicitly
7499 declared functions at the end of TYPE_METHODs when -fabi-version
7500 is at least 2.
7501
7502 2002-11-05 Geoffrey Keating <geoffk@apple.com>
7503
7504 * decl2.c (finish_file): Correct spelling.
7505
7506 2002-11-03 Mark Mitchell <mark@codesourcery.com>
7507
7508 * call.c (build_special_member_call): Do not try to lookup VTTs by
7509 name.
7510 * class.c (vtbl_init_data): Add generate_vcall_entries.
7511 (get_vtable_decl): Do not look up virtual tables by name.
7512 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7513 (set_primary_base): Do not set CLASSTYPE_RTTI.
7514 (determine_primary_base): Likewise.
7515 (get_matching_virtual): Remove.
7516 (get_vcall_index): New function.
7517 (update_vtable_entry_for_fn): Do not try to use virtual thunks
7518 when they are not required. Assign vcall indices at this point.
7519 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7520 Do update dynamic_classes.
7521 (build_vtt): Do not add VTTs to the symbol table.
7522 (build_ctor_vtbl_group): Likewise.
7523 (build_vtbl_initializer): Simplify handling of vcall indices.
7524 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7525 for the most derived class.
7526 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7527 the vtable.
7528 * cp-tree.h (dynamic_classes): New macro.
7529 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
7530 (CLASSTYPE_RTTI): Remove.
7531 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7532 (CLASSTYPE_VCALL_INDICES): New macro.
7533 (CLASSTYPE_VTABLES): Likewise.
7534 (BV_USE_VCALL_INDEX_P): Remove.
7535 (build_vtable_path): Remove.
7536 * decl2.c (finish_vtable_vardecl): Remove.
7537 (key_method): Remove #if 0'd code.
7538 (finish_vtable_vardecl): Rename to ...
7539 (maybe_emit_vtables): ... this.
7540 (finish_file): Use it.
7541 * search.c (look_for_overrides_here): Update comment.
7542
7543 2002-11-01 Zack Weinberg <zack@codesourcery.com>
7544
7545 PR c/7353 redux
7546 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7547
7548 2002-10-30 Jason Merrill <jason@redhat.com>
7549
7550 PR c++/8186
7551 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7552 * call.c (convert_for_arg_passing): Set it.
7553 * except.c (stabilize_throw_expr): Recurse for such an arg.
7554
7555 2002-10-31 Mark Mitchell <mark@codesourcery.com>
7556
7557 * cp-tree.h (lang_decl_flags): Remove init_priority.
7558 (lang_decl): Add delta.
7559 (GLOBAL_INIT_PRIORITY): Remove.
7560 (THUNK_DELTA): Revise definition.
7561 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7562 * dump.c (cp_dump_tree): Don't dump it.
7563
7564 2002-10-30 Mark Mitchell <mark@codesourcery.com>
7565
7566 PR c++/8160
7567 * typeck2.c (process_init_constructor): Call complete_array_type.
7568
7569 PR c++/8149
7570 * decl.c (make_typename_type): Issue errors about invalid results.
7571
7572 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7573
7574 Core issue 287, PR c++/7639
7575 * cp-tree.h (lang_type_class): Add decl_list field.
7576 (CLASSTYPE_DECL_LIST): New macro.
7577 (maybe_add_class_template_decl_list): Add declaration.
7578 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7579 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7580 (maybe_add_class_template_decl_list): New function.
7581 (add_implicitly_declared_members): Use it.
7582 * decl.c (maybe_process_template_type_declaration): Likewise.
7583 (pushtag): Likewise.
7584 * friend.c (add_friend): Likewise.
7585 (make_friend_class): Likewise.
7586 * semantics.c (finish_member_declaration): Likewise.
7587 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7588 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7589 to process members and friends in the order of declaration.
7590
7591 2002-10-29 Mark Mitchell <mark@codesourcery.com>
7592
7593 PR c++/8287
7594 * decl.c (finish_destructor_body): Create the label to jump to
7595 when returning from a destructor here.
7596 (finish_function_body): Rather than here.
7597
7598 2002-10-25 Zack Weinberg <zack@codesourcery.com>
7599
7600 PR c++/7266
7601 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7602 SCOPE_REF is not null before dereferencing it.
7603
7604 2002-10-25 Mark Mitchell <mark@codesourcery.com>
7605
7606 * call.c (build_over_call): Use DECL_CONTEXT, not
7607 DECL_VIRTUAL_CONTEXT.
7608 * class.c (modify_vtable_entry): Don't mess with
7609 DECL_VIRTUAL_CONTEXT.
7610 (set_vindex): Remove.
7611 (set_primary_base): Remove vfuns_p parameter.
7612 (determine_primary_base): Likewise.
7613 (modify_all_vtables): Likewise.
7614 (layout_class_type): Likewise. Adjust calls to other functions
7615 accordingly.
7616 (finish_struct_1): Adjust calls to modified functions. Set
7617 DECL_VINDEX here.
7618 * cp-tree.h (lang_type_class): Remove vsize.
7619 (CLASSTYPE_VSIZE): Remove.
7620 (lang_decl): Remove thunks.
7621 (DECL_THUNKS): Adjust.
7622 (DECL_VIRTUAL_CONTEXT): Remove.
7623 (duplicate_decls): Don't copy it.
7624 * pt.c (build_template_decl): Don't set it.
7625 (tsubst_decl): Likewise.
7626 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7627
7628 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7629 (build_vtable_entry): Remove.
7630 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7631 (lang_decl): Add thunks.
7632 (DECL_THUNKS): New macro.
7633 * decl.c (duplicate_decls): Copy it.
7634 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7635 * semantics.c (emit_associated_thunks): Simplify.
7636
7637 2002-10-24 David Edelsohn <edelsohn@gnu.org>
7638
7639 PR c++/7228
7640 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7641 lang_type structure exists before accessing field.
7642 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7643 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7644 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7645 * class.c (check_field_decls): Use new macros.
7646 * typeck2.c (process_init_constructor): Remove redundant check for
7647 existence of lang_type structure.
7648
7649 2002-10-24 Mark Mitchell <mark@codesourcery.com>
7650
7651 * class.c (end_of_base): New method.
7652 (end_of_class): Use it. Check indirect virtual bases.
7653
7654 * class.c (check_field_decls): Fix typo.
7655
7656 2002-10-23 Mark Mitchell <mark@codesourcery.com>
7657
7658 PR c++/8067
7659 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7660 related variables.
7661
7662 PR c++/7679
7663 * spew.c (next_token): Do not return an endless stream of
7664 END_OF_SAVED_INPUT tokens.
7665 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7666 the cached token stream.
7667 (snarf_defarg): Likewise.
7668
7669 2002-10-23 Zack Weinberg <zack@codesourcery.com>
7670
7671 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7672 variably_modified_type_p.
7673 * cp-tree.h: Remove prototype of variably_modified_type_p.
7674 * tree.c (variably_modified_type_p): Remove; now implemented
7675 in language-independent code.
7676
7677 2002-10-22 Mark Mitchell <mark@codesourcery.com>
7678
7679 PR c++/6579
7680 * spew.c (snarf_parenthesized_expression): New function.
7681 (snarf_block): Use it.
7682
7683 2002-10-22 Richard Henderson <rth@redhat.com>
7684
7685 * method.c (use_thunk): Always compute vcall_value; assert that
7686 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
7687 for vcall thunks as well.
7688
7689 2002-10-21 Mark Mitchell <mark@codesourcery.com>
7690
7691 * class.c (empty_base_at_nonzero_offset_p): New function.
7692 (layout_nonempty_base_or_field): Do not check for conflicts when
7693 laying out a virtual base using the GCC 3.2 ABI.
7694 (build_base_field): Correct checking for presence of empty classes
7695 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7696
7697 * class.c (include_empty_classes): Use normalize_rli.
7698 (layout_class_type): Likewise.
7699
7700 * decl.c (reshape_init): Tweak handling of character arrays.
7701
7702 PR c++/8218
7703 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7704 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7705 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7706 (check_field_decls): Likewise.
7707 (layout_class_type): Likewise.
7708 (finish_struct_1): Initialize it.
7709 (walk_subobject_offsets): Use it to prune searches.
7710
7711 2002-10-20 Mark Mitchell <mark@codesourcery.com>
7712
7713 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7714 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7715 TARGET_ASM_OUTPUT_MI_THUNK in comments.
7716
7717 2002-10-18 Zack Weinberg <zack@codesourcery.com>
7718
7719 * decl.c (start_decl): Point users of the old initialized-
7720 typedef extension at __typeof__.
7721
7722 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7723
7724 * Make-lang.in (method.o): Depend on TARGET_H.
7725 * method.c (target.h): Include it.
7726 (use_thunk): Use target hooks. Use vcall thunks, if available.
7727
7728 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7729
7730 * class.c (base_derived_from): Make sure return value is a bool.
7731
7732 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7733
7734 * class.c (find_final_overrider_data_s): Remove overriding_fn and
7735 overriding_base.
7736 (dfs_base_derived_from): New function.
7737 (base_derived_from): Likewise.
7738 (dfs_find_final_overrider): Use base_derived_from.
7739 (find_final_overrider): Adjust.
7740
7741 2002-10-18 Jason Merrill <jason@redhat.com>
7742
7743 PR c++/8080
7744 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7745 with condition decls in a template.
7746
7747 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
7748
7749 * class.c (add_method): Compare template parms too.
7750
7751 2002-10-17 Mark Mitchell <mark@codesourcery.com>
7752
7753 PR c++/7584
7754 * class.c (handle_using_decl): Allow the declaration used to be
7755 from an ambiguous base.
7756
7757 * pt.c (convert_template_argument): Revert this change:
7758 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7759 * pt.c (convert_template_argument): Do not fold non-type
7760 template rguments when inside a template.
7761
7762 * init.c (expand_default_init): Handle brace-enclosed initializers
7763 correctly.
7764
7765 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7766
7767 * mangle.c (write_expression): Correct handling of enumeration
7768 constants.
7769 (write_template_arg): Likewise.
7770 * pt.c (convert_template_argument): Do not fold non-type template
7771 arguments when inside a template.
7772
7773 PR c++/7478
7774 * cvt.c (convert_to_reference): Allow references as the incoming
7775 type.
7776
7777 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7778
7779 PR c++/7524
7780 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7781 build_qualified_type.
7782
7783 2002-10-15 Richard Henderson <rth@redhat.com>
7784
7785 * error.c (dump_expr): Use real_to_decimal directly, and with
7786 the new arguments.
7787
7788 2002-10-15 Mark Mitchell <mark@codesourcery.com>
7789
7790 * decl.c (reshape_init): Fix typo.
7791
7792 * cp-tree.h (operator_name_info_t): Add arity.
7793 * lex.c (init_operators): Initialize it.
7794 * mangle.c (write_conversion_operator_name): New function.
7795 (write_unqualified_name): Use it.
7796 (write_template_args): Accept template arguments as a TREE_LIST.
7797 (write_expression): Adjust handling of qualified names to match
7798 specification.
7799
7800 2002-10-15 Jason Merrill <jason@redhat.com>
7801
7802 * call.c (call_builtin_trap): New fn.
7803 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
7804 (build_call): Don't set current_function_returns_abnormally outside
7805 a function.
7806
7807 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7808
7809 * class.c (check_field_decls): Remove empty_p parameter. Instead,
7810 clear CLASSTYPE_EMPTY_P.
7811 (build_base_field): Likewise.
7812 (build_base_fields): Likewise.
7813 (check_bases_and_members): Likewise.
7814 (create_vtbl_ptr): Likewise.
7815 (layout_class_type): Likewise. Ensure that empty classes have
7816 size zero when used as base classes in the 3.2 ABI.
7817 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7818 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
7819 parameter.
7820 (is_empty_class): Correct definition when using post-3.2 ABI.
7821 * cp-tree.h (lang_type_class): Add empty_p.
7822 (CLASSTYPE_EMPTY_P): New macro.
7823
7824 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
7825
7826 * init.c (build_delete): Do not apply save_expr for arrays.
7827 (build_vec_delete): Likewise.
7828
7829 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7830
7831 * decl.c (layout_var_decl): Call layout_decl even for variables
7832 whose type is an array with unspecified bounds.
7833
7834 PR c++/7176
7835 * lex.c (do_identifier): Add another option for the parsing
7836 parameter.
7837 * parse.y (do_id): Use it.
7838
7839 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
7840
7841 PRs C++/6803, C++/7721 and C++/7803
7842 * decl.c (grokdeclarator): Gracefully handle template-name as
7843 decl-specifier.
7844
7845 2002-10-11 Jason Molenda <jmolenda@apple.com>
7846
7847 * init.c (build_field_list): Provide uses_unions_p with a default
7848 value.
7849
7850 2002-10-11 Mark Mitchell <mark@codesourcery.com>
7851
7852 PR c++/5661
7853 * cp-tree.h (variably_modified_type_p): New function.
7854 (grokdeclarator) Tighten check for variably modified types as
7855 fields.
7856 * pt.c (convert_template_argument): Do not allow variably modified
7857 types as template arguments.
7858 * tree.c (variably_modified_type_p): New function.
7859
7860 * NEWS: Document removal of "new X = ..." extension.
7861 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7862 brace-enclosed initializers.
7863 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7864 (initialize_local_var): Remove declaration.
7865 (expand_static_init): Likewise.
7866 * decl.c (next_initializable_field): New function.
7867 (reshape_init): Likewise.
7868 (check_initializer): Use them. Build dynamic initializer for
7869 aggregates here too.
7870 (initialize_local_var): Simplify, and incorporate cleanup
7871 insertion code as well.
7872 (destroy_local_var): Remove.
7873 (cp_finish_decl): Tidy.
7874 (expand_static_init): Fold checks for whether or not a variable
7875 needs initialization into this function. Simplify.
7876 * decl2.c (do_static_initialization): Simplify.
7877 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7878 be done for us automatically.
7879 (expand_default_init): Handle brace-enclosed initializers
7880 correctly.
7881 (expand_aggr_init_1): Remove RTL-generation code.
7882 (build_vec_init): Remove "new X = ..." support.
7883 * parse.y (new_initializer): Likewise.
7884 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7885 brace-enclosed initializer.
7886 (create_pseudo_type_info): Likewise.
7887 * typeck2.c (store_init_value): Don't try to handle digest_init
7888 being called more than once.
7889 (digest_init): Tidy handling of brace-enclosed initializers.
7890
7891 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7892
7893 * decl.c (typename_hash): Use htab_hash_pointer.
7894
7895 2002-10-10 Jim Wilson <wilson@redhat.com>
7896
7897 * decl.c (duplicate_decls): Don't call decl_attributes.
7898
7899 2002-10-09 Zack Weinberg <zack@codesourcery.com>
7900
7901 PR c/7353
7902 * decl.c (start_decl): Unconditionally issue error for
7903 'typedef foo = bar'.
7904 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7905 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7906
7907 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7908
7909 * decl2.c (prune_vtable_vardecl): Delete unused function.
7910
7911 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7912
7913 PR c++/7754
7914 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7915 procesing template functions.
7916 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7917 type. Call layout_decl.
7918 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7919
7920 2002-10-07 Richard Henderson <rth@redhat.com>
7921
7922 * decl2.c, pt.c: Revert c++/7754 fix.
7923
7924 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7925
7926 PR c++/7804
7927 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7928
7929 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7930
7931 PR c++/7931
7932 * pt.c (for_each_template_parm_r): Handle BASELINKs.
7933
7934 PR c++/7754
7935 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7936 procesing template functions.
7937 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7938 type. Call layout_decl.
7939 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7940
7941 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7942
7943 PR c++/8006
7944 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7945 template parameters.
7946 (globals): Add entity and need_abi_warning.
7947 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7948 CLASSTYPE_TEMPLATE_INFO.
7949 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7950 TYPE_TI_TEMPLATE.
7951 (write_prefix): Handle typename types correctly.
7952 (write_template_prefix): Handle template template parameters
7953 correctly.
7954 (start_mangling): Add entity parameter.
7955 (finish_mangling): Warn about names whose mangling will change.
7956 (mangle_decl_string): Adjust.
7957 (mangle_type_string): Likewise.
7958 (mangle_special_for_type): Likewise.
7959 (mangle_ctor_vtbl_for_type): Likewise.
7960 (mangle_thunk): Likewise.
7961 (mangle_guard_variable): Likewise.
7962 (mangle_ref_init_variable): Likewise.
7963
7964 2002-10-02 Mark Mitchell <mark@codesourcery.com>
7965
7966 PR c++/7188.
7967 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7968 * cp-tree.h (emit_base_init): Rename to ....
7969 (emit_mem_initializers): ... this.
7970 (expand_member_init): Change prototype.
7971 * init.c (perform_member_init): Compute explicit, rather than
7972 requiring it as a parameter.
7973 (sort_member_init): Rename to ...
7974 (sort_mem_initializers): ... this. Process bases and data members
7975 together.
7976 (sort_base_init): Remove.
7977 (emit_base_init): Rename to ...
7978 (emit_mem_initializers): ... this.
7979 (expand_aggr_vbase_init_1): Remove.
7980 (construct_virtual_bases): Rename to ...
7981 (construct_virtual_base): ... this.
7982 (expand_member_init): Rework handling of base initializers.
7983 * method.c (do_build_copy_constructor): Use
7984 finish_mem_initializers.
7985 * parse.y (member_init): Adjust calls to expand_member_init.
7986 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7987 (tsubst_initializer_list): Use expand_member_init.
7988 * semantics.c (finish_mem_intiailizers): Simplify.
7989
7990 2002-10-02 Matt Austern <austern@apple.com>
7991 * decl.c (walk_vtables_r): Fixed typo that caused result to
7992 never get a nonzero value.
7993
7994 2002-10-02 Roger Sayle <roger@eyesopen.com>
7995
7996 PR optimization/6627
7997 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7998 from here, and move it to tree.h.
7999 * decl.c (cxx_init_decl_processing): If storing the vbit
8000 in function pointers, ensure that force_align_functions_log
8001 is atleast one.
8002
8003 2002-10-02 Matt Austern <austern@apple.com>
8004
8005 * class.c (check_field_decls): Changed warning about const member
8006 variables so that it doesn't get issued for a class aggregate.
8007
8008 2002-10-01 Mark Mitchell <mark@codesourcery.com>
8009
8010 * decl.c (cp_finish_decl): Make sure array types are laid out,
8011 even if the array bounds are unknown.
8012
8013 2002-10-01 Steve Ellcey <sje@cup.hp.com>
8014
8015 * class.c (build_vtbl_initializer): Change build_c_cast
8016 to build1.
8017
8018 2002-10-01 Mark Mitchell <mark@codesourcery.com>
8019
8020 * decl.c (cp_finish_decl): Make sure array types are laid out,
8021 even if the array bounds are unknown.
8022
8023 * decl.c (cp_finish_decl): Correct check for dynamic
8024 initialization of thread-local storage.
8025
8026 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
8027
8028 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
8029 overloaded.
8030
8031 2002-09-30 Steve Ellcey <sje@cup.hp.com>
8032
8033 * class.c (build_vtbl_initializer): Add cast.
8034 (add_vcall_offset_vtbl_entries_1):
8035 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
8036
8037 2002-09-30 Mark Mitchell <mark@codesourcery.com>
8038
8039 * class.c (walk_subobject_offsets): Correct the calculation of
8040 offsets for virtual bases. Correct the counting of array
8041 elements.
8042 (layout_nonempty_base_or_field): Simplify. Correct the
8043 calculation of offsets to be propagated through the binfo
8044 hierarchy.
8045 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
8046 Add the FIELD_DECL to TYPE_FIELDS.
8047 (build_base_fields): Adjust accordingly.
8048 (layout_virtual_bases): Use build_base_field.
8049 (end_of_class): Return a tree, not an integer.
8050 (warn_about_ambiguous_direct_bases): Rename to ...
8051 (warn_about_ambiguous_bases): ... this.
8052 (include_empty_classes): New function.
8053 (layout_class_type): Create an alternative version of the type to
8054 be used when as a base class type. Do not call
8055 finish_record_layout until we are done laying out the class.
8056 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
8057 as_base.
8058 (CLASSTYPE_SIZE): Reimplement.
8059 (CLASSTYPE_SIZE_UNIT): Likewise.
8060 (CLASSTYPE_ALIGN): Likweise.
8061 (CLASSTYPE_USER_ALIGN): Likewise.
8062 (CLASSTYPE_AS_BASE): New macro.
8063 (DECL_INITIALIZED_P): Likewise.
8064 (extract_init): Remove prototype.
8065 (build_forced_zero_init): Rename to ...
8066 (build_zero_init): ... this.
8067 (force_store_init_value): Remove.
8068 * decl.c (obscure_complex_init): Remove.
8069 (duplicate_decls): Copy DECL_INITIALIZED_P.
8070 (check_initializer): Do not leave junk in DECL_INITIAL.
8071 (cp_finish_decl): Handle zero-initialization of entities with
8072 static storage duration.
8073 * expr.c (extract_init): Remove.
8074 * init.c (build_forced_zero_init): Remove.
8075 (build_zero_init): New function.
8076 (build_default_init): Use it.
8077 (build_field_list): Skip FIELD_DECLs for base subobjects.
8078 (push_base_cleanups): Likewise.
8079 * method.c (do_build_assign_ref): Likewise.
8080 (synthesize_exception_spec): Likewise.
8081 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
8082 (regenerate_decl_from_template): To not set DECL_INITIAL for a
8083 static data member whose initialization took place in its class.
8084 (instantiate_decl): Do not pass an initializer to cp_finish_decl
8085 in that situation.
8086 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
8087 (dfs_unuse_fields): Likewise.
8088 * tree.c (pod_type_p): Handle error_mark_node.
8089 (zero_init_p): Likewise.
8090 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
8091 subobjects.
8092 * typeck2.c (store_init_value): Remove #if 0'd code.
8093 (force_store_init_value): Remove.
8094 (process_init_constructor): Use build_zero_init.
8095
8096 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
8097
8098 PR c++/7788
8099 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
8100
8101 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
8102
8103 * cp-tree.h: Fix comment typos.
8104 * decl.c: Likewise.
8105 * pt.c: Likewise.
8106
8107 2002-09-25 Mark Mitchell <mark@codesourcery.com>
8108
8109 * cp/class.c (contains_empty_class_p): New method.
8110 (walk_subobject_offsets): Correct computation of field offset.
8111 (layout_empty_base): Correct placement of emtpy base classes.
8112 (layout_class_type): Warn about ABI changes.
8113
8114 2002-09-23 Mark Mitchell <mark@codesourcery.com>
8115
8116 * cp/class.c (layout_virtual_bases): Do not round the size of the
8117 type to a multiple of the alignment before laying out virtual bases.
8118 (layout_class_type): Correct handling of bit-fields that are wider
8119 than their type inside unions. Round the size of the type to a
8120 even number of bytes when computing the size without virtual
8121 bases.
8122 * cp/cp-tree.h (abi_version_at_least): New macro.
8123
8124 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
8125
8126 * ChangeLog: Follow spelling conventions.
8127 * ChangeLog.2: Likewise.
8128 * call.c: Likewise.
8129 * class.c: Likewise.
8130 * cp-tree.h: Likewise.
8131 * cvt.c: Likewise.
8132 * decl.c: Likewise.
8133 * decl2.c: Likewise.
8134 * except.c: Likewise.
8135 * friend.c: Likewise.
8136 * g++spec.c: Likewise.
8137 * init.c: Likewise.
8138 * lex.c: Likewise.
8139 * mangle.c: Likewise.
8140 * method.c: Likewise.
8141 * operators.def: Likewise.
8142 * optimize.c: Likewise.
8143 * pt.c: Likewise.
8144 * rtti.c: Likewise.
8145 * search.c: Likewise.
8146 * semantics.c: Likewise.
8147 * spew.c: Likewise.
8148 * tree.c: Likewise.
8149 * typeck.c: Likewise.
8150
8151 2002-09-18 Devang Patel <dpatel@apple.com>
8152
8153 * cp/cp-tree.h: New prototype for walk_vtabls().
8154 * cp/decl.c (walk_vtables_r): New function.
8155 (struct cp_binding_level): Add new members, namespaces,
8156 names_size and vtables.
8157 (add_decl_to_level): Add decl in namespaces or vtables
8158 chain, if conditions match.
8159 (walk_vtables): New function.
8160 (walk_namespaces_r): Travers separate namespace chain
8161 for namespace decls.
8162 (wrapup_globals_for_namespace): Use names_size instead
8163 of list_length().
8164 * cp/decl2.c (finish_file): Use walk_vtables() instead of
8165 walk_globals() to walk vtable decls.
8166
8167 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
8168
8169 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
8170 ICE with invalid pointers & references.
8171
8172 2002-09-17 Zack Weinberg <zack@codesourcery.com>
8173
8174 * Make-lang.in: Remove all references to the demangler.
8175 * cxxfilt.c: Moved to binutils.
8176
8177 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8178
8179 PR c++/7718
8180 * pt.c (tsubst_decl): Remove assert.
8181
8182 Remove DR 295 implementation.
8183 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
8184 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
8185 about ignoring volatile qualifiers.
8186
8187 * search.c (lookup_member): Correct documentation.
8188
8189 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8190
8191 * cp-tree.h (union lang_tree_node): Add chain_next option.
8192
8193 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
8194
8195 * parse.y (parse_finish_call_expr): Check lookup_member result.
8196
8197 PR c++/7015
8198 * semantic.c (finish_asm_stmt): Fix operand/output_operands
8199 thinko.
8200 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
8201
8202 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
8203
8204 PR c++/7919
8205 * call.c (build_over_call): Convert this pointer for fns found by
8206 using decls.
8207
8208 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8209
8210 * ChangeLog: Follow spelling conventions.
8211 * ChangeLog.1: Likewise.
8212
8213 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
8214
8215 PR c++/7768
8216 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
8217
8218 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
8219
8220 * error.c: Fix comment formatting.
8221 * except.c: Likewise.
8222 * expr.c: Likewise.
8223 * friend.c: Likewise.
8224 * g++spec.c: Likewise.
8225 * init.c: Likewise.
8226 * lex.c: Likewise.
8227 * mangle.c: Likewise.
8228 * method.c: Likewise.
8229 * optimize.c: Likewise.
8230 * pt.c: Likewise.
8231 * rtti.c: Likewise.
8232 * search.c: Likewise.
8233 * semantics.c: Likewise.
8234 * spew.c: Likewise.
8235 * tree.c: Likewise.
8236 * typeck.c: Likewise.
8237 * typeck2.c: Likewise.
8238
8239 2002-09-13 Matt Austern <austern@apple.com>
8240
8241 PR C++/7828
8242 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
8243 * cp/call.c: Change call-by-const-reference mechanism to use
8244 non_cast_lvalue_p when deciding whether the create a temporary.
8245 We need a temporary when passing, e.g. (long) x by const ref.
8246
8247 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
8248
8249 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
8250
8251 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
8252
8253 * decl.c: Fix comment formatting.
8254 * decl2.c: Likewise.
8255
8256 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
8257
8258 * call.c: Fix comment formatting.
8259 * class.c: Likewise.
8260 * cp-lang.c: Likewise.
8261 * cp-tree.h: Likewise.
8262 * cvt.c: Likewise.
8263
8264 2002-09-11 Zack Weinberg <zack@codesourcery.com>
8265
8266 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8267 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8268 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8269 minor adjustments (use version_string, eliminate yet another
8270 duplicate of xmalloc)
8271
8272 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8273
8274 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8275
8276 2002-09-05 Jason Merrill <jason@redhat.com>
8277
8278 * typeck2.c (add_exception_specifier): Only pedwarn for an
8279 incomplete type.
8280 (require_complete_eh_spec_types): New fn.
8281 (cxx_incomplete_type_diagnostic): Also support pedwarning.
8282 * typeck.c (complete_type_or_diagnostic): Likewise.
8283 * call.c (build_call): Call require_complete_eh_spec_types.
8284 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8285 on an incomplete type.
8286
8287 2002-09-04 Jakub Jelinek <jakub@redhat.com>
8288
8289 * decl.c (start_cleanup_fn): Clear interface_only before
8290 start_function, restore it afterwards.
8291
8292 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
8293
8294 * cp-tree.h (finish_builtin_type): Remove.
8295 * decl2.c (finish_builtin_type): Move to common code.
8296 * decl.c (build_ptrmemfunc_type): Adjust.
8297 * rtti.c (create_pseudo_type_info): Adjust.
8298 (create_tinfo_types): Adjust.
8299
8300 2002-08-31 Jason Merrill <jason@redhat.com>
8301
8302 * cp-lang.c (cp_expr_size): Allow initialization from a
8303 CONSTRUCTOR.
8304
8305 2002-08-30 Richard Henderson <rth@redhat.com>
8306
8307 PR opt/7515
8308 * tree.c: Include target.h.
8309 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8310 don't bind locally.
8311 * Makefile.in (tree.o): Update.
8312
8313 2002-08-27 Mark Mitchell <mark@codesourcery.com>
8314
8315 * class.c (layout_virtual_bases): Warn about bugs in G++ that
8316 result in incorrect object layouts.
8317 (layout_class_type): Likewise.
8318
8319 2002-08-24 Matt Austern <austern@apple.com>
8320
8321 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8322 are allowable.
8323 (real_lvalue_p): Update caller.
8324 (lvalue_p): Ditto.
8325 (non_cast_lvalue_or_else): New.
8326 * tree.h: Declare it.
8327 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8328
8329 2002-08-22 Mark Mitchell <mark@codesourcery.com>
8330
8331 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8332 and COND_EXPR specially; fix error message output.
8333
8334 2002-08-22 Jason Merrill <jason@redhat.com>
8335
8336 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8337 * semantics.c (nullify_returns_r): Likewise.
8338
8339 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
8340
8341 Fix PR/7621
8342 * typeck.c (finish_class_member_access_expr): Diagnose cases where
8343 name lookup finds nothing.
8344
8345 2002-08-15 Jason Merrill <jason@redhat.com>
8346
8347 * semantics.c (finish_then_clause): Remove redundant assignment.
8348 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8349 extra binding level outside the if/switch statement.
8350 (finish_while_cond, finish_for_cond): Rewrite complex condition
8351 into the loop body.
8352
8353 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
8354
8355 * parse.y (sizeof, alignof, typeof): New non-terminals to
8356 increment skip_evaluation. Replace terminals with them and
8357 decrement skip_evaluation at the end of rules using them.
8358 * decl2.c (mark_used): Don't assemble_external if
8359 skipping evaluation.
8360
8361 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
8362
8363 Fix PR/7504
8364 * parse.y (parse_finish_call_expr): Handle incomplete
8365 type used to name a scope.
8366
8367 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
8368
8369 PR c++/7598
8370 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8371 regression caused by my 2002-08-08 patch.
8372
8373 2002-08-13 Mark Mitchell <mark@codesourcery.com>
8374
8375 * decl.c (pushdecl_class_level): Honor requests to bind names to
8376 OVERLOADs.
8377
8378 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8379
8380 * decl2.c (build_call_from_tree): Fix uninitialized variable.
8381 * parse.y (parse_finish_call_expr): Likewise.
8382 * repo.c (old_args, old_dir, old_main): Const-ify.
8383
8384 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
8385
8386 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8387 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8388 * optimize.c (maybe_clone_body): Likewise.
8389 * pt.c (tsubst_enum): Likewise.
8390 (lookup_template_class): Likewise.
8391 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8392
8393 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
8394
8395 * lang-specs.h: Remove -ansi.
8396
8397 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
8398
8399 * tree.c (maybe_dummy_object): Replace // with /* */
8400
8401 2002-08-09 Mark Mitchell <mark@codesourcery.com>
8402
8403 * call.c (standard_conversion): Use build_ptrmem_type.
8404 * cp-tree.h (build_ptrmem_type): New function.
8405 (adjust_result_of_qualified_name_lookup): Likewise.
8406 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8407 static data members.
8408 (build_ptrmem_type): New function.
8409 (grokdeclarator): Do not use build_offset_type when encountering a
8410 qualified name.
8411 * parse.y (parse_finish_call_expr): Use
8412 adjust_result_of_qualified_name_lookup.
8413 * search.c (adjust_result_of_qualified_name_lookup): New function.
8414 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8415 accessing OFFSET_TYPEs directly.
8416
8417 2002-08-08 Mike Stump <mrs@apple.com>
8418
8419 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8420 (type_decays_to): Likewise.
8421 * class.c (find_final_overrider): Likewise.
8422 (maybe_note_name_used_in_class): Likewise.
8423 * decl.c (current_tmpl_spec_kind): Likewise.
8424 (add_binding): Likewise.
8425 (push_class_binding): Likewise.
8426 (duplicate_decls): Likewise.
8427 (layout_var_decl): Likewise.
8428 (grokfndecl): Likewise.
8429 (grokdeclarator): Likewise.
8430 (check_default_argument): Likewise.
8431 * decl2.c (handle_class_head): Likewise.
8432 * error.c (dump_template_decl): Likewise.
8433 * init.c (build_offset_ref): Likewise.
8434 * pt.c (check_specialization_scope): Likewise.
8435 (determine_specialization): Likewise.
8436 (check_explicit_specialization): Likewise.
8437 (maybe_check_template_type): Likewise.
8438 (process_partial_specialization): Likewise.
8439 (check_default_tmpl_args): Likewise.
8440 (push_template_decl_real): Likewise.
8441 (convert_template_argument): Likewise.
8442 (try_class_unification): Likewise.
8443 (get_bindings_real): Likewise.
8444 (do_decl_instantiation): Likewise.
8445 * semantics.c (begin_function_definition): Likewise.
8446 (finish_member_declaration): Likewise.
8447 (check_multiple_declarators): Likewise.
8448 * typeck.c (comp_array_types): Likewise.
8449 (comptypes): Likewise.
8450 (expr_sizeof): Likewise.
8451 (build_binary_op): Likewise.
8452 (dubious_conversion_warnings): Likewise.
8453 (check_return_expr): Likewise.
8454
8455 2002-08-08 Mark Mitchell <mark@codesourcery.com>
8456
8457 * typeck.c (build_class_member_access_expr): Do not return
8458 error_mark_node when no error has occurred.
8459
8460 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8461
8462 * typeck.c (build_component_addr): Remove.
8463 (build_unary_op): Just check it's not a bitfield, and then build
8464 an ADDR_EXPR.
8465
8466 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8467
8468 * class.c (convert_to_base): Correct check for error_mark_node.
8469 (create_vtable_ptr): Remove unused VFUNS_P parm.
8470
8471 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8472
8473 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8474
8475 2002-08-07 Mark Mitchell <mark@codesourcery.com>
8476
8477 Rework build_component_ref.
8478 * call.c (build_vfield_ref): Do not go through build_component_ref.
8479 (build_field_call): Use build_class_member_access_expr.
8480 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8481 (build_object_call): Likewise.
8482 * class.c (convert_to_base): New function.
8483 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8484 (instantiate_type): Handle BASELINKs.
8485 * cp-tree.def (BASELINK): New tree code.
8486 * cp-tree.h (BASELINK_P): Reimplement.
8487 (SET_BASELINK_P): Remove.
8488 (BASELINK_BINFO): Reimplement.
8489 (BASELINK_FUNCTIONS): Likewise.
8490 (BASELINK_ACCESS_BINFO): Likewise.
8491 (BASELINK_OPTYPE): Likewise.
8492 (convert_to_base): New function.
8493 (name_p): Likewise.
8494 (build_object_ref): Remove.
8495 (build_component_ref_1): Likewise.
8496 (build_component_ref): Likewise.
8497 (build_x_component_ref): Likewise.
8498 (build_class_member_access_expr): New function.
8499 (finish_class_member_access_expr): Likewise.
8500 (build_ptrmemfunc_access_expr): Likewise.
8501 * decl.c (grokdeclarator): Handle BASELINKs.
8502 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8503 finish_class_member_access_expr.
8504 (arg_assoc): Handle BASELINKs.
8505 (do_class_using_decl): Likewise.
8506 * error.c (dump_decl): Likewise.
8507 (dump_expr): Use build_ptrmemfunc_access_expr.
8508 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8509 destructors.
8510 (build_throw): Use BASELINK_FUNCTIONS.
8511 * init.c (perform_member_init): Use
8512 build_class_member_access_expr.
8513 (build_offset_ref): Handle BASELINKs. Use
8514 build_class_member_access_expr.
8515 * method.c (hack_identifier): Likewise.
8516 * parse.y (do_id): Use BASELINK, not TREE_LIST.
8517 (primary): Remove uses of build_object_ref.
8518 * pt.c (lookup_template_function): Handle BASELINKs.
8519 (resolve_overloaded_unification): Likewise.
8520 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8521 (lookup_field): Use BASELINK, not TREE_LIST.
8522 (lookup_fnfiels): Likewise.
8523 (setup_class_bindings): Likewise.
8524 * semantics.c (finish_object_call_expr): Do not use
8525 build_method_call when we already know what function is being
8526 called.
8527 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8528 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8529 TREE_CHAIN.
8530 (name_p): New function.
8531 * typeck.c (build_object_ref): Remove.
8532 (build_component_ref_1): Likewise.
8533 (build_x_component_ref): Likewise.
8534 (build_class_member_access_expr): New function.
8535 (finish_class_member_access_expr): Likewise.
8536 (build_ptrmemfunc_access_expr): Likewise.
8537 (get_member_function_from_ptrfunc): Use
8538 build_ptrmemfunc_access_expr.
8539 (build_binary_op): Likewise.
8540 (build_unary_op): Likewise.
8541 (build_ptrmemfunc): Likewise.
8542 (pfn_from_ptrmemfunc): Likewise.
8543 * typeck2.c (build_m_component_ref): Adjust comment.
8544
8545 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
8546
8547 * Make-lang.in (CXX_C_OBJS): Update.
8548 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8549 * cp-tree.h (cxx_decode_option): Remove.
8550 * decl2.c (compare_options, lang_f_options, unsupported_options,
8551 cxx_decode_option): Remove.
8552
8553 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
8554
8555 * typeck.c (build_x_unary_op): Handle pointer-to-member.
8556
8557 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8558
8559 * class.c: Don't include obstack.h.
8560 (popclass):
8561 * decl2.c: Delete bogus comment.
8562 * error.c: Don't include obstack.h.
8563 * except.c: Likewise.
8564 (dump_type): Correct comment.
8565 * method.c: Don't include obstack.h.
8566 * tree.c: Likewise.
8567
8568 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
8569
8570 Fix PR/2213
8571 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8572 expressions to pointer-to-data-member of pointer-to-member-functions.
8573
8574 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8575
8576 * cvt.c (ocp_convert): Delete obsolete code.
8577 * parse.y (permanent_obstack): Delete declaration.
8578 * pt.c (permanent_obstack): Delete declaration.
8579 * repo.c (permanent_obstack): Delete declaration.
8580 (open_repo_file): Use xmalloc instead of permanent_obstack.
8581 (init_repo): Use xstrdup instead of permanent_obstack.
8582
8583 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
8584
8585 * cp-tree.h (VF_DERIVED_VALUE): Remove.
8586 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8587
8588 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
8589
8590 PR 7470.
8591 C++ ABI change - vfunc ordering.
8592 * class.c (add_virtual_function): Remove.
8593 (dfs_modify_all_vtables): Take list of all declared
8594 virtuals. Assign all that are not in primary base.
8595 (check_for_override): Adjust comments.
8596 (create_vtable_ptr): Take single list of virtuals. Build chain
8597 of declared virtuals here.
8598 (layout_class_type): Take single list of virtuals. Adjust.
8599 (finish_struct_1): Keep virtuals on single list. Adjust.
8600
8601 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8602
8603 * init.c (build_member_call): Use build_new_method_call, not
8604 build_method_call.
8605
8606 2002-08-02 Krister Walfridsson <cato@df.lth.se>
8607
8608 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8609
8610 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8611
8612 * call.c (build_method_call): Issue a more helpful error message
8613 about ambiguous method names.
8614
8615 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
8616
8617 * tree.c (build_shared_int_cst): Make cache file scope, and
8618 GTY it.
8619
8620 2002-08-02 Jason Merrill <jason@redhat.com>
8621
8622 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8623 (cp_expr_size): New fn.
8624 * call.c (build_over_call): Lose empty class hackery.
8625 (convert_arg_to_ellipsis): Promote non-POD warning to error.
8626 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8627
8628 * semantics.c (expand_body): Do tree optimization in the function
8629 context, too.
8630
8631 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
8632
8633 * cp-tree.h: Move all warning and flag declarations to c-common.h.
8634 * decl.c: Move all warning and flag variables to c-common.c.
8635 * decl2.c: Move all warning and flag variables to c-common.c.
8636 * lex.c (flag_digraphs): Remove.
8637 (warn_traditional): Now in c-common.c.
8638
8639 2002-07-31 Mark Mitchell <mark@codesourcery.com>
8640
8641 * call.c (build_field_call): Do not look up the field by name.
8642 (build_method_call): Simplify.
8643 (struct z_candidate): Add access_path and conversion_path. Remove
8644 basetype_path.
8645 (convert_class_to_reference): Adjust use of
8646 add_function_candidate.
8647 (add_candidate): Add conversion_path argument.
8648 (add_function_candidate): Use it.
8649 (add_conv_dndidate): Likewise.
8650 (build_builtin_candidate): Likewise.
8651 (add_template_candidate_real): Add conversion_path argument.
8652 (add_template_conv_candidate): Likewise.
8653 (add_template_candidate): Likewise.
8654 (build_user_type_conversion_1): Use it.
8655 (build_new_function_call): Remove name lookup code. Adjust use of
8656 add_template_candidate and add_function_candidate.
8657 (build_new_op): Likewise.
8658 (convert_like_real): Use build_special_member_call.
8659 (build_over_call): Use cand->conversion_path.
8660 (build_special_member_call): New method.
8661 (build_new_method_call): Remove name lookup code.
8662 * cp-tree.def (OFFSET_REF): Update documentation.
8663 (TEMPLATE_ID_EXPR): Likewise.
8664 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8665 (BASELINK_OPTYPE): Likewise.
8666 (build_new_method_call): Adjust prototype.
8667 (build_special_member_call): New method.
8668 (build_baselink): New method.
8669 (build_offset_ref_call_from_tree): Likewise.
8670 (build_call_from_tree): Likewise.
8671 (finish_qualified_call_expr): Remove.
8672 (finish_call_expr): Adjust prototype.
8673 (build_x_function_call): Remove.
8674 * cvt.c (ocp_convert): Use build_special_member_call.
8675 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8676 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8677 CALL_EXPR.
8678 (build_offset_ref_call_from_tree): New function.
8679 (build_call_from_tree): Likewise.
8680 * init.c (expand_cleanup): Use build_special_member_call.
8681 (expand_default_init): Likewise.
8682 (build_member_call): Use finish_call_expr.
8683 (build_new_1): Use build_special_member_call.
8684 (push_base_cleanups): Likewise.
8685 * method.c (do_build_assign_ref): Likewise.
8686 * parse.y (template_id): Do not pass a COMPONENT_REF to
8687 lookup_template_function.
8688 (primary): Use parse_finish_call_epxr, not finish_call_expr.
8689 (parse_finish_call_expr): New function.
8690 * pt.c (lookup_template_function): Add assertions.
8691 * search.c (lookup_base): Allow T to be a binfo.
8692 (build_baselink): New function.
8693 (lookup_member): Use it.
8694 * semantics.c (finish_call_expr): Do not do name lookup.
8695 (finish_object_call_expr): Remove #if 0'd code.
8696 (finish_qualified_call_expr): Remove.
8697 * typeck.c (build_x_function_call): Remove.
8698 (build_static_case): Use build_special_member_call.
8699 * typeck2.c (build_functional_cast): Likewise.
8700
8701 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8702
8703 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8704
8705 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
8706
8707 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8708
8709 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
8710
8711 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8712 documentation.
8713
8714 2002-07-29 Alan Modra <amodra@bigpond.net.au>
8715
8716 * cp-tree.h: Comment typo fix.
8717
8718 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
8719
8720 * spew.c (space_for_token): Allocate zeroed memory for a new token
8721 chunk.
8722
8723 2002-07-27 Roger Sayle <roger@eyesopen.com>
8724
8725 * decl.c (builtin_function_1): No need to explicitly mark
8726 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8727
8728 2002-07-27 Roger Sayle <roger@eyesopen.com>
8729
8730 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8731
8732 2002-07-26 Jason Merrill <jason@redhat.com>
8733
8734 * call.c (build_over_call): Likewise.
8735 (cp_convert_parm_for_inlining): New fn.
8736 (convert_for_arg_passing): New fn.
8737 (convert_default_arg, build_over_call): Use it.
8738 (type_passed_as): New fn.
8739 * pt.c (tsubst_decl): Use it.
8740 * decl2.c (cp_build_parm_decl): New fn.
8741 (build_artificial_parm): Use it.
8742 (start_static_storage_duration_function): Likewise.
8743 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8744 (grokparms): Don't mess with DECL_ARG_TYPE.
8745 * typeck.c (convert_arguments): Use convert_for_arg_passing.
8746 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8747 Define.
8748 * cp-tree.h: Declare new fns.
8749
8750 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
8751
8752 * cp-tree.h (flag_operator_names): Remove.
8753 * decl2.c (flag_operator_names): Remove.
8754 (lang_f_options): Remove operator-names.
8755 * lex.c (D_OPNAME): Remove.
8756 (reswords): Remove operator names.
8757 (rid_to_yy): Remove operator names.
8758 (init_reswords): No need to handle D_OPNAME.
8759 * spew.c (read_process_identifier): There are no operator
8760 names.
8761
8762 2002-07-26 Jason Merrill <jason@redhat.com>
8763
8764 * dump.c (cp_dump_tree): Call c_dump_tree.
8765 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8766
8767 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8768
8769 * error.c (print_whitespace): Remove.
8770 * g++spec.c (LIBUNWIND): Move.
8771 * mangle.c (mangled_position, write_signed_number): Remove.
8772
8773 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8774
8775 * decl2.c (cxx_decode_option): Similarly.
8776
8777 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
8778
8779 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8780 (cxx_sizeof_or_alignof_type): Take a third argument.
8781 (cxx_sizeof): Adjust definition.
8782 (cxx_alignof): Likewise.
8783 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8784 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8785 complaining.
8786 (c_sizeof_nowarn): Remove definition.
8787 (build_unary_op): Use cxx_sizeof_nowarn.
8788
8789 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
8790
8791 * tree.c (cp_build_qualified_type_real): When copying
8792 pointer-to-method types, unshare the record that holds
8793 the cached pointer-to-member-function type.
8794
8795 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8796
8797 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8798
8799 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
8800
8801 Fix PR/7363:
8802 * typeck.c (cxx_sizeof_or_alignof_type): New function.
8803 (c_sizeof): Remove definition.
8804 (expr_sizeof): Use cxx_sizeof.
8805 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8806 * decl.c (finish_destructor_body): Use cxx_sizeof.
8807 * semantics.c (finish_alignof): Likewise.
8808 (finish_alignof): Use cxx_alignof.
8809 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8810 (cxx_sizeof_or_alignof_type): Declare.
8811 (my_friendly_assert): Move to ../c-common.h.
8812
8813 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8814
8815 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8816
8817 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8818
8819 PR c++/7347, c++/7348
8820 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8821 * decl.c (make_typename_type): Use it.
8822 (make_unbound_class_template): Likewise.
8823 (lookup_name_real): Don't call type_access_control if scope is
8824 template parameter dependent.
8825 * parse.y (template_arg): Call make_unbound_class_template with
8826 tf_parsing set.
8827 (nest_name_specifier): Call make_typename_type with tf_parsing set.
8828 (typename_sub0): Likewise.
8829 (typename_sub1): Likewise.
8830 (instantiate_decl): Push class scope.
8831 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8832 for both static variable and member function template.
8833 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8834 and arguments.
8835 * search.c (type_access_control): Do type access for TEMPLATE_DECL
8836 too.
8837
8838 2002-07-20 Roger Sayle <roger@eyesopen.com>
8839
8840 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8841 test by using positive_option. Make whitespace consistent.
8842
8843 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
8844
8845 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8846 members with 'locus'. Adjust use throughout.
8847 (struct feed): Likewise.
8848 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8849 Adjust use.
8850 (snarf_defarg): Use error(), not error_with_file_and_line().
8851
8852 2002-07-19 Chris Demetriou <cgd@broadcom.com>
8853
8854 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8855 cpp_options is included.
8856
8857 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8858
8859 PR c++/2862, c++/2863
8860 * pt.c (determine_specialization): Compare the length of
8861 TYPE_ARG_TYPES. Tidy.
8862
8863 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8864
8865 PR c++/3797
8866 * decl.c (duplicate_decls): Don't propagate inlining parameters from
8867 olddecl to newdecl when newdecl is a specialization of the
8868 instantiation olddecl.
8869
8870 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8871
8872 PR c++/4802, c++/5387
8873 * decl.c (make_typename_type): Use enforce_access.
8874
8875 2002-07-17 Scott Snyder <snyder@fnal.gov>
8876
8877 PR c++/7320
8878 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8879
8880 2002-07-12 Mark Mitchell <mark@codesourcery.com>
8881
8882 * class.c (add_method): Correct handling of conversion operators.
8883
8884 2002-07-11 Mark Mitchell <mark@codesourcery.com>
8885
8886 PR c++/7224
8887 * class.c (add_method): Simplify.
8888
8889 2002-07-11 Jason Merrill <jason@redhat.com>
8890
8891 PR c++/7279
8892 * tree.c (cp_copy_res_decl_for_inlining): Also copy
8893 TREE_ADDRESSABLE.
8894
8895 2002-07-10 Graham Stott <graham.stott@btinternet.com>
8896
8897 * pt.c (template_parm_this_level_p, push_template_decl_real):
8898 Pass depth as int pointer.
8899
8900 2002-07-11 Tim Josling <tej@melbpc.org.au>
8901
8902 Remove front end hard coding from gengtype.c.
8903
8904 * config-lang.in (gtfiles): Add files needed for this front end.
8905
8906 2002-07-10 Mark Mitchell <mark@codesourcery.com>
8907
8908 * cp-tree.h (unqualified_name_lookup_error): Declare it.
8909 (begin_function_definition): Adjust prototype.
8910 * lex.c (unqualified_name_lookup_error): New function, split out
8911 from ...
8912 (do_identifier): ... here.
8913 * parse.y (parse_begin_function_definition): New function.
8914 (fn.def1): Use it.
8915 * semantics.c (begin_function_definition): Accept decl-specifiers
8916 and attributes as separate parameters.
8917
8918 2002-07-10 Jason Merrill <jason@redhat.com>
8919
8920 PR c++/6255
8921 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8922 modifying the old one.
8923
8924 2002-07-09 Mark Mitchell <mark@codesourcery.com>
8925
8926 * cp-tree.h (constructor_name_p): Declare it.
8927 (check_template_template_default_arg): Likewise.
8928 * class.c (handle_using_decl): Use constructor_name_p.
8929 * decl.c (grokdeclarator): Likewise.
8930 * decl2.c (constructor_name_p): Define it.
8931 * init.c (build_member_call): Use constructor_name_p.
8932 * parse.y (template_parm): Use check_template_template_default_arg.
8933 * pt.c (check_explicit_specialization): Use constructor_name_p.
8934 * semantics.c (check_template_template_default_arg): New function.
8935
8936 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8937
8938 * pt.c (can_complete_type_without_circularity): Add static to
8939 function definition.
8940
8941 2002-07-08 Mark Mitchell <mark@codesourcery.com>
8942
8943 * cp-tree.h (have_extern_spec): Declare it
8944 * decl.c (have_extern_spec): Define it.
8945 (start_decl): Eliminate use of used_extern_spec.
8946 (start_function): Likewise.
8947 * parse.y (have_extern_spec): Remove declaration.
8948 (used_extern_spec): Likewise.
8949 (frob_specs): Eliminate use of used_extern_spec.
8950 (.hush_warning): Likewise.
8951
8952 2002-07-07 Mark Mitchell <mark@codesourcery.com>
8953
8954 * Make-lang.in (cp/parse.o): Depend on decl.h.
8955 * cp-tree.h (do_decl_instantiation): Change prototype.
8956 * parse.y: Include decl.h.
8957 (parse_decl_instantiation): New function.
8958 (explicit_instantiation): Use it.
8959 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8960 and DECLSPECS.
8961
8962 2002-07-07 Roger Sayle <roger@eyesopen.com>
8963
8964 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8965 constructor and destructor tests when passed a TEMPLATE_DECL.
8966
8967 2002-07-05 Jason Merrill <jason@redhat.com>
8968
8969 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8970 pointers.
8971
8972 PR optimization/7145
8973 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8974
8975 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
8976
8977 Repair damage on weak-impared targets caused by my previous patch.
8978 * cp-tree.h (import_export_tinfo): Add parameter.
8979 * decl2.c (import_export_tinfo): Add parameter, post adjust
8980 DECL_COMDAT.
8981 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8982 import_export_tinfo.
8983
8984 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8985
8986 PR c++/6944
8987 * init.c (build_aggr_init): Remove qualifiers of init before calling
8988 build_vec_init.
8989 (build_vec_init): Flatten multi-dimensional array during cleanup.
8990 (build_vec_delete_1): Abort if the type of each element is array.
8991
8992 2002-07-03 Graham Stott <graham.stott@btinternet.com>
8993
8994 * pt.c (instantiate_class_template): Fix typo.
8995
8996 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8997
8998 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8999 by CVS conflict in my last patch.
9000
9001 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9002
9003 PR c++/6716
9004 * pt.c (can_complete_type_without_circularity): New function.
9005 (instantiate_class_template): Use it.
9006 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
9007 message due to incomplete fields.
9008
9009 2002-07-01 Mark Mitchell <mark@codesourcery.com>
9010
9011 PR c++/7112
9012 * mangle.c (write_expression): Add mangling for sizeof when
9013 applied to a type.
9014 * operators.def: Remove stale comment.
9015
9016 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
9017
9018 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
9019 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
9020 (tinfo_decl_type): Replace with ...
9021 (type_info_ptr_type): ... this.
9022 (import_export_tinfo): Declare.
9023 (tinfo_decl_p): Rename to ...
9024 (unemitted_tinfo_decl_p): ... this.
9025 * decl2.c (import_export_decl): Break out tinfo handling into ...
9026 (import_export_tinfo): ... here. New function.
9027 (finish_file): Adjust.
9028 * rtti.c (TINFO_REAL_NAME): New macro.
9029 (init_rtti_processing): Create the tinfo types.
9030 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
9031 (get_tinfo_decl): Adjust.
9032 (get_tinfo_ptr): New function.
9033 (get_type_id): Use it.
9034 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
9035 (ptr_initializer): Use get_tinfo_ptr.
9036 (ptm_initializer): Likewise.
9037 (synthesize_tinfo_var): Break into ...
9038 (get_pseudo_ti_init): ... this. Just create the initializer.
9039 (get_pseudo_ti_desc): .. and this.
9040 (create_real_tinfo_var): Remove.
9041 (create_pseudo_type_info): Don't create the vtable decl here.
9042 (get_vmi_pseudo_type_info): Remove.
9043 (create_tinfo_types): Adjust.
9044 (tinfo_decl_p): Rename to ...
9045 (unemitted_tinfo_decl_p): ... here. Adjust.
9046 (emit_tinfo_decl): Adjust. Create the initializer.
9047
9048 2002-06-27 Mark Mitchell <mark@codesourcery.com>
9049
9050 PR c++/6695
9051 * pt.c (tsubst_friend_class): Substitute into the context of the
9052 friend before using it.
9053
9054 2002-06-26 Mark Mitchell <mark@codesourcery.com>
9055
9056 * cp-tree.h (xref_tag): Change prototype.
9057 (handle_class_head): Likewise.
9058 (build_x_component_ref): Likewise.
9059 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
9060 (xref_tag): Take attributes as a separate parameter.
9061 (xref_tag_from_type): Adjust call to xref_tag.
9062 * decl2.c (build_expr_from_tree): Adjust call to
9063 build_x_component_ref.
9064 (handle_class_head): Take attributes as a separate parameter.
9065 * parse.y (parse_xref_tag): New function.
9066 (parse_handle_class_head): Likewise.
9067 (primary): Use parse_xref_tag.
9068 (class_head_decl): Use parse_handle_class_head.
9069 (class_head_defn): Likewise.
9070 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
9071 (build_dynamic_cast_1): Likewise.
9072 (create_pseudo_type_info): Likewise.
9073 (emit_support_tinfos): Likewise.
9074 * typeck.c (build_object_ref): Adjust call to
9075 build_x_component_ref.
9076 (build_x_component_ref): Remove protect parameter.
9077
9078 2002-06-25 Mark Mitchell <mark@codesourcery.com>
9079
9080 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
9081 * class.c (handle_using_decl): Likewise.
9082 (instantiate_type): Likewise.
9083 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
9084 (xref_basetypes): Change prototype.
9085 (begin_mem_initializers): New function.
9086 (get_overloaded_fn): Likewise.
9087 * decl.c (xref_basetypes): Simplify.
9088 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
9089 * init.c (build_offset_ref): Likewise.
9090 * parse.y (base_init): Use begin_mem_initializers().
9091 (structsp): Adjust call to xref_basetypes.
9092 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
9093 (instantiate_class_template): Adjust call to xref_basetypes.
9094 * semantics.c (begin_mem_initializers): New function.
9095 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
9096 (really_overloaded_fn): Likewise.
9097 (get_overloaded_fn): New function.'
9098 (get_first_fn): USe BASELINK_FUNCTIONS.
9099
9100 2002-06-24 Mark Mitchell <mark@codesourcery.com>
9101
9102 * cp-tree.h (SCALAR_TYPE_P): New macro.
9103 (check_for_out_of_scope_variable): New function.
9104 (at_class_scope_p): Likewise.
9105 (finish_fname): Likewise.
9106 * class.c (finish_struct): Use at_function_scope_p.
9107 * decl.c (check_for_out_of_scope_variable): New function, split
9108 out from do_identifier.
9109 (finish_enum): Use at_function_scope_p.
9110 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
9111 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
9112 (primary): Use at_function_scope_p.
9113 * search.c (at_class_scope_p): New function.
9114 * semantics.c (finish_fname): Likewise.
9115 (check_multiple_declarators): Use at_function_scope_p.
9116
9117 2002-06-23 Mark Mitchell <mark@codesourcery.com>
9118
9119 * parse.y (parse_scoped_id): New function.
9120 (primary): Use it.
9121 * cp-tree.h (do_scoped_id): Adjust declaration.
9122 * lex.c (do_scoped_id): Remove call to yylex.
9123 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
9124 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
9125 expanding it inline.
9126
9127 2002-06-23 Matt Thomas <matt@3am-software.com>
9128
9129 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
9130 "#if VMS_TARGET".
9131
9132 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9133
9134 * mangle.c (integer_type_codes): Const-ify.
9135
9136 2002-06-20 Richard Henderson <rth@redhat.com>
9137
9138 PR c++/6747
9139 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
9140 Call put_var_into_stack.
9141
9142 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9143
9144 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
9145 array size calculation.
9146
9147 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9148
9149 PR c++/6892
9150 * pt.c (tsubst_expr): Handle FILE_STMT.
9151
9152 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9153
9154 PR c++/6723
9155 * pt.c (lookup_template_class): Don't build complete argument of
9156 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
9157 argument.
9158
9159 2002-06-19 Akim Demaille <akim@epita.fr>
9160
9161 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
9162 decl.h's TYPENAME.
9163 * spew.c, lex.c: Adjust.
9164 * parse.y (explicit_instantiation): Add empty action to override
9165 the default $$ = $1 where it introduces a type clash.
9166
9167 2002-06-14 Jason Merrill <jason@redhat.com>
9168
9169 * semantics.c (begin_for_stmt): Push the 'for' scope before
9170 adding the FOR_STMT.
9171
9172 C++ ABI changes.
9173 * class.c (build_base_field): Set DECL_PACKED.
9174 (layout_class_type): Don't use tail padding of PODs.
9175 * mangle.c (write_unqualified_name): Fix template conversion op
9176 mangling.
9177
9178 2002-06-16 Richard Henderson <rth@redhat.com>
9179
9180 PR opt/6793
9181 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
9182 after template instantiation.
9183
9184 2002-06-16 Richard Henderson <rth@redhat.com>
9185
9186 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
9187
9188 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
9189
9190 * cp-tree.h (compiler_error): Remove declaration.
9191 * lex.c (compiler_error): Remove definition.
9192
9193 2002-06-14 Steve Ellcey <sje@cup.hp.com>
9194
9195 * g++spec.c (LIBUNWIND): New.
9196 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
9197
9198 2002-06-13 Jessica Han <jessica@cup.hp.com>
9199
9200 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
9201 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
9202 (build_vbase_offset_vtbl_entries): Likewise.
9203 * rtti.c (build_headof): Likewise.
9204 (get_tinfo_decl_dynamic): Likewise.
9205 (create_pseudo_type_info): Likewise.
9206
9207 2002-06-12 Stan Shebs <shebs@apple.com>
9208
9209 * mpw-config.in: Remove file, no longer used.
9210 * mpw-make.sed: Ditto.
9211
9212 2002-06-07 Zack Weinberg <zack@codesourcery.com>
9213
9214 * decl2.c: Update call to cpp_handle_option.
9215
9216 2002-06-07 H.J. Lu (hjl@gnu.org)
9217
9218 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
9219
9220 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
9221
9222 * error.c (cp_error_at): Fix typo.
9223
9224 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
9225
9226 * error.c (cp_diagnostic_starter): Adjust call.
9227 (maybe_print_instantiation_context): Change prototype to take a
9228 'diagnostic_info *'.
9229 (print_instantiation_full_context): Likewise.
9230 (print_instantiation_partial_context): Likewise.
9231 (cp_diagnostic_starter): Likewise.
9232 (cp_diagnostic_finalizer): Likewise.
9233 (cp_print_error_function): Likewise.
9234 (cp_printer): Take a secondary parameter as a 'text_info *'.
9235 Remove output_state savings. Adjust calls.
9236
9237 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9238
9239 * pt.c (inline_parm_levels): Mark for GC.
9240
9241 * mangle.c (start_mangling): Allocate G.substitutions here...
9242 (init_mangle): ... rather than here.
9243 (finish_mangling): Clear the varray pointer when done with it.
9244 * spew.c (yylexstring): Don't use VARRAY_FREE.
9245 * search.c (bfs_walk): Don't use VARRAY_FREE.
9246 * decl2.c (pending_statics): Use gengtype to mark.
9247 (deferred_fns): Likewise.
9248 (ssdf_decls): Likewise.
9249 (init_decl2): Delete.
9250 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
9251 (cxx_init_decl_processing): Don't call init_decl2.
9252 (cxx_pop_function_context): Don't use VARRAY_FREE.
9253 * cp-tree.h (struct saved_scope): No need for special marking
9254 of varrays.
9255 (struct language_function): Likewise.
9256 (local_classes): Use gengtype to mark.
9257 (init_decl2): Delete prototype.
9258 * class.c (init_class_processing): Don't use
9259 ggc_add_tree_varray_root.
9260 (build_vtbl_initializer): Don't use VARRAY_FREE.
9261
9262 * decl.c (typename_compare): Don't use same_type_p.
9263
9264 * decl.c: Include hashtab.h instead of hash.h.
9265 (typename_hash): Update to use htab_h.
9266 (typename_compare): Likewise.
9267 (typename_htab): Use gengtype to mark.
9268 (build_typename_type): Update to use htab_h.
9269 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9270
9271 * Make-lang.in (gt-cp-tree.h): New rule.
9272 (cp/tree.o): Depend on gt-cp-tree.h.
9273 * config-lang.in (gtfiles): Add cp/tree.c.
9274 * tree.c: Include gt-cp-tree.h.
9275 (list_hash_table): Use gengtype to mark.
9276 (init_tree): Use gengtype to mark trees.
9277
9278 * Make-lang.in (cp/decl.o): Add debug.h dependency.
9279 * call.c (struct z_candidate): Use gengtype.
9280 (USER_CONV_CAND): Use WRAPPER_ZC.
9281 (convert_class_to_reference): Use build_zc_wrapper.
9282 (build_type_conversion_1): Likewise.
9283 (build_over_call): Use WRAPPER_ZC.
9284 (add_warning): Use build_zc_wrapper.
9285 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9286 * cp-tree.h (struct lang_identifier): Use gengtype.
9287 (struct template_parm_index_s): Likewise.
9288 (struct ptrmem_cst): Likewise.
9289 (struct tree_binding): Likewise.
9290 (struct tree_overload): Likewise.
9291 (struct tree_srcloc): Likewise.
9292 (struct tree_wrapper): Likewise. Also modify to have a pointer
9293 to struct z_candidate rather than void.
9294 (enum cp_tree_node_structure_enum): New.
9295 (union lang_tree_node): New.
9296 (cxx_mark_tree): Delete prototype.
9297 (cp_tree_node_structure): New prototype.
9298 (build_ptr_wrapper): Delete prototype.
9299 (build_int_wrapper): Delete prototype.
9300 (build_zc_wrapper): New prototype.
9301 * decl.c: Include debug.h
9302 (cxx_mark_tree): Delete.
9303 (cp_tree_node_structure): New.
9304 * tree.c (build_ptr_wrapper): Delete.
9305 (build_int_wrapper): Delete.
9306 (build_zc_wrapper): New.
9307
9308 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9309 Correct typo. Patch from k_fukui@highway.ne.jp.
9310
9311 * semantics.c (current_stmt_tree): Update for change to
9312 struct language_function.
9313 (finish_mem_initializers): Likewise.
9314 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9315 * cp-tree.h (struct language_function): Rename from
9316 cp_language_function. Change all uses.
9317 (cp_function_chain): Don't need to cast.
9318
9319 * class.c (duplicate_tag_error): Reset discriminator.
9320 (check_bases_and_members): Update for data structure changes.
9321 * cp-tree.h (struct lang_id2): Use gengtype.
9322 (flagged_type_tree): Likewise.
9323 (SET_LANG_ID): Use GGC on struct lang_id2.
9324 (struct cp_language_function): Use gengtype. Remove field
9325 'x_vcalls_possible_p'.
9326 (current_vcalls_possible_p): Delete.
9327 (struct lang_type_header): New.
9328 (struct lang_type_class): Rename from struct lang_type. Include
9329 struct lang_type_header.
9330 (struct lang_type_ptrmem): New.
9331 (struct lang_type): New.
9332 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
9333 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
9334 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9335 (struct lang_decl_flags): Use gengtype. Add discriminators.
9336 (struct lang_decl): Use gengtype. Add and use discriminators.
9337 Update the macros that reference moved fields.
9338 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
9339 (SET_DECL_THUNK_P): Set discriminator too.
9340 (clear_inline_text_obstack): Delete prototype.
9341 (finish_inline_definitions): Delete prototype.
9342 (mark_pending_inlines): Delete prototype.
9343 (lang_check_failed): New prototype.
9344 * decl.c (struct named_label_use_list): Use gengtype.
9345 (struct named_label_list): Likewise.
9346 (mark_binding_level): Delete.
9347 (mark_named_label_lists): Delete.
9348 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9349 (cxx_init_decl_processing): Use generated marker routine.
9350 (begin_destructor_body): Delete dead set to
9351 current_vcalls_possible_p.
9352 (mark_lang_function): Delete.
9353 (mark_cp_function_context): Delete.
9354 (lang_mark_tree): Use generated marker routines.
9355 * decl2.c (start_objects): Set discriminator when setting
9356 GLOBAL_INIT_PRIORITY.
9357 * lex.c (retrofit_lang_decl): Set discriminators.
9358 (copy_lang_type): Update for changes to lang_type structure.
9359 (cp_make_lang_type): Set discriminator.
9360 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
9361 * search.c: Include ggc.h.
9362 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9363 (finish_inline_definitions): Delete.
9364 * spew.c (struct token): Use gengtype.
9365 (struct token_chunk): New.
9366 (struct unparsed_text): Use gengtype. Store tokens in chunks.
9367 (struct feed): Use gengtype.
9368 (feed_obstack): Delete.
9369 (feed): Mark as GC root.
9370 (pending_inlines): Mark as GC root.
9371 (pending_inlines_tail): Likewise.
9372 (processing_these_inlines): Likewise.
9373 (token_obstack): Make static.
9374 (first_token): Likewise.
9375 (init_spew): Don't initialize deleted things; use gengtype for roots.
9376 (clear_inline_text_obstack): Delete.
9377 (feed_input): Use GC for struct feed. Update for changes to
9378 struct unparsed_text.
9379 (mark_pending_inlines): Delete.
9380 (next_token): Rename from add_token. Change all callers. Update
9381 for changes to struct unparsed_text.
9382 (space_for_token): New.
9383 (remove_last_token): New.
9384 (alloc_unparsed_text): New.
9385 (snarf_block): Take an unparsed_text. Update for changes to struct
9386 unparsed_text.
9387 (snarf_method): Update for changes to struct unparsed_text.
9388 (snarf_defarg): Update for changes to struct unparsed_text.
9389 * tree.c (lang_check_failed): New.
9390
9391 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9392 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9393 (cp/spew.o): Add dependency on gt-<filename>.h.
9394 (cp/decl2.o): Add dependency on gt-<filename>.h.
9395 (cp/call.o): Add dependency on gt-<filename>.h.
9396 (cp/pt.o): Add dependency on gt-<filename>.h.
9397 (cp/repo.o): Add dependency on gt-<filename>.h.
9398 (cp/parse.o): Add dependency on gt-<filename>.h.
9399 * call.c: Use gengtype for roots.
9400 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9401 decl2.c parse.y pt.c repo.c spew.c.
9402 * cp-tree.h: Use gengtype for roots.
9403 (struct saved_scope): Use GGC, gengtype.
9404 (cp_parse_init): Delete prototype.
9405 (init_pt): Delete prototype.
9406 * decl.c: Use gengtype for roots.
9407 (mark_saved_scope): Delete.
9408 (cxx_init_decl_processing): Don't call deleted initilisation
9409 routines.
9410 (signed_size_zero_node): Delete, unused.
9411 * decl.h: Use gengtype for roots.
9412 * decl2.c: Use gengtype for roots.
9413 * lex.h: Use gengtype for roots.
9414 * parse.y: Use gengtype for roots.
9415 (cp_parse_init): Delete.
9416 * pt.c: Use gengtype for roots.
9417 (init_pt): Delete.
9418 * repo.c: Use gengtype for roots.
9419 * spew.c: Use gengtype for roots.
9420
9421 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
9422 (cp/decl.o): Add dependency on gtype-cp.h.
9423 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9424 Include gtype-cp.h. Allow for filename changes.
9425
9426 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9427 (cp/decl.o): Add cp/gt-decl.h dependency.
9428 * config-lang.in (gtfiles): New.
9429 * tree.h: Rename struct binding_level to struct cp_binding_level.
9430 * decl.c: Rename struct binding_level to struct cp_binding_level.
9431 Include cp/gt-decl.h.
9432 (struct cp_binding_level): Use gengtype.
9433 (make_binding_level): Use GGC on struct cp_binding_level.
9434 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9435 (cxx_init_decl_processing): Mark free_binding_level as
9436 deletable.
9437
9438 * decl.c (mark_cp_function_context): Update calling sequence.
9439
9440 * decl.c (start_function): Don't free 'struct
9441 cp_language_function'.
9442 (pop_cp_function_context): Likewise.
9443 (save_function_data): Allocate it using GC.
9444 * semantics.c (genrtl_start_function): Don't free 'struct
9445 cp_language_function'.
9446
9447 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
9448
9449 * lang-specs.h: Use cpp_debug_options.
9450
9451 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9452
9453 * mangle.c, tree.c: Include real.h.
9454 * Make-lang.in: Update dependency lists.
9455
9456 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
9457
9458 * lex.c: Don't include c-lex.h.
9459 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9460
9461 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
9462
9463 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9464
9465 2002-05-22 Richard Henderson <rth@redhat.com>
9466
9467 * decl.c (obscure_complex_init): Check for VAR_DECL
9468 before using DECL_THREAD_LOCAL.
9469
9470 2002-05-22 Richard Henderson <rth@redhat.com>
9471
9472 * decl.c (check_tag_decl): Handle RID_THREAD.
9473 (obscure_complex_init): Reject run-time init of tls.
9474 (grokvardecl, grokdeclarator): Handle RID_THREAD.
9475 * lex.c (reswords): Add __thread.
9476 (rid_to_yy): Map RID_THREAD to SCSPEC.
9477
9478 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
9479
9480 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9481 * cp-tree.h (cxx_post_options): Kill.
9482 * cp-lex.c (cxx_post_options): Kill.
9483
9484 2002-05-21 Richard Henderson <rth@redhat.com>
9485
9486 * lex.c (rid_to_yy): Add RID_THREAD.
9487
9488 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
9489
9490 * init.c (build_vec_init): Test for trivial copy-assignment when
9491 copy-assigning arrays.
9492
9493 2002-05-20 Andreas Jaeger <aj@suse.de>
9494
9495 * init.c (build_default_init): Remove unused variable.
9496
9497 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
9498
9499 * call.c (any_strictly_viable): New.
9500 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9501
9502 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9503
9504 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9505
9506 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9507
9508 PR c++/186, DR 259
9509 * pt.c (do_decl_instantiation): Don't complain explicit
9510 instantiation after explicit specialization.
9511 (do_type_instantiation): Likewise.
9512
9513 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
9514
9515 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9516 renamed from...
9517 (complete_type_or_else): ... this. Redefined as macro.
9518 (cxx_incomplete_type_diagnostic): Declare.
9519 (cxx_incomplete_type_error): Define as macro.
9520 * init.c (build_delete): Warn about incomplete types other than
9521 void, and use the built-in operator delete for them.
9522 * typeck.c (complete_type_or_diagnostic): Renamed from
9523 complete_type_or_else. Added warn_only argument, passed to...
9524 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
9525 warnings or errors depending on new warn_only argument. Renamed
9526 from...
9527 (cxx_incomplete_type_error): ... this. New implementation in
9528 terms of cxx_incomplete_type_diagnostic.
9529
9530 2002-05-18 Jason Merrill <jason@redhat.com>
9531
9532 PR c++/6611
9533 * decl2.c (import_export_decl): If we clear
9534 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9535
9536 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9537
9538 PR c++/6620
9539 * pt.c (verify_class_unification): Don't check if PARM is template
9540 parameter dependent. Simplify.
9541 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9542 parameter dependent expression.
9543
9544 2002-05-14 Jason Merrill <jason@redhat.com>
9545
9546 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9547 Do set DECL_COMDAT.
9548 (synthesize_tinfo_var): Take the public decl.
9549 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
9550 (emit_tinfo_decl): Adjust. Call import_export_decl.
9551 * decl2.c (import_export_decl): Simplify tinfo decl handling.
9552
9553 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
9554
9555 * cp-tree.h (struct lang_type): Added non_zero_init.
9556 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9557 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9558 * class.c (check_field_decls): Test non_zero_init.
9559 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9560 zero-to-NULL conversions.
9561 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9562 type that needs zero-initialization without zeros.
9563 (check_initializer_decl): Compute zero-initializer for types
9564 that require a non-trivial one.
9565 * init.c (build_forced_zero_init): New function.
9566 (build_default_init): Use it.
9567 * tree.c (zero_init_p): New function.
9568 * typeck2.c (force_store_init_value): New function.
9569 (process_init_constructor): Create non-trivial zero-initializers
9570 for array members and class fields.
9571
9572 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
9573
9574 * lang-specs.h: Remove redundant -lang-c++.
9575
9576 2002-05-13 Jason Merrill <jason@redhat.com>
9577
9578 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9579 (fixed_type_or_null): See through reference vars.
9580 (build_base_path): Vtable contents are constant.
9581 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9582
9583 2002-05-12 Jason Merrill <jason@redhat.com>
9584
9585 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9586 structs are safe.
9587
9588 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
9589
9590 * cp-tree.h (flag_ansi): Remove.
9591 * decl2.c (flag_ansi): Remove.
9592 (cxx_decode_option): Set flag_iso and flag_undef.
9593
9594 2002-05-09 Jason Merrill <jason@redhat.com>
9595
9596 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9597 Use subtraction rather than a bitmask to get the index.
9598 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9599
9600 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9601
9602 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
9603
9604 * Make-lang.in (decl2.o): Update.
9605 * cp-tree.h (warn_multichar): Remove.
9606 * decl2.c: Include c-common.h.
9607 (warn_multichar): Remove.
9608
9609 2002-05-03 Jason Merrill <jason@redhat.com>
9610
9611 * tree.c (build_cplus_array_type): Only const and volatile get
9612 special handling.
9613
9614 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9615
9616 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9617
9618 ABI change, returning simple classes from functions.
9619 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9620 TYPE_HAS_TRIVIAL_INIT_REF is false or
9621 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9622
9623 2002-04-30 Jason Merrill <jason@redhat.com>
9624
9625 PR debug/6436
9626 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9627 anonymous class with a typedef if there are attributes.
9628
9629 2002-04-29 Paul Eggert <eggert@twinsun.com>
9630
9631 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9632
9633 2002-04-29 Jakub Jelinek <jakub@redhat.com>
9634
9635 PR c++/6477
9636 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9637 non-NULL first.
9638
9639 2002-04-29 Mark Mitchell <mark@codesourcery.com>
9640
9641 PR c++/6492
9642 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9643 enter that scope before name lookup.
9644
9645 PR c++/6486
9646 * method.c (do_build_copy_constructor): Avoid building
9647 cv-qualified reference types.
9648
9649 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
9650
9651 PR c++/5719
9652 * decl.c (grok_op_properties): Assignment ops don't have to return
9653 by value. operator% should.
9654
9655 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
9656
9657 PR c/6343
9658 * decl.c (duplicate_decls): Call merge_weak.
9659
9660 2002-04-26 Richard Henderson <rth@redhat.com>
9661
9662 * parse.y (malloced_yyss, malloced_yyvs): New.
9663 (yyoverflow): Re-add. Set them.
9664 (free_parser_stacks): New.
9665
9666 2002-04-26 Mark Mitchell <mark@codesourcery.com>
9667
9668 PR c++/6497
9669 * method.c (do_build_assign_ref): Pass a derivation to
9670 build_method_call when calling base class assignment operators.
9671
9672 2002-04-26 Richard Henderson <rth@redhat.com>
9673
9674 * parse.y (yyoverflow): Revert.
9675
9676 2002-04-26 Richard Henderson <rth@redhat.com>
9677
9678 PR c/3581
9679 * parse.y (string): Remove. Update all uses to use STRING
9680 instead, and not call combine_strings.
9681 * rtti.c (tinfo_name): Use fix_string_type.
9682 * semantics.c (finish_asm_stmt): Don't call combine_strings.
9683 * spew.c (yylexstring): New.
9684 (read_token): Use it.
9685
9686 2002-04-25 Richard Henderson <rth@redhat.com>
9687
9688 PR c/2161
9689 * parse.y (yyoverflow): New.
9690
9691 2002-04-25 Jason Merrill <jason@redhat.com>
9692
9693 PR c++/5607
9694 * search.c (check_final_overrider): No longer static.
9695 * class.c (update_vtable_entry_for_fn): Call it.
9696 * cp-tree.h: Adjust.
9697
9698 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9699
9700 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9701 * cp-tree.h (cxx_set_yydebug): Die.
9702 * lex.c (YYDEBUG): Get from c-lex.h.
9703 (cxx_set_yydebug): Remove.
9704 * parse.y: Include c-lex.h.
9705 (YYDEBUG): Get from c-lex.h.
9706
9707 2002-04-24 Mark Mitchell <mark@codesourcery.com>
9708
9709 PR c++/6438.
9710 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9711 void.
9712
9713 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
9714
9715 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9716 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9717 Redefine.
9718 * cp-tree.h (cp_attribute_table): Rename.
9719 * decl.c (lang_attribute_table): Remove declaration.
9720 (cxx_init_decl_processing): Don't set it.
9721 * tree.c (cp_attribute_table): Rename.
9722
9723 2002-04-24 Jason Merrill <jason@redhat.com>
9724
9725 PR c++/6331
9726 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9727 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9728 The pedwarn for array assignment is now unconditional.
9729 * tree.c (build_cplus_array_type_1): Still process simple array types
9730 normally in templates.
9731
9732 PR c++/6395
9733 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9734 stuff for comdats.
9735
9736 2002-04-23 Jakub Jelinek <jakub@redhat.com>
9737
9738 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9739 node with attributes.
9740
9741 2002-2-23 David O'Brien <obrien@FreeBSD.org>
9742
9743 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9744 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9745
9746 2002-04-23 Mark Mitchell <mark@codesourcery.com>
9747
9748 PR c++/6256:
9749 * pt.c (tsubst_friend_class): Handle templates with explicit
9750 nested names.
9751
9752 PR c++/6331:
9753 * typeck.c (merge_types): Remember the cv-qualification of pointer
9754 types when merging them.
9755
9756 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
9757
9758 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9759 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9760 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9761 cxx_mark_function_context): New.
9762 * decl.c (push_cp_function_context, pop_cp_function_context,
9763 mark_cp_function_context): Rename for consistency.
9764 (cxx_init_decl_processing): Don't set old hooks.
9765
9766 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
9767
9768 * call.c (convert_type_from_ellipsis): Rename, update.
9769 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9770 * cp-tree.h (convert_type_from_ellipsis): Rename.
9771 * decl.c (cxx_init_decl_processing): Don't set hook.
9772
9773 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9774
9775 * call.c (build_new_method_call): Update.
9776 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9777 * cp-tree.h (cxx_incomplete_type_error): New.
9778 * decl.c (grokdeclarator, grokparms): Update.
9779 * decl2.c (check_classfn): Update.
9780 * pt.c (tsubst): Update.
9781 * typeck.c (complete_type_or_else, expr_sizeof,
9782 decay_conversion): Update.
9783 * typeck2.c (incomplete_type_error): Rename.
9784 (add_exception_specifier): Update.
9785
9786 2002-04-18 Jason Merrill <jason@redhat.com>
9787
9788 PR c++/5658
9789 * search.c (setup_class_bindings): A class template qualifies as a
9790 type binding.
9791
9792 2002-04-17 Jakub Jelinek <jakub@redhat.com>
9793
9794 PR c++/6316
9795 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9796 before expanding.
9797
9798 2002-04-16 Mark Mitchell <mark@codesourcery.com>
9799
9800 * init.c (begin_init_stmts): Remove commented out code.
9801 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9802 * semantics.c (begin_gobal_stmt_expr): Adjust call to
9803 expand_start_stmt_expr.
9804
9805 2002-04-15 Mark Mitchell <mark@codesourcery.com>
9806
9807 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9808 dso_handle itself, to __cxa_atexit.
9809
9810 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9811
9812 * error.c (cxx_print_error_function): Adjust call to macros.
9813
9814 2002-04-14 Jakub Jelinek <jakub@redhat.com>
9815
9816 * class.c (layout_virtual_bases): Do all dsize computation on trees.
9817
9818 2002-04-14 Jason Merrill <jason@redhat.com>
9819
9820 * typeck.c (get_member_function_from_ptrfunc): Don't do
9821 gratuitious division and multiplication on
9822 ptrmemfunc_vbit_in_delta targets.
9823
9824 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9825
9826 PR c++/5373.
9827 * semantics.c (finish_expr_stmt): Remember the type of the
9828 expression before any conversions are performed.
9829
9830 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9831
9832 PR c++/5189.
9833 * call.c (add_template_candidate_real): Do not treat member
9834 templates as copy constructors.
9835
9836 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9837
9838 * decl.c (duplicate_decls): Do not copy the RTL for a variable
9839 declaration if the old variable had an incomplete type and the new
9840 variable does not.
9841 (complete_vars): Do not call layout_decl for completed variables.
9842
9843 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
9844
9845 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9846 with an explicit one.
9847 (follow_tag_typedef): New.
9848 (lookup_tag): Use it to extract the tag of an explicit typedef.
9849 (xref_tag): Likewise.
9850
9851 2002-04-11 Andrew Haley <aph@redhat.com>
9852
9853 * typeck.c (type_after_usual_arithmetic_conversions):
9854 If two types have the same variant, return immediately.
9855 When two floating-point operands are the same precision:
9856 convert to float if one of the operands is float;
9857 if neither operand is one of the standard types, return the type
9858 of the first operand.
9859
9860 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
9861
9862 PR c++/5507
9863 * decl.c (make_typename_type): Remove implicit typenameness.
9864
9865 2002-04-09 Jason Merrill <jason@redhat.com>
9866
9867 PR optimization/6189
9868 * semantics.c (genrtl_start_function): Don't free
9869 DECL_SAVED_FUNCTION_DATA for inline functions.
9870
9871 * init.c (build_member_call): For now, don't convert to
9872 intermediate base if it would cause an error.
9873
9874 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
9875
9876 * parse.y (namespace_qualifier, maybe_identifier,
9877 begin_explicit_instantiation, end_explicit_instantiation,
9878 apparent_template_type, .finish_template_type,
9879 do_id, maybe_init, defarg_again, component_decl_1):
9880 Add ending ';', in accordance with POSIX.
9881
9882 2002-04-06 Mark Mitchell <mark@codesourcery.com>
9883
9884 PR c++/5571
9885 * class.c (layout_class_type): Remember incomplete static
9886 variables.
9887 (finish_struct_1): Call complete_vars, not
9888 hack_incomplete_structures.
9889 * cp-tree.h (hack_incomplete_structures): Rename to ...
9890 (complete_vars): ... this.
9891 (struct saved_scope): Remove incomplete.
9892 (namespace_scope_incomplete): Remove.
9893 * decl.c (struct binding_level): Remove incomplete.
9894 (incomplete_vars): New variable.
9895 (mark_binding_level): Don't mark incomplete.
9896 (print_binding_level): Don't print it.
9897 (mark_saved_scope): Don't mark incomplete.
9898 (pushdecl): Use maybe_register_incopmlete_var.
9899 (cxx_init_decl_processing): Register incomplete_vars for GC.
9900 (start_decl_1): Clarify error message.
9901 (hack_incomplete_vars): Remove.
9902 (maybe_register_incomplete_var): New function.
9903 (complete_vars): Likewise.
9904
9905 2002-04-06 Jason Merrill <jason@redhat.com>
9906
9907 PR c++/4934
9908 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9909 set before checking it.
9910
9911 PR c++/525
9912 * init.c (build_member_call): Use build_scoped_ref.
9913 (resolve_offset_ref): Likewise.
9914 * call.c (build_scoped_method_call): Likewise.
9915 * tree.c (maybe_dummy_object): Kludge around current_class_type being
9916 wrong.
9917 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9918 * cp-tree.h: Adjust.
9919
9920 * init.c (push_base_cleanups): Just use build_scoped_method_call.
9921
9922 PR c++/6179
9923 * method.c (implicitly_declare_fn): Pass unqualified type to
9924 synthesize_exception_spec.
9925
9926 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9927
9928 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9929 * cvt.c: Update comment.
9930 * init.c (expand_cleanup_for_base): Update.
9931 * semantics.c (finish_parenthesized_expr): Update.
9932 * typeck.c (cp_truthvalue_conversion): Update.
9933
9934 2002-04-04 Jason Merrill <jason@redhat.com>
9935
9936 * semantics.c (finish_eh_cleanup): New fn.
9937 * cp-tree.h: Add prototype.
9938 * init.c (perform_member_init, expand_cleanup_for_base): Use
9939 finish_eh_cleanup.
9940 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9941 * cp-tree.h: Remove references.
9942 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9943 * dump.c (cp_dump_tree): Likewise.
9944 * pt.c (tsubst_expr): Likewise.
9945 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9946 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9947 * tree.c (cp_statement_code_p): Likewise.
9948
9949 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9950
9951 PR c++/5636
9952 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9953 cleanup for nrv.
9954
9955 PR c++/5104
9956 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9957 specifiers.
9958 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9959
9960 2002-04-03 Richard Henderson <rth@redhat.com>
9961
9962 * cp-lang.c (cxx_warn_unused_global_decl): New.
9963 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9964
9965 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
9966
9967 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9968 * tree.c (init_tree): Don't set hook.
9969
9970 2002-04-03 Roger Sayle <roger@eyesopen.com>
9971
9972 PR c++/5998:
9973 * decl.c (duplicate_decls): Don't mess with assembler names when
9974 redeclaring builtin functions as static.
9975
9976 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9977
9978 * call.c (build_addr_func): Update.
9979 * class.c (resolve_address_of_overloaded_function): Update.
9980 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9981 * cp-tree.h (cxx_mark_addressable): New.
9982 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9983 * decl2.c (build_cleanup): Update.
9984 * except.c (build_throw): Update.
9985 * init.c (resolve_offset_ref): Update.
9986 * pt.c (convert_nontype_argument): Update.
9987 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9988 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9989 unary_complex_lvalue): Update.
9990 (mark_addressable): Rename.
9991
9992 2002-04-01 Roger Sayle <roger@eyesopen.com>
9993
9994 PR c++/5998:
9995 * decl.c (duplicate_decls): Overwrite the RTL when (and only
9996 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
9997 but follow the SET_DECL_RTL idiom used elsewhere in the function.
9998
9999 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
10000
10001 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
10002 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
10003 * decl.c (grokdeclarator): Update.
10004 * mangle.c (write_integer_cst): Update.
10005 * typeck.c (build_binary_op): Update.
10006
10007 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
10008
10009 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
10010 * lex.c (cxx_init): Don't set hook.
10011
10012 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
10013
10014 * Make-lang.in (error.o): Update.
10015 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
10016 * cp-tree.h (struct diagnostic_context): Predeclare.
10017 (cxx_print_error_function): New.
10018 * error.c: Include langhooks-def.h.
10019 (lang_print_error_function): Rename. Update.
10020 (init_error): Don't set hook.
10021
10022 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
10023
10024 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
10025 Redefine.
10026 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
10027 * decl.c (finish_enum): Similarly.
10028 * error.c (dump_type): Similarly.
10029 * lex.c (cxx_init): Similarly.
10030 * mangle.c (write_builtin_type): Similarly.
10031 * typeck.c (comptypes): Similarly.
10032
10033 2002-03-28 Roger Sayle <roger@eyesopen.com>
10034
10035 PR c++/5998:
10036 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
10037 in the g++ front-end.
10038 (duplicate_decl): Allow redefinition of anticipated built-ins.
10039 Fix inlining problem by over-writing the old DECL_RTL.
10040 (lookup_namespace_name): Fail to find an identifier in the
10041 specified namespace if its still anticipated.
10042 (builtin_function_1): New function split out from builtin_function
10043 to create a builtin in the current namespace with given context.
10044 (builtin_function): Call builtin_function_1 to define the
10045 appropriate builtins in both the std and global namespaces.
10046 (select_decl): Don't test for anticipated decls here.
10047 (unqualified_namespace_lookup): Instead ignore them whilst
10048 searching through scopes and namespaces.
10049 * decl2.c (do_nonmember_using_decl): If a using declaration
10050 specifies an anticipated built-in function, mark it as no longer
10051 anticipated in that scope.
10052 (ambiguous_decl): Avoid resolving to an anticipated decl.
10053 * lex.c (do_scoped_id): Fail to find an identifier in the global
10054 namespace if its still anticipated.
10055
10056 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
10057
10058 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
10059 * cp-tree.h (cp_make_lang_type): Rename.
10060 * lex.c (cp_make_lang_type): Rename.
10061 (make_aggr_type): Update.
10062 * tree.c (init_tree): Don't set make_lang_type_fn.
10063
10064 2002-03-29 Jakub Jelinek <jakub@redhat.com>
10065
10066 PR c++/6073
10067 * class.c (finish_struct_1): Update static field's DECL_MODE even
10068 if its type is a variant of t.
10069
10070 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
10071
10072 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
10073 * cp-tree.h (cxx_insert_default_attributes): New.
10074 * decl.c (insert_default_attributes): Rename.
10075
10076 2002-03-27 Mark Mitchell <mark@codesourcery.com>
10077
10078 PR c++/4884
10079 * call.c (build_op_delete_call): Allow for the fact the placement
10080 may be a COMPOUND_EXPR.
10081
10082 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
10083
10084 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
10085 * cp-tree.h (init_cplus_expand): Remove.
10086 (cxx_expand_expr): New.
10087 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
10088 fix prototype.
10089 (init_cplus_expand): Remove.
10090 * lex.c (cxx_init): Don't call init_cplus_expand.
10091
10092 2002-03-26 Mark Mitchell <mark@codesourcery.com>
10093
10094 PR c++/4884.
10095 * init.c (build_new_1): Allow for the fact the result of
10096 build_function_call may be a COMPOUND_EXPR.
10097
10098 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
10099
10100 PR c++/5682
10101 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
10102 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
10103 (dfs_skip_nonprimary_vbases_markedp): Remove.
10104 * search.c (get_shared_vbase_if_not_primary): Remove.
10105 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
10106 (dfs_skip_nonprimary_vbases_markedp): Remove.
10107 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
10108 (dfs_marked_real_bases_queue_p): Likewise.
10109
10110 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
10111
10112 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
10113 * cp-tree.h (cxx_mark_tree): New.
10114 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
10115
10116 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
10117
10118 * cp-tree.h (cxx_maybe_build_cleanup): New.
10119 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
10120 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
10121 * tree.c (build_target_expr): Update.
10122 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
10123
10124 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
10125
10126 * decl2.c (cxx_decode_option): Handle -E.
10127 * lang-specs.h (default_compilers): Preprocess with cc1plus.
10128 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
10129
10130 2002-03-23 Jakub Jelinek <jakub@redhat.com>
10131
10132 PR c++/6037
10133 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
10134
10135 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10136
10137 * error.c (dump_type): Be careful about implicit typenames.
10138
10139 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10140
10141 PR C++/3656
10142 * semantics.c (finish_base_specifier): Handle erronous base
10143 classes.
10144
10145 2002-03-22 Zack Weinberg <zack@codesourcery.com>
10146
10147 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
10148 REAL_IS_NOT_DOUBLE.
10149
10150 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
10151
10152 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
10153 an index into the vtable_entry array regardless of
10154 TARGET_PTRMEMFUNC_VBIT_LOCATION.
10155
10156 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
10157
10158 * tree.c (cp_cannot_inline_tree_fn): Same.
10159
10160 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
10161
10162 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
10163 insert_block, getdecls, global_bindings_p): New.
10164
10165 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
10166
10167 PR c++/4361
10168 * mangle.c (struct globals) Add internal_mangling_p member.
10169 (write_template_param): Do internal mangling, if needed.
10170 (mangle_conv_op_name_for_type): Request internal mangling.
10171
10172 2002-03-20 Jason Merrill <jason@redhat.com>
10173
10174 PR c++/2136
10175 * init.c (build_delete): Check access for a member op delete here.
10176 * decl2.c (delete_sanity): Not here.
10177
10178 2002-03-19 Jason Merrill <jason@redhat.com>
10179
10180 PR c++/5118
10181 * class.c (get_vfield_name): Use the constructor_name.
10182
10183 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
10184
10185 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
10186 * cp-tree.h (lang_printable_name): Rename.
10187 * error.c (lang_decl_name): Use new hook.
10188 * lex.c (cxx_init): Remove old hook.
10189 * pt.c (tsubst_decl): Use new hook.
10190 * tree.c (lang_printable_name): Rename.
10191
10192 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
10193
10194 PR c++/3882
10195 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
10196 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
10197 only after recording the declaration.
10198
10199 2002-03-18 Jason Merrill <jason@redhat.com>
10200
10201 PR c++/2039
10202 * init.c (resolve_offset_ref): Hand off to build_component_ref.
10203
10204 PR c++/4222, c++/5995
10205 * call.c (build_over_call): Fix empty class logic.
10206
10207 PR c++/3870
10208 * cp-tree.h (struct saved_scope): Add last_parms field.
10209 * decl.c (maybe_push_to_top_level): Save last_function_parms.
10210 (pop_from_top_level): Restore it.
10211
10212 PR c++/4377
10213 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
10214 NON_LVALUE_EXPRs.
10215
10216 PR c++/4003
10217 * pt.c (tsubst_friend_function): Use decl_namespace_context.
10218
10219 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
10220 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
10221 type with a nontrivial destructor.
10222
10223 2002-03-17 Jason Merrill <jason@redhat.com>
10224
10225 PR c++/4460
10226 * class.c (build_base_path): Virtual base layout is fixed in
10227 in-charge [cd]tors.
10228
10229 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
10230
10231 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
10232 * parse.y (yyparse): Remove macro.
10233
10234 2002-03-17 Jason Merrill <jason@redhat.com>
10235
10236 PR c++/5757
10237 * init.c (build_new_1): Pass the right pointer to op delete.
10238
10239 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
10240
10241 PR c++/4361
10242 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
10243 conversion operators go.
10244 (struct lang_decl_flags): Add template_conv_p and unused
10245 bitfields.
10246 (DECL_TEMPLATE_CONV_FN_P): New macro.
10247 * call.c (build_user_type_conversion_1): Don't check second type
10248 conversion of overload set first.
10249 * class.c (add_method): Make sure templated conversion operators
10250 all end up on slot 2.
10251 * lex.c (do_identifier): A conversion operator token might be
10252 satisfied by a templated conversion operator.
10253 * pt.c (check_explicit_specialization): Use
10254 CLASSTYPE_FIRST_CONVERSION_SLOT.
10255 (template_parm_this_level_p): New function.
10256 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
10257 * search.c (lookup_fnfields_1): Template conversions will be on
10258 the first slot.
10259 * typeck.c (build_component_ref): Preserve the type of an
10260 conversion operator name on the overload type.
10261 (build_x_function_call): Retrieve the conversion operator name.
10262
10263 2002-03-15 Richard Henderson <rth@redhat.com>
10264
10265 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10266
10267 2002-03-15 Mark Mitchell <mark@codesourcery.com>
10268
10269 * cp-tree.h (CLEANUP_DECL): Remove.
10270 (CLEANUP_EXPR): Likewise.
10271 * decl.c (destroy_local_var): Simplify.
10272 (maybe_build_cleanup): Tidy.
10273 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10274 * semantics.c (cp_expand_stmt): Likewise.
10275 * cp/tree.c (cp_statement_code_p): Likewise.
10276
10277 2002-03-15 Jason Merrill <jason@redhat.com>
10278
10279 PR c++/5857
10280 * decl.c (duplicate_decls): Use merge_types instead of common_type.
10281 * typeck.c (common_type): Just hand off to
10282 type_after_usual_arithmetic_conversions and
10283 composite_pointer_type.
10284 (merge_types): New fn.
10285 (commonparms): Use it instead of common_type.
10286 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10287 (composite_pointer_type): Also handle attributes.
10288 * cp-tree.h: Declare merge_types.
10289
10290 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10291 variables.
10292 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10293
10294 2002-03-14 Richard Henderson <rth@redhat.com>
10295
10296 * decl.c: Include c-pragma.h.
10297 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10298 * Make-lang.in: Update dependencies.
10299
10300 2002-03-14 Jakub Jelinek <jakub@redhat.com>
10301
10302 PR c++/5908
10303 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10304 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10305
10306 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10307
10308 * mangle.c (write_builtin_type): Handle 128-bit integers even if
10309 they are not a standard integer type.
10310
10311 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10312
10313 * cp-tree.h (init_init_processing): Remove declaration.
10314 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10315 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10316
10317 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10318
10319 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10320 Define.
10321 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10322 tree_code_length.
10323 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10324 cplus_tree_code_name): Delete.
10325 (cxx_init): Don't call add_c_tree_codes, instead set
10326 lang_unsafe_for_reeval. Don't try to copy into the various
10327 tree_code arrays.
10328
10329 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
10330
10331 PR c++/5659
10332 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10333 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10334 definitions.
10335
10336 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10337
10338 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
10339 DR209 is now not a defect.
10340 * cp-tree.h (skip_type_access_control): Remove.
10341 * decl.c (grokdeclarator): Do type access control for friend
10342 declarations.
10343 * semantics.c (decl_type_access_control): Don't reset
10344 current_type_lookups.
10345 (save_type_access_control): Always save the lookups.
10346 (skip_type_access_control): Remove.
10347 (finish_class_definition): Don't change type_lookups.
10348
10349 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10350
10351 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
10352 It is incorrect.
10353 * typeck.c (build_static_cast): Compare non-qualified types
10354 with pointer to member conversions.
10355
10356 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
10357 Daniel Berlin <dan@dberlin.org>
10358
10359 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10360 (cxx_get_alias_set): Use it.
10361
10362 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10363
10364 * cp-tree.h (stabilize_expr): Prototype.
10365
10366 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
10367
10368 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10369 conditional return void.
10370
10371 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
10372
10373 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10374 * cp-tree.h (cxx_unsave): New.
10375 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10376 (init_tree): Update.
10377
10378 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10379
10380 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10381 explicit sizeof/sizeof.
10382 * decl2.c (cxx_decode_option): Likewise.
10383 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10384
10385 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
10386
10387 PR c++/775
10388 * decl.c (lookup_tag): Only reject enum/class mismatch, not
10389 class/union mismatch.
10390 * parse.y (check_class_key): New function.
10391 (structsp): Call it.
10392
10393 2002-03-01 Michael Matz <matz@suse.de>
10394
10395 * typeck.c (cp_pointer_int_sum): Complete inner type which is
10396 used later by size_in_bytes().
10397
10398 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
10399
10400 * cp-tree.h: Require __GNUC__ to be #defined.
10401 (build_init): Add missing prototype.
10402
10403 2002-03-01 Jason Merrill <jason@redhat.com>
10404
10405 * except.c: Don't include decl.h or obstack.h. Do include
10406 tree-inline.h.
10407 (build_throw): Destroy temporaries from the thrown
10408 expression before calling __cxa_throw. Construct a thrown
10409 temporary directly into the exception object.
10410 (stabilize_throw_expr): New function.
10411 (wrap_cleanups_r): New function.
10412 * tree.c (stabilize_expr): New function.
10413 * init.c (build_init): New function.
10414 * Make-lang.in (cp/except.o): Adjust .h deps.
10415
10416 2002-02-28 Jason Merrill <jason@redhat.com>
10417
10418 * search.c (lookup_base_r): Don't clear is_non_public just because
10419 we found a friendly scope.
10420
10421 * decl.c (finish_function): Only warn about missing return
10422 statement with -Wreturn-type.
10423
10424 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
10425
10426 * class.c (build_clone): Update.
10427 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10428 * cp-tree.h (cxx_dup_lang_specific_decl): New.
10429 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10430 (copy_decl): Update.
10431 * method.c (make_thunk): Update.
10432
10433 2002-02-27 Zack Weinberg <zack@codesourcery.com>
10434
10435 * decl2.c: Delete traditional-mode-related code copied from
10436 the C front end but not used, or used only to permit the
10437 compiler to link.
10438
10439 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
10440
10441 PR c++/4093
10442 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10443 to void.
10444
10445 2002-02-22 Jakub Jelinek <jakub@redhat.com>
10446
10447 PR other/5746
10448 * semantics.c (finish_switch_cond): Don't call get_unwidened
10449 if error_mark_node.
10450
10451 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
10452
10453 PR c++/2645, DR 295
10454 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10455 tf_keep_type_decl.
10456 (make_typename_type): Use tsubst_flags_t.
10457 * decl.c (make_typename_type): Adjust. Return non-artificial
10458 TYPE_DECLs, if required.
10459 (grokdeclarator): Simplify CVR qualification handling. Allow bad
10460 qualifiers on typedef types.
10461 * decl2.c (handle_class_head): Adjust make_typename_type call.
10462 * parse.y (nested_name_specifier): Likewise.
10463 (typename_sub0): Likewise.
10464 (typename_sub1): Likewise.
10465 * pt.c (convert_template_argument): Adjust make_typename_type
10466 return value.
10467 (tsubst): Adjust cp_build_qualified_type_real calls.
10468 (check_cv_quals_for_unify): Cope with allowing bad qualifications
10469 on template type parms.
10470 (instantiate_decl): Recheck substitutions to give warnings on bad
10471 qualifications.
10472 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10473
10474 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
10475
10476 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10477
10478 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10479 unless DECL_ALWAYS_INLINE.
10480
10481 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10482
10483 * typeck.c (cp_pointer_int_sum): Renamed from
10484 pointer_int_sum, call pointer_int_sum.
10485
10486 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10487
10488 * decl.c (duplicate_decls): Return 0 if issued error about
10489 redeclaration.
10490
10491 2002-02-19 Jason Merrill <jason@redhat.com>
10492
10493 ABI change: Mangle `void (A::*)() const' as
10494 M1AKFvvE, not MK1AFvvE.
10495 * mangle.c (write_function_type): Write cv-quals for member
10496 function type here.
10497 (write_pointer_to_member_type): Not here.
10498
10499 2002-02-18 Jason Merrill <jason@redhat.com>
10500
10501 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10502 (do_decl_instantiation): Likewise.
10503
10504 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
10505
10506 PR c++/5685
10507 * decl.c (duplicate_decls): Make warning unconditional
10508 if duplicate default argument declarations are present.
10509
10510 2002-02-17 Jakub Jelinek <jakub@redhat.com>
10511
10512 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10513 shortening.
10514
10515 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
10516
10517 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10518 remove incorrect comment. Move #if 0'd code to common path. Use
10519 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10520
10521 2002-02-13 Jason Merrill <jason@redhat.com>
10522
10523 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10524 (finish_function): Don't warn if current_function_returns_null.
10525
10526 * typeck2.c (digest_init): Do handle values of vector type.
10527
10528 * typeck2.c (digest_init, process_init_constructor): Treat vectors
10529 like arrays.
10530
10531 2002-02-11 Jason Merrill <jason@redhat.com>
10532
10533 * parse.y (reserved_declspecs): Don't handle attributes.
10534 (reserved_typespecquals): Handle them here.
10535 * Make-lang.in (parse.c): Adjust expected conflicts.
10536
10537 2002-02-08 Jakub Jelinek <jakub@redhat.com>
10538
10539 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10540 instead of compstmt.
10541 (compstmt_or_stmtexpr): Renamed from compstmt.
10542 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10543
10544 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10545
10546 Rename instantiate_type_flags to tsubst_flags_t & expand use.
10547 * cp-tree.h (instantiate_type_flags): Rename to ...
10548 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10549 add tf_warning flag.
10550 (instantiate_type): Adjust prototype.
10551 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10552 do_type_instantiation, cp_build_qualified_type_real): Likewise.
10553 cp_build_qualified_type: Adjust.
10554 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10555 tf_*.
10556 * call.c (standard_conversion): Rename itf_* to tf_*.
10557 (reference_binding): Likewise.
10558 (convert_like_real): Likewise.
10559 * cvt.c (cp_convert_to_pointer): Likewise.
10560 (convert_to_reference): Likewise.
10561 * decl.c (lookup_namespace_name): Use tf_* flags.
10562 (make_typename_type): Likewise.
10563 (grokdeclarator): Likewise.
10564 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10565 (coerce_template_template_parms, convert_template_argument,
10566 coerce_template_parms, maybe_get_template_decl_from_type_decl,
10567 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10568 instantiate_class_template, tsubst_template_arg_vector,
10569 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10570 tsubst_decl, tsubst_arg_types, tsubst_function_type,
10571 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10572 instantiate_template, fn_type_unification,
10573 resolve_overloaded_unification, verify_class_unification,
10574 unify, get_bindings_real, do_type_instantiation,
10575 regenerate_decl_from_template, instantiate_decl,
10576 tsubst_initializer_list, tsubst_enum,
10577 get_mostly_instantiated_function_type,
10578 invalid_nontype_parm_type_p): Likewise.
10579 * tree.c (cp_build_qualified_type_real): Likewise.
10580 * typeck.c (build_binary_op): Rename itf_* to tf_*.
10581 (build_ptrmemfunc): Likewise.
10582 (convert_for_assignment): Likewise.
10583
10584 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10585
10586 PR c++/109
10587 * decl.c (grokdeclarator): Allow friend declarations from
10588 dependent types.
10589 * decl2.c (handle_class_head): Don't push into template parm contexts.
10590 * pt.c (push_template_decl_real): Template parm contexts are never
10591 being defined.
10592
10593 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
10594
10595 * class.c: Include target.h.
10596 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10597 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10598 bit-field layout.
10599 * Make-lang.in: Adjust deps.
10600
10601 2002-02-05 Jason Merrill <jason@redhat.com>
10602
10603 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10604
10605 2002-02-04 Jakub Jelinek <jakub@redhat.com>
10606
10607 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10608 (finish_switch_cond): Set SWITCH_TYPE.
10609
10610 2002-02-04 Richard Henderson <rth@redhat.com>
10611
10612 * method.c (use_thunk): Always initialize the block tree. Reindent.
10613 * semantics.c (expand_body): Emit thunks after function, not before.
10614
10615 2002-02-04 Jason Merrill <jason@redhat.com>
10616
10617 * decl.c (start_function): Call cplus_decl_attributes immediately
10618 after grokdeclarator.
10619
10620 * decl.c (start_function): Combine DECL_RESULT handling code.
10621
10622 2002-02-03 Jason Merrill <jason@redhat.com>
10623
10624 * xref.c: Remove.
10625 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10626 (cp/xref.o): Remove dependencies.
10627 * class.c (finish_struct_1, check_methods): Don't call xref fns.
10628 (finish_struct_1): Likewise.
10629 * friend.c (make_friend_class): Likewise.
10630 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10631 * spew.c (read_process_identifier): Likewise.
10632
10633 2002-02-01 Jason Merrill <jason@redhat.com>
10634
10635 PR c++/4872
10636 * decl.c (finish_function): Warn about a non-void function with
10637 no return statement and no abnormal exit.
10638 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10639 (current_function_returns_abnormally): New macro.
10640 * call.c (build_call): Set it.
10641
10642 * typeck.c (build_component_ref): Always complain about offsetof
10643 constructs on non-PODs. Only make it an error for members of
10644 virtual bases.
10645
10646 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10647 (dump_function_decl): Always dump parms.
10648
10649 * decl2.c (finish_static_data_member_decl): Complain about a local
10650 class with a static data member.
10651
10652 PR c++/4286
10653 * search.c (lookup_field_1): Don't xref a static data member
10654 just because we looked it up.
10655
10656 2002-01-31 Jason Merrill <jason@redhat.com>
10657
10658 * Make-lang.in (parse.c): Handle .output file.
10659
10660 PR c++/3395
10661 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10662 not TREE_TYPE.
10663 * semantics.c (finish_class_definition): Adjust.
10664
10665 Allow attributes in parms and casts.
10666 * parse.y (named_parm): Don't strip attrs.
10667 (declmods): Remove 'attributes' production.
10668 (nonempty_cv_qualifiers): Accept attributes.
10669 (ATTRIBUTE): Give precedence.
10670 * decl.c (groktypename): Handle attributes.
10671 (grokparms): Likewise.
10672
10673 2002-01-29 Jakub Jelinek <jakub@redhat.com>
10674
10675 * decl2.c (cxx_decode_option): Pass 0 as last argument to
10676 cpp_handle_option.
10677 * lang-specs.h: Use cpp_unique_options instead of cpp_options
10678 when used together with cc1_options.
10679
10680 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
10681
10682 PR c++/5132
10683 * typeck2.c (digest_init): Make sure non-array core type is
10684 instantiated.
10685 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10686 constructor, rather than build a new one.
10687 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10688 PURPOSE of constructor elts.
10689
10690 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10691
10692 * Make-lang.in (parse.c): Adjust expected number of
10693 shift-reduce conflicts.
10694 (decl.o): Depend on diagnostic.h.
10695 * decl.c: Include diagnostic.h.
10696 (grokdeclarator): Check for null pointer.
10697 (finish_function): Don't abort when
10698 current_binding_level->parm_flag != 1, if errors have
10699 occurred; throw away the statement tree and extra binding
10700 levels, and continue.
10701 * lex.c (note_list_got_semicolon): Check for null pointer.
10702 * method.c (hack_identifier): Just return error_mark_node if
10703 value is error_mark_node.
10704 * parse.y (primary: TYPEID(type_id)): No need to use
10705 TYPE_MAIN_VARIANT here.
10706 (handler_seq): Accept an empty list of catch clauses and
10707 generate a fake handler block to avoid later crashes.
10708 (ansi_raise_identifier): Accept the error token too.
10709 * semantics.c (begin_class_definition,
10710 finish_class_definition): Check for error_mark_node.
10711
10712 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10713
10714 * typeck2.c (friendly_abort): Delete definition.
10715 * cp-tree.h (friendly_abort): Don't prototype.
10716 (my_friendly_assert): Use fancy_abort.
10717
10718 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10719
10720 * cp-tree.h (my_friendly_abort): Remove.
10721
10722 2002-01-23 Jakub Jelinek <jakub@redhat.com>
10723
10724 * spew.c (pending_inlines, pending_inlines_tail,
10725 processing_these_inlines): Make static.
10726 (mark_pending_inlines): Remove static.
10727 (begin_parsing_inclass_inline): If in function, save pi
10728 for GC to cp_function_chain->unparsed_inlines instead.
10729 (process_next_inline): Likewise.
10730 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10731 (mark_pending_inlines): Add prototype.
10732 * decl.c (spew_debug): Remove unused extern.
10733 (mark_lang_function): Call mark_pending_inlines.
10734
10735 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10736
10737 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10738 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10739 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10740 Change my_fancy_abort() to abort().
10741
10742 2002-01-23 Jason Merrill <jason@redhat.com>
10743
10744 PR c++/5453
10745 * class.c (fixed_type_or_null): Fix thinko.
10746
10747 PR c++/3331
10748 * init.c (resolve_offset_ref): Use build_indirect_ref.
10749
10750 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10751
10752 2002-01-22 Jason Merrill <jason@redhat.com>
10753
10754 * parse.y (function_body): Suppress the block for the outermost
10755 curly braces.
10756 * decl.c (pushdecl): Don't try to skip it.
10757 (begin_function_body): Keep the block we create, not the next one.
10758 * init.c (emit_base_init): Don't mess with keep_next_level.
10759
10760 * class.c (build_base_path): Tweak formatting.
10761
10762 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
10763
10764 Fix regression introduced with patch for c++/775
10765 * parse.y (class_head_defn): Check for template specializations
10766 with a different class-key.
10767
10768 2002-01-17 Jason Merrill <jason@redhat.com>
10769
10770 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10771 (begin_function_body): Call them and keep_next_level.
10772 * init.c (emit_base_init): Call keep_next_level.
10773 * semantics.c (setup_vtbl_ptr): Lose.
10774 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10775 (vtbls_set_up_p): Lose.
10776 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10777 * method.c (do_build_copy_constructor): Likewise.
10778 (synthesize_method): Call finish_mem_initializers.
10779 * parse.y (nodecls): Likewise.
10780
10781 * error.c (dump_type_suffix): Print the exception specs before
10782 recursing.
10783 (dump_function_decl): Here, too.
10784
10785 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10786
10787 2002-01-10 Ira Ruben <ira@apple.com>
10788
10789 PR c++/907
10790 * decl.c (start_method): Handle attrlist.
10791
10792 2002-01-10 Jakub Jelinek <jakub@redhat.com>
10793
10794 * decl2.c (max_tinst_depth): Increase default limit to 500.
10795
10796 2002-01-10 Graham Stott <grahams@redhat.com>
10797
10798 * spew.c (YYCHAR): Uppercase macro parameter and add
10799 parenthesis.
10800 (YYCODE): Likewise.
10801 (NAME): Uppercase macro parameter.
10802
10803 2002-01-09 Graham Stott <grahams@redhat.com>
10804
10805 * decl.h (grokdeclarator): Wrap long line.
10806
10807 * semantics.c (FINISH_COND): Uppercase macro paramaters and
10808 add parenthesis.
10809
10810 2002-01-08 Graham Stott <grahams@redhat.com>
10811
10812 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10813 (PALLOC): Uppercase macro parameter and whitespace.
10814 (SALLOC): Uppercase macro parameter.
10815 (SFREE): Uppercase macros parameter, add parenthese and
10816 whitespace.
10817 (STREQL): Uppercase macro parameter and whitespace.
10818 (STRNEQ): Likewise.
10819 (STRLSS): Likewise.
10820 (STRLEQ): Likewise.
10821 (STRGTR): Likewise.
10822 (STRGEQ): Likewise.
10823
10824 * call.c (convert_like): Add parenthesis and wrap.
10825 (convert_like_with_context): Likewise.
10826 (ICS_RANK): Whitespace.
10827 (NEED_TEMPORARY_P): Remove parenthesis.
10828
10829 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10830 whitespace.
10831 (VTT_MARKED_BINFO_P): Likewise.
10832
10833 * decl.c (BINDING_LEVEL): Add parenthesis.
10834 (DEF_OPERATOR): Likewise.
10835
10836 * mangle.c (MANGLE_TRACE): Add parenthesis.
10837 (MANGLE_TRACE_TREE): Likewise.
10838 (write_signed_number): Likewise.
10839 (write_unsigned_number): Likewise.
10840
10841 * pt.c (ccat): Uppercase macro parameter.
10842 (cat): Likewise
10843
10844 * search.c (SET_BINFO_ACCESS): Add parenthesis.
10845
10846 2002-01-07 Jason Merrill <jason@redhat.com>
10847
10848 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10849 to pedwarn.
10850
10851 PR c++/3536
10852 * method.c (make_thunk): If !flag_weak, give the thunk the
10853 function's linkage.
10854 (use_thunk): Here, too.
10855
10856 2002-01-07 Graham Stott <grahams@redhat.com>
10857
10858 * error.c: Update copyright date.
10859 (print_scope_operator): Add parenthesis.
10860 (print_left_paren): Likewise.
10861 (print_right_paren): Likewise.
10862 (print_left_bracket): Likewise.
10863 (print_right_bracket): Likewise.
10864 (print_template_argument_list_start): Likewise.
10865 (print_template_argument_list_end): Likewise.
10866 (print_non_consecutive_character): Likewise.
10867 (print_tree_identifier): Likewise.
10868 (print_identifier): Likewise.
10869 (NEXT_CODE): Uppercase macro parameter.
10870 (ident_fndecl): Delete unused.
10871 (GLOBAL_THING): Likewise.
10872
10873 2002-01-06 Graham Stott <grahams@redhat.com>
10874
10875 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10876 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10877 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10878 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10879 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10880 (C_IS_RESERVED_WORD): Uppercase macro parameter.
10881 (C_RID_YYCODE) Likewise.
10882 (ptrmem_cst): Use rtx.
10883 (LOCAL_BINDING_P): Add whitespace.
10884 (INHERITED_VALUE_BINDING_P): Likewise.
10885 (BINDING_SCOPE): Wrap long line.
10886 (BINDING_HAS_LEVEL_P): Remove parenthesis.
10887 (BINDING_VALUE): Wrap long line.
10888 (BINDING_TYPE): Whitespace.
10889 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10890 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10891 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10892 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10893 (same_type_p): Uppercase macro parameters.
10894 (same_type_ignoring_top_level_qualifiers_p): Likewise.
10895 (OVL_FUNCTION): Wrap long line.
10896 (OVL_CHAIN): Whitespace.
10897 (OVL_CURRENT): Add parenthesis and whitespace.
10898 (OVL_NEXT): Whitespace.
10899 (OVL_USED): Likewise.
10900 (IDENTIFIER_TYPE_VALUE): Likewise.
10901 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10902 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10903 (LANG_ID_FIELD): Whitespace.
10904 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10905 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10906 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10907 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10908 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10909 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10910 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10911 (IDENTIFIER_VIRTUAL_P): Likewise.
10912 (IDENTIFIER_OPNAME_P): Likewise.
10913 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10914 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10915 (C_SET_EXP_ORIGINAL_CODE): Likewise.
10916 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10917 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10918 (IS_AGGR_TYPE): Uppercase macro parameter.
10919 (CLASS_TYPE_P): Likewise.
10920 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10921 (IS_AGGR_TYPE_2): Whitespace.
10922 (TAGGED_TYPE_P): Uppercase macro parameter.
10923 (TYPE_BUILT_IN): Whitespace.
10924 (TYPE_FOR_JAVA): Likewise.
10925 (FUNCTION_ARG_CHAIN): Remove parenthesis.
10926 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10927 (FUNCTION_FIRST_USER_PARAM): Likewise.
10928 (PROMOTES_TO_AGGR_TYPE): Whitespace.
10929 (DERIVED_FROM_P): Add parenthesis and wrap.
10930 (UNIQUELY_DERIVED_FROM_P): Likewise.
10931 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10932 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10933 (CLASSTYPE_USE_TEMPLATE): Whitespace.
10934 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10935 (TYPE_GETS_DELETE): Add parenthesis.
10936 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10937 (TYPE_HAS_ASSIGN_REF): Likewise,
10938 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10939 (TYPE_HAS_INIT_REF): Likewise.
10940 (TYPE_HAS_CONST_INIT_REF): Likewise.
10941 (TYPE_BEING_DEFINED): Likewise.
10942 (TYPE_LANG_SPECIFIC): Likewise.
10943 (CLASSTYPE_RTTI): Likewise.
10944 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10945 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10946 (TYPE_OVERLOADS_ARROW): Likewise.
10947 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10948 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10949 (CLASSTYPE_METHOD_VEC): Likewise.
10950 (CLASSTYPE_MARKED_N): Likewise.
10951 (CLASSTYPE_MARKED): Likewise.
10952 (CLASSTYPE_MARKED2): Likewise.
10953 (CLASSTYPE_MARKED3): Likewise.
10954 (CLASSTYPE_MARKED4): Likewise.
10955 (CLASSTYPE_MARKED5): Likewise.
10956 (CLASSTYPE_MARKED6): Likewise.
10957 (SET_CLASSTYPE_MARKED): Whitespace.
10958 (CLEAR_CLASSTYPE_MARKED): Likewise.
10959 (SET_CLASSTYPE_MARKED2): Likewise.
10960 (CLEAR_CLASSTYPE_MARKED2): Likewise.
10961 (SET_CLASSTYPE_MARKED3): Likewise.
10962 (CLEAR_CLASSTYPE_MARKED3): Likewise.
10963 (SET_CLASSTYPE_MARKED4): Likewise.
10964 (CLEAR_CLASSTYPE_MARKED4): Likewise.
10965 (SET_CLASSTYPE_MARKED5): Likewise.
10966 (CLEAR_CLASSTYPE_MARKED5): Likewise.
10967 (SET_CLASSTYPE_MARKED6): Likewise.
10968 (CLEAR_CLASSTYPE_MARKED6): Likewise.
10969 (CLASSTYPE_TAGS): Likewise.
10970 (CLASSTYPE_VSIZE): Likewise.
10971 (CLASSTYPE_VBASECLASSES): Likewise.
10972 (CANONICAL_BINFO): Add parenthesis.
10973 (CLASSTYPE_SIZE(NODE): Likewise.
10974 (CLASSTYPE_SIZE_UNIT): Likewise.
10975 (CLASSTYPE_ALIGN(NODE): Likewise.
10976 (CLASSTYPE_USER_ALIGN): Likewise.
10977 (TYPE_JAVA_INTERFACE): Likewise.
10978 (CLASSTYPE_PURE_VIRTUALS): Likewise.
10979 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10980 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10981 (CLASSTYPE_HAS_MUTABLE): Likewise.
10982 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10983 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10984 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10985 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10986 (CLASSTYPE_INTERFACE_ONLY): Likewise.
10987 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10988 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10989 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10990 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10991 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10992 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10993 (BINFO_UNSHARED_MARKED): Whitespace.
10994 (BINFO_MARKED): Whitespace and wrap.
10995 (SET_BINFO_MARKED): Likewise.
10996 (CLEAR_BINFO_MARKED): Likewise.
10997 (BINFO_VTABLE_PATH_MARKED): Likewise.
10998 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10999 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
11000 (BINFO_SUBVTT_INDEX): Remove parenthesis.
11001 (BINFO_VPTR_INDEX): Likewise.
11002 (BINFO_PRIMARY_BASE_OF): Likewise,
11003 (CLASSTYPE_VFIELDS): Whitespace.
11004 (VF_DERIVED_VALUE): Wrap long line.
11005 (NAMESPACE_LEVEL): Whitespace.
11006 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
11007 (DEFARG_POINTER): Whitespace.
11008 (DECL_NEEDED_P): Remove parenthesis.
11009 (DECL_LANGUAGE): Whitespace.
11010 (SET_DECL_LANGUAGE): Add parenthesis.
11011 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
11012 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
11013 (DECL_IN_AGGR_P): Whitespace.
11014 (DECL_FRIEND_P): Likewise.
11015 (DECL_BEFRIENDING_CLASSES): Likewise.
11016 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
11017 (DECL_NONCONVERTING_P): Whitespace.
11018 (DECL_PURE_VIRTUAL_P): Likewise.
11019 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
11020 (DECL_PENDING_INLINE_INFO): Whitespace.
11021 (DECL_SORTED_FIELDS): Likewise.
11022 (DECL_DEFERRED_FN): Likewise.
11023 (DECL_TEMPLATE_INFO): Likewise.
11024 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
11025 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
11026 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
11027 (TMPL_ARGS_LEVEL): Likewise.
11028 (SET_TMPL_ARGS_LEVEL): Likewise.
11029 (INNERMOST_TEMPLATE_PARMS): Whitespace.
11030 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
11031 (INTEGRAL_CODE_P(CODE): Add parenthesis.
11032 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
11033 (TYPE_HAS_CONSTRUCTOR): Whitespace.
11034 (TREE_HAS_CONSTRUCTOR): Likewise.
11035 (TYPE_HAS_DESTRUCTOR): Likewise.
11036 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
11037 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
11038 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
11039 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
11040 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
11041 (TYPE_PTRMEMFUNC_P): Likewise.
11042 (TYPE_PTRMEMFUNC_FLAG): Likewise.
11043 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
11044 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
11045 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
11046 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
11047 (DECL_ACCESS): Whitespace.
11048 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
11049 (DECL_GLOBAL_DTOR_P): Likewise.
11050 (GLOBAL_INIT_PRIORITY): Likewise.
11051 (DECL_TEMPLATE_PARMS): Likewise.
11052 (DECL_TEMPLATE_RESULT): Likewise.
11053 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
11054 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
11055 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
11056 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
11057 (PRIMARY_TEMPLATE_P): Add parenthesis.
11058 (DECL_USE_TEMPLATE): Whitespace.
11059 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
11060 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
11061 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
11062 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
11063 (CALL_DECLARATOR_PARMS): Remove parenthesis.
11064 (CALL_DECLARATOR_QUALS): Likewise.
11065 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
11066 (TEMP_NAME_P): Wrap.
11067 (VFIELD_NAME_P): Likewise.
11068 (B_SET): Uppercase macro parameters and add parenthesis.
11069 (B_CLR): Likewise.
11070 (B_TST): Likewise.
11071 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
11072 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
11073 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
11074 (same_or_base_type_p): Likewise.
11075 (cp_deprecated): Likewise.
11076
11077 2002-01-05 Richard Henderson <rth@redhat.com>
11078
11079 * semantics.c (expand_body): Revert last change.
11080
11081 2002-01-04 Jason Merrill <jason@redhat.com>
11082
11083 PR c++/4122
11084 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
11085 lost primary.
11086
11087 * class.c (build_vtbl_initializer): Check for a lost primary
11088 before calculating the vtable entry to throw away.
11089
11090 2002-01-02 Jason Merrill <jason@redhat.com>
11091
11092 * semantics.c (expand_body): Call outlining_inline_function when
11093 emitting an inline function out of line.
11094
11095 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11096
11097 PR c++/5116, c++/764 reversion
11098 * call.c (build_new_op): Revert the instantiations. They are
11099 incorrect.
11100
11101 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11102
11103 PR c++/5089
11104 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
11105
11106 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11107
11108 PR c++/3716
11109 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
11110 (tsubst, case POINTER_TYPE): Handle pmfs here.
11111 (tsubst, case OFFSET_TYPE): Check it is not an offset to
11112 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
11113
11114 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11115
11116 PR c++/35
11117 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
11118 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
11119 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
11120 PARM_DECL.
11121 (tsubst_template_parms): Break up loop statements.
11122 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
11123 parm PARM_DECLs don't get promoted.
11124
11125 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11126
11127 PR c++/5123
11128 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
11129 (build_x_function_call): Cope with a COMPONENT_REF containing a
11130 TEMPLATE_ID_EXPR.
11131
11132 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11133
11134 PR c++/5213
11135 * pt.c (convert_template_argument): Be more careful determining
11136 when RECORD_TYPE templates are or are not templates.
11137
11138 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11139
11140 PR c++/775
11141 * cp-tree.h (handle_class_head): Adjust prototype.
11142 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
11143 parameters. Use for all class heads.
11144 * parse.y (named_class_head_sans_basetype, named_class_head,
11145 named_complex_class_head_sans_basetype,
11146 named_class_head_sans_basetype_defn,
11147 unnamed_class_head): Remove.
11148 (class_head, class_head_apparent_template): Recognize class heads
11149 (class_head_decl, class_head_defn): New reductions. Process class
11150 heads.
11151 (structsp): Adjust class definition and class declaration
11152 reductions.
11153 (maybe_base_class_list): Give diagnostic on empty list.
11154
11155 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11156
11157 PR c++/4379
11158 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
11159 single non-static member.
11160 (unary_complex_lvalue): If it cannot be a pointer to member, don't
11161 make it so. Check it is not pointer to reference.
11162
11163 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11164
11165 PR c++/5132
11166 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
11167 are processing a template decl.
11168
11169 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
11170
11171 PR c++/5116, c++/764
11172 * call.c (build_new_op): Make sure template class operands are
11173 instantiated. Simplify arglist construction.
11174
11175 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11176
11177 * call.c (build_user_type_conversion_1): Use my_friendly_assert
11178 rather than if ... abort.
11179 * cvt.c (convert_to_reference): Likewise.
11180 * semantics.c (setup_vtbl_ptr): Likewise.
11181 * pt.c (lookup_template_class): Comment typo.
11182
11183 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11184
11185 PR c++/5125
11186 * pt.c (push_template_decl_real): Make sure DECL has
11187 DECL_LANG_SPECIFIC.
11188
11189 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
11190
11191 PR c++/335
11192 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
11193 for non-reference fields.
11194 * typeck.c (require_complete_type): Use resolve_offset_ref).
11195
11196 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
11197
11198 PR c++/196
11199 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
11200
11201 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
11202
11203 PR c++/160
11204 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
11205 up. Don't stabilize_references when initializing a reference.
11206
11207 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11208
11209 * decl2.c (lang_f_options): Const-ify.
11210
11211 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
11212
11213 * config-lang.in (diff_excludes): Remove.
11214
11215 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
11216
11217 PR c++/90
11218 * typeck.c (build_function_call_real): Use original function
11219 expression for errors.
11220
11221 2001-12-18 Jason Merrill <jason@redhat.com>
11222
11223 PR c++/3242
11224 * class.c (add_method): Do compare 'this' quals when trying to match a
11225 used function. Don't defer to another used function.
11226
11227 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11228
11229 * pt.c (instantiate_clone): Remove, fold into ...
11230 (instantiate_template): ... here. Simplify by removing mutual
11231 recursion.
11232 * typeck2.c (build_m_component_ref): Don't cv qualify the function
11233 pointed to by a pointer to function.
11234 * class.c (delete_duplicate_fields_1): Typo.
11235
11236 2001-12-18 Jason Merrill <jason@redhat.com>
11237
11238 C++ ABI change: destroy value arguments in caller.
11239 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
11240 create an extra binding level for the parameters.
11241 * decl.c (store_parm_decls): Don't do parameter cleanups.
11242
11243 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
11244
11245 * call.c (build_new_method_call): Use '%#V'.
11246 * error.c (cv_to_string): Use V parameter to determine padding.
11247
11248 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
11249
11250 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
11251 spellings in messages.
11252
11253 2001-12-17 Zack Weinberg <zack@codesourcery.com>
11254
11255 * cp-tree.h: Delete #defines for cp_error, cp_warning,
11256 cp_pedwarn, and cp_compiler_error.
11257 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
11258 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
11259 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
11260 typeck2.c: Change calls to the above macros to use their
11261 language-independent equivalents: error, warning, pedwarn, and
11262 internal_error respectively.
11263
11264 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
11265
11266 * decl2.c (finish_file): Remove back_end_hook.
11267
11268 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
11269
11270 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11271 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11272 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11273
11274 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
11275
11276 * lang-options.h: Use American spelling in messages.
11277
11278 2001-12-13 Jason Merrill <jason@redhat.com>
11279
11280 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11281
11282 Use cleanups to run base and member destructors.
11283 * init.c (push_base_cleanups): New function, split out from...
11284 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
11285 * decl.c (finish_destructor_body): Move vbase destruction code to
11286 push_base_cleanups.
11287 (begin_function_body, finish_function_body): New fns.
11288 (finish_function): Move [cd]tor handling and call_poplevel to
11289 finish_function_body.
11290 (pushdecl): Skip the new level.
11291 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11292 (setup_vtbl_ptr): Call push_base_cleanups.
11293 * method.c (synthesize_method): Call {begin,end}_function_body.
11294 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11295 * cp-tree.h: Declare new fns.
11296 * parse.y (function_body, .begin_function_body): New nonterminals.
11297 (fndef, pending_inline, function_try_block): Use function_body.
11298 (ctor_initializer_opt, function_try_block): No longer has a value.
11299 (base_init): Remove .set_base_init token.
11300 (.set_base_init, compstmt_or_error): Remove.
11301 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11302
11303 * optimize.c (maybe_clone_body): Fix parameter updating.
11304
11305 2001-12-12 Jason Merrill <jason@redhat.com>
11306
11307 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11308 * semantics.c (genrtl_start_function): Don't pass
11309 parms_have_cleanups or push an extra binding level.
11310 (genrtl_finish_function): Lose cleanup_label cruft.
11311
11312 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11313 (ctor_label): Remove.
11314 * semantics.c (finish_return_stmt): Lose ctor_label support.
11315 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11316 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11317 dtor_label.
11318
11319 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11320 check for [cd]tors.
11321 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11322
11323 * decl.c (finish_function): Check VMS_TARGET, not VMS.
11324
11325 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11326 (end_cleanup_fn): And poplevel.
11327
11328 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11329 if we're in a template.
11330
11331 2001-12-12 Jakub Jelinek <jakub@redhat.com>
11332
11333 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11334 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11335 THIS_NAME_P): Delete.
11336 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11337 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11338 with internal naming scheme.
11339 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11340
11341 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
11342
11343 * decl.c (grokdeclarator): Deprecated implicit typename use.
11344
11345 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
11346
11347 PR g++/51
11348 * parse.y (frob_specs): Indicate it is a language linkage which
11349 contained the extern.
11350 * decl.c (grokdeclarator): Allow extern language linkage with
11351 other specifiers.
11352
11353 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
11354
11355 PR g++/72
11356 * decl.c (add_binding): Don't reject duplicate typedefs involving
11357 template parameters.
11358
11359 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
11360
11361 * parse.y, semantics.c: Similarly.
11362
11363 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
11364
11365 PR g++/87
11366 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11367 (copy_args_p): Rename to ...
11368 (copy_fn_p): ... here.
11369 (grok_special_member_properties): New function.
11370 (grok_op_properties): Lose VIRTUALP parameter.
11371 (copy_assignment_arg_p): Remove.
11372 * call.c (build_over_call): Use copy_fn_p.
11373 * decl.c (grokfndecl): Reformat. Adjust call to
11374 grok_op_properties.
11375 (copy_args_p): Rename to ...
11376 (copy_fn_p): ... here. Reject template functions. Check for pass
11377 by value.
11378 (grok_special_member_properties): Remember special functions.
11379 (grok_ctor_properties): Don't remember them here, just check.
11380 (grok_op_properties): Likewise.
11381 (start_method): Call grok_special_member_properties.
11382 * decl2.c (grokfield): Likewise.
11383 (copy_assignment_arg_p): Remove.
11384 (grok_function_init): Don't remember abstract assignment here.
11385 * pt.c (instantiate_class_template): Call
11386 grok_special_member_properties.
11387 (tsubst_decl): Adjust grok_op_properties call.
11388
11389 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
11390
11391 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11392 RID_TYPES_COMPATIBLE_P.
11393
11394 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11395
11396 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11397 call to build_aggr_init.
11398 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11399
11400 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
11401
11402 * parse.y: Replace uses of the string non-terminal with STRING.
11403 Don't perform string concatentaion here.
11404 (string): Remove non-terminal.
11405 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11406
11407 2001-12-05 Jason Merrill <jason@redhat.com>
11408
11409 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11410 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11411 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11412 * pt.c (push_tinst_level): No longer static.
11413 * cp-tree.h: Declare them.
11414
11415 * init.c (resolve_offset_ref): Don't check access for the base
11416 conversion to access a FIELD_DECL.
11417
11418 * cp-tree.h (TYPE_REFFN_P): New macro.
11419 * decl.c (bad_specifiers): Check it, too.
11420
11421 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11422 on the __*_type_info type if we haven't seen a definition.
11423
11424 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
11425
11426 * decl.c: Include c-common.h.
11427 (shadow_warning): Move to c-common.c.
11428
11429 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11430
11431 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11432
11433 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11434
11435 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11436
11437 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11438
11439 PR g++/164
11440 * init.c (sort_base_init): Allow binfos to be directly specified.
11441 * method.c (do_build_copy_constructor): Explicitly convert to the
11442 base instance.
11443 (do_build_assign_ref): Likewise.
11444
11445 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
11446
11447 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11448 declaration and initialization.
11449
11450 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
11451
11452 * typeck2.c: Remove leading capital from diagnostic messages, as
11453 per GNU coding standards.
11454
11455 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
11456
11457 PR c++/3394
11458 * decl.c (xref_basetypes): Handle attributes between
11459 'class' and name.
11460
11461 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
11462
11463 PR g++/3381
11464 * parse.y (named_complex_class_head_sans_basetype): Add new
11465 reduction.
11466 * Make-lang.in (parse.c): Adjust expected conflict count.
11467
11468 2001-12-03 Jason Merrill <jason@redhat.com>
11469
11470 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11471 immediate binfos for our virtual bases.
11472
11473 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
11474
11475 * call.c (build_java_interface_fn_ref): Similarly.
11476 * except.c (is_admissible_throw_operand): Similarly.
11477 * init.c (build_java_class_ref): Similarly.
11478 * xref.c (open_xref_file): Similarly.
11479
11480 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
11481
11482 * class.c (finish_struct): Remove trailing periods from messages.
11483 * decl.c (check_tag_decl): Similarly.
11484 * lex.c (cxx_set_yydebug): Similarly.
11485 * typeck2.c (friendly_abort): Similarly.
11486
11487 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11488
11489 PR c++/3048
11490 * cp-tree.h (ovl_member): Remove.
11491 * decl2.c (merge_functions): Handle extern "C" functions
11492 specially.
11493 * tree.c (ovl_member): Remove.
11494
11495 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11496
11497 PR c++/4842
11498 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11499 FUNCTION_DECL, as input.
11500 (mark_overriders): Remove.
11501 (warn_hidden): Rework for the new ABI.
11502
11503 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11504
11505 PR c++/3471
11506 * call.c (convert_like_real): Do not build additional temporaries
11507 for rvalues of class type.
11508
11509 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
11510
11511 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11512 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11513 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11514 (DERIVED_FROM_P): Likewise.
11515 (enum base_access): Renumber, add ba_quiet bit mask.
11516 (get_binfo): Remove.
11517 (get_base_distance): Remove.
11518 (binfo_value): Remove.
11519 (ACCESSIBLY_DERIVED_FROM_P): Remove.
11520 * call.c (standard_conversion): Use lookup_base.
11521 * class.c (strictly_overrides): Likewise.
11522 (layout_virtual_bases): Likewise.
11523 (warn_about_ambiguous_direct_bases): Likewise.
11524 (is_base_of_enclosing_class): Likewise.
11525 (add_vcall_offset_vtbl_entries_1): Likewise.
11526 * cvt.c (build_up_reference): Adjust comment.
11527 * init.c (build_member_call): Reformat.
11528 * search.c (get_binfo): Remove.
11529 (get_base_distance_recursive): Remove.
11530 (get_base_distance): Remove.
11531 (lookup_base_r): Tweak.
11532 (lookup_base): Add ba_quiet control. Complete the types here.
11533 (covariant_return_p): Use lookup_base.
11534 * tree.c (binfo_value): Remove.
11535 (maybe_dummy_object): Use lookup_base.
11536 * typeck.c (build_static_cast): Use lookup_base.
11537 (get_delta_difference): Likewise.
11538 * typeck2.c (binfo_or_else): Use lookup_base.
11539 (build_scoped_ref): Add back error_mark_check.
11540 (build_m_component_ref): Use lookup_base.
11541
11542 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
11543
11544 * Make-lang.in (c++.generated-manpages): New dummy target.
11545
11546 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11547
11548 * Make-lang.in (cp-lang.o): Depends on c-common.h.
11549 * cp-lang.c (c-common.h): Include.
11550 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11551 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11552 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11553
11554 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
11555
11556 * decl2.c (c_language): Move to c-common.c.
11557 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11558 functions.
11559 (cxx_init): Update.
11560
11561 2001-11-26 Jason Merrill <jason@redhat.com>
11562
11563 * call.c (joust): Remove COND_EXPR hack.
11564
11565 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
11566
11567 * search.c (lookup_base_r): Declare bk in variable declaration
11568 space.
11569
11570 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
11571
11572 PR g++/3145
11573 * class.c (build_vbase_pointer): Remove.
11574 (build_vbase_path): Remove.
11575 (build_base_path): New function.
11576 * cp-tree.h (base_access, base_kind): New enumerations.
11577 (build_base_path): Declare.
11578 (convert_pointer_to_real): Remove.
11579 (convert_pointer_to): Remove.
11580 (lookup_base): Declare.
11581 (convert_pointer_to_vbase): Remove.
11582 * call.c (build_scoped_method_call): Use lookup_base &
11583 build_base_path instead of convert_pointer_to_real,
11584 get_base_distance & get_binfo.
11585 (build_over_call): Likewise.
11586 * cvt.c (cp_convert_to_pointer): Likewise.
11587 (convert_to_pointer_force): Likewise.
11588 (build_up_reference): Likewise.
11589 (convert_pointer_to_real): Remove.
11590 (convert_pointer_to): Remove.
11591 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11592 instead of convert_pointer_to_vbase & build_vbase_path.
11593 (emit_base_init): Use build_base_path instead of
11594 convert_pointer_to_real.
11595 (expand_virtual_init): Lose unrequired conversions.
11596 (resolve_offset_ref): Use lookup_base and build_base_path
11597 instead of convert_pointer_to.
11598 * rtti.c (build_dynamic_cast_1): Use lookup_base &
11599 build_base_path instead of get_base_distance & build_vbase_path.
11600 * search.c (get_vbase_1): Remove.
11601 (get_vbase): Remove.
11602 (convert_pointer_to_vbase): Remove.
11603 (lookup_base_r): New function.
11604 (lookup_base): New function.
11605 * typeck.c (require_complete_type): Use lookup_base &
11606 build_base_path instead of convert_pointer_to.
11607 (build_component_ref): Likewise.
11608 (build_x_function_call): Likewise.
11609 (get_member_function_from_ptrfunc): Likewise.
11610 (build_component_addr): Likewise.
11611 * typeck2.c (build_scoped_ref): Likewise.
11612
11613 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11614
11615 * cp-tree.h (CP_TYPE_QUALS): Removed.
11616 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11617 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11618 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11619 * dump.c (cp_dump_tree): Use void* dump_info argument to match
11620 lang-hooks prototype.
11621 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11622 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11623 CP_TYPE_QUALS changed to cp_type_quals.
11624 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11625 (CXX_C_OBJS): Remove c-dump.o.
11626
11627 2001-11-21 Mark Mitchell <mark@codesourcery.com>
11628
11629 PR c++/3637
11630 * pt.c (lookup_template_class): Ensure that all specializations
11631 are registered on the list corresponding to the most general
11632 template.
11633
11634 2001-11-20 Mark Mitchell <mark@codesourcery.com>
11635
11636 * call.c (non_reference): Add documentation.
11637 (convert_class_to_reference): Do not strip reference types
11638 from conversion operators.
11639 (maybe_handle_ref_bind): Simplify.
11640 (compare_ics): Correct handling of references.
11641
11642 2001-11-19 John Wilkinson <johnw@research.att.com>
11643
11644 * dump.c (dump_op): New function.
11645 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
11646 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11647 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11648
11649 2001-11-19 Mark Mitchell <mark@codesourcery.com>
11650
11651 PR4629
11652 * semantics.c (finish_sizeof): Make sure that expression created
11653 while processing a template do not have a type.
11654 (finish_alignof): Likewise.
11655 * typeck.c (c_sizeof): Likewise.
11656 (expr_sizeof): Likewise.
11657
11658 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
11659
11660 * lex.c (cxx_finish): Call c_common_finish.
11661 (finish_parse): Remove.
11662
11663 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11664
11665 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11666 when displaying error message about missing array bounds.
11667
11668 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11669
11670 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11671 CONST_CAST_EXPR.
11672 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11673
11674 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
11675
11676 * cp-tree.h (print_class_statistics): Restore.
11677
11678 2001-11-15 Jason Merrill <jason@redhat.com>
11679
11680 * method.c (use_thunk): Don't emit debugging information for thunks.
11681
11682 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11683 * decl.c (make_typename_type): Handle getting a class template.
11684 * search.c (lookup_field_r): A class template is good enough for
11685 want_type.
11686
11687 * call.c (convert_like_real): Only use cp_convert for the bad part.
11688 (standard_conversion): Also allow bad int->enum.
11689 * typeck.c (ptr_reasonably_similar): Also allow functions to
11690 interconvert. Pointers to same-size integers are reasonably
11691 similar.
11692
11693 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11694 give it void type.
11695
11696 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
11697
11698 PR g++/3154
11699 * init.c (sort_base_init): Remove unreachable code.
11700 (expand_member_init): Adjust comment to reflect reality. Simplify
11701 and remove unreachable code.
11702
11703 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
11704
11705 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11706 (cxx_init): Update prototype.
11707 * decl.c (init_decl_processing): Rename. Move null node init
11708 to its creation time.
11709 * lex.c (cxx_init_options): Update.
11710 (cxx_init): Combine with old init_parse; also call
11711 cxx_init_decl_processing.
11712
11713 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
11714
11715 * decl.c (check_initializer): Try to complete the type of an
11716 array element before checking whether it's complete. Don't
11717 complain about arrays with complete element types but an
11718 unknown size.
11719 (cp_finish_decl): Build the hierarchical constructor before
11720 calling maybe_deduce_size_from_array_init.
11721
11722 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
11723
11724 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11725
11726 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
11727
11728 PR g++/4206
11729 * parse.y (already_scoped_stmt): Remove.
11730 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11731
11732 2001-11-12 H.J. Lu <hjl@gnu.org>
11733
11734 * cvt.c (ocp_convert): Don't warn the address of a weak
11735 function is always `true'.
11736
11737 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11738
11739 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11740 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11741 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11742 * cp-tree.h (print_class_statistics): Remove.
11743 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11744 cxx_print_identifier, cxx_set_yydebug): New.
11745 * lex.c (set_yydebug): Rename c_set_yydebug.
11746 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11747 lang_print_xnode): Rename.
11748 * tree.c (print_lang_statistics): Rename.
11749
11750 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11751
11752 * class.c (dump_array): Fix format specifier warning.
11753
11754 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11755
11756 * cp-lang.c (LANG_HOOKS_NAME): Override.
11757 (struct lang_hooks): Constify.
11758 * lex.c (cxx_init_options): Update.
11759 (lang_identify): Remove.
11760 * parse.y (language_string): Remove.
11761
11762 2001-11-08 Andreas Franck <afranck@gmx.de>
11763
11764 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11765 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11766 suggested by autoconf.
11767 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11768 (c++.install-common): Use the transformed target alias names.
11769
11770 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11771
11772 * Make-lang.in: Update.
11773 * cp-lang.c: Include langhooks-def.h.
11774
11775 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11776
11777 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11778
11779 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11780
11781 * lex.c (copy_lang_type): Add static prototype.
11782
11783 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11784
11785 * pt.c (unify): Handle SCOPE_REF.
11786
11787 2001-11-01 Jakub Jelinek <jakub@redhat.com>
11788
11789 * tree.c (cp_copy_res_decl_for_inlining): Adjust
11790 DECL_ABSTRACT_ORIGIN for the return variable.
11791
11792 2001-10-31 Zack Weinberg <zack@codesourcery.com>
11793
11794 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11795
11796 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
11797
11798 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11799 semantics.c, spew.c: Fix spelling errors.
11800
11801 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11802
11803 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11804
11805 2001-10-25 Zack Weinberg <zack@codesourcery.com>
11806
11807 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11808 pop_everything.
11809
11810 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11811
11812 * cp-lang.c (cxx_get_alias_set): New function.
11813 Point LANG_HOOKS_GET_ALIAS_SET to it.
11814
11815 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11816
11817 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11818 * cp-tree.h (make_unbound_class_template): Prototype new function.
11819 * decl.c (make_unbound_class_template): New function.
11820 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11821 * error.c (dump_type): Likewise.
11822 * mangle.c (write_type): Likewise.
11823 * parse.y (template_parm): Likewise.
11824 (template_argument): Use make_unbound_class_template.
11825 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11826 (tsubst): Likewise.
11827 (tsubst_copy): Likewise.
11828 (unify): Likewise.
11829 * tree.c (walk_tree): Likewise.
11830 * typeck.c (comptypes): Likewise.
11831
11832 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11833
11834 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11835 extra calls into fewer ones.
11836
11837 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
11838
11839 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11840 Warn when merging inline with attribute noinline.
11841 (start_decl, start_function): Warn if inline and attribute
11842 noinline appear in the same declaration.
11843
11844 2001-10-16 H.J. Lu <hjl@gnu.org>
11845
11846 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11847 for tree checking disabled.
11848
11849 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
11850
11851 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11852 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11853
11854 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11855
11856 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11857 (unify): Only handle MINUS_EXPR specially if the above flag is set
11858 and the subtracted constant is 1. Clear the flag on recursive calls.
11859 Set it when unifying the maximum value in an INTEGER_TYPE's range.
11860
11861 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11862
11863 * decl.c (bad_specifiers): Don't allow exception specifications
11864 on any typedefs.
11865
11866 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
11867
11868 * cp/lex.c (init_cp_pragma): Similarly.
11869
11870 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11871
11872 * pt.c (lookup_template_class): Build complete template arguments
11873 for BOUND_TEMPLATE_TEMPLATE_PARM.
11874
11875 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11876
11877 * cp-tree.h (TYPE_BINFO): Update comment.
11878 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11879 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11880 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11881 (copy_type): Prototype new function.
11882 * lex.c (copy_lang_decl): Gather tree node statistics.
11883 (copy_lang_type): New function.
11884 (copy_type): Likewise.
11885 (cp_make_lang_type): Create lang_type for
11886 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
11887 and BOUND_TEMPLATE_TEMPLATE_PARM.
11888 * pt.c (tsubst): Use copy_type instead of copy_node.
11889 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11890
11891 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11892
11893 * pt.c (determine_specialization): Ignore functions without
11894 DECL_TEMPLATE_INFO.
11895
11896 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
11897
11898 PR g++/4476
11899 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11900
11901 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
11902
11903 * typeck2.c (store_init_value): Don't re-digest a bracketed
11904 initializer.
11905
11906 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11907 ANON_AGGR_TYPE_P.
11908
11909 2001-10-11 Richard Henderson <rth@redhat.com>
11910
11911 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11912 of an asm statement.
11913 (build_vtbl_ref_1): Split out from build_vtbl_ref.
11914 (build_vfn_ref): Use it to handle vtable descriptors before
11915 calling build_vtable_entry_ref.
11916 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11917
11918 2001-10-10 Richard Henderson <rth@redhat.com>
11919
11920 * parse.y (asm_operand): Allow named operands.
11921 * semantics.c (finish_asm_stmt): Tweek for changed location
11922 of the operand constraint.
11923
11924 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
11925
11926 * call.c (standard_conversion): Add bad conversion between
11927 integers and pointers.
11928 (convert_like_real): Don't use convert_for_initialization for bad
11929 conversions; complain here and use cp_convert.
11930 (build_over_call): Don't handle bad conversions specially.
11931 (perform_implicit_conversion): Allow bad conversions.
11932 (can_convert_arg_bad): New fn.
11933 * cp-tree.h: Declare it.
11934 * typeck.c (convert_for_assignment): Use it.
11935 (ptr_reasonably_similar): Any target type is similar to void.
11936
11937 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
11938
11939 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11940 (cp/cp-lang.o): New rule.
11941 * cp-tree.h: Declare hooks.
11942 * tree.c: Make hooks non-static.
11943 (init_tree): Don't initialize hooks here.
11944 * lex.c: Likewise. Move definition of lang_hooks to...
11945 * cp-lang.c: ... new file.
11946
11947 2001-10-08 Richard Henderson <rth@redhat.com>
11948
11949 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11950 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11951
11952 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11953
11954 * class.c (build_vtable_entry_ref): Const-ify.
11955 * decl.c (predefined_identifier,
11956 initialize_predefined_identifiers): Likewise.
11957 * init.c (build_new_1): Likewise.
11958 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11959 Likewise.
11960
11961 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
11962
11963 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11964 (INSNS_PER_STMT): Likewise.
11965 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11966 (copy_body, initialize_inlined_parameters): Likewise.
11967 (declare_return_variable, inlinable_function_p): Likewise.
11968 (expand_call_inline, expand_calls_inline): Likewise.
11969 (optimize_inline_calls, clone_body): Likewise.
11970 * tree.c (walk_tree): Moved to ../tree-inline.c.
11971 (walk_tree_without_duplicates): Likewise.
11972 (copy_tree_r, remap_save_expr): Likewise.
11973
11974 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
11975
11976 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11977 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11978 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11979 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11980 (flag_inline_trees): Moved declaration to ../tree-inline.h.
11981 (walk_tree): Moved declaration to ../tree-inline.h.
11982 (walk_tree_without_duplicates, copy_tree_r): Likewise.
11983 (remap_save_expr): Likewise.
11984 * decl.c: Include tree-inline.h.
11985 (lang_mark_tree): Don't mark inlined_fns.
11986 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11987 * optimize.c: Include tree-inline.h.
11988 (optimize_inline_calls): Move declaration to ../tree.h, as
11989 non-static.
11990 (remap_decl): Use language-independent constructs and hooks.
11991 (remap_block, copy_body_r, declare_return_variable): Likewise.
11992 (inlinable_function_p): Likewise. Don't test for
11993 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11994 no longer language-specific.
11995 (optimize_inline_calls): Likewise. Make it non-static. Moved
11996 call of dump_function to...
11997 (optimize_function): Here...
11998 (clone_body): New function, extracted from...
11999 (maybe_clone_body): ... here. Build decl_map locally and pass
12000 it on to clone_body.
12001 * pt.c, semantics.c: Include tree-inline.h.
12002 * tree.c: Likewise.
12003 (cp_walk_subtrees): New language-specific hook for tree inlining.
12004 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
12005 cp_is_overload_p, cp_auto_var_in_fn_p,
12006 cp_copy_res_decl_for_inlining): Likewise.
12007 (walk_tree): Move language-specific constructs into...
12008 (cp_walk_subtrees): this new function.
12009 (copy_tree_r): Use language-independent constructs and hooks.
12010 (init_tree): Initialize tree inlining hooks.
12011 (remap_save_expr): Adjust prototype so that the declaration
12012 does not require the definition of splay_tree.
12013
12014 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
12015
12016 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
12017 to build the declaration instead of the declaration itself.
12018
12019 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
12020
12021 * decl2.c (cxx_decode_option): Add 'else'.
12022
12023 * spew.c (end_input): No longer static.
12024 * cp-tree.h: Declare it.
12025 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
12026
12027 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
12028
12029 * call.c (build_over_call), typeck.c (build_function_call_real):
12030 Pass type attributes to check_function_format rather than name or
12031 assembler name. Don't require there to be a name or assembler
12032 name to check formats.
12033
12034 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
12035
12036 * decl.c (init_decl_processing): Don't call
12037 init_function_format_info. Initialize lang_attribute_table
12038 earlier.
12039 (builtin_function): Call decl_attributes.
12040 (insert_default_attributes): New.
12041
12042 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
12043
12044 * decl.c (grokdeclarator): Copy array typedef handling from C
12045 frontend.
12046
12047 * decl.c (grokdeclarator): Copy too-large array handling from C
12048 frontend.
12049
12050 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
12051
12052 * config-lang.in (target_libs): Added target-gperf, so that we
12053 don't try to build it if C++ is disabled.
12054
12055 2001-09-23 Zack Weinberg <zack@codesourcery.com>
12056
12057 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
12058 (cp/errfn.o): Delete rule.
12059 (cp/error.o): Depend on flags.h.
12060 * errfn.c: Delete file.
12061 * cp-tree.h: Declare warn_deprecated. Remove definitions of
12062 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
12063 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
12064 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
12065 internal_error respectively. Make cp_deprecated into a macro.
12066 Don't define cp_printer typedef or declare cp_printers.
12067 * error.c: Include flags.h.
12068 Delete: struct tree_formatting_info, print_function_argument_list,
12069 print_declaration, print_expression, print_function_declaration,
12070 print_function_parameter, print_type_id, print_cv_qualifier_seq,
12071 print_type_specifier_seq, print_simple_type_specifier,
12072 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
12073 print_parameter_declaration_clause, print_exception_specification,
12074 print_nested_name_specifier, and definition of cp_printers.
12075 (locate_error): New function.
12076 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
12077 rewritten in terms of locate_error and diagnostic.c.
12078 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
12079 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
12080 (init_error): Adjust to match.
12081
12082 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12083
12084 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
12085
12086 2001-09-21 Richard Henderson <rth@redhat.com>
12087
12088 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
12089 (build_vtbl_initializer): Likewise.
12090 (build_vfn_ref): New.
12091 * cp-tree.h: Declare it.
12092 * call.c (build_over_call): Use it.
12093 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
12094 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
12095
12096 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
12097
12098 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
12099
12100 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
12101
12102 Table-driven attributes.
12103 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
12104 * decl2.c (cplus_decl_attributes): Only take one attributes
12105 parameter.
12106 * cp-tree.c (cplus_decl_attributes): Update prototype.
12107 * class.c (finish_struct), decl.c (start_decl, start_function),
12108 decl2.c (grokfield), friend.c (do_friend), parse.y
12109 (parse_bitfield): Update calls to cplus_decl_attributes.
12110 * decl.c (grokdeclarator): Take a pointer to a single ordinary
12111 attribute list.
12112 * decl.h (grokdeclarator): Update prototype.
12113 * decl2.c (grokfield): Take a single ordinary attribute list.
12114 * friend.c (do_friend): Likewise.
12115 * decl.c (shadow_tag, groktypename, start_decl,
12116 start_handler_parms, grokdeclarator, grokparms, start_function,
12117 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
12118 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
12119 (process_template_parm, do_decl_instantiation): Pass single
12120 ordinary attribute lists around.
12121 * decl.c (grokdeclarator): Correct handling of nested attributes.
12122 Revert the patch
12123 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
12124 * decl.c (grokdeclarator): Embedded attrs bind to the right,
12125 not the left.
12126 .
12127 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
12128 (cp_attribute_table): Declare.
12129 * decl.c (valid_lang_attribute): Don't define.
12130 (lang_attribute_table): Define.
12131 (init_decl_processing): Initialize lang_attribute_table instead of
12132 valid_lang_attribute.
12133 * tree.c (cp_valid_lang_attribute): Remove.
12134 (handle_java_interface_attribute, handle_com_interface_attribute,
12135 handle_init_priority_attribute): New functions.
12136 (cp_attribute_table): New array.
12137 * decl2.c (import_export_class): Don't use
12138 targetm.valid_type_attribute.
12139
12140 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12141
12142 * Make-lang.in (cp/error.o): Depend on real.h
12143 * error.c: #include "real.h"
12144
12145 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12146
12147 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
12148 xmalloc/strcpy/strcat.
12149
12150 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12151
12152 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
12153 Const-ification.
12154 * pt.c (tsubst_decl): Likewise.
12155
12156 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12157
12158 * decl2.c (lang_f_options): Const-ification.
12159 * lex.c (cplus_tree_code_name): Likewise.
12160 * spew.c (yyerror): Likewise.
12161
12162 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12163
12164 PR c++/3986
12165 * class.c (force_canonical_binfo_r): Check & move an indirect
12166 primary base first.
12167 (force_canonical_binfo): Check that it's not already
12168 canonical.
12169 (mark_primary_virtual_base): Remove BINFO parameter.
12170 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
12171
12172 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
12173
12174 Remove TYPE_NONCOPIED_PARTS.
12175 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
12176 CLASSTYPE_PURE_VIRTUALS.
12177 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
12178 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
12179 (layout_class_type): Don't call fixup_inline_methods here ...
12180 (finish_struct_1): ... call it here.
12181
12182 2001-09-04 Mark Mitchell <mark@codesourcery.com>
12183
12184 * decl.c (duplicate_decls): Remove code deadling with
12185 DECL_SAVED_INSNS.
12186 * decl2.c (finish_file): Likewise.
12187 * pt.c (instantiate_decl): Likewise.
12188 * semantics.c (expand_body): Don't defer local functions if
12189 they wouldn't be deferred for some other reason. Don't
12190 generate RTL for functions that will not be emitted.
12191 (genrtl_start_function): Remove code deadling with
12192 DECL_SAVED_INSNS.
12193 (genrtl_finish_function): Likewise.
12194
12195 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
12196
12197 PR c++/4203
12198 * call.c (build_over_call): Do not optimize any empty base
12199 construction.
12200
12201 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12202
12203 * error.c (dump_template_decl): Output template parameters
12204 together with their specifiers.
12205 Output `class' prefix for template template parameter.
12206 (dump_decl): Fix formatting.
12207
12208 2001-08-30 Kurt Garloff <garloff@suse.de>
12209
12210 * optimize.c (inlinable_function_p): Allow only smaller single
12211 functions. Halve inline limit after reaching recursive limit.
12212
12213 2001-08-30 Joern Rennecke <amylaar@redhat.com>
12214 Jason Merrill <jason_merrill@redhat.com>
12215
12216 * class.c (build_vtable_entry_ref): Subtract in char*, not
12217 ptrdiff_t.
12218
12219 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
12220
12221 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
12222 (build_cplus_array_type): Use cp_build_qualified_type, not
12223 TYPE_MAIN_VARIANT, to get an unqualified version.
12224
12225 * decl2.c (grok_alignof): Lose.
12226 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
12227 * typeck.c (c_alignof): Lose.
12228 * semantics.c (finish_sizeof, finish_alignof): New.
12229 * parse.y: Use them.
12230 * cp-tree.h: Declare them.
12231
12232 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
12233
12234 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
12235 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
12236 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
12237
12238 2001-08-19 Jakub Jelinek <jakub@redhat.com>
12239
12240 * typeck2.c (add_exception_specifier): Only require complete type if
12241 not in processing template declaration.
12242
12243 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12244
12245 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
12246 GNU_xref_start_scope and GNU_xref_end_scope.
12247
12248 * tree.c (TYPE_HASH): Moved to ../tree.h.
12249
12250 2001-08-16 Mark Mitchell <mark@codesourcery.com>
12251
12252 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
12253 on COMPOUND_EXPRs.
12254
12255 2001-08-14 Richard Henderson <rth@redhat.com>
12256
12257 * class.c, cp-tree.h (build_vfn_ref): Remove.
12258 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
12259
12260 2001-08-13 Mark Mitchell <mark@codesourcery.com>
12261
12262 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12263 empty class assignment as having side-effects to avoid
12264 spurious warnings.
12265
12266 2001-08-13 Zack Weinberg <zackw@panix.com>
12267
12268 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12269 * except.c: Include libfuncs.h.
12270
12271 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12272
12273 * decl.c (grokdeclarator): Clarify diagnostic message.
12274
12275 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12276
12277 * decl2.c (do_nonmember_using_decl): Replace using directive
12278 with using declaration in the error message.
12279
12280 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12281
12282 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12283 criterion to avoid rebuilding expression tree instead of
12284 processing_template_decl.
12285
12286 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12287
12288 Support named return value optimization for inlines, too.
12289 * decl.c (finish_function): Nullify returns here.
12290 * semantics.c (genrtl_start_function): Not here.
12291 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12292 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
12293 Also nullify the CLEANUP_STMT for the nrv.
12294 * cp-tree.h: Declare it.
12295 * optimize.c (declare_return_variable): Replace the nrv with the
12296 return variable.
12297 * typeck.c (check_return_expr): Be more flexible on alignment check.
12298 Ignore cv-quals when checking for a matching type.
12299
12300 2001-08-09 Richard Henderson <rth@redhat.com>
12301
12302 * decl2.c (finish_objects): Use target hooks instead of
12303 assemble_constructor and assemble_destructor.
12304
12305 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
12306
12307 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12308
12309 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
12310
12311 PR c++/3820
12312 Stop using TYPE_NONCOPIED_PARTS.
12313 * call.c (build_over_call): Be careful when copy constructing
12314 or assigning to an empty class.
12315 * class.c (check_bases_and_members): It has a
12316 COMPLEX_ASSIGN_REF if it has a vptr.
12317 (layout_class_type): Don't add empty class padding to
12318 TYPE_NONCOPIED_PARTS.
12319 (finish_struct_1): Don't add the VFIELD either.
12320 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12321 initialization.
12322
12323 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12324
12325 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12326
12327 2001-08-06 Richard Henderson <rth@redhat.com>
12328
12329 * decl2.c (finish_objects): Pass a symbol_ref and priority to
12330 assemble_{constructor,destructor}. Remove priority handling.
12331
12332 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12333
12334 Don't allow template-id in using-declaration.
12335 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12336 (do_class_using_decl): Likewise.
12337
12338 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12339
12340 * cp/spew.c (read_token): No need to pop buffers.
12341
12342 2001-08-02 Stan Shebs <shebs@apple.com>
12343
12344 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12345 (fnaddr_from_vtable_entry): Remove decl.
12346 * method.c (use_thunk): Update comment.
12347
12348 2001-08-01 Andrew Cagney <ac131313@redhat.com>
12349
12350 * repo.c (get_base_filename): Change return value to const char
12351 pointer.
12352
12353 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
12354
12355 Kill -fhonor-std.
12356 * NEWS: Document.
12357 * cp-tree.h (flag_honor_std): Remove.
12358 (CPTI_FAKE_STD): Remove.
12359 (std_node): Remove comment about it being NULL.
12360 (fake_std_node): Remove.
12361 * decl.c (in_fake_std): Remove.
12362 (walk_namespaces_r): Remove fake_std_node check.
12363 (push_namespace): Remove in_fake_std code.
12364 (pop_namespace): Likewise.
12365 (lookup_name_real): Remove fake_std_node check.
12366 (init_decl_processing): Always create std_node. Always add
12367 std:: things there.
12368 (builtin_function): Always put non '_' fns in std.
12369 * decl2.c (flag_honor_std): Remove.
12370 (lang_f_options): Remove honor-std.
12371 (unsupported_options): Add honor-std.
12372 (set_decl_namespace): Remove fake_std_node check.
12373 (validate_nonmember_using_decl): Likewise.
12374 (do_using_directive): Likewise.
12375 (handle_class_head): Likewise.
12376 * dump.c (cp_dump_tree): Likewise.
12377 * except.c (init_exception_processing): Adjust.
12378 * init.c (build_member_call): Remove fake_std_node check.
12379 (build_offset_ref): Likewise.
12380 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12381 * rtti.c (init_rtti_processing): Adjust.
12382
12383 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
12384
12385 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12386 operand while calling cp_tree_equal.
12387
12388 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12389
12390 The 3.0 ABI no longer has vbase pointer fields.
12391 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12392 FORMAT_VBASE_NAME): Remove.
12393 * method.c (do_build_copy_constructor): Adjust.
12394 (do_build_assign_ref): Adjust.
12395 * search.c (lookup_field_r): Adjust.
12396 * typeck.c (build_component_ref): Adjust.
12397
12398 The 3.0 ABI always has a vtable pointer at the start of every
12399 polymorphic class.
12400 * rtti.c (build_headof_sub): Remove.
12401 (build_headof): Adjust.
12402 (get_tinfo_decl_dynamic): No need to check flag_rtti
12403 here. Adjust.
12404 (create_real_tinfo_var): Explain why we need a hidden name.
12405
12406 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12407
12408 PR c++/3631
12409 * class.c (update_vtable_entry_for_fn): The fixed adjustment
12410 of a virtual thunk should be from declaring base.
12411
12412 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12413
12414 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12415 the shared virtual base, so preserving inheritance graph order.
12416
12417 2001-07-30 Andreas Jaeger <aj@suse.de>
12418
12419 * decl2.c: Remove unused var global_temp_name_counter.
12420
12421 2001-07-28 Richard Henderson <rth@redhat.com>
12422
12423 * method.c (pending_inlines): Remove.
12424
12425 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12426
12427 * class.c (mark_primary_virtual_base): Don't adjust base
12428 offsets here.
12429 (dfs_unshared_virtual_bases): Adjust them here.
12430 (mark_primary_bases): Explain why we adjust at the end.
12431
12432 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12433
12434 * class.c (finish_struct_1): When copying the primary base's
12435 VFIELD, make sure we find it is at offset zero.
12436
12437 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12438
12439 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12440 tsubst_expr for default template arguments.
12441
12442 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12443
12444 PR c++/3621
12445 * spew.c (yylex): Only copy the token's lineno, if it is
12446 nonzero.
12447
12448 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12449
12450 PR c++/3624
12451 * call.c (resolve_args): Simplify, call
12452 convert_from_reference.
12453 (build_new_op): Resolve and convert from reference ARG1
12454 earlier. Adjust ARG2 & ARG3 resolve and conversion.
12455
12456 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12457
12458 * decl.c (last_function_parm_tags): Remove.
12459 (current_function_parm_tags): Remove.
12460 (init_decl_processing): Adjust.
12461 (start_function): Adjust.
12462 (store_parm_decls): Adjust.
12463
12464 PR c++/3152
12465 * decl.c (grokdeclarator): Detect when a function typedef is
12466 declaring a function, and create last_function_parms correctly.
12467
12468 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
12469
12470 * call.c (joust): Only prefer a non-builtin candidate to a builtin
12471 one if they have the same signature.
12472
12473 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
12474 it rather than toplevel_bindings_p. Give it a mangled name if static.
12475 (convert_to_reference): Adjust.
12476 * decl2.c (get_temp_name): Lose.
12477 * mangle.c (mangle_ref_init_variable): New fn.
12478 (mangle_guard_variable): Strip the ref-init header.
12479 * cp-tree.h: Adjust.
12480 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12481 initializer.
12482 (grok_reference_init): Always use DECL_INITIAL.
12483
12484 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12485
12486 PR c++/3416
12487 * call.c (build_conditional_expr): Recheck args after
12488 conversions.
12489 * cp-tree.h (build_conditional_expr): Move to correct file.
12490 * typeck.c (decay_conversion): Diagnose any unknown types
12491 reaching here.
12492 (build_binary_op): Don't do initial decay or default
12493 conversions on overloaded functions.
12494 (build_static_cast): Don't do a decay conversion here.
12495
12496 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12497
12498 PR c++/3543
12499 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12500 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12501
12502 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12503
12504 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12505 (create_vtbl_ptr): ... here.
12506
12507 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12508
12509 * class.c (build_vbase_offset_vbtl_entries): Look for
12510 non-primary base of which we are a sub vtable.
12511
12512 2001-07-24 Phil Edwards <pme@sources.redhat.com>
12513
12514 * semantics.c (finish_this_expr): Remove unused code.
12515
12516 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
12517
12518 Simplify rtti, now we've only one ABI.
12519 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12520 CPTI_TINFO_VAR_ID.
12521 (tinfo_decl_id, tinfo_var_id): Remove.
12522 (get_typeid_1): Remove.
12523 * rtti.c
12524 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12525 (typeid_ok_p): New function.
12526 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12527 (get_tinfo_decl): Remove old abi documentation.
12528 (tinfo_from_decl): Remove.
12529 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12530 (get_typeid_1): Remove.
12531 (get_base_offset): Remove.
12532 (synthesize_tinfo_var): Absorb get_base_offset.
12533 (create_real_tinfo_var): Don't use tinfo_decl_id.
12534
12535 2001-07-23 Graham Stott <grahams@redhat.com>
12536
12537 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12538 variable has_two_argument_delete_p.
12539
12540 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
12541
12542 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12543 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12544 (CPTI_INDEX_IDENTIFIER): Remove.
12545 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12546 (delta2_identifier): Remove.
12547 (index_identifier): Remove.
12548 (pfn_or_delta2_identifier): Remove.
12549 (flag_vtable_thunks): Remove.
12550 (VTABLE_DELTA2_NAME): Remove.
12551 (VTABLE_INDEX_NAME): Remove.
12552 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12553 (vfunc_ptr_type_node): Adjust.
12554 (VTABLE_NAME_PREFIX): Adjust.
12555 (build_vfn_ref): Lose first parameter.
12556 (fixup_all_virtual_upcast_offsets): Remove.
12557 * decl.c (initialize_predefined_identifiers): Remove
12558 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12559 (init_decl_processing): Remove no-vtable-thunk code.
12560 * decl2.c (flag_vtable_thunks): Remove.
12561 (mark_vtable_entries): Remove no-vtable-thunk code.
12562 * error.c (dump_decl): Remove no-vtable-thunk code.
12563 (dump_expr): Adjust ptr to member function code.
12564 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12565 code.
12566 * rtti.c (build_headof): Remove no-vtable-thunk code.
12567 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12568 * search.c (get_base_distance): Remove expand_upcast_fixups case.
12569 (virtual_context) Remove.
12570 (expand_upcast_fixups): Remove.
12571 (fixup_virtual_upcast_offsets): Remove.
12572 (fixup_all_virtual_upcast_offsets): Remove.
12573 * typeck.c (get_member_function_from_ptrfunc): Remove
12574 no-vtable-thunk code.
12575 * call.c (build_over_call): Adjust call to build_vfn_ref.
12576 * class.c (build_vfn_ref): Lose first parameter. Remove
12577 no-vtable-thunk code.
12578 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12579 (build_vtable_entry): Remove no-vtable-thunk code.
12580
12581 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
12582
12583 Remove old-abi remnants. Remove comments about old abi
12584 behavior. Remove references to 'new-abi' in comments.
12585 * cp-tree.h: Adjust comments.
12586 (vbase_offsets_in_vtable_p): Delete.
12587 (vcall_offsets_in_vtable_p): Delete.
12588 (vptrs_present_everywhere_p): Delete.
12589 (all_overridden_vfuns_in_vtables_p): Delete.
12590 (merge_primary_and_secondary_vtables_p): Delete.
12591 (TYPE_CONTAINS_VPTR_P): Adjust.
12592 (VTT_NAME_PREFIX): Remove.
12593 (CTOR_VTBL_NAME_PREFIX): Remove.
12594 (init_vbase_pointers): Remove.
12595 * class.c: Adjust coments.
12596 (build_vbase_pointer_fields): Delete.
12597 (build_vbase_pointer): Remove old-abi code.
12598 (build_secondary_vtable): Likewise.
12599 (modify_all_vtables): Likewise.
12600 (create_vtable_ptr): Likewise.
12601 (layout_class_type): Likewise.
12602 (finish_struct_1): Likewise.
12603 (finish_vtbls): Likewise.
12604 (dfs_finish_vtbls): Delete.
12605 (build_vbase_offset_vtbl_entries): Remove old-abi code.
12606 * cvt.c: Adjust comments.
12607 * decl.c: Adjust comments.
12608 * decl2.c: Adjust comments.
12609 * init.c: Adjust comments.
12610 (construct_virtual_bases): Remove old-abi code.
12611 * lang-specs.h: Remove -fno-new-abi.
12612 * mangle.c: Adjust comments.
12613 * rtti.c: Adjust comments.
12614 (get_base_offset): Remove old-abi-code.
12615 * search.c: Adjust comments.
12616 (dfs_init_vbase_pointers): Remove.
12617 (dfs_vtable_path_unmark): Remove.
12618 (init_vbase_pointers): Remove.
12619 * semantics.c: Adjust comments.
12620 (emit_associated_thunks): Remove old-abi code.
12621 * typeck.c: Adjust comments.
12622
12623 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
12624
12625 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12626 params.h.
12627
12628 2001-07-19 Mark Mitchell <mark@codesourcery.com>
12629
12630 * class.c (finish_struct_anon): Forbid nested classes.
12631
12632 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12633
12634 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12635 * optimize.c: Include debug.h.
12636 (maybe_clone_body): Use debug hook.
12637 * semantics.c: Include debug.h.
12638 (expand_body): Use debug hook.
12639
12640 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12641
12642 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12643
12644 2001-07-18 Mark Mitchell <mark@codesourcery.com>
12645
12646 * class.c (type_requires_array_cookie): New function.
12647 (check_methods): Don't try to figure out whether the type needs a
12648 cookie here.
12649 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12650 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12651 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12652 * pt.c (instantiate_class_template): Don't set
12653 TYPE_VEC_DELETE_TAKES_SIZE.
12654 * NEWS: Document ABI changes from GCC 3.0.
12655
12656 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
12657 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12658
12659 * NEWS (Changes in GCC 3.0): Fix typo.
12660
12661 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
12662
12663 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12664 which attributes are to be attached, and a flags argument. Update
12665 call to decl_attributes.
12666 (grokfield): Update call to decl_attributes.
12667 * class.c (finish_struct): Update call to cplus_decl_attributes.
12668 * cp-tree.h (cplus_decl_attributes): Update prototype.
12669 * decl.c (start_decl, grokdeclarator, start_function): Update
12670 calls to decl_attributes and cplus_decl_attributes.
12671 * friend.c (do_friend): Update call to cplus_decl_attributes.
12672 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12673
12674 2001-07-12 Mark Mitchell <mark@codesourcery.com>
12675
12676 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12677 for `register' variables with an asm-specification.
12678
12679 2001-07-11 Mark Mitchell <mark@codesourcery.com>
12680
12681 * semantics.c (finish_asm_stmt): Mark the output operands
12682 to an asm addressable, if necessary.
12683
12684 2001-07-11 Ben Elliston <bje@redhat.com>
12685
12686 * Revert this change -- there is a subtle bug.
12687
12688 PR c++/80
12689 * decl.c (finish_enum): New "attributes" argument; pass it to
12690 cplus_decl_attributes. Use a narrower type if the enum is packed.
12691 * cp-tree.h (finish_enum): Adjust prototype.
12692 * parse.y (enum_head): New non-terminal.
12693 (structsp): Use it. Enums now may be preceded or followed by
12694 optional attributes -- pass their chained tree to finish_enum().
12695 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12696
12697 2001-07-10 Mark Mitchell <mark@codesourcery.com>
12698
12699 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12700 variables.
12701
12702 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
12703
12704 * semantics.c (cp_expand_stmt): Fix for null
12705 current_function_return_value.
12706
12707 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
12708
12709 * call.c (build_op_delete_call): Initialize fn.
12710 (convert_like_real): Delete conditional.
12711 (joust): Initialize *w and *l.
12712 * class.c: Add prototype for binfo_ctor_vtable.
12713 (get_primary_binfo): Initialize result.
12714 * init.c (build_java_class_ref): Initialize name.
12715
12716 2001-07-09 Erik Rozendaal <dlr@acm.org>
12717
12718 * typeck.c (unary_complex_lvalue): Do not duplicate the
12719 argument to modify, pre-, or post-increment when used as an
12720 lvalue and when the argument has side-effects.
12721
12722 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12723
12724 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12725 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
12726 cplus_decl_attributes even if attrs is NULL.
12727 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12728
12729 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12730
12731 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12732 calls to decl_attributes.
12733
12734 2001-07-06 Ira Ruben <ira@apple.com>
12735
12736 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12737 be DECL_TEMPLATE_RESULT.
12738
12739 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12740
12741 * cp-tree.h (copy_template_template_parm): Rename to ...
12742 (bind_template_template_parm): ... here.
12743 * tree.c (copy_template_template_parm): Rename to ...
12744 (bind_template_template_parm): ... here. Remove the case when
12745 NEWARGS is NULL_TREE.
12746 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12747 BOUND_TEMPLATE_TEMPLATE_PARM.
12748 * pt.c (lookup_template_class): Adjust.
12749
12750 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
12751
12752 * cvt.c (convert_lvalue): New fn.
12753 * cp-tree.h: Declare it.
12754 * method.c (do_build_assign_ref): Use it.
12755 (do_build_copy_constructor): Convert parm to base types
12756 before calling base constructors.
12757
12758 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12759 DECL_USER_ALIGN. Check flag_elide_constructors instead of
12760 optimize.
12761 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12762
12763 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
12764
12765 * optimize.c (optimize_inline_calls): New function, broken out
12766 of ...
12767 (optimize_function): ... here. Call it. Don't inline if it is
12768 a thunk.
12769 (dump_function): Print name of dump flag causing this dump.
12770 * semantics.c (expand_body): Move thunk inline check to
12771 optimize_function.
12772
12773 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
12774
12775 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12776 (comptypes): Use target.comp_type_attributes.
12777
12778 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
12779
12780 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12781
12782 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12783
12784 * error.c (lang_print_error_function): Add a `diagnostic_context *'
12785 parameter. Tweak.
12786
12787 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12788
12789 * decl2.c (import_export_class): Update.
12790
12791 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12792
12793 * error.c (init_error): Adjust settings.
12794
12795 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12796
12797 * error.c (init_error): Adjust settings.
12798
12799 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
12800
12801 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12802 return pointers to data members by reference rather than by value.
12803
12804 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
12805
12806 Implement the Named Return Value optimization.
12807 * cp-tree.h (struct cp_language_function): Add x_return_value.
12808 (current_function_return_value): Now a macro.
12809 * decl.c: Don't define it.
12810 (define_label, finish_case_label): Don't clear it.
12811 (init_decl_processing): Don't register it with GC.
12812 * semantics.c (genrtl_finish_function): Don't check it for
12813 no_return_label. Copy the RTL from the return value to
12814 current_function_return_value and walk, calling...
12815 (nullify_returns_r): ...this new fn.
12816 * typeck.c (check_return_expr): Set current_function_return_value.
12817
12818 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
12819
12820 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12821 sharing a ctor vtable with. Merge code for cases 1 and 2.
12822 (binfo_ctor_vtable): New fn.
12823 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12824
12825 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
12826
12827 * class.c (dfs_find_final_overrider): Fix logic.
12828
12829 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12830 virtual thunk instead of non-virtual.
12831 (get_matching_virtual): Uncomment.
12832
12833 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12834 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
12835 PARM, not ARG.
12836
12837 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
12838
12839 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12840 we've not emerged from the hierarchy of RTTI_BINFO on reaching
12841 a non-virtual base.
12842
12843 2001-06-13 Mark Mitchell <mark@codesourcery.com>
12844
12845 * NEWS: Update release number.
12846
12847 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12848
12849 PR c++/3130, c++/3131, c++/3132
12850 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12851 * class.c (force_canonical_binfo_r): Move
12852 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12853 virtual bases unless they're primary and what they're primary
12854 too has been moved.
12855 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12856 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12857 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12858 derived binfo.
12859 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12860 (layout_nonempty_base_or_field): Add most derived type
12861 parameter. Adjust.
12862 (layout_empty_base): Likewise.
12863 (build_base_field): Likewise.
12864 (build_base_fields): Likewise.
12865 (propagate_binfo_offsets): Add most derived type
12866 parameter. Skip non canonical virtual bases too.
12867 (dfs_set_offset_for_unshared_vbases): Don't skip primary
12868 bases. Do skip canonical bases.
12869 (layout_virtual_bases): Adjust.
12870 (layout_class_type): Adjust.
12871 (dfs_get_primary_binfo): Build list of virtual primary base
12872 candidates.
12873 (get_primary_binfo): Check that the shared virtual primary
12874 base candidate was found first.
12875 (accumulate_vtbl_inits): Don't do anything for non-vptr
12876 containing binfos. For case 1 primary virtual bases, keep
12877 checking that we've not emerged from the hierarchy of RTTI_BINFO.
12878
12879 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12880
12881 PR c++/3089
12882 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12883 hierarchy looking for primary bases for a ctor
12884 vtable. Recursively call oneself, if we meet our primary via
12885 this route and haven't met it yet via inheritance graph order.
12886
12887 2001-06-11 Mark Mitchell <mark@codesourcery.com>
12888
12889 * lang-options.h: Emit documentation for -fno-honor-std, not
12890 -fhonor-std.
12891
12892 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
12893
12894 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12895 Don't clobber delta.
12896 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12897
12898 2001-06-10 Mark Mitchell <mark@codesourcery.com>
12899 Gabriel Dos Reis <gdr@codesourcery.com>
12900
12901 * Make-lang.in (cp/call.o): Depend on diagnostic.h
12902 (cp/typeck.o): Depend on diagnostic.h
12903 (cp/typeck2.o): Depend on diagnostic.h
12904 (cp/repo.o): Depend on dignostic.h
12905 * typeck.c: #include diagnostic.h
12906 (convert_for_initialization): Remove extern declaration for
12907 warningcount and errorcount.
12908
12909 * call.c: #include diagnostic.h
12910 (convert_like_real): Remove extern declaration for warnincount and
12911 errorcount.
12912
12913 * repo.c: #include diagnostic.h
12914 * typeck2.c: #include diagnostic.h
12915
12916 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12917
12918 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12919 in previous change.
12920
12921 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12922
12923 PR c++/2929
12924 * friend.c (do_friend): Use push_decl_namespace for classes at
12925 namespace scope.
12926
12927 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12928 Jason Merrill <jason_merrill@redhat.com>
12929
12930 PR c++/3061
12931 * class.c (build_secondary_vtable): Use assert, rather than an error
12932 message.
12933 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12934 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12935 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12936 Don't set BINFO_VTABLE for a primary virtual base.
12937
12938 2001-06-07 Mark Mitchell <mark@codesourcery.com>
12939
12940 * decl.c (duplicate_decls): Update source position information
12941 when a template function is defined.
12942
12943 2001-06-07 Phil Edwards <pme@sources.redhat.com>
12944
12945 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
12946
12947 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
12948
12949 PR c++/2914
12950 * decl.c (pushtag): Don't push into a complete type's scope.
12951
12952 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
12953
12954 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12955 (struct lang_decl_flags): Lose generate_with_vtable_p.
12956 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12957 * class.c (copy_virtuals): Adjust.
12958 * decl2.c (mark_vtable_entries): Adjust.
12959 * method.c (make_thunk, build_vtable_entry): Adjust.
12960 * class.c (update_vtable_entry_for_fn): Only look as far as the
12961 first defining class.
12962 (build_vtbl_initializer): Put nothing in the slot for a function only
12963 defined in a lost primary virtual base.
12964 (add_vcall_offset_vtbl_entries_1): Use the same code for
12965 the lost primary case and the normal case.
12966 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12967 (get_vfield_offset, get_derived_offset): Lose.
12968 (dfs_find_final_overrider): Use look_for_overrides_here.
12969 (get_matching_virtual): New fn.
12970 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12971 not BV_VCALL_INDEX.
12972 * search.c (look_for_overrides_here): Split out from...
12973 (look_for_overrides_r): Here.
12974
12975 * class.c (find_final_overrider): Return error_mark_node on error.
12976
12977 * decl2.c (key_method): #if 0 accidental change.
12978
12979 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
12980
12981 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12982 (build_over_call): Likewise.
12983 * decl.c (grokparms): Likewise.
12984 * pt.c (tsubst_decl): Likewise.
12985 * typeck.c (convert_arguments): Likewise.
12986
12987 2001-06-05 Mark Mitchell <mark@codesourcery.com>
12988
12989 * semantics.c (begin_class_definition): Robustify.
12990
12991 * pt.c (instantiate_decl): Tell the repository code about the
12992 clones, not the cloned functions.
12993 * repo.c (repo_template_used): Explicitly instantiate the cloned
12994 function, not the clones.
12995
12996 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12997
12998 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12999 ICS_BAD_FLAG on created conversion.
13000 (compare_ics): Break out rank.
13001
13002 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
13003
13004 * decl.c (xref_tag): Remove extraneous %s on dependent name
13005 lookup warning.
13006
13007 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
13008
13009 * class.c (layout_vtable_decl): Fix off by one error on
13010 build_index_type.
13011 (build_vtt): Likewise.
13012 (build_ctor_vtbl_group): Likewise.
13013
13014 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
13015
13016 * class.c (maybe_indent_hierarchy): New function.
13017 (dump_class_hierarchy_r): Add flags. Dump extra binfo
13018 information, if enabled. Use maybe_indent_hierarchy. Adjust
13019 output format.
13020 (dump_class_hierarchy): Adjust prototype. Adjust output format.
13021 (dump_array, dump_vtable, dump_vtt): New functions.
13022 (finish_struct_1): Adjust hierarchy dumping.
13023 (initialize_vtable): Call dump_vtable.
13024 (build_vtt): Call dump_vtt.
13025 (build_ctor_vtbl_group): Call dump_vtable.
13026 * decl2.c (flag_dump_class_layout): Remove.
13027 (cxx_decode_option): Remove dump translation unit
13028 and dump class hierarchy check. Call dump_switch_p.
13029 (finish_file): Adjust dumping.
13030 (dump.c): Only dump base classes if not TDF_SLIM.
13031 Only dump namespace members if not TDF_SLIM.
13032 * optimize.c (dump_function): New function.
13033 (optimize_function): Call dump_function.
13034 * semantics.c (expand_body): Use dump_enabled_p.
13035
13036 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
13037
13038 PR g++/2936
13039 Part missed from first commit
13040 * decl2.c (finish_anon_union): Copy context.
13041
13042 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
13043
13044 PR g++/2936
13045 * optimize.c (remap_decl): Remap anonymous aggregate members too.
13046
13047 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
13048
13049 PR g++/2823
13050 * semantics.c (expand_body): Don't optimize thunks.
13051
13052 2001-05-25 Sam TH <sam@uchicago.edu>
13053
13054 * cp-tree.h lex.h: Fix header include guards.
13055
13056 2001-05-25 Mark Mitchell <mark@codesourcery.com>
13057
13058 * decl.c (init_decl_processing): Tweak.
13059
13060 2001-05-24 Mark Mitchell <mark@codesourcery.com>
13061
13062 * decl.c (duplicate_decls): Tidy.
13063 (init_decl_processing): Always set flag_no_builtin.
13064
13065 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
13066
13067 PR c++/2184
13068 * decl2.c (do_local_using_decl): Push the decls, even in a
13069 template.
13070
13071 2001-05-22 Mark Mitchell <mark@codesourcery.com>
13072
13073 * optimize.c (initialize_inlined_parameters): Don't set
13074 TREE_READONLY for a VAR_DECL taking the place of an inlined
13075 PARM_DECL.
13076
13077 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
13078
13079 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
13080 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
13081 attribute.
13082
13083 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
13084
13085 * parse.y: Refer to compound literals as such, not as
13086 constructor-expressions.
13087
13088 2001-05-21 Mark Mitchell <mark@codesourcery.com>
13089
13090 * call.c (build_op_delete_call): Ignore exception-specifications
13091 when looking for matching delete operators.
13092 * init.c (build_new_1): Compute whether or not the allocation
13093 function used is a placement allocation function or not, and
13094 communicate this information to build_op_delete_call.
13095
13096 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
13097
13098 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
13099 (build_vtbl_ref): Adjust.
13100 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
13101 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
13102 Re-add vtable-gc.
13103 (unsupported_options): Correspondingly.
13104
13105 * decl2.c (maybe_make_one_only): Check flag_weak, not
13106 supports_one_only().
13107
13108 * cp-tree.def (START_CATCH_STMT): Lose.
13109 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
13110 * tree.c (cp_statement_code_p): Don't case it.
13111 * semantics.c (cp_expand_stmt): Likewise.
13112 * cp-tree.h (START_CATCH_TYPE): Lose.
13113 (HANDLER_TYPE): New.
13114 * except.c (expand_start_catch_block): Don't start any blocks.
13115 Return the type.
13116 (expand_end_catch_block): Don't end any blocks.
13117 * parse.y (handler): Don't pass anything from finish_handler_parms
13118 to finish_handler.
13119 * pt.c (tsubst_expr): Likewise.
13120 * semantics.c (begin_handler): Call note_level_for_catch here.
13121 (finish_handler_parms): Don't return anything.
13122 (genrtl_catch_block, begin_catch_block): Lose.
13123 (genrtl_handler): Call expand_start_catch here.
13124
13125 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
13126
13127 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
13128 (get_vtable_decl, build_vtt): Not here.
13129
13130 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
13131
13132 PR c++/2781
13133 * optimize.c (update_cloned_parm): Copy addressability and other
13134 flags.
13135
13136 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13137
13138 * pt.c (determine_specialization): Ignore artificial functions.
13139
13140 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
13141
13142 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
13143 (C_RID_CODE): Remove.
13144 * lex.c (cxx_init_options): Call set_identifier_size. Update.
13145 (init_parse): Don't do it here.
13146
13147 2001-05-18 Diego Novillo <dnovillo@redhat.com>
13148
13149 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
13150 function declaration to avoid stripping the symbol's attributes.
13151
13152 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
13153
13154 * decl.c (pushdecl): Adjust error string.
13155 (xref_tag): Adjust friend class injection warning. Remove the
13156 inherited name from the class shadowed scope.
13157
13158 2001-05-17 Mark Mitchell <mark@codesourcery.com>
13159
13160 * except.c (cp_protect_cleanup_actions): New function.
13161 (init_exception_processing): Don't set protect_cleanup_actions
13162 here. Do set lang_protect_cleanup_actions.
13163
13164 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13165
13166 * spew.c (read_token): Call yyerror on all unexpected tokens.
13167
13168 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
13169
13170 * init.c (member_init_ok_or_else): Take a tree rather than
13171 string for name.
13172 (expand_member_init): Adjust.
13173
13174 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
13175
13176 * decl.c (duplicate_decls): Suppress warning about duplicate
13177 decls if the first decl is a friend.
13178
13179 2001-05-12 Zack Weinberg <zackw@stanford.edu>
13180
13181 * except.c (choose_personality_routine): Export. Add
13182 explanatory comment. Take an enum languages, not a boolean.
13183 (initialize_handler_parm): Adjust to match.
13184 * cp-tree.h: Prototype choose_personality_routine.
13185 * lex.c (handle_pragma_java_exceptions): New function.
13186 (init_cp_pragma): Register #pragma GCC java_exceptions.
13187
13188 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
13189
13190 * method.c (build_mangled_C99_name): Remove unused prototype.
13191
13192 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
13193
13194 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
13195 * typeck.c (get_member_function_from_ptrfunc,
13196 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
13197 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
13198
13199 Reverted Geoff Keating's 2001-05-03's patch.
13200
13201 2001-05-11 Ira Ruben <ira@apple.com>
13202
13203 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
13204
13205 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
13206
13207 * cp-tree.h (finish_label_expr, lookup_label): Delete.
13208 * parse.y: Update for '&&'; don't issue warning here.
13209 * semantics.c (finish_label_expr): Delete.
13210
13211 2001-05-07 Mark Mitchell <mark@codesourcery.com>
13212
13213 * splay-tree.h (splay_tree_max): New function.
13214 (splay_tree_min): Likewise.
13215
13216 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
13217
13218 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
13219 (pfn_vflag_identifier): Define.
13220 Update comment about layout of pointer functions.
13221 (build_ptrmemfunc1): Update prototype.
13222 (expand_ptrmemfunc_cst): Update prototype.
13223 * decl.c (initialize_predefined_identifiers): Initialize
13224 pfn_vflag_identifier.
13225 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
13226 an extra field to the type.
13227 * expr.c (cplus_expand_constant): Pass 'flag' between
13228 expand_ptrmemfunc_cst and build_ptrmemfunc1.
13229 * typeck.c (get_member_function_from_ptrfunc): When
13230 FUNCTION_BOUNDARY < 16, look at additional field to determine
13231 if a pointer-to-member is a real pointer or a vtable offset.
13232 (build_ptrmemfunc1): Add new parameter to contain extra field.
13233 (build_ptrmemfunc): Pass the extra field around.
13234 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
13235 (pfn_from_ptrmemfunc): Ignore the extra field.
13236
13237 2001-05-03 Mark Mitchell <mark@codesourcery.com>
13238
13239 * cp-tree.h (flag_inline_trees): Update documentation.
13240 * decl.c (init_decl_processing): Adjust handling of
13241 flag_inline_functions and flag_inline_trees to support -O3.
13242 (grokfndecl): Set DECL_INLINE on all functions if that's what
13243 the user requested.
13244 (save_function_data): Clear DECL_INLINE in
13245 current_function_cannot_inline is non-NULL.
13246 * decl2.c (flag_inline_trees): Update documentation.
13247
13248 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
13249
13250 * dump.c (cp_dump_tree, USING_STMT case): New case.
13251 * tree.c (cp_statement_code_p): Add USING_STMT.
13252 * decl2.c (do_using_directive): Add the using directive statement.
13253
13254 * tree.c (walk_tree): Reformat an if block.
13255
13256 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13257
13258 * decl.c (compute_array_index_type): Don't try to do anything with
13259 the indices when processing a template.
13260
13261 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13262
13263 * call.c: NULL_PTR -> NULL.
13264 * class.c: Likewise.
13265 * cvt.c: Likewise.
13266 * decl.c: Likewise.
13267 * decl2.c: Likewise.
13268 * except.c: Likewise.
13269 * init.c: Likewise.
13270 * rtti.c: Likewise.
13271 * search.c: Likewise.
13272 * tree.c: Likewise.
13273 * typeck.c: Likewise.
13274 * typeck2.c: Likewise.
13275
13276 2001-05-02 Mark Mitchell <mark@codesourcery.com>
13277
13278 * decl2.c (do_using_directive): Revert previous patch.
13279
13280 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13281
13282 * cp-tree.def (USING_STMT): New statement node.
13283 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13284 * decl2.c (do_using_directive): Add USING_STMT to statement
13285 tree. Don't emit errors when processing template decl.
13286 * pt.c (tsubst_expr, USING_STMT case): New case.
13287 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13288
13289 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13290
13291 * call.c (build_new_op): Convert args from reference here.
13292 (build_conditional_expr): Don't convert here.
13293
13294 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13295
13296 * spew.c (last_token_id): New static variable.
13297 (read_token): Set it here.
13298 (yyerror): Use it here.
13299
13300 2001-04-30 Richard Henderson <rth@redhat.com>
13301
13302 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13303 * decl.c: Likewise.
13304
13305 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13306
13307 * gxxint.texi: Remove.
13308 * Make-lang.in: Remove all traces of gxxint.texi.
13309
13310 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
13311
13312 * decl2.c (start_static_initialization_or_destruction): Correct
13313 logic to handle the -fno-use-cxa-atexit case.
13314
13315 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13316
13317 * optimize.c (update_cloned_parm): New function.
13318 (maybe_clone_body): Use it. Update the `this' parameter too.
13319
13320 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
13321
13322 * decl2.c (unsupported_options): Add new-abi.
13323 * lang-options.h: Remove no longer supported options.
13324
13325 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13326
13327 * except.c (can_convert_eh): Don't check template parms,
13328 typename types etc.
13329
13330 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13331
13332 * optimize.c (maybe_clone_body): Copy parameter names and locations.
13333
13334 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13335
13336 * cp-tree.h (adjust_clone_args): Prototype new function.
13337 * class.c (adjust_clone_args): New function.
13338 * decl.c (start_function): Call it for in charge ctors.
13339
13340 2001-04-26 Mark Mitchell <mark@codesourcery.com>
13341
13342 * method.c (use_thunk): Make sure that thunks really are emitted
13343 when requested.
13344
13345 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
13346
13347 * mangle.c (write_chars): New macro.
13348 (hwint_to_ascii): New function
13349 (write_number): Use it.
13350 (write_integer_cst): Deal with really big numbers.
13351
13352 2001-04-25 Mark Mitchell <mark@codesourcery.com>
13353
13354 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13355 the clone.
13356
13357 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
13358
13359 * decl.c (grokdeclarator): Set context of namespace scope
13360 TYPE_DECLS.
13361
13362 2001-04-24 Zack Weinberg <zackw@stanford.edu>
13363
13364 * cp/optimize.c: Include hashtab.h.
13365 (struct inline_data): Add tree_pruner.
13366 (expand_call_inline, expand_calls_inline): Use it when calling
13367 walk_tree.
13368 (optimize_function): Initialize and free tree_pruner.
13369
13370 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13371
13372 Lazy __FUNCTION__ generation.
13373 * cp-tree.def (FUNCTION_NAME): Remove.
13374 * cp-tree.h (function_name_declared_p): Remove.
13375 (cp_fname_init): Prototype.
13376 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13377 don't call declare_function_name. Call start_fname_decls.
13378 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13379 clobber the line number.
13380 (cp_fname_init): New function.
13381 (start_function): Call start_fname_decls.
13382 (finish_function): Call finish_fname_decls.
13383 * lex.c (reswords): Add slots for __FUNCTION__ et al.
13384 (rid_to_yy): Add mappings for __FUNCTION__ et al.
13385 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13386 * parse.y (VAR_FUNC_NAME): New token.
13387 (primary): Add VAR_FUNC_NAME.
13388 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13389 generation.
13390 (tsubst, FUNCTION_NAME case): Remove.
13391 (tsubst_copy, FUNCTION_NAME case): Remove.
13392 (tsubst_expr, DECL_STMT case): Be careful with a
13393 DECL_PRETTY_FUNCTION_P.
13394 (instantiate_decl): Remove function_name_declared_p.
13395 * semantics.c (begin_compound_statement): Don't call
13396 declare_function_name here.
13397 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13398 (finish_translation_unit): Call finish_fname_decls.
13399 (expand_body): Remove function_name_declared_p.
13400 * typeck2.c (digest_init): Allow any ERROR_MARK.
13401
13402 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13403
13404 * pt.c (tsubst_decl): Use VOID_TYPE_P.
13405 * semantics.c: Fix some typos.
13406
13407 2001-04-23 Phil Edwards <pme@sources.redhat.com>
13408
13409 * cp/decl2.c (flag_honor_std): Always initialize to 1.
13410
13411 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13412
13413 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13414
13415 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
13416
13417 * except.c (build_throw): Wrap the initialization of the exception
13418 object in a MUST_NOT_THROW_EXPR.
13419 (do_free_exception): #if 0.
13420
13421 2001-04-20 Mark Mitchell <mark@codesourcery.com>
13422
13423 * cp-tree.h (finish_enum): Change prototype.
13424 * decl.c (finish_enum): Reorganize.
13425 * parse.y (structsp): Adjust calls to finish_enum.
13426
13427 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13428
13429 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13430 't' case.
13431
13432 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13433
13434 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13435 (layout_empty_base): Return at end flag.
13436 (build_base_field): Likewise.
13437 (build_base_fields): Likewise.
13438 (layout_virtual_bases): Don't add 1 to eoc value.
13439 (end_of_class): Use full size for empty bases.
13440 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13441 empty bases. Don't add 1 to eoc value. Only add trailing padding
13442 if we're an empty class with no empty bases.
13443 (dump_class_hierarchy): Dump size and alignment.
13444
13445 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13446
13447 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13448 ICS_BAD_FLAG.
13449
13450 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13451
13452 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13453 is found, look first if name does not match the structure name.
13454
13455 2001-04-19 Mark Mitchell <mark@codesourcery.com>
13456
13457 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13458 set.
13459 (SET_DECL_LANGUAGE): New macro.
13460 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13461 (pushdecl): Likewise.
13462 (build_library_fn_1): Likewise.
13463 (build_cp_library_fn): Likewise.
13464 (grokfndecl): Likewise.
13465 (grokvardecl): Mark `extern "C"' variables as having C linkage.
13466 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13467 * lex.c (retrofit_lang_decl): Likewise.
13468 * mangle.c (mangle_decl_string): Don't mangle the names of
13469 variables declared with C language linkage.
13470 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13471
13472 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
13473
13474 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13475 flag_access_control from uninitialized storage.
13476
13477 2001-04-15 Mark Mitchell <mark@codesourcery.com>
13478
13479 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13480 * mangle.c (write_pointer_to_member_type): Fix mangling of
13481 pointers to cv-qualified member function types.
13482
13483 * init.c (build_delete): Create a SAVE_EXPR for the address if
13484 we're going to use it more than once.
13485
13486 2001-04-13 Mark Mitchell <mark@codesourcery.com>
13487
13488 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13489 (expand_ptremfunc_cst): Change prototype.
13490 (delta2_from_ptrmemfunc): Remove.
13491 * expr.c (cplus_expand_constant): Adjust call to
13492 expand_ptrmemfunc_cst.
13493 * typeck.c (build_ptrmemfunc1): Simplify.
13494 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13495 results in a constant.
13496 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13497 (delta2_from_ptrmemfunc): Remove.
13498 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13499
13500 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
13501
13502 * cp-tree.h (decl_namespace_list): New macro.
13503 (struct saved_scope): Add decl_ns_list.
13504 * decl.c (mark_saved_scope): Mark it.
13505 * decl2.c: Lose static decl_namespace_list.
13506 (init_decl2): Don't save it.
13507
13508 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13509
13510 * cp-tree.h (warn_return_type, yylex): Delete redundant
13511 declarations.
13512
13513 * decl.c (current_class_depth, global_namespace): Likewise.
13514
13515 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13516
13517 * repo.c (flag_use_repository): Likewise.
13518
13519 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13520
13521 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13522 set_block, pushdecl, getdecls, gettags, init_decl_processing,
13523 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13524 lvalue_or_else, print_lang_statistics, comp_target_types,
13525 unsigned_type, signed_type, signed_or_unsigned_type,
13526 build_function_call, mark_addressable, incomplete_type_error):
13527 Delete redundant declarations.
13528
13529 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
13530
13531 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13532 (TYPE_ANONYMOUS_P): New macro.
13533 (TAGGED_TYPE_P): New macro.
13534 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13535 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13536 * tree.c (no_linkage_helper): Likewise.
13537 * semantics.c (begin_class_definition): Likewise.
13538 * pt.c (convert_template_argument): Likewise.
13539 * lex.c (check_for_missing_semicolon): Likewise.
13540
13541 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13542
13543 * class.c (dfs_unshared_virtual_bases): New function.
13544 (mark_primary_bases): Call it.
13545 (check_bases): Ignore virtual bases when determining
13546 nearly-emptiness.
13547
13548 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13549
13550 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13551
13552 2001-04-11 Mark Mitchell <mark@codesourcery.com>
13553
13554 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13555 cloned function to the clone.
13556
13557 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13558
13559 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13560
13561 * semantics.c: Include expr.h.
13562
13563 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
13564
13565 * method.c (implicitly_declare_fn): Commonize code for copy ctor
13566 and assignment op. Set TREE_USED for parameter.
13567
13568 2001-04-10 Mark Mitchell <mark@codesourcery.com>
13569
13570 * class.c (find_final_overrider_data): Add `candidates'.
13571 (dfs_find_final_overrider): Don't issue error messages
13572 prematurely.
13573 (find_final_overrider): Issue error messages here.
13574 (build_base_field): Don't warn about amgibuous direct bases here.
13575 (warn_about_ambiguous_direct_bases): New function.
13576 (layout_class_type): Use it.
13577
13578 2001-04-10 Richard Henderson <rth@redhat.com>
13579
13580 * typeck.c (build_array_ref): Push the array reference inside
13581 COMPOUND_EXPR and COND_EXPR.
13582
13583 2001-04-05 Mark Mitchell <mark@codesourcery.com>
13584
13585 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13586 * decl.c (duplicate_decls): Adjust accordingly.
13587 (maybe_commonize_var): Likewise.
13588 (grokfndecl): Likewise.
13589 (start_function): Likewise.
13590 (start_method): Likewise.
13591 * decl2.c (key_method): Likewise.
13592 (import_export_decl): Likewise.
13593 * method.c (implicitly_declare_fn): Likewise.
13594 * optimize.c (maybe_clone_body): Likewise.
13595
13596 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
13597
13598 * lang-specs.h: Add __DEPRECATED.
13599
13600 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
13601
13602 * search.c (get_dynamic_cast_base_type): When building a new
13603 constant, set its type to ssizetype.
13604
13605 2001-04-04 Jakub Jelinek <jakub@redhat.com>
13606
13607 * optimize.c (expand_call_inline): Only add newly inlined statements
13608 into inlined_stmts.
13609
13610 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13611
13612 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13613 (OPERATOR_FORMAT): Likewise.
13614 (OPERATOR_TYPENAME_FORMAT): Likewise.
13615 * operators.def: Remove old name-mangling information.
13616 * decl.c (grok_op_properties): Adjust accordingly.
13617 * lex.c (init_operators): Likewise.
13618 * rtti.c (get_tinfo_decl): Issue error messages about types that
13619 have variable size.
13620
13621 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13622
13623 * decl2.c (import_export_decl): Don't call import_export_class
13624 when processing an inline member function.
13625 * semantics.c (expand_body): Call import_export_decl before
13626 emitting inline functions.
13627
13628 2001-03-28 Richard Henderson <rth@redhat.com>
13629
13630 IA-64 ABI Exception Handling:
13631 * cp-tree.def (EH_SPEC_BLOCK): New.
13632 (MUST_NOT_THROW_EXPR): New.
13633 * cp-tree.h: Update changed function declarations.
13634 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13635 (CPTI_CALL_UNEXPECTED): New.
13636 (struct cp_language_function): Rename x_eh_spec_try_block
13637 to x_eh_spec_block.
13638 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13639 * decl.c (current_binding_level): If no current function
13640 bindings, revert to scope_chain.
13641 (initialize_predefined_identifiers): Remove __cp_push_exception.
13642 (store_parm_decls): Use begin_eh_spec_block.
13643 (finish_function): Use finish_eh_spec_block.
13644 (mark_lang_function): Update for name changes.
13645 * decl2.c (finish_file): No mark_all_runtime_matches.
13646 * dump.c (cp_dump_tree): Handle new tree codes.
13647 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13648 * except.c (catch_language_init, catch_language): Remove.
13649 (init_exception_processing): Don't set language code.
13650 Initialize call_unexpected_node, protect_cleanup_actions,
13651 eh_personality_libfunc, lang_eh_runtime_type.
13652 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13653 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13654 (prepare_eh_type): Split out type canonicalizations ...
13655 (build_eh_type_type): ... from here.
13656 (build_eh_type_type_ref): Remove.
13657 (mark_all_runtime_matches): Remove.
13658 (build_exc_ptr): New.
13659 (do_begin_catch, do_end_catch): New.
13660 (do_pop_exception): Remove.
13661 (build_terminate_handler): Remove.
13662 (choose_personality_routine): Split out language choice from ...
13663 (initialize_handler_parm): ... here.
13664 Use MUST_NOT_THROW_EXPR.
13665 (expand_start_catch_block): Use do_begin_catch. Simplify Java
13666 exception object handling.
13667 (expand_start_eh_spec, expand_end_eh_spec): Remove.
13668 (expand_exception_blocks, alloc_eh_object): Remove.
13669 (begin_eh_spec_block, finish_eh_spec_block): New.
13670 (do_allocate_exception, do_free_exception): New.
13671 (expand_throw): Merge into ...
13672 (build_throw): ... here. Update for abi.
13673 * expr.c (cplus_expand_expr): No expand_internal_throw.
13674 Handle MUST_NOT_THROW_EXPR.
13675 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13676 * semantics.c (*) Update for except.h name changes.
13677 (genrtl_try_block): No protect_with_terminate.
13678 (genrtl_eh_spec_block): New.
13679 (genrtl_handler): Don't emit the goto here.
13680 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13681 (genrtl_finish_function): Don't expand_exception_blocks.
13682 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13683
13684 2001-03-28 Richard Henderson <rth@redhat.com>
13685
13686 * decl.c (struct named_label_list): Rename eh_region to
13687 in_try_scope, add in_catch_scope.
13688 (struct binding_level): Rename eh_region to is_try_scope,
13689 add is_catch_scope.
13690 (note_level_for_try): Rename from note_level_for_eh.
13691 (note_level_for_catch): New.
13692 (poplevel): Copy both is_try_scope and is_catch_scope to
13693 the named_label_list struct.
13694 (check_previous_goto_1): Don't check for catch block via
13695 DECL_ARTIFICIAL; use in_try_scope instead.
13696 (check_goto): Likewise.
13697 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13698 * except.c (expand_start_catch_block): Call note_level_for_catch.
13699 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13700
13701 2001-03-27 Richard Henderson <rth@redhat.com>
13702
13703 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13704 exceptions_via_longjmp.
13705
13706 2001-03-27 Phil Edwards <pme@sources.redhat.com>
13707
13708 * pt.c (check_default_tmpl_args): Make error messages clearer.
13709
13710 2001-03-26 Phil Edwards <pme@sources.redhat.com>
13711
13712 * error.c: Also undefine 'A' macro used for cp_printers definition.
13713
13714 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13715
13716 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13717
13718 2001-03-26 Mike Yang <yang@research.att.com>
13719 Mark Mitchell <mark@codesourcery.com>
13720
13721 * dump.c (dump_access): New function.
13722 (cp_dump_tree): Use it. Dump basetype information for class
13723 types.
13724
13725 2001-03-26 Mark Mitchell <mark@codesourcery.com>
13726
13727 * Makefile.in (optimize.o): Depend on params.h.
13728 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13729 (init_decl_processing): Set flag_no_inline when doing
13730 inlining-on-trees.
13731 * optimize.c: Include params.h.
13732 (struct inline_data): Improve documentation of FNS. Add
13733 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13734 (INSNS_PER_STMT): New macro.
13735 (remap_block): Use CLONING_P.
13736 (inlinable_function_p): Don't inline big functions.
13737 (expand_call_inline): Keep track of how much inlining we've done.
13738 (optimize_function): Set FIRST_INLINED_FN.
13739 (maybe_clone_body): Set CLONING_P.
13740 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13741 tree nodes.
13742 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13743 rest_of_compilation. Clear DECL_RTL for local variables
13744 afterwards.
13745 (clear_decl_rtl): New function.
13746
13747 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
13748
13749 Implement DR 209
13750 * cp-tree.h (skip_type_access_control,
13751 reset_type_access_control): Prototype.
13752 * decl.c (grokdeclarator): Access of friends is not checked.
13753 * parse.y (component_decl_list): Reset type access control.
13754 * semantics.c (decl_type_access_control): Clear
13755 current_type_lookups.
13756 (save_type_access_control): Don't save if not deferring.
13757 (skip_type_access_control, reset_type_access_control): New
13758 functions.
13759 (begin_class_definition): Do type access control for basetypes.
13760 Start deferred access control.
13761 (finish_class_definition): Resume immediate access control if
13762 this is a local class.
13763
13764 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13765
13766 * class.c (add_method): Use memcpy/memmove, not bcopy.
13767
13768 * decl.c (duplicate_decls): Likewise.
13769
13770 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13771
13772 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13773 not `_'.
13774
13775 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13776
13777 * decl.c (local_names): Define.
13778 (push_local_name): New.
13779 (grok_reference_init): Return init if initializing static reference
13780 variable with non-constant instead of emitting it.
13781 Move expand_static_init call to cp_finish_decl.
13782 (layout_var_decl): Call push_local_name.
13783 (maybe_commonize_var): Allow inlining functions even if they have
13784 static local variables, use comdat_linkage for them if flag_weak.
13785 (check_initializer): Call obscure_complex_init if
13786 grok_reference_init returned nonzero.
13787 (save_function_data): Clear x_local_names.
13788 (pop_cp_function_context): Free x_local_names.
13789 (mark_inlined_fns): Remove.
13790 (mark_lang_function): Mark x_local_names.
13791 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13792 Mark inlined_fns as tree, remove call to mark_inlined_fns.
13793 * class.c (alter_access): Ensure DECL_ACCESS is never set if
13794 DECL_DISCRIMINATOR_P.
13795 * cp-tree.h (cp_language_function): Add x_local_names.
13796 (lang_decl_flags): Add discriminator into u2.
13797 (lang_decl_inlined_fns): Remove.
13798 (lang_decl): inlined_fns is now a TREE_VEC.
13799 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13800 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13801 TREE_VEC, not a custom structure.
13802 (optimize_function): Likewise.
13803 * mangle.c (discriminator_for_local_entity): Discriminate among
13804 VAR_DECL local entities.
13805 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13806 is not valid.
13807
13808 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
13809
13810 Add support for Java interface method calls.
13811 * cp-tree.h (struct lang_type): Add java_interface flag.
13812 (TYPE_JAVA_INTERFACE): New macro.
13813 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13814 by setting TYPE_JAVA_INTERFACE.
13815 * call.c (java_iface_lookup_fn): New static.
13816 (build_over_call): If calling a method declared in a
13817 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13818 expression which resolves the function address.
13819 (build_java_interface_fn_ref): New function.
13820
13821 2001-03-22 Richard Henderson <rth@redhat.com>
13822
13823 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13824 * except.c: Don't include it.
13825
13826 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13827 based on an idea from Joe Buck <jbuck@synopsys.com>
13828
13829 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13830 New nonterminals.
13831 (data_def, component_decl): Add reductions to bad_decl.
13832
13833 2001-03-22 Jakub Jelinek <jakub@redhat.com>
13834
13835 * method.c (do_build_assign_ref): Don't use build_modify_expr for
13836 anonymous aggregates, since they don't have assignment operator
13837 method.
13838 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13839 assignment operators for anonymous structure fields.
13840
13841 2001-03-21 Jason Merrill <jason@redhat.com>
13842
13843 * pt.c (instantiate_decl): Abort if we see a member constant
13844 instantiation that doesn't already have its initializer.
13845 Downgrade explicit instantiation without definition to pedwarn.
13846
13847 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13848 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13849 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13850
13851 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13852 (pending_vtables): Remove.
13853 * decl2.c (pending_vtables): Remove.
13854 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13855 CLASSTYPE_VTABLE_NEEDS_WRITING.
13856 (import_export_class): Likewise.
13857 (init_decl2): Don't mark pending_vtables.
13858 * lex.c (handle_pragma_vtable): Just sorry.
13859 * pt.c (instantiate_class_template): Don't mess with
13860 CLASSTYPE_VTABLE_NEEDS_WRITING.
13861 (mark_class_instantiated): Likewise.
13862 * ptree.c (print_lang_type): Don't print it.
13863 * semantics.c (begin_class_definition): Don't set it.
13864
13865 * pt.c (template_tail): Replace with last_pending_template.
13866 (maybe_templates, maybe_template_tail): Remove.
13867 (add_pending_template): Adjust.
13868 (instantiate_pending_templates): Adjust.
13869
13870 * cp-tree.h (struct saved_scope): Remove lang_stack field.
13871 (current_lang_stack): Remove.
13872 * decl.c (maybe_push_to_top_level): Don't initialize it.
13873 (duplicate_decls): Use current_lang_depth.
13874 (xref_basetypes): Likewise.
13875 * class.c (current_lang_depth): New fn.
13876 (push_lang_context): Use more varray functionality.
13877 (pop_lang_context): Likewise.
13878
13879 * error.c (GLOBAL_THING): Always use '__'.
13880
13881 2001-03-21 Mark Mitchell <mark@codesourcery.com>
13882
13883 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13884
13885 * mangle.c (mangle_decl_string): Mangle the names of overloaded
13886 operators, even when they have `extern "C"' linkage.
13887
13888 2001-03-19 Mark Mitchell <mark@codesourcery.com>
13889
13890 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13891 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13892 where it's not necessary.
13893 (add_method): Remove optimization involving comparison of
13894 DECL_ASSEMBLER_NAME.
13895 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13896 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13897 where it's not necessary.
13898 (check_methods): Likewise.
13899 (build_clone): Likewise.
13900 (built_vtt): Likewise.
13901 * cp-tree.h (DECL_NEEDED_P): Likewise.
13902 * decl.c (pushtag): Likewise.
13903 (duplicate_decls): Likewise.
13904 (pushdecl): Likewise.
13905 (builtin_function): Likewise.
13906 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13907 (build_cp_library_fn): Likewise.
13908 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13909 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13910 where it's not necessary.
13911 (make_rtl_for_nonlocal_decl): Likewise.
13912 (cp_finish_decl): Likewise.
13913 (grokfndecl): Likewise.
13914 (grokvardecl): Likewise.
13915 (grokdeclarator): Likewise.
13916 (start_function): Likewise.
13917 (cp_missing_return_ok_p): Likewise.
13918 * decl2.c (grokclassfn): Likewise.
13919 (check_classfn): Likewise.
13920 (finish_static_data_member_decl): Likewise.
13921 (grokfield): Likewise.
13922 * error.c (GLOBAL_IORD_P): Remove.
13923 (dump_global_iord): Improve output.
13924 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13925 * except.c (nothrow_libfn_p): Summarily reject any function not in
13926 namespace-scope.
13927 * init.c (build_java_class_ref): Don't explicitly set
13928 DECL_ASSEMBLER_NAME after calling mangle_decl.
13929 * mangle.c (mangle_decl_string): Handle extern "C" functions.
13930 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13931 * method.c (set_mangled_name_for_decl): Don't explicitly set
13932 DECL_ASSEMBLER_NAME after calling mangle_decl.
13933 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13934 IDENTIFIER_GLOBAL_VALUE for the thunk.
13935 * pt.c (set_mangled_name_for_template_decl): Remove.
13936 (check_explicit_specialization): Don't use it.
13937 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13938 (tsubst_friend_function): Likewise.
13939 (tsubst_decl): Likewise.
13940 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13941 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13942 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13943 where it's not necessary.
13944 (tinfo_base_init): Likewise.
13945 (create_real_tinfo_var): Likewise.
13946 * search.c (looup_field_1): Likewise.
13947 * semantics.c (finish_named_return_value): Likewise.
13948 * tree.c (init_tree): Set lang_set_decl_assembler_name.
13949
13950 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
13951
13952 Correct semantics restrictions checking in throw-expression.
13953 * except.c (is_admissible_throw_operand): New function.
13954 (build_throw): Use it.
13955
13956 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13957
13958 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13959 and its ilk.
13960
13961 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13962
13963 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13964 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13965 * decl.c (duplicate_decls): Likewise.
13966 (builtin_function): Likewise.
13967 (build_library_fn): Likewise.
13968 (build_cp_library_fn): Likewise.
13969 (check_initializer): Likewise.
13970 (cp_finish_decl): Likewise.
13971 * decl2.c (grokfield): Likewise.
13972 (grok_function_init): Remove #if 0'd code.
13973 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13974 * friend.c (do_friend): Likewise.
13975 * init.c (get_temp_regvar): Likewise.
13976 * method.c (make_thunk): Likewise.
13977 * pt.c (tsubst_friend_function): Likewise.
13978 (tsubst_decl): Likewise.
13979 (regenerate_decl_from_template): Likewise.
13980 * semantics.c (genrtl_named_return_value): Likewise.
13981 (expand_body): Likewise.
13982 (genrtl_finish_function): Likewise.
13983 * tree.c (cp_tree_equal): Likewise.
13984
13985 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
13986
13987 * call.c (convert_like_real): Add extra semantics to INNER
13988 parameter. Don't convert to temporary if a user conversion
13989 gives us an lvalue that we're about to bind to a reference.
13990 Set INNER to indicate pending reference binding on recursive
13991 calls.
13992
13993 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13994
13995 * cp/lex.c: Delete duplicate pending_lang_change.
13996
13997 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13998
13999 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
14000 Similarly.
14001 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
14002 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
14003
14004 2001-03-09 Zack Weinberg <zackw@stanford.edu>
14005
14006 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
14007
14008 2001-03-08 Stan Shebs <shebs@apple.com>
14009
14010 * cp-tree.h (set_identifier_local_value): Remove unused decl.
14011
14012 2001-03-06 Zack Weinberg <zackw@stanford.edu>
14013
14014 * spew.c: Remove references to CPP_OSTRING.
14015
14016 2001-03-06 Andrew Haley <aph@redhat.com>
14017
14018 * typeck.c (convert_arguments): Check that we have an fndecl.
14019
14020 2001-03-05 Andrew Haley <aph@redhat.com>
14021
14022 * typeck.c (convert_arguments): Don't do ellipsis conversion for
14023 __built_in_constant_p.
14024
14025 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
14026
14027 * typeck.c (build_static_cast): Allow enum to enum conversions
14028 as per DR 128.
14029
14030 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
14031
14032 * class.c (check_field_decls): Pointers to member do not a
14033 non-pod struct make, as per DR 148.
14034
14035 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
14036
14037 * call.c (joust): cp_pedwarn when using gnu extension concerning
14038 worst conversion sequences.
14039
14040 2001-03-01 Zack Weinberg <zackw@stanford.edu>
14041
14042 * decl.c: Replace all uses of 'boolean' with 'bool'.
14043
14044 2001-03-01 Zack Weinberg <zackw@stanford.edu>
14045
14046 * lang-specs.h: Add zero initializer for cpp_spec field to
14047 all array elements that need one. Don't put an #ifdef inside
14048 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
14049 use it.
14050
14051 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
14052
14053 Implement using decls inside template functions.
14054 * decl2.c (validate_nonmember_using_decl): Don't special case
14055 fake_std_node in the global namespace. Don't reject early when
14056 processing a template.
14057 (do_local_using_decl): Add to statement tree. Don't do further
14058 processing when building a template.
14059 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
14060
14061 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
14062
14063 * decl2.c (do_nonmember_using_decl): Don't complain if we find
14064 same function. Do complain about ambiguating extern "C"
14065 declarations.
14066
14067 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
14068
14069 Remove floating point and complex type template constant parms.
14070 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
14071 COMPLEX_TYPE extensions.
14072 (invalid_nontype_parm_type_p): Likewise.
14073
14074 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
14075
14076 * except.c (call_eh_info): Revert "match_function"'s type.
14077
14078 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
14079
14080 Fix ctor vtable vcall offsets.
14081 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
14082 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
14083 (get_matching_base): Remove.
14084 (get_original_base): New function.
14085 (build_vtbl_initializer): Initialize vid.rtti_binfo.
14086 Use a virtual thunk for a ctor vtable with an index
14087 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
14088 primary base within a constructor vtable. Only set
14089 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
14090 when primary base has been lost.
14091 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
14092
14093 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
14094
14095 * call.c (joust): Ensure more_specialized()'s argument length
14096 parameter has correct value for constructors.
14097
14098 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
14099
14100 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
14101
14102 * decl.c (mark_inlined_fns): Prototype.
14103
14104 2001-02-22 Mark Mitchell <mark@codesourcery.com>
14105
14106 * spew.c (yylex): Correct handling of friends.
14107
14108 2001-02-22 Mark Mitchell <mark@codesourcery.com>
14109
14110 * mangle.c (write_encoding): Pass write_function_type the
14111 FUNCTION_DECL for the function being encoded.
14112 (write_function_type): Pass it along to write_bare_function_type.
14113 (write_bare_function_type): Pass it along to write_method_parms.
14114 (write_method_parms): Don't mangle the compiler-generated
14115 parameters to a constructor or destructor.
14116
14117 2001-02-22 Andreas Jaeger <aj@suse.de>
14118
14119 * optimize.c: Include toplev.h for
14120 note_deferral_of_defined_inline_function prototype.
14121
14122 2001-02-22 Jakub Jelinek <jakub@redhat.com>
14123
14124 * cp-tree.h (struct lang_decl_inlined_fns): New.
14125 (struct lang_decls): Add inlined_fns.
14126 (DECL_INLINED_FNS): New macro.
14127 * optimize.c (struct inline_data): Add inlined_fns.
14128 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
14129 (inlinable_function_p): Likewise, fix typo in comment,
14130 function is not inlinable if it already inlined function currently
14131 being optimized.
14132 (expand_call_inline): Add fn to inlined_fns if necessary.
14133 (optimize_function): Initialize inlined_fns.
14134 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
14135 * decl.c (mark_inlined_fns): New function.
14136 (lang_mark_tree): Call it.
14137
14138 2001-02-21 Jason Merrill <jason@redhat.com>
14139
14140 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
14141 (DECL_UNINLINABLE): Move to middle-end.
14142
14143 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
14144 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
14145 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
14146 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
14147 parms and outer BLOCK. note_deferral_of_defined_inline_function.
14148
14149 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
14150 second parm of op=.
14151
14152 2001-02-19 Mark Mitchell <mark@codesourcery.com>
14153
14154 * decl2.c (set_decl_namespace): Allow explicit instantiations in
14155 any namespace.
14156
14157 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14158
14159 * optimize.c (expand_call_inline): Don't walk subtrees of type
14160 nodes.
14161
14162 2001-02-18 Mark Mitchell <mark@codesourcery.com>
14163
14164 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
14165 for a destructor.
14166
14167 2001-02-18 Jason Merrill <jason@redhat.com>
14168
14169 Do put the VTT parameter in DECL_ARGUMENTS.
14170 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
14171 (current_vtt_parm): New macro.
14172 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
14173 (DECL_HAS_VTT_PARM_P): New macro.
14174 (DECL_VTT_PARM): Remove.
14175 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
14176 * decl.c (duplicate_decls): Only copy the operator code if
14177 appropriate.
14178 (start_function): Set current_vtt_parm.
14179 (lang_mark_tree): Don't mark vtt_parm.
14180 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
14181 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
14182 * class.c (build_clone): Maybe remove the VTT parm.
14183 * optimize.c (maybe_clone_body): Set up the VTT parm.
14184 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
14185 * call.c (build_over_call): Just allow the VTT arg.
14186 * method.c (make_thunk): Don't set DECL_VTT_PARM.
14187 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
14188 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
14189 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
14190 * error.c (dump_function_decl): Likewise.
14191 * call.c (build_user_type_conversion_1, convert_like_real): Abort
14192 if we try to call a constructor with in-charge or VTT parms.
14193 * method.c (skip_artificial_parms_for): New fn.
14194 * call.c (add_function_candidate, build_over_call): Call it.
14195 * call.c (build_new_method_call): Use current_vtt_parm.
14196 * init.c (expand_virtual_init): Likewise.
14197 * class.c (same_signature_p): No longer static.
14198 * cp-tree.h: Declare it.
14199 * search.c (look_for_overrides_r): Use it.
14200
14201 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14202
14203 * cp-tree.h (new_abi_rtti_p): Remove.
14204 (name_mangling_version): Likewise.
14205 (flag_do_squangling): Likewise.
14206 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
14207 * decl.c (grokfndecl): Likewise.
14208 * decl2.c (name_mangling_version): Remove.
14209 (flag_do_squangling): Likewise.
14210 (lang_f_options): Remove `squangle'.
14211 (unsupported_options): Add `squangle'.
14212 (cxx_decode_option): Issue a warning about uses of
14213 -fname-mangling-version.
14214 (finish_file): Remove old ABI support.
14215 * pt.c (check_explicit_specialization): Likewise.
14216 (tsubst_decl): Likewise.
14217 * rtti.c (init_rtti_processing): Likewise.
14218 (build_headof): Likewise.
14219 (get_tinfo_decl_dynamic): Likewise.
14220 (tinfo_from_decl): Likewise.
14221 (build_dynamic_cast_1): Likewise.
14222 (synthesize_tinfo_var): Likewise.
14223 * init.c (build_new): Allow enumeration types for the array-bounds
14224 in a direct-new-declarator.
14225
14226 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
14227
14228 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
14229 TREE_PROTECTED from the template being specialized.
14230
14231 2001-02-17 Jason Merrill <jason@redhat.com>
14232
14233 * decl2.c (build_artificial_parm): Set TREE_READONLY.
14234
14235 * decl.c (bad_specifiers): Allow throw specs on things with
14236 pointer-to-function or -member-function type.
14237 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
14238 a pmf.
14239
14240 2001-02-17 Mark Mitchell <mark@codesourcery.com>
14241
14242 * call.c (check_dtor_name): Handle template names correctly.
14243
14244 2001-02-16 Jason Merrill <jason@redhat.com>
14245
14246 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
14247 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
14248 * optimize.c (maybe_clone_body): Don't substitute it.
14249 * call.c (build_new_method_call): Check in_chrg instead.
14250 * init.c (expand_virtual_init): Likewise.
14251
14252 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
14253
14254 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
14255 class-type introduces at least a type-name.
14256
14257 2001-02-16 Jakub Jelinek <jakub@redhat.com>
14258
14259 * call.c (convert_like_real): Create a temporary for non-lvalue.
14260
14261 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
14262
14263 * cp-tree.h: Fix typos in comments.
14264
14265 2001-02-16 Jason Merrill <jason@redhat.com>
14266
14267 * optimize.c (remap_block): If we're compiling a clone, pass the
14268 new block to insert_block.
14269
14270 2001-02-16 Mark Mitchell <mark@codesourcery.com>
14271
14272 * semantics.c (finish_asm_stmt): Robustify.
14273
14274 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14275
14276 * pt.c (push_template_decl_real): Don't remangle the name of a
14277 class template.
14278
14279 2001-02-15 Jim Meyering <meyering@lucent.com>
14280
14281 * Make-lang.in (c++.install-common): Depend on installdirs.
14282 (c++.install-info): Likewise.
14283 (c++.install-man): Likewise.
14284
14285 2001-02-15 Mark Mitchell <mark@codesourcery.com>
14286
14287 * typeck2.c (build_m_component_ref): Robustify.
14288
14289 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
14290
14291 * friend.c (do_friend): Don't take the nested [template] class
14292 into account when deciding whether to warn about the friend
14293 function not referring to a template function.
14294
14295 2001-02-14 Jakub Jelinek <jakub@redhat.com>
14296
14297 * typeck.c (build_unary_op): Clarify error message.
14298
14299 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
14300
14301 * parse.y (component_constructor_declarator): allow optional
14302 parentheses around constructor class name.
14303
14304 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14305
14306 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14307 section.
14308 * init.c (emit_base_init): Remove incorrect comment about
14309 virtual bases.
14310 * method.c (make_thunk): Fix comment alignment.
14311
14312 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14313
14314 Kill remnants of this is variable.
14315 * cp-tree.h (flag_this_is_variable): Remove.
14316 * decl2.c (flag_this_is_variable): Remove.
14317 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14318 (build_vbase_path): The path is non-static, even in a cdtor.
14319 (resolves_to_fixed_type_p): Add additional return value.
14320 * search.c (init_vbase_pointers): Adjust.
14321 * tree.c (lvalue_p_1): Adjust.
14322 * typeck.c (mark_addressable): Adjust.
14323
14324 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14325
14326 * pt.c (unify): Don't check cv quals of array types.
14327
14328 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14329
14330 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14331 check whether we already have the type.
14332
14333 2001-02-13 Mark Mitchell <mark@codesourcery.com>
14334
14335 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14336 * call.c (build_op_delete_call): Simplify to remove duplicate
14337 code.
14338 * class.c (clone_function_decl): Don't build the deleting variant
14339 of a non-virtual destructor.
14340 * decl.c (finish_destructor_body): Don't call delete if this is a
14341 non-virtual destructor.
14342 * init.c (build_delete): Explicitly call `operator delete' when
14343 deleting an object with a non-virtual destructor.
14344
14345 2001-02-13 Jason Merrill <jason@redhat.com>
14346
14347 * lang-specs.h: Add more __EXCEPTIONS.
14348
14349 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14350
14351 * typeck2.c (process_init_constructor): Check
14352 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14353
14354 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14355
14356 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14357 Remove spurious information in comment. Allow further
14358 adjustments of REFERENCE_TYPE args.
14359
14360 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14361
14362 * errfn.c (cp_deprecated): Tweak diagnostic text.
14363 * parse.y (new_initializer): Deprecate initializer lists
14364 extension.
14365
14366 2001-02-12 Mark Mitchell <mark@codesourcery.com>
14367
14368 Remove old ABI support.
14369
14370 2001-02-11 Mark Mitchell <mark@codesourcery.com>
14371
14372 * decl2.c (flag_vtable_thunks): Always set it to 1.
14373 (flag_new_abi): Likewise.
14374 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14375
14376 * Makefile.in (g++spec.o): Fix typo.
14377
14378 2001-02-09 Jason Merrill <jason@redhat.com>
14379
14380 * lang-specs.h: Restore definition of __EXCEPTIONS.
14381
14382 2001-02-08 Jason Merrill <jason@redhat.com>
14383
14384 * search.c (shared_member_p): New function.
14385 (lookup_field_r): Use it.
14386 * cp-tree.h (SHARED_MEMBER_P): Remove.
14387
14388 * method.c (process_overload_item): Handle template-dependent array
14389 bounds.
14390 * pt.c (type_unification_real): If we end up with undeduced nontype
14391 parms, try again.
14392
14393 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14394 types.
14395
14396 * typeck2.c (friendly_abort): Don't say anything if we have
14397 earlier errors or sorries.
14398
14399 * decl.c (check_tag_decl): Notice attempts to redefine bool and
14400 wchar_t. Ignore if in_system_header.
14401
14402 * decl.c (maybe_push_cleanup_level): New fn...
14403 (start_decl_1): ...split out from here.
14404 * cvt.c (build_up_reference): Use it.
14405 * cp-tree.h: Declare it.
14406
14407 2001-02-07 Mark Mitchell <mark@codesourcery.com>
14408
14409 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14410 spec.
14411
14412 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
14413
14414 * pt.c (lookup_template_class): Make sure it's a primary
14415 template or template_template_parm when called from the parser.
14416 (instantiate_template_class): Add assertion.
14417
14418 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
14419
14420 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14421 from error_mark_node.
14422
14423 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
14424
14425 Fix specification and implementation bugs in V3 ABI
14426 construction vtables.
14427 * cp-tree.h (flag_dump_class_layout): New flag.
14428 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14429 (BINFO_LOST_PRIMARY_P): New flag.
14430 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14431 (BINFO_PRIMARY_MARKED_P): Rename to ...
14432 (BINFO_PRIMARY_P): ... here.
14433 (binfo_via_virtual): New prototype.
14434 * decl2.c (flag_dump_class_layout): New flag.
14435 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14436 use `=' as a file name separator.
14437 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14438 bases.
14439 (build_vtbl_address): If this is a virtual primary base, then
14440 get the vtbl of what it is ultimately primary for.
14441 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14442 for BINFO_PRIMARY_P.
14443 (dfs_skip_nonprimary_vbases_markedp): Likewise.
14444 (get_shared_vbase_if_not_primary): Likewise.
14445 (dfs_get_pure_virtuals): Likewise.
14446 (expand_upcast_fixups): Likewise.
14447 (fixup_virtual_upcast_offsets): Likewise.
14448 (dfs_find_vbase_instance): Likewise.
14449 (find_vbase_instance): Likewise.
14450 (binfo_from_vbase): Adjust comment to reflect reality.
14451 (binfo_via_virtual): New function.
14452 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14453 for binfo walking during VTT construction.
14454 (dfs_mark_primary_bases): Remove.
14455 (force_canonical_binfo_r): New function.
14456 (force_canonical_binfo): New function.
14457 (mark_primary_virtual_base): New function.
14458 (mark_primary_bases): Walk in inheritance graph order, use
14459 mark_primary_virtual_base.
14460 (determine_primary_base): Use some more intermediate variables.
14461 (dfs_find_final_overrider): Don't check for overriding along a
14462 virtual path.
14463 (dfs_modify_vtables): Walk into primary virtual bases too.
14464 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14465 (build_base_fields): Likewise.
14466 (dfs_set_offset_for_unshared_vbases): Likewise.
14467 (layout_virtual_bases): Likewise.
14468 (end_of_class): Likewise.
14469 (finish_struct_1): Call dump_class_hierarchy, if requested.
14470 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14471 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14472 (dump_class_hierarchy): Add file parameter. Append to file, if
14473 required.
14474 (finish_vtbls): Adjust accumulate_vtbl_inits call.
14475 Use canonical base for virtual bases.
14476 (build_vtt): Add more comments. Adjust build_vtt_inits call.
14477 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14478 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14479 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14480 virtual VTTs.
14481 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14482 from DATA. We want virtual primary bases and all bases via virtual.
14483 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14484 virtual base when not a construction vtable.
14485 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14486 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14487 Use canonical bases when processing virtual bases.
14488 (accumulate_vtbl_inits): We're interested in any base via a
14489 virtual path.
14490 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14491 within a construction vtable, determine what is being overridden.
14492 (build_vtbl_initializer): Add more comments
14493 (add_vcall_offset_vtbl_entries_1): Adjust comment.
14494 (build_rtti_vtbl_entries): Check if the base has lost its
14495 primary.
14496
14497 2001-02-05 Mark Mitchell <mark@codesourcery.com>
14498
14499 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14500
14501 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14502
14503 * decl.c (pushdecl): Call abort instead of fatal.
14504 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14505 * init.c (build_new_1): Likewise.
14506 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14507 * decl.c (build_typename_type): hash_table_init now returns void.
14508 decl.c (init_decl_processing): Make an error non-fatal.
14509
14510 2001-02-04 Mark Mitchell <mark@codesourcery.com>
14511
14512 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14513 Document.
14514 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14515 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14516 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14517 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14518 * decl.c (maybe_commonize_var): Use the new name-mangling where
14519 appropriate.
14520 * decl2.c (comdat_linkage): Enhance comments. Make all
14521 compiler-generated things static, if COMDAT is not available.
14522 (get_tinfo_decl): Do not make typeinfo objects that belong in the
14523 library COMDAT.
14524 (tinfo_base_init): Use the correct mangled name for typeinfo
14525 strings, and push them into the global scope.
14526 (typeinfo_in_lib_p): New function.
14527 (synthesize_tinfo_var): Use it.
14528 (create_real_tinfo_var): Likewise.
14529
14530 2001-02-03 Jakub Jelinek <jakub@redhat.com>
14531
14532 * decl.c (push_class_binding): Use context_for_name_lookup instead
14533 of CP_DECL_CONTEXT.
14534 * search.c (context_for_name_lookup): Remove static. Check for NULL
14535 context in the loop.
14536 * cp-tree.h (context_for_name_lookup): Add prototype.
14537
14538 2001-02-02 Jakub Jelinek <jakub@redhat.com>
14539
14540 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14541 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14542 Remove.
14543 * call.c (convert_class_to_reference, build_user_type_conversion_1,
14544 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14545
14546 2001-02-02 Mark Mitchell <mark@codesourcery.com>
14547
14548 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14549 of macros used when compiling g++spec.c.
14550 * g++spec.c (lang_specific_driver): Link with the shared
14551 libgcc by default.
14552
14553 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
14554
14555 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14556 make_reference_declarator, make_call_declarator), method.c
14557 (implicitly_declare_fn), parse.y (namespace_using_decl,
14558 notype_unqualified_id, expr_or_declarator, new_type_id,
14559 after_type_declarator, direct_after_type_declarator,
14560 notype_declarator, complex_notype_declarator,
14561 complex_direct_notype_declarator, qualified_id,
14562 notype_qualified_id, overqualified_id, direct_new_declarator,
14563 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14564 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14565 instead of build_parse_node.
14566
14567 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14568
14569 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14570 (minus_one_node): Moved to top level gcc directory. Renamed
14571 to integer_minus_one_node.
14572
14573 * init.c (init_init_processing): Don't set minus_one_node.
14574 (build_vec_init): Use integer_minus_one_node.
14575
14576 * rtti.c (get_tinfo_decl_dynamic): Likewise.
14577
14578 2001-01-28 Jakub Jelinek <jakub@redhat.com>
14579
14580 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14581 identical and they would be replaced with constant, remove
14582 MODIFY_EXPR from the tree.
14583
14584 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14585
14586 * Make-lang.in: Remove all dependencies on defaults.h.
14587 * call.c: Don't include defaults.h.
14588 * decl.c: Likewise.
14589 * decl2.c: Likewise.
14590 * except.c: Likewise.
14591 * pt.c: Likewise.
14592 * rtti.c: Likewise.
14593 * tree.c: Likewise.
14594 * typeck.c: Likewise.
14595
14596 2001-01-25 Jakub Jelinek <jakub@redhat.com>
14597
14598 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14599 operators even in "C" linkage.
14600 * method.c (set_mangled_name_for_decl): Likewise.
14601 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14602 overloaded operators in "C" linkage.
14603
14604 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14605
14606 * pt.c (tsubst_decl): Remove IN_DECL parameter.
14607 (tsubst_arg_types): Check parameter is not void.
14608 (tsubst): Adjust tsubst_decl call.
14609
14610 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14611
14612 * call.c (add_builtin_candidate): Quote std properly, from
14613 previous change.
14614
14615 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14616
14617 * pt.c (check_explicit_specialization): Clone constructors and
14618 destructors.
14619
14620 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14621
14622 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14623 indicates anything special about template depth. Make sure we
14624 only count the user visible template classes.
14625
14626 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14627
14628 * call.c (build_conv): Typo in comment.
14629 (add_builtin_candidate): Add more explanation.
14630 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14631 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14632 when we have enumeral types.
14633 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14634 candidates for relops and eqops.
14635 (joust): Simplify control flow. Allow a non-template user
14636 function to hide a builtin.
14637
14638 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
14639
14640 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14641 (more_specialized): Add deduction parameter.
14642 * call.c (joust): Adjust more_specialized call.
14643 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14644 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14645 (get_bindings_order): Remove.
14646 (get_bindings_real): Add DEDUCE parameter.
14647 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14648 REFERENCE_TYPE jig for DEDUCE_ORDER.
14649 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14650 maybe_adjust_types_for_deduction.
14651 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14652 directly.
14653 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14654 (check_cv_quals_for_unify): Use new unify qualifier flags.
14655 (unify): Clear new unify qualifier flags.
14656 (get_bindings_real): Add DEDUCE parameter.
14657 (get_bindings): Adjust call to get_bindings_real.
14658 (get_bindings_overload): Likewise.
14659 (most_specialized_instantiation): Adjust call to
14660 more_specialized.
14661
14662 2001-01-19 Jason Merrill <jason@redhat.com>
14663
14664 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14665
14666 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14667 -fnew-abi.
14668
14669 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
14670
14671 * decl2.c (arg_assoc_class): Fix double iteration logic.
14672
14673 2001-01-19 Jason Merrill <jason@redhat.com>
14674
14675 * init.c (build_delete): Always call convert_force to strip cv-quals.
14676
14677 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14678 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14679 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14680
14681 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14682
14683 * search.c (get_vbase_1): Count only virtual bases.
14684
14685 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14686
14687 * class.c (duplicate_tag_error): Robustify flag clearing.
14688
14689 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14690
14691 * cp-tree.h (lookup_template_class): Add complain parm.
14692 * decl.c (lookup_namespace_name): Adjust call to
14693 lookup_template_class.
14694 (make_typename_type): Likewise.
14695 * semantics.c (finish_template_type): Likewise.
14696 * pt.c (lookup_template_class): Add complain parm. Adjust.
14697 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14698 (tsubst): Likewise.
14699
14700 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14701
14702 * pt.c (copy_default_args_to_explicit_spec): Preserve
14703 object's CV quals. Reorganize.
14704
14705 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14706
14707 * typeck.c (build_modify_expr): Say `initialization' for
14708 INIT_EXPRs.
14709 * init.c (build_default_init): Convert to enumeral type, if
14710 needed.
14711
14712 2001-01-18 Jakub Jelinek <jakub@redhat.com>
14713
14714 * parse.y (nomods_initdcl0): Properly set things up for
14715 initdcl0_innards.
14716
14717 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14718
14719 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14720 (type_unification_real): Set it.
14721 (unify): Use it.
14722
14723 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14724
14725 * decl.c (finish_destructor_body): Convert to vbase pointer here.
14726
14727 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14728
14729 * semantics.c (begin_class_definition): Check we're not inside a
14730 template parm list.
14731
14732 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14733
14734 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14735 BASELINK_P.
14736
14737 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14738
14739 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14740 * call.c (build_over_call): Add comment.
14741
14742 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14743
14744 * cvt.c (ocp_convert): Handle vector type conversion
14745 * typeck2.c (digest_init): Handle vector type initializations
14746
14747 2001-01-16 Phil Edwards <pme@sources.redhat.com>
14748
14749 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
14750 was given.
14751
14752 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14753
14754 * pt.c (check_nontype_parm): Rename to ...
14755 (invalid_nontype_parm_type_p): ... here.
14756 (process_template_parm): Adjust.
14757 (convert_template_argument): Adjust.
14758
14759 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14760
14761 * pt.c (check_nontype_parm): New function.
14762 (process_template_parm): Use it.
14763 (convert_template_argument): Use it.
14764 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14765 member.
14766
14767 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
14768
14769 * tree.c: Add defaults.h
14770 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14771 * Make-lang.in (cp/tree.o): Add defaults.h.
14772
14773 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14774
14775 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14776
14777 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14778
14779 * g++.1: Change to be ".so man1/gcc.1".
14780
14781 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14782
14783 * Make-lang.in (c++.info, c++.install-info): Build and install g++
14784 internals info.
14785 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14786 ($(srcdir)/cp/g++int.info): New target.
14787 * gxxint.texi: Add info directory entry. Use @@ in email address.
14788 * .cvsignore: Update.
14789
14790 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14791
14792 * typeck.c (build_c_cast): Do template processing earlier.
14793 Always pedwarn on array casts.
14794
14795 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14796
14797 * friend.c (make_friend_class): Make sure a templated class is
14798 actually a template.
14799
14800 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14801
14802 * decl2.c (get_guard): Set linkage from guarded decl.
14803
14804 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14805
14806 * call.c (convert_default_arg): Check for unprocessed
14807 DEFAULT_ARG.
14808 * cp-tree.h (replace_defarg): Move to spew.c.
14809 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14810 spew.c, which is where they really are.
14811 (done_pending_defargs): Declare.
14812 (unprocessed_defarg_fn): Declare.
14813 * decl.c (replace_defarg): Move to spew.c
14814 * parse.y (structsp): Call done_pending_defargs.
14815 * spew.c (defarg_fns): Rearrange list structure.
14816 (defarg_fnsdone): New static variable.
14817 (defarg_depfns): New static variable.
14818 (init_spew): Adjust.
14819 (add_defarg_fn): Store the type in TREE_TYPE.
14820 (do_pending_defargs): Detect and deal with ordering constraints
14821 and circularity.
14822 (done_pending_defargs): New function.
14823 (unprocessed_defarg_fn): New function.
14824 (replace_defarg): Moved from decl.c. Robustify. Don't save
14825 if circularity detected.
14826
14827 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14828
14829 * pt.c (unify): Check array has a domain, before checking
14830 whether it is variable sized.
14831
14832 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14833
14834 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14835 parameters with pointers to arrays of unknown bound.
14836
14837 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14838
14839 * parse.y (template_parm_header, template_spec_header): New
14840 reductions. Split out from ...
14841 (template_header): ... here. Use them.
14842 (template_template_parm): Use template_parm_header.
14843 * semantics.c (finish_template_template_parm): Add assert.
14844
14845 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14846
14847 * mangle.c (write_builtin_type): Fix thinko.
14848
14849 * pt.c (copy_default_args_to_explicit_spec_1): New function.
14850 (copy_default_args_to_explicit_spec): Likewise.
14851 (check_explicit_specialization): Use it.
14852
14853 * class.c (finish_struct_1): Remove last argument in call to
14854 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14855 * decl.c (builtin_function): Likewise.
14856 (build_cp_library_fn): Likewise.
14857 (check_initializer): Likewise.
14858 (make_rtl_for_nonlocal_decl): Likewise.
14859 (cp_finish_decl): Likewise.
14860 (start_function): Likewise.
14861 * decl2.c (finish_anon_union): Likewise.
14862 * friend.c (do_friend): Likewise.
14863 * init.c (build_java_class_ref): Likewise.
14864 * method.c (make_thunk): Likewise.
14865 * pt.c (tsubst_friend_function): Likewise.
14866 * semantics.c (expand_body): Likewise.
14867
14868 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14869
14870 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14871 looking at DECL_CLONED_FUNCTION for non-functions.
14872
14873 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14874
14875 * error.c (dump_template_parameter): Use parm to determine how
14876 to print default value.
14877
14878 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14879
14880 * class.c (duplicate_tag_error): Clear more flags.
14881
14882 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14883
14884 * call.c (build_new_method_call): Use binfo_for_vbase.
14885
14886 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
14887
14888 * cp-tree.h (flag_cond_mismatch): Don't declare.
14889 * decl2.c (flag_cond_mismatch): Don't define.
14890 (lang_f_options): Remove cond-mismatch.
14891 (unsupported_options): Add cond-mismatch.
14892
14893 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
14894
14895 * class.c (handle_using_decl): Reject using of constructor name
14896 of sourcing class. Allow injecting of a method with same name as
14897 nested class. Fixup error messages.
14898
14899 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
14900
14901 * decl2.c (lang_decode_option): Handle -Wformat=2.
14902
14903 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14904
14905 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14906 initialized_in_class.
14907 (DECL_DEFINED_IN_CLASS_P): Rename to ...
14908 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14909 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14910 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14911 * pt.c (check_default_tmpl_args): Adjust for
14912 DECL_INITIALIZED_IN_CLASS_P.
14913 (instantiate_class_template): Likewise.
14914 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14915
14916 * class.c (finish_struct): Constify saved_filename.
14917
14918 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14919
14920 * class.c (duplicate_tag_error): Adjust diagnostic.
14921 (finish_struct): Locally set location to start of struct.
14922 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14923
14924 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14925
14926 * decl.c (struct binding_level): Adjust class_shadowed comments
14927 to reflect reality.
14928 (push_class_level_binding): Adjust comments to reflect reality.
14929 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14930 Don't set TREE_VALUE on the class_shadowed list.
14931
14932 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14933
14934 * decl2.c (acceptable_java_type): Allow references too.
14935 * init.c (build_java_class_ref): When using the new ABI, search
14936 `class$' and have it mangled with `mangle_decl.'
14937 * mangle.c (write_java_integer_type_codes): New function.
14938 (write_builtin_type): Detect and mangle Java integer and real
14939 types.
14940
14941 2001-01-07 Mark Mitchell <mark@codesourcery.com>
14942
14943 * decl2.c (grokfield): Don't accept `asm' specifiers for
14944 non-static data members.
14945
14946 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14947
14948 * expr.c (cplus_expand_expr): Don't reset `target'.
14949
14950 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
14951
14952 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14953
14954 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14955
14956 * parse.y (template_datadef): Check for error_mark_node.
14957
14958 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14959
14960 * cp-tree.def (DEFAULT_ARG): Make `x' class.
14961
14962 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
14963
14964 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14965 (record_builtin_type): Make non-static.
14966 (flag_short_double): Don't declare.
14967 (init_decl_processing): Remove the creation of many tree nodes now
14968 in c_common_nodes_and_builtins.
14969 (build_void_list_node): New function.
14970 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14971 * cp-tree.h (flag_short_wchar): Don't declare.
14972
14973 2001-01-04 Mark Mitchell <mark@codesourcery.com>
14974
14975 * call.c (build_conv): Don't use build1 for USER_CONV.
14976 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14977
14978 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
14979
14980 * lex.c (lang_init): Call c_common_lang_init.
14981
14982 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14983
14984 * search.c (lookup_fnfields_here): Remove.
14985 (look_for_overrides_r): Use lookup_fnfields_1.
14986 Ignore functions from using declarations.
14987
14988 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14989
14990 Implement exceptions specifiers for implicit member functions.
14991 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14992 * method.c (synthesize_exception_spec): New function.
14993 (locate_dtor, locate_ctor, locate_copy): New functions.
14994 (implicitly_declare_fn): Generate the exception spec too.
14995 * search.c (check_final_overrider): Check artificial functions
14996 too.
14997 * typeck2.c (merge_exception_specifiers): New function.
14998
14999 2001-01-03 Jason Merrill <jason@redhat.com>
15000
15001 * init.c (build_default_init): New fn.
15002 (perform_member_init): Split out from here.
15003 (build_new_1): Use it. Simplify initialization logic.
15004 (build_vec_init): Take an array, rather than a pointer and maxindex.
15005 Speed up simple initializations. Don't clean up if we're assigning.
15006 * cp-tree.h: Adjust.
15007 * decl2.c (do_static_initialization): Remove TREE_VEC case.
15008 * parse.y (new_initializer): Return void_zero_node for ().
15009 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
15010 * typeck2.c (digest_init): Only complain about user-written
15011 CONSTRUCTORs.
15012
15013 2000-12-22 Mike Stump <mrs@wrs.com>
15014
15015 * decl2.c: (max_tinst_depth): Increase to 50.
15016
15017 2001-01-02 Mark Mitchell <mark@codesourcery.com>
15018
15019 * class.c (invalidate_class_lookup_cache): Zero the
15020 previous_class_values.
15021 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
15022 TREE_INT_CST_HIGH.
15023 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
15024 * decl.c (free_bindings): New variable.
15025 (push_binding): Don't create a new binding if we have one on the
15026 free list.
15027 (pop_binding): Put old bindings on the free list.
15028 (init_decl_processing): Use size_int, not build_int_2.
15029 Register free_bindings as a GC root.
15030 (cp_make_fname_decl): Use size_int, not build_int_2.
15031 (push_inline_template_parms_recursive): Likewise.
15032 (end_template_parm_list): Likewise.
15033 (for_each_template_parm): Do not use walk_tree_without_duplicates.
15034 (tsubst_template_parms): Use size_int, not build_int_2.
15035 (tsubst): Likewise.
15036 * rtti.c (get_vmi_pseudo_type_info): Likewise.
15037
15038 2001-01-02 Richard Henderson <rth@redhat.com>
15039
15040 * parse.y (asm): Set ASM_INPUT_P.
15041
15042 2001-01-02 Jason Merrill <jason@redhat.com>
15043
15044 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
15045 for v3 ABI.
15046
15047 * typeck.c (cp_truthvalue_conversion): New fn.
15048 * cvt.c (ocp_convert): Use it.
15049
15050 * cp-tree.h: Lose c-common.c decls.
15051
15052 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
15053 * cvt.c (convert_to_void): Use type_unknown_p.
15054
15055 * typeck.c (strip_all_pointer_quals): Also strip quals from
15056 pointer-to-member types.
15057
15058 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
15059 parse.y as C.
15060
15061 * call.c (build_new_method_call): Do evaluate the object parameter
15062 when accessing a static member.
15063 * typeck.c (build_component_ref): Likewise.
15064
15065 2001-01-02 Andreas Jaeger <aj@suse.de>
15066
15067 * decl.c (cp_missing_noreturn_ok_p): New.
15068 (init_decl_processing): Set lang_missing_noreturn_ok_p.
15069
15070 2000-12-29 Jakub Jelinek <jakub@redhat.com>
15071
15072 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
15073
15074 2000-12-29 Mark Mitchell <mark@codesourcery.com>
15075
15076 * class.c (pushclass): Remove #if 0'd code.
15077 * cp-tree.h (overload_template_name): Remove.
15078 * decl.c (store_bindings): Simplify.
15079 (pop_from_top_level): Likewise.
15080 * pt.c (overload_template_name): Remove.
15081 (instantiate_decl): Don't call push_to_top_level if it's not
15082 needed.
15083
15084 2000-12-28 Mark Mitchell <mark@codesourcery.com>
15085
15086 * pt.c (register_local_specialization): Don't return a value.
15087 (lookup_template_class): Use move-to-front heuristic when looking
15088 up template instantiations.
15089 (instantiate_decl): Only push_to_top_level when we're actually
15090 going to instantiate the template.
15091
15092 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
15093
15094 * search.c (binfo_for_vtable): Return least derived class, not
15095 most. Handle secondary vtables.
15096
15097 2000-12-22 Jason Merrill <jason@redhat.com>
15098
15099 * pt.c (more_specialized): Don't optimize len==0.
15100 (fn_type_unification): If we're adding the return type, increase len.
15101
15102 * typeck.c (build_binary_op): Fix pmf comparison logic.
15103
15104 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
15105 DECL_STATIC_FUNCTION_P.
15106
15107 * semantics.c (genrtl_finish_function): Don't try to jump to
15108 return_label unless it exists.
15109
15110 In partial ordering for a call, ignore parms for which we don't have
15111 a real argument.
15112 * call.c (joust): Pass len to more_specialized.
15113 (add_template_candidate_real): Strip 'this', pass len.
15114 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
15115 (get_bindings_order): New fn. Pass len down.
15116 (get_bindings_real): Strip 'this', pass len.
15117 (fn_type_unification): Likewise.
15118 (type_unification_real): Succeed after checking 'len' args.
15119 (most_specialized_instantiation): Lose explicit_args parm.
15120 * class.c (resolve_address_of_overloaded_function): Strip 'this',
15121 pass len.
15122
15123 2000-12-21 Jason Merrill <jason@redhat.com>
15124
15125 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
15126 DECL_TEMPLATE_RESULT.
15127
15128 * search.c (lookup_field_r): Call lookup_fnfields_1, not
15129 lookup_fnfields_here.
15130
15131 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
15132
15133 * call.c (build_object_call): Also allow conversions that return
15134 reference to pointer to function.
15135 (add_conv_candidate): Handle totype being ref to ptr to fn.
15136 (build_field_call): Also allow members of type reference to function.
15137 Lose support for calling pointer to METHOD_TYPE fields.
15138
15139 * error.c (dump_expr): Handle *_CAST_EXPR.
15140
15141 * typeck2.c (build_scoped_ref): Always convert to the naming class.
15142
15143 * tree.c (break_out_cleanups): Lose.
15144 * cp-tree.h: Remove prototype.
15145 * typeck.c (build_component_ref): Don't break_out_cleanups.
15146 (build_compound_expr): Likewise.
15147 * semantics.c (finish_expr_stmt): Likewise.
15148
15149 2000-12-20 Richard Henderson <rth@redhat.com>
15150
15151 * cp-tree.h: Update declarations.
15152 * decl.c (finish_case_label): Return the new stmt node.
15153 * semantics.c (finish_goto_stmt): Likewise.
15154 (finish_expr_stmt, finish_return_stmt): Likewise.
15155 (finish_break_stmt, finish_continue_stmt): Likewise.
15156 (finish_asm_stmt): Likewise.
15157 * parse.y (already_scoped_stmt): Set STMT_LINENO.
15158 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
15159 (simple_if, simple_stmt): Return the new stmt node.
15160 (save_lineno): New.
15161
15162 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
15163
15164 * cp-tree.h: Don't declare warn_long_long.
15165
15166 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15167
15168 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
15169 IS_AGGR_TYPE.
15170
15171 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15172
15173 * pt.c (unify): Handle when both ARG and PARM are
15174 BOUND_TEMPLATE_TEMPLATE_PARM.
15175
15176 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15177
15178 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
15179 DECL_TEMPLATE_PARM_P.
15180
15181 2000-12-15 Jason Merrill <jason@redhat.com>
15182
15183 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
15184
15185 * init.c (build_new_1): Don't strip quals from type.
15186
15187 * decl.c (pushdecl): Don't check for linkage on a non-decl.
15188
15189 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
15190
15191 * call.c (build_new_function_call): Lose space before paren in
15192 error message.
15193 (build_new_method_call): Likewise.
15194
15195 * typeck2.c (build_m_component_ref): Propagate quals from datum.
15196
15197 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15198
15199 * pt.c (check_explicit_specialization): Propagate default
15200 function arguments to explicit specializations.
15201
15202 2000-12-13 DJ Delorie <dj@redhat.com>
15203
15204 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
15205 and <? operators.
15206
15207 2000-12-08 Jason Merrill <jason@redhat.com>
15208
15209 * error.c (dump_function_name): Don't let the user see __comp_ctor.
15210
15211 Clean up copy-initialization in overloading code.
15212 * call.c (build_user_type_conversion_1): Die if we are asked to
15213 convert to the same or a base type.
15214 (implicit_conversion): Avoid doing so. Lose reference binding code.
15215 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
15216 direct-initialization. Also do direct-init part of copy-init.
15217 (build_user_type_conversion): Don't provide context to convert_like.
15218 * cvt.c (ocp_convert): build_user_type_conversion will now provide
15219 the constructor call for copy-init.
15220
15221 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
15222 instantiation of a member template.
15223 (do_decl_instantiation): Not here.
15224
15225 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15226
15227 * class.c (check_field_decls): Don't special case anonymous
15228 fields in error messages.
15229 (note_name_declared_in_class): Use %D on diagnostic.
15230
15231 * tree.c (pod_type_p): Use strip_array_types.
15232 (cp_valid_lang_attribute): Likewise.
15233 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
15234 multiple evaluations.
15235 (cp_has_mutable_p): Use strip_array_types.
15236
15237 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
15238
15239 * cp-tree.h (sufficient_parms_p): Declare new function.
15240 * call.c (sufficient_parms_p): New function, broken out of ...
15241 (add_function_candidate): ... here. Use it.
15242 (add_conv_candidate): Use it.
15243 * decl.c (grok_ctor_properties): Use it.
15244
15245 2000-12-07 Jakub Jelinek <jakub@redhat.com>
15246
15247 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
15248
15249 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
15250
15251 * decl2.c (lang_decode_option): Handle -Wformat-security.
15252
15253 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15254
15255 * pt.c (verify_class_unification): New function.
15256 (get_class_bindings): Use it.
15257 (try_class_unification): Tidy.
15258 (unify): Handle when argument of a template-id is not
15259 template parameter dependent.
15260 (template_args_equal): Handle when TREE_CODE's do not match.
15261
15262 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
15263
15264 * lang-specs.h (c++): When invoking the stand-alone preprocessor
15265 for -save-temps, pass all relevant -Defines to it, and then don't
15266 pass them to cc1plus.
15267
15268 2000-12-05 Will Cohen <wcohen@redhat.com>
15269
15270 * decl.c (finish_case_label): Cleared
15271 more_cleanups_ok in surrounding function scopes.
15272 (define_label): Likewise.
15273
15274 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15275
15276 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15277 (get_matching_virtual): Remove.
15278 (look_for_overrides): Declare new function.
15279 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15280 DECL_VINDEX here.
15281 * class.c (check_for_override): Move base class iteration code
15282 to look_for_overrides.
15283 * search.c (next_baselink): Remove.
15284 (get_virtuals_named_this): Remove.
15285 (get_virtual_destructor): Remove.
15286 (tree_has_any_destructors_p): Remove.
15287 (struct gvnt_info): Remove.
15288 (check_final_overrider): Remove `virtual' from error messages.
15289 (get_matching_virtuals): Remove. Move functionality to ...
15290 (look_for_overrides): ... here, and ...
15291 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15292 to be overriding.
15293
15294 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15295
15296 * typeck.c (get_delta_difference): If via a virtual base,
15297 return zero.
15298 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15299 adjustment.
15300
15301 2000-12-04 Richard Henderson <rth@redhat.com>
15302
15303 * error.c (dump_tree): Use output_add_string not OB_PUTS.
15304
15305 2000-12-04 Jason Merrill <jason@redhat.com>
15306
15307 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15308 (write_builtin_type): Pass intSI_type_node and the like through
15309 type_for_mode.
15310 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15311 Pass intSI_type_node and the like through type_for_mode.
15312 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15313 * pt.c (tsubst, unify): Likewise.
15314 * tree.c (walk_tree): Likewise.
15315 * error.c (dump_type): Likewise.
15316 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15317
15318 * Make-lang.in: Tweak top comment for emacs.
15319 (cp/TAGS): Restore.
15320
15321 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15322
15323 * class.c (clone_function_decl): Robustify.
15324
15325 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
15326
15327 * decl.c (store_bindings): Only search in the non modified
15328 old_bindings for duplicates.
15329
15330 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
15331
15332 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15333 TYPE_POLYMORPHIC_P.
15334
15335 * typeck.c (build_static_cast): Remove unused variable.
15336
15337 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15338
15339 * pt.c: Fix typo in comment.
15340
15341 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15342
15343 * decl2.c (warn_format): Remove definition.
15344 (lang_decode_option): Handle -Wformat-nonliteral,
15345 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
15346
15347 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15348
15349 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15350 (init_decl_processing): Don't create string_type_node,
15351 const_string_type_node, wint_type_node, intmax_type_node,
15352 uintmax_type_node, default_function_type, ptrdiff_type_node and
15353 unsigned_ptrdiff_type_node. Adjust position of call to
15354 c_common_nodes_and_builtins.
15355 (identifier_global_value): New function.
15356
15357 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
15358
15359 * call.c (standard_conversion): Reject pointer to member
15360 conversions from ambiguous, inaccessible or virtual bases.
15361 * typeck.c (build_static_cast): Don't check pointers to members
15362 specially.
15363
15364 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15365
15366 * method.c (do_build_copy_constructor): Preserve cv
15367 qualifications when accessing source object members.
15368 (do_build_assign_ref): Likewise. Remove separate diagnostics for
15369 unnamed fields.
15370
15371 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15372
15373 * method.c (do_build_assign_ref): Construct appropriately
15374 CV-qualified base reference. Don't allow const casts in base
15375 conversion.
15376
15377 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15378
15379 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15380 incomplete return type.
15381
15382 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15383
15384 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15385 * semantics.c (finish_base_specifier): Accept a _TYPE not a
15386 _DECL.
15387
15388 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15389
15390 * spew.c (yyerror): Cope if yylval.ttype is NULL.
15391
15392 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15393
15394 * decl.c (grokdeclarator): Diagnose undefined template contexts.
15395
15396 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15397
15398 * decl.c (grokdeclarator): Do type access control on friend
15399 class.
15400
15401 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15402
15403 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15404 bison parser ickiness.
15405 * pt.c (tsubst_friend_function): Enter namespace scope when
15406 tsubsting the function name.
15407 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15408
15409 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15410
15411 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15412 * cvt.c (cp_convert_to_pointer): Add force parameter.
15413 Allow conversions via virtual base if forced.
15414 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15415 (ocp_convert): Likewise.
15416 * search.c (binfo_from_vbase): Return the virtual base's binfo.
15417 * typeck.c (get_delta_difference): Adjust handling of virtual
15418 bases.
15419
15420 2000-11-26 Mark Mitchell <mark@codesourcery.com>
15421
15422 * tree.c (struct list_hash): Remove.
15423 (list_hash_table): Make it be an htab.
15424 (struct list_proxy): New type.
15425 (list_hash_eq): New function.
15426 (list_hash_pieces): Renamed from ...
15427 (list_hash): ... this.
15428 (list_hash_lookup): Remove.
15429 (list_hash_add): Remove.
15430 (hash_tree_cons): Use the generic hashtable.
15431 (mark_list_hash): Remove.
15432 (init_tree): Create the hashtable.
15433
15434 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
15435
15436 * method.c (build_mangled_C9x_name): Rename to
15437 build_mangled_C99_name. Change C9X references in comments to
15438 refer to C99.
15439
15440 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15441
15442 * parse.y (unary_expr): Move VA_ARG from here ...
15443 (primary): ... to here.
15444
15445 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15446
15447 * semantics.c (finish_id_expr): If type is error_mark, return
15448 error_mark.
15449
15450 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
15451
15452 * pt.c (lookup_template_class): Simplify loop exit constructs.
15453 Cope when there is no partial instantiation of a template
15454 template member.
15455
15456 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
15457
15458 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15459
15460 2000-11-22 Mark Mitchell <mark@codesourcery.com>
15461
15462 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15463 prefix.
15464
15465 * pt.c (do_decl_instantiate): Explicitly clone constructors and
15466 destructors that haven't already been cloned.
15467
15468 2000-11-20 Richard Henderson <rth@redhat.com>
15469
15470 * parse.y (yyparse_1): Rename the parser entry point.
15471
15472 2000-11-20 Alex Samuel <samuel@codesourcery.com>
15473
15474 * mangle.c (write_name): Use <unscoped-name> for names directly in
15475 function scope.
15476 (write_unscoped_name): Accept names directly in function scope.
15477
15478 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
15479
15480 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15481 * parse.y (extdef): Add EXPORT reduction.
15482 * spew.c (yylex): Don't skip export here.
15483
15484 2000-11-19 Mark Mitchell <mark@codesourcery.com>
15485
15486 * decl.c (init_decl_processing): Correct name of pure virtual
15487 function under the new ABI.
15488 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15489 (throw_bad_typeid): Likewise for bad typeid function.
15490
15491 2000-11-18 Mark Mitchell <mark@codesourcery.com>
15492
15493 * decl.c (grokparms): Don't even function types of `void' type,
15494 either.
15495 * mangle.c (write_type): Don't crash when confronted with the
15496 error_mark_node.
15497
15498 * decl.c (grokparms): Don't create parameters of `void' type.
15499
15500 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
15501
15502 * lex.c (mark_impl_file_chain): Delete.
15503 (init_parse): Remove call to ggc_add_string_root. No need to
15504 ggc_strdup a string constant. Do not add impl_file_chain to GC
15505 roots.
15506 (handle_pragma_implementation): No need to ggc_strdup main_filename.
15507
15508 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15509
15510 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15511
15512 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15513
15514 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15515 * decl.c (grokdeclarator): Don't reject void parms here.
15516 (require_complete_types_for_parms): Simplify, use
15517 complete_type_or_else.
15518 (grokparms): Remove bitrot. Remove funcdef parm.
15519 Deal with ellipsis parm lists here.
15520 * semantics.c (finish_parmlist): Don't append void_list_node
15521 here. Set PARMLIST_ELLIPSIS_P.
15522
15523 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15524
15525 * typeck2.c (incomplete_type_error): Reorganize to avoid
15526 excessive diagnostics.
15527
15528 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
15529
15530 * lex.c (struct impl_files, internal_filename): Constify a char *.
15531
15532 2000-11-16 Mark Mitchell <mark@codesourcery.com>
15533
15534 * mangle.c (write_special_name_constructor): Don't generate
15535 assembler junk when confronted with an old-style constructor.
15536 (write_special_name_destructor): Likewise.
15537 (mangle_decl_string): Do it here instead.
15538
15539 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
15540
15541 * call.c (op_error): Make error messages clearer.
15542
15543 2000-11-15 Mark Mitchell <mark@codesourcery.com>
15544
15545 * decl.c (wrapup_globals_for_namespace): Don't mark things
15546 TREE_ASM_WRITTEN when they're not.
15547
15548 2000-11-15 Jason Merrill <jason@redhat.com>
15549
15550 * typeck2.c (friendly_abort): Uncount the error before handing
15551 off to fancy_abort.
15552
15553 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
15554
15555 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15556
15557 2000-11-14 Mark Mitchell <mark@codesourcery.com>
15558
15559 * class.c (build_vtbl_initializer): Fix typo in comment.
15560 * typeck.c (expr_sizeof): Don't crash on errors.
15561
15562 2000-11-14 Jim Wilson <wilson@redhat.com>
15563
15564 * lang-specs.h: Add %2 after %(cc1_options).
15565
15566 2000-11-14 Richard Henderson <rth@redhat.com>
15567
15568 * typeck.c (c_sizeof): Be strict about casting result value
15569 back to c_size_type_node.
15570 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15571
15572 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
15573
15574 * typeck.c (build_unary_op): Use boolean_increment from
15575 c-common.c, moving the relevant code there.
15576
15577 2000-11-11 Jason Merrill <jason@redhat.com>
15578
15579 * typeck.c (mark_addressable): Don't call put_var_into_stack.
15580
15581 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15582 in inlines.
15583
15584 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15585
15586 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15587 * lex.c (copy_lang_decl): Likewise.
15588
15589 2000-11-09 Mark Mitchell <mark@codesourcery.com>
15590
15591 * dump.c (cp_dump_tree): Don't dump function bodies here.
15592
15593 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15594 (dump.o): Update dependency list.
15595 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15596 (flag_dump_translation_unit): Likewise.
15597 (CP_TYPE_QUALS): Adjust definition.
15598 (DECL_C_BIT_FIELD): Remove.
15599 (SET_DECL_C_BIT_FIELD): Likewise.
15600 (CLEAR_DECL_C_BIT_FIELD): Likewise.
15601 (add_maybe_template): Likewise.
15602 (strip_array_types): Likewise.
15603 (dump_node_to_file): Likewise.
15604 (cp_dump_tree): New function.
15605 * decl.c (init_decl_processing): Set lang_dump_tree.
15606 * decl2.c (flag_dump_translation_unit): Remove.
15607 * dump.c: Move most of it to ../c-dump.c.
15608 (cp_dump_tree): New function.
15609 * pt.c (add_maybe_template): Remove.
15610 * typeck.c (strip_array_types): Likewise.
15611
15612 2000-11-07 Eric Christopher <echristo@redhat.com>
15613
15614 * decl.c (init_decl_processing): Change definition of
15615 __wchar_t to wchar_t. Remove artificial declaration of
15616 wchar_t.
15617 * lex.c: Change instances of __wchar_t to wchar_t.
15618
15619 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
15620
15621 * lex.c (do_identifier): Don't lookup_name for operators.
15622 * parse.y (operator): Save looking_for_typename.
15623 (unoperator): Restore it.
15624 * spew.c (frob_opname): Use nth_token for lookahead.
15625
15626 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
15627
15628 * decl.c (grok_op_properties): Always use coerce_new_type and
15629 coerce_delete_type.
15630 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15631 exception specification. Tidy up.
15632 (coerce_delete_type): Preserve exception specification. Tidy up.
15633
15634 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
15635
15636 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15637 (push_binding_level), error.c (cp_tree_printer), pt.c
15638 (process_partial_specialization, tsubst_template_arg_vector),
15639 search.c (lookup_member): Use memset () instead of bzero ().
15640
15641 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
15642
15643 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15644
15645 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
15646
15647 * Make-lang.in (c++.distdir): Remove.
15648
15649 2000-11-04 Mark Mitchell <mark@codesourcery.com>
15650
15651 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15652 declarations from different namespaces to be combined.
15653
15654 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
15655
15656 * decl.c: Include tm_p.h.
15657
15658 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
15659
15660 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15661
15662 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
15663
15664 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15665 (build_overload_value), repo.c (open_repo_file), xref.c
15666 (open_xref_file): Use strchr () and strrchr () instead of index ()
15667 and rindex ().
15668
15669 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
15670
15671 * call.c (build_over_call): Call fold on the CALL_EXPR.
15672
15673 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
15674
15675 * error.c (dump_template_decl): Separate template hearders with
15676 space not comma.
15677
15678 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
15679
15680 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
15681 TS_* flags with corresponding TFF_*. Adjust prototypes of
15682 functions (which used to take a tree_string_flags) to take an int.
15683
15684 * cp-tree.h (enum tree_string_flags): Remove
15685 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15686 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15687 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15688 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15689 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15690 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15691 (type_as_string, decl_as_string, expr_as_string,
15692 context_as_string): Adjust prototype.
15693
15694 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15695 instead of TS_PLAIN.
15696
15697 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15698 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15699 plain `0'.
15700
15701 2000-10-30 Mark Mitchell <mark@codesourcery.com>
15702
15703 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15704 (linkage_kind): New enumeration.
15705 (decl_linkage): New function.
15706 * decl2.c (comdat_linkage): Extend comment.
15707 * error.c (dump_function_decl): Print the arguments used to
15708 instantiate a template, even when not printing the type of the
15709 function.
15710 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15711 not TREE_PUBLIC, to test for external linkage.
15712 * tree.c (decl_linkage): New function.
15713
15714 2000-10-28 Mark Mitchell <mark@codesourcery.com>
15715
15716 * pt.c (instantiate_decl): Always instantiate static data members
15717 initialized in-class.
15718
15719 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
15720
15721 * Make-lang.in: Move all build rules here from Makefile.in,
15722 adapt to new context. Wrap all rules that change the current
15723 directory in parentheses. Expunge all references to $(P).
15724 When one command depends on another and they're run all at
15725 once, use && to separate them, not ;. Add OUTPUT_OPTION to
15726 all object-file generation rules. Delete obsolete variables.
15727
15728 * Makefile.in: Delete.
15729 * config-lang.in: Delete outputs= line.
15730
15731 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
15732
15733 * error.c (dump_function_decl): Print no space between
15734 `ptr-operator' the `type-specifier' of the return type.
15735 (dump_type_prefix): Make sure we put space at the appropriate
15736 place.
15737
15738 2000-10-23 Jason Merrill <jason@redhat.com>
15739
15740 * call.c (equal_functions): Also call decls_match for extern "C" fns.
15741
15742 2000-10-22 Jason Merrill <jason@redhat.com>
15743
15744 * call.c (build_conditional_expr): Use ocp_convert to force
15745 rvalue conversion.
15746
15747 2000-10-22 Mark Mitchell <mark@codesourcery.com>
15748
15749 * call.c (standard_conversion): Use RVALUE_CONVs for all
15750 expressions that satisfy lvalue_p, not just those that satisfy
15751 real_lvalue_p.
15752
15753 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15754
15755 * typeck.c (c_sizeof): Return an expression of `size_t' type,
15756 not one with TYPE_IS_SIZETYPE set.
15757 (dubious_conversion_warnings): Remove special-case code.
15758
15759 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
15760
15761 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15762 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15763 (dump_type_prefix): Print vector-of-int as 'int vector'.
15764 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15765 * tree.c (walk_tree): Handle VECTOR_TYPE.
15766
15767 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15768
15769 2000-10-21 Jason Merrill <jason@redhat.com>
15770
15771 * parse.y (operator): Set got_object from got_scope.
15772 Set looking_for_typename.
15773 * decl.c (lookup_name_real): Clear val after setting from_obj.
15774 Reorganize diagnostic.
15775
15776 2000-10-20 Jason Merrill <jason@redhat.com>
15777
15778 * tree.c (walk_tree): Don't walk into default args.
15779
15780 * error.c (dump_expr): Use host_integerp.
15781
15782 2000-10-20 David Edelsohn <edelsohn@gnu.org>
15783
15784 * typeck2.c (abstract_virtuals_error): Use "because" instead of
15785 "since" in error message.
15786
15787 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15788
15789 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15790
15791 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
15792
15793 * decl.c (revert_static_member_fn): Fixed typo.
15794
15795 2000-10-19 Mark Mitchell <mark@codesourcery.com>
15796
15797 * class.c (subobject_offset_fn): New type.
15798 (dfs_record_base_offsets): Remove.
15799 (record_base_offsets): Likewise.
15800 (dfs_search_base_offsets): Likewise.
15801 (record_subobject_offset): New function.
15802 (check_subobject_offset): Likewise.
15803 (walk_subobject_offsets): Likewise.
15804 (record_subobject_offsets): Likewise.
15805 (layout_conflict_p): Reimplement.
15806 (layout_nonempty_base_or_field): Correct handling of type
15807 conflicts during layout.
15808 (layout_empty_base): Likewise.
15809 (build_base_field): Adjust to handle new representation of empty
15810 base offset table.
15811 (build_base_fields): Likewise.
15812 (layout_virtual_bases): Likewise.
15813 (splay_tree_compare_integer_csts): New function.
15814 (layout_class_type): Use a splay_tree, rather than a varray, to
15815 represent the offsets of empty bases.
15816
15817 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15818 * decl.c (select_decl): Don't return declarations that are
15819 DECL_ANTICIPATED.
15820
15821 2000-10-18 Mark Mitchell <mark@codesourcery.com>
15822
15823 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15824 (fake_std_node): New macro.
15825 * decl.c (in_std): Rename to ...
15826 (in_fake_std): ... this.
15827 (flag_no_builtin): Remove.
15828 (flag_no_nonansi_builtin): Likewise.
15829 (walk_namespaces_r): Use fake_std_node.
15830 (push_namespace): Use std_identifier.
15831 (pop_namespace): Use in_fake_std.
15832 (lookup_name_real): Use fake_std_node.
15833 (init_decl_processing): When -fhonor-std, create the `std'
15834 namespace. Don't create a dummy fake_std_node in that case.
15835 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
15836 (builtin_function): Put builtins whose names don't begin
15837 with `_' in the std namespace.
15838 * decl2.c (flag_no_builtin): Remove.
15839 (flag_no_nonansi_builtin): Likewise.
15840 (set_decl_namespace): Use fake_std_node.
15841 (validate_nonmember_using_decl): Likewise.
15842 (do_using_directive): Likewise.
15843 (handle_class_head): Likewise.
15844 * dump.c (dequeue_and_dump): Likewise.
15845 * except.c (init_exception_processing): Use std_identifier.
15846 * init.c (build_member_call): Use fake_std_node.
15847 * rtti.c (init_rtti_processing): Use std_identifier.
15848
15849 2000-10-17 Mark Mitchell <mark@codesourcery.com>
15850
15851 * cp-tree.h (back_end_hook): Remove declaration.
15852 * decl2.c (back_end_hook): Remove definition.
15853
15854 * dump.c (dequeue_and_dump): Dump TREE_USED.
15855
15856 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
15857
15858 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15859
15860 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15861
15862 * decl.c (WINT_TYPE): Define.
15863 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15864 c_size_type_node, signed_size_type_node and wint_type_node.
15865
15866 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15867
15868 * decl2.c (warn_missing_format_attribute): New variable.
15869 (lang_decode_option): Decode -Wmissing-format-attribute.
15870
15871 2000-10-16 Mark Mitchell <mark@codesourcery.com>
15872
15873 * typeck.c (qualify_type): Remove.
15874 (composite_pointer_type): Fix handling of conversions to `cv void*'.
15875
15876 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15877
15878 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15879
15880 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15881
15882 * Makefile.in (parse.c, parse.h): Create atomically.
15883
15884 2000-10-12 Mark Mitchell <mark@codesourcery.com>
15885
15886 * class.c (current_obstack): Remove.
15887 * decl.c (ggc_p): Remove.
15888 (start_decl): Don't use decl_tree_cons.
15889 (grokdeclarator): Don't use build_decl_list.
15890 (start_function): Don't use decl_tree_cons.
15891 (finish_function): Don't mess with obstacks.
15892 * decl2.c (grok_x_components): Don't use build_decl_list.
15893 * lex.c (make_call_declarator): Don't call decl_tree_cons.
15894 (implicitly_declare_fn): Don't call build_decl_list.
15895 * parse.y (frob_specs): Don't call build_decl_list or
15896 decl_tree_cons.
15897 (expr_or_declarator_intern): Don't call decl_tree_cons.
15898 (primary): Don't call build_decl_list.
15899 (fcast_or_absdcl): Likewise.
15900 (typed_declspecs): Don't call decl_tree_cons.
15901 (reserved_declspecs): Don't call build_decl_list.
15902 (declmods): Likewise.
15903 (reserved_typespecquals): Likewise.
15904 (aggr): Likewise.
15905 (new_type_id): Likewise.
15906 (cv_qualifiers): Likewise.
15907 (after_type_declarator_intern): Likewise.
15908 (notype_declarator_intern): Likewise.
15909 (absdcl_intern): Likewise.
15910 (named_parm): Likewise.
15911 * pt.c (most_specialized_class): Likewise.
15912 * repo.c (temporary_obstack): Make it a structure, not a pointer.
15913 (init_repo): Initialize it.
15914 * search.c (current_obstack): Remove.
15915 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15916
15917 2000-10-09 Richard Henderson <rth@cygnus.com>
15918
15919 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15920 (c++ language support bits for libgcc): Remove.
15921 (c++.clean): Remove cplib2.txt cleanup.
15922 * config-lang.in (headers, lib2funcs): Remove.
15923
15924 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15925 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15926 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15927 * inc/new.h, inc/typeinfo: Remove files.
15928
15929 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
15930
15931 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15932 defined.
15933 (init_decl_processing): Initialize intmax_type_node and
15934 uintmax_type_node.
15935
15936 2000-10-06 Richard Henderson <rth@cygnus.com>
15937
15938 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15939 (original_result_rtx): Remove.
15940 * decl.c (save_function_data): Don't clear x_result_rtx.
15941 (mark_lang_function): Don't mark it either.
15942 * expr.c (fixup_result_decl): Remove.
15943 * semantics.c (genrtl_named_return_value): Frob the return decl
15944 before calling emit_local_var.
15945 (genrtl_finish_function): Don't call fixup_result_decl.
15946 Always emit the jump to return_label.
15947
15948 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
15949
15950 * pt.c (lookup_template_class): Set current access for enum.
15951 (tsubst_enum): Set file & line for enum decl.
15952
15953 * spew.c (yylex): Remove unused variable.
15954
15955 2000-10-05 Richard Henderson <rth@cygnus.com>
15956
15957 * semantics.c (genrtl_finish_function): Don't init or check
15958 can_reach_end; remove noreturn and return value checks.
15959
15960 2000-10-05 Tom Tromey <tromey@cygnus.com>
15961
15962 * init.c (build_java_class_ref): Use `build_static_name' with a
15963 suffix, not a prefix, to build the class object's name.
15964
15965 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15966
15967 * cp-tree.h (access_kind): Fix comment typo.
15968 * decl2.c (grokfield): Fix diagnostic typo.
15969 * semantics.c (finish_template_type): Fix comment typo.
15970 (finish_qualified_object_call_expr): Likewise.
15971
15972 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15973
15974 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15975 tsubsting fails.
15976
15977 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15978
15979 * spew.c (frob_id): New static function.
15980 (frob_opname): Use it.
15981 (yylex): Use it.
15982
15983 2000-10-01 Mark Mitchell <mark@codesourcery.com>
15984
15985 * decl.c (lang_mark_false_label_stack): Remove.
15986 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15987
15988 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
15989
15990 * gxxint.texi: Use @email for formatting email addresses.
15991
15992 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
15993
15994 * error.c: Remove direct obstack manipulation. Replace with
15995 output_buffer-based formatting. Adjust calls to removed macros.
15996 (obstack_chunk_alloc, obstack_chunk_free): Remove.
15997 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15998 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15999
16000 2000-09-24 Mark Mitchell <mark@codesourcery.com>
16001
16002 * ir.texi: Move to ../c-tree.texi.
16003
16004 2000-09-20 Jason Merrill <jason@redhat.com>
16005
16006 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
16007
16008 2000-09-21 Andreas Jaeger <aj@suse.de>
16009
16010 * errfn.c: Move declaration of cp_printer and cp_printers to ...
16011 * cp-tree.h: ... here.
16012
16013 * error.c: Remove declaration of cp_printer.
16014
16015 2000-09-20 Mark Mitchell <mark@codesourcery.com>
16016
16017 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
16018
16019 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
16020
16021 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
16022 users.
16023
16024 2000-09-18 Mark Mitchell <mark@codesourcery.com>
16025
16026 * decl.c (start_function): Robustify.
16027
16028 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16029
16030 * cp-tree.h (check_function_format): Accept a `status' parameter.
16031
16032 * call.c, typeck.c: Updates calls to `check_function_format'.
16033
16034 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
16035
16036 * decl2.c (handle_class_head): Always push some scope even
16037 in the error case.
16038
16039 2000-09-16 Mark Mitchell <mark@codesourcery.com>
16040
16041 * cp-tree.h (struct cp_language_function): Remove
16042 x_scope_stmt_stack and name_declared.
16043 (current_scope_stmt_stack): Remove.
16044 (function_name_declared_p): New macro.
16045 (struct lang_decl_flags): Use c_lang_decl as a base class.
16046 (context): Remove.
16047 (struct lang_decl): Replace saved_tree with context.
16048 (DECL_FRIEND_CONTEXT): Adjust accordingly.
16049 (SET_DECL_FRIEND_CONTEXT): Likewise.
16050 (DECL_VIRTUAL_CONTEXT): Likewise.
16051 (DECL_SAVED_TREE): Remove.
16052 (C_DECLARED_LABEL_FLAG): Likewise.
16053 (cplus_expand_expr_stmt): Don't declare.
16054 (add_decl_stmt): Likewise.
16055 (add_scope_stmt): Likewise.
16056 * decl.c (mark_stmt_tree): Remove.
16057 (case_compare): Likewise.
16058 (finish_case_label): Use c_add_case_label.
16059 (init_decl_processing): Set more language-specific hooks.
16060 (build_enumerator): Fix typo in comment.
16061 (cplus_expand_expr_stmt): Remove.
16062 (mark_lang_function): Use mark_c_language_function.
16063 (lang_mark_tree): Use c_mark_lang_decl.
16064 * decl2.c: Change order of inclusion.
16065 * except.c: Likewise.
16066 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
16067 back on c_expand_expr.
16068 * friend.c: Include expr.h.
16069 * init.c: Change order of inclusion.
16070 * Makefile.in: Update dependencies.
16071 * lex.h (free_lang_decl_chain): Remove.
16072 * optimize.c (maybe_clone_body): Use function_name_declared_p.
16073 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
16074 it doesn't exist.
16075 (instantiate_decl): Use function_name_declared_p.
16076 * semantics.c (lang_expand_expr_stmt): Remove.
16077 (set_current_function_name_declared): Likewise.
16078 (current_function_name_declared): Likewise.
16079 (begin_compound_stmt): Use function_name_declared_p.
16080 (add_decl_stmt): Remove.
16081 (setup_vtbl_ptr): Use function_name_declared_p.
16082 (add_scope_stmt): Remove.
16083 (current_scope_stmt_stack): New function.
16084 (cp_expand_stmt): Don't handle SCOPE_STMTs.
16085 (expand_body): Use function_name_declared_p.
16086 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
16087 * typeck.c: Change order of includes.
16088 (convert_sequence): Remove.
16089
16090 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
16091
16092 * lex.c (reswords): Add _Complex.
16093
16094 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16095
16096 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
16097
16098 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
16099
16100 * init.c (begin_init_stmts): Don't use // comments.
16101
16102 2000-09-12 Jason Merrill <jason@redhat.com>
16103
16104 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
16105 all non-extern arrays.
16106
16107 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
16108 typenames, too. Downgrade complaint to pedwarn.
16109 (xref_tag): Warn about surprising behavior of 'friend struct T'.
16110 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
16111 'class This::Inherited'.
16112
16113 2000-09-12 Mark Mitchell <mark@codesourcery.com>
16114
16115 * decl.c (finish_case_label): Given the LABEL_DECL a
16116 DECL_CONTEXT.
16117
16118 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
16119
16120 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
16121 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
16122 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
16123 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
16124 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
16125 New macros.
16126 (sorry_for_unsupported_tree, print_scope_operator,
16127 print_left_paren, print_right_paren, print_left_bracket,
16128 print_right_bracket, print_whitespace): Likewise.
16129 (aggr_variety): Rename to class_key_or_enum.
16130 (print_type): Rename to print_type_id.
16131 (print_type_specifier_seq, print_simple_type_specifier,
16132 print_elaborated_type_specifier,
16133 print_rest_of_abstract_declarator,
16134 print_parameter_declaration_clause, print_exception_specification,
16135 print_nested_name_specifier, print_template_id,
16136 typedef_original_name, print_template_argument_list_start,
16137 print_template_argument_list_end): New functions.
16138
16139 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
16140
16141 * ir.texi: Add more documentation.
16142
16143 2000-09-11 Mark Mitchell <mark@codesourcery.com>
16144
16145 * cp-tree.h (struct saved_scope): Remove x_function_parms.
16146 (current_function_parms): Don't define.
16147 (struct cp_language_function): Remove parms_stored.
16148 (current_function_just_assigned_this): Don't define.
16149 (current_function_parms_stored): Likewise.
16150 (static_ctors): Declare.
16151 (static_dtors): Likewise.
16152 (SF_EXPAND): Don't define.
16153 (expand_start_early_try_stmts): Remove declaration.
16154 (store_parm_decls): Likewise.
16155 * decl.c (static_ctors): Don't declare.
16156 (static_dtors): Likewise.
16157 (struct binding_level): Remove this_block.
16158 (poplevel): Remove dead code.
16159 (set_block): Likewise.
16160 (mark_binding_level): Don't mark this_block.
16161 (mark_saved_scope): Don't mark x_function_parms.
16162 (init_decl_processing): Don't add current_function_parms as a GC
16163 root.
16164 (check_function_type): Change prototype.
16165 (start_function): Remove RTL-generation code.
16166 (expand_start_early_try_stmts): Remove.
16167 (store_parm_decls): Give it internal linkage. Remove
16168 RTL-generation code.
16169 (finish_function): Remove RTL-generation code.
16170 * decl2.c (static_ctors): Fix formatting.
16171 (static_dtors): Likewise.
16172 * method.c (use_thunk): Don't call store_parm_decls.
16173 (synthesize_method): Likewise.
16174 * optimize.c (maybe_clone_body): Likewise.
16175 * parse.y (fn.def2): Likewise.
16176 (.set_base_init): Likewise.
16177 (nodecls): Likewise.
16178 * pt.c (instantiate_decl): Likewise.
16179 * rtti.c (synthesize_tinfo_fn): Likewise.
16180 * semantics.c (genrtl_try_block): Simplify.
16181 (expand_body): Use genrtl_start_function and
16182 genrtl_finish_function.
16183 (genrtl_start_function): New function.
16184 (genrtl_finish_function): Likewise.
16185
16186 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16187
16188 * error.c (cp_tree_printer, case 'P'): Append break.
16189
16190 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
16191
16192 * cp-tree.h (frob_opname): Declare.
16193 * parse.y (saved_scopes): New static variable.
16194 (cp_parse_init): Adjust.
16195 (do_id): If lastiddecl is NULL, do do_identifier.
16196 (operator): Save scope information.
16197 (unoperator): New reduction. Restore scope information.
16198 (operator_name): Append unoperator. Call frob_opname.
16199 * spew.c (frob_opname): Define.
16200
16201 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
16202
16203 * decl.c, rtti.c: Include defaults.h if not already included.
16204 Don't define the *_TYPE_SIZE macros.
16205
16206 2000-09-09 Mark Mitchell <mark@codesourcery.com>
16207
16208 * cp-tree.h (push_switch): Change prototype.
16209 (check_cp_case_value): Remove declaration.
16210 (decl_constant_value): Likewise.
16211 * decl.c (struct cp_switch): Add switch_stmt and cases.
16212 (case_compare): New function.
16213 (push_switch): Set switch_stmt. Initialize cases.
16214 (pop_switch): Clean up cases.
16215 (define_case_label): Rename to ...
16216 (finish_case_label): ... this. Do semantic analysis for case
16217 labels here.
16218 (start_function): Correct comment.
16219 * decl2.c (check_cp_case_value): Remove.
16220 * expr.c (do_case): Remove.
16221 * pt.c (tsubst_expr): Adjust call to finish_case_label.
16222 * semantics.c (genrtl_do_poplevel): Remove declaration.
16223 (RECHAIN_STMTS): Remove.
16224 (finish_break_stmt): Use build_break_stmt.
16225 (finish_continue_stmt): Use build_continue_stmt.
16226 (finish_switch_cond): Adjust condition here, rater than in
16227 c_expand_start_case.
16228 (finish_case_label): Remove.
16229 * typeck.c (c_expand_return): Remove.
16230 (c_expand_start_case): Likewise.
16231
16232 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
16233
16234 * ir.texi: Document type nodes.
16235
16236 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16237
16238 * cp-tree.h (init_cp_semantics): Declare.
16239 (genrtl_try_block): Don't declare.
16240 (genrtl_handler): Likewise.
16241 (genrtl_catch_block): Likewise.
16242 (genrtl_ctor_stmt): Likewise.
16243 (genrtl_subobject): Likewise.
16244 (genrtl_do_poplevel): Likewise.
16245 (genrtl_named_return_value): Likewise.
16246 * lex.c (init_parse): Call init_cp_semantics.
16247 * semantics.c (genrtl_try_block): Give it internal linkage.
16248 (genrtl_handler): Likewise.
16249 (genrtl_catch_block): Likewise.
16250 (genrtl_ctor_stmt): Likewise.
16251 (genrtl_subobject): Likewise.
16252 (genrtl_do_poplevel): Likewise.
16253 (genrtl_named_return_value): Likewise.
16254 (lang_expand_stmt): Rename to ...
16255 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
16256 (init_cp_semantics): Define.
16257
16258 * decl.c (initialize_local_var): Remove RTL-generating code.
16259 * semantics.c (genrtl_try_block): Fix formatting.
16260
16261 Move statement-tree facilities from C++ to C front-end.
16262 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16263 (void_zero_node): Remove.
16264 (stmt_tree): Likewise.
16265 (scope_chain): Adjust.
16266 (language_function): Rename to cp_language_function.
16267 (cp_function_chain): Adjust.
16268 (current_stmt_tree): Remove.
16269 (last_tree): Likewise.
16270 (last_expr_type): Likewise.
16271 (struct lang_decl): Adjust.
16272 (STMT_IS_FULL_EXPR_P): Remove.
16273 (add_tree): Remove.
16274 (begin_stmt_tree): Likewise.
16275 (finish_stmt_tree): Likewise.
16276 (walk_tree_fn): Likewise.
16277 (walk_stmt_tree): Likewise.
16278 * class.c (finish_struct): Replace use of add_tree with add_stmt.
16279 * decl.c (mark_stmt_tree): Adjust type.
16280 (init_decl_processing): Don't build void_zero_node.
16281 (initialize_local_var): Adjust usage of current_stmt_tree.
16282 (finish_enum): Use add_stmt, not add_tree.
16283 (save_function_data): Adjust use of language_function.
16284 (finish_constructor_body): Use add_stmt, not add_tree.
16285 (finish_destructor_body): Likewise.
16286 (push_cp_function_context): Adjust use of language_function.
16287 (pop_cp_function_context): Likewise.
16288 (mark_lang_function): Likewise.
16289 (mark_cp_function_context): Likewise.
16290 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16291 (build_vec_init): Likewise.
16292 * semantics.c (SET_LAST_STMT): Remove.
16293 (RECHAIN_STMTS): Don't use it.
16294 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16295 (current_stmt_tree): Define.
16296 (add_tree): Remove.
16297 (finish_goto_stmt): Use add_stmt, not add_tree.
16298 (finish_expr_stmt): Likewise.
16299 (begin_if_stmt): Likewise.
16300 (finish_then_clause): Likewise.
16301 (begin_while_stmt): Likewise.
16302 (begin_do_stmt): Likewise.
16303 (finish_return_stmt): Likewise.
16304 (begin_for_stmt): Likewise.
16305 (finish_break_stmt): Likewise.
16306 (finish_continue_stmt): Likewise.
16307 (begin_switch_stmt): Likewise.
16308 (finish_case_label): Likewise.
16309 (begin_try_block): Likewise.
16310 (begin_function_try_block): Likewise.
16311 (begin_handler): Likewise.
16312 (begin_catch_block): Likewise.
16313 (begin_compound_stmt): Likewise.
16314 (begin_asm_stmt): Likewise.
16315 (finish_asm_stmt): Likewise.
16316 (finish_label_stmt): Likewise.
16317 (add_decl_stmt): Likewise.
16318 (finish_subobject): Likewise.
16319 (finish_decl_cleanup): Likewise.
16320 (finish_named_return_value): Likewise.
16321 (setup_vtbl_ptr): Likewise.
16322 (add_scope_stmt): Likewise.
16323 (finish_stmt_expr): Likewise.
16324 (prune_unused_decls): Remove.
16325 (begin_stmt_tree): Likewise.
16326 (finish_stmt_tree): Likewise.
16327 (prep_stmt): Adjust use of current_stmt_tree.
16328 (lang_expand_stmt): Likewise.
16329 * tree.c (statement_code_p): Remove.
16330 (cp_statement_code_p): New function.
16331 (walk_stmt_tree): Remove.
16332 (init_tree): Set lang_statement_code_p.
16333
16334 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
16335
16336 Integrated preprocessor.
16337
16338 * Make-lang.in, Makefile.in: Remove all references to input.c,
16339 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
16340 * gxx.gperf, hash.h, input.c: Delete.
16341 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16342 initialized properly.
16343
16344 * class.c (fixup_pending_inline): Take a tree, not a
16345 struct pending_inline *. All callers changed.
16346 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16347 RID_PROTECTED entries in ridpointers[] array here.
16348 * decl.c (duplicate_decls): Do not refer to struct
16349 pending_inline.
16350 (record_builtin_type, init_decl_processing): Use RID_MAX not
16351 CP_RID_MAX.
16352 (grokdeclarator): Use C_IS_RESERVED_WORD.
16353 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16354 cpplib.
16355 (grok_x_components): Do not inspect pending_inlines chain.
16356
16357 * cp-tree.h (struct lang_identifier): Add rid_code entry.
16358 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16359 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16360 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16361 TIME_IDENTIFIER_FILEINFO): Kill.
16362 Update prototypes.
16363 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
16364 single 32-bit word.
16365 * parse.y: Call do_pending_inlines unconditionally.
16366 reinit_parse_for_method is now snarf_method. fn.defpen is no
16367 longer necessary. Remove unnecessary <itype> annotation on
16368 SCOPE. Do not refer to end_of_file or struct pending_inline.
16369 * semantics.c (begin_inline_definitions): Call
16370 do_pending_inlines unconditionally.
16371
16372 * lex.c: Remove all code now shared with C front end.
16373 Initialize cpplib properly if USE_CPPLIB. Put reserved words
16374 into the get_identifier table. Rewrite pragma handling to
16375 work with the registry. Move code to save tokens for later
16376 processing to spew.c.
16377
16378 * spew.c: Rewrite everything in terms of token streams instead
16379 of text. Move routines here from lex.c / input.c as
16380 appropriate. GC-mark trees hanging off the pending inlines
16381 chain.
16382
16383 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16384
16385 * NEWS: Mention that the named return value extension has been
16386 deprecated.
16387 * cp-tree.h (original_result_rtx): Define.
16388 (TREE_REFERENCE_EXPR): Remove.
16389 (DECL_VPARENT): Likewise.
16390 (pushdecl_nonclass_level): Likewise.
16391 (store_return_init): Likewise.
16392 (reinit_lang_specific): Likewise.
16393 (genrtl_named_return_value): Change prototype.
16394 * decl.c (original_result_rtx): Remove.
16395 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16396 Do not generate RTL for local variables here.
16397 (store_return_init): Remove.
16398 * semantics.c (genrtl_named_return_value): Simplify. Fold in
16399 store_return_init.
16400 (finish_named_return_value): Adjust accordingly. Warn that this
16401 extension is deprecated.
16402 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16403
16404 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16405
16406 * pt.c (type_unification_real): Replace switch with if.
16407 (unify): Tsubst non-type parms before comparing.
16408
16409 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16410
16411 * error.c (dump_typename): New function, broken out of ...
16412 (dump_type): ... here. Use it.
16413 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16414
16415 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16416
16417 * init.c (build_offset_ref): Deal with namespace scoped
16418 TEMPLATE_ID_EXPRs.
16419
16420 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16421
16422 * class.c (resolve_address_of_overloaded_function): Add
16423 explanation message.
16424 * decl.c (define_case_label): Reformat explanation.
16425 * decl2.c (finish_static_data_member_decl): Likewise.
16426 (grokfield): Likewise.
16427 * friend.c (do_friend): Likewise.
16428
16429 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
16430
16431 * tree.c (walk_tree): Expose tail recursion.
16432 (walk_stmt_tree): New function.
16433 * cp-tree.h: Prototype walk_stmt_tree.
16434 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16435 the BLOCKs directly. If a BLOCK has no variables after
16436 pruning, discard it.
16437 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
16438 restore the line number.
16439
16440 2000-09-05 Mark Mitchell <mark@codesourcery.com>
16441
16442 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16443 (pt.o): Remove dependency on HTAB_H.
16444 * cp-tree.h: Include hashtab.h.
16445 (walk_tree): Change prototype.
16446 (walk_tree_without_duplicates): New function.
16447 * decl.c (check_default_argument): Use it.
16448 * optimize.c (remap_decl): Adjust calls to walk_tree.
16449 (copy_body): Likewise.
16450 (expand_calls_inline): Likewise.
16451 (calls_setjmp_p): Use walk_tree_without_duplicates.
16452 * pt.c: Don't include hashtab.h.
16453 (for_each_template_parm): Use walk_tree_without_duplicates.
16454 * semantics.c (finish-stmt_tree): Likewise.
16455 (expand_body): Likewise.
16456 * tree.c (walk_tree): Add additional parameter.
16457 (walk_tree_without_duplicates): New function.
16458 (count_trees): Use it.
16459 (verify_stmt_tree): Adjust call to walk_tree.
16460 (find_tree): Use walk_tree_without_duplicates.
16461 (no_linkage_check): Likewise.
16462 (break_out_target_exprs): Adjust call to walk_tree.
16463 (cp_unsave): Likewise.
16464
16465 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16466
16467 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16468 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16469 * cp-tree.h (TYPE_BINFO): Adjust comment.
16470 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16471 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16472 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16473 (TYPE_TEMPLATE_INFO): Likewise.
16474 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16475 * class.c (push_nested_class): Likewise.
16476 * decl.c (lookup_name_real): Likewise.
16477 (grokdeclarator): Likewise.
16478 (grok_op_properties): Likewise.
16479 (xref_tag): Likewise.
16480 (xref_basetypes): Likewise.
16481 * decl2.c (constructor_name_full): Likewise.
16482 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16483 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16484 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16485 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16486 (dump_type_suffix): Likewise.
16487 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16488 instead.
16489 (get_aggr_from_typedef): Likewise.
16490 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16491 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16492 (write_template_parm): Likewise.
16493 (write_template_template_parm): Check tree code instead of
16494 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16495 * method.c (build_overload_nested_name): Add
16496 BOUND_TEMPLATE_TEMPLATE_PARM.
16497 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16498 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16499 * pt.c (convert_template_argument): Check tree code instead of
16500 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16501 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16502 (for_each_template_parm): Adjust comment.
16503 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
16504 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16505 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
16506 template_args_equal to compare template template parameter cases.
16507 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16508 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16509 instead.
16510 * tree.c (copy_template_template_parm): Decide whether to create
16511 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16512 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16513 (copy_tree_r): Likewise.
16514 * typeck.c (comptypes): Likewise. Check tree code instead of
16515 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16516
16517 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
16518
16519 * decl.c (finish_function): Move the code for handling functions
16520 marked with the constructor and destructor attributes inside the
16521 expand_p block.
16522
16523 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16524
16525 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16526
16527 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16528
16529 * pt.c (lookup_template_class): Remove abort.
16530 * tree.c (get_type_decl): Allow error_mark_node.
16531
16532 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16533
16534 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16535 TEMPLATE_ID_EXPRs.
16536
16537 2000-09-03 Mark Mitchell <mark@codesourcery.com>
16538
16539 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16540 new ABI mangling.
16541
16542 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16543
16544 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16545 union tag mismatch error reporting.
16546
16547 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16548
16549 * call.c (build_scoped_method_call): Check it is not a namespace.
16550
16551 2000-08-30 Jason Merrill <jason@redhat.com>
16552
16553 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16554
16555 * tree.c (bot_manip): Check TREE_CONSTANT rather than
16556 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
16557 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16558
16559 * decl.c (start_function): Always call make_function_rtl.
16560
16561 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16562
16563 * semantics.c (prune_unused_decls): New function.
16564 (finish_stmt_tree): Call it via walk_tree.
16565
16566 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16567
16568 * class.c (build_secondary_vtable): Constify a char *.
16569 * decl.c (init_decl_processing): Initialize function_id_node,
16570 pretty_function_id_node, and func_id_node.
16571 * input.c (struct input_source): Constify 'str'.
16572 (feed_input): Constify first argument.
16573 * mangle.c (write_identifier): Constify argument.
16574 * pt.c (mangle_class_name_for_template): Constify argument.
16575
16576 2000-08-29 Mark Mitchell <mark@codesourcery.com>
16577
16578 * typeck.c (mark_addressable): Remove code that pokes around in
16579 RTL.
16580
16581 2000-08-28 Jason Merrill <jason@redhat.com>
16582
16583 * lex.c (file_name_nondirectory): Move to toplev.c.
16584
16585 * cp-tree.h (LOCAL_CLASS_P): New macro.
16586 * class.c (finish_struct_1): Use it.
16587
16588 2000-08-27 Alex Samuel <samuel@codesourcery.com>
16589
16590 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16591 (write_encoding): Pass another argument to write_name.
16592 (write_name): Add ignore_local_scope parameter. Fix handling of
16593 local names.
16594 (write_nested_name): Use write_unqualified_name.
16595 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
16596 (write_template_prefix): Use write_unqualified_name.
16597 (write_component): Remove.
16598 (write_local_name): Add parameter. Use direct local entity to
16599 discriminator calculation.
16600 (write_class_enum_type): Pass another argument to write_name.
16601 (write_template_template_arg): Likewise.
16602 (make_guard_variable): Likewise.
16603
16604 2000-08-27 Jason Merrill <jason@redhat.com>
16605
16606 * decl.c (pushdecl): Matching decls for local externs are found in
16607 the current level. Propagate linkage information from previous
16608 declarations.
16609
16610 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
16611
16612 * ir.texi (Expressions): Fix typo.
16613
16614 2000-08-25 Greg McGary <greg@mcgary.org>
16615
16616 * tree.c (init_tree): Use ARRAY_SIZE.
16617
16618 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16619
16620 * error.c (cp_tree_printer): Rework.
16621
16622 2000-08-25 Mark Mitchell <mark@codesourcery.com>
16623
16624 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16625 dyn-string.o.
16626 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16627 (cp-demangle.o): Remove target.
16628 (dyn-string.o): Likewise.
16629
16630 * decl.c (grokfndecl): Require that `main' return an `int'.
16631 * mangle.c (write_encoding): Don't mangle return types for
16632 conversion functions.
16633
16634 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16635
16636 * error.c (tree_formatting_info): New data type.
16637 (tree_being_formatted): New macro.
16638 (tree_formatting_flags): Likewise.
16639 (put_whitespace): Likewise.
16640 (print_tree_identifier): Likewise.
16641 (print_identifier): Likewise.
16642 (cp_tree_printer, print_function_argument_list, print_declaration,
16643 print_expression, print_function_declaration,
16644 print_function_parameter, print_type, print_cv_qualifier): New
16645 functions.
16646 (init_error): Initialize lang_printer.
16647
16648 2000-08-24 Jason Merrill <jason@redhat.com>
16649
16650 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16651 adjustment necessary.
16652
16653 2000-08-24 Greg McGary <greg@mcgary.org>
16654
16655 * cp-tree.h (MAIN_NAME_P): Remove macro.
16656
16657 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
16658
16659 * error.c (print_instantiation_context): Don't forget to flush the
16660 buffer.
16661
16662 2000-08-23 Jason Merrill <jason@redhat.com>
16663
16664 * typeck.c (build_ptrmemfunc): Save the input pmf.
16665
16666 * method.c (process_modifiers): Use same_type_p.
16667
16668 2000-08-23 Mark Mitchell <mark@codesourcery.com>
16669
16670 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16671 * mangle.c (write_function_type): Change prototype.
16672 (write_encoding): Don't mangle return types for
16673 constructors or destructors.
16674 (write_type): Adjust call to write_function_type.
16675 * pt.c (instantiate_template): Instantiate alternate entry points
16676 when instantiating the main function.
16677
16678 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16679
16680 * error.c (cp_print_error_function): Don't use embedded '\n' in
16681 output_printf.
16682
16683 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16684
16685 * decl.c (init_decl_processing): Remove bogus initialization.
16686 * error.c (lang_print_error_function): Restore here.
16687 (init_error): Initialize print_error_function.
16688
16689 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16690
16691 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16692
16693 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
16694
16695 * Makefile.in (error.o): Depends on diagnostic.h
16696
16697 * cp-tree.h (problematic_instantiation_changed,
16698 record_last_problematic_instantiation, current_instantiation,
16699 print_instantiation_context): Declare.
16700 (maybe_print_template_context): Remove.
16701
16702 * decl.c (init_decl_processing): Set print_error_function to NULL.
16703 (lang_print_error_function): Remove, since we're using a new
16704 machinery.
16705
16706 * error.c: #include diagnostic.h
16707 (function_category): New function.
16708 (cp_diagnostic_starter): Likewise.
16709 (cp_diagnostic_finalizer): Likewise.
16710 (cp_print_error_function): Likewise.
16711 (maybe_print_instantiation_context): Likewise.
16712 (print_instantiation_full_context): Likewise.
16713 (print_instantiation_partial_context): Likewise.
16714 (print_instantiation_context): Define.
16715 (init_error): Initialize diagnostic pager and finalizer.
16716
16717 * pt.c (problematic_instantiation_changed): Define.
16718 (record_last_problematic_instantiation): Likewise.
16719 (current_instantiation): Likewise.
16720 (maybe_print_template_context): Remove.
16721 (print_template_context): Likewise.
16722 (current_tinst_level): Make static to reflect Brendan Kehoe's
16723 change of 1995-04-13.
16724 (push_tinst_level): Call print_instantiation_context.
16725
16726 2000-08-21 Nix <nix@esperi.demon.co.uk>
16727
16728 * lang-specs.h: Do not process -o or run the assembler if
16729 -fsyntax-only.
16730
16731 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
16732
16733 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16734 variables.
16735 * decl2.c (lang_decode_option): Disable gettext attributes for
16736 -ansi.
16737
16738 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
16739
16740 * lex.c (lang_init_options): Default diagnostic message maximum
16741 length to 80, when line-wrapping.
16742
16743 2000-08-20 Mark Mitchell <mark@codesourcery.com>
16744
16745 * class.c (build_vtbl_initializer): Clear the entire
16746 vtbl_init_data. Start keeping track of the functions for which we
16747 have created vcall offsets here.
16748 (dfs_build_vcall_offset_vtbl_entries): Remove.
16749 (build_vcall_offset_vtbl_entries): Reimplement.
16750 (add_vcall_offset_vtbl_entries_r): New function.
16751 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
16752 computing when vcall offsets are necessary.
16753
16754 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16755
16756 * decl.c (member_function_or_else): Use cp_error ... %T.
16757 (grokdeclarator): Likewise.
16758 (start_method): Likewise.
16759 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16760
16761 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16762
16763 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16764 TYPE_DECLs.
16765
16766 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16767
16768 * cp-tree.h (PTRMEM_OK_P): New macro.
16769 (itf_ptrmem_ok): New enumeration value.
16770 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16771 argument. Diagnose implicit pointer to member.
16772 (instantiate_type): Don't diagnose implicit pointer to member
16773 here. Pass itf_ptrmem_ok if ok. Adjust calls to
16774 resolve_address_of_overloaded_function.
16775 * init.c (build_offset_ref): Set PTRMEM_OK_P.
16776 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16777 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16778 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16779 (build_unary_op): Deal with single non-static member in
16780 microsoft-land.
16781
16782 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16783
16784 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16785
16786 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16787
16788 * cp-tree.h (enum_name_string): Remove prototype.
16789 (report_case_error): Remove prototype.
16790 * cp/typeck2.c (enum_name_string): Remove.
16791 (report_case_error): Remove.
16792 * error.c (dump_expr): Deal with enum values directly.
16793 Correctly negate integer constant.
16794
16795 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16796
16797 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16798 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16799 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16800 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16801 (__cxa_vec_new): Use __cxa_vec_new2.
16802 (__cxa_vec_delete): Use __cxa_vec_delete2.
16803
16804 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16805
16806 * vec.cc (__cxa_vec_new): Set "C" linkage.
16807 (__cxa_vec_ctor): Likewise.
16808 (__cxa_vec_cctor): Likewise.
16809 (__cxa_vec_dtor): Likewise.
16810 (__cxa_vec_delete): Likewise.
16811 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16812 (__cxa_vec_ctor): Likewise.
16813 (__cxa_vec_cctor): Likewise.
16814 (__cxa_vec_dtor): Likewise.
16815 (__cxa_vec_delete): Likewise.
16816
16817 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16818
16819 * class.c (instantiate_type): Reinstate local variable
16820 deleted in previous change.
16821
16822 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16823 itf_no_attributes.
16824
16825 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16826
16827 * cp-tree.h (instantiate_type_flags): New enumeration.
16828 (instantiate_type): Change parameter.
16829 * class.c (instantiate_type): Adjust prototype. Adjust.
16830 * call.c (standard_conversion): Adjust instantiate_type call.
16831 (reference_binding): Likewise.
16832 (build_op_delete_call): Likewise.
16833 (convert_like_real): Likewise.
16834 * cvt.c (cp_convert_to_pointer): Likewise.
16835 (convert_to_reference): Likewise.
16836 * pt.c (convert_nontype_argument): Likewise.
16837 * typeck.c (build_binary_op): Likewise.
16838 (build_ptrmemfunc): Likewise.
16839 (convert_for_assignment): Likewise.
16840
16841 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16842
16843 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16844 (current_aggr): Define.
16845 * decl.c (grokdeclarator): Make sure a friend class is an
16846 elaborated type specifier.
16847 * parse.y (current_aggr): Remove static definition.
16848 (cp_parse_init): Adjust.
16849 (structsp): Clear and restore current_aggr.
16850 (component_decl_list): Clear current_aggr.
16851
16852 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16853 aggregate tag on the typename's context.
16854
16855 * pt.c (tsubst_friend_class): Return error_mark_node, if
16856 parms becomes NULL.
16857 (instantiate_class_template): Ignore error_mark_node friend types.
16858
16859 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
16860
16861 * cvt.c (warn_ref_binding): New static function, broken out of ...
16862 (convert_to_reference): ... here. Use it.
16863
16864 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16865
16866 * parse.y (template_arg): Add rule for template qualified with
16867 global scope.
16868
16869 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16870
16871 * decl2.c (add_function): Reorganize.
16872 (arg_assoc): Do not consider function template decls.
16873
16874 2000-08-11 Jason Merrill <jason@redhat.com>
16875
16876 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16877 looking inside.
16878
16879 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16880
16881 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16882 (lookup_nested_tag): Likewise.
16883
16884 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16885 can be produced.
16886
16887 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16888
16889 * parse.y (named_complex_class_head_sans_basetype): Remove
16890 always true if.
16891
16892 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16893
16894 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16895 explicit TEMPLATE_ID_EXPR args.
16896 (build_expr_from_tree, case CALL_EXPR): Likewise.
16897
16898 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16899
16900 * decl.c (check_tag_decl): Diagnose typename's which don't
16901 declare anything.
16902
16903 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
16904
16905 * init.c (build_aggr_init): Reject bogus array initializers
16906 early.
16907
16908 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16909
16910 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16911 runtime.
16912 * cp/tinfo.cc (__dynamic_cast): Likewise.
16913 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16914
16915 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16916
16917 * cvt.c (convert_to_pointer_force): Fix error message when
16918 attempting to cast from ambiguous base.
16919
16920 2000-08-08 Jason Merrill <jason@redhat.com>
16921
16922 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16923 (tsubst_template_arg_vector): Likewise.
16924
16925 * decl2.c (build_anon_union_vars): Choose the largest field; don't
16926 assume that one will be as large as the union.
16927
16928 2000-08-07 Kazu Hirata <kazu@hxi.com>
16929
16930 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16931 * decl.c (pop_labels): Likewise.
16932
16933 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
16934
16935 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16936 specifications.
16937 (__pointer_to_member_type_info): Likewise.
16938 (__base_class_info): Likewise.
16939 (__class_type_info): Likewise.
16940 (__si_class_type_info): Likewise.
16941 (__vmi_class_type_info): Likewise.
16942 * tinfo.cc (__si_class_type_info::__do_find_public_src):
16943 Changed member names to match specifications.
16944 (__vmi_class_type_info::__do_find_public_src): Likewise.
16945 (__si_class_type_info::__do_dyncast): Likewise.
16946 (__vmi_class_type_info::__do_dyncast): Likewise.
16947 (__si_class_type_info::__do_upcast): Likewise.
16948 (__vmi_class_type_info::__do_upcast): Likewise.
16949 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16950 (__pbase_type_info::__pointer_catch): Likewise.
16951 (__pointer_type_info::__pointer_catch): Likewise.
16952 (__pointer_to_member_type_info::__pointer_catch): Likewise.
16953
16954 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
16955
16956 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16957 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16958 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16959
16960 2000-08-04 Mark Mitchell <mark@codesourcery.com>
16961
16962 * cp-tree.h (add_method): Change prototype.
16963 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
16964 Don't double the size of the method vector in the error case.
16965 (handle_using_decl): Adjust call to add_method.
16966 (add_implicitly_declared_members): Likewise.
16967 (clone_function_decl): Likewise.
16968 * decl2.c (check_classfn): Likewise.
16969 * semantics.c (finish_member_declaration): Likewise.
16970
16971 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
16972
16973 * decl.c (flag_isoc94): New variable.
16974
16975 2000-08-02 Jason Merrill <jason@redhat.com>
16976
16977 * pt.c (do_type_instantiation): Add complain parm; don't complain
16978 if called recursively.
16979 * cp-tree.h, parse.y: Adjust.
16980
16981 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
16982
16983 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16984 -Wno-strict-prototypes.
16985
16986 * g++spec.c: Adjust type of second argument to
16987 lang_specific_driver, and update code as necessary.
16988
16989 * cp-tree.h: Don't prototype min_precision here.
16990 (my_friendly_assert): Cast expression to void.
16991 * semantics.c (do_poplevel): Initialize scope_stmts.
16992
16993 2000-08-02 Mark Mitchell <mark@codesourcery.com>
16994
16995 * cp-tree.h (DECL_NEEDED_P): Tweak.
16996
16997 2000-07-28 Jason Merrill <jason@redhat.com>
16998
16999 * lang-specs.h: Use %i in rule for .ii files.
17000
17001 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
17002
17003 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
17004
17005 2000-07-30 Mark Mitchell <mark@codesourcery.com>
17006
17007 Allow indirect primary bases.
17008 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
17009 primary_base.
17010 (CLASSTYPE_VFIELD_PARENT): Remove.
17011 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
17012 (BINFO_PRIMARY_BINFO): Remove.
17013 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
17014 (BINFO_VBASE_PRIMARY_P): Likewise.
17015 (BINFO_PRIMARY_BASE_OF): New macro.
17016 (BINFO_INDIRECT_PRIMARY_P): Likewise.
17017 (get_primary_binfo): New function.
17018 * decl.c (lang_mark_tree): Make lang_type::primary_base.
17019 * class.c (vcall_offset_data_s): Rename to ...
17020 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
17021 and add ctor_vtbl_p.
17022 (get_derived_offset): Use get_primary_binfo.
17023 (dfs_mark_primary_bases): Adjust handling of virtual primary
17024 bases.
17025 (mark_primary_bases): Likewise.
17026 (set_primary_base): Take a binfo, not an integer, as a
17027 representation of the primary base.
17028 (indirect_primary_base_p): Remove.
17029 (determine_primary_base): Adjust for indirect primary bases.
17030 (dfs_find_final_overrider): Fix typo in coment.
17031 (update_vtable_entry_for_fn): Use get_primary_binfo.
17032 (layout_nonempty_base_or_field): Tweak.
17033 (build_base_fields): Adjust for new primary base semantics.
17034 (dfs_propagate_binfo_offsets): Remove.
17035 (propagate_binfo_offsets): Rewrite.
17036 (dfs_set_offset_for_shared_vbases): Remove.
17037 (layout_virtual_bases): Don't use it.
17038 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
17039 ABI.
17040 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
17041 CLASSTYPE_VFIELD_PARENT.
17042 (dfs_get_primary_binfo): New function.
17043 (get_primary_binfo): Likewise.
17044 (dump_class_hierarchy_r): Tweak printing of primary bases.
17045 (build_vtbl_initializer): Fix typo in comments. Use
17046 vtbl_init_data.
17047 (build_vcall_and_vbase_vtbl_entries): Likewise.
17048 (build_vbaes_offset_vtbl_entries): Likewise.
17049 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
17050 BV_VCALL_INDEX to handle indirect primary bases.
17051 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
17052 (build_rtti_vtbl_entries): Likewise.
17053 * search.c (get_shared_vbase_if_not_primary): Tweak.
17054 (find_vbase_instance): Likewise.
17055 (binfo_for_vtable): Simplify.
17056 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
17057 (make_binfo): Make it have 11 entries.
17058
17059 2000-07-30 Alex Samuel <samuel@codesourcery.com>
17060
17061 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
17062 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
17063 ascertaining primaryness.
17064 (G): Remove template_args.
17065 (decl_is_template_id): New function.
17066 (write_encoding): Use decl_is_template_id.
17067 (write_name): Likewise. Handle type_decls. Get main variant of
17068 type decls.
17069 (write_nested_name): Likewise.
17070 (write_prefix): Likewise.
17071 (write_template_prefix): Likewise.
17072 (write_special_name_constructor): Remove defunct production from
17073 comment.
17074 (write_bare_function_type): Remove comment about absent parameter.
17075 (write_template_template_arg): Add missing grammar production to
17076 comment.
17077
17078 2000-07-27 Jason Merrill <jason@redhat.com>
17079
17080 * decl.c (duplicate_decls): If common_type produces a non-typedef
17081 type for a typedef, just use the old type.
17082
17083 2000-07-27 Mark Mitchell <mark@codesourcery.com>
17084
17085 * cp-tree.h (function_depth): Declare.
17086 (verify_stmt_tree): Likewise.
17087 (find_tree): Likewise.
17088 * decl.c (function_depth): Give it external linkage.
17089 * optimize.c (optimize_function): Increment and decrement it.
17090 * tree.c (verify_stmt_tree_r): New function.
17091 (verify_stmt_tree): Likewise.
17092 (find_tree_r): Likewise.
17093 (find_tree): Likewise.
17094
17095 2000-07-27 Jason Merrill <jason@redhat.com>
17096
17097 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
17098 TYPE_PTRMEMFUNC_P.
17099 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
17100
17101 2000-07-26 Mark Mitchell <mark@codesourcery.com>
17102
17103 * decl.c (start_cleanup_fn): Mark the function as `inline'.
17104 * decl2.c (get_guard): Call cp_finish_decl, not
17105 rest_of_decl_compilation, for local guards.
17106 * lex.c (do_identifier): Remove unused variable.
17107
17108 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
17109
17110 * parse.y: Add missing ';'.
17111
17112 2000-07-26 Mark Mitchell <mark@codesourcery.com>
17113
17114 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
17115 of `extern "C++"'.
17116
17117 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
17118
17119 Kill strict_prototype. Backwards compatibility only for
17120 non NO_IMPLICIT_EXTERN_C systems.
17121 * cp-tree.h (flag_strict_prototype): Remove.
17122 (strict_prototype): Remove.
17123 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
17124 * decl.c (maybe_push_to_top_level): Adjust.
17125 (pop_from_top_level): Adjust.
17126 (decls_match): Only allow sloppy parm matching for ancient
17127 system headers.
17128 (init_decl_processing): Adjust.
17129 (grokdeclarator): Adjust.
17130 * decl2.c (flag_strict_prototype): Remove.
17131 (strict_prototype): Remove.
17132 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
17133 (lang_f_options): Remove "strict-prototype".
17134 (unsupported-options): Add "strict-prototype".
17135 * lex.c (do_identifier): Adjust.
17136 (do_scoped_id): Adjust.
17137 * parse.y (empty_parms): Adjust.
17138 * class.c (push_lang_context): Adjust.
17139 (pop_lang_context): Adjust.
17140 * typeck.c (comp_target_parms): Adjust.
17141
17142 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
17143
17144 * decl.c (poplevel): Deal with anonymous variables at for scope.
17145 (maybe_inject_for_scope_var): Likewise.
17146
17147 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
17148
17149 * decl.c: Remove all signal handling code, now done in toplev.c.
17150
17151 2000-07-23 Mark Mitchell <mark@codesourcery.com>
17152
17153 * decl.c (make_rtl_for_nonlocal_decl): Rework.
17154
17155 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
17156 correctly.
17157
17158 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
17159
17160 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
17161 Define my_friendly_assert and my_friendly_abort as macros
17162 which may call friendly_abort. Prototype friendly abort, not
17163 my_friendly_abort or my_friendly_assert.
17164 * decl.c (signal_catch): Report the signal caught in the error
17165 message. Call fatal directly.
17166 * typeck2.c (ack, my_friendly_assert): Delete.
17167 (my_friendly_abort): Rename to friendly_abort. Expect file,
17168 line, and function parameters. Report the abort code, then
17169 call fancy_abort. Do not mask an abort if errors have
17170 already occurred.
17171
17172 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
17173
17174 * typeck.c (comp_target_parms): Remove obsolete parameter.
17175 (comp_target_types): Adjust.
17176
17177 2000-07-17 Jason Merrill <jason@redhat.com>
17178
17179 * typeck.c (mark_addressable): Never set TREE_USED.
17180 * call.c (build_call): Don't abort on calls to library functions
17181 that have been declared normally.
17182
17183 * typeck.c (build_binary_op): Fix grammar in warning.
17184
17185 * exception.cc (__eh_free): Fix prototype.
17186
17187 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
17188
17189 * decl.c (pushdecl): Handle seeing an OVERLOAD in
17190 IDENTIFIER_NAMESPACE_VALUE.
17191
17192 2000-07-16 Mark Mitchell <mark@codesourcery.com>
17193
17194 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
17195 * method.c (use_thunk): Correct handling of vcall offsets.
17196
17197 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
17198
17199 * .cvsignore: parse.h and parse.c have no cp- prefix.
17200
17201 2000-07-13 Mark Mitchell <mark@codesourcery.com>
17202
17203 * .cvsignore: New file.
17204
17205 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
17206
17207 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
17208
17209 2000-07-12 Mark Mitchell <mark@codesourcery.com>
17210
17211 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
17212 * parse.c: Remove.
17213 * parse.h: Likewise.
17214
17215 2000-07-11 Mark Mitchell <mark@codesourcery.com>
17216
17217 * class.c (layout_class_type): Add pointers to virtual bases after
17218 base classes under the old ABI.
17219
17220 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
17221
17222 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
17223 (finish_continue_stmt): Likewise.
17224 (begin_for_stmt): Remove call to note_level_for_for.
17225 (finish_goto_stmt): Change call from build_min_nt
17226 to build_stmt.
17227 (finish_expr_stmt): Likewise.
17228 (begin_if_stmt): Likewise.
17229 (begin_while_stmt): Likewise.
17230 (finish_while_stmt): Likewise.
17231 (finish_return_stmt): Likewise.
17232 (begin_for_stmt): Likewise.
17233 (finish_for_stmt): Likewise.
17234 (finish_break_stmt): Likewise.
17235 (begin_switch_stmt): Likewise.
17236 (finish_case_label): Likewise.
17237 (genrtl_try_block): Likewise.
17238 (begin_try_block): Likewise.
17239 (begin_handler): Likewise.
17240 (begin_compound_stmt): Likewise.
17241 (finish_asm_stmt): Likewise.
17242 (finish_label_stmt): Likewise.
17243 (add_decl_stmt): Likewise.
17244 (finish_subobject): Likewise.
17245 (finish_decl_cleanup): Likewise.
17246 (finish_named_return_value): Likewise.
17247 (setup_vtbl_ptr): Likewise.
17248 (add_scope_stmt): Likewise.
17249 * decl.c (finish_constructor_body): Likewise.
17250 (finish_destructor_body): Likewise.
17251 * optimize.c (copy_body_r): Likewise.
17252 (initialize_inlined_parameters): Likewise.
17253 (declare_return_variable): Likewise.
17254 (expand_call_inline): Likewise.
17255
17256 2000-07-10 Jakub Jelinek <jakub@redhat.com>
17257
17258 * semantics.c (expand_body): Sync interface information
17259 at the end of function body expansion.
17260
17261 2000-07-09 Jason Merrill <jason@redhat.com>
17262
17263 * init.c (build_new_1): Bail early if the call to new fails.
17264
17265 * decl.c (compute_array_index_type): Check specifically for
17266 an INTEGER_CST, not just TREE_CONSTANT.
17267
17268 * decl.c (duplicate_decls): Don't call duplicate_decls on
17269 the DECL_TEMPLATE_RESULT.
17270 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17271 codes.
17272
17273 * error.c (dump_template_bindings): Don't crash if we had an
17274 invalid argument list.
17275
17276 * typeck.c (c_expand_start_case): Do narrowing here.
17277 * semantics.c (finish_switch_cond): Not here.
17278
17279 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
17280
17281 * parse.y (asm_clobbers): Do string concatenation.
17282
17283 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17284
17285 * decl.c (pushtag): Don't put local classes in template functions
17286 on the local_classes list.
17287
17288 2000-07-04 Scott Snyder <snyder@fnal.gov>
17289
17290 * decl2.c (get_guard): Add missing return for old ABI local
17291 variable case.
17292
17293 2000-07-09 Mark Mitchell <mark@codesourcery.com>
17294
17295 * cp-tree.h (char_type_p): New function.
17296 * decl.c (init_decl_processing): Don't initialize
17297 signed_wchar_type_node or unsigned_wchar_type_node.
17298 (complete_array_type): Handle brace-enclosed string-constants.
17299 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17300 * tree.c (char_type_p): New function.
17301 * typeck2.c (digest_init): Use char_type_p.
17302
17303 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17304
17305 * pt.c (tsubst): Don't layout type, if it's error_mark.
17306
17307 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17308
17309 * pt.c (instantiate_pending_templates): Reset template level.
17310
17311 2000-07-05 Jason Merrill <jason@redhat.com>
17312
17313 * call.c (joust): Don't complain about `operator char *()' beating
17314 `operator const char *() const'.
17315
17316 2000-07-04 scott snyder <snyder@fnal.gov>
17317 Jason Merrill <jason@redhat.com>
17318
17319 * repo.c (repo_get_id): Handle the case where a class with virtual
17320 bases has a null TYPE_BINFO_VTABLE.
17321
17322 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
17323 Jason Merrill <jason@redhat.com>
17324
17325 * parse.y (member_init): Just pass in the type.
17326 * init.c (expand_member_init): Handle getting a type.
17327
17328 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17329 Jason Merrill <jason@redhat.com>
17330
17331 * decl.c (finish_function): Warn if a function has no return
17332 statement.
17333 Suggested by Andrew Koenig.
17334 * typeck.c (check_return_expr): Do set current_function_returns_value
17335 if we got an error_mark_node.
17336
17337 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17338
17339 * decl2.c (push_decl_namespace): Push the original namespace.
17340
17341 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17342
17343 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17344 * semantics.c (begin_class_definition): Clear it.
17345
17346 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
17347
17348 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17349 (genrtl_expr_stmt): Likewise.
17350 (genrtl_decl_stmt): Likewise.
17351 (genrtl_if_stmt): Likewise.
17352 (genrtl_while_stmt): Likewise.
17353 (genrtl_do_stmt): Likewise.
17354 (genrtl_return_stmt): Likewise.
17355 (genrtl_for_stmt): Likewise.
17356 (genrtl_break_stmt): Likewise.
17357 (genrtl_continue_stmt): Likewise.
17358 (genrtl_scope_stmt): Likewise.
17359 (genrtl_switch_stmt): Likewise.
17360 (genrtl_case_label): Likewise.
17361 (genrtl_begin_compound_stmt): Likewise.
17362 (genrtl_finish_compound_stmt): Likewise.
17363 (genrtl_compound_stmt): Likewise.
17364 (genrtl_asm_stmt): Likewise.
17365
17366 * init.c (begin_init_stmts): Remove call to
17367 genrtl_begin_compound_stmt.
17368 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17369
17370 * semantics.c (lang_expand_stmt): Changed call to
17371 genrtl_compound_stmt to ignore return value.
17372
17373 2000-07-02 Mark Mitchell <mark@codesourcery.com>
17374
17375 * mangle.c (canonicalize_for_substitution): Return the canonical
17376 variant of a type.
17377
17378 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17379 TYPE_DECL.
17380 * typeck.c (commonparms): Remove obstack manipulations.
17381
17382 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
17383
17384 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17385
17386 * Makefile.in (OBJS): Added ../c-semantics.o.
17387 (OBJDEPS): Likewise.
17388
17389 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17390 ../c-common.h.
17391 (struct stmt_tree): Added comment.
17392 (current_function_name_declared): Removed.
17393 (stmts_are_full_exprs_p): Likewise.
17394 (genrtl_do_pushlevel): Likewise.
17395 (genrtl_clear_out_block): Likewise.
17396 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17397 (DECL_ANON_UNION_ELEMS): Likewise.
17398 (emit_local_var): Likewise.
17399 (make_rtl_for_local_static): Likewise.
17400 (do_case): Likewise.
17401 (expand_stmt): Likewise.
17402 (genrtl_decl_cleanup): Likewise.
17403 (c_expand_asm_operands): Likewise.
17404 (c_expand_return): Likewise.
17405 (c_expand_start_case): Likewise.
17406
17407 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17408 (emit_local_var): Likewise.
17409 (initialize_local_var): Change reference to
17410 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17411 Change reference to stmts_are_full_exprs_p to
17412 current_stmt_tree->stmts_are_full_exprs_p.
17413 (push_cp_function_context): Likewise.
17414
17415 * expect.c (expand_throw): Change reference to
17416 stmts_are_full_exprs_p.
17417
17418 * init.c (build_aggr_init): Change reference to
17419 stmts_are_full_exprs_p.
17420 (build_vec_init): Likewise.
17421
17422 * optimize.c (maybe_clone_body): Change reference to
17423 current_function_name_declared to
17424 cp_function_chain->name_declared.
17425
17426 * pt.c (instantiate_decl): Change reference to
17427 current_function_name_declared to
17428 cp_function_chain->name_declared.
17429
17430 * semantics.c (expand_cond): Moved declaration to c-common.h.
17431 (genrtl_do_pushlevel): Moved to c-semantics.c.
17432 (genrtl_clear_out_block): Likewise.
17433 (genrtl_goto_stmt): Likewise.
17434 (genrtl_expr_stmt): Likewise.
17435 (genrtl_decl_stmt): Likewise.
17436 (gerntl_if_stmt): Likewise.
17437 (genrtl_while_stmt): Likewise.
17438 (genrtl_do_stmt): Likewise.
17439 (genrtl_return_stmt): Likewise.
17440 (genrtl_for_stmt): Likewise.
17441 (genrtl_break_stmt): Likewise.
17442 (genrtl_continue_stmt): Likewise.
17443 (genrtl_scope_stmt): Likewise.
17444 (genrtl_switch_stmt): Likewise.
17445 (genrtl_case_label): Likewise.
17446 (genrtl_begin_compound_stmt): Likewise.
17447 (genrtl_finish_compound_stmt): Likewise.
17448 (genrtl_compound_stmt): Likewise.
17449 (genrtl_asm_stmt): Likewise.
17450 (genrtl_decl_cleanup): Likewise.
17451 (expand_cond): Likewise.
17452 (expand_stmt): Renamed to ...
17453 (lang_expand_stmt): ... this.
17454 (lang_expand_expr_stmt): Initialize.
17455 (set_current_function_name_declared): Likewise.
17456 (stmts_are_full_exprs_p): Likewise.
17457 (current_function_name_declared): Likewise.
17458 (anon_aggr_type_p): Likewise.
17459 (do_poplevel): Change reference to
17460 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17461 Change reference to stmts_are_full_exprs_p to
17462 current_stmt_tree->stmts_are_full_exprs_p.
17463 (add_tree): Likewise.
17464 (finish_expr_stmt): Likewise.
17465 (prep_stmt): Likewise.
17466 (lang_expand_stmt): Likewise.
17467 (begin_compound_stmt): Change reference to
17468 current_function_name_declared to
17469 cp_function_chain->name_declared and call to
17470 current_function_name_declared().
17471 (setup_vtbl_ptr): Likewise.
17472 (genrtl_do_poplevel): Removed.
17473
17474 2000-06-30 Jason Merrill <jason@redhat.com>
17475
17476 * init.c (init_init_processing): Go back to aligning like
17477 double_type_node for old ABI.
17478 (get_cookie_size): Make cookie larger if we get a type that needs
17479 more alignment.
17480 (build_vec_delete): Call it.
17481
17482 * typeck.c (qualify_type_recursive): New fn.
17483 (composite_pointer_type): Use it.
17484 (build_binary_op): Use composite_pointer_type.
17485
17486 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
17487 Jason Merrill <jason@redhat.com>
17488
17489 * typeck.c (check_return_expr): Don't complain about returning
17490 NULL from operator new if -fcheck-new.
17491 * cp-tree.h: Declare flag_check_new here.
17492 * init.c: Not here.
17493
17494 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17495
17496 * mangle.c (find_substitution): Use same_type_p.
17497 (write_encoding): Don't check for substitutions.
17498
17499 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17500
17501 * parse.y (expr_no_comma_rangle): New non-terminal.
17502 (template_parm): Use it for default parameter case.
17503 (template_arg): Use it.
17504 (expr_no_commas): Remove commented out undefined extensions.
17505 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17506 * parse.h, parse.c: Rebuilt.
17507
17508 2000-06-30 Mark Mitchell <mark@codesourcery.com>
17509
17510 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17511 (finish_asm_stmt): Do it here, instead.
17512
17513 * cp-tree.h (ridpointers): Don't declare.
17514 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17515 (record_builtin_java_type): Likewise.
17516 (init_decl_processing): Likewise.
17517 * lex.c: Move inclusion of lex.h.
17518 (ridpointers): Don't define.
17519 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
17520 RID_MAX.
17521 * lex.h (enum rid): Rename to ...
17522 (enum cp_rid): ... this.
17523 (ridpointers): Don't declare.
17524 * parse.y: Move inclusion of lex.h.
17525 * parse.c: Regenerated.
17526 * spew.c: Move inclusion of lex.h.
17527
17528 * cp-tree.h (struct language_function): Remove temp_name_counter.
17529 (temp_name_counter): Remove.
17530 (get_temp_name): Change prototype.
17531 (get_guard): New function.
17532 (get_guard_cond): Likewise.
17533 (set_guard): Likewise.
17534 * cvt.c (build_up_reference): Adjust call to get_temp_name.
17535 * decl.c (expand_static_init): Use get_guard and friends to
17536 implement guard variables.
17537 * decl2.c (get_temp_name): Assume that the variables created are
17538 always static.
17539 (get_sentry): Rename to ...
17540 (get_guard): ... this. Implement new ABI guard variables.
17541 (get_guard_bits): New function.
17542 (get_guard_cond): Likewise.
17543 (set_guard): Likewise.
17544 (start_static_initialization_or_destruction): Use them.
17545 (do_static_initialization): Replace sentry with guard throughout.
17546 (do_static_destruction): Likewise.
17547 * init.c (create_temporary_var): Add comment.
17548
17549 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17550
17551 * mangle.c (find_substitution): Use same_type_p.
17552 (write_encoding): Don't check for substitutions.
17553
17554 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17555
17556 * parse.y (expr_no_comma_rangle): New non-terminal.
17557 (template_parm): Use it for default parameter case.
17558 (template_arg): Use it.
17559 (expr_no_commas): Remove commented out undefined extensions.
17560 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17561 * parse.h, parse.c: Rebuilt.
17562
17563 2000-06-29 Mark Mitchell <mark@codesourcery.com>
17564
17565 * cp-tree.h (flag_const_strings): Remove.
17566 (warn_parentheses): Likewise.
17567 (warn_format): Likewise.
17568 (common_type): Likewise.
17569 (default_conversion): Likewise.
17570 (build_binary_op): Likewise.
17571 (cp_build_binary_op): New macro.
17572 * call.c (build_new_op): Use cp_build_binary_op instead of
17573 build_binary_op.
17574 * class.c (build_vtable_entry_ref): Likewise.
17575 * decl.c (expand_static_init): Likewise.
17576 (compute_array_index_type): Likewise.
17577 (build_enumerator): Likewise.
17578 * decl2.c (delete_sanity): Likewise.
17579 (start_static_initialization_or_destruction): Likewise.
17580 * error.c (dump_type_suffix): Likewise.
17581 * init.c (resolve_offset_ref): Likewise.
17582 (build_new): Likewise.
17583 (build_new_1): Likewise.
17584 (build_vec_delete_1): Likewise.
17585 (build_vec_init): Likewise.
17586 (build_delete): Likewise.
17587 * rtti.c (synthesize_tinfo_fn): Likewise.
17588 (synthesize_tinfo_var): Likewise.
17589 * search.c (expand_upcast_fixups): Likewise.
17590 (fixup_all_virtual_upcast_offsets): Likewise.
17591 * typeck.c (build_array_ref): Likewise.
17592 (get_member_function_from_ptrfunc): Likewise.
17593 (build_binary_op): Add parameter.
17594 (pointer_int_sum): Use cp_build_binary_op.
17595 (pointer_diff): Likewise.
17596 (build_modify_expr): Likewise.
17597 (get_delta_difference): Likewise.
17598 (build_ptrmemfunc): Likewise.
17599
17600 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
17601
17602 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17603 * decl.c (create_implicit_typedef): Adjust.
17604 * decl2.c (build_artificial_parm): Adjust.
17605 * method.c (implicitly_declare_fn): Adjust.
17606 * pt.c (push_inline_template_parms_recursive): Adjust.
17607 (process_template_parm): Adjust.
17608 (overloaded_template_name): Adjust.
17609 * semantics.c (finish_template_template_parm): Adjust.
17610
17611 2000-06-28 Mark Mitchell <mark@codesourcery.com>
17612
17613 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17614 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17615 where to emit thunks.
17616 (build_vtt): Adjust call to build_vtt_inits.
17617 (build_vtt_inits): Add parameter to indicate whether or not
17618 sub-VTTs for virtual bases should be included. Adjust handling of
17619 construction vtables.
17620 (get_matching_base): New function.
17621 (dfs_build_vtt_inits): Rename to ...
17622 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17623 construction vtables.
17624 (dfs_fixup_binfo_vtbls): Likewise.
17625 (build_ctor_vtbl_groups): Build construction vtables for virtual
17626 bases, too.
17627 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17628 to build construction vtbls.
17629 (dfs_accumulate_vtbl_inits): Adjust handling of
17630 construction vtables.
17631
17632 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17633 types correctly.
17634
17635 2000-06-27 Mark Mitchell <mark@codesourcery.com>
17636
17637 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17638
17639 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17640
17641 * search.c (hides): Remove.
17642 (is_subobject_of_p): Add most_derived parameter. Use
17643 CANONICAL_BINFO.
17644 (lookup_field_queue_p): Adjust.
17645 (lookup_field_r): Adjust.
17646
17647 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17648
17649 * decl2.c (handle_class_head): Bash typedefs to the type's main
17650 decl.
17651
17652 2000-06-25 Mark Mitchell <mark@codesourcery.com>
17653
17654 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17655 (begin_global_stmt_expr): ... this.
17656 (genrtl_finish_stmt_expr): Rename to ...
17657 (finish_global_stmt_expr): ... this.
17658 * init.c (begin_init_stmts): Adjust calls.
17659 (finish_init_stmts): Likewise.
17660 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17661 (begin_global_stmt_expr): ... this.
17662 (genrtl_finish_stmt_expr): Rename to ...
17663 (finish_global_stmt_expr): ... this.
17664
17665 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17666
17667 * search.c (lookup_member): Fix typo in comment.
17668
17669 2000-06-24 Jason Merrill <jason@redhat.com>
17670
17671 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17672 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17673
17674 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17675
17676 * parse.y (complex_direct_notype_declarator): Support global_scope.
17677 * Makefile.in: Adjust conflict count.
17678
17679 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17680
17681 * parse.y (template_arg): Convert TEMPLATE_DECL
17682 that is a template template parameter to
17683 TEMPLATE_TEMPLATE_PARM here.
17684
17685 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17686 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17687 (copy_template_template_parm): Adjust prototype.
17688 * decl.c (grokdeclarator): Remove dead code.
17689 * pt.c (process_template_parm): Tidy.
17690 (lookup_template_class): Construct nodes in
17691 copy_template_template_parm.
17692 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17693 lookup_template_class. Use TYPE_TI_TEMPLATE.
17694 * tree.c (copy_template_template_parm): Add NEWARGS
17695 parameter.
17696 (mapcar): Adjust call to copy_template_template_parm.
17697 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17698 * method.c (build_template_template_parm_names): Change error
17699 code to avoid compilation warning.
17700
17701 * gxxint.texi: Document template template parameter
17702 name mangling.
17703
17704 2000-06-21 Alex Samuel <samuel@codesourcery.com>
17705
17706 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17707 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17708 (cp-demangle.o): New rule.
17709 (dyn-string.o): Likewise.
17710 * inc/cxxabi.h (__cxa_demangle): New declaration.
17711
17712 2000-06-22 Mark Mitchell <mark@codesourcery.com>
17713
17714 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17715 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17716 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
17717 a tree, not an int.
17718 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17719 (make_thunk): Change prototype.
17720 (emit_thunk): Rename to use_thunk.
17721 (mangle_thunk): Change prototype.
17722 * class.c (get_derived_offset): Simplify.
17723 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17724 BV_GENERATE_THUNK_WITH_VTABLE_P.
17725 (build_primary_vtable): Simplify.
17726 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17727 (dfs_find_base): Remove.
17728 (update_vtable_entry_for_fn): Correct bug in finding the base
17729 where a virtual function was first declared. Figure out whether
17730 or not to emit a vcall-thunk with the vtables in which it appears.
17731 Correct logic for deciding whether to use an ordinary thunk, or a
17732 vcall thunk.
17733 (finish_struct_1): Remove unnecssary code.
17734 (build_vtbl_initializer): Use ssize_int for the running counter of
17735 negative indices.
17736 (build_vtbl_initializer): Only use vcall thunks where necessary.
17737 Mark thunks as needing to be emitted with their vtables, or not.
17738 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17739 indices. Use size_binop.
17740 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17741 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
17742 size_binop.
17743 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17744 (build_vtable_entry): Mark thunks as needing to be emitted with
17745 their vtables, or not.
17746 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17747 * decl2.c (mark_vtable_entries): Use use_thunk instead of
17748 emit_thunk.
17749 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
17750 information.
17751 * error.c (dump_expr): Use BV_FN.
17752 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17753 not an int.
17754 * method.c (make_thunk): Likewise.
17755 (emit_thunk): Rename to use_thunk. Allow callers to decide
17756 whether or not to actually emit the thunk. Adjust for changes in
17757 representation of vcall offsets.
17758 * search.c (dfs_get_pure_virtuals): Use BV_FN.
17759 * semantics.c (emit_associated_thunks): New function.
17760 (expand_body): Use it.
17761 * ir.texi: Adjust descriptions of thunks.
17762
17763 2000-06-22 Jason Merrill <jason@redhat.com>
17764
17765 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17766 (tsubst_friend_function): Copy it here.
17767
17768 * decl.c (grok_op_properties): Fix typo.
17769
17770 * decl2.c (delete_sanity): Clarify warning, avoid failure on
17771 deleting void*.
17772
17773 * pt.c (check_explicit_specialization): Clarify error.
17774
17775 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17776 an old OVERLOAD when we're declaring a non-function.
17777 (pushdecl, destroy_local_var): Check for error_mark_node.
17778 (warn_extern_redeclared_static): Also bail early if
17779 we're a CONST_DECL.
17780 (push_overloaded_decl): Ignore an old error_mark_node.
17781
17782 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
17783
17784 * call.c (build_x_va_arg): Check if in a template decl.
17785 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17786
17787 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17788
17789 * class.c (push_lang_context): TYPE_NAME gets you to the Java
17790 types DECLs.
17791 * decl.c (check_goto): Computed gotos assumed OK.
17792
17793 2000-06-20 Jason Merrill <jason@redhat.com>
17794
17795 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17796 for which we don't need to look for instantiations.
17797
17798 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
17799
17800 * parse.y (program): Always call finish_translation_unit.
17801 * parse.c, parse.h: Rebuilt.
17802
17803 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
17804
17805 * method.c: Don't include hard-reg-set.h.
17806
17807 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17808
17809 * rtti.c (get_base_offset): Cope when vbase field is in a base.
17810
17811 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17812
17813 * call.c (build_conditional_expr): Use VOID_TYPE_P.
17814 * cvt.c (cp_convert_to_pointer): Likewise.
17815 (convert_to_void): Likewise.
17816 * error.c (dump_expr): Likewise.
17817 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17818 * init.c (build_delete): Likewise.
17819 * method.c (emit_thunk): Likewise.
17820 * optmize.c (declare_return_variable): Likewise.
17821 * rtti.c (get_tinfo_decl_dynamic): Likewise.
17822 (get_typeid): Likewise.
17823 (build_dynamic_cast_1): Likewise.
17824 * typeck.c (composite_pointer_type): Likewise.
17825 (common_type): Likewise.
17826 (build_indirect_ref): Likewise.
17827 (build_binary_op): Likewise.
17828 (build_x_compound_expr): Likewise.
17829 (check_return_expr): Likewise.
17830 * typeck2.c (add_exception_specifier): Likewise.
17831
17832 * mangle.c (write_method_parms): Use direct comparison for end
17833 of parmlist.
17834
17835 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
17836
17837 * cp-tree.h (genrtl_try_block): Declare function.
17838 (genrtl_handler): Likewise.
17839 (genrtl_catch_block): Likewise.
17840 (genrtl_ctor_stmt): Likewise.
17841 (genrtl_subobject): Likewise.
17842 (genrtl_decl_cleanup): Likewise.
17843 (genrtl_do_poplevel): Likewise.
17844 (genrtl_do_pushlevel): Likewise.
17845 (genrtl_clear_out_block): Likewise.
17846 (genrtl_goto_stmt): Likewise.
17847 (genrtl_expr_stmt): Likewise.
17848 (genrtl_decl_stmt): Likewise.
17849 (genrtl_if_stmt): Likewise.
17850 (genrtl_while_stmt): Likewise.
17851 (genrtl_do_stmt): Likewise.
17852 (genrtl_return_stmt): Likewise.
17853 (genrtl_for_stmt): Likewise.
17854 (genrtl_break_stmt): Likewise.
17855 (genrtl_continue_stmt): Likewise.
17856 (genrtl_scope_stmt): Likewise.
17857 (genrtl_switch_stmt): Likewise.
17858 (genrtl_case_label): Likewise.
17859 (genrtl_begin_compound_stmt): Likewise.
17860 (genrtl_finish_compound_stmt): Likewise.
17861 (genrtl_compound_stmt): Likewise.
17862 (genrtl_asm_stmt): Likewise.
17863 (genrtl_named_return_value): Likewise.
17864 (genrtl_begin_stmt_expr): Likewise.
17865 (genrtl_finish_stmt_expr): Likewise.
17866 (finish_for_stmt): Removed first argument.
17867 (finish_switch_stmt): Likewise.
17868
17869 * semantics.c (genrtl_try_block): Define function.
17870 (genrtl_handler): Likewise.
17871 (genrtl_catch_block): Likewise.
17872 (genrtl_ctor_stmt): Likewise.
17873 (genrtl_subobject): Likewise.
17874 (genrtl_decl_cleanup): Likewise.
17875 (genrtl_do_poplevel): Likewise.
17876 (genrtl_do_pushlevel): Likewise.
17877 (genrtl_clear_out_block): Likewise.
17878 (genrtl_goto_stmt): Likewise.
17879 (genrtl_expr_stmt): Likewise.
17880 (genrtl_decl_stmt): Likewise.
17881 (genrtl_if_stmt): Likewise.
17882 (genrtl_while_stmt): Likewise.
17883 (genrtl_do_stmt): Likewise.
17884 (genrtl_return_stmt): Likewise.
17885 (genrtl_for_stmt): Likewise.
17886 (genrtl_break_stmt): Likewise.
17887 (genrtl_continue_stmt): Likewise.
17888 (genrtl_scope_stmt): Likewise.
17889 (genrtl_switch_stmt): Likewise.
17890 (genrtl_case_label): Likewise.
17891 (genrtl_begin_compound_stmt): Likewise.
17892 (genrtl_finish_compound_stmt): Likewise.
17893 (genrtl_compound_stmt): Likewise.
17894 (genrtl_asm_stmt): Likewise.
17895 (genrtl_named_return_value): Likewise.
17896 (genrtl_begin_stmt_expr): Likewise.
17897 (genrtl_finish_stmt_expr): Likewise.
17898 (finish_for_stmt): Removed first argument and generate rtl
17899 specific code.
17900 (finish_switch_stmt): Likewise.
17901 (do_poplevel): Removed generate rtl specific code.
17902 (do_pushlevel): Likewise.
17903 (add_tree): Likewise.
17904 (finish_goto_stmt): Likewise.
17905 (finish_expr_stmt): Likewise.
17906 (begin_if_stmt): Likewise.
17907 (finish_if_stmt_cond): Likewise.
17908 (finish_then_clause): Likewise.
17909 (begin_else_clause): Likewise.
17910 (finish_else_clause): Likewise.
17911 (finish_if_stmt): Likewise.
17912 (clear_out_block): Likewise.
17913 (begin_while_stmt): Likewise.
17914 (finish_while_stmt_cond): Likewise.
17915 (finish_while_stmt): Likewise.
17916 (begin_do_stmt): Likewise.
17917 (finish_do_body): Likewise.
17918 (finish_do_stmt): Likewise.
17919 (finish_return_stmt): Likewise.
17920 (begin_for_stmt): Likewise.
17921 (finish_for_init_stmt): Likewise.
17922 (finish_for_cond): Likewise.
17923 (finish_for_expr): Likewise.
17924 (finish_break_stmt): Likewise.
17925 (finish_continue_stmt): Likewise.
17926 (begin_switch_stmt): Likewise.
17927 (finish_switch_cond): Likewise.
17928 (finish_case_label): Likewise.
17929 (begin_try_block): Likewise.
17930 (begin_function_try_block): Likewise.
17931 (finish_try_block): Likewise.
17932 (finish_cleanup_try_block): Likewise.
17933 (finish_cleanup): Likewise.
17934 (finish_function_try_block): Likewise.
17935 (finish_handler_sequence): Likewise.
17936 (finish_function_handler_sequence): Likewise.
17937 (begin_handler): Likewise.
17938 (finish_handler_parms): Likewise.
17939 (begin_catch_block): Likewise.
17940 (finish_handler): Likewise.
17941 (begin_compound_stmt): Likewise.
17942 (finish_compound_stmt): Likewise.
17943 (finish_asm_stmt): Likewise.
17944 (finish_label_stmt): Likewise.
17945 (finish_label_decl): Likewise.
17946 (finish_subobject): Likewise.
17947 (finish_decl_cleanup): Likewise.
17948 (finish_named_return_value): Likewise.
17949 (begin_stmt_expr): Likewise.
17950 (finish_stmt_expr): Likewise.
17951
17952 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17953 to call genrtl_expr_stmt when appropriate.
17954
17955 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17956 begin_compound_expr to call genrtl_begin_stmt_expr and
17957 genrtl_begin_compound_expr when appropriate.
17958 (finish_init_stmts): Changed calls to finish_compound_expr and
17959 finish_stmt_expr to call genrtl_finish_compound_expr and
17960 genrtl_finish_stmt_expr when appropriate.
17961 (expand_default_init): Changed call to finish_expr_stmt to call
17962 genrtl_expr_stmt when appropriate.
17963 (build_vec_init): Likewise.
17964
17965 * parse.y (simple_stmt): Removed first argument from call to
17966 finish_for_stmt. Removed first argument from call to
17967 finish_switch_stmt.
17968
17969 * parse.c: Regenerated.
17970
17971 * pt.c (tsubst_expr): Removed first argument from call to
17972 finish_for_stmt. Removed first argument from call to
17973 finish_switch_stmt.
17974
17975 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
17976
17977 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17978 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17979
17980 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17981 (cplus_tree_code_length[]): Likewise.
17982 (cplus_tree_code_name[]): Likewise.
17983 (init_parse): Added call to add_c_tree_codes. Changed
17984 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17985
17986 2000-06-16 Mark Mitchell <mark@codesourcery.com>
17987
17988 * cp-tree.h (finish_mem_initializers): Declare.
17989 (count_trees): Likewise.
17990 * parse.y (base_init): Use finish_mem_initializers.
17991 * semantics.c (finish_mem_initializers): New function.
17992
17993 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
17994 the number of trees.
17995 (n_trees): Remove.
17996 (count_trees): Don't use it.
17997
17998 2000-06-15 Jason Merrill <jason@redhat.com>
17999
18000 * tree.c (count_trees): New debugging function.
18001
18002 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
18003 * init.c (build_member_call): Pull out the name of a DECL.
18004
18005 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
18006 * semantics.c (expand_body): Push to TV_INTEGRATION here.
18007 * optimize.c (optimize_function): Not here.
18008 * pt.c (instantiate_decl): Push to TV_PARSE.
18009
18010 2000-06-15 Mark Mitchell <mark@codesourcery.com>
18011
18012 * cp-tree.h (struct language_function): Remove x_base_init_list
18013 and x_member_init_list.
18014 (current_base_init_list): Remove.
18015 (current_member_init_list): Likewise.
18016 (setup_vtbl_ptr): Change prototype.
18017 (emit_base_init): Likewise.
18018 (expand_member_init): Likewise.
18019 (reinit_parse_for_function): Remove.
18020 * decl.c (save_function_data): Don't clear x_base_init_list and
18021 x_member_init_list.
18022 (mark_language_function): Don't mark them.
18023 * init.c (perform_member_init): Tweak comment.
18024 (sort_member_init): Take the list of initializers as an argument.
18025 (sort_base_init): Likewise.
18026 (emit_base_init): Likewise.
18027 (expand_member_init): Return the initializer. Don't use global
18028 variables.
18029 * lex.c (reinit_parse_for_function): Remove.
18030 * method.c (build_template_parm_names): Correct substitution.
18031 (do_build_copy_constructor): Don't use current_member_init_list
18032 and current_base_init_list.
18033 (synthesize_method): Likewise.
18034 * parse.y (base_init): Split mem-initializers into
18035 base-initializers and field-initializers.
18036 (member_init_list): Build up the list here.
18037 (member_init): Return the initializer.
18038 (fn.depfn): Don't use reinit_parse_for_function.
18039 * parse.c: Regenerated.
18040 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
18041 ERROR_MARK.
18042 (tsubst_expr): Don't use current_member_init_list
18043 and current_base_init_list.
18044 (tsubst_expr_values): Rename to ...
18045 (tsubst_initializer_list): ... this. Use convert_from_reference.
18046 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
18047 and current_base_init_list.
18048 (begin_function_definition): Don't call reinit_parse_for_function.
18049
18050 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
18051
18052 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
18053 correctly.
18054
18055 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
18056
18057 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
18058
18059 * cp-tree.h (IF_COND): Move to c-common.h.
18060 (THEN_CLAUSE): Likewise.
18061 (ELSE_CLAUSE): Likewise.
18062 (WHILE_COND): Likewise.
18063 (WHILE_BODY): Likewise.
18064 (DO_COND): Likewise.
18065 (DO_BODY): Likewise.
18066 (RETURN_EXPR): Likewise.
18067 (EXPR_STMT_EXPR): Likewise.
18068 (FOR_INIT_STMT): Likewise.
18069 (FOR_COND): Likewise.
18070 (FOR_EXPR): Likewise.
18071 (FOR_BODY): Likewise.
18072 (SWITCH_COND): Likewise.
18073 (SWITCH_BODY): Likewise.
18074 (CASE_LOW): Likewise.
18075 (CASE_HIGH): Likewise.
18076 (GOTO_DESTINATION): Likewise.
18077 (COMPOUND_BODY): Likewise.
18078 (ASM_CV_QUAL): Likewise.
18079 (ASM_STRING): Likewise.
18080 (ASM_OUTPUTS): Likewise.
18081 (ASM_INPUTS): Likewise.
18082 (ASM_CLOBBERS): Likewise.
18083 (DECL_STMT_DECL): Likewise.
18084 (STMT_EXPR_STMT): Likewise.
18085 (LABEL_STMT_LABEL): Likewise.
18086 (SCOPE_BEGIN_P): Likewise.
18087 (SCOPE_END_P): Likewise.
18088 (SCOPE_STMT_BLOCK): Likewise.
18089 (SCOPE_NULLIFIED_P): Likewise.
18090 (SCOPE_NO_CLEANUPS_P): Likewise.
18091 (SCOPE_PARTIAL_P): Likewise.
18092 (ASM_VOLATILE_P): Likewise.
18093 (STMT_LINENO): Likewise.
18094 (STMT_LINENO_FOR_FN_P): Likewise.
18095
18096 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
18097 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
18098 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
18099 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
18100 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
18101
18102 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
18103
18104 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
18105 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
18106
18107 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
18108 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
18109 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
18110
18111 2000-06-14 Mark Mitchell <mark@codesourcery.com>
18112
18113 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
18114 * class.c (dfs_find_final_overrider): Set it appropriately.
18115 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
18116 avoid unneeded secondary vptrs.
18117
18118 2000-06-13 Jakub Jelinek <jakub@redhat.com>
18119
18120 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
18121 (check_bitfield_decl, check_field_decl): Likewise.
18122 (build_vtbl_or_vbase_field, build_base_field): Likewise.
18123 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
18124 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
18125 (xfer_tag, finish_enum): Likewise.
18126 * decl2.c (finish_builtin_type): Likewise.
18127 * init.c (init_init_processing): Likewise.
18128 * pt.c (instantiate_class_template): Likewise.
18129 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
18130 * cp-tree.h (struct lang_type): Add user_align member.
18131 (CLASSTYPE_USER_ALIGN): Define.
18132
18133 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
18134
18135 * Make-lang.in (c++.install-common): Install g++-cross in
18136 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
18137 $(target_alias)-g++ and $(target_alias)-c++.
18138
18139 2000-06-12 Mark Mitchell <mark@codesourcery.com>
18140
18141 * class.c (vcall_offset_data_s): Add last_init and fns.
18142 (overrides): Rename to same_signature_p.
18143 (dfs_find_final_overrider): Adjust accordingly.
18144 (mark_overriders): Likewise.
18145 (warn_hidden): Likewise.
18146 (build_vtbl_initializer): Reorganize machinery for building things
18147 at negative offsets.
18148 (build_vcall_and_vbase_vtbl_entries): Likewise.
18149 (build_vbase_offset_vtbl_entries): Likewise.
18150 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
18151 offset entries. Do not create two entries for functions with the
18152 same signature.
18153 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
18154 (build_rtti_vtbl_entries): Reorganize machinery for building things
18155 at negative offsets.
18156
18157 * optimize.c (expand_call_inline): Don't recurse into the code
18158 used to initialize the parameters more than once.
18159
18160 2000-06-11 Mark Mitchell <mark@codesourcery.com>
18161
18162 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
18163 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
18164 (find_substitution): Only use the `Sa' substitution for
18165 std::allocator, not instantiations of it.
18166 (write_template_prefix): Move comment. Only use a TREE_LIST to
18167 represent substitutions for a member template.
18168 (write_array_type): Mangle array dimensions correctly.
18169 * optimize.c (maybe_clone_body): Copy more information from the
18170 cloned function.
18171 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
18172 on the regenerated declaration.
18173
18174 2000-06-11 Chip Salzenberg <chip@valinux.com>
18175 Mark Mitchell <mark@codesourcery.com>
18176
18177 * class.c (build_vtable): Clarify comment.
18178 (build_ctor_vtbl_group): Pass the most derived type to
18179 build_vtable.
18180
18181 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18182
18183 * decl2.c (compare_options): Don't needlessly cast away const-ness.
18184
18185 2000-06-10 Mark Mitchell <mark@codesourcery.com>
18186
18187 * decl.c (add_binding): Handle duplicate declarations of external
18188 variables.
18189
18190 2000-06-09 Chip Salzenberg <chip@valinux.com>
18191 Mark Mitchell <mark@codesourcery.com>
18192
18193 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
18194 argument.
18195 (write_signed_number): New macro.
18196 (write_unsigned_number): Likewise.
18197 (write_source_name): Use them.
18198 (write_number): Handle signed and unsigned values.
18199 (write_integer_cst): Use tree_int_cst_sgn, and use
18200 write_unsigned_number or write_signed_number as appropriate.
18201 (write_discriminator): Use write_unsigned_number or
18202 write_signed_number as appropriate.
18203 (write_template_arg_literal): Likewise.
18204 (write_array_type): Use tree_low_cst.
18205 (write_template_parm): Use write_unsigned_number or
18206 write_signed_number as appropriate.
18207 (write_substitution): Adjust call to write_number.
18208 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
18209 (write_expression): Handle non-type template arguments of
18210 reference type correctly.
18211 (mangle_thunk): Use write_signed_number.
18212
18213 2000-06-09 Chip Salzenberg <chip@valinux.com>
18214
18215 * mangle.c (find_substition): Don't mangle objects with typename
18216 substitutions (e.g. "cin" as "Si").
18217
18218 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
18219
18220 * call.c (add_candidate): Use ggc_alloc_cleared.
18221 * decl.c (lookup_label): Likewise.
18222 * lex.c (retrofit_lang_decl): Likewise.
18223
18224 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
18225
18226 * semantics.c (expand_body): Push to TV_EXPAND.
18227 * optimize.c (optimize_function): Push to TV_INTEGRATION.
18228 * decl.c (start_function): Always call announce_function.
18229
18230 * tinfo2.cc: Just declare abort.
18231
18232 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
18233
18234 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
18235 whenever @ is a symbolic name.
18236
18237 2000-06-08 Jakub Jelinek <jakub@redhat.com>
18238
18239 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
18240
18241 2000-06-07 Mark Mitchell <mark@codesourcery.com>
18242
18243 * decl.c (pushdecl): Look up functions by DECL_NAME, not
18244 DECL_ASSEMBLER_NAME.
18245
18246 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18247
18248 * decl2.c (c_language): Define.
18249
18250 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
18251
18252 * lex.c (lang_init_options): Tweak.
18253
18254 * decl2.c: Remove #inclusion of diagnostic.h
18255 (lang_decode_option): Move diagnostic formatting options to
18256 toplevel.
18257
18258 * lang-options.h: Remove documentation for diagnostic options.
18259
18260 * Makefile.in (lex.o): Depends upon diagnostic.h
18261
18262 2000-06-06 Mark Mitchell <mark@codesourcery.com>
18263
18264 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18265 the same DECL_RESULT, it's not a redefinition.
18266 * pt.c (tsubst_decl): Remove code to handle illegal
18267 specializations.
18268
18269 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
18270
18271 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18272
18273 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
18274
18275 * search.c (maybe_suppress_debug_info): Don't check
18276 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18277
18278 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18279 here if extern_p.
18280
18281 Remember instantiation context in deferred instantiations.
18282 * cp-tree.h (struct tinst_level): Remove.
18283 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18284 * pt.c (current_tinst_level): Now a tree.
18285 (print_template_context, push_tinst_level, pop_tinst_level,
18286 tinst_for_decl): Adjust.
18287 (reopen_tinst_level): New fn.
18288 (init_pt): Register current_tinst_level as a root.
18289 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18290 of the pending templates list.
18291 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
18292 * lex.c (extract_interface_info): Adjust.
18293 * decl2.c (warn_if_unknown_interface): Adjust.
18294
18295 2000-06-05 Mark Mitchell <mark@codesourcery.com>
18296
18297 * class.c (indirect_primary_base_p): New function.
18298 (determine_primary_base): Use it.
18299
18300 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
18301
18302 Update new-abi dynamic cast algorithm.
18303 * tinfo.cc (__class_type_info::__dyncast_result): Add
18304 whole_details. Adjust constructor.
18305 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18306 Avoid unnecessary searching.
18307 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18308
18309 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18310
18311 * decl.c (init_decl_processing): Don't call record_component_aliases.
18312 * tree.c (build_cplus_array_type_1): Likewise.
18313
18314 2000-06-04 Mark Mitchell <mark@codesourcery.com>
18315
18316 * ir.texi: Correct typo.
18317 * mangle.c (write_expression): Handle non-type template arguments
18318 with reference type.
18319 * method.c (build_overload_value): Likewise.
18320 * pt.c (convert_nontype_argument): Explicitly represent conversion
18321 to a reference with an ADDR_EXPR.
18322 (unify): Always unify arguments in left-to-right order.
18323
18324 2000-06-03 Alex Samuel <samuel@codesourcery.com>
18325 Mark Mitchell <mark@codesourcery.com>
18326
18327 * Make-lang.in (CXX_SRCS): Add mangle.c.
18328 * Makefile.in (CXX_OBJS): Add mangle.o.
18329 (mangle.o): New rule.
18330
18331 * class.c (local_classes): New variable.
18332 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18333 (get_vtt_name): Use mangle_vtt_name for new ABI.
18334 (init_class_processing): Initialize local_classes.
18335 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18336 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18337 (std_identifier): New macro.
18338 (DECL_VOLATILE_MEMFUNC_P): New macro.
18339 (DECL_NAMESPACE_STD_P): Likewise.
18340 (local_classes): Declare.
18341 (get_mostly_instantiated_function_type): Declare.
18342 (init_mangle): Declare.
18343 (mangle_decl): Likewise.
18344 (mangle_type_string): Likewise.
18345 (mangle_type): Likewise.
18346 (mangle_typeinfo_for_type): Likewise.
18347 (mangle_typeinfo_string_for_type): Likewise.
18348 (mangle_vtbl_for_type): Likewise.
18349 (mangle_vtt_for_type): Likewise.
18350 (mangle_ctor_vtbl_for_type): Likewise.
18351 (mangle_thunk): Likewise.
18352 (mangle_conv_op_name_for_type): Likewise.
18353 (mangle_guard_variable): Likewise.
18354 * decl.c (pushtag): Keep track of local classes.
18355 (initialize_predefined_identifiers): Initialize std_identifier.
18356 (init_decl_processing): Use std_identifier.
18357 (start_decl): Don't treat instantiations as specializations.
18358 (grokdeclarator): Likewise.
18359 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
18360 name for fully-instantiated templates.
18361 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18362 destructors with the new ABI.
18363 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18364 (grokfield): Use mangle_type for new ABI.
18365 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18366 (get_sentry): Use mangle_guard_variable for new ABI.
18367 (start_static_initialization_or_destruction): Likewise.
18368 * expr.c (extract_aggr_init): Remove.
18369 (extract_scalar_init): Likewise.
18370 (extract_init): Remove #if 0'd code.
18371 * mangle.c: New function.
18372 * method.c (build_mangled_name): Assert not flag_new_abi.
18373 (build_static_name): Likewise.
18374 (build_decl_overload_real): Likewise.
18375 (build_typename_overload): Likewise.
18376 (build_overload_with_type): Likewise.
18377 (build_overload_name): Likewise.
18378 (get_ctor_vtbl_name): Likewise.
18379 (start_squangling): Likewise.
18380 (get_id_2): Likewise.
18381 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18382 (init_method): Call init_mangle for new ABI.
18383 (make_thunk): Call mangle_thunk for new ABI.
18384 * operators.def: Correct new ABI manglings for the `%' operator.
18385 Add `::' operator.
18386 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18387 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18388 (lookup_template_class): Call mangle_decl for new ABI.
18389 (get_mostly_instantiated_function_type): New function.
18390 (set_mangled_name_for_template_decl): Use it.
18391 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18392 the new ABI. Use mangle_conv_op_name_for_type for instantiated
18393 conversion op names.
18394 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18395 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18396 (tinfo_base_init): Likewise. Mangle typeinfo string name with
18397 mangle_typeinfo_string_for_type.
18398
18399 2000-06-03 Mark Mitchell <mark@codesourcery.com>
18400
18401 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18402 (INNERMOST_TEMPLATE_ARGS): New macro.
18403 (innermost_args): Remove.
18404 (get_innermost_template_args): New function.
18405 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18406 * error.c (dump_function_decl): Be caution when using
18407 most_general_template.
18408 * method.c (build_template_parm_names): Use
18409 INNERMOST_TEMPLATE_ARGS.
18410 * pt.c (add_to_template_args): Tidy comment
18411 (get_innermost_template_args): New function.
18412 (check_explicit_specialization): Clear DECL_INITIAL for a new
18413 specialization.
18414 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18415 Tidy.
18416 (push_template_decl): Always register specializations of the most
18417 general template.
18418 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18419 (coerce_template_parms): Likewise.
18420 (lookup_template_class): Likewise.
18421 (innermost_args): Remove.
18422 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18423 (tsubst_decl): Handle tricky specializations. Use
18424 get_innermost_template_args.
18425 (instantiate_template): Simplify handling of partial
18426 instantiations.
18427 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18428 (most_general_template): Reimplement, in a more straightforward
18429 manner.
18430 (regenerate_decl_from_template): Tweak formatting. Use
18431 TMPL_ARGS_DEPTH for clarity.
18432 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18433
18434 * dump.c (dequeue_and_dump): Dump information about thunks.
18435
18436 2000-06-01 Richard Henderson <rth@cygnus.com>
18437
18438 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18439
18440 2000-06-01 Richard Henderson <rth@cygnus.com>
18441
18442 * decl2.c (unsupported_options): Fix typo, make const.
18443 (lang_decode_option): Fix bsearch argument order.
18444
18445 2000-06-01 Mark Mitchell <mark@codesourcery.com>
18446
18447 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18448 on FIELD_DECLs.
18449
18450 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18451
18452 * cp-tree.h (c_get_alias_set): Deleted.
18453 * Makefile.in (decl.o): Include ../expr.h.
18454 * decl.c (expr.h): Include.
18455 (init_decl_processing): Call record_component_aliases for arrays.
18456 (grokdeclarator): Likewise.
18457 Set TREE_ADDRESSABLE for fields that aren't bitfields.
18458 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18459
18460 2000-05-31 Mark Mitchell <mark@codesourcery.com>
18461
18462 Remove guiding declaration support.
18463 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18464 (flag_guiding_decls): Remove.
18465 * call.c (build_user_type_conversion_1): Remove support for
18466 guiding decls.
18467 (build_new_function_call): Likewise.
18468 (build_new_op): Likewise.
18469 (build_new_method_call): Likewise.
18470 * decl.c (start_function): Likewise.
18471 * friend.c (is_friend): Likewise.
18472 (do_friend): Likewise.
18473 * decl2.c ((flag_dump_translation_unit): Make it const.
18474 (flag_guiding_decls): Remove.
18475 (unsupported_options): New variable
18476 (compare_options): New function.
18477 (lang_decode_option): Use them.
18478
18479 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18480
18481 * method.c (mangle_expression): Adjust test for legal expression
18482 operators.
18483
18484 * pt.c (instantiate_decl): Save and restore the local
18485 specializations list.
18486
18487 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
18488
18489 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18490
18491 2000-05-30 Mark Mitchell <mark@codesourcery.com>
18492
18493 * call.c (add_template_candidate_real): Handle member template
18494 constructors for classes with virtual bases.
18495 (build_user_type_conversion_1): Use in_charge_arg_for_name.
18496 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18497
18498 * ir.texi: Update thunk documentation.
18499
18500 * call.c (joust): Fix handling of overloaded builtin operators.
18501
18502 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
18503
18504 * cp-tree.h (DECL_ANTICIPATED): New macro.
18505 Document new use of DECL_LANG_FLAG_7.
18506 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18507 in the user namespace.
18508 * lex.c (do_identifier): If the identifier's declaration has
18509 DECL_ANTICIPATED on, it has not yet been declared. But do not
18510 replace it with an ordinary implicit declaration.
18511
18512 * tinfo2.cc: Include stdlib.h.
18513
18514 2000-05-29 Mark Mitchell <mark@codesourcery.com>
18515
18516 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18517 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18518 CLASSTYPE_ALIGN.
18519
18520 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
18521
18522 * decl2.c (lang_decode_option): Use skip_leading_substring instead
18523 of plain strncmp.
18524
18525 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
18526
18527 * operators.def (<?): Duplicated, should have been...
18528 (>?): this. Fixed.
18529
18530 2000-05-27 Alex Samuel <samuel@codesourcery.com>
18531 Mark Mitchell <mark@codesourcery.com>
18532
18533 * cp-tree.h (ansi_opname): Make it a macro.
18534 (ansi_assopname): Likewise.
18535 (struct lang_decl_flags): Add assignment_operator_p.
18536 (struct lang_decl): Add operator_code.
18537 (DECL_VTT_PARM): Adjust.
18538 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18539 overloaded operator.
18540 (SET_OVERLOADED_OPERATOR_CODE): New macro.
18541 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18542 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18543 (opname_tab): Remove.
18544 (assignop_tab): Likewise.
18545 (operator_name_info_t): New type.
18546 (operator_name_info): New variable.
18547 (assignment_operator_name_info): Likewise.
18548 (build_cp_library_fn): Remove declaration.
18549 (push_cp_library_fn): Likewise.
18550 (operator_name_string): Likewise.
18551 (build_decl_overload): Likewise.
18552 * call.c (print_z_candidates): Simplify.
18553 (build_object_call): Adjust usage of ansi_opname. Use
18554 DECL_OVERLOADED_OPERATOR_P.
18555 (op_error): Adjust operator name lookup.
18556 (build_conditional_expr): Adjust usage of ansi_opname.
18557 (build_new_op): Likewise.
18558 (build_op_delete_call): Likewise.
18559 (build_over_call): Likewise.
18560 (joust): Use DECL_OVERLOADED_OPERATOR_P.
18561 * decl.c (duplicate_decls): Copy operator_code.
18562 (init_decl_processing): Adjust parameters to push_cp_library_fn.
18563 (builtin_function): Adjust parameters to build_library_fn_1.
18564 (build_library_fn_1): Accept an overloaded operator code.
18565 (build_library_fn): Pass ERROR_MARK.
18566 (build_cp_library_fn): Accept an overloaded operator code.
18567 (push_cp_library_fn): Likewise.
18568 (grokfndecl): Tweak.
18569 (grokdeclarator): Simplify code to compute names of overloaded
18570 operators. Adjust use of ansi_opname.
18571 (ambi_op_p): Work on tree_codes, not identifiers.
18572 (unary_op_p): Likewise.
18573 (grok_op_properties): Likewise.
18574 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18575 (lang_mark_tree): Don't try to mark the operator_code.
18576 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18577 * error.c (dump_decl): Remove special handling for operator
18578 names.
18579 (dump_function_name): Likewise.
18580 (dump_expr): Adjust name lookup of operators.
18581 (op_to_string): Simplify.
18582 (assop_to_string): Likewise.
18583 * init.c (build_new_1): Adjust use of ansi_opname.
18584 * lex.c (opname_tab): Remove.
18585 (assignop_tab): Likewise.
18586 (ansi_opname): Likewise.
18587 (ansi_assopname): Likewise.
18588 (operator_name_string): Likewise.
18589 (reinit_lang_specific): Likewise.
18590 (operator_name_info): New variable.
18591 (assignment_operator_name_info): Likewise.
18592 (init_operators): New function.
18593 (init_parse): Use it.
18594 (do_identifier): Adjust use of ansi_opname.
18595 * method.c (mangle_expression): Don't use ansi_opname for
18596 mangling.
18597 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18598 (build_decl_overload): Remove.
18599 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18600 (do_build_assign_ref): Adjust use of ansi_opname.
18601 (synthesize_method): Likewise.
18602 (implicitly_declare_fn): Likewise.
18603 * operators.def: New file.
18604 * parse.y (operator): Adjust use of ansi_opname.
18605 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18606 (set_mangled_name_for_template_decl): Don't play games with
18607 current_namespace.
18608 (special_function_p): Adjust use of ansi_opname.
18609 * typeck.c (check_return_expr): Likewise.
18610 * Make-lang.in (cc1plus): Depend on operators.def.
18611 * Makefile.in (lex.o): Likewise.
18612 (decl.o): Likewise.
18613
18614 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
18615
18616 * Make-lang.in (cplib2.ready): Eradicate.
18617
18618 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18619
18620 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18621 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18622 (built_min, cp_tree_equal): Likewise.
18623
18624 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18625
18626 * class.c (layout_nonempty_base_or_field): Replace
18627 `record_layout_info' with `record_layout_info_s'.
18628
18629 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
18630
18631 Fix goto checking.
18632 * cp-tree.h (struct language_function): x_named_labels is now
18633 a struct named_label_list*.
18634 * decl.c (struct named_label_use_list): Renamed from...
18635 (struct named_label_list): ...this. New struct.
18636 (push_binding_level): Don't set eh_region.
18637 (note_level_for_eh): New fn.
18638 (pop_label): Take label and old value directly.
18639 (pop_labels): Adjust for new named_labels format.
18640 (lookup_label): Likewise.
18641 (poplevel): Note characteristics of a binding level containing a
18642 named label. Mess with named label lists earlier.
18643 (mark_named_label_lists): New fn.
18644 (mark_lang_function): Call it.
18645 (use_label): New fn, split out from...
18646 (make_label_decl): ...here. Don't call it.
18647 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18648 check_previous_gotos): New fns, split out from...
18649 (define_label): ...here.
18650 (check_switch_goto): New fn.
18651 (define_case_label): Call it.
18652 (check_goto): New fn.
18653 * semantics.c (finish_goto_stmt): Call it and use_label.
18654 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18655 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18656
18657 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18658
18659 * class.c (build_vtable_entry_ref): Correct usage of
18660 get_vtbl_decl_for_binfo.
18661
18662 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18663 * method.c (implicitly_declare_fn): Not here.
18664
18665 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
18666
18667 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18668 (CPTI_PTMD_DESC_TYPE): ... here.
18669 (ptmd_desc_type_node): Rename to ...
18670 (ptm_desc_type_node): ... here.
18671 * decl.c: Likewise.
18672 * rtti.c (ptmd_initializer): Rename to ...
18673 (ptm_initializer): ... here.
18674 (sythesize_tinfo_var): Adjust. Deal with pointer to member
18675 function.
18676 (create_tinfo_types): Adjust.
18677
18678 2000-05-25 Mark Mitchell <mark@codesourcery.com>
18679
18680 Finish implementation of VTTs.
18681 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18682 CPTI_VTT_PARM_IDENTIFIER.
18683 (vtt_parm_identifier): New macro.
18684 (vtt_parm_type): Likewise.
18685 (BINFO_SUBVTT_INDEX): Likewise.
18686 (BINFO_VPTR_INDEX): Likewise.
18687 (struct lang_decl): Add vtt_parm.
18688 (DECL_VTT_PARM): New macro.
18689 (DECL_USE_VTT_PARM): Likewise.
18690 (DECL_NEEDS_VTT_PARM_P): Likewise.
18691 (get_vtt_name): Declare.
18692 (build_artificial_parm): Likewise.
18693 (fixup_all_virtual_upcast_offsets): Likewise.
18694 (expand_indirect_vtbls_init): Remove.
18695 * call.c (build_new_method_call): Pass the vtt to subobject
18696 constructors and destructors.
18697 * class.c (get_vtt_name): Give it external linkage.
18698 (build_clone): Handle the magic VTT parameters for clones.
18699 (clone_function_decl): Fix typo in comment.
18700 (build_vtt): Keep track of the indices in the VTTs where various
18701 entities are stored.
18702 (build_vtt_inits): Likewise.
18703 (dfs_build_vtt_inits): Likewise.
18704 (build_ctor_vtbl_group): Tweak type of construction vtables.
18705 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18706 primary bases, when building construction vtables.
18707 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18708 (initialize_predefined_identifiers): Add vtt_parm_identifier.
18709 (init_decl_processing): Initialize vtt_parm_type.
18710 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18711 (lang_mark_tree): Make vtt_parm.
18712 * decl2.c (build_artificial_parm): New function.
18713 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
18714 (grokclassfn): Use build_artificial_parm.
18715 * init.c (initialize_vtbl_ptrs): Call
18716 fixup_all_virtual_upcast_offsets directly.
18717 (perform_member_init): Use the complete subobject destructor for
18718 member cleanups.
18719 (build_vtbl_address): New function.
18720 (expand_virtual_init): Handle VTTs.
18721 * optimize (maybe_clone_body): Likewise.
18722 * search.c (fixup_all_virtual_upcast_offsets): Give it external
18723 linkage.
18724 (expand_indirect_vtbls_init): Remove.
18725 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18726 * tree.c (make_binfo): Make them bigger.
18727
18728 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18729
18730 * inc/cxxabi.h (__pbase_type_info): Define, based on
18731 __pointer_type_info.
18732 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18733 (__pointer_to_member_type_info): Likewise.
18734 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18735 (__pointer_to_member_type_info::__is_pointer_p): Remove.
18736 (__pointer_type_info::__do_catch): Rename to ...
18737 (__pbase_type_info::__do_catch): ... here. Adjust.
18738 (__pbase_type_info::__pointer_catch): Implement.
18739 (__pointer_type_info::__pointer_catch): Adjust.
18740 (__pointer_to_member_type_info::__pointer_catch): Adjust.
18741
18742 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18743
18744 * tinfo.h (__user_type_info::contained_virtual_p): New
18745 predicate.
18746 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18747 shaped hierarchy.
18748 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18749 diamond shaped hierarchy. Add early out for mixed diamond and
18750 duplicate shaped hierarchy.
18751
18752 2000-05-24 Mark Mitchell <mark@codesourcery.com>
18753
18754 * cp-tree.h (build_delete): Change prototype.
18755 (build_vec_delete): Likewise.
18756 * call.c (build_scoped_method_call): Use special_function_kind
18757 values to indicate the kind of destruction to be done.
18758 (build_method_call): Likewise.
18759 * decl.c (finish_destructor_body): Likewise.
18760 (maybe_build_cleanup_1): Likewise. Rename to ...
18761 (maybe_build_cleanup): ... this.
18762 * decl2.c (delete_sanity): Use special_function_kind
18763 values to indicate the kind of destruction to be done.
18764 (build_cleanup): Likewise.
18765 * init.c (perform_member_init): Likewise.
18766 (build_vec_delete_1): Likewise.
18767 (build_dtor_call): Simplify.
18768 (build_delete): Use special_function_kind
18769 values to indicate the kind of destruction to be done.
18770 (build_vbase_delete): Likewise.
18771 (build_vec_delete): Likewise.
18772
18773 * init.c (sort_member_init): Fix typo in error message generation
18774 code.
18775
18776 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
18777
18778 * semantics.c (begin_class_definition): make the packed
18779 attribute be sensitive to the "-fpack-struct" command line flag
18780
18781 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
18782
18783 Update new-abi upcast algorithm.
18784 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18785 prototype and meaning of return value.
18786 (__si_class_type_info::__do_upcast): Likewise.
18787 (__vmi_class_type_info::__do_upcast): Likewise.
18788 * tinfo.cc (__class_type_info::__upcast_result): Replace
18789 whole2dst with part2dst. Adjust ctor.
18790 (__class_type_info::__do_upcast): Adjust call of worker function.
18791 (__class_type_info::__do_upcast): Adjust.
18792 (__si_class_type_info::__do_upcast): Adjust. Use parent's
18793 __do_upcast.
18794 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18795 virtual base in diamond hierarchy bug.
18796
18797 2000-05-23 Mark Mitchell <mark@codesourcery.com>
18798
18799 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18800 and bitfield to tinfo_fn_p.
18801 (DECL_TINFO_FN_P): Adjust.
18802 (SET_DECL_TINFO_FN_P): Likewise.
18803 (DECL_MUTABLE_P): Likewise.
18804 (DECL_C_BIT_FIELD): Likewise.
18805 (SET_DECL_C_BIT_FIELD): Likewise.
18806 (CLEAR_DECL_C_BIT_FIELD): Likewise.
18807 (DECL_UNINLINABLE): Likewise.
18808 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18809 (handle_using_decl): Remove assertion.
18810 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18811 to build FIELD_DECLs.
18812 (build_base_field): Likewise.
18813 (layout_class_type): Likewise.
18814 * decl.c (init_decl_processing): Likewise.
18815 (build_ptrmemfunc_type): Likewise.
18816 (grokdeclarator): Likewise.
18817 * decl2.c (grok_x_components): Likewise.
18818 * except.c (call_eh_info): Likewise.
18819 * init.c (init_init_processing): Likewise.
18820 * rtti.c (expand_class_desc): Likewise.
18821 (create_pseudo_type_info): Likewise.
18822 (get_vmi_pseudo_type_info): Likewise.
18823 (create_tinfo_types): Likewise.
18824 * ptree.c (print_lang_decl): Adjust.
18825 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18826 before checking DECL_MUTABLE_P.
18827
18828 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18829 parameters for template functions.
18830 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18831 destructors as well as constructors.
18832
18833 2000-05-22 Mark Mitchell <mark@codesourcery.com>
18834
18835 * class.c (build_ctor_vtbl_group): Set inits.
18836 * optimize.c (maybe_clone_body): Set DECL_INLINE and
18837 DECL_THIS_INLINE appropriately for clones.
18838
18839 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18840 (DECL_CONV_FN_P): Simplify.
18841 (DECL_OPERATOR): Remove.
18842 (language_to_string): Declare.
18843 * decl.c (duplicate_decls): Fix typo in comment.
18844 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18845 (grok_op_properties): Use DECL_CONV_FN_P instead of
18846 IDENTIFIER_TYPENAME_P.
18847 * dump.c (dequeue_and_dump): Dump the language linkage of
18848 declarations.
18849 * error.c (language_to_string): Give it external linkage.
18850 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18851 (implicitly_declare_fn): Set DECL_LANGUAGE.
18852 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18853 IDENTIFIER_TYPENAME_P.
18854 (tsubst_decl): Likewise.
18855 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18856 * semantics.c (finish_member_declaration): Don't mark members of
18857 classes declared in an extern "C" region as extern "C".
18858
18859 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18860
18861 * decl2.c (qualified_lookup_using_namespace): Look through
18862 namespace aliases.
18863
18864 * decl.c (push_using_decl): Return the old decl on namespace level.
18865
18866 2000-05-21 Mark Mitchell <mark@codesourcery.com>
18867
18868 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18869 (VTT_NAME_PREFIX): New macro.
18870 (CTOR_VTBL_NAME_PREFIX): Likewise.
18871 (get_ctor_vtbl_name): New function.
18872 * class.c (get_vtable_name): Simplify.
18873 (get_vtt_name): New function.
18874 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18875 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18876 when a virtual base becomes primary.
18877 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
18878 VTTs.
18879 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18880 additional parameters.
18881 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18882 (initialize_array): New function.
18883 (build_vtt): Likewise.
18884 (build_vtt_inits): Likewise.
18885 (dfs_build_vtt_inits): Likewise.
18886 (dfs_fixup_binfo_vtbls): Likewise.
18887 (build_ctor_vtbl_group): Likewise.
18888 (initialize_vtable): Use initialize_array.
18889 (accumulate_vtbl_inits): Reimplement to handle construction
18890 vtables.
18891 (dfs_accumulate_vtbl_inits): Likewise.
18892 (bulid_vtbl_initializer): Adjust parameter name.
18893 * method.c (build_typename_overload): Remove #if 0'd code.
18894 (get_ctor_vtbl_name): New function.
18895 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18896 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18897
18898 * cp-tree.h (struct lang_type): Remove search_slot.
18899 (CLASSTYPE_SEARCH_SLOT): Remove.
18900 (emit_base_init): Change prototype.
18901 (initialize_vtbl_ptrs): Likewise.
18902 (expand_indirect_vtbls_init): Likewise.
18903 (clear_search_slots): Remove.
18904 * decl.c (lang_mark_tree): Don't mark search_slot.
18905 * init.c (initialize_vtbl_ptrs): Simplify.
18906 (emit_base_init): Likewise.
18907 * search.c (struct vbase_info): Document decl_ptr.
18908 (convert_pointer_to_single_level): Remove.
18909 (dfs_find_vbases): Remove.
18910 (dfs_init_base_pointers): Simplify.
18911 (dfs_clear_vbase_slots): Remove.
18912 (dfs_vtable_path_unmark): New function.
18913 (init_vbase_pointers): Simplify.
18914 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18915 (expand_indirect_vtbls_init): Simplify. Don't call
18916 mark_all_temps_used.
18917 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18918 initialize_vtbl_ptrs.
18919
18920 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
18921
18922 * except.c: Add static prototypes.
18923
18924 2000-05-20 H.J. Lu <hjl@gnu.org>
18925
18926 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18927
18928 2000-05-19 Mark Mitchell <mark@codesourcery.com>
18929
18930 Don't create a separate copy of virtual bases for the
18931 CLASSTYPE_VBASECLASSES list.
18932 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18933 (BINFO_FOR_VBASE): Remove.
18934 (CANONICAL_BINFO): Adjust.
18935 (binfo_for_vbase): New function.
18936 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18937 instead of BINFO_FOR_VBASE.
18938 (build_vbase_pointer): Likewise.
18939 (build_secondary_vtable): Likewise.
18940 (dfs_mark_primary_bases): Likewise.
18941 (mark_primary_bases): Likewise.
18942 (layout_nonempty_base_or_field): Likewise.
18943 (dfs_set_offset_for_shared_vbases): Likewise.
18944 (dfs_set_offset_for_unshared_vbases): Likewise.
18945 (layout_virtual_bases): Likewise. Adjust for changes to the
18946 CLASSTYPE_VBASECLASSES list.
18947 (dump_class_hierarchy_r): Use binfo_for_vbase
18948 instead of BINFO_FOR_VBASE.
18949 (dump_class_hierarchy): Likewise.
18950 (finish_vtbls): Likewise.
18951 (build_vtbl_initializer): Adjust for changes to the
18952 CLASSTYPE_VBASECLASSES list.
18953 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18954 * decl.c (finish_destructor_body): Adjust for changes to the
18955 CLASSTYPE_VBASECLASSES list.
18956 * init.c (sort_base_init): Use binfo_for_vbase.
18957 (construct_virtual_bases): Adjust for changes to the
18958 CLASSTYPE_VBASECLASSES list.
18959 (expand_member_init): Use binfo_for_vbase.
18960 (build_vbase_delete): Adjust for changes to the
18961 CLASSTYPE_VBASECLASSES list.
18962 * method.c (do_build_copy_constructor): Likewise.
18963 * rtti.c (get_base_offset): Use binfo_for_vbase.
18964 (expand_class_desc): Remove #if 0'd code.
18965 * search.c (struct vbase_info): Remove vbase_types.
18966 (get_base_distance): Use binfo_for_vbase.
18967 (lookup_field_queue_p): Use CANONICAL_BINFO.
18968 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18969 (get_pure_virtuals): Adjust for changes to the
18970 CLASSTYPE_VBASECLASSES list.
18971 (dfs_find_vbases): Use binfo_for_vbase.
18972 (dfs_init_vbase_pointers): Likewise.
18973 (init_vbase_pointers): Don't initialize vi.vbase_types.
18974 (virtual_context): Use binfo_for_vbase.
18975 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18976 CLASSTYPE_VBASECLASSES list.
18977 (expand_indirect_vtbls_init): Simplify.
18978 (dfs_get_vbase_types): Don't replicate virtual bases.
18979 (find_vbase_instance): Use binfo_for_vbase.
18980 (binfo_for_vbase): New function.
18981 * typeck.c (get_delta_difference): Use binfo_for_vbase.
18982
18983 2000-05-17 Mark Mitchell <mark@codesourcery.com>
18984
18985 * decl2.c (finish_anon_union): Generalize error messages to handle
18986 anonymous structures.
18987 * init.c (perform_member_init): Remove `name' parameter.
18988 (build_field_list): New function.
18989 (sort_member_init): Handle anonymous union initialization order
18990 correctly. Check for multiple initializations of the same union.
18991 (emit_base_init): Don't look up fields by name here.
18992 (expand_member_init): Record the result of name lookup for future
18993 reference.
18994 * typeck.c (build_component_ref): Fix formatting.
18995
18996 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
18997
18998 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18999 * typeck.c (build_x_compound_expr): Replace warn_unused with
19000 warn_unused_value.
19001
19002 * decl2.c (lang_decode_option): Update -Wall unused flags by
19003 calling set_Wunused.
19004
19005 2000-05-16 Mark Mitchell <mark@codesourcery.com>
19006
19007 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
19008 * init.c (dfs_vtable_path_unmark): Remove.
19009 * search.c (marked_new_vtable_p): Likewise.
19010 (unmarked_new_vtable_p): Likewise.
19011 (dfs_search_slot_nonempty_p): Likewise.
19012 (dfs_mark): Likewise.
19013 (dfs_vtable_path_unmark): Likewise.
19014 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
19015 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
19016 (dfs_init_vbase_pointers): Remove special-case new ABI code.
19017 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
19018 (init_vbase_pointers): Simplify.
19019 (expand_indirect_vtbls_init): Likewise.
19020
19021 * class.c (copy_virtuals): New function.
19022 (build_primary_table): Use it.
19023 (build_secondary_vtable): Likewise.
19024 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
19025 indicate that no vcall offset is required.
19026 (add_virtual_function): Likewise.
19027 (modify_all_vtables): Likewise.
19028 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19029 (dfs_accumulate_vtbl_inits): Likewise.
19030 (build_vtbl_initializer): Make changes to handle construction
19031 vtables.
19032 (dfs_build_vcall_offset_vtbl_entries): Likewise.
19033 (build_rtti_vtbl_entries): Likewise.
19034 (build_vtable_entries): Handle a NULL vcall_index.
19035
19036 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
19037
19038 * decl2.c (lang_decode_option): Fix thinko.
19039
19040 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
19041
19042 * except.c (check_handlers): New fn.
19043 * cp-tree.h: Declare it.
19044 * semantics.c (finish_handler_sequence): Call it.
19045 (finish_function_handler_sequence): Likewise.
19046 (finish_handler_parms): Set TREE_TYPE on the handler.
19047 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
19048 * search.c (get_base_distance_recursive): If protect>1, ignore
19049 special access.
19050 (get_base_distance): Don't reduce watch_access.
19051
19052 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
19053
19054 * lex.c: #include diagnostic.h.
19055 (lang_init_options): Set default prefixing rules.
19056
19057 * lang-options.h: Add -fdiagnostics-show-location=.
19058
19059 * decl2.c: #include diagnostic.h.
19060 (lang_decode_option): Handle -fdiagnostics-show-location=.
19061
19062 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
19063
19064 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
19065 * vec.cc: Revert my 2000-05-07 change.
19066
19067 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
19068
19069 * class.c (check_field_decls): Complain about non-static data
19070 members with same name as class in class with constructor.
19071
19072 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
19073
19074 * decl.c (grokdeclarator): Allow non-static data members with
19075 same name as class.
19076
19077 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
19078
19079 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
19080 and pending_inline.filename. Update prototypes.
19081 * decl.c (define_label): Constify filename parameter.
19082 * decl2.c (warn_if_unknown_interface): Constify local char *.
19083 * input.c Constify input_source.filename. Don't declare
19084 input_filename or lineno. Constify filename parameter to feed_input.
19085 * lex.c (init_parse): Constify parameter and return value.
19086 (cp_pragma_interface, cp_pragma_implementation): Constify
19087 filename argument.
19088 (reinit_parse_for_method, reinit_parse_for_block,
19089 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
19090 Constify local char *.
19091 * pt.c: Don't declare lineno or input_filename.
19092 (print_template_context, tsubst_friend_function, tsubst_decl,
19093 tsubst, instantiate_decl): Constify local char *.
19094 * semantics.c (expand_body): Constify local char *.
19095 * tree.c (build_srcloc): Constify filename parameter.
19096 * typeck.c (c_expand_asm_operands): Constify filename
19097 parameter.
19098
19099 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
19100
19101 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
19102 offsetof expansion.
19103
19104 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
19105
19106 * inc/cxxabi.h: Fix typos in comment.
19107 (__base_class_info::__offset): Use a static_cast.
19108
19109 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
19110
19111 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
19112 of std::size_t and std::ptrdiff_t respectively.
19113 * tinfo.cc: Likewise.
19114 * vec.cc: Likewise.
19115
19116 2000-05-06 Richard Henderson <rth@cygnus.com>
19117
19118 * typeck.c (build_c_cast): Don't warn integer->pointer size
19119 mismatch for constants.
19120
19121 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
19122
19123 * rtti.c (ptmd_initializer): Set non-public, if class is
19124 incomplete.
19125
19126 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
19127 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19128 __cxa_vec_delete): Likewise.
19129 * tinfo.cc (__dynamic_cast): Likewise.
19130 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19131 __cxa_vec_delete): Likewise.
19132
19133 2000-05-04 Mark Mitchell <mark@codesourcery.com>
19134
19135 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
19136 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
19137 (lang_decl_flags): Add vcall_offset.
19138 (THUNK_VCALL_OFFSET): Use it.
19139 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
19140 * method.c (make_thunk): Create the lang_decl here, not in
19141 emit_thunk.
19142 (emit_thunk): Make generic thunks into ordinary functions once
19143 they have been fed to expand_body.
19144 * semantics.c (expand_body): Set current_function_is_thunk here.
19145
19146 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19147
19148 * class.c (update_vtable_entry_for_fn): Prototype.
19149
19150 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
19151 and `tmpl'.
19152
19153 * search.c (dfs_build_inheritance_graph_order): Prototype.
19154
19155 2000-05-04 Mark Mitchell <mark@codesourcery.com>
19156
19157 * cp-tree.h (special_function_kind): Add various kinds of
19158 destructors.
19159 (special_function_p): New function.
19160 * class.c (overrides): Don't let one kind of destructor override
19161 another.
19162 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
19163 whether or not to instantiate a template.
19164 * tree.c (special_function_p): Define.
19165
19166 2000-05-03 Mark Mitchell <mark@codesourcery.com>
19167
19168 * cp-tree.def (THUNK_DECL): Remove.
19169 * cp-tree.h (DECL_THUNK_P): New macro.
19170 (DECL_NON_THUNK_FUNCTION_P): Likewise.
19171 (DECL_EXTERN_C_FUNCTION_P): Likewise.
19172 (SET_DECL_THUNK_P): Likewise.
19173 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
19174 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
19175 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
19176 * decl.c (decls_match): Use DECL_EXTERN_C_P.
19177 (duplicate_decls): Likewise.
19178 (pushdecl): Likewise. Adjust thunk handling.
19179 (grokfndecl): Use DECL_EXTERN_C_P.
19180 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
19181 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
19182 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
19183 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
19184 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
19185 DECL_NO_STATIC_CHAIN.
19186 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
19187 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
19188 * search.c (covariant_return_p): Remove THUNK_DECL handling.
19189 * ir.texi: Update.
19190
19191 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19192
19193 * tree.c (walk_tree): Set lineno.
19194
19195 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19196
19197 * exception.cc: Update license notice.
19198 * new.cc: Likewise.
19199 * new1.cc: Likewise.
19200 * new2.cc: Likewise.
19201 * tinfo.cc: Likewise.
19202 * tinfo2.cc: Likewise.
19203 * vec.cc: Likewise.
19204 * inc/cxxabi.h: Likewise.
19205 * inc/exception: Likewise.
19206 * inc/new: Likewise.
19207 * inc/new.h: Likewise.
19208 * inc/typeinfo: Likewise.
19209
19210 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
19211
19212 * tree.c (build_target_expr_with_type): If we already have a
19213 TARGET_EXPR, just return it.
19214
19215 * optimize.c (initialize_inlined_parameters): Don't generate an
19216 EXPR_STMT if we can just use DECL_INITIAL.
19217 * decl.c (emit_local_var): Only make the initialization a
19218 full-expression if stmts_are_full_exprs_p.
19219
19220 2000-05-01 Mark Mitchell <mark@codesourcery.com>
19221
19222 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
19223 macro.
19224 * call.c (standard_conversion): Use it.
19225 (direct_reference_binding): Likewise.
19226 (build_over_call): Likewise.
19227 (is_properly_derived_from): Likewise.
19228 (compare_ics): Likewise.
19229 * class.c (resolves_to_fixed_type_p): Likewise.
19230 * optimize.c (declare_return_variable): Likewise.
19231 * pt.c (is_specialization_of): Likewise.
19232 (unify): Likewise.
19233 * typeck.c (comp_target_parms): Likeiwse.
19234 (build_static_cast): Likewise.
19235 (build_reinterpret_cast): Likewise.
19236 (build_const_cast): Likewise.
19237 (comp_ptr_ttypes_real): Likewise.
19238 (comp_ptr_ttypes_const): Likewise.
19239 * typeck2.c (process_init_constructor): Likewise.
19240
19241 2000-04-30 Scott Snyder <snyder@fnal.gov>
19242
19243 * decl.c (finish_destructor_body): Use the base destructor when
19244 destroying virtual bases.
19245
19246 2000-04-30 Mark Mitchell <mark@codesourcery.com>
19247
19248 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
19249 STMT_EXPRs.
19250 * optimize.c (struct inline_data): Add target_exprs field.
19251 (declare_return_variable): When a function returns an aggregate,
19252 use the variable declared in the TARGET_EXPR as the remapped
19253 DECL_RESULT.
19254 (expand_call_inline): Update the pending target_exprs stack.
19255 (optimize_function): Initialize the stack.
19256
19257 * decl2.c (finish_file): Fix typo in comment.
19258
19259 * method.c (emit_thunk): Don't try to return a `void' value.
19260
19261 * optimize.c (initialize_inlined_parameters): If the parameter is
19262 addressable, we need to make a new VAR_DECL, even if the
19263 initializer is constant.
19264
19265 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
19266
19267 * decl.c (grok_op_properties): Add an extra check of argtypes.
19268
19269 2000-04-27 Mark Mitchell <mark@codesourcery.com>
19270
19271 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19272 variables.
19273 (initialize_inlined_parameters): Try to avoid creating new
19274 VAR_DECLs.
19275
19276 2000-04-27 Alex Samuel <samuel@codesourcery.com>
19277
19278 * lex.c (my_get_run_time): Remove.
19279 (init_filename_times): Use get_run_time instead of my_get_run_time.
19280 (check_newline): Likewise.
19281 (dump_time_statistics): Likewise.
19282 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19283 of computing elapsed time explicitly.
19284
19285 2000-04-26 Mark Mitchell <mark@codesourcery.com>
19286
19287 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19288 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19289 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19290 before calling decl_constant_value.
19291 * class.c (check_bitfield_decl): Likewise.
19292 * cvt.c (ocp_convert): Likewise.
19293 (convert): Likewise.
19294 * decl.c (compute_array_index_type): Likewise.
19295 (build_enumerator): Likewise.
19296 * decl2.c (check_cp_case_value): Likewise.
19297 * pt.c (convert_nontype_argument): Likewise.
19298 (tsubst): Likewise.
19299 * typeck.c (decay_conversion): Likewise.
19300 (build_compound_expr): Likewise.
19301 (build_reinterpret_cast): Likewise.
19302 (build_c_cast): Likewise.
19303 (convert_for_assignment): Likewise.
19304
19305 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
19306
19307 * decl.c (finish_function): Don't play games with DECL_INLINE.
19308
19309 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
19310
19311 * ir.texi: Correct typo.
19312
19313 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19314
19315 * decl.c (grokdeclarator): Reject VLAs as members.
19316
19317 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
19318
19319 * call.c (standard_conversion): Accept conversion between
19320 COMPLEX_TYPEs.
19321
19322 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19323
19324 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
19325
19326 * decl2.c (finish_file): Remove double setup for accounting
19327 compile time.
19328
19329 2000-04-24 Robert Lipe <robertlipe@usa.net>
19330
19331 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19332
19333 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
19334
19335 * new.cc (set_new_handler): Needs to be in std::.
19336
19337 2000-04-23 Mark Mitchell <mark@codesourcery.com>
19338
19339 * cp-tree.h (lang_decl): Remove pretty_function_p.
19340 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19341 language-specific node.
19342 * decl.c (cp_make_fname_decl): Use build_decl, not
19343 build_lang_decl, to build the variables.
19344 (grokvardecl): Don't call build_lang_decl for local variables in
19345 templates.
19346 (grokdeclarator): Don't call build_lang_decl for local type
19347 declarations in templates.
19348 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19349 zero'd memory, rather than calling memset.
19350 * pt.c: Include hashtab.h.
19351 (local_specializations): New variable.
19352 (retrieve_local_specialization): Use it.
19353 (register_local_specialization): Likewise.
19354 (tsubst_decl): Don't assume local variables have
19355 DECL_LANG_SPECIFIC.
19356 (instantiate_decl): Set up local_specializations.
19357 * Makefile.in (HTAB_H): New variable.
19358
19359 2000-04-23 Richard Henderson <rth@cygnus.com>
19360
19361 * typeck.c (c_expand_asm_operands): Restore the original
19362 contents of the output list.
19363
19364 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
19365
19366 * ir.texi: Document complex number representation.
19367
19368 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
19369
19370 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19371 (target_incomplete_p): New function.
19372 (tinfo_base_init): Create comdat NTBS name variable.
19373 (ptr_initializer): Add non_public parameter. Calculate it.
19374 (ptmd_initializer): Likewise.
19375 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19376 (create_real_tinfo_var): Add non_public parameter. Use it.
19377 Push proxy into global namespace.
19378 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19379 New enumeration.
19380 * inc/typeinfo (type_info::before, type_info::operator==):
19381 Compare __name addresses.
19382
19383 * tinfo2.cc: Remove new-abi builtins comment.
19384
19385 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
19386
19387 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19388
19389 * call.c (joust): Exit early if we get the same function, too.
19390
19391 * decl2.c (key_method): Return NULL_TREE for template classes.
19392 (import_export_class): Don't need to check for template classes.
19393
19394 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
19395
19396 * lex.c: Remove references to cccp.c.
19397
19398 2000-04-18 Mark Mitchell <mark@codesourcery.com>
19399
19400 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19401 volatile_memfunc. Add destructor_attr. Adjust dummy.
19402 (DECL_DESTRUCTOR_P): Use destructor_attr.
19403 (DECL_CONST_MEMFUNC_P): Reimplement.
19404 (DECL_VOLATILE_MEMFUNC_P): Remove.
19405 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19406 (overrides): Use DECL_DESTRUCTOR_P.
19407 (check_for_override): Likewise.
19408 * decl.c (start_function): Likewise.
19409 * decl2.c (grokfclassfn): Likewise.
19410 (check_classfn): Likewise.
19411 (grok_function_init): Likewise.
19412
19413 2000-04-17 Mark Mitchell <mark@codesourcery.com>
19414
19415 * decl2.c (grokfield): Issue error on illegal data member
19416 declaration.
19417
19418 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
19419
19420 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19421
19422 2000-04-16 Mark Mitchell <mark@codesourcery.com>
19423
19424 * class.c (build_vtable_entry): Don't build thunks for type-info
19425 functions.
19426
19427 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
19428
19429 * decl.c (decls_match): Allow a redeclaration of a builtin to
19430 specify args while the builtin did not.
19431
19432 2000-04-15 Mark Mitchell <mark@codesourcery.com>
19433
19434 * cp-tree.def (THUNK_DECL): Add to documentation.
19435 * cp-tree.h (flag_huge_objects): Declare.
19436 * class.c (modify_vtable_entry): Tidy.
19437 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19438 Calculate delta appropriately for the new ABI.
19439 (dfs_modify_vtables): Use it.
19440 (modify_all_vtables): Fix thinko in code to add overriding copies
19441 of functions to primary vtables.
19442 (build_clone): Fix typo in comment.
19443 (clone_function_decl): Correct order of destructors in vtable.
19444 (build_vbase_offset_vtbl_entries): Adjust comment.
19445 (dfs_vcall_offset_queue_p): Remove.
19446 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19447 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19448 (build_vtable_entry): Correct check for pure virtual functions.
19449 Don't declare flag_huge_objects.
19450 * decl.c (flag_huge_objects): Remove declaration.
19451 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19452 Use int_size_in_bytes.
19453 (emit_thunk): Handle vcall offset thunks.
19454
19455 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19456
19457 * decl2.c (parse_time, varconst_time): Delete declarations.
19458 (finish_file): Delete LINENO declaration.
19459 START_TIME and THIS_TIME now long.
19460
19461 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
19462
19463 * class.c (build_base_field): Reformat comment.
19464
19465 * inc/cxxabi.h (stddef.h): Comment inclusion.
19466 (__base_class_info::__offset): Comment shift.
19467
19468 2000-04-12 Mark Mitchell <mark@codesourcery.com>
19469
19470 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19471 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19472 (cp_push_exception_identifier): New macro.
19473 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19474 (DECL_BASE_DESTRUCTOR_P): Likewise.
19475 (DECL_DELETING_DESTRUCTOR_P): Likewise.
19476 (get_vtbl_decl_for_binfo): Fix formatting.
19477 (in_charge_arg_for_name): New macro.
19478 (maybe_build_cleanup_and_delete): Remove declaration.
19479 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19480 (in_charge_arg_for_name): New function.
19481 (build_new_method_call): Use it. Handle cloned destructors.
19482 (build_clone): Don't make the base constructor virtual.
19483 Automatically defer generated functions.
19484 (clone_function_decl): Handle destructors, too.
19485 (clone_constructors_and_destructors): Likewise.
19486 (create_vtable_ptr): Don't create a vtable entry for a cloned
19487 function.
19488 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19489 (initialize_predefined_identifiers): Update appropriately.
19490 (finish_destructor_body): Simplify.
19491 (maybe_build_cleanup_and_delete): Remove.
19492 * except.c (expand_throw): Handle new-ABI destructors.
19493 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19494 (build_dtor_call): New function.
19495 (build_delete): Use it. Simplify.
19496 * optimize.c (maybe_clone_body): Handle destructors.
19497 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19498
19499 * exception.cc (cleanup_fn): New typedef.
19500 (CALL_CLEANUP): New macro.
19501 (cp_eh_info): Use them.
19502 (__cp_push_exception): Likewise.
19503 (__cp_pop_exception): Likewise.
19504
19505 2000-04-11 Mark Mitchell <mark@codesourcery.com>
19506
19507 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19508 (complete_dtor_identifier): New macro.
19509 (CLASSTYPE_FIRST_CONVERSION): Remove.
19510 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19511 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19512 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19513 (CLASSTYPE_CONSTRUCTORS): Likewise.
19514 (CLASSTYPE_DESTRUCTORS): Likewise.
19515 (lang_decl): Add cloned_function.
19516 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19517 (DECL_BASE_CONSTRUCTOR_P): Likewise.
19518 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19519 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19520 (DECL_CLONED_FUNCTION_P): Likewise.
19521 (DECL_CLONED_FUNCTION): Likewise.
19522 (clone_function_decl): Declare.
19523 (maybe_clone_body): Likewise.
19524 * call.c (build_user_type_conversion_1): Call complete object
19525 constructors in the new ABI.
19526 (build_new_method_call): Don't add in-charge parameters under the
19527 new ABI.
19528 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19529 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19530 CLASSTYPE_DESTRUCTOR_SLOT.
19531 (build_clone): New function.
19532 (clone_function_decl): Likewise.
19533 (clone_constructors_and_destructors): Likewise.
19534 (check_bases_and_members): Use it.
19535 * decl.c (iniitialize_predefined_identifiers): Initialize
19536 complete_dtor_identifier.
19537 (finish_function): Don't add extra code to a clone.
19538 (lang_mark_tree): Mark cloned_function.
19539 * decl2.c (mark_used): Don't bother trying to instantiate things
19540 we synthesized.
19541 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19542 * method.c (set_mangled_name_for_decl): Don't treat clones as
19543 constructors.
19544 (synthesize_method): Sythesize cloned functions, not the clones.
19545 * optimize.c (inline_data): Update comment on ret_label.
19546 (remap_block): Don't assume DECL_INITIAL exists.
19547 (copy_body_r): Allow ret_label to be NULL.
19548 (maybe_clone_body): Define.
19549 * pt.c (tsubst_decl): Handle clones.
19550 (instantiate_clone): New function.
19551 (instantiate_template): Use it.
19552 (set_mangled_name_for_template_decl): Don't treat clones as
19553 constructors.
19554 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19555 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19556 * semantics.c (expand_body): Clone function bodies as necessary.
19557
19558 * optimize.c (remap_decl): Avoid sharing structure for arrays
19559 whose size is only known at run-time.
19560 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19561
19562 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19563 to has_in_charge_parm_p.
19564 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19565 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19566 (DECL_COPY_CONSTRUCTOR_P): New macro.
19567 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19568 (build_user_type_conversion_1): Likewise.
19569 (convert_like_real): Likewise.
19570 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
19571 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19572 (copy_args_p): Likewise.
19573 (grok_ctor_properties): Likewise.
19574 (start_function): Likewise.
19575 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
19576 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19577 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19578 * method.c (do_build_copy_constructor): Use
19579 DECL_HAS_IN_CHARGE_PARM_P.
19580 (synthesize_method): Likewise.
19581 * pt.c (instantiate_template): Remove goto.
19582 * tree.c (build_cplus_method_type): Remove mention of obstacks in
19583 comment.
19584
19585 * cp-tre.h (finish_function): Change prototype.
19586 * decl.c (end_cleanup_fn): Adjust caller.
19587 (finish_function): Take only one parameter.
19588 * decl2.c (finish_objects): Adjust caller.
19589 (finish_static_storage_duration_function): Likewise.
19590 * method.c (emit_thunk): Likewise.
19591 * parse.y: Likewise.
19592 * parse.c: Regenerated.
19593 * pt.c (instantiate_decl): Likewise.
19594 * rtti.c (synthesize_tinfo_fn): Likewise.
19595 * semantics.c (expand_body): Likewise.
19596
19597 * cp-tree.h (copy_decl): New function.
19598 * class.c (finish_struct_1): Use it.
19599 * lex.c (copy_decl): Define it.
19600 * pt.c (tsubst_decl): Likewise.
19601 * tree.c (copy_template_template_parm): Likewise.
19602
19603 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19604 has_nonpublic_assign_ref.
19605 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19606 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19607 * class.c (finish_struct_methods): Don't set
19608 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19609 (interface_only): Don't declare.
19610 (interface_unknown): Likewise.
19611
19612 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19613
19614 * tree.h (HAVE_TEMPLATES): Remove definition.
19615 * lang-options.h (-fthis-is-variable): Remove documentation.
19616
19617 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
19618
19619 * class.c (instantiate_type): Handle object-relative template-id.
19620
19621 * semantics.c (finish_expr_stmt): Call convert_to_void here.
19622 * decl.c (cplus_expand_expr_stmt): Not here.
19623
19624 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19625 Initialize exprtype earlier.
19626
19627 * parse.y (fn.def1): Check for defining types in return types.
19628
19629 * decl.c (check_tag_decl): Notice extra fundamental types.
19630 Diagnose empty decls in classes, too.
19631
19632 * decl.c (grokdeclarator): Don't override an anonymous name if no
19633 declarator was given.
19634
19635 * cvt.c (convert_to_void): Call resolve_offset_ref.
19636
19637 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19638
19639 * decl2.c (decl_namespace): Handle getting a type.
19640
19641 * typeck.c (build_c_cast): Re-enable warning for cast between
19642 pointer and integer of different size.
19643
19644 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
19645
19646 * inc/cxxabi.h (__pointer_type_info): Add restrict and
19647 incomplete flags.
19648 (__pointer_type_info::__pointer_catch): New virtual function.
19649 (__pointer_to_member_type_info): Derive from
19650 __pointer_type_info. Adjust.
19651 (__pointer_to_member_type_info::__do_catch): Remove.
19652 (__pointer_to_member_type_info::__is_pointer_p): Declare.
19653 (__pointer_to_member_type_info::__pointer_catch): Declare.
19654 * rtti.c (qualifier_flags): Add restrict flag.
19655 (ptmd_initializer): Reorder members.
19656 (create_tinfo_types): Expand comments. Reorder
19657 ptmd_desc_type_node members.
19658 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19659 Implement.
19660 (__pointer_type_info::__do_catch): Move specific code into
19661 __pointer_catch. Call it.
19662 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19663 specific catch checking. Fix void conversion check.
19664 (__pointer_to_member_type_info::__do_catch): Remove.
19665 (__pointer_to_member_type_info::__pointer_catch): Implement.
19666
19667 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19668
19669 * lex.c (init_parse): Remove traces of classof and headof.
19670 * decl2.c (flag_operator_names): Default to 1.
19671 (lang_decode_option): Do not set it for -ansi.
19672
19673 2000-04-09 Mark Mitchell <mark@codesourcery.com>
19674
19675 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19676 (DECL_MAIN_VARIANT): Remove.
19677 * decl.c (duplicate_decls): Don't set it.
19678 (start_function): Likewise.
19679 (lang_mark_tree): Don't mark it.
19680 * decl2.c (defer_fn): Don't use it.
19681 * lex.c (retrofit_lang_decl): Don't set it.
19682 * pt.c (tsubst_decl): Likewise.
19683 * ptree.c (print_lang_decl): Don't print it.
19684 * typeck.c (mark_addressable): Don't use it.
19685
19686 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19687
19688 * vec.cc: Include <new> and <exception>.
19689 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19690 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19691 terminate.
19692 (__cxa_vec_delete): Catch dtor exceptions.
19693
19694 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19695
19696 Prepend __ to implementation defined names.
19697 * inc/typeinfo (type_info): Rename _name to __name.
19698 (type_info::type_info): Rename parameter.
19699 (type_info::operator==, type_info::operator!=,
19700 type_info::before): Likewise.
19701 (type_info::is_pointer_p, type_info::is_function_p,
19702 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19703 parameters.
19704 * inc/cxxabi.h
19705 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19706 (__pointer_type_info::__pointer_type_info): Likewise.
19707 (__pointer_type_info::is_pointer_p,
19708 __pointer_type_info::do_catch): Prepend __. Rename parameters.
19709 (__array_type_info::__array_type_info): Rename parameters.
19710 (__function_type_info::__function_type_info): Likewise.
19711 (__function_type_info::is_function_p): Prepend __.
19712 (__enum_type_info::__enum_type_info): Rename parameters.
19713 (__pointer_to_member_type_info::__pointer_to_member_type_info):
19714 Likewise.
19715 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19716 parameters.
19717 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19718 (__class_type_info::__class_type_info): Rename parameters.
19719 (__class_type_info::sub_kind): Prepend __. Adjust member names.
19720 (__class_type_info::upcast_result,
19721 __class_type_info::dyncast_result): Prepend __. Move definition
19722 into tinfo.cc.
19723 (__class_type_info::do_upcast, __class_type_info::do_catch,
19724 __class_type_info::find_public_src,
19725 __class_type_info::do_dyncast,
19726 __class_type_info::do_find_public_src): Prepend __. Rename
19727 parameters.
19728 (__si_class_type_info::__si_class_type_info): Rename parameters.
19729 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19730 __si_class_type_info::do_find_public_src): Prepent __. Rename
19731 parameters.
19732 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19733 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19734 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19735 parameters.
19736 (__dynamic_cast): Rename parameters.
19737 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19738 type_info::do_catch, type_info::do_upcast): Prepend __.
19739 (contained_p, public_p, virtual_p, contained_public_p,
19740 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19741 (__class_type_info::do_catch,
19742 __class_type_info::do_upcast): Prepend __. Adjust.
19743 (__class_type_info::__upcast_result,
19744 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19745 Adjust.
19746 (__class_type_info::find_public_src): Prepend __. Adjust.
19747 (__class_type_info::do_find_public_src,
19748 __si_class_type_info::do_find_public_src,
19749 __vmi_class_type_info::do_find_public_src): Likewise.
19750 (__class_type_info::do_dyncast,
19751 __si_class_type_info::do_dyncast,
19752 __vmi_class_type_info::do_dyncast): Likewise.
19753 (__class_type_info::do_upcast,
19754 __si_class_type_info::do_upcast,
19755 __vmi_class_type_info::do_upcast): Likewise.
19756 (__dynamic_cast): Adjust.
19757 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19758 (__function_type_info::is_function_p): Likewise.
19759 (__pointer_type_info::do_catch): Likewise. Adjust.
19760 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19761 (__throw_type_match_rtti_2): Adjust.
19762 (__is_pointer): Adjust.
19763
19764 2000-04-08 Mark Mitchell <mark@codesourcery.com>
19765
19766 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19767 (complete_ctor_identifier): New macro.
19768 (special_function_kind): Add sfk_copy_constructor and
19769 sfk_assignment_operator.
19770 (LOOKUP_HAS_IN_CHARGE): Remove.
19771 (cons_up_default_function): Rename to ...
19772 (implicitly_declare_fn): ... this.
19773 * call.c (build_new_method_call): Add in-charge parameters for
19774 constructors here.
19775 * class.c (add_implicitly_declared_members): Change parameter name
19776 from cant_have_assignment to cant_have_const_assignment.
19777 Replace calls to cons_up_default_function to implicitly_declare_fn.
19778 * cvt.c (ocp_convert): Use complete_ctor_identifier.
19779 * decl.c (initialize_predefined_identifiers): Initialize it.
19780 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19781 complex expression.
19782 * init.c (expand_default_init): Don't calculate the in-charge
19783 parameter here.
19784 (build_new_1): Likewise.
19785 * lex.c (cons_up_default_function): Move to method.c.
19786 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19787 (implicitly_declare_fn): New function.
19788 * typeck.c (build_static_cast): Use complete_ctor_identifier.
19789 (build_modify_expr): Likewise.
19790 * typeck2.c (build_functional_cast): Likewise.
19791
19792 Under the new ABI, constructors don't return `this'.
19793 * cp-tree.h (warn_reorder): Declare.
19794 (special_function_kind): New enum.
19795 (global_base_init_list): Remove declaration.
19796 (emit_base_init): Don't return a value.
19797 (check_base_init): Don't declare.
19798 (is_aggr_typedef): Likewise.
19799 * decl.c (check_special_function_return_type): New function.
19800 (return_types): Remove.
19801 (grokdeclarator): Use check_special_function_return_type.
19802 (start_function): Don't initialize ctor_label under the new ABI.
19803 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19804 * init.c (begin_init_stmts): Move to top of file.
19805 (finish_init_stmts): Likewise.
19806 (warn_reorder): Don't declare.
19807 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
19808 value.
19809 (check_base_init): Remove.
19810 (is_aggr_typedef): Likewise.
19811 (build_new_1): Don't use the return value of a constructor.
19812 * semantics.c (setup_vtbl_ptr): Don't use the return value
19813 of emit_base_init.
19814 * typeck.c (check_return_expr): Don't magically convert return
19815 statements into `return this' in constructors under the new ABI.
19816
19817 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19818 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19819 (base_ctor_identifier): New macro.
19820 (base_dtor_identifier): Likewise.
19821 (deleting_dtor_identifier): Likewise.
19822 * decl.c: Don't include obstack.h.
19823 (obstack_chunk_alloc): Don't define.
19824 (obstack_chunk_free): Likewise.
19825 (struct predefined_identifier): New type.
19826 (initialize_predefined_identifiers): New function.
19827 (init_decl_processing): Use it.
19828 (debug_temp_inits): Remove.
19829 (start_method): Don't call preserve_data.
19830 (hack_incomplete_structures): Update comment.
19831 * init.c (init_init_processing): Don't initialize
19832 nelts_identifier.
19833 (build_offset_rf): Remove dead code.
19834 (build_delete): Use CLASSTYPE_N_BASECLASSES.
19835 * search.c (init_search_processing): Don't initialize
19836 vptr_identifier.
19837
19838 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19839
19840 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19841 some sign_compare warnings.
19842
19843 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19844
19845 Rename abi::__vmi_class_type_info members.
19846 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19847 base_list, detail_masks members to vmi_flags, vmi_base_count,
19848 vmi_bases and vmi_flags_masks respectively.
19849 (__vmi_class_type_info::vmi_flags_masks): Rename
19850 details_unknown_mask to flags_unknown_mask.
19851 * tinfo.cc (__class_type_info::do_upcast): Adjust.
19852 (__vmi_class_type_info::do_find_public_src): Adjust.
19853 (__vmi_class_type_info::do_dyncast): Adjust.
19854 (__vmi_class_type_info::do_upcast): Adjust.
19855
19856 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19857
19858 * tinfo.cc (convert_to_base): New function.
19859 (get_vbase_offset): Remove. Move into convert_to_base.
19860 (__vmi_class_type_info::do_find_public_src): Adjust.
19861 (__vmi_class_type_info::do_dyncast): Adjust.
19862 (__vmi_class_type_info::do_upcast): Adjust.
19863
19864 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
19865
19866 * tinfo.cc (operator=): Use __builtin_strcmp.
19867 * tinfo2.cc (before): Likewise.
19868
19869 2000-04-06 Mark Mitchell <mark@codesourcery.com>
19870
19871 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19872 (DECL_SAVED_INLINE): Rename to ...
19873 (DECL_DEFERRED_FN): ... this.
19874 (in_function_p): Remove declaration.
19875 (mark_inline_for_output): Rename to ...
19876 (defer_fn): ... this.
19877 * decl.c (finish_function): Adjust call to mark_inline_for_output.
19878 (in_function_p): Remove definition.
19879 * decl2.c (saved_inlines): Rename to ...
19880 (deferred_fns): ... this.
19881 (saved_inlines_used): Rename to ...
19882 (deferred_fns_used): ... this.
19883 (mark_inline_for_output): Rename to ...
19884 (defer_fn): ... this.
19885 (finish_file): Adjust accordingly.
19886 (init_decl2): Likewise.
19887 * lex.c (cons_up_default_function): Likewise.
19888 * pt.c (mark_decl_instantiated): Likewise.
19889 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19890 circumstances.
19891 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19892 * semantics.c (expand_body): Defer more functions.
19893
19894 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19895
19896 * vec.cc: New file.
19897 * Make-lang.in (CXX_LIB2FUNCS): Add it.
19898 (vec.o): Build it.
19899 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19900 __cxa_vec_delete): Declare.
19901
19902 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19903
19904 * rtti.c (dfs_class_hint_mark): New static function.
19905 (dfs_class_hint_unmark): New static function.
19906 (class_hint_flags): Use them.
19907
19908 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
19909
19910 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19911
19912 2000-04-05 Mark Mitchell <mark@codesourcery.com>
19913
19914 * cp-tree.h (instantiate_decl): Change prototype.
19915 * decl2.c (mark_used): Adjust call.
19916 * optimize.c (inlinable_function_p): Adjust handling of templates.
19917 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19918 (do_type_instantiation): Likewise.
19919 (instantiate_decl): Defer more templates.
19920 (instantiate_pending_templates): Adjust logic to handle inline
19921 friend functions.
19922
19923 * Makefile.in (GGC_H): New variable. Use it throughout in place
19924 of ggc.h.
19925
19926 * call.c: Don't include obstack.h. Include ggc.h.
19927 (obstack_chunk_alloc): Don't define.
19928 (obstack_chunk_free): Likewise.
19929 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19930 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19931 (pop_switch): Free it.
19932
19933 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19934
19935 * dump.c (dequeue_and_dump): Don't try to print the bit_position
19936 if we don't have a DECL_FIELD_OFFSET.
19937
19938 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
19939
19940 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19941 special_function_p.
19942
19943 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19944
19945 * cfns.gperf (hash, libc_name_p): Prototype.
19946
19947 * rtti.c (build_dynamic_cast_1): Constification.
19948
19949 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19950
19951 * semantics.c (deferred_type_access_control): Prototype.
19952
19953 2000-04-04 Mark Mitchell <mark@codesourcery.com>
19954
19955 Correct many new ABI issues regarding vbase and vcall offset
19956 layout.
19957 * cp-tree.h (BINFO_VTABLE): Document.
19958 (struct lang_type): Tweak formatting.
19959 (BINFO_PRIMARY_BINFO): Add to documentation.
19960 (CLASSTYPE_VSIZE): Fix typo in comment.
19961 (CLASSTYPE_VBASECLASSES): Update documentation.
19962 (BINFO_VBASE_MARKED): Remove.
19963 (SET_BINFO_VBASE_MARKED): Likewise.
19964 (CLEAR_BINFO_VBASE_MARKED): Likewise.
19965 (BINFO_FIELDS_MARKED): Remove.
19966 (SET_BINFO_FIELDS_MARKED): Likewise.
19967 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19968 (enum access_kind): New enumeration.
19969 (num_extra_vtbl_entries): Remove declaration.
19970 (size_extra_vtbl_entries): Likewise.
19971 (get_vtbl_decl_for_binfo): New function.
19972 (dfs_vbase_unmark): Remove declaration.
19973 (mark_primary_bases): Likewise.
19974 * class.c (SAME_FN): Remove.
19975 (struct vcall_offset_data_s): Move definition.
19976 (build_vbase_pointer): Use `build', not `build_binary_op', to
19977 access the vbase pointer under the new ABI.
19978 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19979 (build_primary_vtable): Likewise.
19980 (dfs_mark_primary_bases): Move here from search.c.
19981 (mark_primary_bases): Likewise.
19982 (determine_primary_bases): Under the new ABI, don't make a base
19983 class a primary base just because we don't yet have any virtual
19984 functions.
19985 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19986 (num_vfun_entries): Remove.
19987 (dfs_count_virtuals): Likewise.
19988 (num_extra_vtbl_entries): Likewise.
19989 (size_extra_vtbl_entries): Likewise.
19990 (layout_virtual_bases): Iterate in inheritance graph order under
19991 the new ABI.
19992 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19993 indicate that a vfield is present.
19994 (init_class_processing): Initialize access_public_node, etc., from
19995 ak_public, etc.
19996 (get_vtbl_decl_for_binfo): New function.
19997 (dump_class_hierarchy_r): Likewise.
19998 (dump_class_hierarchy): Use it.
19999 (finish_vtbls): Build the vtbls in inheritance graph order.
20000 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
20001 (initialize_vtable): Use get_vtbl_decl_for_binfo.
20002 (accumulate_vtbl_inits): Add comments explaining why a pre-order
20003 walk is required.
20004 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
20005 where the vptr points, even for primary vtables.
20006 (build_vtbl_initializer): Adjust handling of vbase and vcall
20007 offsets.
20008 (build_vcall_and_vbase_vtable_entries): New function.
20009 (dfs_build_vbase_offset_vtbl_entries): Remove.
20010 (build_vbase_offset_vtbl_entries): Reimplement.
20011 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
20012 were already handled in a primary base class vtable.
20013 (build_vcall_offset_vtbl_entries): Adjust.
20014 (build_rtti_vtbl_entries): Adjust.
20015 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
20016 * init.c (expand_virtual_init): Simplify.
20017 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
20018 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
20019 * search.c (BINFO_ACCESS): New macro.
20020 (SET_BINFO_ACCESS): Likewise.
20021 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
20022 (access_in_type): Likewise.
20023 (dfs_accessible_p): Likewise.
20024 (protected_accessible_p): Likewise.
20025 (lookup_fnfields_1): Adjust documentation.
20026 (dfs_mark_primary_bases): Move to class.c
20027 (mark_primary_bases): Likewise.
20028 (dfs_vbase_unmark): Remove.
20029 (virtual_context): Use BINFO_FOR_VBASE.
20030 (dfs_get_vbase_types): Simplify.
20031 (dfs_build_inheritance_graph_order): New function.
20032 (get_vbase_types): Use it.
20033 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
20034
20035 * tinfo.cc (get_vbase_offset): New function.
20036 (__vmi_class_type_info::do_find_public_src): Use it.
20037 (__vmi_class_type_info::do_dyncast): Likewise.
20038 (__vmi_class_type_info::do_upcast): Likewise.
20039
20040 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
20041
20042 * lang-specs.h: Pass -fno-show-column to the preprocessor.
20043
20044 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
20045
20046 * rtti.c (class_hint_flags): Rename flags.
20047 (class_initializer): Remove flags.
20048 (synthesize_tinfo_var): Combine offset and flags. Add flags
20049 for __vmi_class_type_info.
20050 (create_tinfo_types): Remove flags from __class_type_info and
20051 __si_class_type_info. Merge flags and offset from
20052 base_class_type_info.
20053 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
20054 (__base_class_info::is_virtual_p): Adjust.
20055 (__base_class_info::is_public_p): Adjust.
20056 (__base_class_info::offset): New accessor.
20057 (__class_type_info::details): Remove member.
20058 (__class_type_info::__class_type_info): Lose details.
20059 (__class_type_info::detail_masks): Remove.
20060 (__si_class_type_info::__si_class_type_info): Lose details.
20061 (__vmi_class_type_info::details): New member.
20062 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
20063 (__vmi_class_type_info::detail_masks): New member.
20064 * tinfo.cc (__class_type_info::do_upcast): Initialize result
20065 with unknown_details_mask.
20066 (__vmi_class_type_info::do_find_public_src): Adjust
20067 (__vmi_class_type_info::do_dyncast): Adjust.
20068 (__vmi_class_type_info::do_upcast): Set result details, if
20069 needed. Adjust.
20070 (__dynamic_cast): Temporarily #if out optimization.
20071
20072 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
20073
20074 * rtti.c (get_tinfo_decl): Mark used.
20075 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
20076 mark as dealt with, if we output it.
20077
20078 2000-03-28 Mark Mitchell <mark@codesourcery.com>
20079
20080 * class.c: Reorganize to put virtual function table initialization
20081 machinery at the end of the file.
20082
20083 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
20084
20085 * class.c (finish_struct): Use bitsize_zero_node.
20086 * pt.c (instantiate_class_template): Likewise.
20087
20088 2000-03-28 Mark Mitchell <mark@codesourcery.com>
20089
20090 Put RTTI entries at negative offsets in new ABI.
20091 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
20092 vbase offset at index -3, not -1.
20093 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
20094 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
20095 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
20096 (build_rtti_vtbl_entries): New function.
20097 (set_rtti_entry): Remove.
20098 (build_primary_vtable): Don't use it.
20099 (build_secondary_vtable): Likewise.
20100 (start_vtable): Remove.
20101 (first_vfun_index): New function.
20102 (set_vindex): Likewise.
20103 (add_virtual_function): Don't call start_vtable. Do call
20104 set_vindex.
20105 (set_primary_base): Rename parameter.
20106 (determine_primary_base): Likewise.
20107 (num_vfun_entries): Don't use skip_rtti_stuff.
20108 (num_extra_vtbl_entries): Include RTTI information.
20109 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
20110 (skip_rtti_stuff): Remove.
20111 (dfs_modify_vtables): Don't use it.
20112 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
20113 (layout_nonempty_base_or_field): Update size handling.
20114 (create_vtable_ptr): Tweak.
20115 (layout_class_type): Adjust parameter names.
20116 (finish_struct_1): Simplify.
20117 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
20118 (skip_rtti_stuff): Remove.
20119 (first_vfun_index): New function.
20120 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
20121 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
20122 (marked_vtable_pathp): Declare.
20123 (unmarked_vtable_pathp): Likewise.
20124 * error.c (dump_expr): Use first_vfun_index to calculate vtable
20125 offsets.
20126 * rtti.c (build_headof): Look for RTTI at negative offsets.
20127 (get_tinfo_decl_dynamic): Likewise.
20128 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
20129 here.
20130 (create_pseudo_type_info): Do it here instead. Adjust so that
20131 vptr points at first virtual function.
20132 * search.c (marked_vtable_pathp): Make it global.
20133 (unmarked_vtable_pathp): Likewise.
20134 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
20135 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20136 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
20137 (get_pure_virtuals): Likewise.
20138 (expand_upcast_fixups): Likewise.
20139 * tree.c (debug_binfo): Likewise.
20140 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
20141 negative offset.
20142
20143 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20144
20145 * class.c (check_field_decl): Fix typo.
20146 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
20147 (check_methods): Likewise.
20148 (check_field_decls): Likewise.
20149 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
20150 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
20151 Use DECL_RESULT_FLD, not DECL_RESULT.
20152 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
20153 * lex.c (identifier_type): Likewise.
20154 * pt.c (determine_specialization, lookup_template_class): Likewise.
20155 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
20156 (resolve_overloaded_unification, more_specialized): Likewise.
20157 * semantics.c (finish_member_declaration): Likewise.
20158 * typeck.c (build_x_function_call): Likewise.
20159
20160 2000-03-26 Mark Mitchell <mark@codesourcery.com>
20161
20162 * class.c (layout_empty_base): Handle empty bases with non-byte
20163 alignment.
20164 (build_base_field): Likewise.
20165 (layout_virtual_bases): Likewise.
20166
20167 * class.c (finish_struct_1): Fix typo in this change:
20168
20169 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20170
20171 2000-03-25 Mark Mitchell <mark@codesourcery.com>
20172
20173 * decl.c (grokdeclarator): Count partial specializations when
20174 keeping track of how many template classes have been seen.
20175
20176 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
20177
20178 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20179
20180 * class.c (build_vbase_pointer_fields): layout_field now place_field.
20181 (get_vfield_offset): Use byte_position.
20182 (set_rtti_entry): Set OFFSET to ssizetype zero.
20183 (get_binfo_offset_as_int): Deleted.
20184 (dfs_record_base_offsets): Use tree_low_cst.
20185 (dfs_search_base_offsets): Likewise.
20186 (layout_nonempty_base_or_field): Reflect changes in RLI format
20187 and call byte_position.
20188 (layout_empty_base): Convert offset to ssizetype.
20189 (build_base_field): use rli_size_unit_so_far.
20190 (dfs_propagate_binfo_offsets): Do computation in proper type.
20191 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
20192 (layout_class_type): Reflect changes in RLI names and fields.
20193 (finish_struct_1): Set DECL_FIELD_OFFSET.
20194 * dump.c (dequeue_and_dump): Call bit_position.
20195 * expr.c (cplus_expand_constant): Use byte_position.
20196 * rtti.c (expand_class_desc): Use bitsize_one_node.
20197 * typeck.c (build_component_addr): Use byte_position and don't
20198 special case for zero offset.
20199
20200 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
20201
20202 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
20203
20204 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
20205 tinfo object.
20206 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
20207 vtable.
20208
20209 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20210
20211 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
20212 DECL_P macros.
20213 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
20214 make_typename_type, check_initializer, cp_finish_decl,
20215 xref_tag): Likewise.
20216 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
20217 decl_namespace, arg_assoc_template_arg, arg_assoc,
20218 validate_nonmember_using_decl, do_class_using_decl): Likewise.
20219 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
20220 args_to_string): Likewise.
20221 * friend.c (is_friend): Likewise.
20222 * lex.c (note_got_semicolon, note_list_got_semicolon,
20223 is_global): Likewise.
20224 * method.c (build_overload_nested_name, build_overload_value,
20225 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
20226 * parse.y (typename_sub, typename_sub1): Likewise.
20227 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
20228 process_partial_specialization, convert_template_argument,
20229 template_args_equal, add_pending_template, lookup_template_class,
20230 for_each_template_parm_r, maybe_fold_nontype_arg,
20231 tsubst, instantiate_template, type_unification_real, unify,
20232 instantiate_pending_templates, set_mangled_name_for_template_decl):
20233 Likewise.
20234 * repo.c (repo_get_id, repo_template_used): Likewise.
20235 * search.c (lookup_field_1): Likewise.
20236 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
20237 * xref.c (classname): Likewise.
20238
20239 2000-03-22 Mark Mitchell <mark@codesourcery.com>
20240
20241 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
20242 (CANONICAL_BINFO): New macro.
20243 (BINFO_NEW_VTABLE_MARKED): Use it.
20244 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
20245 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
20246 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
20247 not TREE_TYPE.
20248 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20249 (build_secondary_vtable): Likewise.
20250 (dfs_finish_vtbls): Likewise.
20251 (dfs_accumulate_vtbl_inits): Likewise.
20252 (accumulate_vtbl_inits): New function.
20253 (finish_vtbls): Make sure that virtual bases come after
20254 non-virtual bases in the vtable group.
20255 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
20256 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20257 * search.c (struct vbase_info): Move definition.
20258 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20259 (unmarked_new_vtable_p): Likewise.
20260 (dfs_mark_vtable_path): Remove.
20261 (dfs_mark_new_vtable): Remove.
20262 (dfs_unmark_new_vtable): Likewise.
20263 (dfs_clear_search_slot): Likewise.
20264 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20265 (dfs_clear_vbase_slots): Likewise.
20266 (init_vbase_pointers): LIkewise.
20267
20268 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
20269
20270 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20271 SIZETYPE to a non-SIZETYPE.
20272
20273 2000-03-21 Mark Mitchell <mark@codesourcery.com>
20274
20275 * class.c (layout_virtual_bases): Adjust names in conditionally
20276 compiled code.
20277
20278 * class.c (record_base_offsets): New function.
20279 (layout_conflict_p): Likewise.
20280 (layout_nonempty_base_or_field): Use it.
20281 (layout_empty_base): New function.
20282 (build_base_field): Use it.
20283 (build_base_fields): Update comment.
20284 (layout_virtual_bases): Fold in a little code form
20285 layout_basetypes. Use layout_empty_base.
20286 (layout_basetypes): Remove.
20287 (end_of_class): New function.
20288 (layout_class_type): Use it. Adjust.
20289
20290 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20291 (fntype_p): Remove.
20292 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20293 comment.
20294 (dfs_skip_nonprimary_vbases_markedp): Likewise.
20295 * typeck.c (fntype_p): Remove.
20296
20297 * cp-tree.h (TI_SPEC_INFO): Remove.
20298 (CLASSTYPE_TI_SPEC_INFO): Likewise.
20299 * pt.c (process_partial_specialization): Likewise.
20300
20301 * class.c (build_base_field): Fix thinko in computation of binfo
20302 offsets.
20303
20304 * tree.c (mark_local_for_remap_p): Mark variables declared in
20305 TARGET_EXPRs as well.
20306
20307 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20308
20309 * typeck.c (require_complete_type, complete_type,
20310 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20311 build_array_ref, convert_arguments, pointer_diff,
20312 build_x_unary_op, build_unary_op, build_c_cast,
20313 build_modify_expr): Use COMPLETE_TYPE_P etc.
20314 * call.c (is_complete, convert_like_real,
20315 build_new_method_call): Likewise.
20316 * class.c (build_vbase_pointer_fields, check_bases,
20317 build_base_field, finish_struct_1, pushclass): Likewise.
20318 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20319 * decl.c (maybe_process_template_type_declaration, pushtag,
20320 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20321 layout_var_decl, check_initializer, cp_finish_decl,
20322 grokdeclarator, require_complete_types_for_parms,
20323 grok_op_properties, xref_tag, xref_basetypes,
20324 check_function_type): Likewise.
20325 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20326 * friend.c (do_friend): Likewise.
20327 * init.c (build_offset_ref): Likewise.
20328 * parse.y (structsp): Likewise.
20329 * pt.c (maybe_process_partial_specialization,
20330 tsubst_friend_function, instantiate_class_template, tsubst,
20331 do_type_instantiation, instantiate_pending_templates): Likewise.
20332 * repo.c (repo_get_id): Likewise.
20333 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20334 synthesize_tinfo_var, emit_support_tinfos): Likewise.
20335 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20336 * semantics.c (begin_class_definition): Likewise.
20337 * tree.c (build_cplus_method_type): Likewise.
20338 * typeck2.c (digest_init, build_functional_cast,
20339 add_exception_specifier): Likewise.
20340 * parse.h, parse.c: Regenerated.
20341
20342 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20343
20344 * inc/cxxabi.h: New header file. Define new-abi entry points.
20345 (__pointer_type_info::target): Rename member to ...
20346 (__pointer_type_info::type): ... here.
20347 (__base_class_info::type): Rename member to ...
20348 (__base_class_info::base): ... here.
20349 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20350 * cp-tree.h (CPTI_ABI): New global tree enumeration.
20351 (abi_node): New global tree node.
20352 * decl.c (abi_node): Document.
20353 (init_decl_processing): Initialize abi_node.
20354 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20355 (get_vmi_pseudo_type_info): Likewise.
20356 (create_tinfo_types): Likewise.
20357 (emit_support_tinfos): Likewise.
20358 * tinfo.h (cxxabi.h): Include for new-abi.
20359 Move rtti class definitions to new header file.
20360 * tinfo.cc (abi): Use the namespace.
20361 (std): Move new abi rtti classes from here ...
20362 (__cxxabiv1): ... to here.
20363 * tinfo2.cc (cxxabi.h): Include for new-abi.
20364 Move rtti class definitions to new header file.
20365 (std): Move new abi rtti classes from here ...
20366 (__cxxabiv1): ... to here.
20367 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20368 namespace.
20369
20370 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20371 Jason Merrill <jason@casey.cygnus.com>
20372
20373 * method.c (build_overload_int): Use host_integerp.
20374
20375 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20376
20377 * init.c (build_offset_ref): Handle the case of a templated member
20378 function.
20379
20380 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20381
20382 * except.c (expand_exception_blocks): Clear catch_clauses_last.
20383
20384 2000-03-18 Mark Mitchell <mark@codesourcery.com>
20385
20386 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20387 * class.c (check_bitfield_decl): Turn illegal bitfields into
20388 non-bitfields.
20389 (dfs_propagate_binfo_offsets): Adjust for new size_binop
20390 semantics.
20391 (dfs_offset_for_unshared_vbases): Likewise.
20392 * cvt.c (cp_convert_to_pointer): Convert NULL to a
20393 pointer-to-member correctly under the new ABI.
20394 * expr.c (cplus_expand_constant): Don't use cp_convert when
20395 turning an offset into a pointer-to-member.
20396 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20397 when dereferencing them under the new ABI.
20398 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20399 of pointers-to-members under the new ABI.
20400
20401 * class.c (check_bitfield_decl): Remove restriction on really long
20402 bitfields.
20403 (layout_class_type): Implement new ABI handling of bitfields
20404 longer than their types.
20405
20406 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20407
20408 * parse.y (extdefs): Call ggc_collect.
20409 * parse.c: Regenerated.
20410
20411 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
20412
20413 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20414 (note_name_declared_in_class): Use OVL_CURRENT to get at a
20415 potential overload.
20416
20417 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20418
20419 * class.c (build_vbase_path): Use integer_zerop.
20420 (build_vtable_entry): Use tree_low_cst.
20421 (get_vfield_offset): Use bit_position.
20422 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20423 Use tree_low_cst.
20424 (check_bitfield_decl): Set DECL_SIZE using convert.
20425 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20426 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20427 Use tree_low_cst.
20428 (finish_struct_1): Use bit_position.
20429 (dump_class_hierarchy): Use tree_low_cst.
20430 * cp-tree.h (min_precision): Add declaration.
20431 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20432 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20433 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20434 * expr.c (cplus_expand_constant): Use bit_position.
20435 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20436 * rtti.c (get_base_offset): Use bit_position.
20437 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20438 host_integerp, and tree_low_cst.
20439 (pointer_int_sum): Use integer_zerop.
20440 (build_component_addr): Use bit_position.
20441
20442 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
20443
20444 * typeck.c (require_complete_type): Don't assume size_zero_node.
20445 (complete_type_or_else): Likewise.
20446
20447 2000-03-16 Steven Grady <grady@digitaldeck.com>
20448 Jason Merrill <jason@casey.cygnus.com>
20449
20450 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20451
20452 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
20453
20454 * decl2.c (grokfield): Bail out if type is error_mark_node.
20455
20456 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20457
20458 * tinfo2.cc (__ptr_to_member_data): Rename to ...
20459 (__pointer_to_member_data): ... here. Adjust.
20460 * rtti.c (create_tinfo_types): Adjust.
20461
20462 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20463
20464 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20465 * decl.c (ref_desc_type_node): Undocument.
20466 * rtti.c (ptr_ref_initializer): Rename to ...
20467 (ptr_initializer): ... here. Adjust comments.
20468 (ptmd_initializer): Fix comment thinko.
20469 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20470 (create_tinfo_types): Remove ref_desc_type_node init.
20471 * tinfo2.cc (__reference_type_info): Remove.
20472
20473 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20474
20475 * decl.c (cp_finish_decl): Remove obsolete comment.
20476
20477 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20478
20479 2000-03-14 Mark Mitchell <mark@codesourcery.com>
20480
20481 * cp-tree.h: Tweak documentation.
20482 * class.c (build_vbase_pointer_fields): Layout the fields, too.
20483 (avoid_overlap): Remove.
20484 (get_binfo_offset_as_int): New function.
20485 (dfs_serach_base_offsets): Likewise.
20486 (layout_nonempty_base_or_field): Likewise.
20487 (build_base_field): Layout fields here. Avoid placing two objects
20488 of the same type at the same address, under the new ABI.
20489 (build_base_fields): Adjust accordingly.
20490 (create_vtable_ptr): Return the new field, but don't attach it to
20491 TYPE_FIELDS.
20492 (remove_base_field): Remove.
20493 (remove_base_fields): Remove.
20494 (layout_basetypes): Adjust accordingly.
20495 (layout_class_type): Call layout_field for each field, rather than
20496 just making a wholesale call to layout_type.
20497
20498 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
20499
20500 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20501
20502 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
20503
20504 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20505
20506 * except.c (dtor_nothrow): New fn.
20507 (do_pop_exception): Use it. Take type parm.
20508 (push_eh_cleanup): Take type parm.
20509 (expand_start_catch_block): Pass it.
20510 (build_eh_type_type_ref): Accept null type.
20511
20512 2000-03-12 Mark Mitchell <mark@codesourcery.com>
20513
20514 * cp-tree.h (revert_static_member_fn): Change prototype.
20515 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20516 (grok_op_properties): Likewise.
20517 (start_function): Likewise.
20518 (revert_static_member_fn): Simplify.
20519 * pt.c (check_explicit_specialization): Adjust call to
20520 revert_static_member_fn.
20521
20522 2000-03-11 Mark Mitchell <mark@codesourcery.com>
20523
20524 * cp-tree.h (scope_kind): New type.
20525 (tmpl_spec_kind): Likewise.
20526 (declare_pseudo_global_level): Remove.
20527 (pseudo_global_level_p): Rename to template_parm_scope_p.
20528 (pushlevel): Remove declaration.
20529 (begin_scope): New function.
20530 (finish_scope): Likewise.
20531 (current_tmpl_spec_kind): Likewise.
20532 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20533 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
20534 Add template_spec_p.
20535 (toplevel_bindings_p): Adjust.
20536 (declare_pseudo_global_level): Remove.
20537 (pseudo_global_level_p): Rename to template_parm_scope_p.
20538 (current_tmpl_spec_kind): New function.
20539 (begin_scope): Likewise.
20540 (finish_scope): Likewise.
20541 (maybe_push_to_top_level): Adjust.
20542 (maybe_process_template_type_declaration): Likewise.
20543 (pushtag): Likewise.
20544 (pushdecl_nonclass_level): Likewise.
20545 (lookup_tag): Likewise.
20546 (grokfndecl): Handle member template specializations. Share
20547 constructor and non-constructor code.
20548 * decl2.c (check_classfn): Handle member template specializations.
20549 * pt.c (begin_template_parm_list): Use begin_scope.
20550 (begin_specialization): Likewise.
20551 (end_specialization): Likewise.
20552 (check_explicit_specialization): Use current_tmpl_spec_kind.
20553 Handle member template specializations.
20554 (end_template_decl): Use finish_scope. Remove call to
20555 get_pending_sizes.
20556 (push_template_decl_real): Remove bogus error message.
20557 (tsubst_decl): Fix typo in code contained in comment.
20558 (instantiate_template): Handle member template specializations.
20559 (most_general_template): Likewise.
20560
20561 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
20562
20563 * lex.c (whitespace_cr): Compress consecutive calls to warning().
20564 (do_identifier): Ditto for error().
20565
20566 * pt.c (convert_nontype_argument): Ditto for cp_error().
20567 (convert_template_argument): Ditto for cp_pedwarn().
20568
20569 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
20570
20571 * exception.cc (__check_null_eh_spec): New fn.
20572 * except.c (expand_end_eh_spec): Call it if the spec is throw().
20573
20574 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20575
20576 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20577 * except.c (expand_end_eh_spec): Add the return type.
20578 * rtti.c (throw_bad_cast): Add the parmtypes.
20579 (throw_bad_typeid): Likewise.
20580
20581 * semantics.c (expand_stmt): Only leave out rtl for unused
20582 artificials, and set DECL_IGNORED_P on them as well.
20583 * decl.c (wrapup_globals_for_namespace): Likewise.
20584
20585 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
20586
20587 * decl.c (maybe_commonize_var): Skip all artificial decls.
20588 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20589
20590 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20591
20592 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20593 * cp-tree.h: Declare flag_enforce_eh_specs.
20594 * decl.c (store_parm_decls, finish_function): Check it.
20595
20596 C library functions don't throw.
20597 * Makefile.in (cfns.h): New target.
20598 (except.o): Depend on it.
20599 * Make-lang.in (cc1plus): Depend on cfns.gperf.
20600 * cfns.gperf: New file.
20601 * cfns.h: Generated.
20602 * except.c: Include it.
20603 (nothrow_libfn_p): New fn.
20604 * decl.c (grokfndecl): Use it.
20605 * cp-tree.h: Declare it.
20606
20607 * decl.c (push_overloaded_decl_1, auto_function,
20608 define_function): Lose.
20609 (build_library_fn_1): New static fn.
20610 (builtin_function): Use it.
20611 (get_atexit_node): Use build_library_fn_ptr.
20612 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20613 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20614 push_void_library_fn, push_throw_library_fn): New fns.
20615 * cp-tree.h: Declare them.
20616 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20617 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20618 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20619 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20620 * rtti.c (build_runtime_decl): Lose.
20621 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20622 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20623 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20624
20625 * call.c (build_call): Remove result_type parm.
20626 Call mark_used on unused artificial fns.
20627 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20628
20629 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
20630
20631 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20632 appropriate.
20633 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20634 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20635 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20636 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20637 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20638 expand_generic_desc): Likewise.
20639
20640 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20641
20642 * exception.cc (__cp_pop_exception): Cleanup the original object.
20643
20644 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20645
20646 * decl.c (grok_op_properties): Merge conversion to void warning
20647 with other silly op warnings.
20648
20649 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
20650
20651 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20652 array CONSTRUCTOR elements. Don't use expr_tree_cons.
20653
20654 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20655
20656 * decl.c (cp_make_fname_decl): New function.
20657 (wrapup_globals_for_namespace): Don't emit unused static vars.
20658 (init_decl_processing): Remove comment about use of
20659 array_domain_type. Set make_fname_decl.
20660 (cp_finish_decl): Remove __FUNCTION__ nadgering.
20661 * semantics.c (begin_compound_stmt): Remove
20662 current_function_name_declared flagging.
20663 (expand_stmt): Don't emit unused local statics.
20664 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20665 specially.
20666
20667 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20668
20669 * typeck.c (convert_for_assignment): Don't look at array
20670 initializer.
20671 * call.c (convert_like_real): Likewise.
20672
20673 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
20674
20675 Add initial support for '\uNNNN' specifier.
20676 * lex.c (read_ucs): New fn.
20677 (readescape, skip_white_space): Call it.
20678 (is_extended_char, is_extended_char_1): New fns.
20679 (utf8_extend_token): New fn, #if 0'd out.
20680 (real_yylex): Treat extended chars like letters.
20681
20682 * search.c (note_debug_info_needed): Walk the bases even if we
20683 weren't deferring the type itself.
20684
20685 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20686
20687 * decl2.c (finish_objects): Constify a char*.
20688
20689 * method.c (emit_thunk): Likewise.
20690
20691 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
20692
20693 * typeck.c (dubious_conversion_warnings): Look through
20694 REFERENCE_TYPE.
20695
20696 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20697
20698 * class.c (dfs_modify_vtables): I is now unsigned.
20699 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20700 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20701 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20702 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20703 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20704 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20705 Call integer_all_onesp.
20706 * typeck2.c (process_init_constructor): Use compare_tree_int.
20707
20708 * lang-specs.h (as): Don't call if -syntax-only.
20709
20710 2000-03-06 Mark Mitchell <mark@codesourcery.com>
20711
20712 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20713 RTL_EXPR_HAS_NO_SCOPE after all.
20714
20715 2000-03-05 Mark Mitchell <mark@codesourcery.com>
20716
20717 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20718 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
20719 RTL_EXPR_HAS_NO_SCOPE.
20720
20721 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20722 later.
20723
20724 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20725
20726 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
20727
20728 * call.c (convert_like): Macrofy.
20729 (convert_like_with_context): New macro.
20730 (convert_like_real): Renamed from convert_like. Add calling
20731 context parameters, for diagnostics. Add recursive flag. Call
20732 dubious_conversion_warnings for outer conversion.
20733 (build_user_type_conversion): Use convert_like_with_context.
20734 (build_over_call): Likewise. Don't warn about dubious
20735 conversions here. Adjust convert_default_arg calls.
20736 (convert_default_arg): Add context parameters for diagnostics.
20737 Pass through to convert_like_with_context.
20738 * cp-tree.h (convert_default_arg): Add context parameters.
20739 (dubious_conversion_warnings): Prototype new function.
20740 * typeck.c (convert_arguments): Adjust convert_default_arg call.
20741 (dubious_conversion_warnings): New function, broken
20742 out of convert_for_assignment.
20743 (convert_for_assignment): Adjust.
20744
20745 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
20746
20747 * decl2.c (key_method): Break out from...
20748 (import_export_vtable, import_export_class): ...here.
20749
20750 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20751 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20752
20753 * search.c (note_debug_info_needed, dfs_debug_mark,
20754 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
20755 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20756
20757 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
20758
20759 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20760 typos.
20761
20762 2000-03-02 Mark Mitchell <mark@codesourcery.com>
20763
20764 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20765 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20766 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20767 (lang_type): Split gets_new into has_new and has_array_new.
20768 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20769 (TYPE_GETS_NEW): Split into ...
20770 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20771 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20772 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20773 (build_op_new_call): Don't declare.
20774 (build_new_1): Likewise.
20775 * call.c (build_op_new_call): Remove.
20776 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20777 instead of TYPE_NEEDS_DESTRUCTOR.
20778 (finish_struct_bits): Likewise.
20779 (add_implicitly_declared_members): Likewise.
20780 (check_field_decl): Likewise.
20781 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20782 correctly under the new ABI.
20783 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20784 instead of TYPE_NEEDS_DESTRUCTOR.
20785 (initialize_local_var): Likewise.
20786 (destroy_local_var): Likewise.
20787 (cp_finish_decl): Likewise.
20788 (register_dtor_fn): Likewise.
20789 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20790 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
20791 TYPE_VEC_DELETE_TAKES_SIZE here.
20792 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20793 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20794 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20795 (finish_destructor_body): Likewise.
20796 (maybe_build_cleanup_1): Likewise.
20797 * decl2.c (do_static_destruction): Likewise.
20798 * init.c (build_new_1): Make it static.
20799 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20800 (expand_cleanup_for_base): Likewise.
20801 (get_cookie_size): New function.
20802 (build_new_1): Handle array-new cookies correctly under the new
20803 ABI.
20804 (build_vec_delete_1): Likewise.
20805 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20806 (build_delete): Likewise.
20807 (build_vec_delete): Handle array-new cookies correctly under the new
20808 ABI.
20809 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20810 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20811 TYPE_HAS_ARRAY_NEW_OPERATOR.
20812 * ptree.c (print_lang_type): Check them.
20813 * search.c (context_for_name_lookup): Fix typo in comment.
20814 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20815 * tree.c (break_out_cleanups): Likewise.
20816 (build_cplus_array_test_1): Likewise.
20817 (cp_build_qualified_type_real): Likewise.
20818 * typeck.c (complete_type): Likewise.
20819
20820 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20821 the command-line, not the end.
20822
20823 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
20824
20825 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20826
20827 2000-03-02 Tom Tromey <tromey@cygnus.com>
20828
20829 * cp-tree.h (build_java_class_ref): Declare.
20830 * init.c (build_java_class_ref): No longer static.
20831 * except.c (expand_throw): Generate a Java-style `throw' if the
20832 thrown object is a "Java" object.
20833 (initialize_handler_parm): Generate a Java-style lookup of
20834 exception info if the caught object is a "Java" object.
20835 (catch_language, catch_language_init): New globals.
20836 (decl_is_java_type): New function.
20837 (expand_start_catch_block): Don't call push_eh_info() or
20838 push_eh_cleanup() when handling a Java-style "catch". Pass Java
20839 class reference to build_catch_block.
20840
20841 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20842
20843 * typeck.c (comptypes): Treat sizetype like its language equivalent.
20844
20845 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
20846
20847 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20848 to merge reference/pointer code and fix incorrect warnings.
20849
20850 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
20851
20852 * search.c (protected_accessible_p): Use context_for_name_lookup.
20853
20854 * init.c (construct_virtual_bases): Fix thinko.
20855 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20856
20857 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
20858
20859 * decl.c (current_function_decl): Move to toplev.c.
20860
20861 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
20862
20863 * pt.c (fn_type_unification): Unify return type, whenever
20864 provided.
20865 (get_bindings_real): Only pass return type when necessary.
20866 Remove explicit return type check.
20867 * class.c (resolve_address_of_overloaded_function): Pass desired
20868 return type to fn_type_unification.
20869
20870 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20871
20872 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20873 DECL_FIELD_SIZE.
20874 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20875 DECL_FIELD_SIZE.
20876 * rtti.c (expand_class_desc): Likewise.
20877 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20878 (THUNK_VCALL_OFFSET): Likewise.
20879 (THUNK_DELTA): Reflect changes in ../tree.h.
20880
20881 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
20882
20883 * search.c (protected_accessible_p): Also allow the access if
20884 the member is public in DERIVED. Lose TYPE parm.
20885 (friend_accessible_p): Lose TYPE parm.
20886 (accessible_p): Adjust.
20887
20888 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20889
20890 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20891 on things that are not sizes; ssize_binop deleted.
20892 Call size_diffop when appropriate.
20893 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20894 (build_primary_vtable, build_secondary_vtable): Likewise.
20895 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20896 Variable I is HOST_WIDE_INT.
20897 (get_vfield_offset): Pass proper types to size_binop.
20898 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20899 (finish_struct_1): Likewise.
20900 (skip_rtti_stuff): Arg N is now pointer to signed.
20901 (layout_class_type): Use size_zero_node.
20902 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20903 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20904 * decl.c (complete_arry_type): Pass proper types to size_binop.
20905 (xref_basetypes): BINFO_OFFSET is sizetype.
20906 * error.c (dump_expr): Don't use size_binop non-sizes.
20907 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20908 * init.c (construct_virtual_bases): Fix type error.
20909 (build_vec_delete_1): Pass proper type to size_binop and don't
20910 fold result.
20911 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20912 * rtti.c (get_base_offset): Pass proper type to size_binop.
20913 * search.c (dfs_find_vbases): Fix type error.
20914 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20915 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20916 * tree.c (debug_binfo): Variable N is signed.
20917 Use HOST_WIDE_INT_PRINT_DEC.
20918 * typeck.c (comptypes): sizetype is same as equivalent integer type.
20919 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20920 size_one_node and size_zero_node.
20921 (c_alignof): Use size_one_node.
20922 (build_component_addr): Pass proper types to size_binop.
20923 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20924
20925 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
20926
20927 Implement class scope using-declarations for functions.
20928 * class.c (handle_using_decl): Call add_method for used functions.
20929 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20930 (add_method): Used functions are hidden by local functions.
20931 (check_bases_and_members): Handle using-decls before finalizing
20932 CLASSTYPE_METHOD_VEC.
20933 * call.c (add_function_candidate): Add ctype parm; if nonzero,
20934 override the type of 'this' accordingly.
20935 (add_template_candidate, add_template_candidate_real): Add ctype parm.
20936 (convert_class_to_reference, build_user_type_conversion_1,
20937 build_new_function_call, build_object_call, build_new_op,
20938 build_new_method_call): Pass ctype parm.
20939
20940 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20941 the baselink.
20942 * call.c (convert_class_to_reference, build_user_type_conversion_1,
20943 build_new_function_call, build_object_call, build_new_op,
20944 build_new_method_call, build_op_delete_call): Don't get basetype_path
20945 from a baselink.
20946 * typeck.c (build_component_ref): Likewise.
20947 * init.c (build_offset_ref): Likewise.
20948 (resolve_offset_ref): Don't call enforce_access.
20949 Call build_scoped_ref.
20950 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
20951 would cause an error or if -pedantic.
20952 * class.c (alter_access): Lose binfo parm.
20953
20954 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20955
20956 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20957 types.
20958
20959 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
20960
20961 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20962 pseudo_type_info creation into the std namespace
20963
20964 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20965
20966 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20967 (import_export_class): Remove declaration.
20968 * decl2.c (import_export_class): Make it static.
20969 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20970 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20971 EXPR_WITH_FILE_LOCATION.
20972 * lex.c (check_newline): Tweak filename/lineno setting.
20973 * semantics.c (begin_while_stmt): Fix typo in comment.
20974
20975 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20976
20977 * lang-options.h (-fmessage-length=): Add missing option.
20978
20979 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20980
20981 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
20982
20983 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20984
20985 2000-02-25 Jim Wilson <wilson@cygnus.com>
20986
20987 * optimize.c (expand_call_inline): Emit the return label before
20988 evaluating the return value.
20989
20990 2000-02-24 Mark Mitchell <mark@codesourcery.com>
20991
20992 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20993 than duplicating functionality here.
20994 * optimize.c: Include input.h.
20995 (expand_call_inline): Use push_srcloc and pop_srcloc.
20996 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20997 * parse.c: Regenerated.
20998 * Makefile.in (lex.o): Depend on input.h.
20999 (optimize.o): Likewise.
21000
21001 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
21002
21003 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
21004 function type, rather than ICE.
21005
21006 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
21007
21008 * decl.c (grokdeclarator): Call decl_type_access_control.
21009 * parse.y (parse_end_decl): Don't call decl_type_access_control if
21010 decl is null.
21011
21012 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
21013
21014 * decl.c (decls_match): Remove obsolete static member nadgering.
21015
21016 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21017
21018 * decl.c (grokdeclarator): Change ANSI to ISO.
21019 * lex.c (consume_string, readescape, do_identifier): Likewise.
21020 (parse_float, real_yylex): Likewise.
21021 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
21022 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
21023 new_type_id, maybe_label_decls, simple_stmt,
21024 for.init.statement): Likewise.
21025 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
21026 * semantics.c (finish_named_return_value): Likewise.
21027 * parse.c: Regenerate.
21028
21029 2000-02-21 Mark Mitchell <mark@codesourcery.com>
21030
21031 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
21032 (CPTI_CLASS_STAR_TYPE): Remove.
21033 (vtable_index_type): Likewise.
21034 (class_star_type_node): Remove.
21035 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
21036 (build_binary_op_nodefault): Remove.
21037 * call.c (build_new_op): Use build_binary_op instead of
21038 build_binary_op_nodefault.
21039 * decl.c (init_decl_processing): Remove class_star_type_node
21040 initialization. Make delta_type_node ptrdiff_type_node under the
21041 new ABI. Initialize vtable_index_type.
21042 (build_ptrmemfunc_type): Build different structures for the new
21043 ABI.
21044 (build_enumerator): Use build_binary_op instead of
21045 build_binary_op_nodefault.
21046 * method.c (build_overload_value): Mangle pointers-to-members
21047 appropriately under the new ABI.
21048 * typeck.c (build_array_ref): Use build_binary_op instead of
21049 build_binary_op_nodefault.
21050 (get_member_function_from_ptrfunc): Adjust for the new ABI.
21051 (build_binary_op_nodefault): Rename to ...
21052 (build_binary_op): ... this. Remove old version. Adjust for
21053 pointer-to-member comparisons under the new ABI.
21054 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
21055 (build_ptrmemfunc): Adjust for the new ABI.
21056 (expand_ptrmemfunc_cst): Likewise.
21057 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
21058 (pfn_from_ptrmemfunc): Adjust for the new ABI.
21059
21060 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
21061
21062 * call.c (build_object_call): Compress consecutive calls to
21063 cp_error.
21064 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
21065 (build_op_delete_call): Adjust message formatting.
21066
21067 * class.c (check_bases): Compress consecutive calls to
21068 cp_pedwarn.
21069 (finish_struct_anon): Say 'ISO C++'.
21070
21071 * decl.c (start_decl): Same here.
21072 (grok_reference_init): Likewise.
21073 (grokfndecl): Correct message formatting.
21074 (grokfndecl): Improve diagnostic.
21075 (check_static_variable_definition): Likewise. Say 'ISO C++'
21076 (compute_array_index_type): Say 'ISO C++'
21077 (create_array_type_for_decl): Compress consecutive calls to
21078 cp_error.
21079 (grokdeclarator): Say 'ISO C++'
21080 (grok_op_properties): Likewise.
21081
21082 * decl2.c (delete_sanity): Clairify diagnostic.
21083 (check_member_template): Same here.
21084 (grok_function_init): Use consistent terminology.
21085
21086 * expr.c (do_case): Say 'ISO C++'
21087
21088 * friend.c (do_friend): Compress consecutive calls to warning.
21089
21090 2000-02-20 Mark Mitchell <mark@codesourcery.com>
21091
21092 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
21093 * class.c (build_secondary_vtable): Reorganize. Don't create a
21094 new vtable under the new ABI.
21095 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
21096 computing the size.
21097 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
21098 the initializing elements.
21099 (initialize_vtable): New function.
21100 (dfs_finish_vtbls): Use it.
21101 (dfs_accumulate_vtbl_inits): New function.
21102 (finish_vtbls): Merge primary and secondary vtables under the new
21103 ABI.
21104 (finish_struct_1): Remove redundant call to layout_vtable_decl.
21105 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
21106 aren't VAR_DECLs.
21107
21108 * class.c (build_vtable): New function, split out from ...
21109 (get_vtable_decl): ... here, and ...
21110 (build_secondary_vtable): ... here.
21111
21112 * pt.c (tsubst_decl): Fix formatting.
21113
21114 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
21115
21116 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
21117 (avoid_overlap, build_base_field): Likewise.
21118 (build_base_field, build_base_fields, is_empty_class):
21119 Test DECL_SIZE with integer_zero.
21120 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
21121 * cp-tree.h (struct lang_type): New field size_unit.
21122 (CLASSTYPE_SIZE_UNIT): New macro.
21123 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
21124 (cp_finish_decl): Delete -Wlarger-than processing.
21125 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
21126 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
21127 * tree.c (make_binfo): binfo vector is one entry longer.
21128 (walk_tree): Walk DECL_SIZE_UNIT.
21129
21130 2000-02-19 Mark Mitchell <mark@codesourcery.com>
21131
21132 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
21133 comment.
21134 (build_vtable_entry): Don't assume all vtable entries are
21135 functions.
21136 (build_vtbl_initializer): Adjust accordingly.
21137 (get_vtable_decl): Fix formatting.
21138
21139 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
21140
21141 * semantics.c (deferred_type_access_control): Walk the entire
21142 type_lookups list.
21143 (save_type_access_control): Rename from
21144 initial_deferred_type_access_control. Just remember the value.
21145 (decl_type_access_control): New fn.
21146 (begin_function_definition): Use deferred_type_access_control, after
21147 we've started the function. Set type_lookups to error_mark_node.
21148 * parse.y (frob_specs, fn.def1): Adjust.
21149 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
21150 (parse_end_decl, parse_bitfield0, parse_method): New fns.
21151 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
21152 (after_type_component_declarator0): Likewise.
21153 (after_type_component_declarator): Likewise.
21154 (notype_component_declarator): Likewise.
21155 * cp-tree.h: Adjust.
21156
21157 * decl.c (redeclaration_error_message): Allow redeclaration of
21158 namespace-scope decls.
21159
21160 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
21161
21162 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
21163
21164 2000-02-17 Mark Mitchell <mark@codesourcery.com>
21165
21166 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
21167 * decl2.c (grokclassfn): Likewise.
21168
21169 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
21170
21171 * decl2.c (lang_decode_option): Don't set default message length
21172 here.
21173 * lex.c (lang_init_options): Set it here.
21174
21175 2000-02-16 Mark Mitchell <mark@codesourcery.com>
21176
21177 Make DECL_CONTEXT mean the class in which a member function was
21178 declared, even for a virtual function.
21179 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
21180 (DECL_FRIEND_CONTEXT): New macro.
21181 (DECL_REAL_CONTEXT): Remove.
21182 (SET_DECL_FRIEND_CONTEXT): Likewise.
21183 (DECL_VIRTUAL_CONTEXT): Adjust.
21184 (DECL_CLASS_SCOPE_P): Use TYPE_P.
21185 (add_friends): Remove.
21186 (hack_decl_function_context): Likewise.
21187 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
21188 CP_DECL_CONTEXT.
21189 (build_over_call): Fix indentation. Use DECL_CONTEXT
21190 instead of DECL_CLASS_CONTEXT.
21191 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
21192 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21193 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21194 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
21195 (build_base_field): Likewise.
21196 (finish_struct_1): Likewise.
21197 (build_self_reference): Likewise.
21198 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
21199 DECL_REAL_CONTEXT.
21200 (pushtag): Use decl_function_context, not
21201 hack_decl_function_context.
21202 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21203 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
21204 (pushdecl): Remove bogus code.
21205 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
21206 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21207 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21208 Use decl_function_context, nothack_decl_function_context.
21209 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
21210 (grokdeclarator): Likewise. Use decl_function_context, not
21211 hack_decl_function_context.
21212 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
21213 (start_function): Use DECL_FRIEND_CONTEXT, not
21214 DECL_CLASS_CONTEXT. Use decl_function_context, not
21215 hack_decl_function_context.
21216 (finish_function): Use decl_function_context, not
21217 hack_decl_function_context.
21218 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
21219 DECL_CLASS_CONTEXT.
21220 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
21221 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
21222 (grokfield): Likewise.
21223 (finish_builtin_type): Likewise.
21224 (finish_vtable_vardec): Use decl_function_context, not
21225 hack_decl_function_context.
21226 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21227 (start_static_initialization_or_destruction): Likewise.
21228 (finish_static_initialization_or_destruction): Likewise.
21229 (mark_used): Adjust logic for deciding when to synthesize methods.
21230 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
21231 DECL_REAL_CONTEXT.
21232 * error.c (dump_function_decl): Use DECL_CONTEXT, not
21233 DECL_CLASS_CONTEXT.
21234 * friend.c (is_friend): Likewise.
21235 (add_friends): Remove.
21236 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
21237 * lex.c (begin_definition_of_inclass_inline): Use
21238 decl_function_context, not hack_decl_function_context.
21239 (process_next_inline): Likewise.
21240 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21241 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
21242 DECL_CLASSS_CONTEXT.
21243 (hack_identifier): Likewise.
21244 (synthesize_method): Use decl_function_context, not
21245 hack_decl_function_context.
21246 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
21247 DECL_REAL_CONTEXT.
21248 (is_member_template): Use decl_function_context, not
21249 hack_decl_function_context. Use DECL_CONTEXT, not
21250 DECL_CLASS_CONTEXT.
21251 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
21252 DECL_CLASS_CONTEXT.
21253 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
21254 DECL_REAL_CONTEXT.
21255 (push_template_decl_real): Likewise.
21256 (instantiate_class_template): Don't call add_friends.
21257 (tsubst_default_argument): Use DECL_CONTEXT, not
21258 DECL_REAL_CONTEXT.
21259 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21260 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21261 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
21262 DECL_CLASS_CONTEXT.
21263 * repo.c (repo_inline_used): Likewise.
21264 * search.c (current_scope): Adjust for new _CONTEXT macros.
21265 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21266 DECL_REAL_CONTEXT.
21267 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21268 (lookup_fnfields_here):Likewise.
21269 (check_final_overrider): Likewise.
21270 (init_vbase_pointers): Likewise.
21271 (virtual_context): Likewise.
21272 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21273 (expand_body): Use decl_function_context, not
21274 hack_decl_function_context.
21275 * tree.c (hack_decl_function_context): Remove.
21276 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21277 DECL_CLASS_CONTEXT.
21278 * typeck2.c (error_not_base_type): Likewise.
21279
21280 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
21281
21282 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21283
21284 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21285
21286 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21287
21288 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
21289
21290 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21291
21292 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
21293
21294 * decl2.c (lang_decode_option): Enable automatic line wrapping.
21295
21296 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
21297
21298 * parse.y (frob_specs): Split out...
21299 (parse_decl): From here.
21300 (fn.def2): Call initial_deferred_type_access_control.
21301 (after_type_component_declarator0): Call frob_specs.
21302 (notype_component_declarator0): Likewise.
21303 * search.c (friend_accessible_p): Nested classes are friends of their
21304 enclosing classes.
21305
21306 2000-02-10 Mark Mitchell <mark@codesourcery.com>
21307
21308 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21309 used to create an implicit temporary.
21310
21311 * class.c (dfs_modify_vtables): Tweak calculation of functions to
21312 override.
21313
21314 2000-02-08 Nathan Sidwell <nathan@acm.org>
21315
21316 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21317 strip array element qualifiers too.
21318
21319 2000-02-07 Mark Mitchell <mark@codesourcery.com>
21320
21321 * decl.c (store_parm_decls): Don't build cleanups for parameters
21322 while processing_template_decl.
21323
21324 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
21325
21326 * cp-tree.h (struct saved_scope): Add incomplete field.
21327 (namespace_scope_incomplete): New macro.
21328 * decl.c (pushdecl): Use it.
21329 (hack_incomplete_structures): Use it. See through artificial
21330 binding levels.
21331 (mark_saved_scope): Mark it.
21332
21333 Implement access control for nested types.
21334 * search.c (type_access_control): New fn.
21335 (accessible_p): Now we do perform access control for types.
21336 * semantics.c (deferred_type_access_control): New fn.
21337 (initial_deferred_type_access_control): New fn.
21338 (begin_function_definition): Call it. Add lookups parm.
21339 * decl.c (struct binding_level): Add this_class field.
21340 (pushlevel_class): Set it.
21341 (mark_binding_level): Mark it.
21342 (lookup_name_real): Use it. Call type_access_control.
21343 (mark_saved_scope): Mark lookups field.
21344 * cp-tree.h (flagged_type_tree): Add lookups field.
21345 (struct saved_scope): Add lookups field.
21346 (type_lookups): New macro.
21347 * parse.y (declmods): Now <ftype>.
21348 (parse_decl): Add lookups parm. Call
21349 initial_deferred_type_access_control.
21350 (lang_extdef): Clear type_lookups.
21351 (typed_declspecs, declmods, typespec): Set lookups field.
21352 (initdcl): Call deferred_type_access_control.
21353 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21354 component_decl_1, named_parm): Adjust.
21355 * friend.c (is_friend): Nested classes are friends of their
21356 enclosing classes.
21357
21358 * class.c (currently_open_derived_class): New fn.
21359 * method.c (hack_identifier): Use it.
21360
21361 * lex.c (do_identifier): Remove obsolete code.
21362
21363 * parse.y (typed_typespecs): Propagate new_type_flag properly.
21364
21365 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
21366
21367 * tinfo.h: Remove apostrophes from C++ comment (xgettext
21368 thinks this file is plain C).
21369
21370 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21371
21372 * Makefile.in (call.o): Depend on $(EXPR_H).
21373
21374 * call.c: Include "expr.h".
21375
21376 * class.c (dump_class_hierarchy): Add prototype.
21377
21378 * search.c (dfs_get_pure_virtuals): Likewise.
21379
21380 2000-02-1 Ulrich Drepper <drepper@redhat.com>
21381
21382 * parse.y (simple_stmt): Allow :: token in asm parameter list.
21383 * parse.c: Rebuilt.
21384
21385 2000-01-31 Jim Wilson <wilson@cygnus.com>
21386
21387 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21388 Store it in DECL_FCONTEXT.
21389 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21390
21391 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
21392
21393 * tinfo.h (old abi): #include "tconfig.h".
21394 * tinfo.cc (convert_to_base): Move into old abi section.
21395
21396 2000-01-31 Mark Mitchell <mark@codesourcery.com>
21397
21398 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21399 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21400 (BINFO_PRIMARY_BINFO): New macro.
21401 (BF_DELTA): Rename to ...
21402 (BV_DELTA): ... this.
21403 (BF_VCALL_INDEX): Rename to ...
21404 (BV_VCALL_INDEX): ... this.
21405 (BF_FN): Rename to ...
21406 (BV_FN): ... this.
21407 * class.c (build_vbase_path): Adjust for changes to reverse_path.
21408 (set_rtti_entry): Rename BF_ macros to BV_ variants.
21409 (modify_vtable_entry): Simplify.
21410 (add_virtual_function): Rename BF_ macros to BV_ variants.
21411 (build_vtable_initializer): Likewise.
21412 (get_class_offset_1): Remove.
21413 (dfs_get_class_offset): Likewise.
21414 (get_class_offset): Likewise.
21415 (dfs_find_final_overrider): New function.
21416 (find_final_overrider): Likewise.
21417 (modify_one_vtable): Remove.
21418 (dfs_find_base): New function.
21419 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
21420 find_final_overrider.
21421 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
21422 virtuals.
21423 (dfs_fixup_vtable_deltas): Remove.
21424 (override_one_vtable): Remove.
21425 (merge_overrides): Likewise.
21426 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21427 unreal chilren of virtual bases.
21428 (finish_struct_1): Don't use merge_overrides. Don't use
21429 dfs_fixup_vtable_deltas.
21430 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21431 BINFOs.
21432
21433 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21434 Jason Merrill <jason@yorick.cygnus.com>
21435
21436 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21437
21438 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
21439
21440 * exception.cc (__throw_bad_typeid): Add missing std::.
21441
21442 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21443
21444 * cp-tree.h (make_thunk): PROTO -> PARAMS.
21445
21446 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
21447
21448 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21449
21450 Runtime support for new-abi rtti.
21451 * inc/typeinfo (type_info::operator!=): Define in class.
21452 (type_info::before, type_info::name, type_info::operator==,
21453 type_info::operator!=): Define new ABI implementations.
21454 (type_info::is_pointer_p, type_info::is_function_p): Declare
21455 new virtual functions.
21456 (type_info::do_catch, type_info::do_upcast): Likewise.
21457
21458 * tinfo.h (__base_class_info): Define new class.
21459 (__class_type_info): Likewise.
21460 (__si_class_type_info): Likewise.
21461 (__vmi_class_type_info): Likewise.
21462 (__dynamic_cast): Prototype.
21463
21464 * tinfo.cc: Conditionalize old and new rtti mechanisms.
21465 (type_info::is_pointer_p): Define new function.
21466 (type_info::is_function_p): Likewise.
21467 (type_info::do_catch): Likewise.
21468 (type_info::do_upcast): Likewise.
21469 (vtable_prefix): New structure for vtable access.
21470 (adjust_pointer): Define new template function.
21471 (contained_p, public_p, virtual_p, contained_public_p,
21472 contained_nonpublic_p, contained_nonvirtual_p): Define new
21473 functions.
21474 (nonvirtual_base_type): New local variable.
21475 (__class_type_info::~__class_type_info): Define.
21476 (__si_class_type_info::~__si_class_type_info): Likewise.
21477 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21478 (__class_type_info::do_catch): Define new function.
21479 (__class_type_info::do_upcast): Likewise.
21480 (__class_type_info::find_public_src): Likewise.
21481 (__class_type_info::do_find_public_src): Likewise.
21482 (__si_class_type_info::do_find_public_src): Likewise.
21483 (__vmi_class_type_info::do_find_public_src): Likewise.
21484 (__class_type_info::do_dyncast): Likewise.
21485 (__si_class_type_info::do_dyncast): Likewise.
21486 (__vmi_class_type_info::do_dyncast): Likewise.
21487 (__class_type_info::do_upcast): Likewise.
21488 (__si_class_type_info::do_upcast): Likewise.
21489 (__vmi_class_type_info::do_upcast): Likewise.
21490 (__dynamic_cast): Likewise.
21491
21492 * tinfo2.cc (__fundamental_type_info): Define new class.
21493 (__pointer_type_info): Likewise.
21494 (__reference_type_info): Likewise.
21495 (__array_type_info): Likewise.
21496 (__function_type_info): Likewise.
21497 (__enum_type_info): Likewise.
21498 (__ptr_to_member_type_info): Likewise.
21499 (__fundamental_type_info::~__fundamental_type_info): Define.
21500 (__pointer_type_info::~__pointer_type_info): Likewise.
21501 (__reference_type_info::~__reference_type_info): Likewise.
21502 (__array_type_info::~__array_type_info): Likewise.
21503 (__function_type_info::~__function_type_info): Likewise.
21504 (__enum_type_info::~__enum_type_info): Likewise.
21505 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21506 (__pointer_type_info::do_catch): Define new function.
21507 (__ptr_to_member_type_info::do_catch): Define new function.
21508
21509 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21510 (__is_pointer): Likewise.
21511
21512 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21513
21514 2000-01-30 Mark Mitchell <mark@codesourcery.com>
21515
21516 * cp/class.c (build_vtable): Rename to build_primary_vtable.
21517 (prepare_fresh_vtable): Rename to build_secondary_vtable.
21518 (make_new_vtable): New function.
21519 (modify_vtable_entry): Handle generation of new vtables correctly.
21520 (modify_one_vtable): Remove unused parameter.
21521 (dfs_fixup_vtable_deltas): Likewise.
21522 (override_one_vtable): Use build_secondary_vtable.
21523 (finish_struct_1): Use build_primary_vtable and
21524 build_secondary_vtable.
21525
21526 2000-01-28 Ulrich Drepper <drepper@redhat.com>
21527
21528 * cp/decl.c: Adjust variable names, comments, help strings.
21529
21530 2000-01-29 Nathan Sidwell <nathan@acm.org>
21531
21532 * new2.cc (operator delete[]): Use operator delete, don't assume
21533 implementation.
21534
21535 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
21536
21537 * class.c (build_vtbl_initializer): Add argument to
21538 build_vtable_entry call.
21539
21540 2000-01-27 Mark Mitchell <mark@codesourcery.com>
21541
21542 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21543 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21544 (BF_DELTA): New macro.
21545 (BF_VCALL_INDEX): Likewise.
21546 (BF_FN): Likewise.
21547 (THUNK_VCALL_OFFSET): Likewise.
21548 (make_thunk): Change prototype.
21549 * class.c (build_vtable_entry): Integrate
21550 build_vtable_entry_for_fn. Handle vcall indices.
21551 (build_vtable_entry_for_fn): Remove.
21552 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
21553 BF_VCALL_INDEX, BF_FN.
21554 (modify_vtable_entry): Integrate common code from
21555 modify_one_vtable and dfs_fixup_vtable_deltas.
21556 (add_virtual_function): Set BF_VCALL_INDEX.
21557 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
21558 and BF_FN.
21559 (modify_one_vtable): Simplify.
21560 (dfs_fixup_vtable_deltas): Likewise.
21561 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21562 * method.c (make_thunk): Handle vcall indices.
21563
21564 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
21565
21566 Compiler side new abi rtti (not enabled).
21567 * cp-tree.h (new_abi_rtti_p): New macro.
21568 (emit_support_tinfos): Prototype new function.
21569 (tinfo_decl_p): Likewise.
21570 (emit_tinfo_decl): Likwise.
21571 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21572 macros.
21573 (doing_runtime): New local static.
21574 (init_rtti_processing): Add new-abi initializer.
21575 (get_tinfo_decl): Add new-abi logic.
21576 (tinfo_from_decl): Likewise.
21577 (build_dynamic_cast_1): Likewise.
21578 (qualifier_flags): New static function.
21579 (tinfo_base_init): Likewise.
21580 (generic_initializer): Likewise.
21581 (ptr_ref_initializer): Likewise.
21582 (ptmd_initializer): Likewise.
21583 (class_hint_flags): Likewise.
21584 (class_initializer): Likewise.
21585 (synthesize_tinfo_var): Likewise.
21586 (create_real_tinfo_var): Likewise.
21587 (create_pseudo_type_info): Likewise.
21588 (get_vmi_pseudo_type_info): Likewise.
21589 (create_tinfo_types): Likewise.
21590 (emit_support_tinfos): New global function.
21591 (tinfo_decl_p): New global predicate.
21592 (emit_tinfo_decl): New global function.
21593 * class.c (set_rtti_entry): Generalize for old and new rtti.
21594 (build_vtbl_initializer): Likewise.
21595 * decl2.c (finish_file): Likewise.
21596
21597 2000-01-27 Jim Wilson <wilson@cygnus.com>
21598
21599 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21600 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21601
21602 2000-01-27 Mike Stump <mrs@wrs.com>
21603
21604 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21605 for scopes.
21606
21607 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
21608
21609 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21610
21611 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
21612
21613 * optimize.c (calls_setjmp_r): Supply new argument
21614 to special_function_p.
21615
21616 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21617
21618 * call.c: PROTO -> PARAMS.
21619 * class.c: Likewise.
21620 * cp-tree.h: Likewise.
21621 * cvt.c: Likewise.
21622 * decl.c: Likewise.
21623 * decl.h: Likewise.
21624 * decl2.c: Likewise.
21625 * dump.c: Likewise.
21626 * errfn.c: Likewise.
21627 * error.c: Likewise.
21628 * except.c: Likewise.
21629 * expr.c: Likewise.
21630 * init.c: Likewise.
21631 * input.c: Likewise.
21632 * lex.c: Likewise.
21633 * lex.h: Likewise.
21634 * method.c: Likewise.
21635 * optimize.c: Likewise.
21636 * parse.y: Likewise.
21637 * pt.c: Likewise.
21638 * repo.c: Likewise.
21639 * rtti.c: Likewise.
21640 * search.c: Likewise.
21641 * semantics.c: Likewise.
21642 * spew.c: Likewise.
21643 * tree.c: Likewise.
21644 * typeck.c: Likewise.
21645 * typeck2.c: Likewise.
21646 * xref.c: Likewise.
21647
21648 2000-01-25 Richard Henderson <rth@cygnus.com>
21649
21650 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21651
21652 2000-01-25 Mark Mitchell <mark@codesourcery.com>
21653
21654 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21655 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21656 (struct vcall_offset_data_s): New type.
21657 (dfs_vcall_offset_queue_p): New function.
21658 (dfs_build_vcall_offset_vtbl_entries): Likewise.
21659 (build_vcall_offset_vtbl_entries): Likewise.
21660 (layout_vtable_decl): Likewise.
21661 (num_vfun_entries): Likewise.
21662 (num_extra_vtbl_entries): Add the entries for vcall offsets.
21663 (build_vtbl_initializer): Likewise.
21664 (dfs_finish_vtabls): Use layout_vtable_decl.
21665 (modify_one_vtables): Always duplicate vtables under the new ABI.
21666 (finish_struct_1): Use layout_vtable_decl.
21667
21668 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21669
21670 * decl.c (member_function_or_else): Change third arg from a format
21671 specifier to an `enum overload_flags'. Callers changed.
21672
21673 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
21674
21675 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21676 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21677 build_const_cast, get_delta_difference, check_return_expr): Avoid
21678 ANSI string concatenation usage.
21679
21680 2000-01-24 Mark Mitchell <mark@codesourcery.com>
21681
21682 * class.c (layout_class_type): Put the fields required to make a
21683 class non-empty at the end, not the beginning, of the TYPE_FIELDs
21684 list.
21685
21686 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
21687
21688 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21689 template.
21690
21691 * decl2.c (mark_used): Do instantiate inlines that have been
21692 explicitly instantiated.
21693
21694 2000-01-24 Richard Henderson <rth@cygnus.com>
21695
21696 * call.c (build_over_call): Use expand_tree_builtin.
21697 * typeck.c (build_function_call_real): Likewise.
21698 (build_binary_op_nodefault): Handle unordered compares.
21699
21700 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21701
21702 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21703 cp_tree_index values.
21704 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21705 New global node #defines for them.
21706 * rtti.c (call_void_fn): Replace with ...
21707 (build_runtime_decl): ... new static function.
21708 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21709 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21710 (build_dynamic_cast_1): Always produce correctly typed result.
21711 Explicitly produce type_info addresses. Use dynamic_cast_node.
21712 * exception.cc (__throw_bad_cast): Return `void *'.
21713 (__throw_bad_typeid): Return `const type_info &'.
21714
21715 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21716
21717 * cp-tree.h (get_vtable_decl): Prototype new function.
21718 * class.c (get_vtable_decl): New function. Broken out from ...
21719 (build_vtable): ... here. Use it.
21720 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21721 by get_vtable_decl.
21722
21723 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21724
21725 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21726 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21727 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21728 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21729 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21730 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21731 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21732 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21733 (CPTI_TINFO_VAR_ID): New enumeration.
21734 (__tp_desc_type_node, __access_mode_type_node,
21735 __bltn_desc_type_node, __user_desc_type_node,
21736 __class_desc_type_node, __ptr_desc_type_node,
21737 __attr_desc_type_node, __func_desc_type_node,
21738 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21739 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21740 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21741 enum_desc_type_node, class_desc_type_node,
21742 si_class_desc_type_node, vmi_class_desc_type_node,
21743 ptmd_desc_type_node, base_desc_type_node): New #defines.
21744 (tinfo_fn_id, tinfo_fn_type): Rename to ...
21745 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21746 (tinfo_var_id): New enumeration.
21747 (DECL_TINFO_FN_P): Augment comment.
21748 * decl.c (cp_global_trees): Adjust documentation.
21749 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21750 tinfo_decl_type and tinfo_var_id.
21751 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21752 (build_typeid): Remove unused variable.
21753 (get_tinfo_var): Use tinfo_var_id.
21754 (tinfo_name): New static function.
21755 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21756 (tinfo_from_decl): Likewise.
21757 (get_base_offset): New static function, broken out of
21758 expand_class_desc.
21759 (expand_si_desc): Use tinfo_name.
21760 (expand_class_desc): Likewise. Lose local static variable.
21761 Use base_desc_type_node. Use get_base_offset.
21762 (expand_ptr_desc): Use tinfo_name.
21763 (expand_attr_desc): Likewise.
21764 (expand_generic_desc): Likewise.
21765
21766 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21767 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21768
21769 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21770
21771 * cp-tree.h (__eprintf): Remove declaration.
21772 * tree.c (__eprintf): Remove definition.
21773
21774 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
21775 Mark Mitchell <mark@codesourcery.com>
21776
21777 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21778 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21779
21780 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
21781
21782 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21783
21784 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21785
21786 * cp-tree.h (register_dtor_fn): New function.
21787 * decl.c (destroy_local_static): Rename to ...
21788 (register_dtor_fn): ... this. Give it external linkage.
21789 (expand_static_init): Use it.
21790 * decl2.c (do_static_initialization): Likewise, if using
21791 __cxa_atexit.
21792 (do_static_destruction): Check that __cxa_atexit is not in use.
21793 (finish_file): Don't call do_static_destruction if using
21794 __cxa_atexit.
21795
21796 * typeck.c (convert_arguments): Restore two-message error
21797 reporting.
21798
21799 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
21800
21801 Remap dynamic cast hint values to be consistent across ABIs.
21802 * search.c (dynamic_cast_base_recurse): Remap generated value.
21803 (get_dynamic_cast_base_type): Adjust documentation.
21804 * tinfo.h (__user_type_info::dyncast): Likewise.
21805 (__user_type_info::find_public_subobj): Remap BOFF meaning.
21806 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21807 (__class_type_info::do_dyncast): Likewise.
21808 (__class_type_info::do_find_public_subobj): Likewise.
21809 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21810
21811 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21812
21813 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21814
21815 * typeck2.c (incomplete_type_error): Restore previous
21816 cp_error and cp_error_at call sequence.
21817
21818 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
21819
21820 * class.c (dump_class_hierarchy): Make format agree with argument;
21821 cast pointer to unsigned long and print with %lx.
21822
21823 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21824
21825 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21826
21827 * typeck.c (composite_pointer_type, common_type,
21828 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21829 build_function_call_real, convert_arguments,
21830 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21831 build_unary_op, mark_addressable, build_compound_expr,
21832 build_static_cast, build_reinterpret_cast, build_const_cast,
21833 build_c_cast, build_modify_expr, get_delta_difference,
21834 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21835 'ISO C++'. Fusion consecutive calls to diagnostic message routines
21836 into a single one.
21837 * typeck2.c (readonly_error, abstract_virtuals_error,
21838 process_init_constructor, check_for_new_type): Likewise.
21839
21840 2000-01-19 Mark Mitchell <mark@codesourcery.com>
21841
21842 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21843 VAR_DECLs.
21844
21845 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
21846
21847 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21848 (build_x_typeid): Likewise.
21849 (get_tinfo_fn): Likewise.
21850 (get_tinfo_fn_unused): Rename to ...
21851 (get_tinfo_decl): ... here.
21852 * rtti.c (build_headof): Replace logic error with assertion.
21853 (get_tinfo_fn_dynamic): Rename to ...
21854 (get_tinfo_decl_dynamic): ... here. Make static. Use
21855 complete_type_or_else.
21856 (build_x_typeid): Move into ...
21857 (build_typeid): ... here. Adjust call to
21858 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21859 throw_bad_typeid expression.
21860 (get_tinfo_fn_unused): Rename to ...
21861 (get_tinfo_decl): ... here. Adjust comment.
21862 (get_tinfo_fn): Delete.
21863 (tinfo_from_decl): New static function.
21864 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21865 (get_typeid): Use complete_type_or_else.
21866 (build_dynamic_cast_1): Adjust calls to
21867 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21868 * parse.y (primary): Adjust call to build_typeid.
21869 * except.c (build_eh_type_type_ref): Adjust call to
21870 get_tinfo_decl. Mark as used.
21871 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21872 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21873 * parse.c: Regenerated.
21874
21875 2000-01-17 Mark Mitchell <mark@codesourcery.com>
21876
21877 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
21878 calling convention.
21879 (resolves_to_fixed_type_p): Document calling convention.
21880 * rtti.c (build_x_typeid): Initialize NONNULL.
21881
21882 * cp-tree.h (build_shared_int_cst): New function.
21883 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21884 * class.c (modify_vtable_entry): Likewise.
21885 (add_virtual_function): Split out code to generated shared
21886 INTEGER_CSTs to build_share_int_cst.
21887 (modify_all_vtables): Handle all the overridden functions here.
21888 Add overridden functions from non-primary virtual bases to the
21889 primary vtable.
21890 (finish_struct_1): Adjust call to modify_all_vtables. Add
21891 overridden functions from non-primary bases to the vtable.
21892 * tree.c (build_shared_int_cst): New function.
21893
21894 * cp-tree.h (scratchalloc): Remove.
21895 (build_scratch_list): Likewise.
21896 * call.c (convert_class_to_reference): Replace build_scratch_list
21897 and build_expr_list with build_tree_list.
21898 (add_candidate): Replace scratchalloc with expralloc. Note memory
21899 leak.
21900 (build_user_type_conversion_1): Replace build_scratch_list
21901 and build_expr_list with build_tree_list.
21902 (build_new_op): Likewise.
21903 (build_op_delete_call): Likewise.
21904 (convert_like): Likewise.
21905 * cvt.c (ocp_convert): Likewise.
21906 * decl.c (start_decl): Likewise.
21907 (start_function): Likewise.
21908 (finish_destructor_body): Likewise.
21909 (maybe_build_cleanup_1): Likewise.
21910 * decl2.c (reparse_decl_as_expr): Likewise.
21911 * init.c (perform_member_init): Likewise.
21912 (expand_cleanup_for_base): Likewise.
21913 (build_builtin_delete_call): Likewise.
21914 (build_new_1): Likewise.
21915 (build_delete): Likewise.
21916 * method.c (do_build_assign_ref): Likewise.
21917 * parse.y (already_scoped_stmt): Likewise.
21918 (nontrivial_exprlist): Likewise.
21919 (net_initializer): Likewise.
21920 (initlist): Likewise.
21921 * parse.c: Regenerated.
21922 * rtti.c (build_x_typeid): Likewise.
21923 (build_dynamic_cast_1): Likewise.
21924 * typeck.c (build_x_compound_expr): Likewise.
21925 (build_static_cast): Likewise.
21926 (build_modify_expr): Likewise.
21927
21928 * cp-tree.h (DECL_VINDEX): Add documentation.
21929 * class.c (build_vtable_entry): Likewise.
21930 (start_vtable): Add comment.
21931 (add_virtual_function): Replace pending_hard_virtuals with
21932 overridden_virtuals and pending_virtuals with new_virtuals.
21933 Replace redundant assignments with assertions.
21934 (check_for_override): Add comment.
21935 (check_bases_and_members): Replace pending_hard_virtuals with
21936 overridden_virtuals and pending_virtuals with new_virtuals.
21937 (create_vtbl_ptr): Likewise.
21938 (layout_class_type): Likewise.
21939 (finish_struct_1): Likewise. Add comments.
21940
21941 2000-01-16 Mark Mitchell <mark@codesourcery.com>
21942
21943 * class.c (finish_struct_1): Replace redundant code with
21944 assertions.
21945
21946 * cp-tree.h (flag_new_abi): Move.
21947 (flag_use_cxa_atexit): Likewise.
21948 (flag_honor_std): Likewise.
21949 (flag_rtti): Likewise.
21950 (vbase_offsets_in_vtable_p): Define.
21951 (vptrs_present_everywhere_p): Likewise.
21952 (TYPE_CONTAINS_VPTR_P): Likewise.
21953 (dfs_walk_real): Declare.
21954 * class.c (build_vbase_pointer_fields): Check
21955 vbase_offsets_in_vtable_p.
21956 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21957 BINFO_VPTR_FIELD.
21958 (build_vbase_offset_vtbl_entries): Simplify.
21959 (build_vbase_offset_vtbl_entries): Adjust.
21960 (build_vbase_pointer): Add ability to look up vbase offsets in
21961 vtable.
21962 (start_vtable): New function.
21963 (add_virtual_function): Use it.
21964 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21965 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21966 (build_vtbl_initializer): Take the type of the complete object as
21967 input. Use it to correctly calculate vbase offsets.
21968 (dfs_finish_vtbls): Pass the complete type to
21969 build_vtbl_initializer.
21970 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21971 (create_vtable_ptr): Create a vtable even if there are no
21972 new virtual functions, under the new ABI.
21973 (finish_struct_1): Likewise.
21974 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21975 * decl.c (exapnd_static_init): Remove call to
21976 preserve_initializer.
21977 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21978 vtables.
21979 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21980 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21981 (construct_virtual_bases): Don't initialize virtual base pointers
21982 under the new ABI.
21983 (build_aggr_init): Clean up comment.
21984 (expand_aggr_init_1): Likewise.
21985 * rtti.c (expand_class_desc): Store the virtual function table
21986 index where the vbase offset lives in the offset field.
21987 * search.c (dfs_walk_real): Make it global.
21988 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21989 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21990
21991 * tinfo.h (USItype): Make it signed under the new ABI.
21992 * tinfo.cc (convert_to_base): New function. Encapsulate base
21993 conversion logic here.
21994 (__class_type_info::do_upcast): Use it.
21995 (__class_type_info::do_dyncast): Likewise.
21996 (__class_type_info::do_find_public_subobj): Likewise.
21997
21998 * init.c (construct_virtual_bases): Don't look up the addresses of
21999 virtual bases at run-time.
22000
22001 * class.c (build_vbase_pointer): Relocate.
22002 (build_vbase_pointer_fields): Likewise.
22003 (dfs_build_vbase_offset_vtbl_entries): Likewise.
22004 (build_vbase_offset_vtbl_entries): Likewise.
22005
22006 * decl.c (init_decl_processing): Complain if -fnew-abi
22007 -fno-vtable-thunks is used.
22008
22009 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
22010 flag_new_abi.
22011
22012 2000-01-15 Mark Mitchell <mark@codesourcery.com>
22013
22014 * cp-tree.h (num_extra_vtbl_entries): New function.
22015 (size_extra_vtbl_entries): Likewise.
22016 (dfs_vtable_path_unmark): Likewise.
22017 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
22018 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
22019 * class.c (num_extra_vtbl_entries): New function.
22020 (size_extra_vtbl_entries): Likewise.
22021 (dfs_build_vbase_offset_vtbl_entries): New function.
22022 (build_vbase_offset_vtbl_entries): Likewise.
22023 (build_vtbl_initializer): Use it.
22024 (finish_struct_1): Adjust vtable sizes (using
22025 num_extra_vtbl_entries).
22026 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
22027 THUNK_DECL is non-NULL before expanding it.
22028 * init.c (expand_virtual_init): Adjust the vtable pointer by
22029 size_extra_vtbl_entries before storing it.
22030 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
22031 Handle TREE_LIST parameters here, not in the dfs_* functions.
22032 (dfs_unmarked_real_bases_queue_p): Adjust.
22033 (dfs_marked_real_bases_queue_p): Likewise.
22034 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
22035 (dfs_vtable_path_marked_real_bases_queue_p): New function.
22036 (dfs_vtable_path_unmark): Likewise.
22037
22038 2000-01-14 Mark Mitchell <mark@codesourcery.com>
22039
22040 * optimize.c (copy_body_r): Clear the operand three of a
22041 TARGET_EXPR when copying it.
22042
22043 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
22044
22045 * method.c (build_decl_overload_real): Check whether we are in ::
22046 before returning __builtin_new/delete.
22047
22048 2000-01-13 Mark Mitchell <mark@codesourcery.com>
22049
22050 * pt.c (tsubst_friend_function): Improve comment.
22051 (instantiate_decl): Avoid crashing when a "nested" function is
22052 instantiated from the top level.
22053
22054 * dump.c (dqeueue_and_dump): Dump
22055 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
22056
22057 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22058
22059 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
22060
22061 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
22062
22063 * g++spec.c (lang_specific_driver): Add -fnew-abi if
22064 ENABLE_NEW_GXX_ABI defined.
22065 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
22066 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
22067 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
22068
22069 2000-01-12 Mark Mitchell <mark@codesourcery.com>
22070
22071 * decl.c (start_cleanup_fn): Call pushdecl.
22072
22073 * call.c (convert_class_to_reference): Fix typos.
22074 (build_conditional_expr): Handle errors gracefully.
22075 * class.c (push_nested_class): Likewise.
22076 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
22077 (DECL_THIS_EXTERN): Use it.
22078 (DECL_THIS_STATIC): Likewise.
22079 * cvt.c (convert_to_void): Handle errors gracefully.
22080 (build_expr_type_conversion): Likewise.
22081 * decl.c (maybe_push_decl): Likewise.
22082 (start_decl_1): Likewise.
22083 (require_complete_types_for_parms): Likewise.
22084 * parse.y (structsp): Likewise.
22085 (base_class): Likewise.
22086 * parse.c: Regenerated.
22087 * pt.c (finish_member_template_decl): Likewise.
22088 * typeck.c (decay_conversion): Likewise.
22089
22090 * cp-tree.h (dfs_skip_vbases): New function.
22091 (find_vbase_instance): Likewise.
22092 * class.c (determine_primary_base): Allow a nearly empty base to
22093 serve as a primary base class under the new ABI.
22094 (get_class_offset_1): Rename to ...
22095 (dfs_get_class_offset): ... this. Simplify. Don't issue error
22096 messages here.
22097 (get_class_offset): Use it. Issue error messages here.
22098 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
22099 find the right copies of virtual bases.
22100 (fixup_vtable_deltas1): Rename to ...
22101 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
22102 bases as primary bases.
22103 (fixup_vtable_deltas): Remove.
22104 (override_one_vtable): Handle virtual bases as primary bases.
22105 (merge_overrides): Likewise.
22106 (finish_struct_1): Likewise.
22107 (dump_class_hierarchy): Dump primary-ness of bases as well.
22108 * search.c (mark_primary_bases): Use a pre-order traversal to
22109 handle primary virtual bases.
22110 (dfs_skip_vbases): New fiunction.
22111 (expand_upcast_fixups): Adjust to handle primary virtual bases.
22112 (fixup_virtual_upcast_offsets): Likewise.
22113 (fixup_all_virtual_upcast_offsets): Likewise.
22114 (dfs_find_vbase_instances): New function.
22115 (find_vbase_instance): Likewise.
22116
22117 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
22118
22119 * lex.c (DIR_SEPARATOR): Delete macro.
22120
22121 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
22122
22123 * decl2.c (lang_decode_option): Handle automatic line wrapping
22124 option.
22125
22126 2000-01-11 Mark Mitchell <mark@codesourcery.com>
22127
22128 * friend.c (do_friend): Don't resolve scopes when processing
22129 template declarations, even if the qualifying scope doesn't
22130 involve template parameters.
22131
22132 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
22133
22134 * class.c (dfs_modify_vtables_queue_p): Remove.
22135 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
22136 and dfs_marked_real_bases_queue_p instead of
22137 dfs_modify_vtables_queue_p.
22138
22139 * class.c (build_vbase_path): Simplify.
22140 (dfs_propagate_binfo_offsets): New function.
22141 (propagate_binfo_offsets): Use it.
22142 (remove_base_field): Simplify.
22143 (dfs_set_offset_for_vbases): Remove.
22144 (dfs_set_offset_for_shared_vbases): New function.
22145 (dfs_set_offset_for_unshared_vbases): Likewise.
22146 (layout_virtual_bases): Use them.
22147 (layout_basetypes): Don't call propagate_binfo_offsets.
22148 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
22149 for the vbases.
22150
22151 * class.c (build_base_field): New function, split out from ...
22152 (build_base_fields): ... here. Use it. Allocate primary bases
22153 first, under the new ABI.
22154 (get_vtable_entry): Remove.
22155 (remove_base_field): New function, split out from ...
22156 (remove_base_fields): ... here. Adjust since primary bases come
22157 first under the new ABI.
22158
22159 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
22160 (initialize_vtbl_ptrs): New function.
22161 (expand_indirect_vtbls_init): Change prototype.
22162 (convert_pointer_to_vbase): Declare.
22163 * init.c (expand_direct_vtbls_init): Remove.
22164 (dfs_initialize_vtbl_ptrs): New function.
22165 (initialize_vtbl_ptrs): Likewise.
22166 (emit_base_init): Use initialize_vtbl_ptrs.
22167 * search.c (convert_pointer_to_vbase): Make it global.
22168 (expand_indirect_vtbls_init): Remove vtable initialization code.
22169 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
22170
22171 * class.c (dfs_finish_vtbls): New function.
22172 (finish_vtbls): Use it.
22173 (dump_class_hierarchy): New function.
22174
22175 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
22176 (BINFO_VBASE_PRIMARY_P): New macro.
22177 (BINFO_VIRTUALS): Add to documentation.
22178 (SET_BINFO_PRIMARY_MARKED_P): Remove.
22179 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22180 (dfs_mark_primary_bases_queue_p): Likewise.
22181 (dfs_unmarked_real_bases_queue_p): New function.
22182 (dfs_marked_real_bases_queue_p): Likewise.
22183 * search.c (dfs_mark_primary_bases): Adjust.
22184 (mark_primary_bases): Likewise.
22185 (get_shared_vbase_if_not_primary): New function.
22186 (dfs_unmarked_real_bases_queue_p): Likewise.
22187 (dfs_marked_real_bases_queue_p): Likewise.
22188 (dfs_get_pure_virtuals): Simplify.
22189 (get_pure_virtuals): Likewise.
22190
22191 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22192
22193 * lex.c: Include tm_p.h.
22194
22195 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
22196
22197 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
22198
22199 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
22200
22201 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
22202 * pt.c (instantiate_decl): Defer comdat templates that might not be
22203 needed.
22204
22205 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
22206 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
22207 (finish_file): Likewise.
22208
22209 * decl2.c (import_export_class): Undo 12/14 change.
22210
22211 * error.c (dump_decl): operator new, not operatornew.
22212
22213 * class.c (field_decl_cmp): A nontype is "greater" than a type.
22214 * search.c (lookup_field_1): Look for the last field with the
22215 desired name.
22216
22217 2000-01-05 Nathan Sidwell <nathan@acm.org>
22218
22219 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
22220 FUNCTION_DECL.
22221
22222 2000-01-05 Nathan Sidwell <nathan@acm.org>
22223
22224 * typeck.c (build_static_cast): Don't strip target qualifiers
22225 when casting from a class.
22226
22227 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
22228
22229 * class.c (warn_hidden): Initialize variable `fndecl'.
22230
22231 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
22232
22233 * decl.c (flag_isoc9x): New variable to be able to use code in
22234 c-common.c. For now always zero.
22235
22236 2000-01-03 Mark Mitchell <mark@codesourcery.com>
22237
22238 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
22239 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
22240 or unshare_base_binfos for virtual bases here.
22241 * search.c (dfs_get_vbase_types): Do it here.
22242 (get_vbase_types): Adjust.
22243
22244 2000-01-02 Mark Mitchell <mark@codesourcery.com>
22245
22246 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
22247 (BINFO_PRIMARY_MARKED_P): Use flag 5.
22248 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22249 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22250 (unmark_primary_bases): Remove declaration.
22251 (unmarkedp): Declare.
22252 (dfs_vbase_unmark): Likewise.
22253 * class.c (determine_primary_base): Return immediately if there
22254 are no base classes. Call mark_primary_bases here.
22255 (modify_all_direct_vtables): Remove.
22256 (modify_all_indirect_vtables): Remove.
22257 (dfs_modify_vtables_queue_p): New function.
22258 (dfs_modify_vtables): New function.
22259 (modify_all_vtables): Use them.
22260 (build_base_fields): Build FIELD_DECLs for primary virtual base
22261 classes.
22262 (create_vtable_ptr): Don't call determine_primary_base here.
22263 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22264 (dfs_set_offset_for_vbases): ... this.
22265 (layout_virtual_bases): Use it.
22266 (layout_class_type): Call determine_primary_base here.
22267 * search.c (unmarkedp): Make it global.
22268 (shared_marked_p): Simplify.
22269 (shared_unmarked_p): Likewise.
22270 (dfs_primary_bases_queue_p): Remove.
22271 (dfs_unmark_primary_bases): Likewise.
22272 (unmark_primary_bases): Likewise.
22273 (mark_primary_bases): Simplify.
22274 (get_pure_virtuals): Don't call mark_primary_bases here.
22275 (dfs_vbase_unmark): New function.
22276 (get_vbase_types): Simplify.
22277
22278 * class.c (struct base_info): Remove.
22279 (determine_primary_base): Take has_virtual_p rather than a
22280 base_info as input. Don't calculate max_has_virtual.
22281 (finish_struct_bits): Remove max_has_virtual argument.
22282 (create_vtable_ptr): Remove max_has_virtual_p argument.
22283 (layout_virtual_bases): Remove max argument.
22284 (layout_basetypes): Likewise.
22285 (layout_class_type): Remove max_has_virtual_p argument.
22286 (finish_struct_1): Remove max_has_virtual.
22287
22288 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22289 (layout_basetypes): Remove.
22290 * class.c (propagate_binfo_offsets): Moved here from tree.c.
22291 Update to handle primary virtual bases.
22292 (remove_base_fields): New function, split out from
22293 layout_basetypes.
22294 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22295 (layout_virtual_bases): New function, split out from
22296 layout_basetypes. Update to handle primary virtual bases.
22297 (layout_basetypes): Moved here from tree.c. Use
22298 remove_base_fields and layout_virtual_bases.
22299 * search.c (dfs_mark_primary_bases_queue_p): New function.
22300 (mark_primary_bases): Use it.
22301 * tree.c (CEIL): Remove.
22302 (propagate_binfo_offsets): Remove.
22303 (layout_basetypes): Remove.
22304
22305 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22306
22307 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22308 (BINFO_PRIMARY_MARKED_P): New macro.
22309 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22310 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22311 (mark_primary_bases): New function.
22312 (unmark_primary_bases): Likewise.
22313 * search.c (get_abstract_virtuals_1): Remove.
22314 (dfs_mark_primary_bases): New function.
22315 (mark_primary_bases): Likewise.
22316 (dfs_unmark_primary_bases): Likewise.
22317 (unmark_primary_bases): Likewise.
22318 (dfs_get_pure_virtuals): Likewise.
22319
22320 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22321
22322 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22323 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22324 (modify_one_vtable): Adjust.
22325 (fixup_vtable_deltas1): Likewise.
22326 (override_one_vtable): Likewise.
22327 * search.c (get_abstract_virtuals_1): Likewise.
22328 (get_pure_virtuals): Likewise.
22329 (expand_upcast_fixups): Likewise.
22330 * tree.c (debug_binfo): Likewise.
22331
22332 * class.c (build_vtable): Don't return a value. Don't rebuild
22333 vtables for bases that have already been handled.
22334 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22335 already been handled.
22336 (modify_one_vtable): Adjust accordingly.
22337 (fixup_vtable_deltas1): Likewise.
22338 (finish_struct_1): Likewise.
22339
22340 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
22341
22342 * call.c (build_new_method_call): Also check destructors.