]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
dccc52680b2d31bbcb6622c8dc197da5e3c959c1
[gcc.git] / gcc / cp / ChangeLog
1 Sun Sep 7 13:15:14 CEST 2003 Jan Hubicka <jh@suse.cz>
2
3 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
4 Avoid re-emitting variables in unit-at-a-time mode.
5
6 2003-09-06 Mark Mitchell <mark@codesourcery.com>
7
8 PR c++/11687
9 * call.c (standard_conversion): Improve comments.
10 (perform_direct_initialization): Make sure we return an expression
11 of the correct type.
12 * typeck.c (build_static_cast): Check for ambiguity and
13 accessibility when performing conversions.
14
15 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
16
17 * cp-tree.h (add_binding): Remove declaration.
18 * name-lookup.h (supplement_binding): Declare.
19 * decl.c (add_binding): Move to name-lookup.c.
20 (push_local_binding): Adjust.
21 (push_class_binding): Likewise.
22 (set_identifier_type_value_with_scope): Likewise.
23 * name-lookup.c (supplement_binding): Rename from add_binding.
24 Return a bool. Improve documentation.
25 (set_namespace_binding): Adjust.
26 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
27
28 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
29
30 PR c++/11794
31 * class.c (pushclass): Push dependent using decls for nested
32 classes of templates too.
33
34 2003-09-06 Roger Sayle <roger@eyesopen.com>
35
36 PR c++/11409
37 * class.c (resolve_address_of_overloaded_function): When building
38 list of matching non-template function decls, ignore anticipated
39 declarations of undeclared or shadowed GCC builtins.
40
41 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
42
43 PR c++/11595
44 * decl.c (define_label): Remove unreachable timevar pop.
45 Always return the decl, even if the definition is invalid.
46
47 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
48
49 PR c++/12167
50 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
51 unparsed functions queue.
52
53 2003-09-05 Mark Mitchell <mark@codesourcery.com>
54
55 PR c++/12163
56 * call.c (perform_direct_initialization): Correct logic for
57 direct-initialization of a class type.
58
59 PR c++/12146
60 * pt.c (lookup_template_function): Robustify.
61
62 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
63
64 PR c++/11922
65 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
66 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
67 is_type_p to lookup_qualified_name.
68
69 * semantics.c (finish_call_expr): Refactor some code.
70
71 PR c++/12037
72 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
73 (build_min_non_dep): Declare.
74 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
75 (build_min_non_dep): New.
76 * cvt.c (convert_to_void): Don't explicitly copy
77 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
78 * call.c (build_new_method_call): Use build_min_non_dep.
79 * decl2.c (grok_array_decl): Likewise.
80 (build_offset_ref_call_from_tree): Likewise.
81 * typeck.c (finish_class_member_access_expr,
82 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
83 build_x_conditional_expr, build_x_compound_expr): Likewise.
84 (build_static_cast, build_reinterpret_cast,
85 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
86 * typeck2.c (build_x_arrow): Use build_min_non_dep.
87 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
88 template.
89 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
90 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
91 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
92
93 2003-09-04 Richard Henderson <rth@redhat.com>
94
95 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
96 change in cgraph_mark_needed_node arguments.
97
98 2003-09-02 Geoffrey Keating <geoffk@apple.com>
99
100 PR 12161
101 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
102 * tree.c (cp_cannot_inline_tree_fn): Likewise.
103
104 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
105
106 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
107 (expr_sizeof): Replace with ...
108 (cxx_sizeof_or_alignof_expr): ... here.
109 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
110 * parser.c (cp_parser_unary_expression): Commonize alignof and
111 sizeof handling.
112 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
113 substitution.
114 * semantics.c (finish_sizeof, finish_alignof): Remove.
115 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
116 becomes bool. Set TREE_READONLY.
117 (expr_sizeof): Replace with ...
118 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
119
120 2003-09-04 Mark Mitchell <mark@codesourcery.com>
121
122 Remove cast-as-lvalue extension.
123 * call.c (build_conditional_expr): Correct formatting.
124 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
125 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
126 * cp-tree.h (non_cast_lvalue_p): Remove.
127 (real_non_cast_lvalue_p): Remove.
128 (non_cast_lvalue_or_else): Remove.
129 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
130 (real_lvalue_p): Adjust call to lvalue_p_1.
131 (non_cast_lvalue_p): Remove.
132 (non_cast_lvalue_or_else): Remove.
133 (lvalue_p): Adjust call to lvalue_p_1.
134 (lvalue_or_else): Simplify.
135 * typeck.c (build_unary_op): Use lvalue_or_else, not
136 non_cast_lvalue_or_else.
137 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
138
139 2003-09-03 DJ Delorie <dj@redhat.com>
140
141 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
142
143 2003-09-03 Mark Mitchell <mark@codesourcery.com>
144
145 PR c++/12053
146 * class.c (include_empty_classes): Correct logic for ABI version 1.
147
148 2003-09-03 Richard Henderson <rth@redhat.com>
149
150 * optimize.c (optimize_function): Push/pop ggc context around
151 the call to optimize_inline_calls.
152
153 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
154
155 PR c++/11553
156 * parser.c (cp_parser_decl_specifier_seq): Add check for a
157 duplicate friend decl-specifier.
158
159 2003-09-02 Mark Mitchell <mark@codesourcery.com>
160
161 PR c++/11847
162 * pt.c (convert_nontype_argument): Correct representation of
163 REFERENCE_TYPE expressions.
164
165 PR c++/11808
166 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
167 (finish_call_expr): Change prototype.
168 * parser.c (cp_parser_postfix_expression): Adjust call to
169 finish_call_expr.
170 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
171 * semantics.c (finish_call_expr): Add koenig_p parameter.
172
173 2003-09-01 Mark Mitchell <mark@codesourcery.com>
174
175 PR c++/12114
176 * cp-tree.h (initialize_reference): Change prototype.
177 * call.c (initialize_reference): Add cleanup parameter.
178 * decl.c (grok_reference_init): Likewise.
179 (check_initializer): Likewise.
180 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
181 (duplicate_decls): When replacing an anticipated builtin, do not
182 honor TREE_NOTHROW.
183 * typeck.c (convert_for_initialization): Correct call to
184 initialize_reference.
185
186 PR c++/11972
187 * pt.c (dependent_type_p_r): Pass only the innermost template
188 arguments to any_dependent_template_arguments_p.
189
190 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
191
192 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
193 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
194 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
195 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
196 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
197
198 2003-08-29 Mark Mitchell <mark@codesourcery.com>
199
200 PR c++/12093
201 * pt.c (build_non_dependent_expr): Do not build a
202 NON_DEPENDENT_EXPR for a STRING_CST.
203
204 PR c++/11928
205 * search.c (add_conversions): Avoid adding two conversion
206 operators for the same type.
207
208 2003-08-29 Mark Mitchell <mark@codesourcery.com>
209
210 PR c++/6196
211 * pt.c (tsubst_copy_and_build): Correct handling of
212 address-of-label extension.
213 * semantics.c (finish_goto_stmt): The address of a label must go
214 through the lvalue-to-rvalue conversion.
215
216 2003-08-29 Richard Henderson <rth@redhat.com>
217 Jason Merrill <jason@redhat.com>
218
219 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
220 (LANG_HOOKS_RTL_EXPAND_STMT): New.
221 * cp-tree.h (cxx_expand_function_start): Declare.
222 * decl.c (start_function): Use allocate_struct_function.
223 Move stmts_are_full_exprs_p assertion from expand_body.
224 Do not free_after_parsing or free_after_compilation.
225 (cxx_push_function_context): Move code to set struct function
226 data from genrtl_start_function.
227 * optimize.c (optimize_function): Don't inc/dec function_depth.
228 * semantics.c (expand_body): Use tree_rest_of_compilation.
229 (cxx_expand_function_start): Rename from genrtl_start_function,
230 omit bits done by tree_rest_of_compilation.
231 (genrtl_finish_function): Remove.
232 (clear_decl_rtl): Move to ../tree-optimize.c.
233
234 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
235
236 PR c++/11811
237 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
238 function.
239 * cxx-pretty-print.h: Declare.
240 * error.c (dump_template_parameter): Use it.
241 (dump_type): Likewise.
242
243 2003-08-28 Mark Mitchell <mark@codesourcery.com>
244
245 * init.c (decl_constant_value): Deal with COND_EXPR specially.
246 * call.c (build_conditional_expr): Revert previous patch.
247
248 PR optimization/5079
249 * call.c (build_conditional_expr): Use decl_constant_value to
250 simplify the arguments.
251
252 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
253
254 * parser.c (struct cp_token): Use enum bitfields.
255 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
256 512B allocation unit.
257 (cp_parser_token_tree_map_node): Use enum bitfields.
258
259 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
260
261 PR c++/11871
262 * decl.c (push_class_level_binding): Correct old_decl value from
263 my 2003-07-29 reorganization.
264
265 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
266 (build_new_method_call): Add goto finish.
267 * semantics.c (simplify_aggr_init_exprs_r): Don't set
268 TREE_SIDE_EFFECTS on a call.
269
270 2003-08-25 Richard Henderson <rth@redhat.com>
271
272 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
273
274 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
275
276 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
277 (cxx_pretty_printer): Adjust base type.
278 (pp_cxx_function_specifier): Declare.
279 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
280 (pp_cxx_left_paren): Likewise.
281 (pp_cxx_right_paren): Likewise.
282 (pp_cxx_dot): Likewise.
283 (pp_cxx_arrow): Likewise.
284 (pp_cxx_semicolon): Likewise.
285 (pp_cxx_identifier): Likewise.
286 (pp_cxx_cv_qualifier_seq): Likewise.
287 (pp_cxx_storage_class_specifier): Likewise.
288 (pp_cxx_expression_list): Likewise.
289 (pp_cxx_space_for_pointer_operator): Likewise.
290 (pp_cxx_init_declarator): Likewise.
291 (pp_cxx_call_argument_list): Likewise.
292 (pp_cxx_nonconsecutive_character): Tidy.
293 (pp_cxx_conversion_function_id): New function.
294 (pp_cxx_template_id): Likewise.
295 (pp_cxx_template_keyword_if_needed): Likewise.
296 (pp_cxx_nested_name_specifier): Likewise.
297 (pp_cxx_unqualified_id): Tidy
298 (pp_cxx_qualified_id): Handle more nodes.
299 (pp_cxx_primary_expression): Tidy.
300 (pp_cxx_postfix_expression): Likewise.
301 (pp_cxx_new_expression): Tidy.
302 (pp_cxx_delete_expression): Likewise.
303 (pp_cxx_cast_expression): New function.
304 (pp_cxx_pm_expression): Tidy.
305 (pp_cxx_conditional_expression): Likewise.
306 (pp_cxx_assignment_operator): New function.
307 (pp_cxx_assignment_expression): Tidy.
308 (pp_cxx_expression): New function.
309 (pp_cxx_function_specifier): Likewise.
310 (pp_cxx_decl_specifier_seq): Likewise.
311 (pp_cxx_simple_type_specifier): Tidy.
312 (pp_cxx_type_specifier_seq): Likewise.
313 (pp_cxx_ptr_operator): New function.
314 (pp_cxx_implicit_parameter_type): Likewise.
315 (pp_cxx_parameter_declaration): Tidy.
316 (pp_cxx_parameter_declaration_clause): New function.
317 (pp_cxx_exception_specification): Likewise.
318 (pp_cxx_direct_declarator): Tidy.
319 (pp_cxx_declarator): Likewise.
320 (pp_cxx_ctor_initializer): New function.
321 (pp_cxx_function_definition): Likewise.
322 (pp_cxx_abstract_declarator): Tidy.
323 (pp_cxx_direct_abstract_declarator): Likewise.
324 (pp_cxx_type_id): Likewise.
325 (pp_cxx_exception_declaration): New function.
326 (pp_cxx_statement): Likewise.
327 (pp_cxx_simple_declaration): Likewise.
328 (pp_cxx_template_parameter_list): Likewise.
329 (pp_cxx_template_parameter): Likewise.
330 (pp_cxx_template_declaration): Likewise.
331 (pp_cxx_explicit_specialization): Likewise.
332 (pp_cxx_explicit_instantiation): Likewise.
333 (pp_cxx_declaration): Tidy.
334 (pp_cxx_pretty_printer_init): Initialize more fields.
335
336 2003-08-25 Mark Mitchell <mark@codesourcery.com>
337
338 PR c++/8795
339 * cp-tree.h (build_cplus_method_type): Remove.
340 * call.c (standard_conversion): Use build_method_type_directly
341 instead of build_cplus_method_type.
342 * class.c (build_clone): Likewise.
343 (adjust_clone_args): Likewise.
344 * decl.c (build_ptrmem_type): Likewise.
345 (grokdeclarator): Likewise.
346 (check_function_type): Likewise.
347 * decl2.c (grok_method_quals): Likewise.
348 (maybe_retrofit_in_chrg): Likewise.
349 * pt.c (copy_default_args_to_explicit_spec): Likewise.
350 (tsubst_function_type): Likewise.
351 (tsubst): Likewise.
352 * tree.c (build_cplus_method_type): Remove.
353 * typeck.c (merge_types): Use build_method_type_directly.
354
355 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
356
357 PR c++/3765
358 * search.c (dfs_access_in_type): Fix typo in comment.
359 (dfs_accessible_queue_p): Likewise.
360 (dfs_accessible_p): Only terminate when a friend is found.
361 (accessible_p): Return immediately if access_in_type allows
362 access.
363
364 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
365
366 PR c++/641, c++/11876
367 * friend.c (add_friend): Add complain parameter.
368 (make_friend_class): Likewise.
369 (do_friend): Adjust add_friend call.
370 * decl.c (grokdeclarator): Adjust make_friend_class call.
371 * parser.c (cp_parser_member_declaration): Likewise.
372 (cp_parser_template_declaration_after_exp): Likewise.
373 * pt.c (instantiate_class_template): Adjust make_friend_class
374 and add_friend call.
375 * cp-tree.h (make_friend_class): Adjust declaration.
376 (add_friend): Likewise.
377
378 2003-08-21 Jason Merrill <jason@redhat.com>
379
380 PR c++/11283
381 * call.c (build_conditional_expr): Ignore cv-qual differences for
382 non-class types.
383
384 2003-08-21 Mark Mitchell <mark@codesourcery.com>
385
386 PR c++/11551
387 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
388 (cp_parser_primary_expression): Adjust call to
389 cp_parser_id_expression.
390 (cp_parser_unqualified_id): Complain about the use of
391 typedef-names in a destructor declarator.
392 (cp_parser_postfix_expression): Adjust call to
393 cp_parser_id_expression.
394 (cp_parser_type_parameter): Likewise.
395 (cp_parser_template_argument): Likewise.
396 (cp_parser_declarator_id): Likewise.
397
398 PR c++/11919
399 * call.c (standard_conversion): Use same_type_p, not pointer
400 equality, to compare types.
401
402 PR c++/10762
403 * parser.c (cp_parser_using_declaration): Check for invalid uses
404 of template-ids here...
405 * decl2.c (do_class_using_decl): ... rather than here.
406
407 2003-08-20 Mark Mitchell <mark@codesourcery.com>
408
409 PR c++/11834
410 * pt.c (more_specialized): Bump processing_template_decl.
411
412 2003-08-21 Jason Merrill <jason@redhat.com>
413
414 PR c++/11614
415 * decl.c (grokdeclarator): Recognize a flexible array based on the
416 type, not the form of the declarator.
417
418 2003-08-20 Jason Merrill <jason@redhat.com>
419
420 * semantics.c (simplify_aggr_init_expr): Split out from
421 simplify_aggr_init_exprs_r. Convert slot address to match
422 the return type.
423 * cp-tree.h: Declare it.
424 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
425 DECL_NAME of a user variable.
426
427 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
428
429 PR c++/11945
430 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
431 COMPOUND_EXPR.
432 * semantics.c (finish_expr_stmt): Always convert to void.
433 * typeck.c (build_x_compound_exp): Always convert to void.
434
435 2003-08-19 Mark Mitchell <mark@codesourcery.com>
436
437 PR c++/11684
438 * cp-tree.h (grok_op_properties): Change prototype.
439 * decl.c (grok_op_properties): Add complain parameter.
440 (grokfndecl): Pass it.
441 * pt.c (tsubst_decl): Adjust accordingly.
442
443 PR c++/10926
444 * decl.c (start_method): Return immediately if push_template_decl
445 does not like the declaration.
446 * pt.c (push_template_decl_real): Disallow member template
447 destructors.
448
449 PR c++/11036
450 * cp-tree.h (add_binding): Add prototype.
451 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
452 (maybe_warn_about_overly_private_class): Use
453 CLASSTYPE_DESTRUCTORS.
454 (pushclass): Adjust call to set_identifier_type_value.
455 * decl.c (add_binding): Give it external linkage.
456 (push_local_binding): Adjust call to add_binding.
457 (push_class_binding): Likewise.
458 (set_identifier_type_value_with_scope): Change prototype. Use
459 add_binding for global bindings.
460 (set_identifier_type_value): Adjust accordingly.
461 (pushtag): Likewise.
462 (pushdecl): Use set_identifier_type_value, not
463 set_identifier_type_value_with_scope.
464 (pushdecl_namespace_level): Adjust calls to
465 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
466 (pushdecl_class_level): Likewise.
467 (lookup_tag): Use select_decl.
468 (select_decl): Improve comment.
469 (record_builtin_type): Do not call pushdecl.
470 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
471 (cp_finish_decl): Adjust call to set_identifier_type_value.
472 (check_elaborated_type_specifier): Improve checks for invalid uses
473 of typedefs.
474 (xref_tag): Adjust call to check_elaborated_type_specifier.
475 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
476 * name-lookup.c (set_namespace_binding): Use add_binding.
477 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
478 rather than an IDENTIFIER_NODE, to represent built-in types, if
479 requested by the caller.
480 (cp_parser_postfix_expression): Adjust call.
481 (cp_parser_type_specifier): Likewise.
482 (cp_parser_elaborated_type_specifier): Adjust call to
483 check_elaborated_type_specifier.
484 * typeck2.c (build_functional_cast): Do not perform name lookups.
485
486 PR c++/10717
487 * decl.c (expand_static_init): Remove unncessary code.
488
489 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
490
491 PR c++/10538, PR c/5582
492 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
493
494 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
495
496 PR c++/11174
497 * init.c (build_offset_ref): Perform access checking for
498 pointer to member correctly.
499
500 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
501
502 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
503
504 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
505
506 PR c++/11957
507 * cp-tree.h (finish_stmt_expr): Add bool parameter.
508 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
509 adjust the stmt_expr here.
510 (build_vec_init): Use finish_stmt_expr_expr, convert result to
511 array type.
512 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
513 call.
514 * pt.c (tsubst_copy): Likewise.
515 * semantics.c (finish_stmt_expr): Add parameter.
516
517 * pt.c (instantiate_class_template): Push to class's scope before
518 tsubsting base.
519
520 Sun Aug 17 10:05:38 CEST 2003 Jan Hubicka <jh@suse.cz>
521
522 PR C++/11702
523 * semantics.c (finish_id_expression): Mark all functions as used.
524
525 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
526
527 PR c++/11512
528 * cvt.c (convert_to_void): Indicate which side of conditional has
529 no effects, and rhs of comma operator. Test for no sideeffect
530 expressions here and always build a convert expr.
531 * init.c (expand_default_init): Convert the init to void.
532 * typeck.c (build_x_compound_expr): Do not check for side effects
533 here.
534 (build_compound_expr): Do not convert lhs when building a
535 template.
536
537 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
538
539 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
540 * decl2.c (build_offset_ref_call_from_tree): Use
541 build_non_dependent_expr.
542 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
543 * pt.c (build_non_dependent_expr): Set operand.
544
545 2003-08-14 Jan Hubicka <jh@suse.cz>
546
547 * decl2.c (mark_member_pointers): Rename to...
548 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
549 (lower_function): Update call.
550 * except.c (eh_type_info): Break out from ...
551 (build_eh_type): ... here; tinfo is already used.
552 (finish_eh_spec_block): Mark tinfos as used.
553 * semantics.c (finish_handler_params): Mark tinfo as used.
554 * cp-tree.h (eh_type_info): Declare.
555
556 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
557
558 * pt.c (instantiate_class_template): Set location before
559 substuting bases.
560
561 * decl.c (make_typename_type): Use my_friendly_assert.
562 * pt.c (tsubst_aggr_type): Rearrange context substitution.
563
564 Thu Aug 14 12:19:25 CEST 2003 Jan Hubicka <jh@suse.cz>
565
566 * method.c (use_thunk): Expand body directly.
567
568 2003-08-12 Mark Mitchell <mark@codesourcery.com>
569
570 PR c++/11703
571 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
572 determine whether or not to promote types.
573 (convert_for_arg_passing): Likewise.
574 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
575 templates.
576 * pt.c (tsubst_decl): Do not expect it to be set.
577
578 PR c++/9512
579 PR c++/10923
580 * cp-tree.h (check_elaborated_type_specifier): Declare.
581 (handle_class_head): Remove.
582 (note_got_semicolon): Likewise.
583 (note_list_got_semicolon): Likewise.
584 (finish_class_definition): Likewise.
585 * decl.c (check_elaborated_type_specifier): Make it public.
586 Robustify.
587 (handle_class_head): Remove.
588 * parser.c (cp_parser_elaborated_type_specifier): Use
589 check_elaborated_type_specifier.
590 (cp_parser_class_specifier): Do not call finish_class_definition.
591 (cp_parser_class_head): Or handle_class_head. Check for
592 over-qualified names.
593 * semantics.c (finish_class_definition): Remove.
594
595 * parser.c (cp_parser_check_for_definition_in_return_type): New
596 function.
597 (cp_parser_simple_declaration): Adjust call to
598 cp_parser_init_declarator.
599 (cp_parser_decl_specifier_seq): Change type of
600 declares_class_or_enum parameter.
601 (cp_parser_explicit_instantiation): Adjust accordingly.
602 (cp_parser_type_specifier): Change type of
603 declares_class_or_enum parameter.
604 (cp_parser_init_declarator): Add declares_class_or_enum
605 parameter.
606 (cp_parser_parameter_declaration): Adjust call to
607 cp_parser_decl_specifier_seq.
608 (cp_parser_function_definition): Likewise.
609 (cp_parser_member_declaration): Likewise.
610 (cp_parser_single_declaration): Likewise.
611
612 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
613 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
614 (TYPE_OVERLOADS_CALL_EXPR): Remove.
615 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
616 (TYPE_OVERLOADS_ARROW): Likewise.
617 (CLASSTYPE_GOT_SEMICOLON): Likewise.
618 * class.c (check_bases): Do not set them.
619 (finish_struct_1): Likewise.
620 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
621 (build_ptrmemfunc_type): Likewise.
622 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
623 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
624 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
625 * lex.c (note_got_semicolon): Remove.
626 (note_list_got_semicolon): Likewise.
627 * parser.c (cp_parser_simple_declaration): Do not call
628 note_list_got_semicolon.
629 * pt.c (list_eq): Remove.
630 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
631 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
632 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
633 * ptree.c (cxx_print_type): Do not print them.
634 * semantics.c (finish_member_class_template): Do not call
635 note_list_got_semicolon.
636
637 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
638
639 * call.c (standard_conversion): Opaque pointers interconvert.
640
641 * testsuite/g++.dg/other/opaque-3.C: New.
642
643 2003-08-11 Mark Mitchell <mark@codesourcery.com>
644
645 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
646 types correctly.
647
648 2003-08-10 Mark Mitchell <mark@codesourcery.com>
649
650 PR c++/11789
651 * cp-tree.h (get_vbase): Remove.
652 (get_vbase_types): Remove.
653 * init.c (expand_member_init): Correct logic for looking up base
654 classes.
655
656 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
657
658 * error.c (dump_expr): Tidy.
659 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
660 (pp_cxx_begin_template_argument_list): Likewise.
661 (pp_cxx_end_template_argument_list): Likewise.
662 (is_destructor_name): Likewise.
663 (pp_cxx_unqualified_id): Likewise.
664 (pp_cxx_qualified_id): Likewise.
665 (pp_cxx_id_expression): Likewise.
666 (pp_cxx_new_expression): Likewise.
667 (pp_cxx_delete_expression): Likewise.
668 (pp_cxx_pm_expression): Likewise.
669 (pp_cxx_type_specifier): Rework.
670 (pp_cxx_type_id): Likewise.
671 (pp_cxx_primary_expression): Likewise.
672 (pp_cxx_postfix_expression): Likewise.
673 (pp_cxx_unary_expression): Likewise.
674 (pp_cxx_multiplicative_expression): Likewise.
675 (pp_cxx_conditional_expression): Likewise.
676 (pp_cxx_assignment_expression): Likewise.
677 (pp_cxx_pretty_printer_init): Tidy.
678
679 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
680
681 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
682 NODE is always a TREE_VEC of non-zero size.
683 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
684 * decl2.c (arg_assoc): Template args will be a vec.
685 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
686 dump_template_argument_list.
687 (dump_template_parms): Args will be a vec.
688 * parser.c (cp_parser_template_argument_list): Produce a
689 vector, not a list.
690 * pt.c (coerce_template_parms): Args are always vectors.
691 (mangle_class_name_for_template): Likewise.
692 (lookup_template_function): Likewise.
693 (lookup_template_class): Likewise.
694 (tsubst_template_args): Likewise.
695 (tsubst_baselink): Use tsubst_template_args.
696 (tsubst_qualified_id): Likewise.
697 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
698 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
699 (any_dependent_template_args_p): Args are always vectors.
700 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
701
702 PR c++/11670
703 * call.c (convert_like_real): Add rvalue binding error message.
704 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
705 really a cast.
706
707 PR c++/10530
708 * pt.c (dependent_type_p_r): A dependent template-id is a class
709 type with dependent template arguments, or a bound template
710 template parameter.
711 (type_dependent_expression_p): A template function decl cannot
712 have a dependent context.
713
714 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
715
716 PR c++/5767
717 * parser.c (cp_parser_class_name): Return immediately when scope
718 is error_mark_node.
719
720 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
721
722 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
723
724 * cp/call.c (standard_conversion): Support opaque types.
725 Include target.h.
726 (strip_top_quals): Use cp_build_qualified_type instead of
727 TYPE_MAIN_VARIANT.
728
729 * cp/typeck.c (convert_for_assignment): Support opaque types.
730
731 * testsuite/g++.dg/other/opaque-1.C: New.
732
733 * testsuite/g++.dg/other/opaque-2.C: New.
734
735 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
736
737 * decl.c (grokparms): Use cp_build_qualified_type instead
738 TYPE_MAIN_VARIANT.
739
740 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
741
742 * cxx-pretty-print.h: New file.
743 * cxx-pretty-print.c: Likewise.
744 * error.c (scratch_pretty_printer): Change type.
745 (init_error): Tidy.
746 (dump_aggr_type): Likewise.
747 (dump_global_iord): Likewise.
748 (dump_expr): Likewise.
749 (dump_char): Remove.
750 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
751 (cxx_initialize_diagnostics): New function.
752 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
753 (CXX_PRETTY_PRINT_H): New variable.
754 (cp/cxx-pretty-print.o): New rule.
755 (cp/cp-lang.o): Update dependence.
756 (cp/error.o): Likewise.
757
758 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
759
760 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
761 (DECL_DECLARED_INLINE_P): Remove.
762 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
763 if decl is a FUNCTION_DECL. This never made sense, but now it is
764 required to avoid a tree check failure.
765 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
766 * optimize.c (maybe_clone_body): Likewise.
767
768 2003-08-04 Roger Sayle <roger@eyesopen.com>
769
770 * decl.c (cxx_insert_default_attributes): Delete.
771 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
772 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
773
774 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
775
776 PR c++/11704
777 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
778 unknown type.
779
780 PR c++/11766
781 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
782 member functions.
783
784 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
785
786 PR c++/9447
787 * cp-tree.def (USING_DECL): Document its type.
788 * class.c (pushclass): If we're entering a template, push any
789 dependent using decls it has.
790 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
791 a dependent scope.
792 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
793 (tsubst): Remove USING_DECL checks.
794 (type_dependent_expression_p): Remove USING_DECL case.
795 * semantics.c (finish_member_declaration): A USING_DECL's type
796 indicates whether it is dependent.
797
798 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
799
800 * cp-tree.h (pushclass): Remove unneeded parameter.
801 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
802 (push_nested_class): Adjust pushclass call.
803 * pt.c (instantiate_class_template): Likewise.
804 * semantics.c (begin_class_definition): Likewise.
805
806 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
807
808 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
809
810 2003-08-01 Mark Mitchell <mark@codesourcery.com>
811
812 PR c++/11697
813 * decl.c (decls_match): Don't ignore the types of template
814 classes.
815
816 PR c++/11744
817 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
818
819 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
820
821 PR c++/8442, c++/8806
822 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
823 preferred.
824 (check_elaborated_type_specifier): Add allow_template_p
825 parameter. Check tag mismatch and class template.
826 (xref_tag): Add template_header_p parameter. Add assertion
827 that name is an IDENTIFIER_NODE. Remove implicit typename
828 warning. Simplify lookup process if globalize is true.
829 (cxx_init_decl_processing): Adjust call to xref_tag.
830 (xref_tag_from_type): Likewise.
831 * decl2.c (handle_class_head): Likewise.
832 * parser.c (cp_parser_elaborated_type_specifier,
833 cp_parser_class_head): Likewise.
834 * rtti.c (init_rtti_processing, build_dynamic_cast1,
835 tinfo_base_init, emit_support_tinfos): Likewise.
836 * class.c (is_base_of_enclosing_class): Remove.
837 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
838 template template argument.
839 * cp-tree.h (xref_tag): Adjust declaration.
840 (is_base_of_enclosing_class): Remove.
841 * NEWS: Document template template argument change.
842
843 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
844
845 * parser.c (cp_parser_init_declarator,
846 cp_paser_member_declaration): Reformat.
847 * pt.c (lookup_template_class, type_unification_real, unify,
848 type_dependent_expression_p): Reformat.
849
850 PR c++/11295
851 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
852 tf_stmt_expr_body.
853 (finish_stmt_expr_expr): Declare.
854 * parser.c (cp_parser_primary_expression): Tell
855 cp_parser_compount_statement that it is a statement expression.
856 (cp_parser_statement, cp_parser_labeled_statement,
857 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
858 in_statement_expr_p parameter.
859 (cp_parser_expression_statement): Likewise. Call
860 finish_stmt_expr_expr for final expression of a statement
861 expression.
862 (cp_parser_for_init_statement,
863 cp_parser_implicitly_scoped_statement,
864 cp_parser_already_scoped_statement, cp_parser_function_definition,
865 cp_parser_try_block, cp_parser_handled): Adjust.
866 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
867 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
868 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
869 * semantics.c (finish_expr_stmt): Do not deal with statement
870 expressions.
871 (begin_stmt_expr): Clear last_expr_type.
872 (finish_stmt_expr_expr): New.
873 (finish_stmt_expr): Process the value expression.
874
875 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
876 compound expr inside the target's initializer.
877
878 PR c++/11525
879 * parser.c (cp_parser_primary_expression): Do not set
880 non-constant-p merely because it is a dependent scope.
881
882 PR c++/9447
883 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
884 * semantics.c (finish_expr_stmt): Do not convert to void in a
885 template.
886
887 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
888
889 * pt.c (coerce_template_parms): Refactor.
890 (fn_type_unification): Increment processing_template_decl when
891 tsubsting an incomplete set of explicit args.
892
893 PR c++/11347
894 * pt.c (instantiate_class_template): Increment
895 processing_template_decl around the tsubst of a template member
896 class.
897 (tsubst_qualified_id): Assert we do not have a dependent scope.
898
899 * pt.c (coerce_template_template_parms, lookup_template_class,
900 can_complete_type_without_circularity, instantiate_class_template,
901 tsubst_decl, unify): Reformat.
902
903 Thu Jul 31 01:07:41 CEST 2003 Jan Hubicka <jh@suse.cz>
904
905 * decl2.c (maybe_make_one_only): Use mark_referenced.
906 * method.c (use_thunk): Likewsie.
907
908 Wed Jul 30 19:12:48 CEST 2003 Jan Hubicka <jh@suse.cz>
909
910 * class.c (build_vtable_entry_ref): Kill.
911 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
912 (build_vfn_ref): Do not call build_vtable_entry_ref.
913 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
914 * cp-tree.h (prepare_assemble_variable): Kill.
915 * cp-decl.c (prepare_assemble_variable): Kill.
916
917 2003-07-29 Geoffrey Keating <geoffk@apple.com>
918
919 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
920 of setting valid_pch by hand.
921
922 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
923
924 * decl.c (finish_enum): Initialize underlying_type.
925
926 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
927
928 PR c++/9447
929 * decl.c (add_binding): Add bval local variable.
930 (push_class_level_binding): Likewise. Allow a USING_DECL to be
931 pushed.
932 * decl2.c (do_class_using_decl): The type of a using decl is
933 unknown.
934 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
935 function call lookup code.
936 * pt.c (tsubst): A USING_DECL will have unknown type.
937 (tsubst_copy_and_build): Allow a using decl.
938 (type_dependent_expression_p): A USING_DECL will make it
939 dependent.
940 * semantics.c (finish_member_declaration): Push a dependent using
941 declaration.
942
943 2003-07-28 Mark Mitchell <mark@codesourcery.com>
944
945 PR c++/11530
946 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
947 * semantics.c (finish_id_expression): Call mark_used for all
948 declarations.
949
950 2003-07-28 Mark Mitchell <mark@codesourcery.com>
951
952 PR c++/11667
953 * call.c (standard_conversion): Allow all integral->enumeral
954 conversions, after marking them as bad.
955 * decl.c (finish_enum): Make sure that all enumerators are
956 properly converted to the underlying type.
957 (build_enumerator): Set DECL_CONTEXT for namespace-scope
958 enumeration types.
959 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
960 (tsubst_enum): Tidy.
961
962 * Make-lang.in (typeck.o): Depend on convert.h.
963 (class.o): Likewise.
964 (rtti.o): Likewise.
965 * call.c: Include convert.h.
966 (convert_arg_to_ellipsis): Use convert_to_real.
967 * class.c: Include convert.h.
968 (build_base_path): Use convert_to_integer.
969 * rtti.c: Include convert.h.
970 (build_headof): Use convert_to_integer.
971 * typeck.c: Include convert.h.
972 (decay_conversion): Use convert_to_integer.
973 (build_unary_op): Use build_nop.
974 (get_delta_difference): Use convert_to_integer.
975 (build_ptrmemfunc): Avoid unncessary conversions.
976
977 Mon Jul 28 23:55:10 CEST 2003 Jan Hubicka <jh@suse.cz>
978
979 * decl2.c (mark_member_pointers): Verify that member pointer points to
980 the function.
981
982 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
983
984 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
985 (finish_compound_stmt): Remove no scope arg.
986 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
987 end_compound_stmt calls.
988 (expand_static_init, begin_destructor_body, begin_function_body,
989 finish_function_body): Likewise.
990 * decl2.c (start_objects, finish_objects,
991 start_static_storage_duration_function,
992 finish_static_storage_duration_function): Likewise.
993 * init.c (begin_init_stmts, finish_init_stmts,
994 construct_virtual_base, build_vec_init): Likewise.
995 * method.c (do_build_assign_ref, synthesize_method): Likewise.
996 * parser.c (cp_parser_compound_statement,
997 cp_parser_implicitly_scoped_statement,
998 cp_parser_already_scoped_statement): Likewise.
999 * pt.c (tsubst_expr): Likewise.
1000 * semantics.c (begin_compound_stmt): No scope arg is a bool.
1001 (finish_compound_stmt): Remove no scope arg.
1002
1003 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1004 always dyadic.
1005
1006 2003-07-27 Mark Mitchell <mark@codesourcery.com>
1007
1008 * call.c (standard_conversion): Tweak handling of
1009 pointer-to-member types.
1010 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1011 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1012 pointer-to-data member types.
1013
1014 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
1015
1016 * parser.c (cp_parser_type_parameter): Reformat.
1017 (cp_parser_parameter_declaration): Deprecate default args where
1018 not allowed.
1019
1020 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
1021
1022 * cfns.h: Rebuilt.
1023
1024 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1025 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1026 * init.c (begin_init_stmts): Make static. Return is_global
1027 value. Always call begin_stmt_expr.
1028 (finish_init_stmts): Make static. Add is_global parm. Always
1029 building a stmt tree.
1030 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1031 (build_vec_init): Likewise. Always building a stmt tree.
1032 (expand_default_init): Always building a stmt tree.
1033 (get_temp_regvar): Likewise.
1034 * semantics.c (begin_global_stmt_expr,
1035 finish_global_stmt_expr): Remove.
1036
1037 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1038
1039 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1040 (build_x_compound_expr_from_list): Declare.
1041 * typeck.c (build_x_compound_expr_from_list): New.
1042 (build_x_compound_expr): Adjust.
1043 (build_compound_expr): Remove unreachable code. Take two
1044 parameters, adjust.
1045 * decl.c (grok_reference_init): Use
1046 build_x_compound_expr_from_list.
1047 (expand_static_init): Adjust build_compound_expr call.
1048 (cxx_maybe_build_cleanup): Likewise.
1049 * init.c (perform_member_init): Use
1050 build_x_compound_expr_from_list.
1051 (build_new_1): Likewise.
1052 (build_vec_delete): Adjust build_compound_expr calls.
1053 (build_vbase_delete): Likewise.
1054 * typeck2.c (store_init_value): Use
1055 build_x_compound_expr_from_list.
1056 (build_functional_cast): Likewise.
1057
1058 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1059
1060 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
1061 * decl.c (make_typename_type): Pass it.
1062 * pt.c (lookup_template_class): Use it.
1063 (resolve_typename_type): Pass it.
1064 * semantics.c (finish_template_type): Pass it.
1065
1066 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1067
1068 PR c++/11617
1069 * cp-tree.h (qualified_name_lookup_error): Declare.
1070 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
1071 errors.
1072 (tsubst_expr) <DECL_STMT case>: Likewise.
1073 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
1074 * semantics.c (qualified_name_lookup_error): New, broken out of ...
1075 (finish_id_expression): ... here. Use it.
1076
1077 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
1078
1079 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
1080
1081 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1082
1083 PR c++/11596
1084 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
1085 (tsubst_template_arg): New.
1086 (tsubst_template_arg_vector): Rename to ...
1087 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
1088 tsubst_template_arg.
1089 (coerce_template_parms): Use tsubst_template_arg for default
1090 value.
1091 (tsubst_template_parms): Likewise.
1092 (tsubst_aggr_type): Adjust.
1093 (tsubst_decl): Likewise.
1094 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
1095 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
1096
1097 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1098
1099 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
1100 * error.c: Use the new pretty-printer framework.
1101
1102 2003-07-24 Per Bothner <pbothner@apple.com>
1103
1104 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
1105 which causes errors messages to incorrectly mention included files.
1106
1107 2003-07-24 Mark Mitchell <mark@codesourcery.com>
1108
1109 * cp-tree.h (convert_to_base_statically): Declare.
1110 * call.c (build_special_member_call): Convert INSTANCE to the base
1111 type.
1112 * class.c (convert_to_base_statically): New method.
1113 * init.c (construct_virtual_base): Use it.
1114 * method.c (do_build_assign_ref): Fix typo in comment.
1115
1116 2003-07-24 Jason Merrill <jason@redhat.com>
1117
1118 * decl.c: Just set truthvalue_* to boolean_*.
1119
1120 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
1121
1122 * decl.c (reshape_init): Remove unreachable code.
1123
1124 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1125
1126 PR c++/11513
1127 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
1128
1129 2003-07-23 Mark Mitchell <mark@codesourcery.com>
1130
1131 PR c++/11645
1132 * cp-tree.h (accessible_base_p): Declare.
1133 * call.c (build_over_call): Use it.
1134 * search.c (accessible_base_p): New function, split out from ...
1135 (lookup_base): ... here.
1136
1137 PR c++/11517
1138 * call.c (build_conditional_expr): Use perform_implicit_conversion
1139 and error_operand_p. Robustify.
1140 * typeck.c (build_unary_op): Use perform_implicit_conversion.
1141
1142 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
1143
1144 PR c++/10953
1145 * parser.c (cp_parser_nested_name_specifier): Reset scope on
1146 failure.
1147 (cp_parser_elaborated_type_specifier): Likewise.
1148
1149 2003-07-22 Mark Mitchell <mark@codesourcery.com>
1150
1151 Eliminate use of POINTER_TYPE for pointers-to-members.
1152 * call.c (standard_conversion): Rework pointer-to-member handling.
1153 Add comments.
1154 (add_builtin_candidate): Likewise.
1155 (resolve_scoped_fn_name): Remove.
1156 (build_conditional_expr): Rework pointer-to-member handling.
1157 (compare_ics): Likewise.
1158 * class.c (check_field_decls): Use TYPE_PTR_P.
1159 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1160 handling.
1161 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1162 (TYPE_PTRMEM_P): Add comment.
1163 (TYPE_PTR_P): Simplify.
1164 (TYPE_PTROB_P): Correct definition.
1165 (TYPE_PTR_TO_MEMBER_P): New macro.
1166 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1167 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1168 (resolved_scoped_fn_name): Remove declaration.
1169 (build_offset_ref): Change prototype.
1170 (resolve_offset_ref): Remove.
1171 (comp_target_types): Remove.
1172 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1173 handling.
1174 (convert_to_reference): Use can_convert.
1175 (ocp_convert): Improve error handling. Rework pointer-to-member
1176 handling.
1177 (perform_qualification_conversions): Rework pointer-to-member
1178 handling.
1179 * decl.c (build_ptrmem_type): Handle functions too.
1180 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1181 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1182 (grokparms): Remove OFFSET_TYPE error message.
1183 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1184 * error.c (dump_type_prefix): Likewise.
1185 * expr.c (cplus_expand_constant): Use build_nop.
1186 * init.c (build_offset_ref): Add address_p parameter. Fold in
1187 necessary bits from resolve_offset_ref.
1188 (resolve_offset_ref): Remove.
1189 * parser.c (cp_parser_postfix_expression): Remove special case
1190 code for OFFSET_TYPE.
1191 * pt.c (convert_nontype_argument): Rework pointer-to-member
1192 handling.
1193 (convert_template_argument): Likewise.
1194 (unify): Likewise.
1195 (invalid_nontype_parm_type_p): Likewise.
1196 (dependent_type_p_r): Likewise.
1197 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1198 (target_incomplete_p_): Rework pointer-to-member
1199 handling.
1200 (get_pseudo_ti_init): Likewise.
1201 (get_pseudo_ti_desc): Likewise.
1202 * semantics.c (finish_qualified_id_expr): Adjust call to
1203 build_offset_ref. Remove use of resolve_offset_ref.
1204 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1205 * typeck.c (target_type): Use TYPE_PTRMEM_P.
1206 (type_unknown_p): Remove obsolete code about the time before
1207 non-dependent expressions were handled correctly.
1208 (qualify_type_recursive): Remove.
1209 (composite_pointer_type_r): New function.
1210 (composite_pointer_type): Use it.
1211 (merge_types): Remove dead comments.
1212 (comp_cv_target_types): Remove.
1213 (comp_target_types): Likewise.
1214 (comp_target_parms): Likewise.
1215 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1216 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1217 (build_binary_op): Do not use of comp_target_types.
1218 (pointer_diff): Remove OFFSET_TYPE case.
1219 (build_unary_op): Adjust pointer-to-member handling.
1220 (unary_complex_lvalue): Likewise.
1221 (check_for_casting_away_constness): Add description parameter.
1222 (build_static_cast): Pass it.
1223 (build_reinterpret_cast): Use check_for_casting_away_constness.
1224 (build_const_cast): Adjust pointer-to-member handling.
1225 (build_c_cast): Likewise.
1226 (convert_for_assignment): Remove OFFSET_TYPE error message.
1227 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1228 (comp_ptr_ttypes_reinterpret): Remove.
1229 (casts_away_constness_r): Adjust pointer-to-member handling.
1230 (casts_away_constness): Liekwise.
1231 (strip_all_pointer_quals): Remove.
1232 * typeck2.c (digest_init): Adjust pointer-to-member handling.
1233 (build_m_component_ref): Likewise.
1234
1235 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
1236
1237 * lex.c (unqualified_fn_lookup_error): Mention that the error
1238 message needs to be kept in synch with the manual.
1239
1240 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
1241
1242 PR c++/11614
1243 * decl.c (grokdeclarator): An array member is only a flexible
1244 array member if the field itself is the array.
1245
1246 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1247
1248 PR c++/10793
1249 * decl.c (xref_basetypes): Handle error_mark_node.
1250
1251 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
1252
1253 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1254 * tree.c (lvalue_p_1): Set it.
1255 * class.c (check_field): Don't allow non-packed non-POD fields to
1256 be packed.
1257 * call.c (reference_binding): Need a temporary for all bitfield
1258 and packed fields.
1259 (convert_like_real): Check it is ok to make a temporary here.
1260
1261 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
1262
1263 * cp-tree.h (hack_identifier): Remove.
1264 * method.c (hack_identifier): Remove.
1265 * semantics.c (finish_id_expression): Expand hack_identifier
1266 here. Simplify.
1267
1268 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1269
1270 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1271 semantics.c typeck.c: Remove unnecessary casts.
1272
1273 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
1274
1275 * cp-tree.h (hack_identifier): Remove.
1276 * method.c (hack_identifier): Remove.
1277 * semantics.c (finish_id_expression): Expand hack_identifier
1278 here. Simplify.
1279
1280 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
1281
1282 * cp-tree.h (finish_non_static_data_member): Add object param.
1283 * method.c (hack_identifier): Adjust.
1284 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1285 again for a FIELD_DECL.
1286 * semantics.c (finish_non_static_data_member): Add object
1287 parameter. Always save the DECL in the COMPONENT_REF.
1288 * call.c (resolve_scoped_fn_name): Adjust.
1289
1290 2003-07-17 Zack Weinberg <zack@codesourcery.com>
1291
1292 * pt.c (get_bindings): Make definition consistent with
1293 forward declaration.
1294
1295 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1296
1297 PR c++/7809
1298 * friend.c (add_friend): Check access for member functions
1299 and templates.
1300
1301 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1302
1303 PR c++/10668
1304 * typeck.c (build_class_member_access_expr): Improve diagnostic.
1305
1306 2003-07-16 Mark Mitchell <mark@codesourcery.com>
1307
1308 PR c++/11547
1309 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1310 macro.
1311 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1312 * decl.c (duplicate_decls): Merge
1313 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1314 * parser.c (cp_parser_postfix_expression): Adjust call to
1315 cp_parser_initializer_list and
1316 cp_parser_parenthesized_expression_list.
1317 (cp_parser_parenthesized_expression_list): Add non_constant_p.
1318 (cp_parser_new_placement): Adjust call to
1319 cp_parser_parenthesized_expression_list.
1320 (cp_parser_direct_new_declarator): Likewise.
1321 (cp_parser_conditional_expression): Remove.
1322 (cp_parser_constant_expression): Parse an assignment-expression,
1323 not a conditional-expression.
1324 (cp_parser_simple_declaration): Resolve expression/declaration
1325 ambiguity more quickly.
1326 (cp_parser_mem_initializer): Adjust call to
1327 cp_parser_parenthesized_expression_list.
1328 (cp_parser_init_declarator): Keep track of whether or not the
1329 initializer is a constant-expression.
1330 (cp_parser_initializer): Add non_constant_p parameter.
1331 (cp_parser_initializer_clause): Likewise.
1332 (cp_parser_initializer_list): Likewise.
1333 (cp_parser_attribute_list): Adjust call to
1334 cp_parser_parenthesized_expression_list.
1335 (cp_parser_functional_cast): Likewise.
1336 * pt.c (tsubst_decl): Copy
1337 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1338 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1339 * semantics.c (finish_id_expression): Use
1340 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1341
1342 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
1343
1344 * lang-options.h: Remove.
1345
1346 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
1347
1348 PR c/10962
1349 * class.c (field_decl_cmp): Remove.
1350 (resort_field_decl_cmp): Remove.
1351 (resort_sorted_fields): Remove.
1352 (add_fields_to_vec): Rename to ...
1353 (add_fields_to_record_type): this.
1354 (finish_struct_1): Change to be using
1355 sorted_fields_type's fields.
1356 * cp-tree.h (lang_decl): In lang_decl_u3
1357 change sorted_fields to be a pointer to
1358 sorted_fields_type.
1359 (resort_sorted_fields): Remove prototype.
1360 * search.c (lookup_field_1): Change to be using
1361 sorted_fields_type's fields.
1362
1363 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1364
1365 PR c++/5421
1366 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1367 is a member of other class.
1368 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
1369 is a specialization of function template.
1370
1371 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1372
1373 PR c++/10903
1374 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
1375 Improve.
1376
1377 2003-07-15 Mark Mitchell <mark@codesourcery.com>
1378
1379 * cp-tree.def (LOOKUP_EXPR): Remove.
1380 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
1381 (LOOKUP_EXPR_GLOBAL): Remove.
1382 (get_bindings): Remove.
1383 (is_aggr_type_2): Remove.
1384 * call.c (resolved_scoped_fn_name): Remove support for
1385 LOOKUP_EXPR.
1386 * decl.c (grokfndecl): Likewise.
1387 (grokdeclarator): Likewise.
1388 * error.c (dump_decl): Likewise.
1389 (dump_expr): Likewise.
1390 * friend.c (do_friend): Likewise.
1391 * init.c (build_offset_ref): Likewise.
1392 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
1393 LOOKUP_EXPRs
1394 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
1395 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
1396 test.
1397 * pt.c (get_bindings): Give it internal linkage.
1398 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
1399 (lookup_template_function): Likewise.
1400 (for_each_tempalte_parm_r): Likewise.
1401 (tsubst_decl): Likewise.
1402 (tsubst_qualified_id): Handle template template parameters.
1403 (tsubst_copy): Remove support for LOOKUP_EXPR.
1404 (tsubst_copy_and_build): Likewise.
1405 (most_general_template): Likewise.
1406 (value_dependent_expression_p): Likewise.
1407 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
1408 always dependent.
1409 * semantics.c (perform_koenig_lookup): Do not create
1410 IDENTIFIER_NODEs.
1411 (finish_fname): Likewise.
1412 (finish_id_expression): Likewise.
1413 * tree.c (is_aggr_type_2): Remove.
1414
1415 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1416
1417 PR c++/11531
1418 * typeck.c (check_return_expr): Fix thinko in diagnostic.
1419
1420 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1421
1422 PR c++/10108
1423 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
1424 error_mark_node.
1425
1426 2003-07-14 Mark Mitchell <mark@codesourcery.com>
1427
1428 PR c++/11509
1429 * pt.c (dependent_scope_ref_p): New function.
1430 (value_dependent_expression_p): Use it.
1431 (type_dependent_expression_p): Likewise.
1432
1433 * pt.c (tsubst_friend_function): Use reregister_specialization.
1434
1435 PR c++/7019
1436 * cp-tree.h (lookup_qualified_name): Adjust prototype.
1437 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
1438 call to is_aggr_type.
1439 * parser.c (cp_parser_lookup_name): Adjust call to
1440 lookup_qualified_name.
1441 * pt.c (tsubst_qualified_id): Likewise.
1442 (tsubst_copy_and_build): Likewise.
1443 * semantics.c (finish_qualified_id_expr): Deal with erroneous
1444 expressions.
1445
1446 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1447
1448 PR c++/11510
1449 * call.c (op_error): Properly format REALPART_EXPR and
1450 IMAGPART_EXPR.
1451 * error.c (dump_expr): Likewise.
1452
1453 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1454
1455 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
1456
1457 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1458
1459 PR c++/5293
1460 * call.c (initialize_reference): Improve diagnostic.
1461
1462 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1463
1464 PR c++/11154
1465 * pt.c (more_specialized_class): Add full_args parameter.
1466 (most_specialized_class): Adjust calls to more_specialized_class.
1467 * cp-tree.h (more_specialized_class): Adjust declaration.
1468
1469 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
1470
1471 * lex.c (enum tree_node_kind): Delete.
1472
1473 2003-07-13 Mark Mitchell <mark@codesourcery.com>
1474
1475 PR c++/11503
1476 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
1477 (SET_DECL_SELF_REFERENCE_P): Likewise.
1478 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
1479 * pt.c (tsubst_decl): Copy it.
1480 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
1481
1482 * pt.c (reregister_specialization): Fix thinko in previous change.
1483
1484 * cp-tree.h (cp_id_kind): New type.
1485 (unqualified_name_lookup_error): Change prototype.
1486 (unqualified_fn_lookup_error): New function.
1487 (do_identifier): Remove.
1488 (do_scoped_id): Likewise.
1489 (tsubst_copy_and_build): Change prototype.
1490 (reregister_specialization): New function.
1491 (perform_koenig_lookup): Likewise.
1492 (finish_id_expression): Likewise.
1493 * call.c (build_method_call): Adjust call to
1494 unqualified_name_lookup_error.
1495 * decl.c (duplicate_decls): Use reregister_specialization.
1496 * lex.c (is_global): Remove.
1497 (unqualified_name_lookup_error): Return a value.
1498 (do_identifier): Remove.
1499 (do_scoped_id): Likewise.
1500 (identifier_typedecl_value): Remove.
1501 (unqualified_fn_lookup_error): New function.
1502 * parser.c (cp_parser_id_kind): Remove.
1503 (cp_parser_non_constant_id_expression): Remove.
1504 (cp_parser_primary_expression): Use finish_id_expression.
1505 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
1506 cp_parser_id_kind.
1507 (cp_parser_postfix_expression): Use perform_koenig_lookup.
1508 (cp_parser_template_argument): Use cp_id_kind.
1509 (cp_parser_fold_non_dependent_expr): Adjust call to
1510 tsubst_copy_and_build.
1511 * pt.c (unregister_specialization): Rename to ...
1512 (reregister_specialization): This.
1513 (tsubst_friend_function): Use it.
1514 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
1515 (tsubst_qualified_id): Likewise.
1516 (tsubst_expr): Likewise.
1517 (tsubst_copy_and_build): Add function_p parameter. Use
1518 finish_id_expression. Introduce RECUR macro.
1519 (tsubst_non_call_postfix_expression): New function.
1520 (regenerate_decl_from_template): Use reregister_specialization.
1521 * semantics.c (perform_koenig_lookup): New function.
1522 (finish_id_expression): Likewise.
1523
1524 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1525
1526 * pt.c (push_access_scope_real): Remove.
1527 (push_access_scope): Move code from push_access_scope_real.
1528 (pop_access_scope): Don't check for TEMPLATE_DECL.
1529 (instantiate_template): Defer access checking during template
1530 substitution.
1531 (regenerate_decl_from_template): Tidy.
1532
1533 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
1534
1535 PR c++/11437
1536 * operators.def: Add definitions for __imag__, __real__.
1537
1538 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
1539
1540 PR c++/11050
1541 * parser.c (cp_parser_expression_list): Rename to ...
1542 (cp_parser_parenthesized_expression_list): ... here. Add attribute
1543 parameter, parse the surounding parentheses.
1544 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
1545 parameters. Return int.
1546 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
1547 (cp_parser_postfix_expression): Adjust function call parsing.
1548 (cp_parser_new_placement): Adjust.
1549 (cp_parser_new_initializer): Likewise.
1550 (cp_parser_cast_expression): Likewise.
1551 (cp_parser_selection_statement): Likewise.
1552 (cp_parser_mem_initializer): Likewise.
1553 (cp_parser_asm_definition): Likewise.
1554 (cp_parser_init_declarator): Likewise.
1555 (cp_parser_declarator): Make
1556 cdtor_or_conv_p an int ptr.
1557 (cp_parser_direct_declarator): Likewise. Check for a parameter
1558 list on cdtors & conv functions.
1559 (cp_parser_initializer): Adjust.
1560 (cp_parser_member_declaration): Adjust.
1561 (cp_parser_attribute_list): Move code into
1562 cp_parser_parens_expression_list.
1563 (cp_parser_functional_cast): Adjust.
1564 * pt.c (type_dependent_expression_p): Erroneous expressions are
1565 non-dependent.
1566
1567 2003-07-11 Geoffrey Keating <geoffk@apple.com>
1568
1569 * decl.c (cp_finish_decl): Handle 'used' attribute.
1570
1571 * cp-lang.c (c_reset_state): New dummy routine.
1572 * cp-tree.h (finish_file): Move prototype to c-common.h.
1573 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
1574
1575 2003-07-11 Mark Mitchell <mark@codesourcery.com>
1576
1577 PR c++/8327
1578 * pt.c (tsubst_qualified_id): Implement suggested resolution for
1579 Core Issue 2.
1580 (type_dependent_expression_p): Likewise.
1581
1582 2003-07-10 Mark Mitchell <mark@codesourcery.com>
1583
1584 * typeck.c (build_binary_op): Do not warn about signed
1585 vs. unsigned comparisons in the bodies of templates.
1586
1587 PR c++/9411
1588 * parser.c (cp_parser_postfix_expression): Check dependency of
1589 functions.
1590
1591 2003-07-09 Mark Mitchell <mark@codesourcery.com>
1592
1593 PR c++/10032
1594 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
1595 still errors.
1596
1597 PR c++/10527
1598 * error.c (decl_to_string): Do not print default argument
1599 expressions.
1600
1601 * cp-tree.h (break_out_calls): Remove declaration.
1602 * tree.c (break_out_calls): Remove.
1603 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
1604
1605 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
1606
1607 PR c++ 9483
1608 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
1609 * decl2.c (constructor_name_p): Avoid repeated constructor_name
1610 calls.
1611 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
1612
1613 2003-07-09 Mark Mitchell <mark@codesourcery.com>
1614
1615 * typeck.c (build_x_unary_op): Take note of the fact that
1616 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
1617 trees.
1618
1619 * parser.c (cp_parser_primary_expression): Preserve the form of
1620 qualified expressions in templates, even if they are not
1621 dependent.
1622 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
1623 (tsubst_qualified_id): Likewise.
1624 * search.c (accessible_p): Treat everything in the body of a
1625 template as accessible.
1626
1627 2003-07-08 Mark Mitchell <mark@codesourcery.com>
1628
1629 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
1630 * cp-tree.h (build_call_from_tree): Remove.
1631 (build_member_call): Likewise.
1632 (dependent_template_arg_p): Remove.
1633 (any_dependent_template_arguments_p): New function.
1634 (dependent_template_id_p): Likewise.
1635 (any_type_dependent_arguments_p): Likewise.
1636 (build_non_dependent_expr): Likewise.
1637 (build_non_dependent_args): Likewise.
1638 (build_x_compound_expr): Adjust prototype.
1639 * call.c (build_new_method_call): Handle non-dependent expressions
1640 correctly.
1641 * decl2.c (grok_array_decl): Likewise.
1642 (build_offset_ref_call_from_tree): Likewise.
1643 (build_call_from_tree): Remove.
1644 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
1645 (dump_expr): Likewise.
1646 * init.c (build_member_call): Remove.
1647 * mangle.c (write_expression): Update handling for template-ids.
1648 * parser.c (cp_parser_primary_expression): Use
1649 any_dependent_template_arguments_p. Update constant-expression
1650 handling.
1651 (cp_parser_postfix_expression): Use
1652 any_type_dependent_arguments_p. Simplify call processing.
1653 (cp_parser_unary_expression): Simplify.
1654 (cp_parser_expression): Adjust for changes to
1655 build_x_compound_expr.
1656 (cp_parser_template_argument): Implement standard-conforming
1657 parsing of non-type template arguments.
1658 (cp_parser_direct_declarator): Use
1659 cp_parser_fold_non_dependent_expr.
1660 (cp_parser_fold_non_dependent_expr): New function.
1661 (cp_parser_next_token_ends_template_argument_p): Likewise.
1662 * pt.c (convert_template_argument): Do not call
1663 maybe_fold_nontype_arg.
1664 (tsubst_baselink): Likewise.
1665 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
1666 processing work correctly for non-dependent expressions. Adjust
1667 handling of COMPOUND_EXPR. Simplify call processing.
1668 (value_dependent_expression_p): Deal with functional casts and
1669 sizeof/alignof correctly.
1670 (type_dependent_expression_p): Handle overloaded functions.
1671 (any_type_dependent_arguments_p): New function.
1672 (any_dependent_template_arguments_p): Likewise.
1673 (dependent_template_p): Treat SCOPE_REFs as dependent.
1674 (dependent_template_id_p): Simplify.
1675 (build_non_dependent_expr): New function.
1676 (build_non_dependent_args): Likewise.
1677 * semantics.c (finish_stmt_expr): Don't make dependent
1678 statement-expresions have void type.
1679 (finish_call_expr): Handle non-dependent expressions
1680 correctly.
1681 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
1682 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
1683 type size_t, even in templates.
1684 (expr_sizeof): Likewise.
1685 (finish_class_member_access_expr): Handle non-dependent expressions
1686 correctly.
1687 (build_x_indirect_ref): Likewise.
1688 (build_x_binary_op): Likewise.
1689 (build_x_unary_op): Likewise.
1690 (build_x_conditional_expr): Likewise.
1691 (build_x_compound_expr): Likewise.
1692 * typeck2.c (build_x_arrow): Likewise.
1693
1694 Wed Jul 9 02:28:39 CEST 2003 Jan Hubicka <jh@suse.cz>
1695
1696 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
1697 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
1698 (start_function): Use DECL_ESTIMATED_INSNS.
1699 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
1700
1701 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
1702 unit-at-a-time
1703
1704 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1705
1706 PR c++/11030
1707 * pt.c (instantiate_class_template): Don't call xref_tag to
1708 inject name when the friend class is a specialization.
1709
1710 2003-07-07 Mark Mitchell <mark@codesourcery.com>
1711
1712 * cp-tree.h (build_scoped_method_call): Remove.
1713 (lookup_qualified_name): Remove parameter.
1714 (tsubst_copy_and_build): Declare.
1715 (finish_qualified_object_call_expr): Remove.
1716 (check_accessibility_of_qualified_id): New function.
1717 (finish_qualified_id_expr): Likewise.
1718 (non_reference): Likewise.
1719 (build_expr_from-tree): Remove.
1720 * call.c (non_reference): Remove.
1721 (build_scoped_method_call): Likewise.
1722 (build_method_call): Use error_operand_p. Assert that we are not
1723 processing a template.
1724 (standard_conversion): Use non_reference.
1725 * class.c (build_vtbl_entry_ref): Likewise.
1726 (build_vtbl_ref_1): Likewise.
1727 * cvt.c (build_expr_type_conversion): Use non_reference.
1728 * decl.c (lookup_qualified_name): Remove flags parameter.
1729 (grok_op_properties): Use non_reference.
1730 * decl2.c (grok_array_decl): Likewise.
1731 (build_expr_from_tree): Remove.
1732 (build_offset_ref_call_from_tree): Update comment.
1733 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
1734 * except.c (prepare_eh_types): Use non_reference.
1735 (can_convert_eh): Likewise.
1736 * init.c (build_dtor_call): Avoid using build_method_call.
1737 * mangle.c (write_template_param): Remove misleading comment.
1738 * method.c (locate_copy): Use non_reference.
1739 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
1740 (cp_parser_primary_expression): Do not create SCOPE_REFs is
1741 non-dependent contexts.
1742 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
1743 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
1744 build_expr_from_tree.
1745 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
1746 Use check_accessibility_of_qualified_id.
1747 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
1748 build_expr_from_tree.
1749 (tsubst_baselink): New function.
1750 (tsubst_qualified_id): Likewise.
1751 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
1752 (tsubst_expr): Adjust call to lookup_qualified_name.
1753 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
1754 handling of CALL_EXPRs.
1755 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
1756 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
1757 * search.c (check_final_overrider): Likewise.
1758 * semantics.c (check_accessibility_of_qualified_id): New function.
1759 (finish_qualified_object_call_expr): Remove.
1760 * typeck.c (target_type): Use non_reference.
1761 (cxx_sizeof_or_alignof_type): Likewise.
1762 (dubious_conversion_warnings): Likewise.
1763 (convert_for_initialization): Likewise.
1764 (non_reference): New function.
1765
1766 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1767
1768 * decl.c (print_binding_level, print_other_binding_stack,
1769 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
1770 stdio calls.
1771 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
1772
1773 2003-07-07 Andreas Jaeger <aj@suse.de>
1774
1775 * friend.c: Convert to ISO C90 prototypes.
1776
1777 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
1778 language.
1779 * cfns.h: Regenerate.
1780
1781 * typeck.c: Convert remaining prototypes to ISO C90.
1782 * search.c: Likewise.
1783
1784 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
1785 * semantics.c (expand_or_defer_fn): Likewise
1786 * mangle.c (discriminator_for_string_literal): Likewise.
1787 * g++spec.c (lang_specific_driver): Likewise.
1788
1789 * search.c (lookup_base_r): Remove unused variable.
1790
1791 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
1792
1793 * semantics.c: (genrtl_try_block) Adjust emit_line_note
1794 calls.
1795
1796 2003-07-07 Andreas Jaeger <aj@suse.de>
1797
1798 * search.c (lookup_base_r): Remove unused variable.
1799
1800 2003-07-06 Michael Chastain <mec@shout.net>
1801
1802 PR debug/10055
1803 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
1804 assigning to input_filename directly.
1805
1806 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
1807
1808 * call.c: Fix comment formatting.
1809 * class.c: Likewise.
1810 * cp-tree.h: Likewise.
1811 * decl.c: Likewise.
1812 * decl2.c: Likewise.
1813 * error.c: Likewise.
1814 * method.c: Likewise.
1815 * name-lookup.c: Likewise.
1816 * parser.c: Likewise.
1817 * pt.c: Likewise.
1818 * rtti.c: Likewise.
1819 * search.c: Likewise.
1820 * typeck.c: Likewise.
1821
1822 2003-07-06 Mark Mitchell <mark@codesourcery.com>
1823
1824 PR c++/11345
1825 * search.c (lookup_base_r): Remove is_non_public and
1826 within_current_scope parameters. Remove other dead code.
1827 (lookup_base): Adjust call to lookup_base_r.
1828 (adjust_result_of_qualified_name_lookup): Improve comment.
1829 * semantics.c (finish_call_expr): Use maybe_dummy_object.
1830
1831 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
1832
1833 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
1834 LANG_HOOKS_MISSING_ARGUMENT): Override.
1835
1836 2003-07-05 Mark Mitchell <mark@codesourcery.com>
1837
1838 PR c++/11431
1839 * typeck.c (build_static_cast): Check for reference conversions
1840 earlier.
1841
1842 2003-07-04 Mark Mitchell <mark@codesourcery.com>
1843
1844 * cp-tree.h (perform_integral_promotions): Declare.
1845 * call.c (build_addr_func): Use decay_conversion.
1846 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
1847 (convert_for_arg_passing): Use perform_integral_promotions.
1848 * cvt.c (build_expr_type_conversion): Use decay_conversion.
1849 (type_promotes_to): Do not return a cv-qualified type.
1850 * decl.c (grok_reference_init): Fix formatting.
1851 (get_atexit_node): Use decay_conversion.
1852 (build_enumerator): Use perform_integral_promotions.
1853 * init.c (build_vec_init): Use decay_conversion.
1854 * semantics.c (finish_expr_stmt): Likewise.
1855 (finish_switch_cond): Use perform_integral_promotions.
1856 * typeck.c (default_conversion): Likewise.
1857 (perform_integral_promotions): New function.
1858 (build_indirect_ref): Use decay_conversion.
1859 (build_array_ref): Use perform_integral_promotions.
1860 (convert_arguments): Use decay_conversion.
1861 (build_unary_op): Use perform_integral_promotions.
1862 (build_c_cast): Use decay_conversion.
1863 (build_modify_expr): Likewise.
1864 (convert_for_initialization): Likewise.
1865 * typeck2.c (build_x_arrow): Likewise.
1866
1867 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
1868
1869 * call.c: Fix comment typos.
1870 * class.c: Likewise.
1871 * cp-tree.h: Likewise.
1872 * cvt.c: Likewise.
1873 * decl2.c: Likewise.
1874 * decl.c: Likewise.
1875 * init.c: Likewise.
1876 * mangle.c: Likewise.
1877 * parser.c: Likewise.
1878 * pt.c: Likewise.
1879 * search.c: Likewise.
1880 * semantics.c: Likewise.
1881 * tree.c: Likewise.
1882 * typeck.c: Likewise.
1883
1884 2003-07-04 Zack Weinberg <zack@codesourcery.com>
1885
1886 * parser.c (cp_lexer_read_token): No need to handle string
1887 constant concatenation.
1888
1889 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1890
1891 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
1892 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
1893 ATTRIBUTE_GCC_CXXDIAG.
1894
1895 2003-07-03 Mark Mitchell <mark@codesourcery.com>
1896
1897 * call.c (build_addr_func): Handle bound pointers-to-members.
1898 (build_method_call): Do not call resolve_offset_ref.
1899 (implicit_conversion): Likewise.
1900 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
1901 resolve_offset_ref.
1902 (resolve_args): Do not call resolve_offset_ref.
1903 (build_conditional_expr): Likewise.
1904 (build_new_method_call): Likewise.
1905 * cp-tree.def (OFFSET_REF): Update documentation.
1906 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
1907 pointers to members to pointers.
1908 (ocp_convert): Do not call resolve_offset_ref.
1909 (convert_to_void): Likewise.
1910 (build_expr_type_conversion): Likewise.
1911 * decl2.c (delete_sanity): Likewise.
1912 * init.c (resolve_offset_ref): Simplify greatly.
1913 (build_vec_delete): Do not call resolve_offset_ref.
1914 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
1915 if appropriate.
1916 (cp_parser_unary_expression): Use
1917 cp_parser_simple_cast_expression.
1918 (cp_parser_delete_expression): Likewise.
1919 (cp_parser_cast_expression): Likewise.
1920 (cp_parser_pm_expression): Use cp_parser_binary_op.
1921 (cp_parser_simple_cast_expression): New function.
1922 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
1923 * semantics.c (finish_increment_expr): Likewise.
1924 (finish_typeof): Likewise.
1925 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
1926 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
1927 (decay_conversion): Do not call resolve_offset_ref.
1928 (finish_class_member_access_expr): Likewise.
1929 (convert_arguments): Likewise.
1930 (build_x_binary_op): Handle DOTSTAR_EXPR.
1931 (condition_conversion): Do not call resolve_offset_ref.
1932 (unary_complex_lvalue): Likewise.
1933 (build_static_cast): Likewise.
1934 (build_reinterpret_cast): Likewise.
1935 (build_const_cast): Likewise.
1936 (build_c_cast): Likewise.
1937 (build_modify_expr): Likewise.
1938 (convert_for_assignment): Likewise.
1939 (convert_for_initialization): Likewise.
1940 * typeck2.c (build_x_arrow): Likewise.
1941 (build_m_component_ref): Simplify.
1942
1943 * call.c (build_scoped_method_call): Use convert_to_void.
1944 (build_method_call): Likewise.
1945 * class.c (check_field_decls): Remove dead code.
1946 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
1947 * decl2.c (grok_array_decl): Remove dead code.
1948 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1949 as pointer-to-member representation.
1950 * init.c (build_offset_ref): Tidy.
1951 (build_vec_delete_1): Use convert_to_void.
1952 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1953 as pointer-to-member representation.
1954
1955 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
1956
1957 PR c++/9162
1958 * decl.c (grokdeclarator): Return friend decls, not
1959 void_type_node.
1960 * decl2.c (grokfield): Alter friend decl check.
1961 * parser.c (struct cp_parser): Document default_arg chain on
1962 unparsed_functions_queue.
1963 (cp_parser_save_default_args): New.
1964 (cp_parser_init_declarator, cp_parser_function_definition,
1965 cp_parser_member_declaration): Call it.
1966 (cp_parser_class_specifier): Remove unused variable. Alter
1967 processing of unparsed_functions_queue.
1968
1969 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1970
1971 * class.c (add_method, check_field_decl): Fix format specifier.
1972 * decl.c (duplicate_decls, pushdecl, check_goto,
1973 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
1974 start_enum): Likewise.
1975 * decl2.c (ambiguous_decl): Likewise.
1976 * pt.c (redeclare_class_template): Likewise.
1977
1978 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
1979
1980 PR c++/10219
1981 * pt.c (type_unification_real): Don't unify exprs of error type.
1982 * tree.c (error_type): Don't die on error_type.
1983
1984 PR c++/9779
1985 * decl2.c (arg_assoc_class): Don't die on NULL type.
1986 * typeck.c (type_unknown_p): Don't die on untyped expressions.
1987
1988 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1989
1990 PR c++/6949
1991 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
1992 classes.
1993
1994 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1995
1996 * error.c (locate_error): %P takes an `int', not a `tree'.
1997
1998 Wed Jul 2 00:36:48 CEST 2003 Jan Hubicka <jh@suse.cz>
1999
2000 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2001 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2002 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2003 massaging.
2004
2005 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2006 (expand_or_defer_fn): Declare.
2007 (lower_function): Declare.
2008 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2009 * decl2.c: Include cgraph.h and varpool.h
2010 (maybe_emit_vtables): Make explicit instantations as needed.
2011 (mark_member_pointers, lower_function): New functions.
2012 (finish_file): Do unit-at-a-time.
2013 * method.c (synthesize_method): Use expand_or_defer_fn.
2014 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2015 * parser.c (cp_parser_function_definition_after_decl): Use
2016 expand_or_defer_fn.
2017 * pt.c (instantiate_decl): Likewise.
2018 * semantics.c: Include cgraph.h
2019 (expand_or_defer_fn): Break out from ...
2020 (expand_body): ... here; deal with unit-at-a-time.
2021 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2022 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2023
2024 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2025
2026 * call.c (resolve_scoped_fn_name): Return error_mark_node for
2027 erroneous cases.
2028
2029 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2030
2031 PR c++/11149
2032 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2033 is a class type.
2034
2035 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
2036
2037 PR c++/8046
2038 * error.c (dump_decl): Handle BIT_NOT_EXPR as
2039 pseudo destructor calls.
2040
2041 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
2042
2043 * cp-tree.h (define_label): Replace filename and lineno
2044 arguments with a location_t.
2045 * decl.c (pop_label): Adjust define_label call.
2046 (define_label): Replace filename and lineno arguments with a
2047 location_t.
2048 * semantics.c (finish_label): Adjust define_label call.
2049
2050 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2051
2052 PR c++/9559
2053 * decl2.c (grokfield): Do not build NOP_EXPRs around the
2054 error_mark_node.
2055
2056 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
2057
2058 * Make-lang.in: Update.
2059 * cp-lang.c (c_language): Define.
2060 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
2061 * cp-tree.h (cxx_init_options): Remove.
2062 * lex.c: Don't include diagnostic.h.
2063 (cxx_init_options): Remove.
2064
2065 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2066
2067 PR c++/4933
2068 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
2069 tree generated within a template. Use dump_expr to dump an
2070 expression sizeof.
2071
2072 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2073
2074 * mangle.c (write_expression): Exit gracefully when trying to
2075 mangle a CALL_EXPR.
2076
2077 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2078
2079 PR c++/10750
2080 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
2081 (value- or type-) dependent expression as DECL_INITIAL is a
2082 valid constant-expression (at parser time).
2083
2084 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
2085
2086 PR c++/11106
2087 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
2088 USING_DECL, instead of print_tree_identifier.
2089
2090 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2091
2092 * cp-tree.h (language_to_string): Adjust declaration.
2093 * dump.c (cp_dump_tree): Adjust usage.
2094 * error.c (dump_char): Use output_formatted_scalar. Tidy.
2095 (parm_to_string): Lose unused parameter. Tidy.
2096 (expr_to_string): Likewise.
2097 (code_to_string): Likewise.
2098 (language_to_string): Likewise.
2099 (op_to_string): Likewise.
2100 (assop_to_string): Likewise.
2101 (digit_buffer): Remove.
2102 (dump_type): Format builtin vector type as __vector__.
2103
2104 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2105
2106 * error.c (print_integer): Remove.
2107 (dump_type_suffix): Adjust.
2108 (dump_expr): Likewise.
2109
2110 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
2111
2112 * error.c (print_instantiation_partial_context): Take a
2113 location_t.
2114 (print_instantiation_full_context): Adjust.
2115 (print_instantiation_context): Adjust.
2116
2117 * cp-tree.h (cp_line_of, cp_file_of): Remove.
2118 * error.c (cp_line_of, cp_file_of): Merge into ...
2119 (location_of): ... here. Make static, return a location_t.
2120 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
2121
2122 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
2123
2124 PR c++/10784
2125 * call.c (joust): Move warn_conversion check outwards.
2126
2127 2003-06-27 Zack Weinberg <zack@codesourcery.com>
2128
2129 * decl.c (build_typename_type)
2130 * mangle.c (write_template_template_arg)
2131 * parser.c (cp_parser_scope_through_which_access_occurs)
2132 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
2133 * repo.c (get_base_filename)
2134 * semantics.c (maybe_convert_cond):
2135 Mark the definition static, matching the forward declaration.
2136
2137 2003-06-27 Mark Mitchell <mark@codesourcery.com>
2138
2139 PR c++/10468
2140 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2141
2142 2003-06-27 Mark Mitchell <mark@codesourcery.com>
2143
2144 PR c++/10796
2145 * decl.c (finish_enum): Implement DR377.
2146
2147 * decl.c (cp_finish_decl): Don't make variables with reference
2148 type readonly while they are being initialized.
2149
2150 2003-06-26 Mark Mitchell <mark@codesourcery.com>
2151
2152 PR c++/11332
2153 * typeck.c (build_static_cast): Avoid returning expressions with
2154 reference type.
2155
2156 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
2157
2158 * call.c (build_op_delete_call): Use strip_array_call. Correct
2159 error message to say 'delete' or 'delete[]'.
2160
2161 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
2162
2163 PR c++/8266
2164 * pt.c (check_explicit_specialization): When looking up a
2165 template function from an identifier outside class-scope, bind
2166 it to CP_DECL_CONTEXT.
2167
2168 2003-06-25 Mark Mitchell <mark@codesourcery.com>
2169
2170 PR c++/10990
2171 * search.c (lookup_base_r): Rely on accessible_p, rather than
2172 trying to emulate that logic here.
2173
2174 PR c++/10931
2175 * call.c (convert_like): Pass issue_conversion_warnings.
2176 (convert_like_with_context): Likewise.
2177 (convert_like_real): Add issue_conversion_warnings parameter.
2178 (perform_direct_initialization_if_possible): New function.
2179 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2180 * typeck.c (check_for_casting_away_constness): New function.
2181 (build_static_cast): Rewrite.
2182
2183 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
2184
2185 * call.c (enforce_access): Assert we get a binfo.
2186 (build_op_delete_call): Pass a binfo to
2187 perform_or_defer_access_check.
2188 * class.c (alter_access): Likewise.
2189 * decl.c (make_typename_type): Likewise.
2190 (make_unbound_class_template): Likewise.
2191 * lex.c (do_identifier): Likewise.
2192 * method.c (hack_identifier): Likewise.
2193 * parser.c (cp_parser_lookup_name): Likewise.
2194 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2195 test.
2196 * semantics.c (finish_non_static_data_member): Likewise.
2197 (perform_or_defer_access_check): Expect a binfo.
2198 * typeck.c (comptypes): Expect types.
2199
2200 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2201 * friend.c (make_friend_class): Likewise.
2202 * pt.c (check_default_tmpl_args): Likewise.
2203 (lookup_template_class): Likewise.
2204
2205 Tue Jun 24 15:30:05 CEST 2003 Jan Hubicka <jh@suse.cz>
2206
2207 * method.c (thunk_labelno): Move outside ifdef block to make garbage
2208 collector happy.
2209
2210 Tue Jun 24 13:52:34 CEST 2003 Jan Hubicka <jh@suse.cz>
2211
2212 * class.c (build_vtable): Make vtables.
2213 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2214 * decl2.c (output_vtable_inherit): Rename to ...
2215 (prepare_assemble_variable): ... this one; change interface.
2216 (maybe_emit_vtables): Do not call output_vtable_inherit.
2217 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2218 * cp-tree.h (prepare_assemble_variable): New.
2219
2220 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
2221
2222 * method.c: add prototype for make_alias_for_thunk.
2223 (thunk_labelno, make_alias_for_thunk): only define
2224 if ASM_OUTPUT_DEF is defined.
2225
2226 2003-06-23 Jakub Jelinek <jakub@redhat.com>
2227
2228 * method.c (thunk_labelno): New variable.
2229 (make_alias_for_thunk): New function.
2230 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
2231 into the same section as the function it is calling.
2232 Include gt-cp-method.h.
2233 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2234 (cp/method.o): Depend on gt-cp-method.h.
2235 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2236
2237 Mon Jun 23 19:41:27 CEST 2003 Jan Hubicka <jh@suse.cz>
2238
2239 * decl.c (register_dtor_fn): Mark cleanup as used.
2240 * decl2.c (mark_vtable_entries): Skip nops.
2241 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2242 (build_dynamic_cast_1): Likewise.
2243 (tinfo_base_init): Likewise.
2244 (emit_tinfo_decl): Likewise.
2245
2246 2003-06-23 Jakub Jelinek <jakub@redhat.com>
2247
2248 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2249 to it.
2250
2251 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2252
2253 PR c++/10784
2254 * call.c (joust): Warn about choosing conversion sequence only if
2255 -Wconversion.
2256
2257 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2258
2259 PR c++/10864
2260 * call.c (op_error): Tidy.
2261 * error.c (dump_expr): Properly format 'T()' when T is an
2262 aggregate type.
2263
2264 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2265
2266 PR c++/10915
2267 * decl.c (grok_op_properties): Warn possible confusing conversion
2268 only if -Wconversion.
2269
2270 2003-06-20 Mark Mitchell <mark@codesourcery.com>
2271
2272 PR c++/10749
2273 * parser.c (cp_parser_class_head): See through dependent names
2274 when parsing a class-head.
2275
2276 PR c++/10845
2277 * pt.c (try_class_unification): Correct handling of member class
2278 templates.
2279
2280 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
2281
2282 * semantics.c (genrtl_finish_function): Adjust
2283 expand_function_end call.
2284
2285 2003-06-19 Mark Mitchell <mark@codesourcery.com>
2286
2287 PR c++/10939
2288 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2289 functions.
2290 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2291
2292 PR c++/9649
2293 * cp-tree.h (pushdecl_class_level): Change prototype.
2294 (push_class_level_binding): Likewise.
2295 * decl.c (add_binding): Reject duplicate static data members.
2296 (pushdecl_class_level): Return a value indicating whether or not
2297 the binding was valid.
2298 (push_class_level_binding): Likewise.
2299 * semantics.c (finish_member_declaration): Don't keep invalid
2300 declarations.
2301
2302 PR c++/11041
2303 * call.c (initialize_reference): Do not use cp_finish_decl to emit
2304 temporary variables.
2305 * cp-tree.h (static_aggregates): Declare.
2306 (pushdecl_top_level_and_finish): Likewise.
2307 * decl.c (pushdecl_top_level_1): New function.
2308 (pushdecl_top_level): Use it.
2309 (pushdecl_top_level_and_finish): New function.
2310 (initialize_local_var): Remove redundant code.
2311 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
2312 building_stmt_tree.
2313 * decl.h (static_aggregates): Remove.
2314 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2315 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2316 (tinfo_base_init): Likewise.
2317
2318 2003-06-19 Matt Austern <austern@apple.com>
2319
2320 PR c++/11228
2321 * init.c (build_zero_init): Assert that number of array elements
2322 is an integer constant.
2323 (build_default_init) Don't use build_zero_init for arrays with
2324 variable number of elements.
2325
2326 2003-06-19 Andreas Jaeger <aj@suse.de>
2327
2328 * cp-tree.h: Remove duplicated declarations.
2329
2330 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
2331
2332 * pt.c: Convert to ISO C.
2333 * semantics.c: Convert to ISO C.
2334
2335 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
2336
2337 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2338 at_least_as_qualified_p, more_qualified_p): Return bool.
2339 * typeck.c: ANSIFY function definitions.
2340 (comp_array_types): Take redeclaration bool parameter.
2341 (comptypes): Rearrange STRICT handling.
2342 (at_least_as_qualified_p, more_qualified_p,
2343 comp_cv_qualification): Cache cv quals.
2344 (compparms): Rearrange loop.
2345
2346 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
2347
2348 * cp-tree.h (COMPARE_RELAXED): Rename to ...
2349 (COMPARE_DERIVED): ... here. Adjust comment.
2350 (resolve_typename_type_in_current_instantiation): Remove.
2351 (cp_tree_equal, comptypes): Return a bool.
2352 * cvt.c (convert_to_reference): Adjust comptypes call.
2353 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2354 (resolve_typename_type_in_current_instantiation): Remove.
2355 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2356 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2357 calls. Refactor code.
2358 * typeck.c (comp_array_types): Return bool. Lose callback.
2359 parameter. Adjust cp_tree_equal calls.
2360 (comptypes): Return bool. Adjust strict handling. Remove relaxed
2361 enumeration and java type handling. Deal with typename types here.
2362 Adjust recursive and cp_tree_equals calls. Adjust base and derived
2363 checking.
2364 (comp_target_types): Remove unreachable code. Adjust
2365 same_or_base_type_p calls.
2366 (ptr_reasonably_similar): Adjust base and derived check.
2367
2368 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
2369 unused calculation.
2370 (check_return_expr): Adjust error messages.
2371 * cp-tree.def (SCOPE_REF): Correct comment.
2372
2373 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2374
2375 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2376 string again.
2377
2378 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
2379
2380 * optimize.c (dump_function): Form complete flag name by
2381 prefixing 'fdump-' to string returned by dump_flag_name().
2382
2383 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2384
2385 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2386 string.
2387
2388 2003-06-17 Jason Merrill <jason@redhat.com>
2389
2390 PR c++/10929
2391 * decl.c (grokfndecl): Don't mark a function inline for
2392 -finline-functions if it isn't defined.
2393
2394 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2395
2396 PR c++/10712
2397 * class.c (handle_using_decl): Robustify.
2398
2399 PR c++/11105
2400 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
2401 * mangle.c (struct globals): Remove internal_mangling_p.
2402 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
2403 (write_template_parm): Don't write out the level number.
2404 (conv_type_names): New variable.
2405 (hash_type): New function.
2406 (compare_type): Likewise.
2407 (mangle_conv_op_name_for_type): Don't try to mangle conversion
2408 operator names.
2409 * search.c (lookup_conversion_operator): New function.
2410 (lookup_fnfields_1): Use it.
2411
2412 2003-06-17 Andreas Jaeger <aj@suse.de>
2413
2414 * except.c: Remove duplicate declaration of push_eh_cleanup.
2415
2416 * call.c: Remove extra declaration of inhibit_warnings.
2417
2418 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2419
2420 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
2421 * mangle.c: Convert to ISO C.
2422
2423 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2424
2425 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
2426 macro.
2427
2428 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2429
2430 * tree.c: Convert to ISO C.
2431
2432 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
2433
2434 * cp-tree.h: Follow spelling conventions.
2435 * mangle.c: Likewise.
2436 * method.c: Likewise.
2437 * parser.c: Likewise.
2438
2439 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
2440
2441 * decl.c (start_function): Adjust init_function_start call.
2442 * method.c (use_thunk): Likewise.
2443 * semantics.c (genrtl_start_function): Likewise.
2444
2445 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
2446
2447 * Make-lang.in: Remove c-options.o.
2448
2449 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
2450
2451 * lex.c: Convert to ISO C.
2452
2453 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
2454 * init.c: removes use of PARAMS macro. Use ISO style function
2455 declarations. (Not copyright-significant change.)
2456
2457 * rtti.c: Remove PARAMS.
2458
2459 * typeck2.c: Convert to ISO C.
2460
2461 2003-06-12 Mark Mitchell <mark@codesourcery.com>
2462
2463 PR c++/10635
2464 * typeck.c (build_c_cast): Check that the destination type is
2465 complete.
2466
2467 2003-06-11 Mark Mitchell <mark@codesourcery.com>
2468
2469 PR c++/10432
2470 * cp-tree.h (finish_declarator): Remove.
2471 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
2472 erroneous declarations.
2473 * semantics.c (finish_declarator): Remove.
2474
2475 2003-06-11 Roger Sayle <roger@eyesopen.com>
2476
2477 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
2478 global static constructor/destructor if it will be empty, i.e.
2479 either doesn't call any ctors/dtors or only calls pure or const
2480 ctors/dtors.
2481
2482 2003-06-11 Mark Mitchell <mark@codesourcery.com>
2483
2484 * mangle.c (tm_p.h): Include it.
2485 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
2486
2487 PR c++/11131
2488 * tree.c (cp_cannot_inline_fn): Check for "inline" before
2489 instantiation.
2490
2491 2003-06-10 Jason Merrill <jason@redhat.com>
2492
2493 PR c++/10968
2494 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2495
2496 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
2497
2498 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
2499 (start_cleanup_cnt): New.
2500
2501 2003-06-10 Mark Mitchell <mark@codesourcery.com>
2502
2503 PR c++/11131
2504 * cp-tree.h (template_for_substitution): Declare.
2505 * decl2.c (mark_used): Use it when figuring out whether or not a
2506 function is inline.
2507 * pt.c (template_for_substitution): Give it external linkage.
2508 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
2509 possible.
2510
2511 2003-06-09 Zack Weinberg <zack@codesourcery.com>
2512
2513 PR 8861
2514 * mangle.c (write_real_cst): New function. Implement
2515 ABI-compliant mangling of floating-point literals when
2516 -fabi-version>=2; provide backward compatibility with 3.3 when
2517 -fabi-version=1 (with warning). Clarify commentary.
2518 (write_template_arg_literal): Use write_real_cst.
2519
2520 2003-06-07 Andreas Jaeger <aj@suse.de>
2521
2522 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2523
2524 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
2525
2526 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
2527 (LANG_HOOKS_HANDLE_OPTION): Override.
2528 * cp-tree.h (cxx_init_options): Update.
2529 * lex.c (cxx_init_options): Update.
2530
2531 Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
2532
2533 * Make-lang.in: Add support for stageprofile and stagefeedback
2534
2535 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
2536
2537 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2538
2539 2003-06-04 Andreas Jaeger <aj@suse.de>
2540
2541 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
2542
2543 2003-06-03 Jason Merrill <jason@redhat.com>
2544
2545 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
2546
2547 * cp/decl.c (reshape_init): Handle vectors.
2548
2549 * testsuite/g++.dg/init/array10.C: New.
2550
2551 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2552
2553 PR c++/10940
2554 * pt.c (check_explicit_specialization): Check for 'static'
2555 earlier.
2556
2557 2003-05-31 Diego Novillo <dnovillo@redhat.com>
2558
2559 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
2560 the operand of a CONSTRUCTOR node.
2561
2562 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2563
2564 * decl.c (cp_binding_level::this_entity): Rename from this_class.
2565 (cxx_scope_descriptor): New function.
2566 (cxx_scope_debug): Likewise.
2567 (push_binding_level): Use it.
2568 (pop_binding_level): Likewise.
2569 (suspend_binding_level): Likewise.
2570 (resume_binding_level): Likewise.
2571 (pushlevel_class): Adjust use of this_class.
2572 (pushtag): Likewise.
2573 (lookup_name_real): Likewise.
2574 (global_scope_name): New variable.
2575 (initialize_predefined_identifiers): Initialize it.
2576 (push_namespace): Use it.
2577 (make_cxx_scope): New function.
2578 (pushlevel): Use it.
2579 (pushlevel_class): Likewise.
2580 (push_binding_level): Simplify. Loose the last two arguments.
2581 (make_binding_level): Remove.
2582 (initial_push__namespace_scope): New function.
2583 (push_namespace): Use it. Simplify.
2584 (cxx_init_decl_processing): Likewise.
2585 (declare_namespace_level): Remove.
2586
2587 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2588
2589 PR c++/10956
2590 * pt.c (instantiate_decl): Don't use full template arguments if
2591 we are dealing with specializations.
2592
2593 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2594
2595 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
2596 (binding_depth): Unconditionally define.
2597 (is_class_level): Likewise.
2598 (indent): Likewise. Take an indenting parameter.
2599 (push_binding_level): Remove conditional definittion.
2600 (pop_binding_level): Likewise.
2601 (suspend_binding_level): Likewise.
2602 (resume_binding_level): Likewise.
2603 (pushlevel): Likewise.
2604 (pushlevel_class): Likewise.
2605 (poplevel_class): Likewise.
2606 (pop_everything): Likewise.
2607
2608 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2609
2610 * name-lookup.h (global_scope_p): New macro.
2611 * decl.c (pop_binding_level): Use it. Don't refer directly to
2612 global_binding_level.
2613 (suspend_binding_level): Likewise.
2614 (global_bindings_p): Likewise.
2615 (print_other_binding_stack): Likewise.
2616 (print_binding_stack): Likewise.
2617 (maybe_push_to_top_level): Likewise.
2618 (pushdecl_namespace_level): Likewise.
2619 (cxx_init_decl_processing): Likewise.
2620 (start_decl): Likewise.
2621 (cp_finish_decl): Likewise.
2622 (start_function): Likewise.
2623 (global_binding_level): Remove.
2624
2625 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2626
2627 * parser.c (cp_parser_explicit_instantiation): Restore old
2628 access before template instantiation.
2629
2630 2003-05-23 Geoffrey Keating <geoffk@apple.com>
2631
2632 * lang-specs.h: Use -o to specify preprocessor's output file.
2633 Make -no-integrated-cpp work when building PCH files.
2634
2635 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2636
2637 PR c++/10682
2638 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
2639 check for implicitly created typedef to an enum.
2640
2641 2003-05-21 Jason Merrill <jason@redhat.com>
2642
2643 * init.c (build_vec_delete): Copy the address into a temporary
2644 variable before calling build_vec_delete_1.
2645 * decl2.c (delete_sanity): Don't call stabilize_reference.
2646
2647 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
2648
2649 * pt.c (register_specialization): Update the decl's location,
2650 if necessary.
2651 (check_explicit_specialization): Likewise.
2652
2653 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2654
2655 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2656
2657 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
2658
2659 PR c++/9738
2660 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
2661 if the old decl had instantiated DECL_RTL.
2662 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2663
2664 2003-05-19 Matt Austern <austern@apple.com>
2665
2666 * lang-options.h: Document -Wno-invalid-offsetof
2667 * typeck.c (build_class_member_access_expr): Don't complain about
2668 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2669
2670 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
2671
2672 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
2673 (binding_entry_make): Make entry->chain NULL after getting an entry.
2674 fix the spelling of chain in a comment.
2675 (binding_table_free): speed up by having temporary variable.
2676 (binding_table_new): set table->chain to be NULL after allocating
2677 a table.
2678 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
2679 binding->previous to NULL after getting an binding for speed.
2680
2681 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
2682
2683 * cp-tree.h (struct lang_type_class): Replace data member tags
2684 with hash-table nested_udts.
2685 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
2686 * class.c (unreverse_member_declarations): Don't touch
2687 CLASSTYPE_TAGS.
2688 (pushclass): Use cxx_remember_type_decls.
2689 * decl.c (struct cp_binding_level): Replace data member tags with
2690 hash-table type_decls.
2691 (pop_binding_level): Handle level->type_decls.
2692 (kept_level_p): Adjust.
2693 (poplevel): Remove unused local variable.
2694 (bt_print_entry): New function.
2695 (print_binding_level): Use it.
2696 (push_namespace): Build current_binding_level->type_decls.
2697 (maybe_process_template_type_declaration): Adjust.
2698 (pushtag): Likewise.
2699 (clear_anon_tags): Use binding_table_remove_anonymous_types.
2700 (gettags): Remove.
2701 (cxx_remember_type_decls): Rename from storetags. Adjust.
2702 (lookup_tag): Use binding_table_find_anon_type. Tidy.
2703 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
2704 (cxx_init_decl_processing): Build global_binding_level->type_decls.
2705 (store_parm_decls): Remove pointless code.
2706 * name-lookup.c (free_binding_entry): New variable.
2707 (ENTRY_INDEX): New macro.
2708 (struct binding_table_s): New datatype.
2709 (binding_entry_make): New function.
2710 (binding_entry_free): Likewise.
2711 (binding_table_construct): Likewise.
2712 (binding_table_free): Likewise.
2713 (binding_table_new): Likewise.
2714 (binding_table_expand): Likewise.
2715 (binding_table_insert): Likewise.
2716 (binding_table_find): Likewise.
2717 (binding_table_find_anon_type): Likewise.
2718 (binding_table_reverse_maybe_remap): Likewise.
2719 (binding_table_remove_anonymous_types): Likewise.
2720 (binding_table_foreach): Likewise.
2721 * name-lookup.h (binding_table): New type.
2722 (binding_entry): Likewise.
2723 (bt_foreach_proc): Likewise.
2724 (struct binding_entry_s): New datatype.
2725 (SCOPE_DEFAULT_HT_SIZE): New macro.
2726 (CLASS_SCOPE_HT_SIZE): Likewise.
2727 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
2728 (NAMESPACE_STD_HT_SIZE): Likewise.
2729 (GLOBAL_SCOPE_HT_SIZE): Likewise.
2730 (binding_table_new): Declare.
2731 (binding_table_free): Likewise.
2732 (binding_table_insert): Likewise.
2733 (binding_table_find_anon_type): Likewise.
2734 (binding_table_reverse_maybe_remap): Likewise.
2735 (binding_table_remove_anonymous_types): Likewise.
2736 (binding_table_foreach): Likewise.
2737 (binding_table_find): Likewise.
2738 (cxx_remember_type_decls): Likewise.
2739 * pt.c (bt_instantiate_type_proc): New function.
2740 (do_type_instantiation): Use it.
2741 * search.c (lookup_field_r): Use binding_table_find.
2742
2743 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2744
2745 * semantics.c (perform_deferred_access_checks): Don't discard
2746 checked access.
2747
2748 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2749
2750 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
2751 libiberty VA_ macros, always use stdarg.
2752 * rtti.c (create_pseudo_type_info): Likewise.
2753 * tree.c (build_min_nt, build_min): Likewise.
2754
2755 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2756
2757 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
2758 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
2759 collapse multiple function calls into one.
2760 * tree.c (debug_binfo): Likewise.
2761
2762 2003-05-15 Jason Merrill <jason@redhat.com>
2763
2764 PR c++/5388
2765 * call.c (conditional_conversion): Don't consider implicit
2766 conversions if T2 is a base of T1.
2767 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
2768 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2769
2770 * parser.c (cp_parser_primary_expression): Convert a static data
2771 member from reference.
2772
2773 2003-05-15 Mark Mitchell <mark@codesourcery.com>
2774
2775 * call.c (build_op_delete_call): Avoid creating unnecessary types.
2776 * class.c (instantiate_type): Remove tests for tf_no_attributes.
2777 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
2778 (COMPARE_NO_ATTRIBUTES): Remove.
2779 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
2780
2781 PR c++/8385
2782 * semantics.c (finish_typeof): Refine type-dependency check.
2783
2784 2003-05-13 Jason Merrill <jason@redhat.com>
2785
2786 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
2787 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
2788
2789 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2790
2791 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
2792
2793 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2794
2795 PR c++/10230, c++/10481
2796 * semantics.c (finish_non_static_data_member): Handle when the
2797 non-static member is not from a base of the current class type.
2798
2799 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2800
2801 PR c++/10552
2802 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
2803 template and has dependent context.
2804
2805 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2806
2807 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
2808
2809 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2810
2811 PR c++/9252
2812 * cp-tree.h (saved_scope): Remove check_access field.
2813 (tsubst_flags_t): Remove tf_parsing.
2814 * decl.c (maybe_push_to_top_level): Don't initialize
2815 scope_chain->check_access.
2816 (make_typename_type, make_unbound_class_template): Don't use
2817 tf_parsing.
2818 (register_dtor_fn): Use push/pop_deferring_access_checks
2819 instead of scope_chain->check_access.
2820 * method.c (use_thunk): Likewise.
2821 * parser.c (cp_parser_explicit_instantiation
2822 (cp_parser_constructor_declarator_p): Don't call
2823 push/pop_deferring_access_checks here.
2824 (cp_parser_template_argument, cp_parser_class_name): Don't use
2825 tf_parsing.
2826 (yyparse): Check flag_access_control.
2827 * pt.c (instantiate_class_template): Call
2828 push/pop_deferring_access_checks.
2829 * semantics.c (push_deferring_access_checks): Propagate
2830 dk_no_check.
2831 (perform_or_defer_access_check): Make sure basetype_path is
2832 a type before comparison.
2833 * call.c (build_op_delete_call, build_over_call): Use
2834 perform_or_defer_access_check.
2835 * class.c (alter_access): Likewise.
2836 * init.c (build_offset_ref): Likewise.
2837 * lex.c (do_identifier): Likewise.
2838 * method.c (hack_identifier): Likewise.
2839 * search.c (lookup_member): Likewise.
2840 * semantics.c (finish_non_static_data_member): Likewise.
2841 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
2842 instead of flag_access_control.
2843
2844 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2845
2846 PR c++/9554
2847 * parser.c (cp_parser_class_name): Remove check_access parameter.
2848 All caller adjusted. Update declaration.
2849 (cp_parser_lookup_name): Likewise.
2850 * semantics.c (push_deferring_access_checks): Change parameter type
2851 to enum deferring_kind. All caller adjusted.
2852 (resume_deferring_access_checks): Adjust to use new enum.
2853 (stop_deferring_access_checks): Likewise.
2854 (perform_or_defer_access_check): Likewise.
2855 * cp-tree.h (deferring_kind): New enum.
2856 (deferred_access): Adjust field type.
2857 (push_deferring_access_checks): Update declaration.
2858
2859 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2860
2861 PR c++/10555, c++/10576
2862 * pt.c (lookup_template_class): Handle class template with
2863 multiple levels of parameters when one of the levels contain
2864 errors.
2865
2866 2003-05-08 Jason Merrill <jason@redhat.com>
2867
2868 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
2869 expression. Undo some of the recent reorg.
2870
2871 2003-05-07 Richard Henderson <rth@redhat.com>
2872
2873 PR c++/10570
2874 * cfns.gperf: Comment out POSIX thread cancellation points,
2875 plus abort and raise.
2876 * cfns.h: Regenerate.
2877
2878 2003-05-07 Jason Merrill <jason@redhat.com>
2879
2880 * call.c (build_conditional_expr): Don't assume that the folded
2881 expression has result_type.
2882
2883 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2884
2885 * typeck.c (build_unary_op): Deal with const qualifier in
2886 invalid pointer-to-member earlier.
2887
2888 2003-05-05 Jason Merrill <jason@redhat.com>
2889
2890 PR c++/9537
2891 * call.c (conditional_conversion): Build an RVALUE_CONV if
2892 we're just changing the cv-quals.
2893 (build_conditional_expr): Don't call convert to change
2894 cv-quals.
2895
2896 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2897
2898 PR c++/10496
2899 * typeck.c (build_unary_op): Don't output const qualifier when
2900 output invalid pointer-to-member diagnostics.
2901
2902 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2903
2904 * decl.c: Fix typos.
2905
2906 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2907
2908 PR c++/4494
2909 * decl.c (start_function): Use same_type_p to check return type
2910 of main.
2911
2912 2003-05-03 Zack Weinberg <zack@codesourcery.com>
2913
2914 PR c/10604
2915 * cp/typeck.c (build_x_compound_expr): No need to check
2916 extra_warnings as well as warn_unused_value.
2917
2918 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2919
2920 PR c++/9364, c++/10553, c++/10586
2921 * decl.c (make_typename_type): Don't crash on illegal code.
2922
2923 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
2924
2925 * class.c (finish_struct): Use location_t and input_location
2926 directly.
2927 * decl.c (make_label_decl): Likewise.
2928 (use_label): Likewise.
2929 * decl2.c (warn_if_unknown_interface): Likewise.
2930 (start_static_initialization_or_destruction): Likewise.
2931 (generate_ctor_or_dtor_function): Likewise.
2932 (finish_file): Likewise.
2933 * error.c (print_instantiation_full_context): Likewise.
2934 * init.c (create_temporary_var): Likewise.
2935 * method.c (synthesize_method): Likewise.
2936 * parser.c (cp_token): Likewise.
2937 (cp_lexer_set_source_position_from_token): Likewise.
2938 (cp_lexer_get_preprocessor_token): Likewise.
2939 (cp_parser_statement): Likewise.
2940 * pt.c (tsubst_friend_function): Likewise.
2941 (instantiate_class_template): Likewise.
2942 (tsubst_decl): Likewise.
2943 (tsubst): Likewise.
2944 (instantiate_decl): Likewise.
2945 * semantics.c (begin_class_definition): Likewise.
2946 (expand_body): Likewise.
2947
2948 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
2949
2950 * class.c (finish_struct): Rename lineno to input_line.
2951 * decl.c (push_binding_level, pop_binding_level,
2952 suspend_binding_level, resume_binding_level, make_label_decl,
2953 use_label, start_function): Likewise.
2954 * decl2.c (warn_if_unknown_interface,
2955 start_static_initialization_or_destruction,
2956 generate_ctor_or_dtor_function, finish_file): Likewise.
2957 * error.c (cp_line_of, print_instantiation_full_context,
2958 print_instantiation_context): Likewise.
2959 * except.c (check_handlers_1, check_handlers): Likewise.
2960 * init.c (create_temporary_var): Likewise.
2961 * method.c (use_thunk, synthesize_method): Likewise.
2962 * parser.c (cp_lexer_set_source_position_from_token,
2963 cp_lexer_get_preprocessor_token): Likewise.
2964 * pt.c (push_tinst_level, pop_tinst_level,
2965 tsubst_friend_function, instantiate_class_template, tsubst_decl,
2966 tsubst, tsubst_expr, instantiate_decl): Likewise.
2967 * semantics.c (genrtl_try_block, finish_label_stmt,
2968 begin_class_definition, expand_body,
2969 genrtl_finish_function): Likewise.
2970 * tree.c (build_min_nt, build_min): Likewise.
2971
2972 2003-05-01 Mark Mitchell <mark@codesourcery.com>
2973
2974 * decl2.c (comdat_linkage): Don't externalize explicit
2975 instantiations.
2976
2977 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2978
2979 PR c++/10554
2980 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
2981 is not NULL.
2982
2983 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
2984
2985 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
2986 (struct lang_identifier): ... to here.
2987 (LANG_ID_FIELD): Remove.
2988 (SET_LANG_ID): Remove.
2989 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
2990 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
2991 (IDENTIFIER_IMPLICIT_DECL): Likewise.
2992 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
2993 (IDENTIFIER_ERROR_LOCUS): Likewise.
2994 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2995
2996 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2997
2998 PR c++/8772
2999 * pt.c (convert_template_argument): Correct diagnostic.
3000
3001 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3002
3003 PR c++/9432, c++/9528
3004 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3005
3006 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
3007
3008 * decl.c (check_previous_goto_1): Adjust prototype.
3009 (check_previous_goto): Adjust use.
3010 (check_switch_goto): Likewise.
3011 (use_label): Adjust.
3012 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3013 (struct named_label_use_list): Use location_t datatype.
3014
3015 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3016
3017 PR c++/10551
3018 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3019 that have not yet been written out.
3020
3021 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3022
3023 PR c++/10549
3024 * class.c (layout_class_type): Mark overlong bitfields as having
3025 the maximum size permitted by their type, after layout.
3026
3027 PR c++/10527
3028 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3029
3030 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3031
3032 * call.c (build_operator_new_call): Fix typo.
3033 * lang-options.h: Likewise.
3034
3035 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3036
3037 PR c++/10515
3038 * cp-tree.h (lookup_field_1): Declare it.
3039 * search.c (lookup_field_1): Make it public.
3040 * decl.c (reshape_init): Handle designated initializers.
3041
3042 * decl.c (maybe_commonize_var): Further tweak support for systems
3043 without weak symbols.
3044
3045 2003-04-27 Mark Mitchell <mark@codesourcery.com>
3046
3047 * decl.c (maybe_commonize_var): Fix thinko in last patch.
3048
3049 2003-04-27 Mark Mitchell <mark@codesourcery.com>
3050
3051 PR c++/10506
3052 * method.c (use_thunk): Decrement immediate_size_expand.
3053
3054 PR c++/10503
3055 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
3056 (DECL_MAYBE_TEMPLATE): Remove.
3057 * class.c (fixed_type_or_null): Avoid infinite recursion.
3058
3059 * decl.c (maybe_commonize_var): Make the code match the comments.
3060 * pt.c (instantiate_decl): Move call to import_export_decl.
3061
3062 2003-04-26 Mark Mitchell <mark@codesourcery.com>
3063
3064 * decl2.c (finish_file): Fix merge botch.
3065
3066 2003-04-25 Mark Mitchell <mark@codesourcery.com>
3067
3068 * decl2.c (finish_file): Don't call import_export_decl for
3069 functions that are not defined.
3070 (handle_class_head): Robustify.
3071 * pt.c (instantiate_decl): Do not call cp_finish_decl for
3072 variables that are not defined.
3073
3074 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
3075
3076 * call.c (print_z_candidates): Fix off by one error.
3077
3078 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
3079
3080 PR c++/10337
3081 * call.c (joust): Don't warn about conversion ops that are exact
3082 or cv-conversions. Rearrange to avoid multiple type comparisons.
3083
3084 2003-04-23 Mark Mitchell <mark@codesourcery.com>
3085
3086 PR c++/10471
3087 * call.c (build_cxx_call): Robustify.
3088
3089 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
3090
3091 * Make-lang.in (lex.o): Remove mbchar.h.
3092 * lex.c (MULTIBYTE_CHARS): Lose.
3093 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
3094 in c-lex.c.
3095
3096 2003-04-23 Mark Mitchell <mark@codesourcery.com>
3097
3098 PR c++/9847
3099 * cp-tree.h (duplicate_tag_error): Remove.
3100 * class.c (duplicate_tag_error): Remove.
3101 * semantics.c (begin_class_definition): Return immediately for a
3102 duplicate class definition.
3103
3104 PR c++/10451
3105 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
3106
3107 2003-04-22 Mark Mitchell <mark@codesourcery.com>
3108
3109 PR c++/10446
3110 * search.c (lookup_fnfields_1): Handle empty slots in the method
3111 vector.
3112
3113 PR c++/10428
3114 * decl.c (check_elaborated_type_specifier): New function, split
3115 out from ...
3116 (xref_tag): ... here. Use the new function in more places.
3117
3118 * rtti.c (throw_bad_typeid): Use build_cxx_call.
3119
3120 2003-04-21 Mark Mitchell <mark@codesourcery.com>
3121
3122 * call.c (build_over_call): Use build_cxx_call.
3123 (build_cxx_call): New method, split out of build_over_call.
3124 * cp-tree.h (language_function): Add can_throw.
3125 (build_cxx_call): Declare it.
3126 * decl.c (finish_function): If a function does not contain any
3127 calls to functions that can throw an exception, indicate that
3128 fact.
3129 * decl2.c (mark_used): Do not defer the instantiation of
3130 functions, if the current function does not throw.
3131 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
3132 * pt.c (instantiate_decl): Make sure import_export_decl is called
3133 before emitting things.
3134 * rtti.c (throw_bad_cast): Use build_cxx_call.
3135 (build_dynamic_cast_1): Likewise.
3136 * typeck.c (build_function_call): Likewise.
3137
3138 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
3139
3140 PR c++/9881
3141 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3142 expressions. Reverts my 2002-08-08 patch.
3143
3144 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3145 cheaper early exit.
3146
3147 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
3148
3149 * cp/decl2.c (start_static_storage_duration_function): Take count
3150 arg, don't check if it wraps round.
3151 (generate_ctor_or_dtor_function): Add locus arg, use it.
3152 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3153 locus.
3154 (finish_file): Set line numbers to past EOF for synthesized
3155 functions.
3156
3157 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
3158
3159 PR c++/10405
3160 * search.c (lookup_field_1): Final scan goes backwards for
3161 types, forwards for non-types.
3162
3163 2003-04-17 Roger Sayle <roger@eyesopen.com>
3164
3165 PR c/10375
3166 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3167 "nothrow" function attributes.
3168
3169 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3170
3171 PR c++/10347
3172 * pt.c (type_dependent_expression_p): Handle array new.
3173
3174 2003-04-15 Mark Mitchell <mark@codesourcery.com>
3175
3176 PR c++/10381
3177 * parser.c (cp_parser_primary_expression): Reorganize logic for
3178 dealing with name lookup failures.
3179
3180 2003-04-15 Jason Merrill <jason@redhat.com>
3181
3182 * decl2.c (mark_used): Don't instantiate anything if
3183 skip_evaluation.
3184
3185 2003-04-14 Ziemowit Laski <zlaski@apple.com>
3186
3187 * tree.c (build_cplus_array_type_1): Do not call
3188 uses_template_parms() on a NULL index_type.
3189
3190 2003-04-13 Roger Sayle <roger@eyesopen.com>
3191
3192 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3193
3194 2003-04-12 Mark Mitchell <mark@codesourcery.com>
3195
3196 PR c++/10300
3197 * init.c (build_new_1): Reorganize.
3198
3199 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3200
3201 * class.c (initialize_array)
3202 * decl.c (reshape_init)
3203 * decl2.c (build_expr_from_tree)
3204 * init.c (build_zero_init)
3205 * pt.c (tsubst_copy, tsubst_copy_and_build)
3206 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3207 (ptm_initializer, class_initializer, get_pseudo_ti_init)
3208 * semantics.c (finish_compound_literal)
3209 * typeck.c (build_ptrmemfunc1)
3210 * typeck2.c (store_init_value, process_init_constructor)
3211 (build_functional_cast): Use build_constructor.
3212
3213 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3214
3215 * call.c (print_z_candidates): Use gcc_gettext_width, not
3216 strlen, to determine how much padding to use.
3217
3218 2003-04-10 Zack Weinberg <zack@codesourcery.com>
3219
3220 * decl.c: Update all calls to shadow_warning.
3221
3222 2003-04-10 Mark Mitchell <mark@codesourcery.com>
3223
3224 * class.c (layout_class_type): Correct handling for overlong
3225 bit-fields whose width is the same as an integer type.
3226
3227 2003-04-06 Zack Weinberg <zack@codesourcery.com>
3228
3229 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3230 * cp-lang.c (cp_tree_size): New function.
3231 (LANG_HOOKS_TREE_SIZE): Override.
3232
3233 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3234 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3235 (union lang_tree_node): Remove common and srcloc members.
3236 (build_srcloc_here): Don't prototype.
3237 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3238 * pt.c (pending_templates): Correct comment.
3239 * tree.c (build_srcloc, build_srcloc_here): Kill.
3240
3241 2003-04-06 Zack Weinberg <zack@codesourcery.com>
3242
3243 * call.c: Include intl.h.
3244 (print_z_candidate): Always use inform; get rid of errfn
3245 argument. Reorganize so that all the strings get picked up
3246 by xgettext. Note obligation of caller to pass first argument
3247 through gettext.
3248 (print_z_candidates): Update to match. Indent second and
3249 successive candidates by strlen() of translated message.
3250 (joust): Restructure ambiguous-conversion pedwarn so that
3251 translators see a complete sentence. Update calls to
3252 print_z_candidate.
3253
3254 * Make-lang.in (cp/call.o): Update dependencies.
3255
3256 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3257
3258 * decl.c (set_current_binding_level): Delete, revert last change.
3259 (current_binding_level): Modify to allow it as as lvalue.
3260
3261 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3262
3263 * name-lookup.c (find_binding): Pass appropriate pointer type to
3264 POP_TIMEVAR_AND_RETURN.
3265
3266 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3267
3268 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3269 * cp-tree.h: Don't insist on having GNUC.
3270
3271 2003-04-03 Jason Merrill <jason@redhat.com>
3272
3273 * cvt.c (ocp_convert): Only abort if we try to convert an object
3274 of TREE_ADDRESSABLE type.
3275
3276 * class.c (build_vtable): Set DECL_ALIGN here.
3277 (get_vtable_decl): Not here.
3278 (layout_vtable_decl): Or here.
3279 (create_vtable_ptr): Or here.
3280 (layout_class_type): Or here.
3281 (check_bitfield_decl): Don't mess with field alignment.
3282
3283 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3284
3285 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3286 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3287 * rtti.c (dfs_class_hint_mark): Likewise.
3288
3289 * decl.c (push_local_name, push_class_level_binding,
3290 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3291 functions returning void.
3292 * decl2.c (add_using_namespace): Likewise.
3293
3294 * decl.c (print_binding_level, print_other_binding_stack,
3295 print_binding_stack): Cast argument of %p specifier to void*.
3296 * ptree.c (cxx_print_decl): Likewise.
3297
3298 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3299 VAR_FUNCTION_OR_PARM_DECL_CHECK,
3300 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3301 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3302 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3303
3304 * decl.c (set_current_binding_level): New macro. Use throughout
3305 when setting the current binding level.
3306
3307 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3308 in enum.
3309 * method.c (mangling_flags): Likewise.
3310
3311 * cp-tree.h (lang_type_header): Add __extension__ and use
3312 CHAR_BITFIELD for members.
3313
3314 2003-04-02 Geoffrey Keating <geoffk@apple.com>
3315
3316 PR other/9274
3317 * mangle.c: Include gt-cp-mangle.h.
3318 (subst_identifiers): Mark with GTY.
3319 * config-lang.in (gtfiles): Add cp/mangle.c.
3320 * Make-lang.in: (gt-cp-mangle.h): New rule.
3321 (cp/mangle.o): Depends on gt-cp-mangle.h.
3322
3323 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
3324
3325 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3326 after \$(srcdir)/cp/name-lookup.h.
3327 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3328 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
3329 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3330 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3331
3332 2003-03-31 Jason Merrill <jason@redhat.com>
3333
3334 PR java/10145
3335 * class.c (check_field_decl): Don't set DECL_ALIGN.
3336
3337 2003-03-30 Mark Mitchell <mark@codesourcery.com>
3338
3339 PR c++/7647
3340 * decl.c (grokdeclarator): Tidy, slightly.
3341 * search.c (lookup_field_1): Add want_type parameter.
3342 (lookup_field_r): Adjust call to lookup_field_1.
3343
3344 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3345
3346 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3347
3348 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3349
3350 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
3351 prototype.
3352 (cxx_scope_find_binding_for_name): Likewise.
3353 * decl.c (find_binding: Move to name-lookup.c.
3354 (binding_for_name): Likewise.
3355 (cxx_scope_find_binding_for_name): Likewise.
3356 (BINDING_LEVEL): Remove.
3357 (push_binding): Tidy.
3358 (push_class_binding): Likewise.
3359 (pop_binding): Likewise.
3360 (poplevel): Likewise.
3361 (poplevel_class): Likewise.
3362 (set_identifier_type_value_with_scope): Likewise.
3363 (push_overloaded_decl): Likewise.
3364 (lookup_tag): Likewise.
3365 (unqualified_namespace_lookup): Likewise.
3366 (lookup_name_current_level): Likewise.
3367 (maybe_inject_for_scope_var): Likewise.
3368 (namespace_binding): Move to name-lookup.c.
3369 (set_namespace_binding): Likewise.
3370 * decl2.c (lookup_using_namespace): Tidy.
3371 (qualified_lookup_using_namespace): Likewise.
3372 (do_toplevel_using_decl): Likewise.
3373 * name-lookup.c: Include "timevar.h"
3374 * name-lookup.h (cxx_scope): Declare.
3375 (struct cxx_binding): Lose member "has_level". Adjust "scope"
3376 member declaration.
3377 (BINDING_SCOPE): Adjust definition.
3378 (BINDING_HAS_LEVEL_P): Remove.
3379
3380 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3381
3382 * name-lookup.c: New file.
3383 * name-lookup.h: Likewise..
3384 * decl.c (push_binding): Adjust use cxx_binding_make.
3385 (free_bindings): Move to name-lookup.c
3386 (pop_binding): Use cxx_binding_free.
3387 (binding_for_name): Tidy.
3388 * cp-tree.h: Include "name-lookup.h"
3389 (cxx_binding_make): Move to name-lookup.h
3390 (cxx_binding_clear): Likewise.
3391 (struct cxx_binding): Likewise.
3392 (LOCAL_BINDING_P): Likewise.
3393 (INHERITED_VALUE_BINDING_P): Likewise.
3394 (BINDING_SCOPE): Likewise.
3395 (BINDING_HAS_LEVEL_P): Likewise.
3396 (BINDING_VALUE): Likewise.
3397 (BINDING_TYPE): Likewise.
3398 * config-lang.in (gtfiles): Add cp/name-lookup.h
3399 * Make-lang.in (cp/name-lookup.o): New rule.
3400 (CXX_OBJS): Add cp/name-lookup.o
3401 (CXX_TREE_H): Add cp/name-lookup.h
3402
3403 2003-03-28 Jason Merrill <jason@redhat.com>
3404
3405 PR c++/10245
3406 * cvt.c (force_rvalue): New fn.
3407 * call.c (build_conditional_expr): Use it.
3408 * cp-tree.h: Declare it.
3409
3410 2003-03-28 Mike Stump <mrs@apple.com>
3411
3412 * error.c (dump_expr): Add 0x to printed hex numbers to make
3413 output match source code better.
3414
3415 2003-03-28 Mark Mitchell <mark@codesourcery.com>
3416
3417 PR c++/10218
3418 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
3419 definitions.
3420
3421 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
3422 non-existant ssdf_decls array.
3423 (finish_file): Call generator_ctor_or_dtor_function when there are
3424 static constructors or destructors and no other static
3425 initializations.
3426
3427 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
3428
3429 PR c++/10047
3430 * decl2.c (finish_file): Don't warn about explicitly instantiated
3431 inline decls.
3432
3433 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
3434
3435 PR c++/10224
3436 * pt.c (lookup_template_class): Only check instantiated args if
3437 they do not contain template parameters.
3438
3439 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
3440
3441 PR c++/10158
3442 * parser.c (cp_parser_function_definition): Set
3443 DECL_INITIALIZED_IN_CLASS for members.
3444 * pt.c (instantiate_decl): Only reduce the template args for
3445 friends that are not defined in class.
3446
3447 2003-03-25 Jason Merrill <jason@redhat.com>
3448
3449 * call.c (print_z_candidate): Change name of first arg to msgid.
3450 (joust): Add comment for translators.
3451
3452 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3453
3454 PR c++/9898, PR c++/383, DR 322
3455 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
3456 through reference types on both PARM and ARG.
3457
3458 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3459
3460 PR c++/10119
3461 * error.c (dump_expr) <BASELINK>: Use dump_expr.
3462 * pt.c (maybe_fold_nontype_args): New function.
3463 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
3464 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
3465 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
3466 maybe_fold_nontype_args.
3467
3468 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3469
3470 PR c++/10026
3471 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
3472
3473 2003-03-23 Mark Mitchell <mark@codesourcery.com>
3474
3475 PR c++/7086
3476 * typeck.c (cxx_mark_addressable): Adjust call to
3477 gen_mem_addressof or put_var_into_stack.
3478
3479 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
3480
3481 PR c++/9978, c++/9708
3482 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
3483 * call.c (add_template_candidate_real): Adjust
3484 instantiate_template call.
3485 * class.c (resolve_address_of_overloaded_function): Likewise.
3486 * decl.c (build_enumerator): Set TREE_CONSTANT.
3487 * pt.c (check_instantiated_args): New.
3488 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
3489 TREE_READONLY.
3490 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
3491 (reduce_template_parm_level): Likewise.
3492 (process_template_parm): Likewise.
3493 (check_explicit_specialization): Adjust instantiate_template call.
3494 (convert_template_argument): Don't check non-type argument here.
3495 (lookup_template_class): Check them here.
3496 (tsubst_friend_function): Adjust instantiate_template call.
3497 (instantiate_template): Add tsubst_flags parameter, use it. Check
3498 instantiated args.
3499
3500 2003-03-21 Zack Weinberg <zack@codesourcery.com>
3501
3502 * decl.c: Update calls to shadow_warning.
3503
3504 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
3505
3506 PR c++/9898
3507 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
3508 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
3509
3510 2003-03-20 Mark Mitchell <mark@codesourcery.com>
3511
3512 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
3513 friends.
3514 * cp/pt.c (instantiate_class_template): Fix formatting.
3515
3516 2003-03-14 Matt Austern <austern@apple.com>
3517
3518 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
3519 (unemitted_tinfo_decl_p): Remove.
3520 (emit_tinfo_decl): Change declaration to remove unused parameter.
3521 * decl2.c (finish_file): Change tinfo emission to loop through
3522 unemitted_tinfo_decls array instead of looping through all decls.
3523 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
3524 unused second parameter.
3525 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
3526 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
3527 (emit_tinfo_decl): remove unused second parameter, add assertion
3528 that decl hasn't already been emitted.
3529
3530 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
3531
3532 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
3533 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
3534 return statements.
3535
3536 2003-03-19 Jason Merrill <jason@redhat.com>
3537
3538 PR c++/8316, c++/9315, c++/10136
3539 * call.c (print_z_candidate): Split out from...
3540 (print_z_candidiates): ...here.
3541 (joust): Use it.
3542
3543 2003-03-17 Roger Sayle <roger@eyesopen.com>
3544
3545 PR c++/10031
3546 * decl.c (duplicate_decls): Use the new type when prototyping
3547 anticipated decls, even when the types match. This defines the
3548 exception list for the built-in function.
3549
3550 2003-03-17 Jason Merrill <jason@redhat.com>
3551
3552 PR c++/10091
3553 * typeck.c (build_class_member_access_expr): Compare
3554 TYPE_MAIN_VARIANTs.
3555
3556 2003-03-17 Mark Mitchell <mark@codesourcery.com>
3557
3558 PR c++/9639
3559 * parser.c (cp_parser_declarator_id): Clear parser->scope.
3560
3561 2003-03-16 Jason Merrill <jason@redhat.com>
3562
3563 PR c++/9993
3564 * decl.c (finish_function): Only allow the NRVO to use variables
3565 declared at function scope.
3566
3567 2003-03-17 Andreas Jaeger <aj@suse.de>
3568
3569 * Make-lang.in (cp/TAGS): Remove.
3570
3571 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
3572
3573 PR c++/9629
3574 * cp-tree.h (struct language_function): Add in_base_initializer.
3575 (in_base_initializer): define it.
3576 (expand_member_init): Remove INIT param.
3577 * init.c (expand_member_init): Remove INIT param, return the member.
3578 (emit_mem_initializers): Set in_base_initializer.
3579 * class.c (build_base_path): Check in_base_initializer.
3580 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
3581 * pt.c (tsubst_initializer_list): Likewise.
3582
3583 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
3584
3585 * decl.c (binding_for_name): Fix initialization thinko.
3586
3587 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3588
3589 Compile-time improvement: 2/n.
3590 * cp-tree.h (struct cxx_binding): New datatype;
3591 (struct lang_identifier): Use it.
3592 (LOCAL_BINDING_P): Adjust definition.
3593 (INHERITED_VALUE_BINDING_P): Likewise.
3594 (BINDING_SCOPE): Likewise.
3595 (BINDING_HAS_LEVEL_P): Likewise.
3596 (BINDING_VALUE): Likewise.
3597 (BINDING_TYPE): Likewise.
3598 (IDENTIFIER_VALUE): Likewise.
3599 (struct tree_binding): Remove.
3600 (TS_CP_BINDING): Likewise.
3601 ((union lang_tree_node): Remove field "binding".
3602 (cxx_binding_clear): New macro.
3603 (binding_for_name): Adjust return type.
3604 (qualified_lookup_using_namespace): Adjust prototype.
3605 (lookup_using_namespace): Adjust prototype.
3606 (cxx_scope_find_binding_for_name): Declare.
3607 * cp-tree.def: Remove CPLUS_BINDING definition.
3608 * decl.c (push_binding): Adjust local variable type.
3609 (add_binding): Likewise.
3610 (push_class_binding): Likewise.
3611 (pop_binding): Likewise.
3612 (poplevel): Likewise.
3613 (poplevel_class): Likewise.
3614 (free_bindings): Adjust type.
3615 (find_binding): Adjust return type, add a third parameter. Remove
3616 non-useful assertion now that we use static typing.
3617 (cxx_scope_find_binding_for_name): New function.
3618 (binding_for_name): Use it. Adjust local variable type. Simplify.
3619 (namespace_binding): Simplify.
3620 (set_namespace_binding): Likewise.
3621 (set_identifier_type_value_with_scope): Adjust local variable type.
3622 (lookup_tag): Don't type-abuse of local variable 'old'.
3623 (lookup_namespace_name): Likewise. Allocate binding on stack.
3624 (select_decl): Adjust prototype.
3625 (unqualified_namespace_lookup): Allocate binding on stack.
3626 Don't type-abuse of local variable 'val'.
3627 (lookup_name_real): Likewise.
3628 (maybe_inject_for_scope_var): Adjust local variable type.
3629 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
3630 (namespace_binding): Adjust logic, simplify.
3631 (BINDING_LEVEL): Adjust definition.
3632 (push_class_level_binding): Adjust local variable type.
3633 (struct cxx_saved_binding): Adjust field 'binding' type.
3634 * decl2.c (ambiguous_decl): Adjust prototype.
3635 (lookup_using_namespace): Adjust local variable type.
3636 (qualified_lookup_using_namespace): Catch type error and correct
3637 ensueing logic error.
3638 (do_nonmember_using_decl): Adjust local variable type. Allocate
3639 temporary cxx_binding on stack.
3640 (do_toplevel_using_decl): Adjust local variable type.
3641 * ptree.c (cxx_print_cxx_binding): New function.
3642 (cxx_print_identifier): Use it.
3643 (cxx_print_xnode): Delete CPLUS_BINDING case label.
3644
3645 2003-03-15 Roger Sayle <roger@eyesopen.com>
3646
3647 * tree.c (count_functions): Fix whitespace.
3648
3649 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
3650
3651 * Make-lang.in: Update.
3652
3653 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3654
3655 PR c++/6440
3656 * pt.c (maybe_process_partial_specialization): Handle
3657 member class template when enclosing class template is
3658 explicit specialized.
3659 (most_general_template): Stop looking when DECL is already
3660 specialized.
3661
3662 2003-03-13 Jason Merrill <jason@redhat.com>
3663
3664 PR c++/9420
3665 * search.c (lookup_conversions): Call complete_type here.
3666 * call.c (implicit_conversion): Not here.
3667
3668 2003-03-13 Mark Mitchell <mark@codesourcery.com>
3669
3670 * decl2.c (do_nonmember_using_decl): Correct handling of
3671 simultaneous type/non-type bindings.
3672
3673 * call.c (initialize_reference): Remove bogus assertion.
3674 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
3675
3676 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
3677
3678 PR c++/7050
3679 * expr.c (cxx_expand_expr): Return const0_rtx for throw
3680 expressions.
3681
3682 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3683
3684 PR c++/9474
3685 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3686 to merge old and new declarations.
3687
3688 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3689
3690 * g++.1: Remove.
3691 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
3692 (cp/g++.1): Build it from scratch in the build tree.
3693 (c++.install-man): Depend on it. Install it from the build tree.
3694 (c++.mostlyclean): Clean it.
3695
3696 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3697
3698 PR c++/9474
3699 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3700 to merge old and new declarations.
3701
3702 PR c++/9924
3703 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
3704
3705 2003-03-11 Jason Merrill <jason@redhat.com>
3706
3707 PR c++/9820
3708 * search.c (lookup_member): Fix handling of functions in a class
3709 being defined.
3710
3711 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3712
3713 PR c++/8700
3714 * call.c (convert_class_to_reference): Adjust usage of
3715 splice_viable.
3716 (any_viable): Remove.
3717 (splice_viable): Combine with any_viable.
3718 (print_z_candidates): Avoid printing duplicates.
3719 (build_user_type_conversion_1): Adjust usage of splice_viable.
3720 (build_new_function_call): Likewise.
3721 (build_operator_new_call): Likewise.
3722 (build_object_call): Likewise.
3723 (build_conditional_expr): Likewise.
3724 (build_new_op): Likewise.
3725 (build_new_method_call): Likewise.
3726 (joust): Remove spurious comment.
3727 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
3728 * decl2.c (arg_assoc_class): Simplify.
3729 * friend.c (add_friend): Likewise.
3730
3731 2003-03-11 Jason Merrill <jason@redhat.com>
3732
3733 PR c++/8660
3734 * decl2.c (check_classfn): A member template only matches a
3735 member template.
3736
3737 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
3738
3739 * Make-lang.in (CXX_C_OBJS): Update.
3740 * lang-specs.h: Don't define __GNUG__ here.
3741
3742 2003-03-10 Mark Mitchell <mark@codesourcery.com>
3743
3744 * call.c (perform_overload_resolution): New function.
3745 (build_new_function_call): Use it.
3746 (build_operator_new_call): Likewise.
3747 (add_candidates): Add explicit_targs and template_only parameters.
3748 (build_new_op): Adjust accordingly.
3749 * cp-tree.h (build_operator_new_call): New function.
3750 (build_function_call_real): Remove.
3751 (build_function_call_maybe): Likewise.
3752 * init.c (build_new_1): Use build_operator_new_call.
3753 * typeck.c (build_function_call_real): Rename to ...
3754 (build_function_call): ... this.
3755
3756 2003-03-10 Devang Patel <dpatel@apple.com>
3757
3758 PR c++/9394
3759 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
3760
3761 2003-03-10 Jason Merrill <jason@redhat.com>
3762
3763 PR c++/9798
3764 * decl.c (push_using_directive): Push before recursing.
3765
3766 PR c++/9868, c++/9524
3767 * call.c (resolve_scoped_fn_name): Handle the case of a function
3768 pointer member.
3769
3770 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
3771 argument in the pointer-to-member case.
3772
3773 2003-03-09 Mark Mitchell <mark@codesourcery.com>
3774
3775 PR c++/9373
3776 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
3777 pointers to member functions.
3778
3779 PR c++/8534
3780 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
3781 in pointer-to-member-function types.
3782
3783 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3784
3785 * expr.c (cplus_expand_constant): Use C90 prototype style.
3786 (cxx_expand_expr): Likewise.
3787
3788 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3789
3790 PR c++/9970
3791 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
3792 functions.
3793
3794 2003-03-08 Geoffrey Keating <geoffk@apple.com>
3795
3796 * lang-specs.h (c++-header): Change .pch to .gch.
3797
3798 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
3799
3800 * cp-tree.h (cxx_init): Update prototype.
3801 * lex.c (cxx_init): Similarly.
3802
3803 2003-03-08 Mark Mitchell <mark@codesourcery.com>
3804
3805 PR c++/9823
3806 * cp-tree.h (begin_mem_initializers): Remove.
3807 * parser.c (cp_parser_mem_initializer_list): Inline it here.
3808 Do not call finish_mem_initializers if not in a constructor.
3809 (cp_parser_class_head): Fix typo in error message.
3810 * semantics.c (begin_mem_initializers): Remove.
3811 * testsuite/g++.dg/parser/constructor1.C: New test.
3812
3813 PR c++/9809
3814 * call.c (add_function_candidate): Skip builtin fuctions that have
3815 not yet been declared.
3816
3817 PR c++/9982
3818 * init.c (build_new_1): Correct logic for determining whether or
3819 not to use an array cookie.
3820
3821 PR c++/9524
3822 * parser.c (cp_parser_postfix_expression): Call
3823 finish_non_static_data_member, even when processing_template_decl.
3824
3825 PR c++/9912
3826 * cp-tree.h (is_ancestor): New function.
3827 (handle_class_head): Change prototype.
3828 * decl2.c (is_namespace_ancestor): Rename to ...
3829 (namespace_anecestor): ... this.
3830 (set_decl_namespace): Adjust accordingly.
3831 (handle_class_head): Remove unncessary parameters.
3832 * parser.c (cp_parser_class_head): Check that
3833 nested-name-specifiers are used appropriately.
3834
3835 2003-03-07 Mark Mitchell <mark@codesourcery.com>
3836
3837 * call.c (reference_binding): Remove REF_IS_VAR parameter.
3838 (implicit_conversion): Adjust call to reference_binding.
3839 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
3840 (initialize_reference): Adjust handling for references bound to
3841 rvalues.
3842 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
3843 prototype.
3844 (real_non_cast_lvalue_p): New method.
3845 * cvt.c (build_up_reference): Adjust use of
3846 make_temporary_var_for_ref_to_temp.
3847 * tree.c (real_non_cast_lvalue_p): New method.
3848
3849 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3850
3851 * except.c (init_exception_processing): Use C90 prototype style.
3852 (cp_protect_cleanup_actions): Likewise.
3853 (prepare_eh_type): Likewise.
3854 (build_eh_type_type): Likewise.
3855 (build_exc_ptr): Likewise.
3856 (do_begin_catch): Likewise.
3857 (dtor_nothrow): Likewise.
3858 (do_end_catch): Likewise.
3859 (push_eh_cleanup): Likewise.
3860 (decl_is_java_type): Likewise.
3861 (choose_personality_routine): Likewise.
3862 (initialize_handler_parm): Likewise.
3863 (expand_start_catch_block): Likewise.
3864 (expand_end_catch_block): Likewise.
3865 (begin_eh_spec_block): Likewise.
3866 (finish_eh_spec_block): Likewise.
3867 (do_allocate_exception): Likewise.
3868 (do_free_exception): Likewise.
3869 (wrap_cleanups_r): Likewise.
3870 (stabilize_throw_expr): Likewise.
3871 (build_throw): Likewise.
3872 (complete_ptr_ref_or_void_ptr_p): Likewise.
3873 (is_admissible_throw_operand): Likewise.
3874 (nothrow_libfn_p): Likewise.
3875 (can_convert_eh): Likewise.
3876 (check_handlers_1): Likewise.
3877 (check_handlers): Likewise.
3878
3879 2003-03-06 Mark Mitchell <mark@codesourcery.com>
3880
3881 * call.c (merge_conversion_sequences): New function.
3882 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
3883 (convert_class_to_reference): Correct handling of second
3884 standard conversion sequence in a user-defined conversion
3885 sequence.
3886 (build_user_type_conversion_1): Use merge_conversion_sequences.
3887 * cp-tree.def: Add comments for CONV nodes.
3888 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
3889
3890 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3891
3892 * error.c (init_error): Use C90 prototype style.
3893 (dump_scope): Likewise.
3894 (dump_qualifiers): Likewise.
3895 (dump_template_argument): Likewise.
3896 (dump_template_argument_list): Likewise.
3897 (dump_template_parameter): Likewise.
3898 (dump_template_bindings): Likewise.
3899 (dump_type): Likewise.
3900 (dump_typename): Likewise.
3901 (class_key_or_enum): Likewise.
3902 (dump_aggr_type): Likewise.
3903 (dump_type_prefix): Likewise.
3904 (dump_type_suffix): Likewise.
3905 (dump_global_iord): Likewise.
3906 (dump_simple_decl): Likewise.
3907 (dump_decl): Likewise.
3908 (dump_template_decl): Likewise.
3909 (dump_function_decl): Likewise.
3910 (dump_parameters): Likewise.
3911 (dump_exception_spec): Likewise.
3912 (dump_function_name): Likewise.
3913 (dump_template_parms): Likewise.
3914 (dump_char): Likewise.
3915 (dump_expr_list): Likewise.
3916 (dump_expr): Likewise.
3917 (dump_binary_op): Likewise.
3918 (dump_unary_op): Likewise.
3919 (type_as_string): Likewise.
3920 (expr_as_string): Likewise.
3921 (decl_as_string): Likewise.
3922 (context_as_string): Likewise.
3923 (lang_decl_name): Likewise.
3924 (cp_file_of): Likewise.
3925 (cp_line_of): Likewise.
3926 (decl_to_string): Likewise.
3927 (expr_to_string): Likewise.
3928 (fndecl_to_string): Likewise.
3929 (code_to_string): Likewise.
3930 (language_to_string): Likewise.
3931 (parm_to_string): Likewise.
3932 (op_to_string): Likewise.
3933 (type_to_string): Likewise.
3934 (assop_to_string): Likewise.
3935 (args_to_string): Likewise.
3936 (cv_to_string): Likewise.
3937 (cxx_print_error_function): Likewise.
3938 (cp_diagnostic_starter): Likewise.
3939 (cp_diagnostic_finalizer): Likewise.
3940 (cp_print_error_function): Likewise.
3941 (function_category): Likewise.
3942 (print_instantiation_full_context): Likewise.
3943 (print_instantiation_partial_context): Likewise.
3944 (maybe_print_instantiation_context): Likewise.
3945 (print_instantiation_context): Likewise.
3946 (cp_printer): Likewise.
3947 (print_integer): Likewise.
3948 (print_non_consecutive_character): Likewise.
3949 (locate_error): Likewise.
3950
3951 2003-03-06 Mark Mitchell <mark@codesourcery.com>
3952
3953 PR c++/9965
3954 * call.c (reference_binding): Add ref_is_var parameter.
3955 (implicit_conversion): Adjust call to reference_binding.
3956 (initialize_reference): Likewise.
3957
3958 PR c++/9400
3959 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
3960 PARM_DECLs.
3961
3962 PR c++/9791
3963 * class.c (get_basefndecls): Use lookup_fnfields_1.
3964
3965 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3966
3967 PR c++/9188
3968 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
3969 in error message.
3970 (cp_parser_single_declaration): Likewise.
3971
3972 2003-03-05 Jason Merrill <jason@redhat.com>
3973
3974 PR c++/9440
3975 * call.c (build_conditional_expr): Use convert rather than an
3976 explicit NOP_EXPR.
3977
3978 2003-03-02 Matt Austern <austern@apple.com>
3979
3980 * decl.c (cp_binding_level): Add static_decls varray member.
3981 (add_decl_to_level): Add static/inline namespace scope
3982 declarations to static_decls array.
3983 (wrapup_global_for_namespace): Pass static_decls only, instead of
3984 all decls, to wrapup_global_declarations/check_global_declarations.
3985 (push_namespace): Initialize static_decls for ordinary namespaces.
3986 (cxx_init_decl_processing): Initialize static_decls for global
3987 namespace.
3988
3989 2003-03-05 Mark Mitchell <mark@codesourcery.com>
3990
3991 * class.c (end_of_class): Correct thinko.
3992
3993 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
3994
3995 * config-lang.in: Replace ${libstdcxx_version} by its value.
3996
3997 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3998
3999 * cp-tree.h (cxx_saved_binding): Declare.
4000 (struct saved_scope): Adjust type of field 'old_binding'.
4001 * decl.c (cxx_saved_binding_make): New macro.
4002 (struct cxx_saved_binding): Define.
4003 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
4004 C++ bindings.
4005 (maybe_push_to_top_level): Adjust local variable type.
4006 (pop_from_top_level): Likewise.
4007
4008 2003-03-04 Tom Tromey <tromey@redhat.com>
4009
4010 * Make-lang.in (c++.tags): New target.
4011
4012 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
4013
4014 * Make-lang.in: Update.
4015
4016 2003-03-03 Jason Merrill <jason@redhat.com>
4017
4018 * decl.c (finish_enum): Do set the type in a template. Simplify.
4019 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4020
4021 2003-03-03 Mark Mitchell <mark@codesourcery.com>
4022
4023 PR c++/9878
4024 * call.c (convert_class_to_reference): Correct conversion
4025 sequences.
4026 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4027 (implicit_conversion): Adjust call to reference_binding.
4028 (add_candidate): Change type of candidates parameter.
4029 (add_function_candidate): Likewise.
4030 (add_conv_candidate): Likewise.
4031 (build_builtin_candidate): Likewise.
4032 (add_builtin_candidate): Likewise.
4033 (add_builtin_candidates): Likewise.
4034 (add_template_candidate_real): Likewise.
4035 (add_template_candidate): Likewise.
4036 (add_template_conv_candidate): Likewise.
4037 (build_user_type_conversion_1): Adjust accordingly.
4038 (build_object_call): Likewise.
4039 (build_conditional_expr): Likewise.
4040 (add_candidates): Likewise.
4041 (build_new_op): Likewise.
4042 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
4043 (build_new_method_call): Adjust calls to add_function_candidate.
4044 (make_temporary_var_for_ref_to_temp): New function.
4045 (initialize_reference): Add decl parameter.
4046 * class.c (build_rtti_vtbl_entries): Use build_address and
4047 build_nop.
4048 * cp-tree.h (initialize_reference): Change prototype.
4049 (make_temporary_var_for_ref_to_temp): New function.
4050 (build_type_conversion): Change prototype.
4051 (build_address): New function.
4052 (build_nop): Likewise.
4053 * cvt.c (cp_convert_to_pointer): Adjust call to
4054 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
4055 Use build_nop.
4056 (convert_to_pointer_force): Use build_nop.
4057 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
4058 (convert_to_reference): Adjust call to build_type_conversion.
4059 (ocp_convert): Likewise.
4060 (build_type_conversion): Remove for_sure parameter.
4061 * decl.c (grok_reference_init): Use initialize_reference.
4062 * typeck.c (build_address): New function.
4063 (build_nop): Likewise.
4064 (build_unary_op): Use them.
4065 (build_ptrmemfunc): Tidy slightly.
4066 (convert_for_initialization): Adjust call to
4067 initialize_reference.
4068 * typeck2.c (store_init_value): Remove #if 0'd code.
4069
4070 2003-03-03 Jason Merrill <jason@redhat.com>
4071
4072 * decl.c (start_function): Clear DECL_NUM_STMTS.
4073
4074 * class.c (get_vtable_decl): Use vtbl_type_node.
4075 (build_primary_vtable): Check for it.
4076
4077 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
4078
4079 * decl.c (check_initializer): Check for vector_opaque_p.
4080
4081 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
4082
4083 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
4084 invoke an external cpp during compilation.
4085
4086 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4087
4088 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
4089 that of warning().
4090 (start_decl): Likewise.
4091 (start_function): Likewise.
4092
4093 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
4094
4095 * Make-lang.in (CXX_C_OBJS): Update.
4096
4097 2003-02-28 Mark Mitchell <mark@codesourcery.com>
4098
4099 PR c++/9892
4100 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
4101 instantiating it.
4102
4103 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
4104
4105 * parser.c (cp_parser_init_declarator): Revert opaque
4106 vector_opaque_p change.
4107 Do not include target.h.
4108
4109 2003-02-28 Mark Mitchell <mark@codesourcery.com>
4110
4111 PR c++/9879
4112 * cp-tree.h (build_zero_init): Add parameter.
4113 * decl.c (cp_finish_decl): Adjust call.
4114 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
4115 calls.
4116 (build_default_init): Add nelts parameter. Adjust calls to
4117 build_zero_init.
4118 (build_new_1): Adjust call to build_default_init.
4119 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
4120
4121 2003-02-26 Devang Patel <dpatel@apple.com>
4122
4123 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
4124 required. Postpone enum setting for template decls.
4125 (build_enumerator): Delay copying value node until finish_enum
4126 (). Remove #if 0'ed code.
4127 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
4128 (tsubst_copy): Add check for enum type.
4129
4130 2003-02-25 Mark Mitchell <mark@codesourcery.com>
4131
4132 PR c++/9683
4133 * decl2.c (prune_vars_needing_no_initialization): Do not throw
4134 away initializations for DECL_EXTERNAL VAR_DECLs.
4135 (finish_file): Adjust accordingly.
4136 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4137
4138 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
4139
4140 * decl.c (add_binding): Time TV_NAME_LOOKUP.
4141 (push_class_binding): Likewise.
4142 (set_namespace_binding): Likewise.
4143
4144 2003-02-24 Mark Mitchell <mark@codesourcery.com>
4145
4146 PR c++/9836
4147 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4148 specializations back to the main template.
4149 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4150 * pt.c (resolve_typename_type): Likewise.
4151
4152 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
4153
4154 PR c++/9778
4155 * pt.c (tsubst_copy_and_build): For a templated function inside a
4156 scope, process template arguments.
4157
4158 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4159
4160 PR c++/9602
4161 * typeck2.c (abstract_virtuals_error): Don't check when
4162 TYPE is still template parameter dependent.
4163
4164 2003-02-23 Mark Mitchell <mark@codesourcery.com>
4165
4166 PR c++/5333
4167 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4168 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4169 * pt.c (instantiate_class_template): Don't try to instantiate
4170 dependent types.
4171 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4172
4173 2003-02-21 Mark Mitchell <mark@codesourcery.com>
4174
4175 PR c++/9749
4176 * decl.c (grokdeclarator): Do not allow parameters with variably
4177 modified types.
4178
4179 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
4180
4181 * search.c (grow_bfs_bases): Remove. Fold into ...
4182 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4183 in previous patch.
4184
4185 2003-02-20 Mark Mitchell <mark@codesourcery.com>
4186
4187 PR c++/9729
4188 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4189 when the G++ 3.2 ABI prevents correct compilation.
4190
4191 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
4192
4193 Change base class access representation. Share virtual base
4194 binfos.
4195 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4196 call.
4197 * cp/class.c (build_base_path): Likewise.
4198 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4199 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4200 (make_new_vtable): Adjust.
4201 (force_canonical_binfo_r): Delete.
4202 (force_canonical_binfo): Delete.
4203 (mark_primary_virtual_base): Delete.
4204 (dfs_unshared_virtual_bases): Delete.
4205 (mark_primary_bases): Adjust.
4206 (maybe_warn_about_overly_private_class): Adjust.
4207 (dfs_base_derived_from): Delete.
4208 (base_derived_from): Follow the inheritance chain.
4209 (struct find_final_overrider_data): Add vpath member.
4210 (dfs_find_final_overrider): Adjust.
4211 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4212 (find_final_overrider): Adjust.
4213 (update_vtable_entry_for_fn): Adjust.
4214 (modify_all_vtables): Adjust.
4215 (walk_subobject_offsets): Adjust.
4216 (layout_nonempty_base_or_field): Adjust.
4217 (layout_empty_base): Remove last parameter. Adjust.
4218 (build_base_field): Adjust.
4219 (build_base_fields): Adjust.
4220 (propagate_binfo_offsets): Remove last parameter. Adjust.
4221 (dfs_set_offset_for_unshared_vbases): Delete.
4222 (layout_virtual_bases): Adjust.
4223 (finish_struct_1): Adjust.
4224 (init_class_processing): Don't init access nodes.
4225 (dfs_get_primary_binfo): Delete.
4226 (get_primary_binfo): Adjust.
4227 (dump_class_hierarchy_r): Remove most derived arg, add IGO
4228 parameter. Adjust.
4229 (dump_class_hierarchy): Adjust.
4230 (finish_vtbls): Adjust.
4231 (get_original_base): Delete.
4232 (build_vtt_inits): Adjust.
4233 (dfs_build_secondary_vptr_vtt_inits): Adjust.
4234 (dfs_ctor_vtable_bases_queue_p): Adjust.
4235 (build_ctor_vtbl_group): Adjust.
4236 (dfs_accumulate_vtbl_inits): Adjust.
4237 (build_vtbl_initializer): Adjust.
4238 (build_vbase_offset_vtbl_entries): Adjust.
4239 (add_vcall_offset_vtbl_entries_1): Adjust.
4240 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4241 (access_*_node): Remove.
4242 (CANONICAL_BINFO): Delete.
4243 (BINFO_UNSHARED_MARKED): Remove.
4244 (BINFO_MARKED): Set LANG_FLAG_0 directly.
4245 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4246 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4247 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4248 Delete.
4249 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4250 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4251 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4252 Delete.
4253 (BINFO_DEPENDENT_BASE_P): New.
4254 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4255 index.
4256 (markedp, unmarkedp): Adjust.
4257 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4258 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4259 find_vbase_instance, binfo_for_vbase): Delete.
4260 (copied_binfo, original_binfo): Declare.
4261 (finish_base_specifier): Add virtual_p arg.
4262 (unshare_base_binfos): Delete.
4263 (copy_base_binfos): Declare.
4264 (reverse_path): Delete.
4265 * cp/decl.c (xref_basetypes): Access and virtuality passed
4266 differently. Don't copy direct base binfos here. Call
4267 copy_base_binfos.
4268 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4269 (initialize_vtbl_ptrs): Adjust.
4270 (expand_member_init): Adjust.
4271 * cp/parser.c (cp_parser_base_specifier): Adjust.
4272 * cp/pt.c (instantiate_class_template): Adjust.
4273 (get_template_base_recursive): Adjust.
4274 * cp/rtti.c (get_pseudo_ti_init): Adjust.
4275 (get_pseudo_ti_desc): Adjust.
4276 * cp/tree.c (unshare_base_binfos): Rename to ...
4277 (copy_base_binfos): ... here, reimplement.
4278 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4279 (reverse_path): Remove.
4280 * cp/typeck.c (get_delta_difference): Adjust error messages.
4281 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4282 * cp/search.c (lookup_base_r): Adjust.
4283 (dynamic_cast_base_recurse): Adjust.
4284 (canonical_binfo): Remove.
4285 (dfs_canonical_queue): Remove.
4286 (dfs_assert_unmarked_p): Remove.
4287 (assert_canonical_unmarked): Remove.
4288 (shared_marked_p, shared_unmarked_p): Remove.
4289 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4290 (dfs_access_in_type): Adjust.
4291 (access_in_type): Adjust.
4292 (dfs_accessible_queue_p): Adjust.
4293 (dfs_accessible_p): Adjust.
4294 (is_subobject_of_p_1, is_subobject_of_p): Remove.
4295 (struct lookup_field_info): Remove from_dep_base_p field.
4296 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4297 (lookup_field_r): Remove dependent base code.
4298 (lookup_member): Likewise.
4299 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4300 (dfs_unmarked_real_bases_queue_p): Remove.
4301 (dfs_marked_real_bases_queue_p): Remove.
4302 (dfs_skip_vbases): Remove.
4303 (dfs_get_pure_virtuals): Adjust.
4304 (markedp, unmarkedp): Adjust.
4305 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4306 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4307 (dfs_unmark): Adjust.
4308 (dfs_get_vbase_types):Remove.
4309 (dfs_build_inheritance_graph_order): Remove.
4310 (get_vbase_types): Remove
4311 (dfs_find_vbase_instance): Remove.
4312 (find_vbase_instance): Remove.
4313 (dfs_debug_unmarkedp): Adjust.
4314 (dependent_base_p): Remove.
4315 (dfs_push_type_decls): Adjust.
4316 (dfs_push_decls): Adjust.
4317 (dfs_no_overlap_yet): Adjust.
4318 (copied_binfo): New function.
4319 (original_binfo): New function.
4320 (binfo_for_vbase): Remove.
4321
4322 2003-02-18 Zack Weinberg <zack@codesourcery.com>
4323
4324 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4325 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4326 vectors, for speed.
4327
4328 2003-02-18 Mark Mitchell <mark@codesourcery.com>
4329
4330 PR c++/9704
4331 * class.c (layout_class_type): In the 3.2 ABI, take into account
4332 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4333
4334 2003-02-18 Matt Austern <austern@apple.com>
4335
4336 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4337 nothing for C++.
4338 * cp/decl.c (wrapup_globals_for_namespace): Remove special
4339 handling of global namespace.
4340
4341 2003-02-18 Geoffrey Keating <geoffk@apple.com>
4342
4343 * cp-tree.h (rid_to_yy): Delete.
4344 (C_RID_YYCODE): Delete.
4345 (finish_file): Delete redundant declaration.
4346
4347 2003-02-18 Jason Merrill <jason@redhat.com>
4348
4349 PR c++/9623
4350 * decl.c (reshape_init): Don't mess with initializer labels.
4351
4352 PR c++/9485
4353 * parser.c (cp_parser_postfix_expression): Set idk properly for
4354 object->scope::member.
4355
4356 2003-02-18 Ben Elliston <bje@redhat.com>
4357
4358 PR other/7350
4359 * decl.c (duplicate_decls): Fix typo in comment.
4360
4361 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
4362
4363 PR debug/9717
4364 * class.c (build_base_field): Mark fields for base classes with
4365 DECL_IGNORED_P.
4366
4367 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4368
4369 PR c++/9457
4370 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
4371 CONSTRUCTOR_ELTS only once.
4372
4373 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4374
4375 PR c++/9459
4376 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
4377 (dump_type_suffix): Likewise.
4378
4379 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
4380
4381 * search.c: ANSIfy function declarations and definitions.
4382 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
4383 * call.c (build_method_call, resolve_scoped_fn_name,
4384 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
4385 calls.
4386 * class.c (handle_using_decl): Likewise.
4387 * decl.c (make_typename_type, make_unmound_class_template,
4388 start_decl, compute_array_index_type): Likewise.
4389 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
4390 * init.c (expand_member_init, build_member_call): Likewise.
4391 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
4392 resolve_typename_type): Likewise.
4393 * typeck.c (lookup_destructor, finish_class_member_access_exprm
4394 build_prememfunc_access_expr): Likewise.
4395
4396 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4397
4398 * decl2.c: Include "timevar.h".
4399 (namespace_ancestor): Time name lookup.
4400 (add_using_namespace): Likewise.
4401 (lookup_using_namespace): Likewise.
4402 (qualified_lookup_using_namespace): Likewise.
4403 (decl_namespace): Likewise.
4404 (lookup_arg_dependent): Likewise.
4405 * lex.c (do_identifier): Likewise.
4406 (do_scoped_id): Likewise.
4407 * pt.c (lookup_template_class): Likewise.
4408
4409 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
4410
4411 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
4412
4413 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4414
4415 * decl.c: Include "timevar.h".
4416 (poplevel): Time name lookup.
4417 (find_binding): Likewise.
4418 (push_namespace): Likewise.
4419 (pop_nested_namespace): Likewise.
4420 (store_bindings): Likewise.
4421 (maybe_push_to_top_level): Likewise.
4422 (pop_from_top_level): Likewise.
4423 (push_local_name): Likewise.
4424 (pushtag): Likewise.
4425 (pushdecl): Likewise.
4426 (pushdecl_with_scope): Likewise.
4427 (pushdecl_namespace_level): Likewise.
4428 (pushdecl_top_level): Likewise.
4429 (pushdecl_class_level): Likewise.
4430 (push_class_level_binding): Likewise.
4431 (push_using_decl): Likewise.
4432 (push_using_directive): Likewise.
4433 (push_overloaded_decl): Likewise.
4434 (lookup_label): Likewise.
4435 (define_label): Likewise.
4436 (lookup_tag): Likewise.
4437 (lookup_tag_reverse): Likewise.
4438 (lookup_namespace_name): Likewise.
4439 (select_decl): Likewise.
4440 (unqualified_namespace_lookup): Likewise.
4441 (lookup_name_real): Likewise.
4442 (lookup_name_current_level): Likewise.
4443 (lookup_type_current_level): Likewise.
4444 (maybe_inject_for_scope_var): Likewise.
4445 (xref_tag): Likewise.
4446
4447 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
4448
4449 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
4450
4451 * decl.c (build_enumerator): Remove unneeded test.
4452
4453 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
4454
4455 * cp-tree.h (struct lang_type_header): Make all fields unsigned
4456 char.
4457
4458 2003-02-03 Mark Mitchell <mark@codesourcery.com>
4459
4460 PR c++/7129
4461 * call.c (z_candidate): Add args.
4462 (convert_class_to_reference): Set it.
4463 (implicit_conversion): Tidy.
4464 (add_candidate): Add args parameter.
4465 (add_function_candidate): Adjust call to add_candidate.
4466 (add_conv_candidate): Likewise.
4467 (build_builtin_candidate): Likewise.
4468 (build_user_type_conversion_1): Eliminate wasteful tree_cons
4469 usage.
4470 (build_new_function_call): Likewise.
4471 (build_object_call): Likewise.
4472 (add_candidates): New function.
4473 (build_new_op): Use it.
4474 (covert_like_real): Adjust call to build_over_call.
4475 (build_over_call): Remove args parameter.
4476 * operators.def: Add <?= and >?=.
4477
4478 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
4479
4480 * typeck.c (build_indirect_ref): Don't check flag_volatile.
4481
4482 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4483
4484 PR c++/8849
4485 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
4486
4487 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
4488
4489 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
4490 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
4491 (BINFO_LANG_ELTS): New #define.
4492 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
4493
4494 2003-01-30 Geoffrey Keating <geoffk@apple.com>
4495
4496 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
4497
4498 2003-01-30 Mark Mitchell <mark@codesourcery.com>
4499
4500 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
4501 for class types.
4502 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
4503 rather than TYPE_LANG_FLAG_0.
4504 (TYPE_BUILT_IN): Remove.
4505 (TYPE_DEPENDENT_P): New macro.
4506 (TYPE_DEPENDENT_P_VALID): Likewise.
4507 (lang_type_class): Add fields_readonly.
4508 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
4509 * pt.c (dependent_type_p_r): New function, split out from ...
4510 (dependent_type_p): ... here. Memoize results.
4511 * search.c (dependent_base_p): Use dependent_type_p, not
4512 uses_template_parms.
4513 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
4514 for class types.
4515
4516 2003-01-29 Mark Mitchell <mark@codesourcery.com>
4517
4518 * call.c (build_field_call): Use build_new_op, not build_opfncall.
4519 (prep_operand): New function.
4520 (build_new_op): Use it. Remove dead code.
4521 * class.c (pushclass): Change "modify" parameter type from int to
4522 bool.
4523 (currently_open_class): Use same_type_p, not pointer equality.
4524 (push_nested_class): Adjust calls to pushclass, remove modify
4525 parameter.
4526 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
4527 (pushclass): Change prototype.
4528 (push_nested_class): Likewise.
4529 (grokoptypename): Remove.
4530 (build_opfncall): Remove.
4531 (value_dependent_expression_p): Declare.
4532 (resolve_typename_type): Likewise.
4533 (resolve_typename_type_in_current_instantiation): Likewise.
4534 (enter_scope_of): Remove.
4535 (tsubst): Remove.
4536 (tsubst_expr): Likewise.
4537 (tsubst_copy): Likewise.
4538 (tsubst_copy_and_build): Likewise.
4539 * decl.c (warn_about_implicit_typename_lookup): Remove.
4540 (finish_case_label): Return error_mark_node for erroneous labels.
4541 (start_decl): Adjust calls to push_nested_class.
4542 (grokfndecl): Call push_scope/pop_scope around call to
4543 duplicate_decls.
4544 (grokdeclarator): Do not call tsubst.
4545 (start_function): Adjust calls to push_nested_class.
4546 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
4547 (check_classfn): Use push_scope/pop_scope around type comparisions.
4548 (grokoptypename): Remove.
4549 (push_sscope): Adjust call to push_nested_class.
4550 * error.c (dump_type): Show cv-qualification of typename types.
4551 * init.c (build_member_call): Use build_new_op, not
4552 build_opfncall.
4553 * method.c (build_opfncall): Remove.
4554 * parser.c (cp_parser): Add allow_non_constant_expression_p and
4555 non_constant_expression_p.
4556 (cp_parser_constant_expression): Adjust prototype.
4557 (cp_parser_resolve_typename_type): Remove.
4558 (cp_parser_non_constant_expression): New function.
4559 (cp_parser_non_constant_id_expression): Likewise.
4560 (cp_parser_new): Set allow_non_constant_expression_p and
4561 non_constant_expression_p.
4562 (cp_parser_primary_expression): Reject `this' and `va_arg' in
4563 constant-expressions. Note that dependent names aren't really
4564 constant.
4565 (cp_parser_postfix_expression): Reject conversions to non-integral
4566 types in constant-expressions. Neither are increments or
4567 decrements.
4568 (cp_parser_unary_expression): Reject increments and decrements in
4569 constant-expressions.
4570 (cp_parser_direct_new_declarator): Adjust call to
4571 cp_parser_constant_expression.
4572 (cp_parser_cast_expression): Reject conversions to non-integral
4573 types in constant-expressions.
4574 (cp_parser_assignment_expression): Rejects assignments in
4575 constant-expressions.
4576 (cp_parser_expression): Reject commas in constant-expressions.
4577 (cp_parser_labeled_statement): Adjust call to
4578 cp_parser_constant_expression.
4579 (cp_parser_direct_declarator): Simplify array bounds, even in
4580 templates, when they are non-dependent. Use
4581 resolve_typename_type, not cp_parser_resolve_typename_type.
4582 (cp_parser_class_head): Use resolve_typename_type, not
4583 cp_parser_resolve_typename_type.
4584 (cp_parser_member_declaration): Adjust call to
4585 cp_parser_constant_expression.
4586 (cp_parser_constant_initializer): Likewise.
4587 (cp_parser_constructor_declarator): Use resolve_typename_type, not
4588 cp_parser_resolve_typename_type.
4589 (cp_parser_late_parsing_default_args): Adjust call to
4590 push_nested_class.
4591 * pt.c (tsubst): Give it internal linkage.
4592 (tsubst_expr): Likewise.
4593 (tsubst_copy): Likewise.
4594 (tsubst_copy_and_build): Likewise.
4595 (push_access_scope_real): Likewise.
4596 (tsubst_friend_class): Likewise.
4597 (instantiate_class_template): Adjust call to pushclass.
4598 (value_dependent_expression_p): Give it external linkage.
4599 Robustify.
4600 (resolve_typename_type): New function.
4601 * semantics.c (finish_call_expr): Use build_new_op, not
4602 build_opfncall.
4603 (begin_constructor_declarator): Remove.
4604 (begin_class_definition): Adjust call to pushclass.
4605 (enter_scope_of): Remove.
4606 * typeck.c (comptypes): Resolve typename types as appropriate.
4607 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
4608 (build_x_compound_expr): Likewise.
4609 (build_modify_expr): Likewise.
4610 (build_x_modify_expr): Likewise.
4611 * typeck2.c (build_x_arrow): Likewise.
4612
4613 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
4614
4615 * pt.c (last_pending_template) Declare GTY().
4616
4617 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4618
4619 PR c++/8591
4620 * parser.c (cp_parser_elaborated_type_specifier): Convert
4621 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
4622 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
4623
4624 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
4625
4626 PR c++/9437
4627 * pt.c (unify): Don't unify '*T' with 'U C::*'.
4628
4629 PR c++/3902
4630 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
4631 inside a declarator.
4632
4633 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
4634
4635 * class.c (update_vtable_entry_for_fn): Add index parameter.
4636 Generate vcall thunk for covariant overriding from a virtual
4637 primary base.
4638 (dfs_modify_vtables): Adjust.
4639
4640 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
4641
4642 PR c++/9403
4643 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
4644 template keyword.
4645 (cp_parser_base_specifier): Look for and consume a
4646 TEMPLATE keyword. Replace switch with array index.
4647
4648 PR c++/795
4649 * semantics.c (finish_non_static_data_member): Remember the
4650 field's type even in a template.
4651
4652 PR c++/9415
4653 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
4654 already scoped.
4655
4656 PR c++/8545
4657 * parser.c (cp_parser_cast_expression): Be more tentative.
4658
4659 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4660
4661 * cp-tree.h (flagged_type_tree_s): Remove.
4662 (check_for_new_type): Likewise.
4663 * typeck2.c (check_for_new_type): Likewise.
4664
4665 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
4666
4667 * dump.c: ANSIfy function declarations and definitions.
4668
4669 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
4670
4671 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4672
4673 PR c++/9354
4674 * init.c (build_new): Set the type of the new-expression, even
4675 when processing_templte_decl.
4676
4677 PR c++/9216
4678 * parser.c (cp_parser_primary_expression): Improve error message
4679 for templates used in an expression context.
4680
4681 PR c++/8696
4682 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
4683 parse when encountering "typedef".
4684
4685 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
4686
4687 * class.c, parser.c: ANSIfy function definitions and declarations.
4688
4689 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4690
4691 PR c++/9328
4692 * error.c (dump_decl): For an OVERLOAD, just print the name of the
4693 function; it doesn't make sense to try to print its type.
4694 * semantics.c (finish_typeof): Issue errors about invalid uses.
4695
4696 PR c++/9298
4697 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
4698 function.
4699 (cp_parser_expression_statement): Use it.
4700 (cp_parser_explicit_instantiation): Likewise.
4701 * pt.c (do_decl_instantiation): Improve error handling logic.
4702
4703 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4704
4705 PR c++/9384
4706 * parser.c (cp_parser_using_declaration): Issue error messages
4707 about name resolution failures here.
4708
4709 PR c++/9388
4710 * class.c (currently_open_derived_class): Use dependent_type_p.
4711 * cp-tree.h (dependent_type_p): New function.
4712 (dependent_template_arg_p): Likewise.
4713 (dependent_template_p): Likewise.
4714 (type_dependent_expression_p): Likewise.
4715 * parser.c (cp_parser_dependent_type_p): Remove.
4716 (cp_parser_value_dependent_type_p): Likewise.
4717 (cp_parser_type_dependent_expression_p): Likewise.
4718 (cp_parser_dependent_template_arg_p): Likewise.
4719 (cp_parser_dependent_template_id_p): Likewise.
4720 (cp_parser_dependent_template_p): Likewise.
4721 (cp_parser_diagnose_invalid_type_name): Replace
4722 cp_parser_dependent_type_p with dependent_type_p, etc.
4723 (cp_parser_primary_expresion): Likewise.
4724 (cp_parser_nested_name_specifier_opt): Likewise.
4725 (cp_parser_postfix_expression): Likewise.
4726 (cp_parser_unary_expression): Likewise.
4727 (cp_parser_template_name): Likewise.
4728 (cp_parser_class_name): Likewise.
4729 (cp_parser_lookup_name): Likewise.
4730 * pt.c (dependent_type_p): New function.
4731 (value_dependent_expression_p): Likewise.
4732 (type_dependent_expression_p): Likewise.
4733 (dependent_template_arg_p): Likewise.
4734 (dependent_template_id_p): Likewise.
4735 (dependent_template_p): Likewise.
4736
4737 PR c++/9285
4738 PR c++/9294
4739 * parser.c (cp_parser_simple_declaration): Return quickly when
4740 encountering errors.
4741
4742 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4743
4744 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
4745
4746 2003-01-17 Jason Merrill <jason@redhat.com>
4747
4748 PR c++/9167, c++/9358
4749 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
4750
4751 2003-01-17 Jason Merrill <jason@redhat.com>
4752
4753 PR c++/9342
4754 * call.c (build_conditional_expr): Always do lvalue-rvalue
4755 conversion.
4756
4757 2003-01-17 Mark Mitchell <mark@codesourcery.com>
4758
4759 PR c++/9294
4760 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
4761 * cp-tree.h (BASELINK_BINFO): Adjust.
4762 (BASELINK_FUNCTIONS): Likewise.
4763 (BASELINK_ACCESS_BINFO): Likewise.
4764 (tree_baselink): New structure.
4765 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
4766 (lang_tree_node): Add baselink.
4767 * decl.c (cp_tree_node_structure): Add BASELINK case.
4768 * search.c (build_baselink): Adjust.
4769 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
4770 test from TREE_LIST case.
4771
4772 PR c++/9272
4773 * parser.c (cp_parser_constructor_declarator_p): Do not assume
4774 that a constructor cannot be declared outside of its own class.
4775
4776 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
4777 be resolved, neither can the qualified name.
4778
4779 * rtti.c (get_pseudo_ti_desc): Fix thinko.
4780
4781 2003-01-16 Jason Merrill <jason@redhat.com>
4782
4783 PR c++/8564
4784 * init.c (build_vec_init): Re-add maxindex parm.
4785 (perform_member_init, build_aggr_init): Pass it.
4786 (build_new_1): Pass it. Use an incomplete array type for full_type.
4787 * typeck.c (build_modify_expr): Pass it.
4788 * cp-tree.h: Adjust.
4789
4790 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
4791
4792 * cp-tree.h (tsubst_copy_and_build): New declaration.
4793 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
4794 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
4795 (tsubst_copy_and_build): New function.
4796
4797 2003-01-16 Mark Mitchell <mark@codesourcery.com>
4798
4799 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
4800 (PARTIAL_INSTANTIATION_P): Remove.
4801 (IMPLICIT_TYPENAME_P): Likewise.
4802 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
4803 (build_typename_type): Remove declaration.
4804 (parmlist_is_exprlist): Likewise.
4805 * decl.c (build_typename_type): Make it static, remove third
4806 parameter.
4807 (push_class_binding): Don't do implicit typename stuff.
4808 (make_typename_type): Likewise.
4809 (lookup_name_real): Likewise.
4810 (grokdeclarator): Don't try to convert declarations into
4811 initializations. Don't do implicit typename stuff.
4812 (parmlist_is_exprlist): Remove.
4813 (xref_basetypes): Simplify.
4814 * decl2.c (grokfield): Don't try to convert declarations into
4815 initializations.
4816 (build_anon_union_vars): Do this while processing templates, too.
4817 (finish_anon_union): Likewise.
4818 * error.c (dump_type): Remove implicit typename handling.
4819 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
4820 (cp_parser_primary_expression): Correct handling of names not
4821 found by unqualified name lookup in templates.
4822 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
4823 of types when possible.
4824 (cp_parser_simple_declaration): Complain intelligently about some
4825 invalid declarations.
4826 (cp_parser_member_declaration): Likewise.
4827 (cp_parser_constructor_declarator_p): Don't check when we're in a
4828 function scope.
4829 * pt.c (instantiate_class_template): Remove
4830 PARTIAL_INSTANTIATION_P gunk.
4831 * search.c (lookup_field_r): Don't build implicit typenames.
4832 (marked_pushdecls_p): Don't enter dependent base types.
4833 (unmarked_pushdecls_p): Likewise.
4834 * semantics.c (begin_class_definition): Remove implicit typename
4835 stuff.
4836
4837 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
4838
4839 PR c++/9212
4840 * parser.c (cp_parser_direct_declarator): If accepting either
4841 abstract or named, the name must be an unqualified-id.
4842
4843 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4844
4845 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
4846
4847 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4848
4849 * decl2.c (check_classfn): Fix uninitialized warning.
4850 (build_anon_union_vars): Likewise.
4851 * pt.c (tsubst_copy): Likewise.
4852
4853 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
4854
4855 Further conform g++'s __vmi_class_type_info to the C++ ABI
4856 specification.
4857 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
4858 the specification.
4859 (class_hint_flags): Likewise.
4860
4861 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4862
4863 * config-lang.in: Add semantics.c to gtfiles.
4864 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
4865 (saved_scope): Likewise.
4866 (type_lookups): Remove.
4867 (deferred_access): New structure.
4868 (type_access_control): Remove.
4869 (save_type_access_control): Likewise.
4870 (reset_type_access_control): Likewise.
4871 (decl_type_access_control): Likewise.
4872 (push_deferring_access_checks): Declare.
4873 (resume_deferring_access_checks): Likewise.
4874 (stop_deferring_access_checks): Likewise.
4875 (pop_deferring_access_checks): Likewise.
4876 (get_deferred_access_checks): Likewise.
4877 (pop_to_parent_deferring_access_checks): Likewise.
4878 (perform_deferred_access_checks): Likewise.
4879 (perform_or_defer_access_check): Likewise.
4880 * decl.c (make_typename_type): Use perform_or_defer_access_check.
4881 (make_unbound_class_template): Likewise.
4882 (grokdeclarator): Don't call decl_type_access_control.
4883 * parser.c (cp_parser_context): Remove deferred_access_checks
4884 and deferring_access_checks_p fields.
4885 (cp_parser_context_new): Adjust.
4886 (cp_parser): Remove access_checks_lists.
4887 (cp_parser_defer_access_check): Remove.
4888 (cp_parser_start_deferring_access_checks): Remove.
4889 (cp_parser_stop_deferring_access_checks): Remove.
4890 (cp_parser_perform_deferred_access_checks): Remove.
4891 (cp_parser_nested_name_specifier_opt): Use new deferred access
4892 functions.
4893 (cp_parser_simple_declaration): Likewise.
4894 (cp_parser_template_id): Likewise.
4895 (cp_parser_function_definition): Likewise.
4896 (cp_parser_class_specifier): Likewise.
4897 (cp_parser_lookup_name): Likewise.
4898 (cp_parser_single_declaration): Likewise.
4899 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
4900 (cp_parser_parse_tentatively): Likewise.
4901 (cp_parser_parse_definitely): Likewise.
4902 (yyparse): Likewise.
4903 (cp_parser_init_declarator): Remove access_checks parameter.
4904 Use new deferred access functions.
4905 (cp_parser_function_definition_from_specifiers_and_declarator):
4906 Likewise.
4907 (cp_parser_class_head): Remove deferring_access_checks_p and
4908 saved_access_checks parameters. Use new deferred access functions.
4909 (cp_parser_member_specification_opt): Don't call
4910 reset_type_access_control.
4911 * search.c (type_access_control): Remove.
4912 * semantics.c: Include "gt-cp-semantics.h".
4913 (deferred_type_access_control): Remove.
4914 (deferred_access_stack): New variable.
4915 (deferred_access_free_list): Likewise.
4916 (push_deferring_access_checks): New function.
4917 (resume_deferring_access_checks): Likewise.
4918 (stop_deferring_access_checks): Likewise.
4919 (pop_deferring_access_checks): Likewise.
4920 (get_deferred_access_checks): Likewise.
4921 (pop_to_parent_deferring_access_checks): Likewise.
4922 (perform_deferred_access_checks): New function, adapted from
4923 cp_parser_perform_deferred_access_checks.
4924 (perform_or_defer_access_check): New function, adapted from
4925 cp_parser_defer_access_check.
4926 (current_type_lookups): Remove.
4927 (deferred_type_access_control): Likewise.
4928 (decl_type_access_control): Likewise.
4929 (save_type_access_control): Likewise.
4930 (reset_type_access_control): Likewise.
4931 (begin_function_definition): Adjust.
4932 (begin_class_definiton): Likewise.
4933
4934 2003-01-13 Jason Merrill <jason@redhat.com>
4935
4936 PR c++/8748
4937 * class.c (build_base_path): Take the address before calling save_expr.
4938
4939 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
4940 all the ambiguous conversions are bad.
4941
4942 * class.c (maybe_warn_about_overly_private_class): Don't stop
4943 searching when we find a nonprivate method.
4944
4945 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
4946
4947 2003-01-12 Mark Mitchell <mark@codesourcery.com>
4948
4949 * cp-tree.h (get_arglist_len_in_bytes): Remove.
4950
4951 PR c++/9264
4952 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
4953 typeame types more robustly.
4954
4955 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
4956
4957 * parser.c: Fix comment typos.
4958
4959 2003-01-10 Mark Mitchell <mark@codesourcery.com>
4960
4961 PR c++/9099
4962 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
4963 an object_type which is not a class type.
4964
4965 2003-01-10 Geoffrey Keating <geoffk@apple.com>
4966
4967 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
4968 (cp_parser_late_parsing_default_args): Likewise.
4969
4970 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
4971
4972 * cfns.gperf: ANSIfy function declarations.
4973 * cfns.h: Regenerate.
4974 * cp-tree.h: ANSIfy function declarations.
4975
4976 2003-01-10 Mark Mitchell <mark@codesourcery.com>
4977
4978 * cp-tree.h (reparse_absdcl_as_expr): Remove.
4979 (reparse_absdcl_as_casts): Likewise.
4980 (reparse_decl_as_expr): Likewise.
4981 (finish_decl_parsing): Likewise.
4982 * decl2.c (reparse_absdcl_as_expr): Remove.
4983 (reparse_absdcl_as_casts): Likewise.
4984 (repase_decl_as_expr): Likewise.
4985 (finish_decl_parsing): Likewise.
4986
4987 PR c++/9128
4988 PR c++/9153
4989 PR c++/9171
4990 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
4991 function.
4992 (cp_parser_nested_name_specifier_opt): Correct the
4993 check_dependency_p false.
4994 (cp_parser_postfix_expression): Fix formatting.
4995 (cp_parser_decl_specifier_seq): Avoid looking for constructor
4996 declarators when possible.
4997 (cp_parser_template_id): Avoid performing name-lookup when
4998 possible.
4999 (cp_parser_class_head): Do not count specializations when counting
5000 levels of templates.
5001 (cp_parser_constructor_declarator_p): Return immediately if
5002 there's no chance that the tokens form a constructor declarator.
5003 * rtti.c (throw_bad_typeid): Add comment. Do not return an
5004 expression with reference type.
5005 (get_tinfo_decl_dynamic): Do not return an expression with
5006 reference type.
5007 (build_typeid): Add comment. Do not return an expression with
5008 reference type.
5009 * typeck.c (build_class_member_access_expr): Improve handling of
5010 conditionals and comma-expressions as objects.
5011
5012 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
5013
5014 * cfns.gperf: ANSIfy function declarations.
5015 * cfns.h: Regenerate.
5016 * cp-tree.h: ANSIfy function declarations.
5017 * parser.c: ANSIfy function declarations & definitions.
5018
5019 * decl.c (bad_specifiers): Fix parameter order error I introduced.
5020
5021 2003-01-09 Geoffrey Keating <geoffk@apple.com>
5022
5023 Merge from pch-branch:
5024
5025 2003-01-09 Geoffrey Keating <geoffk@apple.com>
5026
5027 Merge to tag pch-merge-20030102:
5028
5029 * semantics.c (finish_translation_unit): Don't call finish_file.
5030 * parser.c: Don't include ggc.h.
5031 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5032 read first token here. Don't allow PCH files after the first
5033 token is read.
5034 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5035 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5036 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5037 (cp_parser_late_parsing_for_member): Don't duplicate call to
5038 cp_lexer_set_source_position_from_token.
5039 (cp_parser_late_parsing_default_args): Likewise.
5040 (yyparse): Call finish_file after clearing the_parser.
5041
5042 2002-12-11 Geoffrey Keating <geoffk@apple.com>
5043
5044 * Make-lang.in: Remove $(GGC_H) from all dependencies.
5045 (CXX_TREE_H): Add $(GGC_H).
5046 * class.c: Don't include ggc.h.
5047 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5048 (method_name_cmp): Likewise.
5049 (resort_data): New variable.
5050 (resort_field_decl_cmp): New.
5051 (resort_method_name_cmp): New.
5052 (resort_sorted_fields): New.
5053 (resort_type_method_vec): New.
5054 (finish_struct_methods): Delete cast.
5055 (finish_struct_1): Delete cast.
5056 * cp-tree.h: Include ggc.h.
5057 (struct lang_type_class): Add reorder attribute to field `methods'.
5058 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
5059 (resort_sorted_fields): New prototype.
5060 (resort_type_method_vec): New prototype.
5061 * call.c: Don't include ggc.h.
5062 * decl.c: Likewise.
5063 * decl2.c: Likewise.
5064 * init.c: Likewise.
5065 * lex.c: Likewise.
5066 * method.c: Likewise.
5067 * optimize.c: Likewise.
5068 * parse.y: Likewise.
5069 * pt.c: Likewise.
5070 * repo.c: Likewise.
5071 * search.c: Likewise.
5072 * semantics.c: Likewise.
5073 * spew.c: Likewise.
5074 * tree.c: Likewise.
5075
5076 * lang-specs.h: Remove comment.
5077
5078 2002-12-03 Geoffrey Keating <geoffk@apple.com>
5079
5080 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
5081 (operator_name_info): Mark to be saved for PCH, specify size.
5082 (assignment_operator_name_info): Likewise.
5083
5084 2002-11-19 Geoffrey Keating <geoffk@apple.com>
5085
5086 * decl.c (anon_cnt): Mark to be saved for PCH.
5087
5088 2002-10-25 Geoffrey Keating <geoffk@apple.com>
5089
5090 * lex.c (init_reswords): Delete now-untrue comment.
5091 Allocate ridpointers using GGC.
5092
5093 2002-10-04 Geoffrey Keating <geoffk@apple.com>
5094
5095 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
5096
5097 * g++spec.c (lang_specific_driver): Don't include standard
5098 libraries in `added'.
5099
5100 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
5101
5102 * decl2.c (finish_file): Call c_common_write_pch.
5103 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
5104
5105 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
5106
5107 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
5108 files when using g++.
5109 * lang-specs.h: Handle compiling C++ header files.
5110
5111 2003-01-09 Jakub Jelinek <jakub@redhat.com>
5112
5113 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
5114
5115 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5116
5117 * pt.c (push_access_scope_real): Call push_to_top_level for
5118 function in namespace scope.
5119 (pop_access_scope): Call pop_from_top_level for function in
5120 namespace scope.
5121
5122 2003-01-09 Jakub Jelinek <jakub@redhat.com>
5123
5124 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
5125
5126 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
5127
5128 * Make-lang.in (c++.install-common, c++.install-man,
5129 c++.uninstall): Prepend $(DESTDIR) to destination paths in
5130 all (un)installation commands.
5131 (c++.install-common): Rewrite $(LN) commands to support
5132 DESTDIR with "ln" as well as with "ln -s".
5133
5134 2003-01-08 Jason Merrill <jason@redhat.com>
5135
5136 * parser.c (cp_parser_primary_expression): See through explicitly
5137 scoped ALIAS_DECLs, too.
5138
5139 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
5140
5141 * decl.c: Remove some #if 0 code.
5142
5143 * decl.c: ANSIfy function declarations.
5144
5145 2003-01-07 Mark Mitchell <mark@codesourcery.com>
5146
5147 * parser.c (cp_parser_asm_definition): Correct handling of omitted
5148 operands.
5149
5150 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5151
5152 PR c++/9030
5153 * decl.c (make_typename_type): Check access only when tf_error.
5154 (make_unbound_class_template): Likewise.
5155 * pt.c (saved_access_scope): New variable.
5156 (push_access_scope_real): New function.
5157 (push_access_scope): Likewise.
5158 (pop_access_scope): Likewise.
5159 (tsubst_default_argument): Use them.
5160 (instantiate_template): Likewise.
5161 (regenerate_decl_from_template): Likewise.
5162 (instantiate_decl): Likewise.
5163 (get_mostly_instantiated_function_type): Likewise.
5164
5165 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
5166
5167 * tree.c: Delete bogus #if 0 code.
5168
5169 2003-01-07 Andreas Schwab <schwab@suse.de>
5170
5171 * class.c (layout_class_type): Don't use
5172 PCC_BITFIELD_TYPE_MATTERS if not defined.
5173
5174 2003-01-06 Mark Mitchell <mark@codesourcery.com>
5175
5176 PR c++/9165
5177 * decl2.c (build_cleanup): Mark the object as used.
5178
5179 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5180 (hash_local_specialization): New function.
5181 (register_local_specialization): Revert 2003-01-05 change.
5182 (instantiate_decl): Use hash_local_specialization when creating
5183 the local_specializations table.
5184
5185 * decl2.c (mark_used): Do not synthesize thunks.
5186
5187 * class.c (layout_class_type): Correct handling of unnamed
5188 bitfields wider than their types.
5189
5190 PR c++/9189
5191 * parser.c (cp_parser): Remove default_arg_types. Update
5192 documentation for unparsed_functions_queues.
5193 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5194 parameter.
5195 (cp_parser_new): Don't set parser->default_arg_types.
5196 (cp_parser_function_definition): Adjust usage of
5197 unparsed_funtions_queues.
5198 (cp_parser_class_specifier): Don't mess with
5199 parser->default_arg_types. Handle default argument processing in
5200 a separate phase from function body processing.
5201 (cp_parser_template_declaration_after_export): Adjust usage of
5202 unparsed_functions_queues.
5203 (cp_parser_late_parsing_for_member): Do not handle default
5204 arguments.
5205
5206 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
5207
5208 PR c++/9109
5209 * parser.c (cp_parser_declarator_kind): New enum.
5210 (cp_parser_declarator): Adjust.
5211 (cp_parser_direct_declarator): Adjust. Allow for either named or
5212 abstract declarator. Prefer abstract, if possible. Allow
5213 parenthesized function name.
5214 (cp_parser_condition): Adjust cp_parser_declarator call.
5215 (cp_parser_explicit_instantiation): Likewise.
5216 (cp_parser_init_declarator): Likewise.
5217 (cp_parser_type_id): Likewise.
5218 (cp_parser_function_definition): Likewise.
5219 (cp_parser_member_declaration): Likewise.
5220 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5221 the tentative parsing.
5222 (cp_parser_exception_declaration): Likewise.
5223
5224 2003-01-05 Mark Mitchell <mark@codesourcery.com>
5225
5226 * parser.c (cp_parser_template_parameter): Adjust call to
5227 cp_parser_parameter_declaration.
5228 (cp_parser_parameter_declaration_list): Likewise.
5229 (cp_parser_parameter_declaration): Replace
5230 greater_than_is_operator_p with template_parm_p parameter. Do not
5231 cache tokens for template default arguments.
5232
5233 * pt.c (retrieve_local_specialization): Use htab_find, not
5234 htab_find_with_hash.
5235 (register_local_specialization): Use htab_find_slot, not
5236 htab_find_slot_with_hash.
5237 (instantiate_decl): Pass a hash function to htab_create.
5238
5239 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5240
5241 * parser.c (cp_parser_binary_expression,
5242 cp_parser_multiplicative_expression,
5243 cp_parser_additive_expression, cp_parser_shift_expression,
5244 cp_parser_relational_expression, cp_parser_equality_expression,
5245 cp_parser_and_expression, cp_parser_exclusive_or_expression,
5246 cp_parser_inclusive_or_expression,
5247 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5248 cp_parser_binary_expression): Const-ify.
5249
5250 2003-01-04 Mark Mitchell <mark@codesourcery.com>
5251
5252 * method.c (use_thunk): Disable access control while building the
5253 body of the thunk.
5254
5255 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
5256
5257 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5258 front end.
5259
5260 2003-01-03 Matt Austern <austern@apple.com>
5261
5262 * cp-tree.h (struct lang_type_class): add field for key method
5263 (cp_global_trees): rename dynamic_classes to keyed_classes
5264 (key_method): add definition
5265 * class.c (finish_struct_1): compute class's key method, and add
5266 the class to keyed_classes list if there is no key method.
5267 * decl.c (finish_function): add class to keyed_classes list if we
5268 see a definition of the class's key method.
5269 * pt.c (instantiate_class_template): add template specialization
5270 of a dynamic class to keyed_classes list.
5271 * decl2.c (key_method): remove
5272 (finish_file): iterate only through keyed_classes list when
5273 deciding whether to emit vtables, remove class from its list after
5274 we do the emission.
5275
5276 2003-01-02 Jason Merrill <jason@redhat.com>
5277
5278 * call.c (build_conditional_expr): Stabilize lvalues properly.
5279 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5280 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5281 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5282
5283 * call.c (convert_like_real): Call decl_constant_value for an
5284 IDENTITY_CONV even if there are no more conversions.
5285
5286 * cvt.c (build_up_reference): Don't push unnamed temps.
5287
5288 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5289
5290 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5291 for a backend struct.
5292
5293 * except.c (wrap_cleanups_r, build_throw): Make
5294 MUST_NOT_THROW_EXPRs void.
5295 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5296
5297 * init.c (build_vec_delete_1): Pre-evaluate the base address.
5298
5299 * init.c (get_temp_regvar): Simplify logic.
5300
5301 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5302 our replacement is a decl.
5303
5304 * decl.c (cp_make_fname_decl): Push the decls inside the
5305 outermost scope.
5306
5307 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
5308
5309 PR c++/45, c++/3784
5310 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5311 the same too.
5312
5313 2003-01-03 Graham Stott <graham.stott@btinternet.com>
5314
5315 * parser.c (struct cp_parser): Add access_checks_lists field
5316 (cp_parser_simple_declaration): Use.
5317 (cp_parser_init_declarator): Likewise.
5318
5319 2003-01-02 Mark Mitchell <mark@codesourcery.com>
5320
5321 * parser.c (cp_parser_declaration): Accept the __extension__
5322 keyword before the declaration.
5323
5324 PR c++/2843
5325 * parser.c (cp_parser_parameter_declaration): Allow attributes to
5326 appear after the declarator.
5327
5328 * call.c (build_new_method_call): Fix typo in message format
5329 string.
5330
5331 2003-01-02 Mark Mitchell <mark@codesourcery.com>
5332
5333 * parser.c (cp_lexer_next_token_is): Declare it inline.
5334 (cp_lexer_set_source_position_from_token): Likewise.
5335 (cp_lexer_debugging_p): Likewise.
5336 (cp_parser_parsing_tentatively): Likewise.
5337 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5338 to the cp_lexer_peek_token.
5339
5340 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5341 expression.
5342
5343 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
5344
5345 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5346 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5347 cp/repo.c: Fix copyright years.
5348
5349 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
5350
5351 * lex.c: Remove superfluous include of cpplib.h.
5352 (CONSTRAINT): Define without conditions.
5353 (init_cp_pragma): Use c_register_pragma.
5354
5355 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
5356
5357 * .cvsignore: Remove.
5358
5359 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
5360
5361 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5362 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5363 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5364 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5365 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5366 copyright header.
5367 * lex.h: parse.y is dead, so don't mention it. Also replace the
5368 copyright header with the default GNU copyright header.
5369
5370 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5371
5372 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
5373 (lookup_name_namespace_only): Likewise.
5374 (begin_only_namespace_names): Likewise.
5375 (end_only_namespace_names): Likewise.
5376 * decl.c (only_namespace_names): Remove.
5377 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
5378 (lookup_name_real): Do not check only_namespace_names.
5379 (lookup_name_namespace_only): Remove.
5380 (begin_only_namespace_names): Likewise.
5381 (end_only_namespace_names): Likewise.
5382 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
5383 nested-name-specifiers more gracefully.
5384 (cp_parser_class_or_namespace_name): Avoid looking up namespace
5385 names when they cannot possibly appear.
5386 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
5387 (cp_parser_elaborated_type_specifier): Likewise.
5388 (cp_parser_namespace_name): Only look for namespace names.
5389 (cp_parser_lookup_name): Add is_namespace parameter.
5390 (cp_parser_lookup_name_simple): Adjust call to
5391 cp_parser_lookup_name.
5392
5393 * parser.c (cp_parser_dependent_type_p): Fix thinko.
5394
5395 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
5396
5397 * .cvsignore: Update.
5398
5399 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
5400
5401 * class.c (modify_vtable_entry): Remove unused variable.
5402 (get_vcall_index): Always expect a non-thunk.
5403 (update_vtable_entry_for_fn): Combine covariant adjustments, when
5404 overriding a thunk. Pass get_vcall_index a non-thunk.
5405
5406 * decl2.c (finish_file): Mark undefined inlines as extern.
5407
5408 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5409
5410 * cp-tree.def (RETURN_INIT): Remove.
5411 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
5412 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
5413 (note_level_for_for): Remove.
5414 (note_level_for_try): Likewise.
5415 (note_level_for_catch): Likewise.
5416 (finish_named_return_value): Likewise.
5417 (do_pushlevel): Change prototype.
5418 (pending_lang_change): Remove.
5419 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
5420 sk_for.
5421 (note_level_for_for): Remove.
5422 (note_level_for_try): Likewise.
5423 (note_level_for_catch): Likewise.
5424 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
5425 * parser.c (cp_parser_context_free_list): Make it "deletable".
5426 (cp_parser_template_argument): Remove misleading comment.
5427 * pt.c (tsubst_expr): Remove RETURN_INIT code.
5428 * semantics.c (genrtl_named_return_value): Remove.
5429 (do_pushlevel): Take a scope kind as an argument.
5430 (begin_if_stmt): Adjust.
5431 (begin_while_stmt): Likewise.
5432 (begin_for_stmt): Likewise.
5433 (finish_for_init_stmt): Likewise.
5434 (begin_switch_stmt): Likewise.
5435 (begin_handler): Likewise.
5436 (begin_compound_stmt): Likewise.
5437 (finish_named_return_value): Remove.
5438 (cp_expand_stmt): Remove RETURN_INIT case.
5439 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
5440
5441 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5442
5443 PR c++/9112
5444 * parser.c (cp_parser_direct_declarator): Handle erroneous
5445 parenthesized declarators correctly.
5446
5447 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
5448
5449 * cp-tree.h (pending_lang_change): Declare.
5450
5451 2002-12-30 Mark Mitchell <mark@codesourcery.com>
5452
5453 * parser.c (cp_parser_context_free_list): New variable.
5454 (cp_parser_context_new): Use it.
5455 (cp_parser_error): Check return code from
5456 cp_parser_simulate_error.
5457 (cp_parser_simulate_error): Return a value.
5458 (cp_parser_id_expression): Optimize common case.
5459 (cp_parser_class_name): Likewise.
5460 (cp_parser_class_specifier): Adjust call to
5461 cp_parser_late_parsing_default_args.
5462 (cp_parser_lookup_name): Optimize common case.
5463 (cp_parser_late_parsing_for_member): Adjust call to
5464 cp_parser_late_parsing_default_args.
5465 (cp_parser_late_parsing_default_args): Add scope parameter.
5466 (cp_parser_require): Avoid creating the error message unless it's
5467 needed.
5468 (cp_parser_parse_definitely): Place free'd contexts on the free
5469 list.
5470
5471 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
5472
5473 2002-12-30 David Edelsohn <edelsohn@gnu.org>
5474
5475 * parser.c (cp_parser_parameter_declaration_clause): Treat system
5476 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
5477
5478 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
5479
5480 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
5481 GCC, not GNU CC.
5482
5483 2002-12-30 Mark Mitchell <mark@codesourcery.com>
5484
5485 * parse.y: Remove.
5486 * spew.c: Likewise.
5487 * Make-lang.in (gt-cp-spew.h): Remove.
5488 * cp-tree.h (do_pending_lang_change): Remove.
5489 (do_identifier): Change prototype.
5490 (finish_id_expr): Remove.
5491 * decl.c (lookup_name_real): Remove yylex variable.
5492 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
5493 * lex.c (init_cpp_parse): Remove.
5494 (reduce_cmp): Likewise.
5495 (token_cmp): Likewise.
5496 (yychar): Likewise.
5497 (lastiddecl): Likewise.
5498 (token_count): Likewise.
5499 (reduce_count): Likewise.
5500 (yyhook): Likewise.
5501 (print_parse_statistics): Likewise.
5502 (do_pending_lang_change): Likewise.
5503 (do_identifier): Remove parsing parameter.
5504 * lex.h (lastiddecl): Remove.
5505 (looking_for_typename): Remove.
5506 (looking_for_template): Likewise.
5507 (pending_lang_change): Likewise.
5508 (yylex): Likewise.
5509 * semantics.c (finish_id_expr): Remove.
5510
5511 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
5512 thread" correctly.
5513
5514 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
5515
5516 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
5517 end, not the C front end.
5518
5519 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
5520
5521 * cp-tree.h (THUNK_TARGET): New macro.
5522 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
5523 (finish_thunk): Remove offset parms.
5524 * class.c (find_final_overrider): Look through thunks.
5525 (get_vcall_index): Use THUNK_TARGET.
5526 (update_vtable_entry_for_fn): Look through thunks. Set covariant
5527 fixed offset here. Adjust finish_thunk call.
5528 (build_vtbl_initializer): Adjust finish_thunk calls.
5529 * mangle.c (mangle_call_offset): Remove superfluous if.
5530 (mangle_thunk): Adjust.
5531 * method.c (make_thunk): Adjust.
5532 (finish_thunk): Adjust.
5533 (thunk_adjust): Remove assert.
5534 (use_thunk): Use THUNK_TARGET
5535 * dump1.c (cp_dump_tree): Adjust thunk dumping.
5536
5537 PR c++/9054
5538 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
5539 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
5540
5541 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
5542
5543 Remove traditional C constructs 4/n.
5544 * decl2.c (grok_method_quals, warn_if_unknown_interface,
5545 grok_x_components, cp_build_parm_decl, build_artificial_parm,
5546 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
5547 delete_sanity, check_member_template, check_java_method,
5548 check_classfn, finish_static_data_member_decl, grokfield,
5549 grokbitfield, grokoptypename, grok_function_init,
5550 cplus_decl_attributes, constructor_name, defer_fn,
5551 build_anon_union_vars, finish_anon_union, coerce_new_type,
5552 coerce_delete_type, comdat_linkage, maybe_make_one_only,
5553 key_method, import_export_vtable, import_export_class,
5554 output_vtable_inherit, import_export_decl, import_export_tinfo,
5555 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
5556 set_guard, start_objects, finish_objects,
5557 start_static_storage_duration_function,
5558 finish_static_storage_duration_function, get_priority_info,
5559 start_static_initialization_or_destruction,
5560 finish_static_initialization_or_destruction,
5561 do_static_initialization, do_static_destruction,
5562 prune_vars_needing_no_initialization, write_out_vars,
5563 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
5564 add_using_namespace, merge_functions, ambiguous_decl,
5565 lookup_using_namespace, lookup_using_namespace,
5566 qualified_lookup_using_namespace, set_decl_namespace,
5567 decl_namespace, current_decl_namespace, push_decl_namespace,
5568 pop_decl_namespace, push_scope, pop_scope, add_function,
5569 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
5570 lookup_arg_dependent, do_namespace_alias,
5571 validate_nonmember_using_decl, do_nonmember_using_decl,
5572 do_toplevel_using_decl, do_local_using_decl,
5573 do_class_using_decl, do_using_directive, check_default_args,
5574 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
5575 * parser.c (cp_parser_class_head): Use booleanss.
5576 * decl.c (walk_globals, walk_vtables): Likewise.
5577 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
5578 walk_globals): Change return type from 'int' to 'bool'.
5579 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
5580 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
5581 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
5582 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
5583 qualifier_flags, tinfo_base_init, generic_initializer,
5584 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
5585 dfs_class_hint_unmark, class_hint_flags, class_initializer,
5586 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
5587 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
5588 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
5589 * repo.c (repo_compile_flags, repo_template_declared,
5590 repo_template_defined, repo_class_defined, repo_get_id,
5591 repo_template_used, repo_vtable_used, repo_inline_used,
5592 repo_tinfo_used, repo_template_instantiated, extract_string,
5593 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
5594 finish_repo): Likewise.
5595 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
5596 cxx_print_xnode): Likewise..
5597 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
5598 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
5599 * cxxfilt.c (demangle_it, print_demangler_list, usage,
5600 standard_symbol_characters, hp_symbol_characters, main, fatal):
5601 Likewise.
5602 (strip_underscore): Change type from 'int' to 'bool'.
5603 (main): Use boolean constants.
5604
5605 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
5606
5607 Remove traditional C constructs 3/n.
5608 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
5609 build_up_reference, warn_ref_binding, convert_to_reference,
5610 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
5611 convert_to_void, convert, convert_force, build_type_conversion,
5612 build_expr_type_conversion, type_promotes_to,
5613 perform_qualification_conversions): Use C90 prototyping style.
5614 * decl2.c (grok_array_decl): Use boolean constant.
5615 (delete_sanity): Likewise.
5616 * typeck.c (build_unary_op): Likewise.
5617 * semantics.c (finish_switch_cond): Likewise.
5618 * parser.c (cp_parser_direct_new_declarator): Likewise.
5619 * init.c (build_new): Likewise.
5620
5621 2002-12-27 Mark Mitchell <mark@codesourcery.com>
5622
5623 * Make-lang.in (po-generated): Remove parse.c.
5624 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
5625 ($(srcdir)/cp/parse.h): Remove target.
5626 ($(srcdir)/cp/parse.c): Likewise.
5627 (gt-cp-parse.h): Likewise.
5628 (gt-cp-parser.h): New target.
5629 (c++.distclean): Do not remove parse.output.
5630 (c++.maintainer-clean): Do not remove parse.c or parse.h.
5631 (cp/spew.o): Remove target.
5632 (cp/lex.o): Adjust dependencies.
5633 (cp/pt.o): Likewise.
5634 (cp/parse.o): Likewise.
5635 (cp/TAGS): Do not mention parse.c.
5636 (cp/parser.o): New target.
5637 * NEWS: Mention the new parser.
5638 * call.c (build_scoped_method_call): Simplify.
5639 (build_method_call): Likewise.
5640 (build_new_function_call): Adjust calls to add_function_candidate
5641 and add_template_candidate.
5642 (build_new_op): Improve handling of erroroneous operands.
5643 (convert_default_arg): Remove circular argument processing.
5644 (name_as_c_string): New function.
5645 (build_new_method_call): Use it.
5646 (perform_implicit_conversion): Use error_operand_p.
5647 * class.c (finish_struct_anon): Use constructor_name_p.
5648 (check_field_decls): Likewise.
5649 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
5650 (resolve_address_of_overloaded_function): Likewise.
5651 (instantiate_type): Tweak pointer-to-member handling.
5652 (get_primary_binfo): Remove incorrect assertion.
5653 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
5654 * cp-tree.h (DEFARG_TOKENS): New macro.
5655 (default_arg): New structure.
5656 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
5657 (lang_tree_node): Add default_arg.
5658 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
5659 (type_info_ref_type): New macro.
5660 (saved_scope): Make processing_explicit_instantiation a boolean.
5661 (check_access): New field.
5662 (unparsed_text): Remove.
5663 (language_function): Remove unparsed_inlines.
5664 (error_operand_p): New macro.
5665 (lang_decl): Adjust pending_inline_info.
5666 (DEFARG_POINTER): Remove.
5667 (tag_types): Add typenames.
5668 (lookup_ualified_name): Declare.
5669 (lookup_name_real): Likewise.
5670 (shadow_tag): Adjust prototype.
5671 (get_scope_of_declarator): Declare it.
5672 (process_next_inline): Remove it.
5673 (check_for_missing_semicolon): Likewise.
5674 (maybe_get_template_decl_from_type_decl): Declare it.
5675 (finish_label_stmt): Adjust prototype.
5676 (finish_non_static_data_meber): Declare it.
5677 (finish_pseudo_destructor_call_expr): Rename to ...
5678 (finish_pseudo_destructor_expr): ... this.
5679 (finish_compound_literal): Declare it.
5680 (begin_inline_definitions): Remove it.
5681 (init_spew): Remove.
5682 (peekyylex): Likewise.
5683 (arbitrate_lookup): Likewise.
5684 (frob_opname): Likewise.
5685 (maybe_snarf_defarg): Likewise.
5686 (add_defarg_fn): Likewise.
5687 (do_pending_defargs): Likewise.
5688 (done_pending_defargs): Likewise.
5689 (unprocessed_defarg_fn): Likewise.
5690 (replace_defarg): Likewise.
5691 (end_input): Likewise.
5692 (get_overloaded_fn): Likewise.
5693 * cvt.c (convert_to_reference): Improve error handling.
5694 * decl.c (lookup_name_real): Do not declare it static.
5695 (maybe_push_to_top_level): Set check_access.
5696 (identifier_type_value): Adjust call to lookup_name_real.
5697 (lookup_qualified_name): New method.
5698 (lookup_name_real): Remove special-case parsing code.
5699 (lookup_name-nonclass): Adjust call to lookup_name_real.
5700 (lookup_name_namespace_only): Likewise.
5701 (lookup_name): Likewise.
5702 (check_tag_decl): Return the type declared.
5703 (shadow_tag): Likewise.
5704 (register_dtor_fn): Tweak check_access.
5705 (grokfndecl): Use constructor_name_p.
5706 (get_scope_of_declarator): New function.
5707 (grokdeclarator): Obscure tweaks for slightly different declarator
5708 representations.
5709 (start_method): Return error_mark_node to indicate failure.
5710 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
5711 * decl2.c (constructor_name_full): Simplify.
5712 (constructor_name): Use it.
5713 (build_expr_from_tree): Adjust for changes to do new parser.
5714 (push_scope): Improve robustness.
5715 (validate_nonmember_using_decl): Process declarations, not names.
5716 (do_class_using_decl): Likewise.
5717 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
5718 here.
5719 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
5720 * expr.c (cxx_expand_expr): Handle BASELINKs.
5721 * init.c (member_init_ok_or_else): Issue more errors.
5722 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
5723 * lex.c: Do not include parse.h.
5724 (yypring): Do not declare.
5725 (yylval): Likewise.
5726 (make_reference_declarator): Remove error-generating code.
5727 (rid_to_yy): Remove.
5728 (cxx_init): Do not call init_spew.
5729 (yypring): Remove.
5730 (check_for_missing_semicolon): Remove.
5731 * lex.h (got_scope): Remove.
5732 (got_object): Remove.
5733 * method.c (hack_identifier): Use finish_non_static_data_member.
5734 (implicitly_declare_fn): Adjust use of constructor_name.
5735 * parser.c: New file.
5736 * pt.c (parse.h): Do not include it.
5737 (maybe_get_template_decl_from_template): Do not declare it.
5738 (finish_member_template_decl): Tweak.
5739 (begin_explicit_instantiation): Adjust for
5740 processing_explicit_instantiation being boolean.
5741 (end_explicit_instantiation): Likewise.
5742 (maybe_process_partial_specialization): Tighten specialization
5743 test.
5744 (retrieve_local_specialization): Adjust ue of hash table.
5745 (eq_local_specializations): New function.
5746 (register_local_specialization): Likewise.
5747 (push_template_decl_real): Remove unnecessary test.
5748 (maybe_get_template_decl_from_type_decl): Don't make it static.
5749 (for_each_template_parm_r): Handle TYPEOF_TYPE.
5750 (tsubst_copy): Use retrieive_local_specialization to handle
5751 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
5752 Handle COMPONENT_REFs with pseudo-destructor-expressions.
5753 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
5754 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
5755 (unify): Tweak handling of CONST_DECLs.
5756 (regenerate_decl_from_template): Use push_nested_class.
5757 (template_for_substitution): New funciton.
5758 (instantiate_decl): Use it. Register parameters as local
5759 specializations.
5760 * rtti.c (init_rtti_processing): Set type_info_ref_type.
5761 (build_typeid): Use it.
5762 (get_typeid): Likeise.
5763 * search.c (accessible_p): Use check_access, not
5764 flag_access_control.
5765 (adjust_result_of_qualified_name_lookup): Pay attention to the
5766 context_class.
5767 * semantics.c (finish_asm_stmt): Adjust error handling.
5768 (finish_label_stmt): Return the statement.
5769 (finish_non_static_data_member): New function.
5770 (finish_class_expr): Handle BASELINKs.
5771 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
5772 (finish_object_call_expr): Simplify handling during templates.
5773 (finish_pseudo_destructor_call_expr): Rename to ...
5774 (finish_pseudo_dtor_expr): ... this.
5775 (finish_compound_literal): New function.
5776 (begin_inline_definitions): Remove.
5777 (finish_sizeof): Remove special template handling.
5778 * spew.c: Do not include parse.h.
5779 * tree.c (get_overloaded_fn): Remove.
5780 * typeck.c (build_class_member_access_expr): Handle
5781 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
5782 (lookup_destructor): New function.
5783 (finish_class_member_access_expr): Use it.
5784 (convert_arguments): Simplify.
5785 (build_unary_op): Handle BASELINKs.
5786
5787 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
5788
5789 PR c++/4803
5790 * decl2.c (mark_used): Defer inline functions.
5791 (finish_file): Merge deferred_fns loops. Check all used
5792 inline functions have a definition.
5793 * method.c (make_thunk): Thunks are not inline.
5794
5795 PR c++/5116, c++/764
5796 * call.c (build_new_op): Make sure template class operands are
5797 instantiated.
5798
5799 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
5800
5801 PR C++/7964
5802 * cp-tree.h (resolve_scoped_fn_name): Prototype.
5803 * call.c (resolve_scoped_fn_name): New function. Deal with
5804 more template expansion. Broken out of ...
5805 * parse.y (parse_finish_call_expr): ... here. Call it.
5806 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
5807 resolve_scoped_fn_name and build_call_from_tree.
5808
5809 PR c++/9053
5810 * decl.c (duplicate_decls): Templates may be disambiguated by
5811 return type.
5812
5813 PR c++/8702
5814 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
5815 conversion operators on failure.
5816
5817 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5818
5819 Remove traditional C constructs 2/n.
5820 * call.c (tourney, build_field_call, equal_functions, joust,
5821 compare_ics, build_over_call, build_java_interface_fn_ref,
5822 convert_like_real, op_error, build_object_call, resolve_args,
5823 build_vfield_ref, check_dtor_name, build_scoped_method_call,
5824 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
5825 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
5826 standard_conversion, reference_related_p,
5827 reference_compatible_p, convert_class_to_reference,
5828 direct_reference_binding, reference_binding,
5829 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
5830 add_template_conv_candidate, any_viable, any_strictly_viable,
5831 build_this, splice_viable, print_z_candidates,
5832 build_user_type_conversion, build_new_function_call,
5833 conditional_conversion, build_conditional_expr, build_new_op,
5834 build_op_delete_call, enforce_access, call_builtin_trap,
5835 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
5836 convert_default_arg, type_passed_as, convert_for_arg_passing,
5837 in_charge_arg_for_name, is_properly_derived_from,
5838 maybe_handle_implicit_object, maybe_handle_ref_bind,
5839 source_type, add_warning, can_convert, can_convert_arg,
5840 perform_implicit_conversion, can_convert_arg_bad,
5841 initialize_reference, add_conv_candidate,
5842 add_template_candidate_real, add_template_candidate): Ansify.
5843
5844 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
5845
5846 PR c++/8572
5847 * cp-tree.h (grokoptypename): Add SCOPE parameter.
5848 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
5849 if in a template scope.
5850 * parse.y (unoperator): Return the scope.
5851 (operator_name): Adjust grokoptypename call.
5852
5853 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5854
5855 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
5856 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
5857 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
5858
5859 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5860
5861 * ChangeLog: Fix a typo.
5862 * class.c: Fix comment typos.
5863 * cp-tree.h: Likewise.
5864
5865 2002-12-18 Jason Merrill <jason@redhat.com>
5866
5867 Handle anonymous unions at the tree level.
5868 C++ ABI change: Mangle anonymous unions using the name of their
5869 first named field (by depth-first search). Should not cause
5870 binary compatibility problems, though, as the compiler previously
5871 didn't emit anything for affected unions.
5872 * cp-tree.def (ALIAS_DECL): New tree code.
5873 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
5874 first field, not the largest.
5875 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
5876 push the decl, and write it out at namespace scope.
5877 * decl.c (lookup_name_real): See through an ALIAS_DECL.
5878 (pushdecl): Add namespace bindings for ALIAS_DECLs.
5879 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
5880 of a decl which doesn't have one.
5881 * typeck.c (build_class_member_access_expr): Don't recurse if
5882 we already have the type we want.
5883
5884 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5885
5886 PR c++/8099
5887 * friend.c (make_friend_class): Allow partial specialization
5888 when declaration is not a template friend.
5889
5890 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5891
5892 PR c++/3663
5893 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
5894 TREE_PROTECTED to created decl nodes.
5895
5896 2002-12-18 Mark Mitchell <mark@codesourcery.com>
5897
5898 * class.c (build_base_field): Do not set DECL_PACKED on the
5899 FIELD_DECL.
5900
5901 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
5902
5903 * cp-tree.h (struct tree_srcloc): Use location_t.
5904 (SOURCE_LOCUS): New.
5905 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
5906
5907 2002-12-17 Jason Merrill <jason@redhat.com>
5908
5909 * decl.c (finish_function): Also complain about no return in
5910 templates.
5911 * semantics.c (finish_return_stmt): Also call check_return_expr in
5912 templates.
5913 * typeck.c (check_return_expr): In a template, just remember that we
5914 saw a return.
5915
5916 2002-12-16 Jason Merrill <jason@redhat.com>
5917
5918 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
5919 of the CALL_EXPR.
5920
5921 * semantics.c (do_pushlevel): Call pushlevel after adding the
5922 SCOPE_STMT.
5923 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
5924 * parse.y (function_body): Go back to using compstmt.
5925 * decl.c (pushdecl): Skip another level to get to the parms level.
5926
5927 * call.c (build_new_method_call): Use is_dummy_object to determine
5928 whether or not to evaluate the object parameter to a static member
5929 function.
5930
5931 2002-12-14 Jason Merrill <jason@redhat.com>
5932
5933 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
5934 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
5935 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
5936 don't bother with an AGGR_INIT_EXPR.
5937 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
5938 just generate a new decl normally. Take return slot parm.
5939 * cp-tree.h: Adjust prototype.
5940
5941 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5942
5943 PR C++/8031
5944 * cvt.c (convert_to_pointer_force): Don't try comparing against
5945 erronous type.
5946
5947 2002-12-13 Geoffrey Keating <geoffk@apple.com>
5948
5949 * cp-tree.h: Have the multiple-include guards around
5950 the entire file.
5951
5952 2002-12-10 David Edelsohn <edelsohn@gnu.org>
5953
5954 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
5955 for SPEW_DEBUG.
5956 (snarf_method): Same.
5957 (snarf_defarg): Same.
5958
5959 2002-12-10 Mark Mitchell <mark@codesourcery.com>
5960
5961 PR c++/8372
5962 * pt.c (tsubst_copy): Handle destructor names more correctly.
5963
5964 2002-12-10 Matt Austern <austern@apple.com>
5965
5966 * cp-tree.h: get rid of needs_virtual_reinit bit.
5967
5968 2002-12-09 Mark Mitchell <mark@codesourcery.com>
5969
5970 * NEWS: Document removal of in-class initialization extension for
5971 static data members of non-arithmetic, non-enumeration type.
5972 * decl.c (check_static_variable_definition): Do not allow that
5973 extension.
5974 * decl2.c (grokfield): Do not call digest_init when processing
5975 templates.
5976
5977 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5978
5979 * error.c (dump_expr): Fix format specifier warning.
5980
5981 2002-12-04 Geoffrey Keating <geoffk@apple.com>
5982
5983 * class.c (finish_struct_1): Correct comment.
5984 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
5985
5986 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5987
5988 PR C++/8799
5989 * error.c (dump_expr): Don't ever try to dump a non-existent
5990 expression.
5991
5992 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
5993
5994 Implement covariant returns.
5995 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
5996 (struct lang_decl_flags): Add this_thunk_p flag.
5997 Rename vcall_offset to virtual_offset.
5998 (struct lang_decl): Rename delta to fixed_offset.
5999 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6000 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6001 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6002 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6003 (make_thunk): Add this_adjusting arg.
6004 (finish_thunk): Declare.
6005 (mangle_thunk): Add this_adjusting arg.
6006 * class.c (get_vcall_index): Use base function for lookup.
6007 (update_vtable_entry_for_fn): Generate covariant thunk.
6008 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6009 (build_vtbl_initializer): Use base function for lookup.
6010 Finish covariant thunk here. Adjust thunk generation.
6011 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6012 Adjust thunk dumping.
6013 * mangle.c (mangle_call_offset): New function.
6014 (mangle_thunk): Adjust for covariant thunks.
6015 * method.c (make_thunk): Adjust. Do not set name here.
6016 (finish_thunk): New function. Set name here.
6017 (use_thunk): Generate covariant thunks too.
6018 (thunk_adjust): New function.
6019 * search.c (covariant_return_p): Remove. Fold into ...
6020 (check_final_overrider): ... here. Simplify.
6021 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6022
6023 2002-12-03 Jason Merrill <jason@redhat.com>
6024
6025 PR c++/8674
6026 * call.c (build_over_call): Check specifically for TARGET_EXPR
6027 when eliding.
6028
6029 PR c++/8461, c++/8625
6030 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6031 (cp_convert_parm_for_inlining): Remove.
6032 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6033 Remove.
6034 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6035 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6036
6037 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6038 an ambiguous conversion.
6039
6040 2002-12-03 Mark Mitchell <mark@codesourcery.com>
6041
6042 PR c++/8688
6043 * decl.c (reshape_init): Handle erroneous initializers.
6044
6045 2002-12-02 Mark Mitchell <mark@codesourcery.com>
6046
6047 PR c++/8720
6048 * spew.c (remove_last_token): Make sure that last_chunk is set
6049 correctly.
6050
6051 PR c++/8615
6052 * error.c (dump_expr): Handle character constants with
6053 TREE_OVERFLOW set.
6054
6055 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6056
6057 DR 180
6058 * decl.c (grokdeclarator): Require class-key for all friend class.
6059 Output the correct type and context in the error message.
6060
6061 2002-12-01 Mark Mitchell <mark@codesourcery.com>
6062
6063 PR c++/5919
6064 * pt.c (unify): Use variably_modified_type_p to test validity of
6065 template argument types.
6066
6067 PR c++/8727
6068 * cp-tree.h (lang_type_class): Add typeinfo_var.
6069 (CLASSTYPE_TYPEINFO_VAR): New macro.
6070 * rtti.c (get_tinfo_decl): Use it.
6071
6072 PR c++/8663
6073 * init.c (expand_member_init): Always get the main variant of a
6074 base class.
6075
6076 2002-12-01 Mark Mitchell <mark@codesourcery.com>
6077
6078 PR c++/8332
6079 PR c++/8493
6080 * decl.c (cxx_init_decl_processing): Use size_type_node, not
6081 c_size_type_node.
6082 * decl2.c (coerce_new_type): Likewise.
6083 * except.c (do_allocate_exception): Likewise.
6084
6085 2002-11-30 Zack Weinberg <zack@codesourcery.com>
6086
6087 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
6088 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
6089 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
6090 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6091 typeck2.c: Include coretypes.h and tm.h.
6092 * Make-lang.in: Update dependencies.
6093
6094 2002-11-30 Mark Mitchell <mark@codesourcery.com>
6095
6096 PR c++/8227
6097 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
6098 (check_initializer): Validate the type of the initialized
6099 variable, even if the initializer is absent.
6100 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
6101
6102 PR c++/8214
6103 * typeck.c (convert_for_assignment): Do not use
6104 decl_constant_value on the operand.
6105
6106 PR c++/8511
6107 * pt.c (instantiate_decl): Handle template friends defined outside
6108 of the class correctly.
6109
6110 2002-11-29 Joe Buck <jbuck@synopsys.com>
6111
6112 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
6113 anonymous structs.
6114
6115 2002-11-29 Mark Mitchell <mark@codesourcery.com>
6116
6117 * class.c (walk_subobject_offsets): Recur on binfos as well as on
6118 types.
6119 (layout_nonempty_base_or_field): Pass it a binfo when processing a
6120 base class.
6121 (layout_empty_base): Likewise.
6122 (build_base_field): Likewise.
6123
6124 2002-11-27 Mark Mitchell <mark@codesourcery.com>
6125
6126 * class.c (build_base_field): Make sure we get the canonical base
6127 when descending through primary bases.
6128
6129 2002-11-26 Geoffrey Keating <geoffk@apple.com>
6130
6131 * decl.c (check_initializer): Don't error on initialisation of
6132 a scalar with a brace-enclosed expression.
6133
6134 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
6135
6136 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
6137 (template_parms_equal): Remove prototype.
6138 * typeck.c (buuld_indirect_ref): Reformat.
6139
6140 2002-11-25 Jason Merrill <jason@redhat.com>
6141
6142 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6143 and a DO_STMT.
6144
6145 2002-11-25 Mark Mitchell <mark@codesourcery.com>
6146
6147 * tree.c (cp_build_qualified_type_real): Correct handling of
6148 array types.
6149 * class.c (walk_subobject_offsets): Fix thinko.
6150 (build_base_field): Record offsets of empty bases in primary
6151 virtual bases.
6152 (layout_class_type): Record offsets of empty bases in fields.
6153
6154 * search.c (is_subobject_of_p_1): Fix thinko.
6155 (lookup_field_queue_p): Likewise.
6156
6157 2002-11-24 Mark Mitchell <mark@codesourcery.com>
6158
6159 * class.c (layout_class_type): Reuse tail padding when laying out
6160 virtual bases.
6161
6162 2002-11-22 Mark Mitchell <mark@codesourcery.com>
6163
6164 * rtti.c (qualifier_flags): Fix thinko.
6165
6166 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
6167
6168 Remove traditional C constructs 1/n.
6169 * cp-tree.h (init_method, set_mangled_name_for_decl,
6170 build_opfncall, hack_identifier, make_thunk, use_thunk,
6171 synthesize_method, implicitly_declare_fn,
6172 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6173 maybe_clone_body): Remove use of PARAMS.
6174
6175 * method.c (do_build_assign_ref, do_build_copy_constructor,
6176 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6177 Likewise.
6178 (synthesize_method): Use 'bool' type and constants instead of
6179 'int'.
6180 (locate_copy): Likewise.
6181 (implicitly_declare_fn): Likewise.
6182
6183 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6184 Remove old-style declaration.
6185 (maybe_clone_body): Use 'bool' type and constants.
6186
6187 2002-11-21 Glen Nakamura <glen@imodulo.com>
6188
6189 PR c++/8342
6190 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6191 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6192 of the branches of a COND_EXPR.
6193
6194 2002-11-19 Mark Mitchell <mark@codesourcery.com>
6195
6196 * pt.c (for_each_template_parm): Free allocated memory.
6197 * search.c (is_subobject_of_p_1): New function.
6198 (is_subobject_of_p): Avoid walking virtual bases multiple times.
6199
6200 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
6201
6202 * g++spec.c (lang_specific_spec_functions): New.
6203
6204 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
6205
6206 * ChangeLog: Follow spelling conventions.
6207 * class.c: Likewise.
6208 * decl2.c: Likewise.
6209
6210 2002-11-14 Zack Weinberg <zack@codesourcery.com>
6211
6212 * search.c (dfs_push_decls): Do not try to reorder elements
6213 3..n of method_vec if method_vec has only two elements.
6214 Reverse order of two tests to avoid accessing unallocated
6215 memory.
6216
6217 2002-11-14 Mark Mitchell <mark@codesourcery.com>
6218
6219 * class.c (dfs_find_final_overrider): Adjust so that the most
6220 derived object is a binfo, rather than a class type.
6221 (find_final_overrider): Likewise.
6222 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6223 (add_vcall_offset): Likewise.
6224
6225 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6226
6227 PR c++/8389
6228 * pt.c (instantiate_template): Push class scope for member
6229 functions.
6230 (get_mostly_instantiated_function_type): Likewise. Don't call
6231 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
6232 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6233 * mangle.c (write_encoding, write_unqualified_name): Adjust.
6234
6235 2002-11-07 Mark Mitchell <mark@codesourcery.com>
6236
6237 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6238 vcall offfsets. Split out ...
6239 (add_vcall_offset): ... new function.
6240
6241 PR c++/8338
6242 * pt.c (for_each_template_parm): Add htab parameter.
6243 (process_partial_specialization): Adjust call.
6244 (push_template_decl_real): Likewise.
6245 (pair_fn_data): Add visited.
6246 (for_each_template_parm_r): Avoid walking duplicates more than
6247 once.
6248 (uses_template_parms): Adjust call to for_each_template_parm.
6249
6250 2002-11-07 Mark Mitchell <mark@codesourcery.com>
6251
6252 * class.c (add_implicitly_declared_members): Put implicitly
6253 declared functions at the end of TYPE_METHODs when -fabi-version
6254 is at least 2.
6255
6256 2002-11-05 Geoffrey Keating <geoffk@apple.com>
6257
6258 * decl2.c (finish_file): Correct spelling.
6259
6260 2002-11-03 Mark Mitchell <mark@codesourcery.com>
6261
6262 * call.c (build_special_member_call): Do not try to lookup VTTs by
6263 name.
6264 * class.c (vtbl_init_data): Add generate_vcall_entries.
6265 (get_vtable_decl): Do not look up virtual tables by name.
6266 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6267 (set_primary_base): Do not set CLASSTYPE_RTTI.
6268 (determine_primary_base): Likewise.
6269 (get_matching_virtual): Remove.
6270 (get_vcall_index): New function.
6271 (update_vtable_entry_for_fn): Do not try to use virtual thunks
6272 when they are not required. Assign vcall indices at this point.
6273 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6274 Do update dynamic_classes.
6275 (build_vtt): Do not add VTTs to the symbol table.
6276 (build_ctor_vtbl_group): Likewise.
6277 (build_vtbl_initializer): Simplify handling of vcall indices.
6278 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6279 for the most derived class.
6280 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6281 the vtable.
6282 * cp-tree.h (dynamic_classes): New macro.
6283 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
6284 (CLASSTYPE_RTTI): Remove.
6285 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6286 (CLASSTYPE_VCALL_INDICES): New macro.
6287 (CLASSTYPE_VTABLES): Likewise.
6288 (BV_USE_VCALL_INDEX_P): Remove.
6289 (build_vtable_path): Remove.
6290 * decl2.c (finish_vtable_vardecl): Remove.
6291 (key_method): Remove #if 0'd code.
6292 (finish_vtable_vardecl): Rename to ...
6293 (maybe_emit_vtables): ... this.
6294 (finish_file): Use it.
6295 * search.c (look_for_overrides_here): Update comment.
6296
6297 2002-11-01 Zack Weinberg <zack@codesourcery.com>
6298
6299 PR c/7353 redux
6300 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6301
6302 2002-10-30 Jason Merrill <jason@redhat.com>
6303
6304 PR c++/8186
6305 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6306 * call.c (convert_for_arg_passing): Set it.
6307 * except.c (stabilize_throw_expr): Recurse for such an arg.
6308
6309 2002-10-31 Mark Mitchell <mark@codesourcery.com>
6310
6311 * cp-tree.h (lang_decl_flags): Remove init_priority.
6312 (lang_decl): Add delta.
6313 (GLOBAL_INIT_PRIORITY): Remove.
6314 (THUNK_DELTA): Revise definition.
6315 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6316 * dump.c (cp_dump_tree): Don't dump it.
6317
6318 2002-10-30 Mark Mitchell <mark@codesourcery.com>
6319
6320 PR c++/8160
6321 * typeck2.c (process_init_constructor): Call complete_array_type.
6322
6323 PR c++/8149
6324 * decl.c (make_typename_type): Issue errors about invalid results.
6325
6326 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6327
6328 Core issue 287, PR c++/7639
6329 * cp-tree.h (lang_type_class): Add decl_list field.
6330 (CLASSTYPE_DECL_LIST): New macro.
6331 (maybe_add_class_template_decl_list): Add declaration.
6332 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6333 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6334 (maybe_add_class_template_decl_list): New function.
6335 (add_implicitly_declared_members): Use it.
6336 * decl.c (maybe_process_template_type_declaration): Likewise.
6337 (pushtag): Likewise.
6338 * friend.c (add_friend): Likewise.
6339 (make_friend_class): Likewise.
6340 * semantics.c (finish_member_declaration): Likewise.
6341 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6342 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6343 to process members and friends in the order of declaration.
6344
6345 2002-10-29 Mark Mitchell <mark@codesourcery.com>
6346
6347 PR c++/8287
6348 * decl.c (finish_destructor_body): Create the label to jump to
6349 when returning from a destructor here.
6350 (finish_function_body): Rather than here.
6351
6352 2002-10-25 Zack Weinberg <zack@codesourcery.com>
6353
6354 PR c++/7266
6355 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6356 SCOPE_REF is not null before dereferencing it.
6357
6358 2002-10-25 Mark Mitchell <mark@codesourcery.com>
6359
6360 * call.c (build_over_call): Use DECL_CONTEXT, not
6361 DECL_VIRTUAL_CONTEXT.
6362 * class.c (modify_vtable_entry): Don't mess with
6363 DECL_VIRTUAL_CONTEXT.
6364 (set_vindex): Remove.
6365 (set_primary_base): Remove vfuns_p parameter.
6366 (determine_primary_base): Likewise.
6367 (modify_all_vtables): Likewise.
6368 (layout_class_type): Likewise. Adjust calls to other functions
6369 accordingly.
6370 (finish_struct_1): Adjust calls to modified functions. Set
6371 DECL_VINDEX here.
6372 * cp-tree.h (lang_type_class): Remove vsize.
6373 (CLASSTYPE_VSIZE): Remove.
6374 (lang_decl): Remove thunks.
6375 (DECL_THUNKS): Adjust.
6376 (DECL_VIRTUAL_CONTEXT): Remove.
6377 (duplicate_decls): Don't copy it.
6378 * pt.c (build_template_decl): Don't set it.
6379 (tsubst_decl): Likewise.
6380 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
6381
6382 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
6383 (build_vtable_entry): Remove.
6384 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
6385 (lang_decl): Add thunks.
6386 (DECL_THUNKS): New macro.
6387 * decl.c (duplicate_decls): Copy it.
6388 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
6389 * semantics.c (emit_associated_thunks): Simplify.
6390
6391 2002-10-24 David Edelsohn <edelsohn@gnu.org>
6392
6393 PR c++/7228
6394 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
6395 lang_type structure exists before accessing field.
6396 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
6397 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
6398 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
6399 * class.c (check_field_decls): Use new macros.
6400 * typeck2.c (process_init_constructor): Remove redundant check for
6401 existence of lang_type structure.
6402
6403 2002-10-24 Mark Mitchell <mark@codesourcery.com>
6404
6405 * class.c (end_of_base): New method.
6406 (end_of_class): Use it. Check indirect virtual bases.
6407
6408 * class.c (check_field_decls): Fix typo.
6409
6410 2002-10-23 Mark Mitchell <mark@codesourcery.com>
6411
6412 PR c++/8067
6413 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
6414 related variables.
6415
6416 PR c++/7679
6417 * spew.c (next_token): Do not return an endless stream of
6418 END_OF_SAVED_INPUT tokens.
6419 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
6420 the cached token stream.
6421 (snarf_defarg): Likewise.
6422
6423 2002-10-23 Zack Weinberg <zack@codesourcery.com>
6424
6425 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
6426 variably_modified_type_p.
6427 * cp-tree.h: Remove prototype of variably_modified_type_p.
6428 * tree.c (variably_modified_type_p): Remove; now implemented
6429 in language-independent code.
6430
6431 2002-10-22 Mark Mitchell <mark@codesourcery.com>
6432
6433 PR c++/6579
6434 * spew.c (snarf_parenthesized_expression): New function.
6435 (snarf_block): Use it.
6436
6437 2002-10-22 Richard Henderson <rth@redhat.com>
6438
6439 * method.c (use_thunk): Always compute vcall_value; assert that
6440 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
6441 for vcall thunks as well.
6442
6443 2002-10-21 Mark Mitchell <mark@codesourcery.com>
6444
6445 * class.c (empty_base_at_nonzero_offset_p): New function.
6446 (layout_nonempty_base_or_field): Do not check for conflicts when
6447 laying out a virtual base using the GCC 3.2 ABI.
6448 (build_base_field): Correct checking for presence of empty classes
6449 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
6450
6451 * class.c (include_empty_classes): Use normalize_rli.
6452 (layout_class_type): Likewise.
6453
6454 * decl.c (reshape_init): Tweak handling of character arrays.
6455
6456 PR c++/8218
6457 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
6458 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
6459 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
6460 (check_field_decls): Likewise.
6461 (layout_class_type): Likewise.
6462 (finish_struct_1): Initialize it.
6463 (walk_subobject_offsets): Use it to prune searches.
6464
6465 2002-10-20 Mark Mitchell <mark@codesourcery.com>
6466
6467 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
6468 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
6469 TARGET_ASM_OUTPUT_MI_THUNK in comments.
6470
6471 2002-10-18 Zack Weinberg <zack@codesourcery.com>
6472
6473 * decl.c (start_decl): Point users of the old initialized-
6474 typedef extension at __typeof__.
6475
6476 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6477
6478 * Make-lang.in (method.o): Depend on TARGET_H.
6479 * method.c (target.h): Include it.
6480 (use_thunk): Use target hooks. Use vcall thunks, if available.
6481
6482 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6483
6484 * class.c (base_derived_from): Make sure return value is a bool.
6485
6486 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6487
6488 * class.c (find_final_overrider_data_s): Remove overriding_fn and
6489 overriding_base.
6490 (dfs_base_derived_from): New function.
6491 (base_derived_from): Likewise.
6492 (dfs_find_final_overrider): Use base_derived_from.
6493 (find_final_overrider): Adjust.
6494
6495 2002-10-18 Jason Merrill <jason@redhat.com>
6496
6497 PR c++/8080
6498 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
6499 with condition decls in a template.
6500
6501 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
6502
6503 * class.c (add_method): Compare template parms too.
6504
6505 2002-10-17 Mark Mitchell <mark@codesourcery.com>
6506
6507 PR c++/7584
6508 * class.c (handle_using_decl): Allow the declaration used to be
6509 from an ambiguous base.
6510
6511 * pt.c (convert_template_argument): Revert this change:
6512 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6513 * pt.c (convert_template_argument): Do not fold non-type
6514 template rguments when inside a template.
6515
6516 * init.c (expand_default_init): Handle brace-enclosed initializers
6517 correctly.
6518
6519 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6520
6521 * mangle.c (write_expression): Correct handling of enumeration
6522 constants.
6523 (write_template_arg): Likewise.
6524 * pt.c (convert_template_argument): Do not fold non-type template
6525 arguments when inside a template.
6526
6527 PR c++/7478
6528 * cvt.c (convert_to_reference): Allow references as the incoming
6529 type.
6530
6531 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6532
6533 PR c++/7524
6534 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
6535 build_qualified_type.
6536
6537 2002-10-15 Richard Henderson <rth@redhat.com>
6538
6539 * error.c (dump_expr): Use real_to_decimal directly, and with
6540 the new arguments.
6541
6542 2002-10-15 Mark Mitchell <mark@codesourcery.com>
6543
6544 * decl.c (reshape_init): Fix typo.
6545
6546 * cp-tree.h (operator_name_info_t): Add arity.
6547 * lex.c (init_operators): Initialize it.
6548 * mangle.c (write_conversion_operator_name): New function.
6549 (write_unqualified_name): Use it.
6550 (write_template_args): Accept template arguments as a TREE_LIST.
6551 (write_expression): Adjust handling of qualified names to match
6552 specification.
6553
6554 2002-10-15 Jason Merrill <jason@redhat.com>
6555
6556 * call.c (call_builtin_trap): New fn.
6557 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
6558 (build_call): Don't set current_function_returns_abnormally outside
6559 a function.
6560
6561 2002-10-14 Mark Mitchell <mark@codesourcery.com>
6562
6563 * class.c (check_field_decls): Remove empty_p parameter. Instead,
6564 clear CLASSTYPE_EMPTY_P.
6565 (build_base_field): Likewise.
6566 (build_base_fields): Likewise.
6567 (check_bases_and_members): Likewise.
6568 (create_vtbl_ptr): Likewise.
6569 (layout_class_type): Likewise. Ensure that empty classes have
6570 size zero when used as base classes in the 3.2 ABI.
6571 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
6572 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
6573 parameter.
6574 (is_empty_class): Correct definition when using post-3.2 ABI.
6575 * cp-tree.h (lang_type_class): Add empty_p.
6576 (CLASSTYPE_EMPTY_P): New macro.
6577
6578 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
6579
6580 * init.c (build_delete): Do not apply save_expr for arrays.
6581 (build_vec_delete): Likewise.
6582
6583 2002-10-14 Mark Mitchell <mark@codesourcery.com>
6584
6585 * decl.c (layout_var_decl): Call layout_decl even for variables
6586 whose type is an array with unspecified bounds.
6587
6588 PR c++/7176
6589 * lex.c (do_identifier): Add another option for the parsing
6590 parameter.
6591 * parse.y (do_id): Use it.
6592
6593 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
6594
6595 PRs C++/6803, C++/7721 and C++/7803
6596 * decl.c (grokdeclarator): Gracefully handle template-name as
6597 decl-specifier.
6598
6599 2002-10-11 Jason Molenda <jmolenda@apple.com>
6600
6601 * init.c (build_field_list): Provide uses_unions_p with a default
6602 value.
6603
6604 2002-10-11 Mark Mitchell <mark@codesourcery.com>
6605
6606 PR c++/5661
6607 * cp-tree.h (variably_modified_type_p): New function.
6608 (grokdeclarator) Tighten check for variably modified types as
6609 fields.
6610 * pt.c (convert_template_argument): Do not allow variably modified
6611 types as template arguments.
6612 * tree.c (variably_modified_type_p): New function.
6613
6614 * NEWS: Document removal of "new X = ..." extension.
6615 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
6616 brace-enclosed initializers.
6617 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
6618 (initialize_local_var): Remove declaration.
6619 (expand_static_init): Likewise.
6620 * decl.c (next_initializable_field): New function.
6621 (reshape_init): Likewise.
6622 (check_initializer): Use them. Build dynamic initializer for
6623 aggregates here too.
6624 (initialize_local_var): Simplify, and incorporate cleanup
6625 insertion code as well.
6626 (destroy_local_var): Remove.
6627 (cp_finish_decl): Tidy.
6628 (expand_static_init): Fold checks for whether or not a variable
6629 needs initialization into this function. Simplify.
6630 * decl2.c (do_static_initialization): Simplify.
6631 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
6632 be done for us automatically.
6633 (expand_default_init): Handle brace-enclosed initializers
6634 correctly.
6635 (expand_aggr_init_1): Remove RTL-generation code.
6636 (build_vec_init): Remove "new X = ..." support.
6637 * parse.y (new_initializer): Likewise.
6638 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
6639 brace-enclosed initializer.
6640 (create_pseudo_type_info): Likewise.
6641 * typeck2.c (store_init_value): Don't try to handle digest_init
6642 being called more than once.
6643 (digest_init): Tidy handling of brace-enclosed initializers.
6644
6645 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6646
6647 * decl.c (typename_hash): Use htab_hash_pointer.
6648
6649 2002-10-10 Jim Wilson <wilson@redhat.com>
6650
6651 * decl.c (duplicate_decls): Don't call decl_attributes.
6652
6653 2002-10-09 Zack Weinberg <zack@codesourcery.com>
6654
6655 PR c/7353
6656 * decl.c (start_decl): Unconditionally issue error for
6657 'typedef foo = bar'.
6658 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
6659 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
6660
6661 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6662
6663 * decl2.c (prune_vtable_vardecl): Delete unused function.
6664
6665 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6666
6667 PR c++/7754
6668 * decl2.c (finish_anon_union): Do not expand anonymous unions when
6669 procesing template functions.
6670 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6671 type. Call layout_decl.
6672 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6673
6674 2002-10-07 Richard Henderson <rth@redhat.com>
6675
6676 * decl2.c, pt.c: Revert c++/7754 fix.
6677
6678 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6679
6680 PR c++/7804
6681 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
6682
6683 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6684
6685 PR c++/7931
6686 * pt.c (for_each_template_parm_r): Handle BASELINKs.
6687
6688 PR c++/7754
6689 * decl2.c (finish_anon_union): Do not expand anonymous unions when
6690 procesing template functions.
6691 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6692 type. Call layout_decl.
6693 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6694
6695 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6696
6697 PR c++/8006
6698 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
6699 template parameters.
6700 (globals): Add entity and need_abi_warning.
6701 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
6702 CLASSTYPE_TEMPLATE_INFO.
6703 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
6704 TYPE_TI_TEMPLATE.
6705 (write_prefix): Handle typename types correctly.
6706 (write_template_prefix): Handle template template parameters
6707 correctly.
6708 (start_mangling): Add entity parameter.
6709 (finish_mangling): Warn about names whose mangling will change.
6710 (mangle_decl_string): Adjust.
6711 (mangle_type_string): Likewise.
6712 (mangle_special_for_type): Likewise.
6713 (mangle_ctor_vtbl_for_type): Likewise.
6714 (mangle_thunk): Likewise.
6715 (mangle_guard_variable): Likewise.
6716 (mangle_ref_init_variable): Likewise.
6717
6718 2002-10-02 Mark Mitchell <mark@codesourcery.com>
6719
6720 PR c++/7188.
6721 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
6722 * cp-tree.h (emit_base_init): Rename to ....
6723 (emit_mem_initializers): ... this.
6724 (expand_member_init): Change prototype.
6725 * init.c (perform_member_init): Compute explicit, rather than
6726 requiring it as a parameter.
6727 (sort_member_init): Rename to ...
6728 (sort_mem_initializers): ... this. Process bases and data members
6729 together.
6730 (sort_base_init): Remove.
6731 (emit_base_init): Rename to ...
6732 (emit_mem_initializers): ... this.
6733 (expand_aggr_vbase_init_1): Remove.
6734 (construct_virtual_bases): Rename to ...
6735 (construct_virtual_base): ... this.
6736 (expand_member_init): Rework handling of base initializers.
6737 * method.c (do_build_copy_constructor): Use
6738 finish_mem_initializers.
6739 * parse.y (member_init): Adjust calls to expand_member_init.
6740 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
6741 (tsubst_initializer_list): Use expand_member_init.
6742 * semantics.c (finish_mem_intiailizers): Simplify.
6743
6744 2002-10-02 Matt Austern <austern@apple.com>
6745 * decl.c (walk_vtables_r): Fixed typo that caused result to
6746 never get a nonzero value.
6747
6748 2002-10-02 Roger Sayle <roger@eyesopen.com>
6749
6750 PR optimization/6627
6751 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
6752 from here, and move it to tree.h.
6753 * decl.c (cxx_init_decl_processing): If storing the vbit
6754 in function pointers, ensure that force_align_functions_log
6755 is atleast one.
6756
6757 2002-10-02 Matt Austern <austern@apple.com>
6758
6759 * class.c (check_field_decls): Changed warning about const member
6760 variables so that it doesn't get issued for a class aggregate.
6761
6762 2002-10-01 Mark Mitchell <mark@codesourcery.com>
6763
6764 * decl.c (cp_finish_decl): Make sure array types are laid out,
6765 even if the array bounds are unknown.
6766
6767 2002-10-01 Steve Ellcey <sje@cup.hp.com>
6768
6769 * class.c (build_vtbl_initializer): Change build_c_cast
6770 to build1.
6771
6772 2002-10-01 Mark Mitchell <mark@codesourcery.com>
6773
6774 * decl.c (cp_finish_decl): Make sure array types are laid out,
6775 even if the array bounds are unknown.
6776
6777 * decl.c (cp_finish_decl): Correct check for dynamic
6778 initialization of thread-local storage.
6779
6780 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
6781
6782 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
6783 overloaded.
6784
6785 2002-09-30 Steve Ellcey <sje@cup.hp.com>
6786
6787 * class.c (build_vtbl_initializer): Add cast.
6788 (add_vcall_offset_vtbl_entries_1):
6789 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
6790
6791 2002-09-30 Mark Mitchell <mark@codesourcery.com>
6792
6793 * class.c (walk_subobject_offsets): Correct the calculation of
6794 offsets for virtual bases. Correct the counting of array
6795 elements.
6796 (layout_nonempty_base_or_field): Simplify. Correct the
6797 calculation of offsets to be propagated through the binfo
6798 hierarchy.
6799 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
6800 Add the FIELD_DECL to TYPE_FIELDS.
6801 (build_base_fields): Adjust accordingly.
6802 (layout_virtual_bases): Use build_base_field.
6803 (end_of_class): Return a tree, not an integer.
6804 (warn_about_ambiguous_direct_bases): Rename to ...
6805 (warn_about_ambiguous_bases): ... this.
6806 (include_empty_classes): New function.
6807 (layout_class_type): Create an alternative version of the type to
6808 be used when as a base class type. Do not call
6809 finish_record_layout until we are done laying out the class.
6810 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
6811 as_base.
6812 (CLASSTYPE_SIZE): Reimplement.
6813 (CLASSTYPE_SIZE_UNIT): Likewise.
6814 (CLASSTYPE_ALIGN): Likweise.
6815 (CLASSTYPE_USER_ALIGN): Likewise.
6816 (CLASSTYPE_AS_BASE): New macro.
6817 (DECL_INITIALIZED_P): Likewise.
6818 (extract_init): Remove prototype.
6819 (build_forced_zero_init): Rename to ...
6820 (build_zero_init): ... this.
6821 (force_store_init_value): Remove.
6822 * decl.c (obscure_complex_init): Remove.
6823 (duplicate_decls): Copy DECL_INITIALIZED_P.
6824 (check_initializer): Do not leave junk in DECL_INITIAL.
6825 (cp_finish_decl): Handle zero-initialization of entities with
6826 static storage duration.
6827 * expr.c (extract_init): Remove.
6828 * init.c (build_forced_zero_init): Remove.
6829 (build_zero_init): New function.
6830 (build_default_init): Use it.
6831 (build_field_list): Skip FIELD_DECLs for base subobjects.
6832 (push_base_cleanups): Likewise.
6833 * method.c (do_build_assign_ref): Likewise.
6834 (synthesize_exception_spec): Likewise.
6835 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
6836 (regenerate_decl_from_template): To not set DECL_INITIAL for a
6837 static data member whose initialization took place in its class.
6838 (instantiate_decl): Do not pass an initializer to cp_finish_decl
6839 in that situation.
6840 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
6841 (dfs_unuse_fields): Likewise.
6842 * tree.c (pod_type_p): Handle error_mark_node.
6843 (zero_init_p): Likewise.
6844 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
6845 subobjects.
6846 * typeck2.c (store_init_value): Remove #if 0'd code.
6847 (force_store_init_value): Remove.
6848 (process_init_constructor): Use build_zero_init.
6849
6850 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
6851
6852 PR c++/7788
6853 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
6854
6855 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
6856
6857 * cp-tree.h: Fix comment typos.
6858 * decl.c: Likewise.
6859 * pt.c: Likewise.
6860
6861 2002-09-25 Mark Mitchell <mark@codesourcery.com>
6862
6863 * cp/class.c (contains_empty_class_p): New method.
6864 (walk_subobject_offsets): Correct computation of field offset.
6865 (layout_empty_base): Correct placement of emtpy base classes.
6866 (layout_class_type): Warn about ABI changes.
6867
6868 2002-09-23 Mark Mitchell <mark@codesourcery.com>
6869
6870 * cp/class.c (layout_virtual_bases): Do not round the size of the
6871 type to a multiple of the alignment before laying out virtual bases.
6872 (layout_class_type): Correct handling of bit-fields that are wider
6873 than their type inside unions. Round the size of the type to a
6874 even number of bytes when computing the size without virtual
6875 bases.
6876 * cp/cp-tree.h (abi_version_at_least): New macro.
6877
6878 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
6879
6880 * ChangeLog: Follow spelling conventions.
6881 * ChangeLog.2: Likewise.
6882 * call.c: Likewise.
6883 * class.c: Likewise.
6884 * cp-tree.h: Likewise.
6885 * cvt.c: Likewise.
6886 * decl.c: Likewise.
6887 * decl2.c: Likewise.
6888 * except.c: Likewise.
6889 * friend.c: Likewise.
6890 * g++spec.c: Likewise.
6891 * init.c: Likewise.
6892 * lex.c: Likewise.
6893 * mangle.c: Likewise.
6894 * method.c: Likewise.
6895 * operators.def: Likewise.
6896 * optimize.c: Likewise.
6897 * pt.c: Likewise.
6898 * rtti.c: Likewise.
6899 * search.c: Likewise.
6900 * semantics.c: Likewise.
6901 * spew.c: Likewise.
6902 * tree.c: Likewise.
6903 * typeck.c: Likewise.
6904
6905 2002-09-18 Devang Patel <dpatel@apple.com>
6906
6907 * cp/cp-tree.h: New prototype for walk_vtabls().
6908 * cp/decl.c (walk_vtables_r): New function.
6909 (struct cp_binding_level): Add new members, namespaces,
6910 names_size and vtables.
6911 (add_decl_to_level): Add decl in namespaces or vtables
6912 chain, if conditions match.
6913 (walk_vtables): New function.
6914 (walk_namespaces_r): Travers separate namespace chain
6915 for namespace decls.
6916 (wrapup_globals_for_namespace): Use names_size instead
6917 of list_length().
6918 * cp/decl2.c (finish_file): Use walk_vtables() instead of
6919 walk_globals() to walk vtable decls.
6920
6921 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
6922
6923 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
6924 ICE with invalid pointers & references.
6925
6926 2002-09-17 Zack Weinberg <zack@codesourcery.com>
6927
6928 * Make-lang.in: Remove all references to the demangler.
6929 * cxxfilt.c: Moved to binutils.
6930
6931 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
6932
6933 PR c++/7718
6934 * pt.c (tsubst_decl): Remove assert.
6935
6936 Remove DR 295 implementation.
6937 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
6938 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
6939 about ignoring volatile qualifiers.
6940
6941 * search.c (lookup_member): Correct documentation.
6942
6943 2002-09-16 Geoffrey Keating <geoffk@apple.com>
6944
6945 * cp-tree.h (union lang_tree_node): Add chain_next option.
6946
6947 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
6948
6949 * parse.y (parse_finish_call_expr): Check lookup_member result.
6950
6951 PR c++/7015
6952 * semantic.c (finish_asm_stmt): Fix operand/output_operands
6953 thinko.
6954 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
6955
6956 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
6957
6958 PR c++/7919
6959 * call.c (build_over_call): Convert this pointer for fns found by
6960 using decls.
6961
6962 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
6963
6964 * ChangeLog: Follow spelling conventions.
6965 * ChangeLog.1: Likewise.
6966
6967 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
6968
6969 PR c++/7768
6970 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
6971
6972 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
6973
6974 * error.c: Fix comment formatting.
6975 * except.c: Likewise.
6976 * expr.c: Likewise.
6977 * friend.c: Likewise.
6978 * g++spec.c: Likewise.
6979 * init.c: Likewise.
6980 * lex.c: Likewise.
6981 * mangle.c: Likewise.
6982 * method.c: Likewise.
6983 * optimize.c: Likewise.
6984 * pt.c: Likewise.
6985 * rtti.c: Likewise.
6986 * search.c: Likewise.
6987 * semantics.c: Likewise.
6988 * spew.c: Likewise.
6989 * tree.c: Likewise.
6990 * typeck.c: Likewise.
6991 * typeck2.c: Likewise.
6992
6993 2002-09-13 Matt Austern <austern@apple.com>
6994
6995 PR C++/7828
6996 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
6997 * cp/call.c: Change call-by-const-reference mechanism to use
6998 non_cast_lvalue_p when deciding whether the create a temporary.
6999 We need a temporary when passing, e.g. (long) x by const ref.
7000
7001 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
7002
7003 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7004
7005 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
7006
7007 * decl.c: Fix comment formatting.
7008 * decl2.c: Likewise.
7009
7010 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
7011
7012 * call.c: Fix comment formatting.
7013 * class.c: Likewise.
7014 * cp-lang.c: Likewise.
7015 * cp-tree.h: Likewise.
7016 * cvt.c: Likewise.
7017
7018 2002-09-11 Zack Weinberg <zack@codesourcery.com>
7019
7020 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7021 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7022 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7023 minor adjustments (use version_string, eliminate yet another
7024 duplicate of xmalloc)
7025
7026 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7027
7028 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7029
7030 2002-09-05 Jason Merrill <jason@redhat.com>
7031
7032 * typeck2.c (add_exception_specifier): Only pedwarn for an
7033 incomplete type.
7034 (require_complete_eh_spec_types): New fn.
7035 (cxx_incomplete_type_diagnostic): Also support pedwarning.
7036 * typeck.c (complete_type_or_diagnostic): Likewise.
7037 * call.c (build_call): Call require_complete_eh_spec_types.
7038 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7039 on an incomplete type.
7040
7041 2002-09-04 Jakub Jelinek <jakub@redhat.com>
7042
7043 * decl.c (start_cleanup_fn): Clear interface_only before
7044 start_function, restore it afterwards.
7045
7046 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
7047
7048 * cp-tree.h (finish_builtin_type): Remove.
7049 * decl2.c (finish_builtin_type): Move to common code.
7050 * decl.c (build_ptrmemfunc_type): Adjust.
7051 * rtti.c (create_pseudo_type_info): Adjust.
7052 (create_tinfo_types): Adjust.
7053
7054 2002-08-31 Jason Merrill <jason@redhat.com>
7055
7056 * cp-lang.c (cp_expr_size): Allow initialization from a
7057 CONSTRUCTOR.
7058
7059 2002-08-30 Richard Henderson <rth@redhat.com>
7060
7061 PR opt/7515
7062 * tree.c: Include target.h.
7063 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
7064 don't bind locally.
7065 * Makefile.in (tree.o): Update.
7066
7067 2002-08-27 Mark Mitchell <mark@codesourcery.com>
7068
7069 * class.c (layout_virtual_bases): Warn about bugs in G++ that
7070 result in incorrect object layouts.
7071 (layout_class_type): Likewise.
7072
7073 2002-08-24 Matt Austern <austern@apple.com>
7074
7075 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
7076 are allowable.
7077 (real_lvalue_p): Update caller.
7078 (lvalue_p): Ditto.
7079 (non_cast_lvalue_or_else): New.
7080 * tree.h: Declare it.
7081 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
7082
7083 2002-08-22 Mark Mitchell <mark@codesourcery.com>
7084
7085 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
7086 and COND_EXPR specially; fix error message output.
7087
7088 2002-08-22 Jason Merrill <jason@redhat.com>
7089
7090 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
7091 * semantics.c (nullify_returns_r): Likewise.
7092
7093 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
7094
7095 Fix PR/7621
7096 * typeck.c (finish_class_member_access_expr): Diagnose cases where
7097 name lookup finds nothing.
7098
7099 2002-08-15 Jason Merrill <jason@redhat.com>
7100
7101 * semantics.c (finish_then_clause): Remove redundant assignment.
7102 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
7103 extra binding level outside the if/switch statement.
7104 (finish_while_cond, finish_for_cond): Rewrite complex condition
7105 into the loop body.
7106
7107 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
7108
7109 * parse.y (sizeof, alignof, typeof): New non-terminals to
7110 increment skip_evaluation. Replace terminals with them and
7111 decrement skip_evaluation at the end of rules using them.
7112 * decl2.c (mark_used): Don't assemble_external if
7113 skipping evaluation.
7114
7115 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
7116
7117 Fix PR/7504
7118 * parse.y (parse_finish_call_expr): Handle incomplete
7119 type used to name a scope.
7120
7121 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
7122
7123 PR c++/7598
7124 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
7125 regression caused by my 2002-08-08 patch.
7126
7127 2002-08-13 Mark Mitchell <mark@codesourcery.com>
7128
7129 * decl.c (pushdecl_class_level): Honor requests to bind names to
7130 OVERLOADs.
7131
7132 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7133
7134 * decl2.c (build_call_from_tree): Fix uninitialized variable.
7135 * parse.y (parse_finish_call_expr): Likewise.
7136 * repo.c (old_args, old_dir, old_main): Const-ify.
7137
7138 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
7139
7140 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7141 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7142 * optimize.c (maybe_clone_body): Likewise.
7143 * pt.c (tsubst_enum): Likewise.
7144 (lookup_template_class): Likewise.
7145 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7146
7147 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
7148
7149 * lang-specs.h: Remove -ansi.
7150
7151 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
7152
7153 * tree.c (maybe_dummy_object): Replace // with /* */
7154
7155 2002-08-09 Mark Mitchell <mark@codesourcery.com>
7156
7157 * call.c (standard_conversion): Use build_ptrmem_type.
7158 * cp-tree.h (build_ptrmem_type): New function.
7159 (adjust_result_of_qualified_name_lookup): Likewise.
7160 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7161 static data members.
7162 (build_ptrmem_type): New function.
7163 (grokdeclarator): Do not use build_offset_type when encountering a
7164 qualified name.
7165 * parse.y (parse_finish_call_expr): Use
7166 adjust_result_of_qualified_name_lookup.
7167 * search.c (adjust_result_of_qualified_name_lookup): New function.
7168 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7169 accessing OFFSET_TYPEs directly.
7170
7171 2002-08-08 Mike Stump <mrs@apple.com>
7172
7173 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7174 (type_decays_to): Likewise.
7175 * class.c (find_final_overrider): Likewise.
7176 (maybe_note_name_used_in_class): Likewise.
7177 * decl.c (current_tmpl_spec_kind): Likewise.
7178 (add_binding): Likewise.
7179 (push_class_binding): Likewise.
7180 (duplicate_decls): Likewise.
7181 (layout_var_decl): Likewise.
7182 (grokfndecl): Likewise.
7183 (grokdeclarator): Likewise.
7184 (check_default_argument): Likewise.
7185 * decl2.c (handle_class_head): Likewise.
7186 * error.c (dump_template_decl): Likewise.
7187 * init.c (build_offset_ref): Likewise.
7188 * pt.c (check_specialization_scope): Likewise.
7189 (determine_specialization): Likewise.
7190 (check_explicit_specialization): Likewise.
7191 (maybe_check_template_type): Likewise.
7192 (process_partial_specialization): Likewise.
7193 (check_default_tmpl_args): Likewise.
7194 (push_template_decl_real): Likewise.
7195 (convert_template_argument): Likewise.
7196 (try_class_unification): Likewise.
7197 (get_bindings_real): Likewise.
7198 (do_decl_instantiation): Likewise.
7199 * semantics.c (begin_function_definition): Likewise.
7200 (finish_member_declaration): Likewise.
7201 (check_multiple_declarators): Likewise.
7202 * typeck.c (comp_array_types): Likewise.
7203 (comptypes): Likewise.
7204 (expr_sizeof): Likewise.
7205 (build_binary_op): Likewise.
7206 (dubious_conversion_warnings): Likewise.
7207 (check_return_expr): Likewise.
7208
7209 2002-08-08 Mark Mitchell <mark@codesourcery.com>
7210
7211 * typeck.c (build_class_member_access_expr): Do not return
7212 error_mark_node when no error has occurred.
7213
7214 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7215
7216 * typeck.c (build_component_addr): Remove.
7217 (build_unary_op): Just check it's not a bitfield, and then build
7218 an ADDR_EXPR.
7219
7220 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7221
7222 * class.c (convert_to_base): Correct check for error_mark_node.
7223 (create_vtable_ptr): Remove unused VFUNS_P parm.
7224
7225 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7226
7227 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7228
7229 2002-08-07 Mark Mitchell <mark@codesourcery.com>
7230
7231 Rework build_component_ref.
7232 * call.c (build_vfield_ref): Do not go through build_component_ref.
7233 (build_field_call): Use build_class_member_access_expr.
7234 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7235 (build_object_call): Likewise.
7236 * class.c (convert_to_base): New function.
7237 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7238 (instantiate_type): Handle BASELINKs.
7239 * cp-tree.def (BASELINK): New tree code.
7240 * cp-tree.h (BASELINK_P): Reimplement.
7241 (SET_BASELINK_P): Remove.
7242 (BASELINK_BINFO): Reimplement.
7243 (BASELINK_FUNCTIONS): Likewise.
7244 (BASELINK_ACCESS_BINFO): Likewise.
7245 (BASELINK_OPTYPE): Likewise.
7246 (convert_to_base): New function.
7247 (name_p): Likewise.
7248 (build_object_ref): Remove.
7249 (build_component_ref_1): Likewise.
7250 (build_component_ref): Likewise.
7251 (build_x_component_ref): Likewise.
7252 (build_class_member_access_expr): New function.
7253 (finish_class_member_access_expr): Likewise.
7254 (build_ptrmemfunc_access_expr): Likewise.
7255 * decl.c (grokdeclarator): Handle BASELINKs.
7256 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7257 finish_class_member_access_expr.
7258 (arg_assoc): Handle BASELINKs.
7259 (do_class_using_decl): Likewise.
7260 * error.c (dump_decl): Likewise.
7261 (dump_expr): Use build_ptrmemfunc_access_expr.
7262 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7263 destructors.
7264 (build_throw): Use BASELINK_FUNCTIONS.
7265 * init.c (perform_member_init): Use
7266 build_class_member_access_expr.
7267 (build_offset_ref): Handle BASELINKs. Use
7268 build_class_member_access_expr.
7269 * method.c (hack_identifier): Likewise.
7270 * parse.y (do_id): Use BASELINK, not TREE_LIST.
7271 (primary): Remove uses of build_object_ref.
7272 * pt.c (lookup_template_function): Handle BASELINKs.
7273 (resolve_overloaded_unification): Likewise.
7274 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7275 (lookup_field): Use BASELINK, not TREE_LIST.
7276 (lookup_fnfiels): Likewise.
7277 (setup_class_bindings): Likewise.
7278 * semantics.c (finish_object_call_expr): Do not use
7279 build_method_call when we already know what function is being
7280 called.
7281 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7282 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7283 TREE_CHAIN.
7284 (name_p): New function.
7285 * typeck.c (build_object_ref): Remove.
7286 (build_component_ref_1): Likewise.
7287 (build_x_component_ref): Likewise.
7288 (build_class_member_access_expr): New function.
7289 (finish_class_member_access_expr): Likewise.
7290 (build_ptrmemfunc_access_expr): Likewise.
7291 (get_member_function_from_ptrfunc): Use
7292 build_ptrmemfunc_access_expr.
7293 (build_binary_op): Likewise.
7294 (build_unary_op): Likewise.
7295 (build_ptrmemfunc): Likewise.
7296 (pfn_from_ptrmemfunc): Likewise.
7297 * typeck2.c (build_m_component_ref): Adjust comment.
7298
7299 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
7300
7301 * Make-lang.in (CXX_C_OBJS): Update.
7302 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7303 * cp-tree.h (cxx_decode_option): Remove.
7304 * decl2.c (compare_options, lang_f_options, unsupported_options,
7305 cxx_decode_option): Remove.
7306
7307 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
7308
7309 * typeck.c (build_x_unary_op): Handle pointer-to-member.
7310
7311 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
7312
7313 * class.c: Don't include obstack.h.
7314 (popclass):
7315 * decl2.c: Delete bogus comment.
7316 * error.c: Don't include obstack.h.
7317 * except.c: Likewise.
7318 (dump_type): Correct comment.
7319 * method.c: Don't include obstack.h.
7320 * tree.c: Likewise.
7321
7322 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
7323
7324 Fix PR/2213
7325 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7326 expressions to pointer-to-data-member of pointer-to-member-functions.
7327
7328 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
7329
7330 * cvt.c (ocp_convert): Delete obsolete code.
7331 * parse.y (permanent_obstack): Delete declaration.
7332 * pt.c (permanent_obstack): Delete declaration.
7333 * repo.c (permanent_obstack): Delete declaration.
7334 (open_repo_file): Use xmalloc instead of permanent_obstack.
7335 (init_repo): Use xstrdup instead of permanent_obstack.
7336
7337 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
7338
7339 * cp-tree.h (VF_DERIVED_VALUE): Remove.
7340 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7341
7342 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
7343
7344 PR 7470.
7345 C++ ABI change - vfunc ordering.
7346 * class.c (add_virtual_function): Remove.
7347 (dfs_modify_all_vtables): Take list of all declared
7348 virtuals. Assign all that are not in primary base.
7349 (check_for_override): Adjust comments.
7350 (create_vtable_ptr): Take single list of virtuals. Build chain
7351 of declared virtuals here.
7352 (layout_class_type): Take single list of virtuals. Adjust.
7353 (finish_struct_1): Keep virtuals on single list. Adjust.
7354
7355 2002-08-02 Mark Mitchell <mark@codesourcery.com>
7356
7357 * init.c (build_member_call): Use build_new_method_call, not
7358 build_method_call.
7359
7360 2002-08-02 Krister Walfridsson <cato@df.lth.se>
7361
7362 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7363
7364 2002-08-02 Mark Mitchell <mark@codesourcery.com>
7365
7366 * call.c (build_method_call): Issue a more helpful error message
7367 about ambiguous method names.
7368
7369 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
7370
7371 * tree.c (build_shared_int_cst): Make cache file scope, and
7372 GTY it.
7373
7374 2002-08-02 Jason Merrill <jason@redhat.com>
7375
7376 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
7377 (cp_expr_size): New fn.
7378 * call.c (build_over_call): Lose empty class hackery.
7379 (convert_arg_to_ellipsis): Promote non-POD warning to error.
7380 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
7381
7382 * semantics.c (expand_body): Do tree optimization in the function
7383 context, too.
7384
7385 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
7386
7387 * cp-tree.h: Move all warning and flag declarations to c-common.h.
7388 * decl.c: Move all warning and flag variables to c-common.c.
7389 * decl2.c: Move all warning and flag variables to c-common.c.
7390 * lex.c (flag_digraphs): Remove.
7391 (warn_traditional): Now in c-common.c.
7392
7393 2002-07-31 Mark Mitchell <mark@codesourcery.com>
7394
7395 * call.c (build_field_call): Do not look up the field by name.
7396 (build_method_call): Simplify.
7397 (struct z_candidate): Add access_path and conversion_path. Remove
7398 basetype_path.
7399 (convert_class_to_reference): Adjust use of
7400 add_function_candidate.
7401 (add_candidate): Add conversion_path argument.
7402 (add_function_candidate): Use it.
7403 (add_conv_dndidate): Likewise.
7404 (build_builtin_candidate): Likewise.
7405 (add_template_candidate_real): Add conversion_path argument.
7406 (add_template_conv_candidate): Likewise.
7407 (add_template_candidate): Likewise.
7408 (build_user_type_conversion_1): Use it.
7409 (build_new_function_call): Remove name lookup code. Adjust use of
7410 add_template_candidate and add_function_candidate.
7411 (build_new_op): Likewise.
7412 (convert_like_real): Use build_special_member_call.
7413 (build_over_call): Use cand->conversion_path.
7414 (build_special_member_call): New method.
7415 (build_new_method_call): Remove name lookup code.
7416 * cp-tree.def (OFFSET_REF): Update documentation.
7417 (TEMPLATE_ID_EXPR): Likewise.
7418 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
7419 (BASELINK_OPTYPE): Likewise.
7420 (build_new_method_call): Adjust prototype.
7421 (build_special_member_call): New method.
7422 (build_baselink): New method.
7423 (build_offset_ref_call_from_tree): Likewise.
7424 (build_call_from_tree): Likewise.
7425 (finish_qualified_call_expr): Remove.
7426 (finish_call_expr): Adjust prototype.
7427 (build_x_function_call): Remove.
7428 * cvt.c (ocp_convert): Use build_special_member_call.
7429 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
7430 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
7431 CALL_EXPR.
7432 (build_offset_ref_call_from_tree): New function.
7433 (build_call_from_tree): Likewise.
7434 * init.c (expand_cleanup): Use build_special_member_call.
7435 (expand_default_init): Likewise.
7436 (build_member_call): Use finish_call_expr.
7437 (build_new_1): Use build_special_member_call.
7438 (push_base_cleanups): Likewise.
7439 * method.c (do_build_assign_ref): Likewise.
7440 * parse.y (template_id): Do not pass a COMPONENT_REF to
7441 lookup_template_function.
7442 (primary): Use parse_finish_call_epxr, not finish_call_expr.
7443 (parse_finish_call_expr): New function.
7444 * pt.c (lookup_template_function): Add assertions.
7445 * search.c (lookup_base): Allow T to be a binfo.
7446 (build_baselink): New function.
7447 (lookup_member): Use it.
7448 * semantics.c (finish_call_expr): Do not do name lookup.
7449 (finish_object_call_expr): Remove #if 0'd code.
7450 (finish_qualified_call_expr): Remove.
7451 * typeck.c (build_x_function_call): Remove.
7452 (build_static_case): Use build_special_member_call.
7453 * typeck2.c (build_functional_cast): Likewise.
7454
7455 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
7456
7457 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
7458
7459 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
7460
7461 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
7462
7463 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
7464
7465 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
7466 documentation.
7467
7468 2002-07-29 Alan Modra <amodra@bigpond.net.au>
7469
7470 * cp-tree.h: Comment typo fix.
7471
7472 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
7473
7474 * spew.c (space_for_token): Allocate zeroed memory for a new token
7475 chunk.
7476
7477 2002-07-27 Roger Sayle <roger@eyesopen.com>
7478
7479 * decl.c (builtin_function_1): No need to explicitly mark
7480 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
7481
7482 2002-07-27 Roger Sayle <roger@eyesopen.com>
7483
7484 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
7485
7486 2002-07-26 Jason Merrill <jason@redhat.com>
7487
7488 * call.c (build_over_call): Likewise.
7489 (cp_convert_parm_for_inlining): New fn.
7490 (convert_for_arg_passing): New fn.
7491 (convert_default_arg, build_over_call): Use it.
7492 (type_passed_as): New fn.
7493 * pt.c (tsubst_decl): Use it.
7494 * decl2.c (cp_build_parm_decl): New fn.
7495 (build_artificial_parm): Use it.
7496 (start_static_storage_duration_function): Likewise.
7497 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
7498 (grokparms): Don't mess with DECL_ARG_TYPE.
7499 * typeck.c (convert_arguments): Use convert_for_arg_passing.
7500 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7501 Define.
7502 * cp-tree.h: Declare new fns.
7503
7504 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
7505
7506 * cp-tree.h (flag_operator_names): Remove.
7507 * decl2.c (flag_operator_names): Remove.
7508 (lang_f_options): Remove operator-names.
7509 * lex.c (D_OPNAME): Remove.
7510 (reswords): Remove operator names.
7511 (rid_to_yy): Remove operator names.
7512 (init_reswords): No need to handle D_OPNAME.
7513 * spew.c (read_process_identifier): There are no operator
7514 names.
7515
7516 2002-07-26 Jason Merrill <jason@redhat.com>
7517
7518 * dump.c (cp_dump_tree): Call c_dump_tree.
7519 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7520
7521 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
7522
7523 * error.c (print_whitespace): Remove.
7524 * g++spec.c (LIBUNWIND): Move.
7525 * mangle.c (mangled_position, write_signed_number): Remove.
7526
7527 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
7528
7529 * decl2.c (cxx_decode_option): Similarly.
7530
7531 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
7532
7533 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
7534 (cxx_sizeof_or_alignof_type): Take a third argument.
7535 (cxx_sizeof): Adjust definition.
7536 (cxx_alignof): Likewise.
7537 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
7538 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
7539 complaining.
7540 (c_sizeof_nowarn): Remove definition.
7541 (build_unary_op): Use cxx_sizeof_nowarn.
7542
7543 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
7544
7545 * tree.c (cp_build_qualified_type_real): When copying
7546 pointer-to-method types, unshare the record that holds
7547 the cached pointer-to-member-function type.
7548
7549 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
7550
7551 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
7552
7553 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
7554
7555 Fix PR/7363:
7556 * typeck.c (cxx_sizeof_or_alignof_type): New function.
7557 (c_sizeof): Remove definition.
7558 (expr_sizeof): Use cxx_sizeof.
7559 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
7560 * decl.c (finish_destructor_body): Use cxx_sizeof.
7561 * semantics.c (finish_alignof): Likewise.
7562 (finish_alignof): Use cxx_alignof.
7563 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
7564 (cxx_sizeof_or_alignof_type): Declare.
7565 (my_friendly_assert): Move to ../c-common.h.
7566
7567 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
7568
7569 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
7570
7571 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7572
7573 PR c++/7347, c++/7348
7574 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
7575 * decl.c (make_typename_type): Use it.
7576 (make_unbound_class_template): Likewise.
7577 (lookup_name_real): Don't call type_access_control if scope is
7578 template parameter dependent.
7579 * parse.y (template_arg): Call make_unbound_class_template with
7580 tf_parsing set.
7581 (nest_name_specifier): Call make_typename_type with tf_parsing set.
7582 (typename_sub0): Likewise.
7583 (typename_sub1): Likewise.
7584 (instantiate_decl): Push class scope.
7585 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
7586 for both static variable and member function template.
7587 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
7588 and arguments.
7589 * search.c (type_access_control): Do type access for TEMPLATE_DECL
7590 too.
7591
7592 2002-07-20 Roger Sayle <roger@eyesopen.com>
7593
7594 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
7595 test by using positive_option. Make whitespace consistent.
7596
7597 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
7598
7599 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7600 members with 'locus'. Adjust use throughout.
7601 (struct feed): Likewise.
7602 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
7603 Adjust use.
7604 (snarf_defarg): Use error(), not error_with_file_and_line().
7605
7606 2002-07-19 Chris Demetriou <cgd@broadcom.com>
7607
7608 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
7609 cpp_options is included.
7610
7611 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7612
7613 PR c++/2862, c++/2863
7614 * pt.c (determine_specialization): Compare the length of
7615 TYPE_ARG_TYPES. Tidy.
7616
7617 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7618
7619 PR c++/3797
7620 * decl.c (duplicate_decls): Don't propagate inlining parameters from
7621 olddecl to newdecl when newdecl is a specialization of the
7622 instantiation olddecl.
7623
7624 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7625
7626 PR c++/4802, c++/5387
7627 * decl.c (make_typename_type): Use enforce_access.
7628
7629 2002-07-17 Scott Snyder <snyder@fnal.gov>
7630
7631 PR c++/7320
7632 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
7633
7634 2002-07-12 Mark Mitchell <mark@codesourcery.com>
7635
7636 * class.c (add_method): Correct handling of conversion operators.
7637
7638 2002-07-11 Mark Mitchell <mark@codesourcery.com>
7639
7640 PR c++/7224
7641 * class.c (add_method): Simplify.
7642
7643 2002-07-11 Jason Merrill <jason@redhat.com>
7644
7645 PR c++/7279
7646 * tree.c (cp_copy_res_decl_for_inlining): Also copy
7647 TREE_ADDRESSABLE.
7648
7649 2002-07-10 Graham Stott <graham.stott@btinternet.com>
7650
7651 * pt.c (template_parm_this_level_p, push_template_decl_real):
7652 Pass depth as int pointer.
7653
7654 2002-07-11 Tim Josling <tej@melbpc.org.au>
7655
7656 Remove front end hard coding from gengtype.c.
7657
7658 * config-lang.in (gtfiles): Add files needed for this front end.
7659
7660 2002-07-10 Mark Mitchell <mark@codesourcery.com>
7661
7662 * cp-tree.h (unqualified_name_lookup_error): Declare it.
7663 (begin_function_definition): Adjust prototype.
7664 * lex.c (unqualified_name_lookup_error): New function, split out
7665 from ...
7666 (do_identifier): ... here.
7667 * parse.y (parse_begin_function_definition): New function.
7668 (fn.def1): Use it.
7669 * semantics.c (begin_function_definition): Accept decl-specifiers
7670 and attributes as separate parameters.
7671
7672 2002-07-10 Jason Merrill <jason@redhat.com>
7673
7674 PR c++/6255
7675 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
7676 modifying the old one.
7677
7678 2002-07-09 Mark Mitchell <mark@codesourcery.com>
7679
7680 * cp-tree.h (constructor_name_p): Declare it.
7681 (check_template_template_default_arg): Likewise.
7682 * class.c (handle_using_decl): Use constructor_name_p.
7683 * decl.c (grokdeclarator): Likewise.
7684 * decl2.c (constructor_name_p): Define it.
7685 * init.c (build_member_call): Use constructor_name_p.
7686 * parse.y (template_parm): Use check_template_template_default_arg.
7687 * pt.c (check_explicit_specialization): Use constructor_name_p.
7688 * semantics.c (check_template_template_default_arg): New function.
7689
7690 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7691
7692 * pt.c (can_complete_type_without_circularity): Add static to
7693 function definition.
7694
7695 2002-07-08 Mark Mitchell <mark@codesourcery.com>
7696
7697 * cp-tree.h (have_extern_spec): Declare it
7698 * decl.c (have_extern_spec): Define it.
7699 (start_decl): Eliminate use of used_extern_spec.
7700 (start_function): Likewise.
7701 * parse.y (have_extern_spec): Remove declaration.
7702 (used_extern_spec): Likewise.
7703 (frob_specs): Eliminate use of used_extern_spec.
7704 (.hush_warning): Likewise.
7705
7706 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7707
7708 * Make-lang.in (cp/parse.o): Depend on decl.h.
7709 * cp-tree.h (do_decl_instantiation): Change prototype.
7710 * parse.y: Include decl.h.
7711 (parse_decl_instantiation): New function.
7712 (explicit_instantiation): Use it.
7713 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
7714 and DECLSPECS.
7715
7716 2002-07-07 Roger Sayle <roger@eyesopen.com>
7717
7718 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
7719 constructor and destructor tests when passed a TEMPLATE_DECL.
7720
7721 2002-07-05 Jason Merrill <jason@redhat.com>
7722
7723 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
7724 pointers.
7725
7726 PR optimization/7145
7727 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
7728
7729 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
7730
7731 Repair damage on weak-impared targets caused by my previous patch.
7732 * cp-tree.h (import_export_tinfo): Add parameter.
7733 * decl2.c (import_export_tinfo): Add parameter, post adjust
7734 DECL_COMDAT.
7735 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
7736 import_export_tinfo.
7737
7738 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7739
7740 PR c++/6944
7741 * init.c (build_aggr_init): Remove qualifiers of init before calling
7742 build_vec_init.
7743 (build_vec_init): Flatten multi-dimensional array during cleanup.
7744 (build_vec_delete_1): Abort if the type of each element is array.
7745
7746 2002-07-03 Graham Stott <graham.stott@btinternet.com>
7747
7748 * pt.c (instantiate_class_template): Fix typo.
7749
7750 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7751
7752 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
7753 by CVS conflict in my last patch.
7754
7755 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7756
7757 PR c++/6716
7758 * pt.c (can_complete_type_without_circularity): New function.
7759 (instantiate_class_template): Use it.
7760 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
7761 message due to incomplete fields.
7762
7763 2002-07-01 Mark Mitchell <mark@codesourcery.com>
7764
7765 PR c++/7112
7766 * mangle.c (write_expression): Add mangling for sizeof when
7767 applied to a type.
7768 * operators.def: Remove stale comment.
7769
7770 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
7771
7772 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
7773 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
7774 (tinfo_decl_type): Replace with ...
7775 (type_info_ptr_type): ... this.
7776 (import_export_tinfo): Declare.
7777 (tinfo_decl_p): Rename to ...
7778 (unemitted_tinfo_decl_p): ... this.
7779 * decl2.c (import_export_decl): Break out tinfo handling into ...
7780 (import_export_tinfo): ... here. New function.
7781 (finish_file): Adjust.
7782 * rtti.c (TINFO_REAL_NAME): New macro.
7783 (init_rtti_processing): Create the tinfo types.
7784 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
7785 (get_tinfo_decl): Adjust.
7786 (get_tinfo_ptr): New function.
7787 (get_type_id): Use it.
7788 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
7789 (ptr_initializer): Use get_tinfo_ptr.
7790 (ptm_initializer): Likewise.
7791 (synthesize_tinfo_var): Break into ...
7792 (get_pseudo_ti_init): ... this. Just create the initializer.
7793 (get_pseudo_ti_desc): .. and this.
7794 (create_real_tinfo_var): Remove.
7795 (create_pseudo_type_info): Don't create the vtable decl here.
7796 (get_vmi_pseudo_type_info): Remove.
7797 (create_tinfo_types): Adjust.
7798 (tinfo_decl_p): Rename to ...
7799 (unemitted_tinfo_decl_p): ... here. Adjust.
7800 (emit_tinfo_decl): Adjust. Create the initializer.
7801
7802 2002-06-27 Mark Mitchell <mark@codesourcery.com>
7803
7804 PR c++/6695
7805 * pt.c (tsubst_friend_class): Substitute into the context of the
7806 friend before using it.
7807
7808 2002-06-26 Mark Mitchell <mark@codesourcery.com>
7809
7810 * cp-tree.h (xref_tag): Change prototype.
7811 (handle_class_head): Likewise.
7812 (build_x_component_ref): Likewise.
7813 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
7814 (xref_tag): Take attributes as a separate parameter.
7815 (xref_tag_from_type): Adjust call to xref_tag.
7816 * decl2.c (build_expr_from_tree): Adjust call to
7817 build_x_component_ref.
7818 (handle_class_head): Take attributes as a separate parameter.
7819 * parse.y (parse_xref_tag): New function.
7820 (parse_handle_class_head): Likewise.
7821 (primary): Use parse_xref_tag.
7822 (class_head_decl): Use parse_handle_class_head.
7823 (class_head_defn): Likewise.
7824 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
7825 (build_dynamic_cast_1): Likewise.
7826 (create_pseudo_type_info): Likewise.
7827 (emit_support_tinfos): Likewise.
7828 * typeck.c (build_object_ref): Adjust call to
7829 build_x_component_ref.
7830 (build_x_component_ref): Remove protect parameter.
7831
7832 2002-06-25 Mark Mitchell <mark@codesourcery.com>
7833
7834 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
7835 * class.c (handle_using_decl): Likewise.
7836 (instantiate_type): Likewise.
7837 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
7838 (xref_basetypes): Change prototype.
7839 (begin_mem_initializers): New function.
7840 (get_overloaded_fn): Likewise.
7841 * decl.c (xref_basetypes): Simplify.
7842 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
7843 * init.c (build_offset_ref): Likewise.
7844 * parse.y (base_init): Use begin_mem_initializers().
7845 (structsp): Adjust call to xref_basetypes.
7846 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
7847 (instantiate_class_template): Adjust call to xref_basetypes.
7848 * semantics.c (begin_mem_initializers): New function.
7849 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
7850 (really_overlaoded_fn): Likewise.
7851 (get_overloaded_fn): New function.'
7852 (get_first_fn): USe BASELINK_FUNCTIONS.
7853
7854 2002-06-24 Mark Mitchell <mark@codesourcery.com>
7855
7856 * cp-tree.h (SCALAR_TYPE_P): New macro.
7857 (check_for_out_of_scope_variable): New function.
7858 (at_class_scope_p): Likewise.
7859 (finish_fname): Likewise.
7860 * class.c (finish_struct): Use at_function_scope_p.
7861 * decl.c (check_for_out_of_scope_variable): New function, split
7862 out from do_identifier.
7863 (finish_enum): Use at_function_scope_p.
7864 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
7865 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
7866 (primary): Use at_function_scope_p.
7867 * search.c (at_class_scope_p): New function.
7868 * semantics.c (finish_fname): Likewise.
7869 (check_multiple_declarators): Use at_function_scope_p.
7870
7871 2002-06-23 Mark Mitchell <mark@codesourcery.com>
7872
7873 * parse.y (parse_scoped_id): New function.
7874 (primary): Use it.
7875 * cp-tree.h (do_scoped_id): Adjust declaration.
7876 * lex.c (do_scoped_id): Remove call to yylex.
7877 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
7878 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
7879 expanding it inline.
7880
7881 2002-06-23 Matt Thomas <matt@3am-software.com>
7882
7883 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
7884 "#if VMS_TARGET".
7885
7886 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7887
7888 * mangle.c (integer_type_codes): Const-ify.
7889
7890 2002-06-20 Richard Henderson <rth@redhat.com>
7891
7892 PR c++/6747
7893 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
7894 Call put_var_into_stack.
7895
7896 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7897
7898 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
7899 array size calculation.
7900
7901 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7902
7903 PR c++/6892
7904 * pt.c (tsubst_expr): Handle FILE_STMT.
7905
7906 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7907
7908 PR c++/6723
7909 * pt.c (lookup_template_class): Don't build complete argument of
7910 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
7911 argument.
7912
7913 2002-06-19 Akim Demaille <akim@epita.fr>
7914
7915 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
7916 decl.h's TYPENAME.
7917 * spew.c, lex.c: Adjust.
7918 * parse.y (explicit_instantiation): Add empty action to override
7919 the default $$ = $1 where it introduces a type clash.
7920
7921 2002-06-14 Jason Merrill <jason@redhat.com>
7922
7923 * semantics.c (begin_for_stmt): Push the 'for' scope before
7924 adding the FOR_STMT.
7925
7926 C++ ABI changes.
7927 * class.c (build_base_field): Set DECL_PACKED.
7928 (layout_class_type): Don't use tail padding of PODs.
7929 * mangle.c (write_unqualified_name): Fix template conversion op
7930 mangling.
7931
7932 2002-06-16 Richard Henderson <rth@redhat.com>
7933
7934 PR opt/6793
7935 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
7936 after template instantiation.
7937
7938 2002-06-16 Richard Henderson <rth@redhat.com>
7939
7940 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
7941
7942 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
7943
7944 * cp-tree.h (compiler_error): Remove declaration.
7945 * lex.c (compiler_error): Remove definition.
7946
7947 2002-06-14 Steve Ellcey <sje@cup.hp.com>
7948
7949 * g++spec.c (LIBUNWIND): New.
7950 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
7951
7952 2002-06-13 Jessica Han <jessica@cup.hp.com>
7953
7954 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
7955 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
7956 (build_vbase_offset_vtbl_entries): Likewise.
7957 * rtti.c (build_headof): Likewise.
7958 (get_tinfo_decl_dynamic): Likewise.
7959 (create_pseudo_type_info): Likewise.
7960
7961 2002-06-12 Stan Shebs <shebs@apple.com>
7962
7963 * mpw-config.in: Remove file, no longer used.
7964 * mpw-make.sed: Ditto.
7965
7966 2002-06-07 Zack Weinberg <zack@codesourcery.com>
7967
7968 * decl2.c: Update call to cpp_handle_option.
7969
7970 2002-06-07 H.J. Lu (hjl@gnu.org)
7971
7972 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
7973
7974 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
7975
7976 * error.c (cp_error_at): Fix typo.
7977
7978 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
7979
7980 * error.c (cp_diagnostic_starter): Adjust call.
7981 (maybe_print_instantiation_context): Change prototype to take a
7982 'diagnostic_info *'.
7983 (print_instantiation_full_context): Likewise.
7984 (print_instantiation_partial_context): Likewise.
7985 (cp_diagnostic_starter): Likewise.
7986 (cp_diagnostic_finalizer): Likewise.
7987 (cp_print_error_function): Likewise.
7988 (cp_printer): Take a secondary parameter as a 'text_info *'.
7989 Remove output_state savings. Adjust calls.
7990
7991 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
7992
7993 * pt.c (inline_parm_levels): Mark for GC.
7994
7995 * mangle.c (start_mangling): Allocate G.substitutions here...
7996 (init_mangle): ... rather than here.
7997 (finish_mangling): Clear the varray pointer when done with it.
7998 * spew.c (yylexstring): Don't use VARRAY_FREE.
7999 * search.c (bfs_walk): Don't use VARRAY_FREE.
8000 * decl2.c (pending_statics): Use gengtype to mark.
8001 (deferred_fns): Likewise.
8002 (ssdf_decls): Likewise.
8003 (init_decl2): Delete.
8004 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8005 (cxx_init_decl_processing): Don't call init_decl2.
8006 (cxx_pop_function_context): Don't use VARRAY_FREE.
8007 * cp-tree.h (struct saved_scope): No need for special marking
8008 of varrays.
8009 (struct language_function): Likewise.
8010 (local_classes): Use gengtype to mark.
8011 (init_decl2): Delete prototype.
8012 * class.c (init_class_processing): Don't use
8013 ggc_add_tree_varray_root.
8014 (build_vtbl_initializer): Don't use VARRAY_FREE.
8015
8016 * decl.c (typename_compare): Don't use same_type_p.
8017
8018 * decl.c: Include hashtab.h instead of hash.h.
8019 (typename_hash): Update to use htab_h.
8020 (typename_compare): Likewise.
8021 (typename_htab): Use gengtype to mark.
8022 (build_typename_type): Update to use htab_h.
8023 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8024
8025 * Make-lang.in (gt-cp-tree.h): New rule.
8026 (cp/tree.o): Depend on gt-cp-tree.h.
8027 * config-lang.in (gtfiles): Add cp/tree.c.
8028 * tree.c: Include gt-cp-tree.h.
8029 (list_hash_table): Use gengtype to mark.
8030 (init_tree): Use gengtype to mark trees.
8031
8032 * Make-lang.in (cp/decl.o): Add debug.h dependency.
8033 * call.c (struct z_candidate): Use gengtype.
8034 (USER_CONV_CAND): Use WRAPPER_ZC.
8035 (convert_class_to_reference): Use build_zc_wrapper.
8036 (build_type_conversion_1): Likewise.
8037 (build_over_call): Use WRAPPER_ZC.
8038 (add_warning): Use build_zc_wrapper.
8039 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8040 * cp-tree.h (struct lang_identifier): Use gengtype.
8041 (struct template_parm_index_s): Likewise.
8042 (struct ptrmem_cst): Likewise.
8043 (struct tree_binding): Likewise.
8044 (struct tree_overload): Likewise.
8045 (struct tree_srcloc): Likewise.
8046 (struct tree_wrapper): Likewise. Also modify to have a pointer
8047 to struct z_candidate rather than void.
8048 (enum cp_tree_node_structure_enum): New.
8049 (union lang_tree_node): New.
8050 (cxx_mark_tree): Delete prototype.
8051 (cp_tree_node_structure): New prototype.
8052 (build_ptr_wrapper): Delete prototype.
8053 (build_int_wrapper): Delete prototype.
8054 (build_zc_wrapper): New prototype.
8055 * decl.c: Include debug.h
8056 (cxx_mark_tree): Delete.
8057 (cp_tree_node_structure): New.
8058 * tree.c (build_ptr_wrapper): Delete.
8059 (build_int_wrapper): Delete.
8060 (build_zc_wrapper): New.
8061
8062 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
8063 Correct typo. Patch from k_fukui@highway.ne.jp.
8064
8065 * semantics.c (current_stmt_tree): Update for change to
8066 struct language_function.
8067 (finish_mem_initializers): Likewise.
8068 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
8069 * cp-tree.h (struct language_function): Rename from
8070 cp_language_function. Change all uses.
8071 (cp_function_chain): Don't need to cast.
8072
8073 * class.c (duplicate_tag_error): Reset discriminator.
8074 (check_bases_and_members): Update for data structure changes.
8075 * cp-tree.h (struct lang_id2): Use gengtype.
8076 (flagged_type_tree): Likewise.
8077 (SET_LANG_ID): Use GGC on struct lang_id2.
8078 (struct cp_language_function): Use gengtype. Remove field
8079 'x_vcalls_possible_p'.
8080 (current_vcalls_possible_p): Delete.
8081 (struct lang_type_header): New.
8082 (struct lang_type_class): Rename from struct lang_type. Include
8083 struct lang_type_header.
8084 (struct lang_type_ptrmem): New.
8085 (struct lang_type): New.
8086 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
8087 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
8088 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
8089 (struct lang_decl_flags): Use gengtype. Add discriminators.
8090 (struct lang_decl): Use gengtype. Add and use discriminators.
8091 Update the macros that reference moved fields.
8092 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
8093 (SET_DECL_THUNK_P): Set discriminator too.
8094 (clear_inline_text_obstack): Delete prototype.
8095 (finish_inline_definitions): Delete prototype.
8096 (mark_pending_inlines): Delete prototype.
8097 (lang_check_failed): New prototype.
8098 * decl.c (struct named_label_use_list): Use gengtype.
8099 (struct named_label_list): Likewise.
8100 (mark_binding_level): Delete.
8101 (mark_named_label_lists): Delete.
8102 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
8103 (cxx_init_decl_processing): Use generated marker routine.
8104 (begin_destructor_body): Delete dead set to
8105 current_vcalls_possible_p.
8106 (mark_lang_function): Delete.
8107 (mark_cp_function_context): Delete.
8108 (lang_mark_tree): Use generated marker routines.
8109 * decl2.c (start_objects): Set discriminator when setting
8110 GLOBAL_INIT_PRIORITY.
8111 * lex.c (retrofit_lang_decl): Set discriminators.
8112 (copy_lang_type): Update for changes to lang_type structure.
8113 (cp_make_lang_type): Set discriminator.
8114 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
8115 * search.c: Include ggc.h.
8116 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
8117 (finish_inline_definitions): Delete.
8118 * spew.c (struct token): Use gengtype.
8119 (struct token_chunk): New.
8120 (struct unparsed_text): Use gengtype. Store tokens in chunks.
8121 (struct feed): Use gengtype.
8122 (feed_obstack): Delete.
8123 (feed): Mark as GC root.
8124 (pending_inlines): Mark as GC root.
8125 (pending_inlines_tail): Likewise.
8126 (processing_these_inlines): Likewise.
8127 (token_obstack): Make static.
8128 (first_token): Likewise.
8129 (init_spew): Don't initialize deleted things; use gengtype for roots.
8130 (clear_inline_text_obstack): Delete.
8131 (feed_input): Use GC for struct feed. Update for changes to
8132 struct unparsed_text.
8133 (mark_pending_inlines): Delete.
8134 (next_token): Rename from add_token. Change all callers. Update
8135 for changes to struct unparsed_text.
8136 (space_for_token): New.
8137 (remove_last_token): New.
8138 (alloc_unparsed_text): New.
8139 (snarf_block): Take an unparsed_text. Update for changes to struct
8140 unparsed_text.
8141 (snarf_method): Update for changes to struct unparsed_text.
8142 (snarf_defarg): Update for changes to struct unparsed_text.
8143 * tree.c (lang_check_failed): New.
8144
8145 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8146 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8147 (cp/spew.o): Add dependency on gt-<filename>.h.
8148 (cp/decl2.o): Add dependency on gt-<filename>.h.
8149 (cp/call.o): Add dependency on gt-<filename>.h.
8150 (cp/pt.o): Add dependency on gt-<filename>.h.
8151 (cp/repo.o): Add dependency on gt-<filename>.h.
8152 (cp/parse.o): Add dependency on gt-<filename>.h.
8153 * call.c: Use gengtype for roots.
8154 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8155 decl2.c parse.y pt.c repo.c spew.c.
8156 * cp-tree.h: Use gengtype for roots.
8157 (struct saved_scope): Use GGC, gengtype.
8158 (cp_parse_init): Delete prototype.
8159 (init_pt): Delete prototype.
8160 * decl.c: Use gengtype for roots.
8161 (mark_saved_scope): Delete.
8162 (cxx_init_decl_processing): Don't call deleted initilisation
8163 routines.
8164 (signed_size_zero_node): Delete, unused.
8165 * decl.h: Use gengtype for roots.
8166 * decl2.c: Use gengtype for roots.
8167 * lex.h: Use gengtype for roots.
8168 * parse.y: Use gengtype for roots.
8169 (cp_parse_init): Delete.
8170 * pt.c: Use gengtype for roots.
8171 (init_pt): Delete.
8172 * repo.c: Use gengtype for roots.
8173 * spew.c: Use gengtype for roots.
8174
8175 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
8176 (cp/decl.o): Add dependency on gtype-cp.h.
8177 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8178 Include gtype-cp.h. Allow for filename changes.
8179
8180 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8181 (cp/decl.o): Add cp/gt-decl.h dependency.
8182 * config-lang.in (gtfiles): New.
8183 * tree.h: Rename struct binding_level to struct cp_binding_level.
8184 * decl.c: Rename struct binding_level to struct cp_binding_level.
8185 Include cp/gt-decl.h.
8186 (struct cp_binding_level): Use gengtype.
8187 (make_binding_level): Use GGC on struct cp_binding_level.
8188 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8189 (cxx_init_decl_processing): Mark free_binding_level as
8190 deletable.
8191
8192 * decl.c (mark_cp_function_context): Update calling sequence.
8193
8194 * decl.c (start_function): Don't free 'struct
8195 cp_language_function'.
8196 (pop_cp_function_context): Likewise.
8197 (save_function_data): Allocate it using GC.
8198 * semantics.c (genrtl_start_function): Don't free 'struct
8199 cp_language_function'.
8200
8201 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
8202
8203 * lang-specs.h: Use cpp_debug_options.
8204
8205 2002-05-28 Zack Weinberg <zack@codesourcery.com>
8206
8207 * mangle.c, tree.c: Include real.h.
8208 * Make-lang.in: Update dependency lists.
8209
8210 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
8211
8212 * lex.c: Don't include c-lex.h.
8213 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8214
8215 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
8216
8217 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8218
8219 2002-05-22 Richard Henderson <rth@redhat.com>
8220
8221 * decl.c (obscure_complex_init): Check for VAR_DECL
8222 before using DECL_THREAD_LOCAL.
8223
8224 2002-05-22 Richard Henderson <rth@redhat.com>
8225
8226 * decl.c (check_tag_decl): Handle RID_THREAD.
8227 (obscure_complex_init): Reject run-time init of tls.
8228 (grokvardecl, grokdeclarator): Handle RID_THREAD.
8229 * lex.c (reswords): Add __thread.
8230 (rid_to_yy): Map RID_THREAD to SCSPEC.
8231
8232 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
8233
8234 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8235 * cp-tree.h (cxx_post_options): Kill.
8236 * cp-lex.c (cxx_post_options): Kill.
8237
8238 2002-05-21 Richard Henderson <rth@redhat.com>
8239
8240 * lex.c (rid_to_yy): Add RID_THREAD.
8241
8242 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
8243
8244 * init.c (build_vec_init): Test for trivial copy-assignment when
8245 copy-assigning arrays.
8246
8247 2002-05-20 Andreas Jaeger <aj@suse.de>
8248
8249 * init.c (build_default_init): Remove unused variable.
8250
8251 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
8252
8253 * call.c (any_strictly_viable): New.
8254 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8255
8256 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8257
8258 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8259
8260 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8261
8262 PR c++/186, DR 259
8263 * pt.c (do_decl_instantiation): Don't complain explicit
8264 instantiation after explicit specialization.
8265 (do_type_instantiation): Likewise.
8266
8267 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
8268
8269 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8270 renamed from...
8271 (complete_type_or_else): ... this. Redefined as macro.
8272 (cxx_incomplete_type_diagnostic): Declare.
8273 (cxx_incomplete_type_error): Define as macro.
8274 * init.c (build_delete): Warn about incomplete types other than
8275 void, and use the built-in operator delete for them.
8276 * typeck.c (complete_type_or_diagnostic): Renamed from
8277 complete_type_or_else. Added warn_only argument, passed to...
8278 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
8279 warnings or errors depending on new warn_only argument. Renamed
8280 from...
8281 (cxx_incomplete_type_error): ... this. New implementation in
8282 terms of cxx_incomplete_type_diagnostic.
8283
8284 2002-05-18 Jason Merrill <jason@redhat.com>
8285
8286 PR c++/6611
8287 * decl2.c (import_export_decl): If we clear
8288 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8289
8290 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8291
8292 PR c++/6620
8293 * pt.c (verify_class_unification): Don't check if PARM is template
8294 parameter dependent. Simplify.
8295 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8296 parameter dependent expression.
8297
8298 2002-05-14 Jason Merrill <jason@redhat.com>
8299
8300 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8301 Do set DECL_COMDAT.
8302 (synthesize_tinfo_var): Take the public decl.
8303 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
8304 (emit_tinfo_decl): Adjust. Call import_export_decl.
8305 * decl2.c (import_export_decl): Simplify tinfo decl handling.
8306
8307 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
8308
8309 * cp-tree.h (struct lang_type): Added non_zero_init.
8310 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8311 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8312 * class.c (check_field_decls): Test non_zero_init.
8313 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8314 zero-to-NULL conversions.
8315 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8316 type that needs zero-initialization without zeros.
8317 (check_initializer_decl): Compute zero-initializer for types
8318 that require a non-trivial one.
8319 * init.c (build_forced_zero_init): New function.
8320 (build_default_init): Use it.
8321 * tree.c (zero_init_p): New function.
8322 * typeck2.c (force_store_init_value): New function.
8323 (process_init_constructor): Create non-trivial zero-initializers
8324 for array members and class fields.
8325
8326 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
8327
8328 * lang-specs.h: Remove redundant -lang-c++.
8329
8330 2002-05-13 Jason Merrill <jason@redhat.com>
8331
8332 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8333 (fixed_type_or_null): See through reference vars.
8334 (build_base_path): Vtable contents are constant.
8335 * typeck.c (get_member_function_from_ptrfunc): Likewise.
8336
8337 2002-05-12 Jason Merrill <jason@redhat.com>
8338
8339 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8340 structs are safe.
8341
8342 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
8343
8344 * cp-tree.h (flag_ansi): Remove.
8345 * decl2.c (flag_ansi): Remove.
8346 (cxx_decode_option): Set flag_iso and flag_undef.
8347
8348 2002-05-09 Jason Merrill <jason@redhat.com>
8349
8350 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8351 Use subtraction rather than a bitmask to get the index.
8352 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8353
8354 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8355
8356 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
8357
8358 * Make-lang.in (decl2.o): Update.
8359 * cp-tree.h (warn_multichar): Remove.
8360 * decl2.c: Include c-common.h.
8361 (warn_multichar): Remove.
8362
8363 2002-05-03 Jason Merrill <jason@redhat.com>
8364
8365 * tree.c (build_cplus_array_type): Only const and volatile get
8366 special handling.
8367
8368 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
8369
8370 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8371
8372 ABI change, returning simple classes from functions.
8373 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
8374 TYPE_HAS_TRIVIAL_INIT_REF is false or
8375 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
8376
8377 2002-04-30 Jason Merrill <jason@redhat.com>
8378
8379 PR debug/6436
8380 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
8381 anonymous class with a typedef if there are attributes.
8382
8383 2002-04-29 Paul Eggert <eggert@twinsun.com>
8384
8385 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
8386
8387 2002-04-29 Jakub Jelinek <jakub@redhat.com>
8388
8389 PR c++/6477
8390 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
8391 non-NULL first.
8392
8393 2002-04-29 Mark Mitchell <mark@codesourcery.com>
8394
8395 PR c++/6492
8396 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
8397 enter that scope before name lookup.
8398
8399 PR c++/6486
8400 * method.c (do_build_copy_constructor): Avoid building
8401 cv-qualified reference types.
8402
8403 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
8404
8405 PR c++/5719
8406 * decl.c (grok_op_properties): Assignment ops don't have to return
8407 by value. operator% should.
8408
8409 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8410
8411 PR c/6343
8412 * decl.c (duplicate_decls): Call merge_weak.
8413
8414 2002-04-26 Richard Henderson <rth@redhat.com>
8415
8416 * parse.y (malloced_yyss, malloced_yyvs): New.
8417 (yyoverflow): Re-add. Set them.
8418 (free_parser_stacks): New.
8419
8420 2002-04-26 Mark Mitchell <mark@codesourcery.com>
8421
8422 PR c++/6497
8423 * method.c (do_build_assign_ref): Pass a derivation to
8424 build_method_call when calling base class assignment operators.
8425
8426 2002-04-26 Richard Henderson <rth@redhat.com>
8427
8428 * parse.y (yyoverflow): Revert.
8429
8430 2002-04-26 Richard Henderson <rth@redhat.com>
8431
8432 PR c/3581
8433 * parse.y (string): Remove. Update all uses to use STRING
8434 instead, and not call combine_strings.
8435 * rtti.c (tinfo_name): Use fix_string_type.
8436 * semantics.c (finish_asm_stmt): Don't call combine_strings.
8437 * spew.c (yylexstring): New.
8438 (read_token): Use it.
8439
8440 2002-04-25 Richard Henderson <rth@redhat.com>
8441
8442 PR c/2161
8443 * parse.y (yyoverflow): New.
8444
8445 2002-04-25 Jason Merrill <jason@redhat.com>
8446
8447 PR c++/5607
8448 * search.c (check_final_overrider): No longer static.
8449 * class.c (update_vtable_entry_for_fn): Call it.
8450 * cp-tree.h: Adjust.
8451
8452 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
8453
8454 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8455 * cp-tree.h (cxx_set_yydebug): Die.
8456 * lex.c (YYDEBUG): Get from c-lex.h.
8457 (cxx_set_yydebug): Remove.
8458 * parse.y: Include c-lex.h.
8459 (YYDEBUG): Get from c-lex.h.
8460
8461 2002-04-24 Mark Mitchell <mark@codesourcery.com>
8462
8463 PR c++/6438.
8464 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
8465 void.
8466
8467 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
8468
8469 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
8470 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
8471 Redefine.
8472 * cp-tree.h (cp_attribute_table): Rename.
8473 * decl.c (lang_attribute_table): Remove declaration.
8474 (cxx_init_decl_processing): Don't set it.
8475 * tree.c (cp_attribute_table): Rename.
8476
8477 2002-04-24 Jason Merrill <jason@redhat.com>
8478
8479 PR c++/6331
8480 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
8481 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
8482 The pedwarn for array assignment is now unconditional.
8483 * tree.c (build_cplus_array_type_1): Still process simple array types
8484 normally in templates.
8485
8486 PR c++/6395
8487 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
8488 stuff for comdats.
8489
8490 2002-04-23 Jakub Jelinek <jakub@redhat.com>
8491
8492 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
8493 node with attributes.
8494
8495 2002-2-23 David O'Brien <obrien@FreeBSD.org>
8496
8497 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
8498 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
8499
8500 2002-04-23 Mark Mitchell <mark@codesourcery.com>
8501
8502 PR c++/6256:
8503 * pt.c (tsubst_friend_class): Handle templates with explicit
8504 nested names.
8505
8506 PR c++/6331:
8507 * typeck.c (merge_types): Remember the cv-qualification of pointer
8508 types when merging them.
8509
8510 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
8511
8512 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
8513 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
8514 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
8515 cxx_mark_function_context): New.
8516 * decl.c (push_cp_function_context, pop_cp_function_context,
8517 mark_cp_function_context): Rename for consistency.
8518 (cxx_init_decl_processing): Don't set old hooks.
8519
8520 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
8521
8522 * call.c (convert_type_from_ellipsis): Rename, update.
8523 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
8524 * cp-tree.h (convert_type_from_ellipsis): Rename.
8525 * decl.c (cxx_init_decl_processing): Don't set hook.
8526
8527 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
8528
8529 * call.c (build_new_method_call): Update.
8530 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
8531 * cp-tree.h (cxx_incomplete_type_error): New.
8532 * decl.c (grokdeclarator, grokparms): Update.
8533 * decl2.c (check_classfn): Update.
8534 * pt.c (tsubst): Update.
8535 * typeck.c (complete_type_or_else, expr_sizeof,
8536 decay_conversion): Update.
8537 * typeck2.c (incomplete_type_error): Rename.
8538 (add_exception_specifier): Update.
8539
8540 2002-04-18 Jason Merrill <jason@redhat.com>
8541
8542 PR c++/5658
8543 * search.c (setup_class_bindings): A class template qualifies as a
8544 type binding.
8545
8546 2002-04-17 Jakub Jelinek <jakub@redhat.com>
8547
8548 PR c++/6316
8549 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
8550 before expanding.
8551
8552 2002-04-16 Mark Mitchell <mark@codesourcery.com>
8553
8554 * init.c (begin_init_stmts): Remove commented out code.
8555 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
8556 * semantics.c (begin_gobal_stmt_expr): Adjust call to
8557 expand_start_stmt_expr.
8558
8559 2002-04-15 Mark Mitchell <mark@codesourcery.com>
8560
8561 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
8562 dso_handle itself, to __cxa_atexit.
8563
8564 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8565
8566 * error.c (cxx_print_error_function): Adjust call to macros.
8567
8568 2002-04-14 Jakub Jelinek <jakub@redhat.com>
8569
8570 * class.c (layout_virtual_bases): Do all dsize computation on trees.
8571
8572 2002-04-14 Jason Merrill <jason@redhat.com>
8573
8574 * typeck.c (get_member_function_from_ptrfunc): Don't do
8575 gratuitious division and multiplication on
8576 ptrmemfunc_vbit_in_delta targets.
8577
8578 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8579
8580 PR c++/5373.
8581 * semantics.c (finish_expr_stmt): Remember the type of the
8582 expression before any conversions are performed.
8583
8584 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8585
8586 PR c++/5189.
8587 * call.c (add_template_candidate_real): Do not treat member
8588 templates as copy constructors.
8589
8590 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8591
8592 * decl.c (duplicate_decls): Do not copy the RTL for a variable
8593 declaration if the old variable had an incomplete type and the new
8594 variable does not.
8595 (complete_vars): Do not call layout_decl for completed variables.
8596
8597 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
8598
8599 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
8600 with an explicit one.
8601 (follow_tag_typedef): New.
8602 (lookup_tag): Use it to extract the tag of an explicit typedef.
8603 (xref_tag): Likewise.
8604
8605 2002-04-11 Andrew Haley <aph@redhat.com>
8606
8607 * typeck.c (type_after_usual_arithmetic_conversions):
8608 If two types have the same variant, return immediately.
8609 When two floating-point operands are the same precision:
8610 convert to float if one of the operands is float;
8611 if neither operand is one of the standard types, return the type
8612 of the first operand.
8613
8614 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
8615
8616 PR c++/5507
8617 * decl.c (make_typename_type): Remove implicit typenameness.
8618
8619 2002-04-09 Jason Merrill <jason@redhat.com>
8620
8621 PR optimization/6189
8622 * semantics.c (genrtl_start_function): Don't free
8623 DECL_SAVED_FUNCTION_DATA for inline functions.
8624
8625 * init.c (build_member_call): For now, don't convert to
8626 intermediate base if it would cause an error.
8627
8628 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
8629
8630 * parse.y (namespace_qualifier, maybe_identifier,
8631 begin_explicit_instantiation, end_explicit_instantiation,
8632 apparent_template_type, .finish_template_type,
8633 do_id, maybe_init, defarg_again, component_decl_1):
8634 Add ending ';', in accordance with POSIX.
8635
8636 2002-04-06 Mark Mitchell <mark@codesourcery.com>
8637
8638 PR c++/5571
8639 * class.c (layout_class_type): Remember incomplete static
8640 variables.
8641 (finish_struct_1): Call complete_vars, not
8642 hack_incomplete_structures.
8643 * cp-tree.h (hack_incomplete_structures): Rename to ...
8644 (complete_vars): ... this.
8645 (struct saved_scope): Remove incomplete.
8646 (namespace_scope_incomplete): Remove.
8647 * decl.c (struct binding_level): Remove incomplete.
8648 (incomplete_vars): New variable.
8649 (mark_binding_level): Don't mark incomplete.
8650 (print_binding_level): Don't print it.
8651 (mark_saved_scope): Don't mark incomplete.
8652 (pushdecl): Use maybe_register_incopmlete_var.
8653 (cxx_init_decl_processing): Register incomplete_vars for GC.
8654 (start_decl_1): Clarify error message.
8655 (hack_incomplete_vars): Remove.
8656 (maybe_register_incomplete_var): New function.
8657 (complete_vars): Likewise.
8658
8659 2002-04-06 Jason Merrill <jason@redhat.com>
8660
8661 PR c++/4934
8662 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
8663 set before checking it.
8664
8665 PR c++/525
8666 * init.c (build_member_call): Use build_scoped_ref.
8667 (resolve_offset_ref): Likewise.
8668 * call.c (build_scoped_method_call): Likewise.
8669 * tree.c (maybe_dummy_object): Kludge around current_class_type being
8670 wrong.
8671 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
8672 * cp-tree.h: Adjust.
8673
8674 * init.c (push_base_cleanups): Just use build_scoped_method_call.
8675
8676 PR c++/6179
8677 * method.c (implicitly_declare_fn): Pass unqualified type to
8678 synthesize_exception_spec.
8679
8680 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
8681
8682 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8683 * cvt.c: Update comment.
8684 * init.c (expand_cleanup_for_base): Update.
8685 * semantics.c (finish_parenthesized_expr): Update.
8686 * typeck.c (cp_truthvalue_conversion): Update.
8687
8688 2002-04-04 Jason Merrill <jason@redhat.com>
8689
8690 * semantics.c (finish_eh_cleanup): New fn.
8691 * cp-tree.h: Add prototype.
8692 * init.c (perform_member_init, expand_cleanup_for_base): Use
8693 finish_eh_cleanup.
8694 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
8695 * cp-tree.h: Remove references.
8696 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
8697 * dump.c (cp_dump_tree): Likewise.
8698 * pt.c (tsubst_expr): Likewise.
8699 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
8700 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
8701 * tree.c (cp_statement_code_p): Likewise.
8702
8703 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
8704
8705 PR c++/5636
8706 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
8707 cleanup for nrv.
8708
8709 PR c++/5104
8710 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
8711 specifiers.
8712 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
8713
8714 2002-04-03 Richard Henderson <rth@redhat.com>
8715
8716 * cp-lang.c (cxx_warn_unused_global_decl): New.
8717 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
8718
8719 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
8720
8721 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
8722 * tree.c (init_tree): Don't set hook.
8723
8724 2002-04-03 Roger Sayle <roger@eyesopen.com>
8725
8726 PR c++/5998:
8727 * decl.c (duplicate_decls): Don't mess with assembler names when
8728 redeclaring builtin functions as static.
8729
8730 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8731
8732 * call.c (build_addr_func): Update.
8733 * class.c (resolve_address_of_overloaded_function): Update.
8734 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8735 * cp-tree.h (cxx_mark_addressable): New.
8736 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
8737 * decl2.c (build_cleanup): Update.
8738 * except.c (build_throw): Update.
8739 * init.c (resolve_offset_ref): Update.
8740 * pt.c (convert_nontype_argument): Update.
8741 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
8742 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
8743 unary_complex_lvalue): Update.
8744 (mark_addressable): Rename.
8745
8746 2002-04-01 Roger Sayle <roger@eyesopen.com>
8747
8748 PR c++/5998:
8749 * decl.c (duplicate_decls): Overwrite the RTL when (and only
8750 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
8751 but follow the SET_DECL_RTL idiom used elsewhere in the function.
8752
8753 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8754
8755 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8756 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8757 * decl.c (grokdeclarator): Update.
8758 * mangle.c (write_integer_cst): Update.
8759 * typeck.c (build_binary_op): Update.
8760
8761 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8762
8763 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
8764 * lex.c (cxx_init): Don't set hook.
8765
8766 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8767
8768 * Make-lang.in (error.o): Update.
8769 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8770 * cp-tree.h (struct diagnostic_context): Predeclare.
8771 (cxx_print_error_function): New.
8772 * error.c: Include langhooks-def.h.
8773 (lang_print_error_function): Rename. Update.
8774 (init_error): Don't set hook.
8775
8776 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8777
8778 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
8779 Redefine.
8780 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
8781 * decl.c (finish_enum): Similarly.
8782 * error.c (dump_type): Similarly.
8783 * lex.c (cxx_init): Similarly.
8784 * mangle.c (write_builtin_type): Similarly.
8785 * typeck.c (comptypes): Similarly.
8786
8787 2002-03-28 Roger Sayle <roger@eyesopen.com>
8788
8789 PR c++/5998:
8790 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
8791 in the g++ front-end.
8792 (duplicate_decl): Allow redefinition of anticipated built-ins.
8793 Fix inlining problem by over-writing the old DECL_RTL.
8794 (lookup_namespace_name): Fail to find an identifier in the
8795 specified namespace if its still anticipated.
8796 (builtin_function_1): New function split out from builtin_function
8797 to create a builtin in the current namespace with given context.
8798 (builtin_function): Call builtin_function_1 to define the
8799 appropriate builtins in both the std and global namespaces.
8800 (select_decl): Don't test for anticipated decls here.
8801 (unqualified_namespace_lookup): Instead ignore them whilst
8802 searching through scopes and namespaces.
8803 * decl2.c (do_nonmember_using_decl): If a using declaration
8804 specifies an anticipated built-in function, mark it as no longer
8805 anticipated in that scope.
8806 (ambiguous_decl): Avoid resolving to an anticipated decl.
8807 * lex.c (do_scoped_id): Fail to find an identifier in the global
8808 namespace if its still anticipated.
8809
8810 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8811
8812 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
8813 * cp-tree.h (cp_make_lang_type): Rename.
8814 * lex.c (cp_make_lang_type): Rename.
8815 (make_aggr_type): Update.
8816 * tree.c (init_tree): Don't set make_lang_type_fn.
8817
8818 2002-03-29 Jakub Jelinek <jakub@redhat.com>
8819
8820 PR c++/6073
8821 * class.c (finish_struct_1): Update static field's DECL_MODE even
8822 if its type is a variant of t.
8823
8824 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8825
8826 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
8827 * cp-tree.h (cxx_insert_default_attributes): New.
8828 * decl.c (insert_default_attributes): Rename.
8829
8830 2002-03-27 Mark Mitchell <mark@codesourcery.com>
8831
8832 PR c++/4884
8833 * call.c (build_op_delete_call): Allow for the fact the placement
8834 may be a COMPOUND_EXPR.
8835
8836 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8837
8838 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8839 * cp-tree.h (init_cplus_expand): Remove.
8840 (cxx_expand_expr): New.
8841 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
8842 fix prototype.
8843 (init_cplus_expand): Remove.
8844 * lex.c (cxx_init): Don't call init_cplus_expand.
8845
8846 2002-03-26 Mark Mitchell <mark@codesourcery.com>
8847
8848 PR c++/4884.
8849 * init.c (build_new_1): Allow for the fact the result of
8850 build_function_call may be a COMPOUND_EXPR.
8851
8852 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
8853
8854 PR c++/5682
8855 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
8856 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8857 (dfs_skip_nonprimary_vbases_markedp): Remove.
8858 * search.c (get_shared_vbase_if_not_primary): Remove.
8859 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8860 (dfs_skip_nonprimary_vbases_markedp): Remove.
8861 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
8862 (dfs_marked_real_bases_queue_p): Likewise.
8863
8864 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8865
8866 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8867 * cp-tree.h (cxx_mark_tree): New.
8868 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
8869
8870 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8871
8872 * cp-tree.h (cxx_maybe_build_cleanup): New.
8873 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
8874 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
8875 * tree.c (build_target_expr): Update.
8876 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
8877
8878 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
8879
8880 * decl2.c (cxx_decode_option): Handle -E.
8881 * lang-specs.h (default_compilers): Preprocess with cc1plus.
8882 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
8883
8884 2002-03-23 Jakub Jelinek <jakub@redhat.com>
8885
8886 PR c++/6037
8887 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
8888
8889 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8890
8891 * error.c (dump_type): Be careful about implicit typenames.
8892
8893 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8894
8895 PR C++/3656
8896 * semantics.c (finish_base_specifier): Handle erronous base
8897 classes.
8898
8899 2002-03-22 Zack Weinberg <zack@codesourcery.com>
8900
8901 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
8902 REAL_IS_NOT_DOUBLE.
8903
8904 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
8905
8906 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
8907 an index into the vtable_entry array regardless of
8908 TARGET_PTRMEMFUNC_VBIT_LOCATION.
8909
8910 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
8911
8912 * tree.c (cp_cannot_inline_tree_fn): Same.
8913
8914 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
8915
8916 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8917 insert_block, getdecls, global_bindings_p): New.
8918
8919 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
8920
8921 PR c++/4361
8922 * mangle.c (struct globals) Add internal_mangling_p member.
8923 (write_template_param): Do internal mangling, if needed.
8924 (mangle_conv_op_name_for_type): Request internal mangling.
8925
8926 2002-03-20 Jason Merrill <jason@redhat.com>
8927
8928 PR c++/2136
8929 * init.c (build_delete): Check access for a member op delete here.
8930 * decl2.c (delete_sanity): Not here.
8931
8932 2002-03-19 Jason Merrill <jason@redhat.com>
8933
8934 PR c++/5118
8935 * class.c (get_vfield_name): Use the constructor_name.
8936
8937 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
8938
8939 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8940 * cp-tree.h (lang_printable_name): Rename.
8941 * error.c (lang_decl_name): Use new hook.
8942 * lex.c (cxx_init): Remove old hook.
8943 * pt.c (tsubst_decl): Use new hook.
8944 * tree.c (lang_printable_name): Rename.
8945
8946 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
8947
8948 PR c++/3882
8949 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
8950 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
8951 only after recording the declaration.
8952
8953 2002-03-18 Jason Merrill <jason@redhat.com>
8954
8955 PR c++/2039
8956 * init.c (resolve_offset_ref): Hand off to build_component_ref.
8957
8958 PR c++/4222, c++/5995
8959 * call.c (build_over_call): Fix empty class logic.
8960
8961 PR c++/3870
8962 * cp-tree.h (struct saved_scope): Add last_parms field.
8963 * decl.c (maybe_push_to_top_level): Save last_function_parms.
8964 (pop_from_top_level): Restore it.
8965
8966 PR c++/4377
8967 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
8968 NON_LVALUE_EXPRs.
8969
8970 PR c++/4003
8971 * pt.c (tsubst_friend_function): Use decl_namespace_context.
8972
8973 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
8974 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
8975 type with a nontrivial destructor.
8976
8977 2002-03-17 Jason Merrill <jason@redhat.com>
8978
8979 PR c++/4460
8980 * class.c (build_base_path): Virtual base layout is fixed in
8981 in-charge [cd]tors.
8982
8983 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8984
8985 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8986 * parse.y (yyparse): Remove macro.
8987
8988 2002-03-17 Jason Merrill <jason@redhat.com>
8989
8990 PR c++/5757
8991 * init.c (build_new_1): Pass the right pointer to op delete.
8992
8993 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
8994
8995 PR c++/4361
8996 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
8997 conversion operators go.
8998 (struct lang_decl_flags): Add template_conv_p and unused
8999 bitfields.
9000 (DECL_TEMPLATE_CONV_FN_P): New macro.
9001 * call.c (build_user_type_conversion_1): Don't check second type
9002 conversion of overload set first.
9003 * class.c (add_method): Make sure templated conversion operators
9004 all end up on slot 2.
9005 * lex.c (do_identifier): A conversion operator token might be
9006 satisfied by a templated conversion operator.
9007 * pt.c (check_explicit_specialization): Use
9008 CLASSTYPE_FIRST_CONVERSION_SLOT.
9009 (template_parm_this_level_p): New function.
9010 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9011 * search.c (lookup_fnfields_1): Template conversions will be on
9012 the first slot.
9013 * typeck.c (build_component_ref): Preserve the type of an
9014 conversion operator name on the overload type.
9015 (build_x_function_call): Retrieve the conversion operator name.
9016
9017 2002-03-15 Richard Henderson <rth@redhat.com>
9018
9019 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9020
9021 2002-03-15 Mark Mitchell <mark@codesourcery.com>
9022
9023 * cp-tree.h (CLEANUP_DECL): Remove.
9024 (CLEANUP_EXPR): Likewise.
9025 * decl.c (destroy_local_var): Simplify.
9026 (maybe_build_cleanup): Tidy.
9027 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9028 * semantics.c (cp_expand_stmt): Likewise.
9029 * cp/tree.c (cp_statement_code_p): Likewise.
9030
9031 2002-03-15 Jason Merrill <jason@redhat.com>
9032
9033 PR c++/5857
9034 * decl.c (duplicate_decls): Use merge_types instead of common_type.
9035 * typeck.c (common_type): Just hand off to
9036 type_after_usual_arithmetic_conversions and
9037 composite_pointer_type.
9038 (merge_types): New fn.
9039 (commonparms): Use it instead of common_type.
9040 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9041 (composite_pointer_type): Also handle attributes.
9042 * cp-tree.h: Declare merge_types.
9043
9044 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9045 variables.
9046 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9047
9048 2002-03-14 Richard Henderson <rth@redhat.com>
9049
9050 * decl.c: Include c-pragma.h.
9051 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
9052 * Make-lang.in: Update dependencies.
9053
9054 2002-03-14 Jakub Jelinek <jakub@redhat.com>
9055
9056 PR c++/5908
9057 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
9058 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
9059
9060 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
9061
9062 * mangle.c (write_builtin_type): Handle 128-bit integers even if
9063 they are not a standard integer type.
9064
9065 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
9066
9067 * cp-tree.h (init_init_processing): Remove declaration.
9068 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
9069 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
9070
9071 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9072
9073 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
9074 Define.
9075 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
9076 tree_code_length.
9077 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
9078 cplus_tree_code_name): Delete.
9079 (cxx_init): Don't call add_c_tree_codes, instead set
9080 lang_unsafe_for_reeval. Don't try to copy into the various
9081 tree_code arrays.
9082
9083 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
9084
9085 PR c++/5659
9086 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
9087 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
9088 definitions.
9089
9090 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
9091
9092 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
9093 DR209 is now not a defect.
9094 * cp-tree.h (skip_type_access_control): Remove.
9095 * decl.c (grokdeclarator): Do type access control for friend
9096 declarations.
9097 * semantics.c (decl_type_access_control): Don't reset
9098 current_type_lookups.
9099 (save_type_access_control): Always save the lookups.
9100 (skip_type_access_control): Remove.
9101 (finish_class_definition): Don't change type_lookups.
9102
9103 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
9104
9105 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
9106 It is incorrect.
9107 * typeck.c (build_static_cast): Compare non-qualified types
9108 with pointer to member conversions.
9109
9110 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
9111 Daniel Berlin <dan@dberlin.org>
9112
9113 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
9114 (cxx_get_alias_set): Use it.
9115
9116 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9117
9118 * cp-tree.h (stabilize_expr): Prototype.
9119
9120 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
9121
9122 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
9123 conditional return void.
9124
9125 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
9126
9127 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
9128 * cp-tree.h (cxx_unsave): New.
9129 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
9130 (init_tree): Update.
9131
9132 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9133
9134 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
9135 explicit sizeof/sizeof.
9136 * decl2.c (cxx_decode_option): Likewise.
9137 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9138
9139 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
9140
9141 PR c++/775
9142 * decl.c (lookup_tag): Only reject enum/class mismatch, not
9143 class/union mismatch.
9144 * parse.y (check_class_key): New function.
9145 (structsp): Call it.
9146
9147 2002-03-01 Michael Matz <matz@suse.de>
9148
9149 * typeck.c (cp_pointer_int_sum): Complete inner type which is
9150 used later by size_in_bytes().
9151
9152 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
9153
9154 * cp-tree.h: Require __GNUC__ to be #defined.
9155 (build_init): Add missing prototype.
9156
9157 2002-03-01 Jason Merrill <jason@redhat.com>
9158
9159 * except.c: Don't include decl.h or obstack.h. Do include
9160 tree-inline.h.
9161 (build_throw): Destroy temporaries from the thrown
9162 expression before calling __cxa_throw. Construct a thrown
9163 temporary directly into the exception object.
9164 (stabilize_throw_expr): New function.
9165 (wrap_cleanups_r): New function.
9166 * tree.c (stabilize_expr): New function.
9167 * init.c (build_init): New function.
9168 * Make-lang.in (cp/except.o): Adjust .h deps.
9169
9170 2002-02-28 Jason Merrill <jason@redhat.com>
9171
9172 * search.c (lookup_base_r): Don't clear is_non_public just because
9173 we found a friendly scope.
9174
9175 * decl.c (finish_function): Only warn about missing return
9176 statement with -Wreturn-type.
9177
9178 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9179
9180 * class.c (build_clone): Update.
9181 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9182 * cp-tree.h (cxx_dup_lang_specific_decl): New.
9183 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9184 (copy_decl): Update.
9185 * method.c (make_thunk): Update.
9186
9187 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9188
9189 * decl2.c: Delete traditional-mode-related code copied from
9190 the C front end but not used, or used only to permit the
9191 compiler to link.
9192
9193 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
9194
9195 PR c++/4093
9196 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9197 to void.
9198
9199 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9200
9201 PR other/5746
9202 * semantics.c (finish_switch_cond): Don't call get_unwidened
9203 if error_mark_node.
9204
9205 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
9206
9207 PR c++/2645, DR 295
9208 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9209 tf_keep_type_decl.
9210 (make_typename_type): Use tsubst_flags_t.
9211 * decl.c (make_typename_type): Adjust. Return non-artificial
9212 TYPE_DECLs, if required.
9213 (grokdeclarator): Simplify CVR qualification handling. Allow bad
9214 qualifiers on typedef types.
9215 * decl2.c (handle_class_head): Adjust make_typename_type call.
9216 * parse.y (nested_name_specifier): Likewise.
9217 (typename_sub0): Likewise.
9218 (typename_sub1): Likewise.
9219 * pt.c (convert_template_argument): Adjust make_typename_type
9220 return value.
9221 (tsubst): Adjust cp_build_qualified_type_real calls.
9222 (check_cv_quals_for_unify): Cope with allowing bad qualifications
9223 on template type parms.
9224 (instantiate_decl): Recheck substitutions to give warnings on bad
9225 qualifications.
9226 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9227
9228 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
9229
9230 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9231
9232 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9233 unless DECL_ALWAYS_INLINE.
9234
9235 2002-02-20 Jakub Jelinek <jakub@redhat.com>
9236
9237 * typeck.c (cp_pointer_int_sum): Renamed from
9238 pointer_int_sum, call pointer_int_sum.
9239
9240 2002-02-20 Jakub Jelinek <jakub@redhat.com>
9241
9242 * decl.c (duplicate_decls): Return 0 if issued error about
9243 redeclaration.
9244
9245 2002-02-19 Jason Merrill <jason@redhat.com>
9246
9247 ABI change: Mangle `void (A::*)() const' as
9248 M1AKFvvE, not MK1AFvvE.
9249 * mangle.c (write_function_type): Write cv-quals for member
9250 function type here.
9251 (write_pointer_to_member_type): Not here.
9252
9253 2002-02-18 Jason Merrill <jason@redhat.com>
9254
9255 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9256 (do_decl_instantiation): Likewise.
9257
9258 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
9259
9260 PR c++/5685
9261 * decl.c (duplicate_decls): Make warning unconditional
9262 if duplicate default argument declarations are present.
9263
9264 2002-02-17 Jakub Jelinek <jakub@redhat.com>
9265
9266 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9267 shortening.
9268
9269 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
9270
9271 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9272 remove incorrect comment. Move #if 0'd code to common path. Use
9273 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9274
9275 2002-02-13 Jason Merrill <jason@redhat.com>
9276
9277 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9278 (finish_function): Don't warn if current_function_returns_null.
9279
9280 * typeck2.c (digest_init): Do handle values of vector type.
9281
9282 * typeck2.c (digest_init, process_init_constructor): Treat vectors
9283 like arrays.
9284
9285 2002-02-11 Jason Merrill <jason@redhat.com>
9286
9287 * parse.y (reserved_declspecs): Don't handle attributes.
9288 (reserved_typespecquals): Handle them here.
9289 * Make-lang.in (parse.c): Adjust expected conflicts.
9290
9291 2002-02-08 Jakub Jelinek <jakub@redhat.com>
9292
9293 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9294 instead of compstmt.
9295 (compstmt_or_stmtexpr): Renamed from compstmt.
9296 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9297
9298 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
9299
9300 Rename instantiate_type_flags to tsubst_flags_t & expand use.
9301 * cp-tree.h (instantiate_type_flags): Rename to ...
9302 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9303 add tf_warning flag.
9304 (instantiate_type): Adjust prototype.
9305 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9306 do_type_instantiation, cp_build_qualified_type_real): Likewise.
9307 cp_build_qualified_type: Adjust.
9308 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9309 tf_*.
9310 * call.c (standard_conversion): Rename itf_* to tf_*.
9311 (reference_binding): Likewise.
9312 (convert_like_real): Likewise.
9313 * cvt.c (cp_convert_to_pointer): Likewise.
9314 (convert_to_reference): Likewise.
9315 * decl.c (lookup_namespace_name): Use tf_* flags.
9316 (make_typename_type): Likewise.
9317 (grokdeclarator): Likewise.
9318 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9319 (coerce_template_template_parms, convert_template_argument,
9320 coerce_template_parms, maybe_get_template_decl_from_type_decl,
9321 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9322 instantiate_class_template, tsubst_template_arg_vector,
9323 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9324 tsubst_decl, tsubst_arg_types, tsubst_function_type,
9325 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9326 instantiate_template, fn_type_unification,
9327 resolve_overloaded_unification, verify_class_unification,
9328 unify, get_bindings_real, do_type_instantiation,
9329 regenerate_decl_from_template, instantiate_decl,
9330 tsubst_initializer_list, tsubst_enum,
9331 get_mostly_instantiated_function_type,
9332 invalid_nontype_parm_type_p): Likewise.
9333 * tree.c (cp_build_qualified_type_real): Likewise.
9334 * typeck.c (build_binary_op): Rename itf_* to tf_*.
9335 (build_ptrmemfunc): Likewise.
9336 (convert_for_assignment): Likewise.
9337
9338 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
9339
9340 PR c++/109
9341 * decl.c (grokdeclarator): Allow friend declarations from
9342 dependent types.
9343 * decl2.c (handle_class_head): Don't push into template parm contexts.
9344 * pt.c (push_template_decl_real): Template parm contexts are never
9345 being defined.
9346
9347 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
9348
9349 * class.c: Include target.h.
9350 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9351 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9352 bit-field layout.
9353 * Make-lang.in: Adjust deps.
9354
9355 2002-02-05 Jason Merrill <jason@redhat.com>
9356
9357 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9358
9359 2002-02-04 Jakub Jelinek <jakub@redhat.com>
9360
9361 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9362 (finish_switch_cond): Set SWITCH_TYPE.
9363
9364 2002-02-04 Richard Henderson <rth@redhat.com>
9365
9366 * method.c (use_thunk): Always initialize the block tree. Reindent.
9367 * semantics.c (expand_body): Emit thunks after function, not before.
9368
9369 2002-02-04 Jason Merrill <jason@redhat.com>
9370
9371 * decl.c (start_function): Call cplus_decl_attributes immediately
9372 after grokdeclarator.
9373
9374 * decl.c (start_function): Combine DECL_RESULT handling code.
9375
9376 2002-02-03 Jason Merrill <jason@redhat.com>
9377
9378 * xref.c: Remove.
9379 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
9380 (cp/xref.o): Remove dependencies.
9381 * class.c (finish_struct_1, check_methods): Don't call xref fns.
9382 (finish_struct_1): Likewise.
9383 * friend.c (make_friend_class): Likewise.
9384 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
9385 * spew.c (read_process_identifier): Likewise.
9386
9387 2002-02-01 Jason Merrill <jason@redhat.com>
9388
9389 PR c++/4872
9390 * decl.c (finish_function): Warn about a non-void function with
9391 no return statement and no abnormal exit.
9392 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
9393 (current_function_returns_abnormally): New macro.
9394 * call.c (build_call): Set it.
9395
9396 * typeck.c (build_component_ref): Always complain about offsetof
9397 constructs on non-PODs. Only make it an error for members of
9398 virtual bases.
9399
9400 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
9401 (dump_function_decl): Always dump parms.
9402
9403 * decl2.c (finish_static_data_member_decl): Complain about a local
9404 class with a static data member.
9405
9406 PR c++/4286
9407 * search.c (lookup_field_1): Don't xref a static data member
9408 just because we looked it up.
9409
9410 2002-01-31 Jason Merrill <jason@redhat.com>
9411
9412 * Make-lang.in (parse.c): Handle .output file.
9413
9414 PR c++/3395
9415 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
9416 not TREE_TYPE.
9417 * semantics.c (finish_class_definition): Adjust.
9418
9419 Allow attributes in parms and casts.
9420 * parse.y (named_parm): Don't strip attrs.
9421 (declmods): Remove 'attributes' production.
9422 (nonempty_cv_qualifiers): Accept attributes.
9423 (ATTRIBUTE): Give precedence.
9424 * decl.c (groktypename): Handle attributes.
9425 (grokparms): Likewise.
9426
9427 2002-01-29 Jakub Jelinek <jakub@redhat.com>
9428
9429 * decl2.c (cxx_decode_option): Pass 0 as last argument to
9430 cpp_handle_option.
9431 * lang-specs.h: Use cpp_unique_options instead of cpp_options
9432 when used together with cc1_options.
9433
9434 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
9435
9436 PR c++/5132
9437 * typeck2.c (digest_init): Make sure non-array core type is
9438 instantiated.
9439 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
9440 constructor, rather than build a new one.
9441 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
9442 PURPOSE of constructor elts.
9443
9444 2002-01-23 Zack Weinberg <zack@codesourcery.com>
9445
9446 * Make-lang.in (parse.c): Adjust expected number of
9447 shift-reduce conflicts.
9448 (decl.o): Depend on diagnostic.h.
9449 * decl.c: Include diagnostic.h.
9450 (grokdeclarator): Check for null pointer.
9451 (finish_function): Don't abort when
9452 current_binding_level->parm_flag != 1, if errors have
9453 occurred; throw away the statement tree and extra binding
9454 levels, and continue.
9455 * lex.c (note_list_got_semicolon): Check for null pointer.
9456 * method.c (hack_identifier): Just return error_mark_node if
9457 value is error_mark_node.
9458 * parse.y (primary: TYPEID(type_id)): No need to use
9459 TYPE_MAIN_VARIANT here.
9460 (handler_seq): Accept an empty list of catch clauses and
9461 generate a fake handler block to avoid later crashes.
9462 (ansi_raise_identifier): Accept the error token too.
9463 * semantics.c (begin_class_definition,
9464 finish_class_definition): Check for error_mark_node.
9465
9466 2002-01-23 Zack Weinberg <zack@codesourcery.com>
9467
9468 * typeck2.c (friendly_abort): Delete definition.
9469 * cp-tree.h (friendly_abort): Don't prototype.
9470 (my_friendly_assert): Use fancy_abort.
9471
9472 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
9473
9474 * cp-tree.h (my_friendly_abort): Remove.
9475
9476 2002-01-23 Jakub Jelinek <jakub@redhat.com>
9477
9478 * spew.c (pending_inlines, pending_inlines_tail,
9479 processing_these_inlines): Make static.
9480 (mark_pending_inlines): Remove static.
9481 (begin_parsing_inclass_inline): If in function, save pi
9482 for GC to cp_function_chain->unparsed_inlines instead.
9483 (process_next_inline): Likewise.
9484 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
9485 (mark_pending_inlines): Add prototype.
9486 * decl.c (spew_debug): Remove unused extern.
9487 (mark_lang_function): Call mark_pending_inlines.
9488
9489 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
9490
9491 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
9492 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
9493 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
9494 Change my_fancy_abort() to abort().
9495
9496 2002-01-23 Jason Merrill <jason@redhat.com>
9497
9498 PR c++/5453
9499 * class.c (fixed_type_or_null): Fix thinko.
9500
9501 PR c++/3331
9502 * init.c (resolve_offset_ref): Use build_indirect_ref.
9503
9504 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
9505
9506 2002-01-22 Jason Merrill <jason@redhat.com>
9507
9508 * parse.y (function_body): Suppress the block for the outermost
9509 curly braces.
9510 * decl.c (pushdecl): Don't try to skip it.
9511 (begin_function_body): Keep the block we create, not the next one.
9512 * init.c (emit_base_init): Don't mess with keep_next_level.
9513
9514 * class.c (build_base_path): Tweak formatting.
9515
9516 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
9517
9518 Fix regression introduced with patch for c++/775
9519 * parse.y (class_head_defn): Check for template specializations
9520 with a different class-key.
9521
9522 2002-01-17 Jason Merrill <jason@redhat.com>
9523
9524 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
9525 (begin_function_body): Call them and keep_next_level.
9526 * init.c (emit_base_init): Call keep_next_level.
9527 * semantics.c (setup_vtbl_ptr): Lose.
9528 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
9529 (vtbls_set_up_p): Lose.
9530 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
9531 * method.c (do_build_copy_constructor): Likewise.
9532 (synthesize_method): Call finish_mem_initializers.
9533 * parse.y (nodecls): Likewise.
9534
9535 * error.c (dump_type_suffix): Print the exception specs before
9536 recursing.
9537 (dump_function_decl): Here, too.
9538
9539 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
9540
9541 2002-01-10 Ira Ruben <ira@apple.com>
9542
9543 PR c++/907
9544 * decl.c (start_method): Handle attrlist.
9545
9546 2002-01-10 Jakub Jelinek <jakub@redhat.com>
9547
9548 * decl2.c (max_tinst_depth): Increase default limit to 500.
9549
9550 2002-01-10 Graham Stott <grahams@redhat.com>
9551
9552 * spew.c (YYCHAR): Uppercase macro parameter and add
9553 parenthesis.
9554 (YYCODE): Likewise.
9555 (NAME): Uppercase macro parameter.
9556
9557 2002-01-09 Graham Stott <grahams@redhat.com>
9558
9559 * decl.h (grokdeclarator): Wrap long line.
9560
9561 * semantics.c (FINISH_COND): Uppercase macro paramaters and
9562 add parenthesis.
9563
9564 2002-01-08 Graham Stott <grahams@redhat.com>
9565
9566 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
9567 (PALLOC): Uppercase macro parameter and whitespace.
9568 (SALLOC): Uppercase macro parameter.
9569 (SFREE): Uppercase macros parameter, add parenthese and
9570 whitespace.
9571 (STREQL): Uppercase macro parameter and whitespace.
9572 (STRNEQ): Likewise.
9573 (STRLSS): Likewise.
9574 (STRLEQ): Likewise.
9575 (STRGTR): Likewise.
9576 (STRGEQ): Likewise.
9577
9578 * call.c (convert_like): Add parenthesis and wrap.
9579 (convert_like_with_context): Likewise.
9580 (ICS_RANK): Whitespace.
9581 (NEED_TEMPORARY_P): Remove parenthesis.
9582
9583 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
9584 whitespace.
9585 (VTT_MARKED_BINFO_P): Likewise.
9586
9587 * decl.c (BINDING_LEVEL): Add parenthesis.
9588 (DEF_OPERATOR): Likewise.
9589
9590 * mangle.c (MANGLE_TRACE): Add parenthesis.
9591 (MANGLE_TRACE_TREE): Likewise.
9592 (write_signed_number): Likewise.
9593 (write_unsigned_number): Likewise.
9594
9595 * pt.c (ccat): Uppercase macro parameter.
9596 (cat): Likewise
9597
9598 * search.c (SET_BINFO_ACCESS): Add parenthesis.
9599
9600 2002-01-07 Jason Merrill <jason@redhat.com>
9601
9602 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
9603 to pedwarn.
9604
9605 PR c++/3536
9606 * method.c (make_thunk): If !flag_weak, give the thunk the
9607 function's linkage.
9608 (use_thunk): Here, too.
9609
9610 2002-01-07 Graham Stott <grahams@redhat.com>
9611
9612 * error.c: Update copyright date.
9613 (print_scope_operator): Add parenthesis.
9614 (print_left_paren): Likewise.
9615 (print_right_paren): Likewise.
9616 (print_left_bracket): Likewise.
9617 (print_right_bracket): Likewise.
9618 (print_template_argument_list_start): Likewise.
9619 (print_template_argument_list_end): Likewise.
9620 (print_non_consecutive_character): Likewise.
9621 (print_tree_identifier): Likewise.
9622 (print_identifier): Likewise.
9623 (NEXT_CODE): Uppercase macro parameter.
9624 (ident_fndecl): Delete unused.
9625 (GLOBAL_THING): Likewise.
9626
9627 2002-01-06 Graham Stott <grahams@redhat.com>
9628
9629 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
9630 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
9631 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
9632 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
9633 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
9634 (C_IS_RESERVED_WORD): Uppercase macro parameter.
9635 (C_RID_YYCODE) Likewise.
9636 (ptrmem_cst): Use rtx.
9637 (LOCAL_BINDING_P): Add whitespace.
9638 (INHERITED_VALUE_BINDING_P): Likewise.
9639 (BINDING_SCOPE): Wrap long line.
9640 (BINDING_HAS_LEVEL_P): Remove parenthesis.
9641 (BINDING_VALUE): Wrap long line.
9642 (BINDING_TYPE): Whitespace.
9643 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
9644 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
9645 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
9646 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
9647 (same_type_p): Uppercase macro parameters.
9648 (same_type_ignoring_top_level_qualifiers_p): Likewise.
9649 (OVL_FUNCTION): Wrap long line.
9650 (OVL_CHAIN): Whitespace.
9651 (OVL_CURRENT): Add parenthesis and whitespace.
9652 (OVL_NEXT): Whitespace.
9653 (OVL_USED): Likewise.
9654 (IDENTIFIER_TYPE_VALUE): Likewise.
9655 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
9656 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
9657 (LANG_ID_FIELD): Whitespace.
9658 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
9659 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
9660 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
9661 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
9662 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
9663 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
9664 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
9665 (IDENTIFIER_VIRTUAL_P): Likewise.
9666 (IDENTIFIER_OPNAME_P): Likewise.
9667 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
9668 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
9669 (C_SET_EXP_ORIGINAL_CODE): Likewise.
9670 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
9671 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
9672 (IS_AGGR_TYPE): Uppercase macro parameter.
9673 (CLASS_TYPE_P): Likewise.
9674 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
9675 (IS_AGGR_TYPE_2): Whitespace.
9676 (TAGGED_TYPE_P): Uppercase macro parameter.
9677 (TYPE_BUILT_IN): Whitespace.
9678 (TYPE_FOR_JAVA): Likewise.
9679 (FUNCTION_ARG_CHAIN): Remove parenthesis.
9680 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
9681 (FUNCTION_FIRST_USER_PARAM): Likewise.
9682 (PROMOTES_TO_AGGR_TYPE): Whitespace.
9683 (DERIVED_FROM_P): Add parenthesis and wrap.
9684 (UNIQUELY_DERIVED_FROM_P): Likewise.
9685 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
9686 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
9687 (CLASSTYPE_USE_TEMPLATE): Whitespace.
9688 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
9689 (TYPE_GETS_DELETE): Add parenthesis.
9690 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
9691 (TYPE_HAS_ASSIGN_REF): Likewise,
9692 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
9693 (TYPE_HAS_INIT_REF): Likewise.
9694 (TYPE_HAS_CONST_INIT_REF): Likewise.
9695 (TYPE_BEING_DEFINED): Likewise.
9696 (TYPE_LANG_SPECIFIC): Likewise.
9697 (CLASSTYPE_RTTI): Likewise.
9698 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
9699 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
9700 (TYPE_OVERLOADS_ARROW): Likewise.
9701 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
9702 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
9703 (CLASSTYPE_METHOD_VEC): Likewise.
9704 (CLASSTYPE_MARKED_N): Likewise.
9705 (CLASSTYPE_MARKED): Likewise.
9706 (CLASSTYPE_MARKED2): Likewise.
9707 (CLASSTYPE_MARKED3): Likewise.
9708 (CLASSTYPE_MARKED4): Likewise.
9709 (CLASSTYPE_MARKED5): Likewise.
9710 (CLASSTYPE_MARKED6): Likewise.
9711 (SET_CLASSTYPE_MARKED): Whitespace.
9712 (CLEAR_CLASSTYPE_MARKED): Likewise.
9713 (SET_CLASSTYPE_MARKED2): Likewise.
9714 (CLEAR_CLASSTYPE_MARKED2): Likewise.
9715 (SET_CLASSTYPE_MARKED3): Likewise.
9716 (CLEAR_CLASSTYPE_MARKED3): Likewise.
9717 (SET_CLASSTYPE_MARKED4): Likewise.
9718 (CLEAR_CLASSTYPE_MARKED4): Likewise.
9719 (SET_CLASSTYPE_MARKED5): Likewise.
9720 (CLEAR_CLASSTYPE_MARKED5): Likewise.
9721 (SET_CLASSTYPE_MARKED6): Likewise.
9722 (CLEAR_CLASSTYPE_MARKED6): Likewise.
9723 (CLASSTYPE_TAGS): Likewise.
9724 (CLASSTYPE_VSIZE): Likewise.
9725 (CLASSTYPE_VBASECLASSES): Likewise.
9726 (CANONICAL_BINFO): Add parenthesis.
9727 (CLASSTYPE_SIZE(NODE): Likewise.
9728 (CLASSTYPE_SIZE_UNIT): Likewise.
9729 (CLASSTYPE_ALIGN(NODE): Likewise.
9730 (CLASSTYPE_USER_ALIGN): Likewise.
9731 (TYPE_JAVA_INTERFACE): Likewise.
9732 (CLASSTYPE_PURE_VIRTUALS): Likewise.
9733 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
9734 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
9735 (CLASSTYPE_HAS_MUTABLE): Likewise.
9736 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
9737 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
9738 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
9739 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
9740 (CLASSTYPE_INTERFACE_ONLY): Likewise.
9741 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9742 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9743 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9744 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9745 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9746 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
9747 (BINFO_UNSHARED_MARKED): Whitespace.
9748 (BINFO_MARKED): Whitespace and wrap.
9749 (SET_BINFO_MARKED): Likewise.
9750 (CLEAR_BINFO_MARKED): Likewise.
9751 (BINFO_VTABLE_PATH_MARKED): Likewise.
9752 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
9753 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
9754 (BINFO_SUBVTT_INDEX): Remove parenthesis.
9755 (BINFO_VPTR_INDEX): Likewise.
9756 (BINFO_PRIMARY_BASE_OF): Likewise,
9757 (CLASSTYPE_VFIELDS): Whitespace.
9758 (VF_DERIVED_VALUE): Wrap long line.
9759 (NAMESPACE_LEVEL): Whitespace.
9760 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
9761 (DEFARG_POINTER): Whitespace.
9762 (DECL_NEEDED_P): Remove parenthesis.
9763 (DECL_LANGUAGE): Whitespace.
9764 (SET_DECL_LANGUAGE): Add parenthesis.
9765 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
9766 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
9767 (DECL_IN_AGGR_P): Whitespace.
9768 (DECL_FRIEND_P): Likewise.
9769 (DECL_BEFRIENDING_CLASSES): Likewise.
9770 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
9771 (DECL_NONCONVERTING_P): Whitespace.
9772 (DECL_PURE_VIRTUAL_P): Likewise.
9773 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
9774 (DECL_PENDING_INLINE_INFO): Whitespace.
9775 (DECL_SORTED_FIELDS): Likewise.
9776 (DECL_DEFERRED_FN): Likewise.
9777 (DECL_TEMPLATE_INFO): Likewise.
9778 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
9779 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
9780 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
9781 (TMPL_ARGS_LEVEL): Likewise.
9782 (SET_TMPL_ARGS_LEVEL): Likewise.
9783 (INNERMOST_TEMPLATE_PARMS): Whitespace.
9784 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
9785 (INTEGRAL_CODE_P(CODE): Add parenthesis.
9786 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
9787 (TYPE_HAS_CONSTRUCTOR): Whitespace.
9788 (TREE_HAS_CONSTRUCTOR): Likewise.
9789 (TYPE_HAS_DESTRUCTOR): Likewise.
9790 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
9791 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
9792 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
9793 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
9794 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
9795 (TYPE_PTRMEMFUNC_P): Likewise.
9796 (TYPE_PTRMEMFUNC_FLAG): Likewise.
9797 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
9798 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
9799 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
9800 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
9801 (DECL_ACCESS): Whitespace.
9802 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
9803 (DECL_GLOBAL_DTOR_P): Likewise.
9804 (GLOBAL_INIT_PRIORITY): Likewise.
9805 (DECL_TEMPLATE_PARMS): Likewise.
9806 (DECL_TEMPLATE_RESULT): Likewise.
9807 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
9808 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
9809 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
9810 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
9811 (PRIMARY_TEMPLATE_P): Add parenthesis.
9812 (DECL_USE_TEMPLATE): Whitespace.
9813 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9814 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9815 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9816 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9817 (CALL_DECLARATOR_PARMS): Remove parenthesis.
9818 (CALL_DECLARATOR_QUALS): Likewise.
9819 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
9820 (TEMP_NAME_P): Wrap.
9821 (VFIELD_NAME_P): Likewise.
9822 (B_SET): Uppercase macro parameters and add parenthesis.
9823 (B_CLR): Likewise.
9824 (B_TST): Likewise.
9825 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
9826 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
9827 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
9828 (same_or_base_type_p): Likewise.
9829 (cp_deprecated): Likewise.
9830
9831 2002-01-05 Richard Henderson <rth@redhat.com>
9832
9833 * semantics.c (expand_body): Revert last change.
9834
9835 2002-01-04 Jason Merrill <jason@redhat.com>
9836
9837 PR c++/4122
9838 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
9839 lost primary.
9840
9841 * class.c (build_vtbl_initializer): Check for a lost primary
9842 before calculating the vtable entry to throw away.
9843
9844 2002-01-02 Jason Merrill <jason@redhat.com>
9845
9846 * semantics.c (expand_body): Call outlining_inline_function when
9847 emitting an inline function out of line.
9848
9849 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9850
9851 PR c++/5116, c++/764 reversion
9852 * call.c (build_new_op): Revert the instantiations. They are
9853 incorrect.
9854
9855 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9856
9857 PR c++/5089
9858 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
9859
9860 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9861
9862 PR c++/3716
9863 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
9864 (tsubst, case POINTER_TYPE): Handle pmfs here.
9865 (tsubst, case OFFSET_TYPE): Check it is not an offset to
9866 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
9867
9868 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9869
9870 PR c++/35
9871 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
9872 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
9873 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
9874 PARM_DECL.
9875 (tsubst_template_parms): Break up loop statements.
9876 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
9877 parm PARM_DECLs don't get promoted.
9878
9879 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9880
9881 PR c++/5123
9882 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
9883 (build_x_function_call): Cope with a COMPONENT_REF containing a
9884 TEMPLATE_ID_EXPR.
9885
9886 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9887
9888 PR c++/5213
9889 * pt.c (convert_template_argument): Be more careful determining
9890 when RECORD_TYPE templates are or are not templates.
9891
9892 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9893
9894 PR c++/775
9895 * cp-tree.h (handle_class_head): Adjust prototype.
9896 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
9897 parameters. Use for all class heads.
9898 * parse.y (named_class_head_sans_basetype, named_class_head,
9899 named_complex_class_head_sans_basetype,
9900 named_class_head_sans_basetype_defn,
9901 unnamed_class_head): Remove.
9902 (class_head, class_head_apparent_template): Recognize class heads
9903 (class_head_decl, class_head_defn): New reductions. Process class
9904 heads.
9905 (structsp): Adjust class definition and class declaration
9906 reductions.
9907 (maybe_base_class_list): Give diagnostic on empty list.
9908
9909 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9910
9911 PR c++/4379
9912 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
9913 single non-static member.
9914 (unary_complex_lvalue): If it cannot be a pointer to member, don't
9915 make it so. Check it is not pointer to reference.
9916
9917 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9918
9919 PR c++/5132
9920 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
9921 are processing a template decl.
9922
9923 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9924
9925 PR c++/5116, c++/764
9926 * call.c (build_new_op): Make sure template class operands are
9927 instantiated. Simplify arglist construction.
9928
9929 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9930
9931 * call.c (build_user_type_conversion_1): Use my_friendly_assert
9932 rather than if ... abort.
9933 * cvt.c (convert_to_reference): Likewise.
9934 * semantics.c (setup_vtbl_ptr): Likewise.
9935 * pt.c (lookup_template_class): Comment typo.
9936
9937 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9938
9939 PR c++/5125
9940 * pt.c (push_template_decl_real): Make sure DECL has
9941 DECL_LANG_SPECIFIC.
9942
9943 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9944
9945 PR c++/335
9946 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
9947 for non-reference fields.
9948 * typeck.c (require_complete_type): Use resolve_offset_ref).
9949
9950 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
9951
9952 PR c++/196
9953 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
9954
9955 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
9956
9957 PR c++/160
9958 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
9959 up. Don't stabilize_references when initializing a reference.
9960
9961 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9962
9963 * decl2.c (lang_f_options): Const-ify.
9964
9965 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9966
9967 * config-lang.in (diff_excludes): Remove.
9968
9969 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
9970
9971 PR c++/90
9972 * typeck.c (build_function_call_real): Use original function
9973 expression for errors.
9974
9975 2001-12-18 Jason Merrill <jason@redhat.com>
9976
9977 PR c++/3242
9978 * class.c (add_method): Do compare 'this' quals when trying to match a
9979 used function. Don't defer to another used function.
9980
9981 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9982
9983 * pt.c (instantiate_clone): Remove, fold into ...
9984 (instantiate_template): ... here. Simplify by removing mutual
9985 recursion.
9986 * typeck2.c (build_m_component_ref): Don't cv qualify the function
9987 pointed to by a pointer to function.
9988 * class.c (delete_duplicate_fields_1): Typo.
9989
9990 2001-12-18 Jason Merrill <jason@redhat.com>
9991
9992 C++ ABI change: destroy value arguments in caller.
9993 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
9994 create an extra binding level for the parameters.
9995 * decl.c (store_parm_decls): Don't do parameter cleanups.
9996
9997 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9998
9999 * call.c (build_new_method_call): Use '%#V'.
10000 * error.c (cv_to_string): Use V parameter to determine padding.
10001
10002 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
10003
10004 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10005 spellings in messages.
10006
10007 2001-12-17 Zack Weinberg <zack@codesourcery.com>
10008
10009 * cp-tree.h: Delete #defines for cp_error, cp_warning,
10010 cp_pedwarn, and cp_compiler_error.
10011 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10012 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10013 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10014 typeck2.c: Change calls to the above macros to use their
10015 language-independent equivalents: error, warning, pedwarn, and
10016 internal_error respectively.
10017
10018 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
10019
10020 * decl2.c (finish_file): Remove back_end_hook.
10021
10022 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
10023
10024 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10025 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10026 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10027
10028 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
10029
10030 * lang-options.h: Use American spelling in messages.
10031
10032 2001-12-13 Jason Merrill <jason@redhat.com>
10033
10034 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10035
10036 Use cleanups to run base and member destructors.
10037 * init.c (push_base_cleanups): New function, split out from...
10038 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
10039 * decl.c (finish_destructor_body): Move vbase destruction code to
10040 push_base_cleanups.
10041 (begin_function_body, finish_function_body): New fns.
10042 (finish_function): Move [cd]tor handling and call_poplevel to
10043 finish_function_body.
10044 (pushdecl): Skip the new level.
10045 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10046 (setup_vtbl_ptr): Call push_base_cleanups.
10047 * method.c (synthesize_method): Call {begin,end}_function_body.
10048 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
10049 * cp-tree.h: Declare new fns.
10050 * parse.y (function_body, .begin_function_body): New nonterminals.
10051 (fndef, pending_inline, function_try_block): Use function_body.
10052 (ctor_initializer_opt, function_try_block): No longer has a value.
10053 (base_init): Remove .set_base_init token.
10054 (.set_base_init, compstmt_or_error): Remove.
10055 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
10056
10057 * optimize.c (maybe_clone_body): Fix parameter updating.
10058
10059 2001-12-12 Jason Merrill <jason@redhat.com>
10060
10061 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
10062 * semantics.c (genrtl_start_function): Don't pass
10063 parms_have_cleanups or push an extra binding level.
10064 (genrtl_finish_function): Lose cleanup_label cruft.
10065
10066 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
10067 (ctor_label): Remove.
10068 * semantics.c (finish_return_stmt): Lose ctor_label support.
10069 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
10070 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
10071 dtor_label.
10072
10073 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
10074 check for [cd]tors.
10075 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
10076
10077 * decl.c (finish_function): Check VMS_TARGET, not VMS.
10078
10079 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
10080 (end_cleanup_fn): And poplevel.
10081
10082 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
10083 if we're in a template.
10084
10085 2001-12-12 Jakub Jelinek <jakub@redhat.com>
10086
10087 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
10088 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
10089 THIS_NAME_P): Delete.
10090 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
10091 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
10092 with internal naming scheme.
10093 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
10094
10095 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
10096
10097 * decl.c (grokdeclarator): Deprecated implicit typename use.
10098
10099 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
10100
10101 PR g++/51
10102 * parse.y (frob_specs): Indicate it is a language linkage which
10103 contained the extern.
10104 * decl.c (grokdeclarator): Allow extern language linkage with
10105 other specifiers.
10106
10107 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
10108
10109 PR g++/72
10110 * decl.c (add_binding): Don't reject duplicate typedefs involving
10111 template parameters.
10112
10113 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
10114
10115 * parse.y, semantics.c: Similarly.
10116
10117 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
10118
10119 PR g++/87
10120 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
10121 (copy_args_p): Rename to ...
10122 (copy_fn_p): ... here.
10123 (grok_special_member_properties): New function.
10124 (grok_op_properties): Lose VIRTUALP parameter.
10125 (copy_assignment_arg_p): Remove.
10126 * call.c (build_over_call): Use copy_fn_p.
10127 * decl.c (grokfndecl): Reformat. Adjust call to
10128 grok_op_properties.
10129 (copy_args_p): Rename to ...
10130 (copy_fn_p): ... here. Reject template functions. Check for pass
10131 by value.
10132 (grok_special_member_properties): Remember special functions.
10133 (grok_ctor_properties): Don't remember them here, just check.
10134 (grok_op_properties): Likewise.
10135 (start_method): Call grok_special_member_properties.
10136 * decl2.c (grokfield): Likewise.
10137 (copy_assignment_arg_p): Remove.
10138 (grok_function_init): Don't remember abstract assignment here.
10139 * pt.c (instantiate_class_template): Call
10140 grok_special_member_properties.
10141 (tsubst_decl): Adjust grok_op_properties call.
10142
10143 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
10144
10145 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10146 RID_TYPES_COMPATIBLE_P.
10147
10148 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
10149
10150 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10151 call to build_aggr_init.
10152 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10153
10154 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
10155
10156 * parse.y: Replace uses of the string non-terminal with STRING.
10157 Don't perform string concatentaion here.
10158 (string): Remove non-terminal.
10159 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10160
10161 2001-12-05 Jason Merrill <jason@redhat.com>
10162
10163 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10164 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10165 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10166 * pt.c (push_tinst_level): No longer static.
10167 * cp-tree.h: Declare them.
10168
10169 * init.c (resolve_offset_ref): Don't check access for the base
10170 conversion to access a FIELD_DECL.
10171
10172 * cp-tree.h (TYPE_REFFN_P): New macro.
10173 * decl.c (bad_specifiers): Check it, too.
10174
10175 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10176 on the __*_type_info type if we haven't seen a definition.
10177
10178 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
10179
10180 * decl.c: Include c-common.h.
10181 (shadow_warning): Move to c-common.c.
10182
10183 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10184
10185 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10186
10187 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
10188
10189 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10190
10191 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
10192
10193 PR g++/164
10194 * init.c (sort_base_init): Allow binfos to be directly specified.
10195 * method.c (do_build_copy_constructor): Explicitly convert to the
10196 base instance.
10197 (do_build_assign_ref): Likewise.
10198
10199 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
10200
10201 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10202 declaration and initialization.
10203
10204 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10205
10206 * typeck2.c: Remove leading capital from diagnostic messages, as
10207 per GNU coding standards.
10208
10209 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
10210
10211 PR c++/3394
10212 * decl.c (xref_basetypes): Handle attributes between
10213 'class' and name.
10214
10215 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
10216
10217 PR g++/3381
10218 * parse.y (named_complex_class_head_sans_basetype): Add new
10219 reduction.
10220 * Make-lang.in (parse.c): Adjust expected conflict count.
10221
10222 2001-12-03 Jason Merrill <jason@redhat.com>
10223
10224 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10225 immediate binfos for our virtual bases.
10226
10227 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
10228
10229 * call.c (build_java_interface_fn_ref): Similarly.
10230 * except.c (is_admissible_throw_operand): Similarly.
10231 * init.c (build_java_class_ref): Similarly.
10232 * xref.c (open_xref_file): Similarly.
10233
10234 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10235
10236 * class.c (finish_struct): Remove trailing periods from messages.
10237 * decl.c (check_tag_decl): Similarly.
10238 * lex.c (cxx_set_yydebug): Similarly.
10239 * typeck2.c (friendly_abort): Similarly.
10240
10241 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10242
10243 PR c++/3048
10244 * cp-tree.h (ovl_member): Remove.
10245 * decl2.c (merge_functions): Handle extern "C" functions
10246 specially.
10247 * tree.c (ovl_member): Remove.
10248
10249 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10250
10251 PR c++/4842
10252 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10253 FUNCTION_DECL, as input.
10254 (mark_overriders): Remove.
10255 (warn_hidden): Rework for the new ABI.
10256
10257 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10258
10259 PR c++/3471
10260 * call.c (convert_like_real): Do not build additional temporaries
10261 for rvalues of class type.
10262
10263 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
10264
10265 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10266 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10267 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10268 (DERIVED_FROM_P): Likewise.
10269 (enum base_access): Renumber, add ba_quiet bit mask.
10270 (get_binfo): Remove.
10271 (get_base_distance): Remove.
10272 (binfo_value): Remove.
10273 (ACCESSIBLY_DERIVED_FROM_P): Remove.
10274 * call.c (standard_conversion): Use lookup_base.
10275 * class.c (strictly_overrides): Likewise.
10276 (layout_virtual_bases): Likewise.
10277 (warn_about_ambiguous_direct_bases): Likewise.
10278 (is_base_of_enclosing_class): Likewise.
10279 (add_vcall_offset_vtbl_entries_1): Likewise.
10280 * cvt.c (build_up_reference): Adjust comment.
10281 * init.c (build_member_call): Reformat.
10282 * search.c (get_binfo): Remove.
10283 (get_base_distance_recursive): Remove.
10284 (get_base_distance): Remove.
10285 (lookup_base_r): Tweak.
10286 (lookup_base): Add ba_quiet control. Complete the types here.
10287 (covariant_return_p): Use lookup_base.
10288 * tree.c (binfo_value): Remove.
10289 (maybe_dummy_object): Use lookup_base.
10290 * typeck.c (build_static_cast): Use lookup_base.
10291 (get_delta_difference): Likewise.
10292 * typeck2.c (binfo_or_else): Use lookup_base.
10293 (build_scoped_ref): Add back error_mark_check.
10294 (build_m_component_ref): Use lookup_base.
10295
10296 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10297
10298 * Make-lang.in (c++.generated-manpages): New dummy target.
10299
10300 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10301
10302 * Make-lang.in (cp-lang.o): Depends on c-common.h.
10303 * cp-lang.c (c-common.h): Include.
10304 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10305 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10306 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10307
10308 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
10309
10310 * decl2.c (c_language): Move to c-common.c.
10311 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10312 functions.
10313 (cxx_init): Update.
10314
10315 2001-11-26 Jason Merrill <jason@redhat.com>
10316
10317 * call.c (joust): Remove COND_EXPR hack.
10318
10319 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
10320
10321 * search.c (lookup_base_r): Declare bk in variable declaration
10322 space.
10323
10324 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
10325
10326 PR g++/3145
10327 * class.c (build_vbase_pointer): Remove.
10328 (build_vbase_path): Remove.
10329 (build_base_path): New function.
10330 * cp-tree.h (base_access, base_kind): New enumerations.
10331 (build_base_path): Declare.
10332 (convert_pointer_to_real): Remove.
10333 (convert_pointer_to): Remove.
10334 (lookup_base): Declare.
10335 (convert_pointer_to_vbase): Remove.
10336 * call.c (build_scoped_method_call): Use lookup_base &
10337 build_base_path instead of convert_pointer_to_real,
10338 get_base_distance & get_binfo.
10339 (build_over_call): Likewise.
10340 * cvt.c (cp_convert_to_pointer): Likewise.
10341 (convert_to_pointer_force): Likewise.
10342 (build_up_reference): Likewise.
10343 (convert_pointer_to_real): Remove.
10344 (convert_pointer_to): Remove.
10345 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10346 instead of convert_pointer_to_vbase & build_vbase_path.
10347 (emit_base_init): Use build_base_path instead of
10348 convert_pointer_to_real.
10349 (expand_virtual_init): Lose unrequired conversions.
10350 (resolve_offset_ref): Use lookup_base and build_base_path
10351 instead of convert_pointer_to.
10352 * rtti.c (build_dynamic_cast_1): Use lookup_base &
10353 build_base_path instead of get_base_distance & build_vbase_path.
10354 * search.c (get_vbase_1): Remove.
10355 (get_vbase): Remove.
10356 (convert_pointer_to_vbase): Remove.
10357 (lookup_base_r): New function.
10358 (lookup_base): New function.
10359 * typeck.c (require_complete_type): Use lookup_base &
10360 build_base_path instead of convert_pointer_to.
10361 (build_component_ref): Likewise.
10362 (build_x_function_call): Likewise.
10363 (get_member_function_from_ptrfunc): Likewise.
10364 (build_component_addr): Likewise.
10365 * typeck2.c (build_scoped_ref): Likewise.
10366
10367 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10368
10369 * cp-tree.h (CP_TYPE_QUALS): Removed.
10370 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
10371 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
10372 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
10373 * dump.c (cp_dump_tree): Use void* dump_info argument to match
10374 lang-hooks prototype.
10375 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
10376 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
10377 CP_TYPE_QUALS changed to cp_type_quals.
10378 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
10379 (CXX_C_OBJS): Remove c-dump.o.
10380
10381 2001-11-21 Mark Mitchell <mark@codesourcery.com>
10382
10383 PR c++/3637
10384 * pt.c (lookup_template_class): Ensure that all specializations
10385 are registered on the list corresponding to the most general
10386 template.
10387
10388 2001-11-20 Mark Mitchell <mark@codesourcery.com>
10389
10390 * call.c (non_reference): Add documentation.
10391 (convert_class_to_reference): Do not strip reference types
10392 from conversion operators.
10393 (maybe_handle_ref_bind): Simplify.
10394 (compare_ics): Correct handling of references.
10395
10396 2001-11-19 John Wilkinson <johnw@research.att.com>
10397
10398 * dump.c (dump_op): New function.
10399 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
10400 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
10401 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
10402
10403 2001-11-19 Mark Mitchell <mark@codesourcery.com>
10404
10405 PR4629
10406 * semantics.c (finish_sizeof): Make sure that expression created
10407 while processing a template do not have a type.
10408 (finish_alignof): Likewise.
10409 * typeck.c (c_sizeof): Likewise.
10410 (expr_sizeof): Likewise.
10411
10412 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10413
10414 * lex.c (cxx_finish): Call c_common_finish.
10415 (finish_parse): Remove.
10416
10417 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10418
10419 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
10420 when displaying error message about missing array bounds.
10421
10422 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10423
10424 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
10425 CONST_CAST_EXPR.
10426 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
10427
10428 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
10429
10430 * cp-tree.h (print_class_statistics): Restore.
10431
10432 2001-11-15 Jason Merrill <jason@redhat.com>
10433
10434 * method.c (use_thunk): Don't emit debugging information for thunks.
10435
10436 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
10437 * decl.c (make_typename_type): Handle getting a class template.
10438 * search.c (lookup_field_r): A class template is good enough for
10439 want_type.
10440
10441 * call.c (convert_like_real): Only use cp_convert for the bad part.
10442 (standard_conversion): Also allow bad int->enum.
10443 * typeck.c (ptr_reasonably_similar): Also allow functions to
10444 interconvert. Pointers to same-size integers are reasonably
10445 similar.
10446
10447 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
10448 give it void type.
10449
10450 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
10451
10452 PR g++/3154
10453 * init.c (sort_base_init): Remove unreachable code.
10454 (expand_member_init): Adjust comment to reflect reality. Simplify
10455 and remove unreachable code.
10456
10457 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10458
10459 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
10460 (cxx_init): Update prototype.
10461 * decl.c (init_decl_processing): Rename. Move null node init
10462 to its creation time.
10463 * lex.c (cxx_init_options): Update.
10464 (cxx_init): Combine with old init_parse; also call
10465 cxx_init_decl_processing.
10466
10467 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
10468
10469 * decl.c (check_initializer): Try to complete the type of an
10470 array element before checking whether it's complete. Don't
10471 complain about arrays with complete element types but an
10472 unknown size.
10473 (cp_finish_decl): Build the hierarchical constructor before
10474 calling maybe_deduce_size_from_array_init.
10475
10476 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
10477
10478 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
10479
10480 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
10481
10482 PR g++/4206
10483 * parse.y (already_scoped_stmt): Remove.
10484 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
10485
10486 2001-11-12 H.J. Lu <hjl@gnu.org>
10487
10488 * cvt.c (ocp_convert): Don't warn the address of a weak
10489 function is always `true'.
10490
10491 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10492
10493 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
10494 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
10495 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
10496 * cp-tree.h (print_class_statistics): Remove.
10497 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
10498 cxx_print_identifier, cxx_set_yydebug): New.
10499 * lex.c (set_yydebug): Rename c_set_yydebug.
10500 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
10501 lang_print_xnode): Rename.
10502 * tree.c (print_lang_statistics): Rename.
10503
10504 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10505
10506 * class.c (dump_array): Fix format specifier warning.
10507
10508 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10509
10510 * cp-lang.c (LANG_HOOKS_NAME): Override.
10511 (struct lang_hooks): Constify.
10512 * lex.c (cxx_init_options): Update.
10513 (lang_identify): Remove.
10514 * parse.y (language_string): Remove.
10515
10516 2001-11-08 Andreas Franck <afranck@gmx.de>
10517
10518 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
10519 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
10520 suggested by autoconf.
10521 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
10522 (c++.install-common): Use the transformed target alias names.
10523
10524 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10525
10526 * Make-lang.in: Update.
10527 * cp-lang.c: Include langhooks-def.h.
10528
10529 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10530
10531 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
10532
10533 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10534
10535 * lex.c (copy_lang_type): Add static prototype.
10536
10537 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10538
10539 * pt.c (unify): Handle SCOPE_REF.
10540
10541 2001-11-01 Jakub Jelinek <jakub@redhat.com>
10542
10543 * tree.c (cp_copy_res_decl_for_inlining): Adjust
10544 DECL_ABSTRACT_ORIGIN for the return variable.
10545
10546 2001-10-31 Zack Weinberg <zack@codesourcery.com>
10547
10548 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10549
10550 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
10551
10552 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
10553 semantics.c, spew.c: Fix spelling errors.
10554
10555 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10556
10557 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
10558
10559 2001-10-25 Zack Weinberg <zack@codesourcery.com>
10560
10561 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
10562 pop_everything.
10563
10564 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10565
10566 * cp-lang.c (cxx_get_alias_set): New function.
10567 Point LANG_HOOKS_GET_ALIAS_SET to it.
10568
10569 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10570
10571 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
10572 * cp-tree.h (make_unbound_class_template): Prototype new function.
10573 * decl.c (make_unbound_class_template): New function.
10574 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
10575 * error.c (dump_type): Likewise.
10576 * mangle.c (write_type): Likewise.
10577 * parse.y (template_parm): Likewise.
10578 (template_argument): Use make_unbound_class_template.
10579 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
10580 (tsubst): Likewise.
10581 (tsubst_copy): Likewise.
10582 (unify): Likewise.
10583 * tree.c (walk_tree): Likewise.
10584 * typeck.c (comptypes): Likewise.
10585
10586 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10587
10588 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
10589 extra calls into fewer ones.
10590
10591 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
10592
10593 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
10594 Warn when merging inline with attribute noinline.
10595 (start_decl, start_function): Warn if inline and attribute
10596 noinline appear in the same declaration.
10597
10598 2001-10-16 H.J. Lu <hjl@gnu.org>
10599
10600 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
10601 for tree checking disabled.
10602
10603 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
10604
10605 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
10606 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
10607
10608 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
10609
10610 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
10611 (unify): Only handle MINUS_EXPR specially if the above flag is set
10612 and the subtracted constant is 1. Clear the flag on recursive calls.
10613 Set it when unifying the maximum value in an INTEGER_TYPE's range.
10614
10615 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
10616
10617 * decl.c (bad_specifiers): Don't allow exception specifications
10618 on any typedefs.
10619
10620 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
10621
10622 * cp/lex.c (init_cp_pragma): Similarly.
10623
10624 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10625
10626 * pt.c (lookup_template_class): Build complete template arguments
10627 for BOUND_TEMPLATE_TEMPLATE_PARM.
10628
10629 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10630
10631 * cp-tree.h (TYPE_BINFO): Update comment.
10632 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
10633 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
10634 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
10635 (copy_type): Prototype new function.
10636 * lex.c (copy_lang_decl): Gather tree node statistics.
10637 (copy_lang_type): New function.
10638 (copy_type): Likewise.
10639 (cp_make_lang_type): Create lang_type for
10640 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
10641 and BOUND_TEMPLATE_TEMPLATE_PARM.
10642 * pt.c (tsubst): Use copy_type instead of copy_node.
10643 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
10644
10645 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10646
10647 * pt.c (determine_specialization): Ignore functions without
10648 DECL_TEMPLATE_INFO.
10649
10650 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
10651
10652 PR g++/4476
10653 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
10654
10655 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
10656
10657 * typeck2.c (store_init_value): Don't re-digest a bracketed
10658 initializer.
10659
10660 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
10661 ANON_AGGR_TYPE_P.
10662
10663 2001-10-11 Richard Henderson <rth@redhat.com>
10664
10665 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
10666 of an asm statement.
10667 (build_vtbl_ref_1): Split out from build_vtbl_ref.
10668 (build_vfn_ref): Use it to handle vtable descriptors before
10669 calling build_vtable_entry_ref.
10670 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
10671
10672 2001-10-10 Richard Henderson <rth@redhat.com>
10673
10674 * parse.y (asm_operand): Allow named operands.
10675 * semantics.c (finish_asm_stmt): Tweek for changed location
10676 of the operand constraint.
10677
10678 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
10679
10680 * call.c (standard_conversion): Add bad conversion between
10681 integers and pointers.
10682 (convert_like_real): Don't use convert_for_initialization for bad
10683 conversions; complain here and use cp_convert.
10684 (build_over_call): Don't handle bad conversions specially.
10685 (perform_implicit_conversion): Allow bad conversions.
10686 (can_convert_arg_bad): New fn.
10687 * cp-tree.h: Declare it.
10688 * typeck.c (convert_for_assignment): Use it.
10689 (ptr_reasonably_similar): Any target type is similar to void.
10690
10691 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
10692
10693 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
10694 (cp/cp-lang.o): New rule.
10695 * cp-tree.h: Declare hooks.
10696 * tree.c: Make hooks non-static.
10697 (init_tree): Don't initialize hooks here.
10698 * lex.c: Likewise. Move definition of lang_hooks to...
10699 * cp-lang.c: ... new file.
10700
10701 2001-10-08 Richard Henderson <rth@redhat.com>
10702
10703 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
10704 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
10705
10706 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10707
10708 * class.c (build_vtable_entry_ref): Const-ify.
10709 * decl.c (predefined_identifier,
10710 initialize_predefined_identifiers): Likewise.
10711 * init.c (build_new_1): Likewise.
10712 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
10713 Likewise.
10714
10715 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
10716
10717 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
10718 (INSNS_PER_STMT): Likewise.
10719 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
10720 (copy_body, initialize_inlined_parameters): Likewise.
10721 (declare_return_variable, inlinable_function_p): Likewise.
10722 (expand_call_inline, expand_calls_inline): Likewise.
10723 (optimize_inline_calls, clone_body): Likewise.
10724 * tree.c (walk_tree): Moved to ../tree-inline.c.
10725 (walk_tree_without_duplicates): Likewise.
10726 (copy_tree_r, remap_save_expr): Likewise.
10727
10728 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
10729
10730 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
10731 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
10732 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
10733 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
10734 (flag_inline_trees): Moved declaration to ../tree-inline.h.
10735 (walk_tree): Moved declaration to ../tree-inline.h.
10736 (walk_tree_without_duplicates, copy_tree_r): Likewise.
10737 (remap_save_expr): Likewise.
10738 * decl.c: Include tree-inline.h.
10739 (lang_mark_tree): Don't mark inlined_fns.
10740 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
10741 * optimize.c: Include tree-inline.h.
10742 (optimize_inline_calls): Move declaration to ../tree.h, as
10743 non-static.
10744 (remap_decl): Use language-independent constructs and hooks.
10745 (remap_block, copy_body_r, declare_return_variable): Likewise.
10746 (inlinable_function_p): Likewise. Don't test for
10747 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
10748 no longer language-specific.
10749 (optimize_inline_calls): Likewise. Make it non-static. Moved
10750 call of dump_function to...
10751 (optimize_function): Here...
10752 (clone_body): New function, extracted from...
10753 (maybe_clone_body): ... here. Build decl_map locally and pass
10754 it on to clone_body.
10755 * pt.c, semantics.c: Include tree-inline.h.
10756 * tree.c: Likewise.
10757 (cp_walk_subtrees): New language-specific hook for tree inlining.
10758 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
10759 cp_is_overload_p, cp_auto_var_in_fn_p,
10760 cp_copy_res_decl_for_inlining): Likewise.
10761 (walk_tree): Move language-specific constructs into...
10762 (cp_walk_subtrees): this new function.
10763 (copy_tree_r): Use language-independent constructs and hooks.
10764 (init_tree): Initialize tree inlining hooks.
10765 (remap_save_expr): Adjust prototype so that the declaration
10766 does not require the definition of splay_tree.
10767
10768 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
10769
10770 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
10771 to build the declaration instead of the declaration itself.
10772
10773 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
10774
10775 * decl2.c (cxx_decode_option): Add 'else'.
10776
10777 * spew.c (end_input): No longer static.
10778 * cp-tree.h: Declare it.
10779 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
10780
10781 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10782
10783 * call.c (build_over_call), typeck.c (build_function_call_real):
10784 Pass type attributes to check_function_format rather than name or
10785 assembler name. Don't require there to be a name or assembler
10786 name to check formats.
10787
10788 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10789
10790 * decl.c (init_decl_processing): Don't call
10791 init_function_format_info. Initialize lang_attribute_table
10792 earlier.
10793 (builtin_function): Call decl_attributes.
10794 (insert_default_attributes): New.
10795
10796 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
10797
10798 * decl.c (grokdeclarator): Copy array typedef handling from C
10799 frontend.
10800
10801 * decl.c (grokdeclarator): Copy too-large array handling from C
10802 frontend.
10803
10804 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
10805
10806 * config-lang.in (target_libs): Added target-gperf, so that we
10807 don't try to build it if C++ is disabled.
10808
10809 2001-09-23 Zack Weinberg <zack@codesourcery.com>
10810
10811 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
10812 (cp/errfn.o): Delete rule.
10813 (cp/error.o): Depend on flags.h.
10814 * errfn.c: Delete file.
10815 * cp-tree.h: Declare warn_deprecated. Remove definitions of
10816 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
10817 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
10818 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
10819 internal_error respectively. Make cp_deprecated into a macro.
10820 Don't define cp_printer typedef or declare cp_printers.
10821 * error.c: Include flags.h.
10822 Delete: struct tree_formatting_info, print_function_argument_list,
10823 print_declaration, print_expression, print_function_declaration,
10824 print_function_parameter, print_type_id, print_cv_qualifier_seq,
10825 print_type_specifier_seq, print_simple_type_specifier,
10826 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
10827 print_parameter_declaration_clause, print_exception_specification,
10828 print_nested_name_specifier, and definition of cp_printers.
10829 (locate_error): New function.
10830 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
10831 rewritten in terms of locate_error and diagnostic.c.
10832 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
10833 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
10834 (init_error): Adjust to match.
10835
10836 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10837
10838 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
10839
10840 2001-09-21 Richard Henderson <rth@redhat.com>
10841
10842 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
10843 (build_vtbl_initializer): Likewise.
10844 (build_vfn_ref): New.
10845 * cp-tree.h: Declare it.
10846 * call.c (build_over_call): Use it.
10847 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
10848 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
10849
10850 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
10851
10852 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
10853
10854 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
10855
10856 Table-driven attributes.
10857 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
10858 * decl2.c (cplus_decl_attributes): Only take one attributes
10859 parameter.
10860 * cp-tree.c (cplus_decl_attributes): Update prototype.
10861 * class.c (finish_struct), decl.c (start_decl, start_function),
10862 decl2.c (grokfield), friend.c (do_friend), parse.y
10863 (parse_bitfield): Update calls to cplus_decl_attributes.
10864 * decl.c (grokdeclarator): Take a pointer to a single ordinary
10865 attribute list.
10866 * decl.h (grokdeclarator): Update prototype.
10867 * decl2.c (grokfield): Take a single ordinary attribute list.
10868 * friend.c (do_friend): Likewise.
10869 * decl.c (shadow_tag, groktypename, start_decl,
10870 start_handler_parms, grokdeclarator, grokparms, start_function,
10871 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
10872 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
10873 (process_template_parm, do_decl_instantiation): Pass single
10874 ordinary attribute lists around.
10875 * decl.c (grokdeclarator): Correct handling of nested attributes.
10876 Revert the patch
10877 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
10878 * decl.c (grokdeclarator): Embedded attrs bind to the right,
10879 not the left.
10880 .
10881 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
10882 (cp_attribute_table): Declare.
10883 * decl.c (valid_lang_attribute): Don't define.
10884 (lang_attribute_table): Define.
10885 (init_decl_processing): Initialize lang_attribute_table instead of
10886 valid_lang_attribute.
10887 * tree.c (cp_valid_lang_attribute): Remove.
10888 (handle_java_interface_attribute, handle_com_interface_attribute,
10889 handle_init_priority_attribute): New functions.
10890 (cp_attribute_table): New array.
10891 * decl2.c (import_export_class): Don't use
10892 targetm.valid_type_attribute.
10893
10894 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10895
10896 * Make-lang.in (cp/error.o): Depend on real.h
10897 * error.c: #include "real.h"
10898
10899 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10900
10901 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
10902 xmalloc/strcpy/strcat.
10903
10904 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10905
10906 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
10907 Const-ification.
10908 * pt.c (tsubst_decl): Likewise.
10909
10910 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10911
10912 * decl2.c (lang_f_options): Const-ification.
10913 * lex.c (cplus_tree_code_name): Likewise.
10914 * spew.c (yyerror): Likewise.
10915
10916 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
10917
10918 PR c++/3986
10919 * class.c (force_canonical_binfo_r): Check & move an indirect
10920 primary base first.
10921 (force_canonical_binfo): Check that it's not already
10922 canonical.
10923 (mark_primary_virtual_base): Remove BINFO parameter.
10924 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
10925
10926 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
10927
10928 Remove TYPE_NONCOPIED_PARTS.
10929 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
10930 CLASSTYPE_PURE_VIRTUALS.
10931 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
10932 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
10933 (layout_class_type): Don't call fixup_inline_methods here ...
10934 (finish_struct_1): ... call it here.
10935
10936 2001-09-04 Mark Mitchell <mark@codesourcery.com>
10937
10938 * decl.c (duplicate_decls): Remove code deadling with
10939 DECL_SAVED_INSNS.
10940 * decl2.c (finish_file): Likewise.
10941 * pt.c (instantiate_decl): Likewise.
10942 * semantics.c (expand_body): Don't defer local functions if
10943 they wouldn't be deferred for some other reason. Don't
10944 generate RTL for functions that will not be emitted.
10945 (genrtl_start_function): Remove code deadling with
10946 DECL_SAVED_INSNS.
10947 (genrtl_finish_function): Likewise.
10948
10949 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
10950
10951 PR c++/4203
10952 * call.c (build_over_call): Do not optimize any empty base
10953 construction.
10954
10955 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10956
10957 * error.c (dump_template_decl): Output template parameters
10958 together with their specifiers.
10959 Output `class' prefix for template template parameter.
10960 (dump_decl): Fix formatting.
10961
10962 2001-08-30 Kurt Garloff <garloff@suse.de>
10963
10964 * optimize.c (inlinable_function_p): Allow only smaller single
10965 functions. Halve inline limit after reaching recursive limit.
10966
10967 2001-08-30 Joern Rennecke <amylaar@redhat.com>
10968 Jason Merrill <jason_merrill@redhat.com>
10969
10970 * class.c (build_vtable_entry_ref): Subtract in char*, not
10971 ptrdiff_t.
10972
10973 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
10974
10975 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
10976 (build_cplus_array_type): Use cp_build_qualified_type, not
10977 TYPE_MAIN_VARIANT, to get an unqualified version.
10978
10979 * decl2.c (grok_alignof): Lose.
10980 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
10981 * typeck.c (c_alignof): Lose.
10982 * semantics.c (finish_sizeof, finish_alignof): New.
10983 * parse.y: Use them.
10984 * cp-tree.h: Declare them.
10985
10986 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
10987
10988 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
10989 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
10990 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
10991
10992 2001-08-19 Jakub Jelinek <jakub@redhat.com>
10993
10994 * typeck2.c (add_exception_specifier): Only require complete type if
10995 not in processing template declaration.
10996
10997 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10998
10999 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11000 GNU_xref_start_scope and GNU_xref_end_scope.
11001
11002 * tree.c (TYPE_HASH): Moved to ../tree.h.
11003
11004 2001-08-16 Mark Mitchell <mark@codesourcery.com>
11005
11006 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11007 on COMPOUND_EXPRs.
11008
11009 2001-08-14 Richard Henderson <rth@redhat.com>
11010
11011 * class.c, cp-tree.h (build_vfn_ref): Remove.
11012 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11013
11014 2001-08-13 Mark Mitchell <mark@codesourcery.com>
11015
11016 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11017 empty class assignment as having side-effects to avoid
11018 spurious warnings.
11019
11020 2001-08-13 Zack Weinberg <zackw@panix.com>
11021
11022 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11023 * except.c: Include libfuncs.h.
11024
11025 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11026
11027 * decl.c (grokdeclarator): Clarify diagnostic message.
11028
11029 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11030
11031 * decl2.c (do_nonmember_using_decl): Replace using directive
11032 with using declaration in the error message.
11033
11034 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11035
11036 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11037 criterion to avoid rebuilding expression tree instead of
11038 processing_template_decl.
11039
11040 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
11041
11042 Support named return value optimization for inlines, too.
11043 * decl.c (finish_function): Nullify returns here.
11044 * semantics.c (genrtl_start_function): Not here.
11045 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11046 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
11047 Also nullify the CLEANUP_STMT for the nrv.
11048 * cp-tree.h: Declare it.
11049 * optimize.c (declare_return_variable): Replace the nrv with the
11050 return variable.
11051 * typeck.c (check_return_expr): Be more flexible on alignment check.
11052 Ignore cv-quals when checking for a matching type.
11053
11054 2001-08-09 Richard Henderson <rth@redhat.com>
11055
11056 * decl2.c (finish_objects): Use target hooks instead of
11057 assemble_constructor and assemble_destructor.
11058
11059 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11060
11061 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
11062
11063 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
11064
11065 PR c++/3820
11066 Stop using TYPE_NONCOPIED_PARTS.
11067 * call.c (build_over_call): Be careful when copy constructing
11068 or assigning to an empty class.
11069 * class.c (check_bases_and_members): It has a
11070 COMPLEX_ASSIGN_REF if it has a vptr.
11071 (layout_class_type): Don't add empty class padding to
11072 TYPE_NONCOPIED_PARTS.
11073 (finish_struct_1): Don't add the VFIELD either.
11074 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
11075 initialization.
11076
11077 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
11078
11079 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
11080
11081 2001-08-06 Richard Henderson <rth@redhat.com>
11082
11083 * decl2.c (finish_objects): Pass a symbol_ref and priority to
11084 assemble_{constructor,destructor}. Remove priority handling.
11085
11086 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11087
11088 Don't allow template-id in using-declaration.
11089 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
11090 (do_class_using_decl): Likewise.
11091
11092 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11093
11094 * cp/spew.c (read_token): No need to pop buffers.
11095
11096 2001-08-02 Stan Shebs <shebs@apple.com>
11097
11098 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
11099 (fnaddr_from_vtable_entry): Remove decl.
11100 * method.c (use_thunk): Update comment.
11101
11102 2001-08-01 Andrew Cagney <ac131313@redhat.com>
11103
11104 * repo.c (get_base_filename): Change return value to const char
11105 pointer.
11106
11107 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
11108
11109 Kill -fhonor-std.
11110 * NEWS: Document.
11111 * cp-tree.h (flag_honor_std): Remove.
11112 (CPTI_FAKE_STD): Remove.
11113 (std_node): Remove comment about it being NULL.
11114 (fake_std_node): Remove.
11115 * decl.c (in_fake_std): Remove.
11116 (walk_namespaces_r): Remove fake_std_node check.
11117 (push_namespace): Remove in_fake_std code.
11118 (pop_namespace): Likewise.
11119 (lookup_name_real): Remove fake_std_node check.
11120 (init_decl_processing): Always create std_node. Always add
11121 std:: things there.
11122 (builtin_function): Always put non '_' fns in std.
11123 * decl2.c (flag_honor_std): Remove.
11124 (lang_f_options): Remove honor-std.
11125 (unsupported_options): Add honor-std.
11126 (set_decl_namespace): Remove fake_std_node check.
11127 (validate_nonmember_using_decl): Likewise.
11128 (do_using_directive): Likewise.
11129 (handle_class_head): Likewise.
11130 * dump.c (cp_dump_tree): Likewise.
11131 * except.c (init_exception_processing): Adjust.
11132 * init.c (build_member_call): Remove fake_std_node check.
11133 (build_offset_ref): Likewise.
11134 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
11135 * rtti.c (init_rtti_processing): Adjust.
11136
11137 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11138
11139 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11140 operand while calling cp_tree_equal.
11141
11142 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11143
11144 The 3.0 ABI no longer has vbase pointer fields.
11145 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11146 FORMAT_VBASE_NAME): Remove.
11147 * method.c (do_build_copy_constructor): Adjust.
11148 (do_build_assign_ref): Adjust.
11149 * search.c (lookup_field_r): Adjust.
11150 * typeck.c (build_component_ref): Adjust.
11151
11152 The 3.0 ABI always has a vtable pointer at the start of every
11153 polymorphic class.
11154 * rtti.c (build_headof_sub): Remove.
11155 (build_headof): Adjust.
11156 (get_tinfo_decl_dynamic): No need to check flag_rtti
11157 here. Adjust.
11158 (create_real_tinfo_var): Explain why we need a hidden name.
11159
11160 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11161
11162 PR c++/3631
11163 * class.c (update_vtable_entry_for_fn): The fixed adjustment
11164 of a virtual thunk should be from declaring base.
11165
11166 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11167
11168 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11169 the shared virtual base, so preserving inheritance graph order.
11170
11171 2001-07-30 Andreas Jaeger <aj@suse.de>
11172
11173 * decl2.c: Remove unused var global_temp_name_counter.
11174
11175 2001-07-28 Richard Henderson <rth@redhat.com>
11176
11177 * method.c (pending_inlines): Remove.
11178
11179 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
11180
11181 * class.c (mark_primary_virtual_base): Don't adjust base
11182 offsets here.
11183 (dfs_unshared_virtual_bases): Adjust them here.
11184 (mark_primary_bases): Explain why we adjust at the end.
11185
11186 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
11187
11188 * class.c (finish_struct_1): When copying the primary base's
11189 VFIELD, make sure we find it is at offset zero.
11190
11191 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11192
11193 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11194 tsubst_expr for default template arguments.
11195
11196 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11197
11198 PR c++/3621
11199 * spew.c (yylex): Only copy the token's lineno, if it is
11200 nonzero.
11201
11202 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11203
11204 PR c++/3624
11205 * call.c (resolve_args): Simplify, call
11206 convert_from_reference.
11207 (build_new_op): Resolve and convert from reference ARG1
11208 earlier. Adjust ARG2 & ARG3 resolve and conversion.
11209
11210 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11211
11212 * decl.c (last_function_parm_tags): Remove.
11213 (current_function_parm_tags): Remove.
11214 (init_decl_processing): Adjust.
11215 (start_function): Adjust.
11216 (store_parm_decls): Adjust.
11217
11218 PR c++/3152
11219 * decl.c (grokdeclarator): Detect when a function typedef is
11220 declaring a function, and create last_function_parms correctly.
11221
11222 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
11223
11224 * call.c (joust): Only prefer a non-builtin candidate to a builtin
11225 one if they have the same signature.
11226
11227 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
11228 it rather than toplevel_bindings_p. Give it a mangled name if static.
11229 (convert_to_reference): Adjust.
11230 * decl2.c (get_temp_name): Lose.
11231 * mangle.c (mangle_ref_init_variable): New fn.
11232 (mangle_guard_variable): Strip the ref-init header.
11233 * cp-tree.h: Adjust.
11234 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11235 initializer.
11236 (grok_reference_init): Always use DECL_INITIAL.
11237
11238 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11239
11240 PR c++/3416
11241 * call.c (build_conditional_expr): Recheck args after
11242 conversions.
11243 * cp-tree.h (build_conditional_expr): Move to correct file.
11244 * typeck.c (decay_conversion): Diagnose any unknown types
11245 reaching here.
11246 (build_binary_op): Don't do initial decay or default
11247 conversions on overloaded functions.
11248 (build_static_cast): Don't do a decay conversion here.
11249
11250 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11251
11252 PR c++/3543
11253 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11254 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11255
11256 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11257
11258 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11259 (create_vtbl_ptr): ... here.
11260
11261 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11262
11263 * class.c (build_vbase_offset_vbtl_entries): Look for
11264 non-primary base of which we are a sub vtable.
11265
11266 2001-07-24 Phil Edwards <pme@sources.redhat.com>
11267
11268 * semantics.c (finish_this_expr): Remove unused code.
11269
11270 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
11271
11272 Simplify rtti, now we've only one ABI.
11273 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11274 CPTI_TINFO_VAR_ID.
11275 (tinfo_decl_id, tinfo_var_id): Remove.
11276 (get_typeid_1): Remove.
11277 * rtti.c
11278 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11279 (typeid_ok_p): New function.
11280 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11281 (get_tinfo_decl): Remove old abi documentation.
11282 (tinfo_from_decl): Remove.
11283 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11284 (get_typeid_1): Remove.
11285 (get_base_offset): Remove.
11286 (synthesize_tinfo_var): Absorb get_base_offset.
11287 (create_real_tinfo_var): Don't use tinfo_decl_id.
11288
11289 2001-07-23 Graham Stott <grahams@redhat.com>
11290
11291 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11292 variable has_two_argument_delete_p.
11293
11294 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
11295
11296 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11297 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11298 (CPTI_INDEX_IDENTIFIER): Remove.
11299 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11300 (delta2_identifier): Remove.
11301 (index_identifier): Remove.
11302 (pfn_or_delta2_identifier): Remove.
11303 (flag_vtable_thunks): Remove.
11304 (VTABLE_DELTA2_NAME): Remove.
11305 (VTABLE_INDEX_NAME): Remove.
11306 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11307 (vfunc_ptr_type_node): Adjust.
11308 (VTABLE_NAME_PREFIX): Adjust.
11309 (build_vfn_ref): Lose first parameter.
11310 (fixup_all_virtual_upcast_offsets): Remove.
11311 * decl.c (initialize_predefined_identifiers): Remove
11312 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11313 (init_decl_processing): Remove no-vtable-thunk code.
11314 * decl2.c (flag_vtable_thunks): Remove.
11315 (mark_vtable_entries): Remove no-vtable-thunk code.
11316 * error.c (dump_decl): Remove no-vtable-thunk code.
11317 (dump_expr): Adjust ptr to member function code.
11318 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11319 code.
11320 * rtti.c (build_headof): Remove no-vtable-thunk code.
11321 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11322 * search.c (get_base_distance): Remove expand_upcast_fixups case.
11323 (virtual_context) Remove.
11324 (expand_upcast_fixups): Remove.
11325 (fixup_virtual_upcast_offsets): Remove.
11326 (fixup_all_virtual_upcast_offsets): Remove.
11327 * typeck.c (get_member_function_from_ptrfunc): Remove
11328 no-vtable-thunk code.
11329 * call.c (build_over_call): Adjust call to build_vfn_ref.
11330 * class.c (build_vfn_ref): Lose first parameter. Remove
11331 no-vtable-thunk code.
11332 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11333 (build_vtable_entry): Remove no-vtable-thunk code.
11334
11335 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
11336
11337 Remove old-abi remnants. Remove comments about old abi
11338 behavior. Remove references to 'new-abi' in comments.
11339 * cp-tree.h: Adjust comments.
11340 (vbase_offsets_in_vtable_p): Delete.
11341 (vcall_offsets_in_vtable_p): Delete.
11342 (vptrs_present_everywhere_p): Delete.
11343 (all_overridden_vfuns_in_vtables_p): Delete.
11344 (merge_primary_and_secondary_vtables_p): Delete.
11345 (TYPE_CONTAINS_VPTR_P): Adjust.
11346 (VTT_NAME_PREFIX): Remove.
11347 (CTOR_VTBL_NAME_PREFIX): Remove.
11348 (init_vbase_pointers): Remove.
11349 * class.c: Adjust coments.
11350 (build_vbase_pointer_fields): Delete.
11351 (build_vbase_pointer): Remove old-abi code.
11352 (build_secondary_vtable): Likewise.
11353 (modify_all_vtables): Likewise.
11354 (create_vtable_ptr): Likewise.
11355 (layout_class_type): Likewise.
11356 (finish_struct_1): Likewise.
11357 (finish_vtbls): Likewise.
11358 (dfs_finish_vtbls): Delete.
11359 (build_vbase_offset_vtbl_entries): Remove old-abi code.
11360 * cvt.c: Adjust comments.
11361 * decl.c: Adjust comments.
11362 * decl2.c: Adjust comments.
11363 * init.c: Adjust comments.
11364 (construct_virtual_bases): Remove old-abi code.
11365 * lang-specs.h: Remove -fno-new-abi.
11366 * mangle.c: Adjust comments.
11367 * rtti.c: Adjust comments.
11368 (get_base_offset): Remove old-abi-code.
11369 * search.c: Adjust comments.
11370 (dfs_init_vbase_pointers): Remove.
11371 (dfs_vtable_path_unmark): Remove.
11372 (init_vbase_pointers): Remove.
11373 * semantics.c: Adjust comments.
11374 (emit_associated_thunks): Remove old-abi code.
11375 * typeck.c: Adjust comments.
11376
11377 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
11378
11379 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
11380 params.h.
11381
11382 2001-07-19 Mark Mitchell <mark@codesourcery.com>
11383
11384 * class.c (finish_struct_anon): Forbid nested classes.
11385
11386 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
11387
11388 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
11389 * optimize.c: Include debug.h.
11390 (maybe_clone_body): Use debug hook.
11391 * semantics.c: Include debug.h.
11392 (expand_body): Use debug hook.
11393
11394 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
11395
11396 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
11397
11398 2001-07-18 Mark Mitchell <mark@codesourcery.com>
11399
11400 * class.c (type_requires_array_cookie): New function.
11401 (check_methods): Don't try to figure out whether the type needs a
11402 cookie here.
11403 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
11404 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
11405 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
11406 * pt.c (instantiate_class_template): Don't set
11407 TYPE_VEC_DELETE_TAKES_SIZE.
11408 * NEWS: Document ABI changes from GCC 3.0.
11409
11410 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
11411 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
11412
11413 * NEWS (Changes in GCC 3.0): Fix typo.
11414
11415 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
11416
11417 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
11418 which attributes are to be attached, and a flags argument. Update
11419 call to decl_attributes.
11420 (grokfield): Update call to decl_attributes.
11421 * class.c (finish_struct): Update call to cplus_decl_attributes.
11422 * cp-tree.h (cplus_decl_attributes): Update prototype.
11423 * decl.c (start_decl, grokdeclarator, start_function): Update
11424 calls to decl_attributes and cplus_decl_attributes.
11425 * friend.c (do_friend): Update call to cplus_decl_attributes.
11426 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
11427
11428 2001-07-12 Mark Mitchell <mark@codesourcery.com>
11429
11430 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
11431 for `register' variables with an asm-specification.
11432
11433 2001-07-11 Mark Mitchell <mark@codesourcery.com>
11434
11435 * semantics.c (finish_asm_stmt): Mark the output operands
11436 to an asm addressable, if necessary.
11437
11438 2001-07-11 Ben Elliston <bje@redhat.com>
11439
11440 * Revert this change -- there is a subtle bug.
11441
11442 PR c++/80
11443 * decl.c (finish_enum): New "attributes" argument; pass it to
11444 cplus_decl_attributes. Use a narrower type if the enum is packed.
11445 * cp-tree.h (finish_enum): Adjust prototype.
11446 * parse.y (enum_head): New non-terminal.
11447 (structsp): Use it. Enums now may be preceded or followed by
11448 optional attributes -- pass their chained tree to finish_enum().
11449 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
11450
11451 2001-07-10 Mark Mitchell <mark@codesourcery.com>
11452
11453 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
11454 variables.
11455
11456 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
11457
11458 * semantics.c (cp_expand_stmt): Fix for null
11459 current_function_return_value.
11460
11461 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
11462
11463 * call.c (build_op_delete_call): Initialize fn.
11464 (convert_like_real): Delete conditional.
11465 (joust): Initialize *w and *l.
11466 * class.c: Add prototype for binfo_ctor_vtable.
11467 (get_primary_binfo): Initialize result.
11468 * init.c (build_java_class_ref): Initialize name.
11469
11470 2001-07-09 Erik Rozendaal <dlr@acm.org>
11471
11472 * typeck.c (unary_complex_lvalue): Do not duplicate the
11473 argument to modify, pre-, or post-increment when used as an
11474 lvalue and when the argument has side-effects.
11475
11476 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
11477
11478 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11479 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
11480 cplus_decl_attributes even if attrs is NULL.
11481 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11482
11483 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
11484
11485 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
11486 calls to decl_attributes.
11487
11488 2001-07-06 Ira Ruben <ira@apple.com>
11489
11490 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
11491 be DECL_TEMPLATE_RESULT.
11492
11493 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11494
11495 * cp-tree.h (copy_template_template_parm): Rename to ...
11496 (bind_template_template_parm): ... here.
11497 * tree.c (copy_template_template_parm): Rename to ...
11498 (bind_template_template_parm): ... here. Remove the case when
11499 NEWARGS is NULL_TREE.
11500 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
11501 BOUND_TEMPLATE_TEMPLATE_PARM.
11502 * pt.c (lookup_template_class): Adjust.
11503
11504 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
11505
11506 * cvt.c (convert_lvalue): New fn.
11507 * cp-tree.h: Declare it.
11508 * method.c (do_build_assign_ref): Use it.
11509 (do_build_copy_constructor): Convert parm to base types
11510 before calling base constructors.
11511
11512 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
11513 DECL_USER_ALIGN. Check flag_elide_constructors instead of
11514 optimize.
11515 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
11516
11517 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
11518
11519 * optimize.c (optimize_inline_calls): New function, broken out
11520 of ...
11521 (optimize_function): ... here. Call it. Don't inline if it is
11522 a thunk.
11523 (dump_function): Print name of dump flag causing this dump.
11524 * semantics.c (expand_body): Move thunk inline check to
11525 optimize_function.
11526
11527 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
11528
11529 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
11530 (comptypes): Use target.comp_type_attributes.
11531
11532 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
11533
11534 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
11535
11536 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11537
11538 * error.c (lang_print_error_function): Add a `diagnostic_context *'
11539 parameter. Tweak.
11540
11541 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11542
11543 * decl2.c (import_export_class): Update.
11544
11545 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
11546
11547 * error.c (init_error): Adjust settings.
11548
11549 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
11550
11551 * error.c (init_error): Adjust settings.
11552
11553 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
11554
11555 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
11556 return pointers to data members by reference rather than by value.
11557
11558 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
11559
11560 Implement the Named Return Value optimization.
11561 * cp-tree.h (struct cp_language_function): Add x_return_value.
11562 (current_function_return_value): Now a macro.
11563 * decl.c: Don't define it.
11564 (define_label, finish_case_label): Don't clear it.
11565 (init_decl_processing): Don't register it with GC.
11566 * semantics.c (genrtl_finish_function): Don't check it for
11567 no_return_label. Copy the RTL from the return value to
11568 current_function_return_value and walk, calling...
11569 (nullify_returns_r): ...this new fn.
11570 * typeck.c (check_return_expr): Set current_function_return_value.
11571
11572 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
11573
11574 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
11575 sharing a ctor vtable with. Merge code for cases 1 and 2.
11576 (binfo_ctor_vtable): New fn.
11577 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
11578
11579 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
11580
11581 * class.c (dfs_find_final_overrider): Fix logic.
11582
11583 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
11584 virtual thunk instead of non-virtual.
11585 (get_matching_virtual): Uncomment.
11586
11587 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
11588 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
11589 PARM, not ARG.
11590
11591 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
11592
11593 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
11594 we've not emerged from the hierarchy of RTTI_BINFO on reaching
11595 a non-virtual base.
11596
11597 2001-06-13 Mark Mitchell <mark@codesourcery.com>
11598
11599 * NEWS: Update release number.
11600
11601 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
11602
11603 PR c++/3130, c++/3131, c++/3132
11604 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
11605 * class.c (force_canonical_binfo_r): Move
11606 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
11607 virtual bases unless they're primary and what they're primary
11608 too has been moved.
11609 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
11610 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
11611 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
11612 derived binfo.
11613 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
11614 (layout_nonempty_base_or_field): Add most derived type
11615 parameter. Adjust.
11616 (layout_empty_base): Likewise.
11617 (build_base_field): Likewise.
11618 (build_base_fields): Likewise.
11619 (propagate_binfo_offsets): Add most derived type
11620 parameter. Skip non canonical virtual bases too.
11621 (dfs_set_offset_for_unshared_vbases): Don't skip primary
11622 bases. Do skip canonical bases.
11623 (layout_virtual_bases): Adjust.
11624 (layout_class_type): Adjust.
11625 (dfs_get_primary_binfo): Build list of virtual primary base
11626 candidates.
11627 (get_primary_binfo): Check that the shared virtual primary
11628 base candidate was found first.
11629 (accumulate_vtbl_inits): Don't do anything for non-vptr
11630 containing binfos. For case 1 primary virtual bases, keep
11631 checking that we've not emerged from the hierarchy of RTTI_BINFO.
11632
11633 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
11634
11635 PR c++/3089
11636 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
11637 hierarchy looking for primary bases for a ctor
11638 vtable. Recursively call oneself, if we meet our primary via
11639 this route and haven't met it yet via inheritance graph order.
11640
11641 2001-06-11 Mark Mitchell <mark@codesourcery.com>
11642
11643 * lang-options.h: Emit documentation for -fno-honor-std, not
11644 -fhonor-std.
11645
11646 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
11647
11648 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
11649 Don't clobber delta.
11650 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
11651
11652 2001-06-10 Mark Mitchell <mark@codesourcery.com>
11653 Gabriel Dos Reis <gdr@codesourcery.com>
11654
11655 * Make-lang.in (cp/call.o): Depend on diagnostic.h
11656 (cp/typeck.o): Depend on diagnostic.h
11657 (cp/typeck2.o): Depend on diagnostic.h
11658 (cp/repo.o): Depend on dignostic.h
11659 * typeck.c: #include diagnostic.h
11660 (convert_for_initialization): Remove extern declaration for
11661 warningcount and errorcount.
11662
11663 * call.c: #include diagnostic.h
11664 (convert_like_real): Remove extern declaration for warnincount and
11665 errorcount.
11666
11667 * repo.c: #include diagnostic.h
11668 * typeck2.c: #include diagnostic.h
11669
11670 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11671
11672 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
11673 in previous change.
11674
11675 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11676
11677 PR c++/2929
11678 * friend.c (do_friend): Use push_decl_namespace for classes at
11679 namespace scope.
11680
11681 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11682 Jason Merrill <jason_merrill@redhat.com>
11683
11684 PR c++/3061
11685 * class.c (build_secondary_vtable): Use assert, rather than an error
11686 message.
11687 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
11688 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
11689 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
11690 Don't set BINFO_VTABLE for a primary virtual base.
11691
11692 2001-06-07 Mark Mitchell <mark@codesourcery.com>
11693
11694 * decl.c (duplicate_decls): Update source position information
11695 when a template function is defined.
11696
11697 2001-06-07 Phil Edwards <pme@sources.redhat.com>
11698
11699 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
11700
11701 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
11702
11703 PR c++/2914
11704 * decl.c (pushtag): Don't push into a complete type's scope.
11705
11706 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
11707
11708 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
11709 (struct lang_decl_flags): Lose generate_with_vtable_p.
11710 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
11711 * class.c (copy_virtuals): Adjust.
11712 * decl2.c (mark_vtable_entries): Adjust.
11713 * method.c (make_thunk, build_vtable_entry): Adjust.
11714 * class.c (update_vtable_entry_for_fn): Only look as far as the
11715 first defining class.
11716 (build_vtbl_initializer): Put nothing in the slot for a function only
11717 defined in a lost primary virtual base.
11718 (add_vcall_offset_vtbl_entries_1): Use the same code for
11719 the lost primary case and the normal case.
11720 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
11721 (get_vfield_offset, get_derived_offset): Lose.
11722 (dfs_find_final_overrider): Use look_for_overrides_here.
11723 (get_matching_virtual): New fn.
11724 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
11725 not BV_VCALL_INDEX.
11726 * search.c (look_for_overrides_here): Split out from...
11727 (look_for_overrides_r): Here.
11728
11729 * class.c (find_final_overrider): Return error_mark_node on error.
11730
11731 * decl2.c (key_method): #if 0 accidental change.
11732
11733 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
11734
11735 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
11736 (build_over_call): Likewise.
11737 * decl.c (grokparms): Likewise.
11738 * pt.c (tsubst_decl): Likewise.
11739 * typeck.c (convert_arguments): Likewise.
11740
11741 2001-06-05 Mark Mitchell <mark@codesourcery.com>
11742
11743 * semantics.c (begin_class_definition): Robustify.
11744
11745 * pt.c (instantiate_decl): Tell the repository code about the
11746 clones, not the cloned functions.
11747 * repo.c (repo_template_used): Explicitly instantiate the cloned
11748 function, not the clones.
11749
11750 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11751
11752 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
11753 ICS_BAD_FLAG on created conversion.
11754 (compare_ics): Break out rank.
11755
11756 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11757
11758 * decl.c (xref_tag): Remove extraneous %s on dependent name
11759 lookup warning.
11760
11761 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11762
11763 * class.c (layout_vtable_decl): Fix off by one error on
11764 build_index_type.
11765 (build_vtt): Likewise.
11766 (build_ctor_vtbl_group): Likewise.
11767
11768 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11769
11770 * class.c (maybe_indent_hierarchy): New function.
11771 (dump_class_hierarchy_r): Add flags. Dump extra binfo
11772 information, if enabled. Use maybe_indent_hierarchy. Adjust
11773 output format.
11774 (dump_class_hierarchy): Adjust prototype. Adjust output format.
11775 (dump_array, dump_vtable, dump_vtt): New functions.
11776 (finish_struct_1): Adjust hierarchy dumping.
11777 (initialize_vtable): Call dump_vtable.
11778 (build_vtt): Call dump_vtt.
11779 (build_ctor_vtbl_group): Call dump_vtable.
11780 * decl2.c (flag_dump_class_layout): Remove.
11781 (cxx_decode_option): Remove dump translation unit
11782 and dump class hierarchy check. Call dump_switch_p.
11783 (finish_file): Adjust dumping.
11784 (dump.c): Only dump base classes if not TDF_SLIM.
11785 Only dump namespace members if not TDF_SLIM.
11786 * optimize.c (dump_function): New function.
11787 (optimize_function): Call dump_function.
11788 * semantics.c (expand_body): Use dump_enabled_p.
11789
11790 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
11791
11792 PR g++/2936
11793 Part missed from first commit
11794 * decl2.c (finish_anon_union): Copy context.
11795
11796 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
11797
11798 PR g++/2936
11799 * optimize.c (remap_decl): Remap anonymous aggregate members too.
11800
11801 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
11802
11803 PR g++/2823
11804 * semantics.c (expand_body): Don't optimize thunks.
11805
11806 2001-05-25 Sam TH <sam@uchicago.edu>
11807
11808 * cp-tree.h lex.h: Fix header include guards.
11809
11810 2001-05-25 Mark Mitchell <mark@codesourcery.com>
11811
11812 * decl.c (init_decl_processing): Tweak.
11813
11814 2001-05-24 Mark Mitchell <mark@codesourcery.com>
11815
11816 * decl.c (duplicate_decls): Tidy.
11817 (init_decl_processing): Always set flag_no_builtin.
11818
11819 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
11820
11821 PR c++/2184
11822 * decl2.c (do_local_using_decl): Push the decls, even in a
11823 template.
11824
11825 2001-05-22 Mark Mitchell <mark@codesourcery.com>
11826
11827 * optimize.c (initialize_inlined_parameters): Don't set
11828 TREE_READONLY for a VAR_DECL taking the place of an inlined
11829 PARM_DECL.
11830
11831 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
11832
11833 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
11834 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
11835 attribute.
11836
11837 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
11838
11839 * parse.y: Refer to compound literals as such, not as
11840 constructor-expressions.
11841
11842 2001-05-21 Mark Mitchell <mark@codesourcery.com>
11843
11844 * call.c (build_op_delete_call): Ignore exception-specifications
11845 when looking for matching delete operators.
11846 * init.c (build_new_1): Compute whether or not the allocation
11847 function used is a placement allocation function or not, and
11848 communicate this information to build_op_delete_call.
11849
11850 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
11851
11852 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
11853 (build_vtbl_ref): Adjust.
11854 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
11855 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
11856 Re-add vtable-gc.
11857 (unsupported_options): Correspondingly.
11858
11859 * decl2.c (maybe_make_one_only): Check flag_weak, not
11860 supports_one_only().
11861
11862 * cp-tree.def (START_CATCH_STMT): Lose.
11863 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
11864 * tree.c (cp_statement_code_p): Don't case it.
11865 * semantics.c (cp_expand_stmt): Likewise.
11866 * cp-tree.h (START_CATCH_TYPE): Lose.
11867 (HANDLER_TYPE): New.
11868 * except.c (expand_start_catch_block): Don't start any blocks.
11869 Return the type.
11870 (expand_end_catch_block): Don't end any blocks.
11871 * parse.y (handler): Don't pass anything from finish_handler_parms
11872 to finish_handler.
11873 * pt.c (tsubst_expr): Likewise.
11874 * semantics.c (begin_handler): Call note_level_for_catch here.
11875 (finish_handler_parms): Don't return anything.
11876 (genrtl_catch_block, begin_catch_block): Lose.
11877 (genrtl_handler): Call expand_start_catch here.
11878
11879 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
11880
11881 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
11882 (get_vtable_decl, build_vtt): Not here.
11883
11884 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
11885
11886 PR c++/2781
11887 * optimize.c (update_cloned_parm): Copy addressability and other
11888 flags.
11889
11890 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11891
11892 * pt.c (determine_specialization): Ignore artificial functions.
11893
11894 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
11895
11896 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
11897 (C_RID_CODE): Remove.
11898 * lex.c (cxx_init_options): Call set_identifier_size. Update.
11899 (init_parse): Don't do it here.
11900
11901 2001-05-18 Diego Novillo <dnovillo@redhat.com>
11902
11903 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
11904 function declaration to avoid stripping the symbol's attributes.
11905
11906 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
11907
11908 * decl.c (pushdecl): Adjust error string.
11909 (xref_tag): Adjust friend class injection warning. Remove the
11910 inherited name from the class shadowed scope.
11911
11912 2001-05-17 Mark Mitchell <mark@codesourcery.com>
11913
11914 * except.c (cp_protect_cleanup_actions): New function.
11915 (init_exception_processing): Don't set protect_cleanup_actions
11916 here. Do set lang_protect_cleanup_actions.
11917
11918 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
11919
11920 * spew.c (read_token): Call yyerror on all unexpected tokens.
11921
11922 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
11923
11924 * init.c (member_init_ok_or_else): Take a tree rather than
11925 string for name.
11926 (expand_member_init): Adjust.
11927
11928 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
11929
11930 * decl.c (duplicate_decls): Suppress warning about duplicate
11931 decls if the first decl is a friend.
11932
11933 2001-05-12 Zack Weinberg <zackw@stanford.edu>
11934
11935 * except.c (choose_personality_routine): Export. Add
11936 explanatory comment. Take an enum languages, not a boolean.
11937 (initialize_handler_parm): Adjust to match.
11938 * cp-tree.h: Prototype choose_personality_routine.
11939 * lex.c (handle_pragma_java_exceptions): New function.
11940 (init_cp_pragma): Register #pragma GCC java_exceptions.
11941
11942 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11943
11944 * method.c (build_mangled_C99_name): Remove unused prototype.
11945
11946 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
11947
11948 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
11949 * typeck.c (get_member_function_from_ptrfunc,
11950 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
11951 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
11952
11953 Reverted Geoff Keating's 2001-05-03's patch.
11954
11955 2001-05-11 Ira Ruben <ira@apple.com>
11956
11957 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
11958
11959 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
11960
11961 * cp-tree.h (finish_label_expr, lookup_label): Delete.
11962 * parse.y: Update for '&&'; don't issue warning here.
11963 * semantics.c (finish_label_expr): Delete.
11964
11965 2001-05-07 Mark Mitchell <mark@codesourcery.com>
11966
11967 * splay-tree.h (splay_tree_max): New function.
11968 (splay_tree_min): Likewise.
11969
11970 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
11971
11972 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
11973 (pfn_vflag_identifier): Define.
11974 Update comment about layout of pointer functions.
11975 (build_ptrmemfunc1): Update prototype.
11976 (expand_ptrmemfunc_cst): Update prototype.
11977 * decl.c (initialize_predefined_identifiers): Initialize
11978 pfn_vflag_identifier.
11979 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
11980 an extra field to the type.
11981 * expr.c (cplus_expand_constant): Pass 'flag' between
11982 expand_ptrmemfunc_cst and build_ptrmemfunc1.
11983 * typeck.c (get_member_function_from_ptrfunc): When
11984 FUNCTION_BOUNDARY < 16, look at additional field to determine
11985 if a pointer-to-member is a real pointer or a vtable offset.
11986 (build_ptrmemfunc1): Add new parameter to contain extra field.
11987 (build_ptrmemfunc): Pass the extra field around.
11988 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
11989 (pfn_from_ptrmemfunc): Ignore the extra field.
11990
11991 2001-05-03 Mark Mitchell <mark@codesourcery.com>
11992
11993 * cp-tree.h (flag_inline_trees): Update documentation.
11994 * decl.c (init_decl_processing): Adjust handling of
11995 flag_inline_functions and flag_inline_trees to support -O3.
11996 (grokfndecl): Set DECL_INLINE on all functions if that's what
11997 the user requested.
11998 (save_function_data): Clear DECL_INLINE in
11999 current_function_cannot_inline is non-NULL.
12000 * decl2.c (flag_inline_trees): Update documentation.
12001
12002 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
12003
12004 * dump.c (cp_dump_tree, USING_STMT case): New case.
12005 * tree.c (cp_statement_code_p): Add USING_STMT.
12006 * decl2.c (do_using_directive): Add the using directive statement.
12007
12008 * tree.c (walk_tree): Reformat an if block.
12009
12010 2001-05-02 Mark Mitchell <mark@codesourcery.com>
12011
12012 * decl.c (compute_array_index_type): Don't try to do anything with
12013 the indices when processing a template.
12014
12015 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12016
12017 * call.c: NULL_PTR -> NULL.
12018 * class.c: Likewise.
12019 * cvt.c: Likewise.
12020 * decl.c: Likewise.
12021 * decl2.c: Likewise.
12022 * except.c: Likewise.
12023 * init.c: Likewise.
12024 * rtti.c: Likewise.
12025 * search.c: Likewise.
12026 * tree.c: Likewise.
12027 * typeck.c: Likewise.
12028 * typeck2.c: Likewise.
12029
12030 2001-05-02 Mark Mitchell <mark@codesourcery.com>
12031
12032 * decl2.c (do_using_directive): Revert previous patch.
12033
12034 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12035
12036 * cp-tree.def (USING_STMT): New statement node.
12037 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12038 * decl2.c (do_using_directive): Add USING_STMT to statement
12039 tree. Don't emit errors when processing template decl.
12040 * pt.c (tsubst_expr, USING_STMT case): New case.
12041 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12042
12043 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12044
12045 * call.c (build_new_op): Convert args from reference here.
12046 (build_conditional_expr): Don't convert here.
12047
12048 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12049
12050 * spew.c (last_token_id): New static variable.
12051 (read_token): Set it here.
12052 (yyerror): Use it here.
12053
12054 2001-04-30 Richard Henderson <rth@redhat.com>
12055
12056 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
12057 * decl.c: Likewise.
12058
12059 2001-04-30 Mark Mitchell <mark@codesourcery.com>
12060
12061 * gxxint.texi: Remove.
12062 * Make-lang.in: Remove all traces of gxxint.texi.
12063
12064 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
12065
12066 * decl2.c (start_static_initialization_or_destruction): Correct
12067 logic to handle the -fno-use-cxa-atexit case.
12068
12069 2001-04-30 Mark Mitchell <mark@codesourcery.com>
12070
12071 * optimize.c (update_cloned_parm): New function.
12072 (maybe_clone_body): Use it. Update the `this' parameter too.
12073
12074 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
12075
12076 * decl2.c (unsupported_options): Add new-abi.
12077 * lang-options.h: Remove no longer supported options.
12078
12079 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12080
12081 * except.c (can_convert_eh): Don't check template parms,
12082 typename types etc.
12083
12084 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12085
12086 * optimize.c (maybe_clone_body): Copy parameter names and locations.
12087
12088 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
12089
12090 * cp-tree.h (adjust_clone_args): Prototype new function.
12091 * class.c (adjust_clone_args): New function.
12092 * decl.c (start_function): Call it for in charge ctors.
12093
12094 2001-04-26 Mark Mitchell <mark@codesourcery.com>
12095
12096 * method.c (use_thunk): Make sure that thunks really are emitted
12097 when requested.
12098
12099 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
12100
12101 * mangle.c (write_chars): New macro.
12102 (hwint_to_ascii): New function
12103 (write_number): Use it.
12104 (write_integer_cst): Deal with really big numbers.
12105
12106 2001-04-25 Mark Mitchell <mark@codesourcery.com>
12107
12108 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
12109 the clone.
12110
12111 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
12112
12113 * decl.c (grokdeclarator): Set context of namespace scope
12114 TYPE_DECLS.
12115
12116 2001-04-24 Zack Weinberg <zackw@stanford.edu>
12117
12118 * cp/optimize.c: Include hashtab.h.
12119 (struct inline_data): Add tree_pruner.
12120 (expand_call_inline, expand_calls_inline): Use it when calling
12121 walk_tree.
12122 (optimize_function): Initialize and free tree_pruner.
12123
12124 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
12125
12126 Lazy __FUNCTION__ generation.
12127 * cp-tree.def (FUNCTION_NAME): Remove.
12128 * cp-tree.h (function_name_declared_p): Remove.
12129 (cp_fname_init): Prototype.
12130 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
12131 don't call declare_function_name. Call start_fname_decls.
12132 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
12133 clobber the line number.
12134 (cp_fname_init): New function.
12135 (start_function): Call start_fname_decls.
12136 (finish_function): Call finish_fname_decls.
12137 * lex.c (reswords): Add slots for __FUNCTION__ et al.
12138 (rid_to_yy): Add mappings for __FUNCTION__ et al.
12139 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12140 * parse.y (VAR_FUNC_NAME): New token.
12141 (primary): Add VAR_FUNC_NAME.
12142 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12143 generation.
12144 (tsubst, FUNCTION_NAME case): Remove.
12145 (tsubst_copy, FUNCTION_NAME case): Remove.
12146 (tsubst_expr, DECL_STMT case): Be careful with a
12147 DECL_PRETTY_FUNCTION_P.
12148 (instantiate_decl): Remove function_name_declared_p.
12149 * semantics.c (begin_compound_statement): Don't call
12150 declare_function_name here.
12151 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12152 (finish_translation_unit): Call finish_fname_decls.
12153 (expand_body): Remove function_name_declared_p.
12154 * typeck2.c (digest_init): Allow any ERROR_MARK.
12155
12156 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
12157
12158 * pt.c (tsubst_decl): Use VOID_TYPE_P.
12159 * semantics.c: Fix some typos.
12160
12161 2001-04-23 Phil Edwards <pme@sources.redhat.com>
12162
12163 * cp/decl2.c (flag_honor_std): Always initialize to 1.
12164
12165 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12166
12167 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12168
12169 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
12170
12171 * except.c (build_throw): Wrap the initialization of the exception
12172 object in a MUST_NOT_THROW_EXPR.
12173 (do_free_exception): #if 0.
12174
12175 2001-04-20 Mark Mitchell <mark@codesourcery.com>
12176
12177 * cp-tree.h (finish_enum): Change prototype.
12178 * decl.c (finish_enum): Reorganize.
12179 * parse.y (structsp): Adjust calls to finish_enum.
12180
12181 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
12182
12183 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12184 't' case.
12185
12186 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
12187
12188 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12189 (layout_empty_base): Return at end flag.
12190 (build_base_field): Likewise.
12191 (build_base_fields): Likewise.
12192 (layout_virtual_bases): Don't add 1 to eoc value.
12193 (end_of_class): Use full size for empty bases.
12194 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12195 empty bases. Don't add 1 to eoc value. Only add trailing padding
12196 if we're an empty class with no empty bases.
12197 (dump_class_hierarchy): Dump size and alignment.
12198
12199 2001-04-20 Jakub Jelinek <jakub@redhat.com>
12200
12201 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12202 ICS_BAD_FLAG.
12203
12204 2001-04-20 Jakub Jelinek <jakub@redhat.com>
12205
12206 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12207 is found, look first if name does not match the structure name.
12208
12209 2001-04-19 Mark Mitchell <mark@codesourcery.com>
12210
12211 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12212 set.
12213 (SET_DECL_LANGUAGE): New macro.
12214 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12215 (pushdecl): Likewise.
12216 (build_library_fn_1): Likewise.
12217 (build_cp_library_fn): Likewise.
12218 (grokfndecl): Likewise.
12219 (grokvardecl): Mark `extern "C"' variables as having C linkage.
12220 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12221 * lex.c (retrofit_lang_decl): Likewise.
12222 * mangle.c (mangle_decl_string): Don't mangle the names of
12223 variables declared with C language linkage.
12224 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12225
12226 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
12227
12228 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12229 flag_access_control from uninitialized storage.
12230
12231 2001-04-15 Mark Mitchell <mark@codesourcery.com>
12232
12233 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12234 * mangle.c (write_pointer_to_member_type): Fix mangling of
12235 pointers to cv-qualified member function types.
12236
12237 * init.c (build_delete): Create a SAVE_EXPR for the address if
12238 we're going to use it more than once.
12239
12240 2001-04-13 Mark Mitchell <mark@codesourcery.com>
12241
12242 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12243 (expand_ptremfunc_cst): Change prototype.
12244 (delta2_from_ptrmemfunc): Remove.
12245 * expr.c (cplus_expand_constant): Adjust call to
12246 expand_ptrmemfunc_cst.
12247 * typeck.c (build_ptrmemfunc1): Simplify.
12248 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12249 results in a constant.
12250 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12251 (delta2_from_ptrmemfunc): Remove.
12252 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12253
12254 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
12255
12256 * cp-tree.h (decl_namespace_list): New macro.
12257 (struct saved_scope): Add decl_ns_list.
12258 * decl.c (mark_saved_scope): Mark it.
12259 * decl2.c: Lose static decl_namespace_list.
12260 (init_decl2): Don't save it.
12261
12262 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12263
12264 * cp-tree.h (warn_return_type, yylex): Delete redundant
12265 declarations.
12266
12267 * decl.c (current_class_depth, global_namespace): Likewise.
12268
12269 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12270
12271 * repo.c (flag_use_repository): Likewise.
12272
12273 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12274
12275 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12276 set_block, pushdecl, getdecls, gettags, init_decl_processing,
12277 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12278 lvalue_or_else, print_lang_statistics, comp_target_types,
12279 unsigned_type, signed_type, signed_or_unsigned_type,
12280 build_function_call, mark_addressable, incomplete_type_error):
12281 Delete redundant declarations.
12282
12283 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
12284
12285 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12286 (TYPE_ANONYMOUS_P): New macro.
12287 (TAGGED_TYPE_P): New macro.
12288 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12289 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12290 * tree.c (no_linkage_helper): Likewise.
12291 * semantics.c (begin_class_definition): Likewise.
12292 * pt.c (convert_template_argument): Likewise.
12293 * lex.c (check_for_missing_semicolon): Likewise.
12294
12295 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
12296
12297 * class.c (dfs_unshared_virtual_bases): New function.
12298 (mark_primary_bases): Call it.
12299 (check_bases): Ignore virtual bases when determining
12300 nearly-emptiness.
12301
12302 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
12303
12304 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12305
12306 2001-04-11 Mark Mitchell <mark@codesourcery.com>
12307
12308 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12309 cloned function to the clone.
12310
12311 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12312
12313 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12314
12315 * semantics.c: Include expr.h.
12316
12317 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
12318
12319 * method.c (implicitly_declare_fn): Commonize code for copy ctor
12320 and assignment op. Set TREE_USED for parameter.
12321
12322 2001-04-10 Mark Mitchell <mark@codesourcery.com>
12323
12324 * class.c (find_final_overrider_data): Add `candidates'.
12325 (dfs_find_final_overrider): Don't issue error messages
12326 prematurely.
12327 (find_final_overrider): Issue error messages here.
12328 (build_base_field): Don't warn about amgibuous direct bases here.
12329 (warn_about_ambiguous_direct_bases): New function.
12330 (layout_class_type): Use it.
12331
12332 2001-04-10 Richard Henderson <rth@redhat.com>
12333
12334 * typeck.c (build_array_ref): Push the array reference inside
12335 COMPOUND_EXPR and COND_EXPR.
12336
12337 2001-04-05 Mark Mitchell <mark@codesourcery.com>
12338
12339 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12340 * decl.c (duplicate_decls): Adjust accordingly.
12341 (maybe_commonize_var): Likewise.
12342 (grokfndecl): Likewise.
12343 (start_function): Likewise.
12344 (start_method): Likewise.
12345 * decl2.c (key_method): Likewise.
12346 (import_export_decl): Likewise.
12347 * method.c (implicitly_declare_fn): Likewise.
12348 * optimize.c (maybe_clone_body): Likewise.
12349
12350 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
12351
12352 * lang-specs.h: Add __DEPRECATED.
12353
12354 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
12355
12356 * search.c (get_dynamic_cast_base_type): When building a new
12357 constant, set its type to ssizetype.
12358
12359 2001-04-04 Jakub Jelinek <jakub@redhat.com>
12360
12361 * optimize.c (expand_call_inline): Only add newly inlined statements
12362 into inlined_stmts.
12363
12364 2001-04-03 Mark Mitchell <mark@codesourcery.com>
12365
12366 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12367 (OPERATOR_FORMAT): Likewise.
12368 (OPERATOR_TYPENAME_FORMAT): Likewise.
12369 * operators.def: Remove old name-mangling information.
12370 * decl.c (grok_op_properties): Adjust accordingly.
12371 * lex.c (init_operators): Likewise.
12372 * rtti.c (get_tinfo_decl): Issue error messages about types that
12373 have variable size.
12374
12375 2001-04-03 Mark Mitchell <mark@codesourcery.com>
12376
12377 * decl2.c (import_export_decl): Don't call import_export_class
12378 when processing an inline member function.
12379 * semantics.c (expand_body): Call import_export_decl before
12380 emitting inline functions.
12381
12382 2001-03-28 Richard Henderson <rth@redhat.com>
12383
12384 IA-64 ABI Exception Handling:
12385 * cp-tree.def (EH_SPEC_BLOCK): New.
12386 (MUST_NOT_THROW_EXPR): New.
12387 * cp-tree.h: Update changed function declarations.
12388 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
12389 (CPTI_CALL_UNEXPECTED): New.
12390 (struct cp_language_function): Rename x_eh_spec_try_block
12391 to x_eh_spec_block.
12392 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
12393 * decl.c (current_binding_level): If no current function
12394 bindings, revert to scope_chain.
12395 (initialize_predefined_identifiers): Remove __cp_push_exception.
12396 (store_parm_decls): Use begin_eh_spec_block.
12397 (finish_function): Use finish_eh_spec_block.
12398 (mark_lang_function): Update for name changes.
12399 * decl2.c (finish_file): No mark_all_runtime_matches.
12400 * dump.c (cp_dump_tree): Handle new tree codes.
12401 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
12402 * except.c (catch_language_init, catch_language): Remove.
12403 (init_exception_processing): Don't set language code.
12404 Initialize call_unexpected_node, protect_cleanup_actions,
12405 eh_personality_libfunc, lang_eh_runtime_type.
12406 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
12407 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
12408 (prepare_eh_type): Split out type canonicalizations ...
12409 (build_eh_type_type): ... from here.
12410 (build_eh_type_type_ref): Remove.
12411 (mark_all_runtime_matches): Remove.
12412 (build_exc_ptr): New.
12413 (do_begin_catch, do_end_catch): New.
12414 (do_pop_exception): Remove.
12415 (build_terminate_handler): Remove.
12416 (choose_personality_routine): Split out language choice from ...
12417 (initialize_handler_parm): ... here.
12418 Use MUST_NOT_THROW_EXPR.
12419 (expand_start_catch_block): Use do_begin_catch. Simplify Java
12420 exception object handling.
12421 (expand_start_eh_spec, expand_end_eh_spec): Remove.
12422 (expand_exception_blocks, alloc_eh_object): Remove.
12423 (begin_eh_spec_block, finish_eh_spec_block): New.
12424 (do_allocate_exception, do_free_exception): New.
12425 (expand_throw): Merge into ...
12426 (build_throw): ... here. Update for abi.
12427 * expr.c (cplus_expand_expr): No expand_internal_throw.
12428 Handle MUST_NOT_THROW_EXPR.
12429 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
12430 * semantics.c (*) Update for except.h name changes.
12431 (genrtl_try_block): No protect_with_terminate.
12432 (genrtl_eh_spec_block): New.
12433 (genrtl_handler): Don't emit the goto here.
12434 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
12435 (genrtl_finish_function): Don't expand_exception_blocks.
12436 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
12437
12438 2001-03-28 Richard Henderson <rth@redhat.com>
12439
12440 * decl.c (struct named_label_list): Rename eh_region to
12441 in_try_scope, add in_catch_scope.
12442 (struct binding_level): Rename eh_region to is_try_scope,
12443 add is_catch_scope.
12444 (note_level_for_try): Rename from note_level_for_eh.
12445 (note_level_for_catch): New.
12446 (poplevel): Copy both is_try_scope and is_catch_scope to
12447 the named_label_list struct.
12448 (check_previous_goto_1): Don't check for catch block via
12449 DECL_ARTIFICIAL; use in_try_scope instead.
12450 (check_goto): Likewise.
12451 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
12452 * except.c (expand_start_catch_block): Call note_level_for_catch.
12453 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
12454
12455 2001-03-27 Richard Henderson <rth@redhat.com>
12456
12457 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
12458 exceptions_via_longjmp.
12459
12460 2001-03-27 Phil Edwards <pme@sources.redhat.com>
12461
12462 * pt.c (check_default_tmpl_args): Make error messages clearer.
12463
12464 2001-03-26 Phil Edwards <pme@sources.redhat.com>
12465
12466 * error.c: Also undefine 'A' macro used for cp_printers definition.
12467
12468 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12469
12470 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
12471
12472 2001-03-26 Mike Yang <yang@research.att.com>
12473 Mark Mitchell <mark@codesourcery.com>
12474
12475 * dump.c (dump_access): New function.
12476 (cp_dump_tree): Use it. Dump basetype information for class
12477 types.
12478
12479 2001-03-26 Mark Mitchell <mark@codesourcery.com>
12480
12481 * Makefile.in (optimize.o): Depend on params.h.
12482 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
12483 (init_decl_processing): Set flag_no_inline when doing
12484 inlining-on-trees.
12485 * optimize.c: Include params.h.
12486 (struct inline_data): Improve documentation of FNS. Add
12487 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
12488 (INSNS_PER_STMT): New macro.
12489 (remap_block): Use CLONING_P.
12490 (inlinable_function_p): Don't inline big functions.
12491 (expand_call_inline): Keep track of how much inlining we've done.
12492 (optimize_function): Set FIRST_INLINED_FN.
12493 (maybe_clone_body): Set CLONING_P.
12494 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
12495 tree nodes.
12496 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
12497 rest_of_compilation. Clear DECL_RTL for local variables
12498 afterwards.
12499 (clear_decl_rtl): New function.
12500
12501 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
12502
12503 Implement DR 209
12504 * cp-tree.h (skip_type_access_control,
12505 reset_type_access_control): Prototype.
12506 * decl.c (grokdeclarator): Access of friends is not checked.
12507 * parse.y (component_decl_list): Reset type access control.
12508 * semantics.c (decl_type_access_control): Clear
12509 current_type_lookups.
12510 (save_type_access_control): Don't save if not deferring.
12511 (skip_type_access_control, reset_type_access_control): New
12512 functions.
12513 (begin_class_definition): Do type access control for basetypes.
12514 Start deferred access control.
12515 (finish_class_definition): Resume immediate access control if
12516 this is a local class.
12517
12518 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12519
12520 * class.c (add_method): Use memcpy/memmove, not bcopy.
12521
12522 * decl.c (duplicate_decls): Likewise.
12523
12524 2001-03-23 Jakub Jelinek <jakub@redhat.com>
12525
12526 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
12527 not `_'.
12528
12529 2001-03-23 Jakub Jelinek <jakub@redhat.com>
12530
12531 * decl.c (local_names): Define.
12532 (push_local_name): New.
12533 (grok_reference_init): Return init if initializing static reference
12534 variable with non-constant instead of emitting it.
12535 Move expand_static_init call to cp_finish_decl.
12536 (layout_var_decl): Call push_local_name.
12537 (maybe_commonize_var): Allow inlining functions even if they have
12538 static local variables, use comdat_linkage for them if flag_weak.
12539 (check_initializer): Call obscure_complex_init if
12540 grok_reference_init returned nonzero.
12541 (save_function_data): Clear x_local_names.
12542 (pop_cp_function_context): Free x_local_names.
12543 (mark_inlined_fns): Remove.
12544 (mark_lang_function): Mark x_local_names.
12545 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
12546 Mark inlined_fns as tree, remove call to mark_inlined_fns.
12547 * class.c (alter_access): Ensure DECL_ACCESS is never set if
12548 DECL_DISCRIMINATOR_P.
12549 * cp-tree.h (cp_language_function): Add x_local_names.
12550 (lang_decl_flags): Add discriminator into u2.
12551 (lang_decl_inlined_fns): Remove.
12552 (lang_decl): inlined_fns is now a TREE_VEC.
12553 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
12554 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
12555 TREE_VEC, not a custom structure.
12556 (optimize_function): Likewise.
12557 * mangle.c (discriminator_for_local_entity): Discriminate among
12558 VAR_DECL local entities.
12559 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
12560 is not valid.
12561
12562 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
12563
12564 Add support for Java interface method calls.
12565 * cp-tree.h (struct lang_type): Add java_interface flag.
12566 (TYPE_JAVA_INTERFACE): New macro.
12567 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
12568 by setting TYPE_JAVA_INTERFACE.
12569 * call.c (java_iface_lookup_fn): New static.
12570 (build_over_call): If calling a method declared in a
12571 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
12572 expression which resolves the function address.
12573 (build_java_interface_fn_ref): New function.
12574
12575 2001-03-22 Richard Henderson <rth@redhat.com>
12576
12577 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
12578 * except.c: Don't include it.
12579
12580 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12581 based on an idea from Joe Buck <jbuck@synopsys.com>
12582
12583 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
12584 New nonterminals.
12585 (data_def, component_decl): Add reductions to bad_decl.
12586
12587 2001-03-22 Jakub Jelinek <jakub@redhat.com>
12588
12589 * method.c (do_build_assign_ref): Don't use build_modify_expr for
12590 anonymous aggregates, since they don't have assignment operator
12591 method.
12592 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
12593 assignment operators for anonymous structure fields.
12594
12595 2001-03-21 Jason Merrill <jason@redhat.com>
12596
12597 * pt.c (instantiate_decl): Abort if we see a member constant
12598 instantiation that doesn't already have its initializer.
12599 Downgrade explicit instantiation without definition to pedwarn.
12600
12601 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
12602 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
12603 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
12604
12605 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
12606 (pending_vtables): Remove.
12607 * decl2.c (pending_vtables): Remove.
12608 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
12609 CLASSTYPE_VTABLE_NEEDS_WRITING.
12610 (import_export_class): Likewise.
12611 (init_decl2): Don't mark pending_vtables.
12612 * lex.c (handle_pragma_vtable): Just sorry.
12613 * pt.c (instantiate_class_template): Don't mess with
12614 CLASSTYPE_VTABLE_NEEDS_WRITING.
12615 (mark_class_instantiated): Likewise.
12616 * ptree.c (print_lang_type): Don't print it.
12617 * semantics.c (begin_class_definition): Don't set it.
12618
12619 * pt.c (template_tail): Replace with last_pending_template.
12620 (maybe_templates, maybe_template_tail): Remove.
12621 (add_pending_template): Adjust.
12622 (instantiate_pending_templates): Adjust.
12623
12624 * cp-tree.h (struct saved_scope): Remove lang_stack field.
12625 (current_lang_stack): Remove.
12626 * decl.c (maybe_push_to_top_level): Don't initialize it.
12627 (duplicate_decls): Use current_lang_depth.
12628 (xref_basetypes): Likewise.
12629 * class.c (current_lang_depth): New fn.
12630 (push_lang_context): Use more varray functionality.
12631 (pop_lang_context): Likewise.
12632
12633 * error.c (GLOBAL_THING): Always use '__'.
12634
12635 2001-03-21 Mark Mitchell <mark@codesourcery.com>
12636
12637 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
12638
12639 * mangle.c (mangle_decl_string): Mangle the names of overloaded
12640 operators, even when they have `extern "C"' linkage.
12641
12642 2001-03-19 Mark Mitchell <mark@codesourcery.com>
12643
12644 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
12645 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12646 where it's not necessary.
12647 (add_method): Remove optimization involving comparison of
12648 DECL_ASSEMBLER_NAME.
12649 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
12650 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12651 where it's not necessary.
12652 (check_methods): Likewise.
12653 (build_clone): Likewise.
12654 (built_vtt): Likewise.
12655 * cp-tree.h (DECL_NEEDED_P): Likewise.
12656 * decl.c (pushtag): Likewise.
12657 (duplicate_decls): Likewise.
12658 (pushdecl): Likewise.
12659 (builtin_function): Likewise.
12660 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
12661 (build_cp_library_fn): Likewise.
12662 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
12663 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12664 where it's not necessary.
12665 (make_rtl_for_nonlocal_decl): Likewise.
12666 (cp_finish_decl): Likewise.
12667 (grokfndecl): Likewise.
12668 (grokvardecl): Likewise.
12669 (grokdeclarator): Likewise.
12670 (start_function): Likewise.
12671 (cp_missing_return_ok_p): Likewise.
12672 * decl2.c (grokclassfn): Likewise.
12673 (check_classfn): Likewise.
12674 (finish_static_data_member_decl): Likewise.
12675 (grokfield): Likewise.
12676 * error.c (GLOBAL_IORD_P): Remove.
12677 (dump_global_iord): Improve output.
12678 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
12679 * except.c (nothrow_libfn_p): Summarily reject any function not in
12680 namespace-scope.
12681 * init.c (build_java_class_ref): Don't explicitly set
12682 DECL_ASSEMBLER_NAME after calling mangle_decl.
12683 * mangle.c (mangle_decl_string): Handle extern "C" functions.
12684 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
12685 * method.c (set_mangled_name_for_decl): Don't explicitly set
12686 DECL_ASSEMBLER_NAME after calling mangle_decl.
12687 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
12688 IDENTIFIER_GLOBAL_VALUE for the thunk.
12689 * pt.c (set_mangled_name_for_template_decl): Remove.
12690 (check_explicit_specialization): Don't use it.
12691 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
12692 (tsubst_friend_function): Likewise.
12693 (tsubst_decl): Likewise.
12694 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
12695 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
12696 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12697 where it's not necessary.
12698 (tinfo_base_init): Likewise.
12699 (create_real_tinfo_var): Likewise.
12700 * search.c (looup_field_1): Likewise.
12701 * semantics.c (finish_named_return_value): Likewise.
12702 * tree.c (init_tree): Set lang_set_decl_assembler_name.
12703
12704 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
12705
12706 Correct semantics restrictions checking in throw-expression.
12707 * except.c (is_admissible_throw_operand): New function.
12708 (build_throw): Use it.
12709
12710 2001-03-14 Mark Mitchell <mark@codesourcery.com>
12711
12712 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
12713 and its ilk.
12714
12715 2001-03-14 Mark Mitchell <mark@codesourcery.com>
12716
12717 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12718 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
12719 * decl.c (duplicate_decls): Likewise.
12720 (builtin_function): Likewise.
12721 (build_library_fn): Likewise.
12722 (build_cp_library_fn): Likewise.
12723 (check_initializer): Likewise.
12724 (cp_finish_decl): Likewise.
12725 * decl2.c (grokfield): Likewise.
12726 (grok_function_init): Remove #if 0'd code.
12727 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12728 * friend.c (do_friend): Likewise.
12729 * init.c (get_temp_regvar): Likewise.
12730 * method.c (make_thunk): Likewise.
12731 * pt.c (tsubst_friend_function): Likewise.
12732 (tsubst_decl): Likewise.
12733 (regenerate_decl_from_template): Likewise.
12734 * semantics.c (genrtl_named_return_value): Likewise.
12735 (expand_body): Likewise.
12736 (genrtl_finish_function): Likewise.
12737 * tree.c (cp_tree_equal): Likewise.
12738
12739 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
12740
12741 * call.c (convert_like_real): Add extra semantics to INNER
12742 parameter. Don't convert to temporary if a user conversion
12743 gives us an lvalue that we're about to bind to a reference.
12744 Set INNER to indicate pending reference binding on recursive
12745 calls.
12746
12747 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
12748
12749 * cp/lex.c: Delete duplicate pending_lang_change.
12750
12751 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
12752
12753 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
12754 Similarly.
12755 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
12756 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
12757
12758 2001-03-09 Zack Weinberg <zackw@stanford.edu>
12759
12760 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
12761
12762 2001-03-08 Stan Shebs <shebs@apple.com>
12763
12764 * cp-tree.h (set_identifier_local_value): Remove unused decl.
12765
12766 2001-03-06 Zack Weinberg <zackw@stanford.edu>
12767
12768 * spew.c: Remove references to CPP_OSTRING.
12769
12770 2001-03-06 Andrew Haley <aph@redhat.com>
12771
12772 * typeck.c (convert_arguments): Check that we have an fndecl.
12773
12774 2001-03-05 Andrew Haley <aph@redhat.com>
12775
12776 * typeck.c (convert_arguments): Don't do ellipsis conversion for
12777 __built_in_constant_p.
12778
12779 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12780
12781 * typeck.c (build_static_cast): Allow enum to enum conversions
12782 as per DR 128.
12783
12784 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12785
12786 * class.c (check_field_decls): Pointers to member do not a
12787 non-pod struct make, as per DR 148.
12788
12789 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12790
12791 * call.c (joust): cp_pedwarn when using gnu extension concerning
12792 worst conversion sequences.
12793
12794 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12795
12796 * decl.c: Replace all uses of 'boolean' with 'bool'.
12797
12798 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12799
12800 * lang-specs.h: Add zero initializer for cpp_spec field to
12801 all array elements that need one. Don't put an #ifdef inside
12802 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
12803 use it.
12804
12805 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12806
12807 Implement using decls inside template functions.
12808 * decl2.c (validate_nonmember_using_decl): Don't special case
12809 fake_std_node in the global namespace. Don't reject early when
12810 processing a template.
12811 (do_local_using_decl): Add to statement tree. Don't do further
12812 processing when building a template.
12813 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
12814
12815 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12816
12817 * decl2.c (do_nonmember_using_decl): Don't complain if we find
12818 same function. Do complain about ambiguating extern "C"
12819 declarations.
12820
12821 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
12822
12823 Remove floating point and complex type template constant parms.
12824 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
12825 COMPLEX_TYPE extensions.
12826 (invalid_nontype_parm_type_p): Likewise.
12827
12828 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
12829
12830 * except.c (call_eh_info): Revert "match_function"'s type.
12831
12832 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
12833
12834 Fix ctor vtable vcall offsets.
12835 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
12836 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
12837 (get_matching_base): Remove.
12838 (get_original_base): New function.
12839 (build_vtbl_initializer): Initialize vid.rtti_binfo.
12840 Use a virtual thunk for a ctor vtable with an index
12841 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
12842 primary base within a constructor vtable. Only set
12843 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
12844 when primary base has been lost.
12845 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
12846
12847 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
12848
12849 * call.c (joust): Ensure more_specialized()'s argument length
12850 parameter has correct value for constructors.
12851
12852 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
12853
12854 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
12855
12856 * decl.c (mark_inlined_fns): Prototype.
12857
12858 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12859
12860 * spew.c (yylex): Correct handling of friends.
12861
12862 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12863
12864 * mangle.c (write_encoding): Pass write_function_type the
12865 FUNCTION_DECL for the function being encoded.
12866 (write_function_type): Pass it along to write_bare_function_type.
12867 (write_bare_function_type): Pass it along to write_method_parms.
12868 (write_method_parms): Don't mangle the compiler-generated
12869 parameters to a constructor or destructor.
12870
12871 2001-02-22 Andreas Jaeger <aj@suse.de>
12872
12873 * optimize.c: Include toplev.h for
12874 note_deferral_of_defined_inline_function prototype.
12875
12876 2001-02-22 Jakub Jelinek <jakub@redhat.com>
12877
12878 * cp-tree.h (struct lang_decl_inlined_fns): New.
12879 (struct lang_decls): Add inlined_fns.
12880 (DECL_INLINED_FNS): New macro.
12881 * optimize.c (struct inline_data): Add inlined_fns.
12882 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
12883 (inlinable_function_p): Likewise, fix typo in comment,
12884 function is not inlinable if it already inlined function currently
12885 being optimized.
12886 (expand_call_inline): Add fn to inlined_fns if necessary.
12887 (optimize_function): Initialize inlined_fns.
12888 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
12889 * decl.c (mark_inlined_fns): New function.
12890 (lang_mark_tree): Call it.
12891
12892 2001-02-21 Jason Merrill <jason@redhat.com>
12893
12894 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
12895 (DECL_UNINLINABLE): Move to middle-end.
12896
12897 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
12898 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
12899 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
12900 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
12901 parms and outer BLOCK. note_deferral_of_defined_inline_function.
12902
12903 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
12904 second parm of op=.
12905
12906 2001-02-19 Mark Mitchell <mark@codesourcery.com>
12907
12908 * decl2.c (set_decl_namespace): Allow explicit instantiations in
12909 any namespace.
12910
12911 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12912
12913 * optimize.c (expand_call_inline): Don't walk subtrees of type
12914 nodes.
12915
12916 2001-02-18 Mark Mitchell <mark@codesourcery.com>
12917
12918 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
12919 for a destructor.
12920
12921 2001-02-18 Jason Merrill <jason@redhat.com>
12922
12923 Do put the VTT parameter in DECL_ARGUMENTS.
12924 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
12925 (current_vtt_parm): New macro.
12926 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
12927 (DECL_HAS_VTT_PARM_P): New macro.
12928 (DECL_VTT_PARM): Remove.
12929 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
12930 * decl.c (duplicate_decls): Only copy the operator code if
12931 appropriate.
12932 (start_function): Set current_vtt_parm.
12933 (lang_mark_tree): Don't mark vtt_parm.
12934 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
12935 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
12936 * class.c (build_clone): Maybe remove the VTT parm.
12937 * optimize.c (maybe_clone_body): Set up the VTT parm.
12938 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
12939 * call.c (build_over_call): Just allow the VTT arg.
12940 * method.c (make_thunk): Don't set DECL_VTT_PARM.
12941 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
12942 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
12943 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
12944 * error.c (dump_function_decl): Likewise.
12945 * call.c (build_user_type_conversion_1, convert_like_real): Abort
12946 if we try to call a constructor with in-charge or VTT parms.
12947 * method.c (skip_artificial_parms_for): New fn.
12948 * call.c (add_function_candidate, build_over_call): Call it.
12949 * call.c (build_new_method_call): Use current_vtt_parm.
12950 * init.c (expand_virtual_init): Likewise.
12951 * class.c (same_signature_p): No longer static.
12952 * cp-tree.h: Declare it.
12953 * search.c (look_for_overrides_r): Use it.
12954
12955 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12956
12957 * cp-tree.h (new_abi_rtti_p): Remove.
12958 (name_mangling_version): Likewise.
12959 (flag_do_squangling): Likewise.
12960 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
12961 * decl.c (grokfndecl): Likewise.
12962 * decl2.c (name_mangling_version): Remove.
12963 (flag_do_squangling): Likewise.
12964 (lang_f_options): Remove `squangle'.
12965 (unsupported_options): Add `squangle'.
12966 (cxx_decode_option): Issue a warning about uses of
12967 -fname-mangling-version.
12968 (finish_file): Remove old ABI support.
12969 * pt.c (check_explicit_specialization): Likewise.
12970 (tsubst_decl): Likewise.
12971 * rtti.c (init_rtti_processing): Likewise.
12972 (build_headof): Likewise.
12973 (get_tinfo_decl_dynamic): Likewise.
12974 (tinfo_from_decl): Likewise.
12975 (build_dynamic_cast_1): Likewise.
12976 (synthesize_tinfo_var): Likewise.
12977 * init.c (build_new): Allow enumeration types for the array-bounds
12978 in a direct-new-declarator.
12979
12980 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
12981
12982 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
12983 TREE_PROTECTED from the template being specialized.
12984
12985 2001-02-17 Jason Merrill <jason@redhat.com>
12986
12987 * decl2.c (build_artificial_parm): Set TREE_READONLY.
12988
12989 * decl.c (bad_specifiers): Allow throw specs on things with
12990 pointer-to-function or -member-function type.
12991 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
12992 a pmf.
12993
12994 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12995
12996 * call.c (check_dtor_name): Handle template names correctly.
12997
12998 2001-02-16 Jason Merrill <jason@redhat.com>
12999
13000 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13001 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13002 * optimize.c (maybe_clone_body): Don't substitute it.
13003 * call.c (build_new_method_call): Check in_chrg instead.
13004 * init.c (expand_virtual_init): Likewise.
13005
13006 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
13007
13008 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13009 class-type introduces at least a type-name.
13010
13011 2001-02-16 Jakub Jelinek <jakub@redhat.com>
13012
13013 * call.c (convert_like_real): Create a temporary for non-lvalue.
13014
13015 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
13016
13017 * cp-tree.h: Fix typos in comments.
13018
13019 2001-02-16 Jason Merrill <jason@redhat.com>
13020
13021 * optimize.c (remap_block): If we're compiling a clone, pass the
13022 new block to insert_block.
13023
13024 2001-02-16 Mark Mitchell <mark@codesourcery.com>
13025
13026 * semantics.c (finish_asm_stmt): Robustify.
13027
13028 2001-02-15 Mark Mitchell <mark@codesourcery.com>
13029
13030 * pt.c (push_template_decl_real): Don't remangle the name of a
13031 class template.
13032
13033 2001-02-15 Jim Meyering <meyering@lucent.com>
13034
13035 * Make-lang.in (c++.install-common): Depend on installdirs.
13036 (c++.install-info): Likewise.
13037 (c++.install-man): Likewise.
13038
13039 2001-02-15 Mark Mitchell <mark@codesourcery.com>
13040
13041 * typeck2.c (build_m_component_ref): Robustify.
13042
13043 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
13044
13045 * friend.c (do_friend): Don't take the nested [template] class
13046 into account when deciding whether to warn about the friend
13047 function not referring to a template function.
13048
13049 2001-02-14 Jakub Jelinek <jakub@redhat.com>
13050
13051 * typeck.c (build_unary_op): Clarify error message.
13052
13053 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
13054
13055 * parse.y (component_constructor_declarator): allow optional
13056 parentheses around constructor class name.
13057
13058 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13059
13060 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
13061 section.
13062 * init.c (emit_base_init): Remove incorrect comment about
13063 virtual bases.
13064 * method.c (make_thunk): Fix comment alignment.
13065
13066 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13067
13068 Kill remnants of this is variable.
13069 * cp-tree.h (flag_this_is_variable): Remove.
13070 * decl2.c (flag_this_is_variable): Remove.
13071 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
13072 (build_vbase_path): The path is non-static, even in a cdtor.
13073 (resolves_to_fixed_type_p): Add additional return value.
13074 * search.c (init_vbase_pointers): Adjust.
13075 * tree.c (lvalue_p_1): Adjust.
13076 * typeck.c (mark_addressable): Adjust.
13077
13078 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13079
13080 * pt.c (unify): Don't check cv quals of array types.
13081
13082 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
13083
13084 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
13085 check whether we already have the type.
13086
13087 2001-02-13 Mark Mitchell <mark@codesourcery.com>
13088
13089 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
13090 * call.c (build_op_delete_call): Simplify to remove duplicate
13091 code.
13092 * class.c (clone_function_decl): Don't build the deleting variant
13093 of a non-virtual destructor.
13094 * decl.c (finish_destructor_body): Don't call delete if this is a
13095 non-virtual destructor.
13096 * init.c (build_delete): Explicitly call `operator delete' when
13097 deleting an object with a non-virtual destructor.
13098
13099 2001-02-13 Jason Merrill <jason@redhat.com>
13100
13101 * lang-specs.h: Add more __EXCEPTIONS.
13102
13103 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13104
13105 * typeck2.c (process_init_constructor): Check
13106 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
13107
13108 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13109
13110 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
13111 Remove spurious information in comment. Allow further
13112 adjustments of REFERENCE_TYPE args.
13113
13114 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
13115
13116 * errfn.c (cp_deprecated): Tweak diagnostic text.
13117 * parse.y (new_initializer): Deprecate initializer lists
13118 extension.
13119
13120 2001-02-12 Mark Mitchell <mark@codesourcery.com>
13121
13122 Remove old ABI support.
13123
13124 2001-02-11 Mark Mitchell <mark@codesourcery.com>
13125
13126 * decl2.c (flag_vtable_thunks): Always set it to 1.
13127 (flag_new_abi): Likewise.
13128 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
13129
13130 * Makefile.in (g++spec.o): Fix typo.
13131
13132 2001-02-09 Jason Merrill <jason@redhat.com>
13133
13134 * lang-specs.h: Restore definition of __EXCEPTIONS.
13135
13136 2001-02-08 Jason Merrill <jason@redhat.com>
13137
13138 * search.c (shared_member_p): New function.
13139 (lookup_field_r): Use it.
13140 * cp-tree.h (SHARED_MEMBER_P): Remove.
13141
13142 * method.c (process_overload_item): Handle template-dependent array
13143 bounds.
13144 * pt.c (type_unification_real): If we end up with undeduced nontype
13145 parms, try again.
13146
13147 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13148 types.
13149
13150 * typeck2.c (friendly_abort): Don't say anything if we have
13151 earlier errors or sorries.
13152
13153 * decl.c (check_tag_decl): Notice attempts to redefine bool and
13154 wchar_t. Ignore if in_system_header.
13155
13156 * decl.c (maybe_push_cleanup_level): New fn...
13157 (start_decl_1): ...split out from here.
13158 * cvt.c (build_up_reference): Use it.
13159 * cp-tree.h: Declare it.
13160
13161 2001-02-07 Mark Mitchell <mark@codesourcery.com>
13162
13163 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13164 spec.
13165
13166 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
13167
13168 * pt.c (lookup_template_class): Make sure it's a primary
13169 template or template_template_parm when called from the parser.
13170 (instantiate_template_class): Add assertion.
13171
13172 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
13173
13174 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13175 from error_mark_node.
13176
13177 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
13178
13179 Fix specification and implementation bugs in V3 ABI
13180 construction vtables.
13181 * cp-tree.h (flag_dump_class_layout): New flag.
13182 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13183 (BINFO_LOST_PRIMARY_P): New flag.
13184 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13185 (BINFO_PRIMARY_MARKED_P): Rename to ...
13186 (BINFO_PRIMARY_P): ... here.
13187 (binfo_via_virtual): New prototype.
13188 * decl2.c (flag_dump_class_layout): New flag.
13189 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13190 use `=' as a file name separator.
13191 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13192 bases.
13193 (build_vtbl_address): If this is a virtual primary base, then
13194 get the vtbl of what it is ultimately primary for.
13195 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13196 for BINFO_PRIMARY_P.
13197 (dfs_skip_nonprimary_vbases_markedp): Likewise.
13198 (get_shared_vbase_if_not_primary): Likewise.
13199 (dfs_get_pure_virtuals): Likewise.
13200 (expand_upcast_fixups): Likewise.
13201 (fixup_virtual_upcast_offsets): Likewise.
13202 (dfs_find_vbase_instance): Likewise.
13203 (find_vbase_instance): Likewise.
13204 (binfo_from_vbase): Adjust comment to reflect reality.
13205 (binfo_via_virtual): New function.
13206 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13207 for binfo walking during VTT construction.
13208 (dfs_mark_primary_bases): Remove.
13209 (force_canonical_binfo_r): New function.
13210 (force_canonical_binfo): New function.
13211 (mark_primary_virtual_base): New function.
13212 (mark_primary_bases): Walk in inheritance graph order, use
13213 mark_primary_virtual_base.
13214 (determine_primary_base): Use some more intermediate variables.
13215 (dfs_find_final_overrider): Don't check for overriding along a
13216 virtual path.
13217 (dfs_modify_vtables): Walk into primary virtual bases too.
13218 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13219 (build_base_fields): Likewise.
13220 (dfs_set_offset_for_unshared_vbases): Likewise.
13221 (layout_virtual_bases): Likewise.
13222 (end_of_class): Likewise.
13223 (finish_struct_1): Call dump_class_hierarchy, if requested.
13224 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13225 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13226 (dump_class_hierarchy): Add file parameter. Append to file, if
13227 required.
13228 (finish_vtbls): Adjust accumulate_vtbl_inits call.
13229 Use canonical base for virtual bases.
13230 (build_vtt): Add more comments. Adjust build_vtt_inits call.
13231 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13232 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13233 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13234 virtual VTTs.
13235 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13236 from DATA. We want virtual primary bases and all bases via virtual.
13237 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13238 virtual base when not a construction vtable.
13239 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13240 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13241 Use canonical bases when processing virtual bases.
13242 (accumulate_vtbl_inits): We're interested in any base via a
13243 virtual path.
13244 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13245 within a construction vtable, determine what is being overridden.
13246 (build_vtbl_initializer): Add more comments
13247 (add_vcall_offset_vtbl_entries_1): Adjust comment.
13248 (build_rtti_vtbl_entries): Check if the base has lost its
13249 primary.
13250
13251 2001-02-05 Mark Mitchell <mark@codesourcery.com>
13252
13253 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13254
13255 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13256
13257 * decl.c (pushdecl): Call abort instead of fatal.
13258 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13259 * init.c (build_new_1): Likewise.
13260 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13261 * decl.c (build_typename_type): hash_table_init now returns void.
13262 decl.c (init_decl_processing): Make an error non-fatal.
13263
13264 2001-02-04 Mark Mitchell <mark@codesourcery.com>
13265
13266 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13267 Document.
13268 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13269 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13270 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13271 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13272 * decl.c (maybe_commonize_var): Use the new name-mangling where
13273 appropriate.
13274 * decl2.c (comdat_linkage): Enhance comments. Make all
13275 compiler-generated things static, if COMDAT is not available.
13276 (get_tinfo_decl): Do not make typeinfo objects that belong in the
13277 library COMDAT.
13278 (tinfo_base_init): Use the correct mangled name for typeinfo
13279 strings, and push them into the global scope.
13280 (typeinfo_in_lib_p): New function.
13281 (synthesize_tinfo_var): Use it.
13282 (create_real_tinfo_var): Likewise.
13283
13284 2001-02-03 Jakub Jelinek <jakub@redhat.com>
13285
13286 * decl.c (push_class_binding): Use context_for_name_lookup instead
13287 of CP_DECL_CONTEXT.
13288 * search.c (context_for_name_lookup): Remove static. Check for NULL
13289 context in the loop.
13290 * cp-tree.h (context_for_name_lookup): Add prototype.
13291
13292 2001-02-02 Jakub Jelinek <jakub@redhat.com>
13293
13294 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13295 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13296 Remove.
13297 * call.c (convert_class_to_reference, build_user_type_conversion_1,
13298 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13299
13300 2001-02-02 Mark Mitchell <mark@codesourcery.com>
13301
13302 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13303 of macros used when compiling g++spec.c.
13304 * g++spec.c (lang_specific_driver): Link with the shared
13305 libgcc by default.
13306
13307 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
13308
13309 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13310 make_reference_declarator, make_call_declarator), method.c
13311 (implicitly_declare_fn), parse.y (namespace_using_decl,
13312 notype_unqualified_id, expr_or_declarator, new_type_id,
13313 after_type_declarator, direct_after_type_declarator,
13314 notype_declarator, complex_notype_declarator,
13315 complex_direct_notype_declarator, qualified_id,
13316 notype_qualified_id, overqualified_id, direct_new_declarator,
13317 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13318 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13319 instead of build_parse_node.
13320
13321 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13322
13323 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13324 (minus_one_node): Moved to top level gcc directory. Renamed
13325 to integer_minus_one_node.
13326
13327 * init.c (init_init_processing): Don't set minus_one_node.
13328 (build_vec_init): Use integer_minus_one_node.
13329
13330 * rtti.c (get_tinfo_decl_dynamic): Likewise.
13331
13332 2001-01-28 Jakub Jelinek <jakub@redhat.com>
13333
13334 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13335 identical and they would be replaced with constant, remove
13336 MODIFY_EXPR from the tree.
13337
13338 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13339
13340 * Make-lang.in: Remove all dependencies on defaults.h.
13341 * call.c: Don't include defaults.h.
13342 * decl.c: Likewise.
13343 * decl2.c: Likewise.
13344 * except.c: Likewise.
13345 * pt.c: Likewise.
13346 * rtti.c: Likewise.
13347 * tree.c: Likewise.
13348 * typeck.c: Likewise.
13349
13350 2001-01-25 Jakub Jelinek <jakub@redhat.com>
13351
13352 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13353 operators even in "C" linkage.
13354 * method.c (set_mangled_name_for_decl): Likewise.
13355 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13356 overloaded operators in "C" linkage.
13357
13358 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
13359
13360 * pt.c (tsubst_decl): Remove IN_DECL parameter.
13361 (tsubst_arg_types): Check parameter is not void.
13362 (tsubst): Adjust tsubst_decl call.
13363
13364 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
13365
13366 * call.c (add_builtin_candidate): Quote std properly, from
13367 previous change.
13368
13369 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13370
13371 * pt.c (check_explicit_specialization): Clone constructors and
13372 destructors.
13373
13374 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
13375
13376 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
13377 indicates anything special about template depth. Make sure we
13378 only count the user visible template classes.
13379
13380 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
13381
13382 * call.c (build_conv): Typo in comment.
13383 (add_builtin_candidate): Add more explanation.
13384 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
13385 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
13386 when we have enumeral types.
13387 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
13388 candidates for relops and eqops.
13389 (joust): Simplify control flow. Allow a non-template user
13390 function to hide a builtin.
13391
13392 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
13393
13394 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
13395 (more_specialized): Add deduction parameter.
13396 * call.c (joust): Adjust more_specialized call.
13397 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
13398 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
13399 (get_bindings_order): Remove.
13400 (get_bindings_real): Add DEDUCE parameter.
13401 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
13402 REFERENCE_TYPE jig for DEDUCE_ORDER.
13403 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
13404 maybe_adjust_types_for_deduction.
13405 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
13406 directly.
13407 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
13408 (check_cv_quals_for_unify): Use new unify qualifier flags.
13409 (unify): Clear new unify qualifier flags.
13410 (get_bindings_real): Add DEDUCE parameter.
13411 (get_bindings): Adjust call to get_bindings_real.
13412 (get_bindings_overload): Likewise.
13413 (most_specialized_instantiation): Adjust call to
13414 more_specialized.
13415
13416 2001-01-19 Jason Merrill <jason@redhat.com>
13417
13418 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
13419
13420 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
13421 -fnew-abi.
13422
13423 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
13424
13425 * decl2.c (arg_assoc_class): Fix double iteration logic.
13426
13427 2001-01-19 Jason Merrill <jason@redhat.com>
13428
13429 * init.c (build_delete): Always call convert_force to strip cv-quals.
13430
13431 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
13432 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
13433 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
13434
13435 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13436
13437 * search.c (get_vbase_1): Count only virtual bases.
13438
13439 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13440
13441 * class.c (duplicate_tag_error): Robustify flag clearing.
13442
13443 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13444
13445 * cp-tree.h (lookup_template_class): Add complain parm.
13446 * decl.c (lookup_namespace_name): Adjust call to
13447 lookup_template_class.
13448 (make_typename_type): Likewise.
13449 * semantics.c (finish_template_type): Likewise.
13450 * pt.c (lookup_template_class): Add complain parm. Adjust.
13451 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
13452 (tsubst): Likewise.
13453
13454 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13455
13456 * pt.c (copy_default_args_to_explicit_spec): Preserve
13457 object's CV quals. Reorganize.
13458
13459 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13460
13461 * typeck.c (build_modify_expr): Say `initialization' for
13462 INIT_EXPRs.
13463 * init.c (build_default_init): Convert to enumeral type, if
13464 needed.
13465
13466 2001-01-18 Jakub Jelinek <jakub@redhat.com>
13467
13468 * parse.y (nomods_initdcl0): Properly set things up for
13469 initdcl0_innards.
13470
13471 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13472
13473 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
13474 (type_unification_real): Set it.
13475 (unify): Use it.
13476
13477 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13478
13479 * decl.c (finish_destructor_body): Convert to vbase pointer here.
13480
13481 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13482
13483 * semantics.c (begin_class_definition): Check we're not inside a
13484 template parm list.
13485
13486 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13487
13488 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
13489 BASELINK_P.
13490
13491 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13492
13493 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
13494 * call.c (build_over_call): Add comment.
13495
13496 2001-01-16 Daniel Berlin <dberlin@redhat.com>
13497
13498 * cvt.c (ocp_convert): Handle vector type conversion
13499 * typeck2.c (digest_init): Handle vector type initializations
13500
13501 2001-01-16 Phil Edwards <pme@sources.redhat.com>
13502
13503 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
13504 was given.
13505
13506 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
13507
13508 * pt.c (check_nontype_parm): Rename to ...
13509 (invalid_nontype_parm_type_p): ... here.
13510 (process_template_parm): Adjust.
13511 (convert_template_argument): Adjust.
13512
13513 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
13514
13515 * pt.c (check_nontype_parm): New function.
13516 (process_template_parm): Use it.
13517 (convert_template_argument): Use it.
13518 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
13519 member.
13520
13521 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
13522
13523 * tree.c: Add defaults.h
13524 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
13525 * Make-lang.in (cp/tree.o): Add defaults.h.
13526
13527 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13528
13529 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
13530
13531 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13532
13533 * g++.1: Change to be ".so man1/gcc.1".
13534
13535 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13536
13537 * Make-lang.in (c++.info, c++.install-info): Build and install g++
13538 internals info.
13539 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
13540 ($(srcdir)/cp/g++int.info): New target.
13541 * gxxint.texi: Add info directory entry. Use @@ in email address.
13542 * .cvsignore: Update.
13543
13544 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
13545
13546 * typeck.c (build_c_cast): Do template processing earlier.
13547 Always pedwarn on array casts.
13548
13549 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
13550
13551 * friend.c (make_friend_class): Make sure a templated class is
13552 actually a template.
13553
13554 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13555
13556 * decl2.c (get_guard): Set linkage from guarded decl.
13557
13558 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13559
13560 * call.c (convert_default_arg): Check for unprocessed
13561 DEFAULT_ARG.
13562 * cp-tree.h (replace_defarg): Move to spew.c.
13563 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
13564 spew.c, which is where they really are.
13565 (done_pending_defargs): Declare.
13566 (unprocessed_defarg_fn): Declare.
13567 * decl.c (replace_defarg): Move to spew.c
13568 * parse.y (structsp): Call done_pending_defargs.
13569 * spew.c (defarg_fns): Rearrange list structure.
13570 (defarg_fnsdone): New static variable.
13571 (defarg_depfns): New static variable.
13572 (init_spew): Adjust.
13573 (add_defarg_fn): Store the type in TREE_TYPE.
13574 (do_pending_defargs): Detect and deal with ordering constraints
13575 and circularity.
13576 (done_pending_defargs): New function.
13577 (unprocessed_defarg_fn): New function.
13578 (replace_defarg): Moved from decl.c. Robustify. Don't save
13579 if circularity detected.
13580
13581 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13582
13583 * pt.c (unify): Check array has a domain, before checking
13584 whether it is variable sized.
13585
13586 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13587
13588 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
13589 parameters with pointers to arrays of unknown bound.
13590
13591 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13592
13593 * parse.y (template_parm_header, template_spec_header): New
13594 reductions. Split out from ...
13595 (template_header): ... here. Use them.
13596 (template_template_parm): Use template_parm_header.
13597 * semantics.c (finish_template_template_parm): Add assert.
13598
13599 2001-01-10 Mark Mitchell <mark@codesourcery.com>
13600
13601 * mangle.c (write_builtin_type): Fix thinko.
13602
13603 * pt.c (copy_default_args_to_explicit_spec_1): New function.
13604 (copy_default_args_to_explicit_spec): Likewise.
13605 (check_explicit_specialization): Use it.
13606
13607 * class.c (finish_struct_1): Remove last argument in call to
13608 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
13609 * decl.c (builtin_function): Likewise.
13610 (build_cp_library_fn): Likewise.
13611 (check_initializer): Likewise.
13612 (make_rtl_for_nonlocal_decl): Likewise.
13613 (cp_finish_decl): Likewise.
13614 (start_function): Likewise.
13615 * decl2.c (finish_anon_union): Likewise.
13616 * friend.c (do_friend): Likewise.
13617 * init.c (build_java_class_ref): Likewise.
13618 * method.c (make_thunk): Likewise.
13619 * pt.c (tsubst_friend_function): Likewise.
13620 * semantics.c (expand_body): Likewise.
13621
13622 2001-01-10 Mark Mitchell <mark@codesourcery.com>
13623
13624 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
13625 looking at DECL_CLONED_FUNCTION for non-functions.
13626
13627 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13628
13629 * error.c (dump_template_parameter): Use parm to determine how
13630 to print default value.
13631
13632 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13633
13634 * class.c (duplicate_tag_error): Clear more flags.
13635
13636 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13637
13638 * call.c (build_new_method_call): Use binfo_for_vbase.
13639
13640 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
13641
13642 * cp-tree.h (flag_cond_mismatch): Don't declare.
13643 * decl2.c (flag_cond_mismatch): Don't define.
13644 (lang_f_options): Remove cond-mismatch.
13645 (unsupported_options): Add cond-mismatch.
13646
13647 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
13648
13649 * class.c (handle_using_decl): Reject using of constructor name
13650 of sourcing class. Allow injecting of a method with same name as
13651 nested class. Fixup error messages.
13652
13653 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
13654
13655 * decl2.c (lang_decode_option): Handle -Wformat=2.
13656
13657 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13658
13659 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
13660 initialized_in_class.
13661 (DECL_DEFINED_IN_CLASS_P): Rename to ...
13662 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
13663 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
13664 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
13665 * pt.c (check_default_tmpl_args): Adjust for
13666 DECL_INITIALIZED_IN_CLASS_P.
13667 (instantiate_class_template): Likewise.
13668 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
13669
13670 * class.c (finish_struct): Constify saved_filename.
13671
13672 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13673
13674 * class.c (duplicate_tag_error): Adjust diagnostic.
13675 (finish_struct): Locally set location to start of struct.
13676 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
13677
13678 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13679
13680 * decl.c (struct binding_level): Adjust class_shadowed comments
13681 to reflect reality.
13682 (push_class_level_binding): Adjust comments to reflect reality.
13683 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
13684 Don't set TREE_VALUE on the class_shadowed list.
13685
13686 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13687
13688 * decl2.c (acceptable_java_type): Allow references too.
13689 * init.c (build_java_class_ref): When using the new ABI, search
13690 `class$' and have it mangled with `mangle_decl.'
13691 * mangle.c (write_java_integer_type_codes): New function.
13692 (write_builtin_type): Detect and mangle Java integer and real
13693 types.
13694
13695 2001-01-07 Mark Mitchell <mark@codesourcery.com>
13696
13697 * decl2.c (grokfield): Don't accept `asm' specifiers for
13698 non-static data members.
13699
13700 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13701
13702 * expr.c (cplus_expand_expr): Don't reset `target'.
13703
13704 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
13705
13706 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
13707
13708 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
13709
13710 * parse.y (template_datadef): Check for error_mark_node.
13711
13712 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
13713
13714 * cp-tree.def (DEFAULT_ARG): Make `x' class.
13715
13716 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
13717
13718 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
13719 (record_builtin_type): Make non-static.
13720 (flag_short_double): Don't declare.
13721 (init_decl_processing): Remove the creation of many tree nodes now
13722 in c_common_nodes_and_builtins.
13723 (build_void_list_node): New function.
13724 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
13725 * cp-tree.h (flag_short_wchar): Don't declare.
13726
13727 2001-01-04 Mark Mitchell <mark@codesourcery.com>
13728
13729 * call.c (build_conv): Don't use build1 for USER_CONV.
13730 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
13731
13732 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
13733
13734 * lex.c (lang_init): Call c_common_lang_init.
13735
13736 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
13737
13738 * search.c (lookup_fnfields_here): Remove.
13739 (look_for_overrides_r): Use lookup_fnfields_1.
13740 Ignore functions from using declarations.
13741
13742 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
13743
13744 Implement exceptions specifiers for implicit member functions.
13745 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
13746 * method.c (synthesize_exception_spec): New function.
13747 (locate_dtor, locate_ctor, locate_copy): New functions.
13748 (implicitly_declare_fn): Generate the exception spec too.
13749 * search.c (check_final_overrider): Check artificial functions
13750 too.
13751 * typeck2.c (merge_exception_specifiers): New function.
13752
13753 2001-01-03 Jason Merrill <jason@redhat.com>
13754
13755 * init.c (build_default_init): New fn.
13756 (perform_member_init): Split out from here.
13757 (build_new_1): Use it. Simplify initialization logic.
13758 (build_vec_init): Take an array, rather than a pointer and maxindex.
13759 Speed up simple initializations. Don't clean up if we're assigning.
13760 * cp-tree.h: Adjust.
13761 * decl2.c (do_static_initialization): Remove TREE_VEC case.
13762 * parse.y (new_initializer): Return void_zero_node for ().
13763 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
13764 * typeck2.c (digest_init): Only complain about user-written
13765 CONSTRUCTORs.
13766
13767 2000-12-22 Mike Stump <mrs@wrs.com>
13768
13769 * decl2.c: (max_tinst_depth): Increase to 50.
13770
13771 2001-01-02 Mark Mitchell <mark@codesourcery.com>
13772
13773 * class.c (invalidate_class_lookup_cache): Zero the
13774 previous_class_values.
13775 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
13776 TREE_INT_CST_HIGH.
13777 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
13778 * decl.c (free_bindings): New variable.
13779 (push_binding): Don't create a new binding if we have one on the
13780 free list.
13781 (pop_binding): Put old bindings on the free list.
13782 (init_decl_processing): Use size_int, not build_int_2.
13783 Register free_bindings as a GC root.
13784 (cp_make_fname_decl): Use size_int, not build_int_2.
13785 (push_inline_template_parms_recursive): Likewise.
13786 (end_template_parm_list): Likewise.
13787 (for_each_template_parm): Do not use walk_tree_without_duplicates.
13788 (tsubst_template_parms): Use size_int, not build_int_2.
13789 (tsubst): Likewise.
13790 * rtti.c (get_vmi_pseudo_type_info): Likewise.
13791
13792 2001-01-02 Richard Henderson <rth@redhat.com>
13793
13794 * parse.y (asm): Set ASM_INPUT_P.
13795
13796 2001-01-02 Jason Merrill <jason@redhat.com>
13797
13798 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
13799 for v3 ABI.
13800
13801 * typeck.c (cp_truthvalue_conversion): New fn.
13802 * cvt.c (ocp_convert): Use it.
13803
13804 * cp-tree.h: Lose c-common.c decls.
13805
13806 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
13807 * cvt.c (convert_to_void): Use type_unknown_p.
13808
13809 * typeck.c (strip_all_pointer_quals): Also strip quals from
13810 pointer-to-member types.
13811
13812 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
13813 parse.y as C.
13814
13815 * call.c (build_new_method_call): Do evaluate the object parameter
13816 when accessing a static member.
13817 * typeck.c (build_component_ref): Likewise.
13818
13819 2001-01-02 Andreas Jaeger <aj@suse.de>
13820
13821 * decl.c (cp_missing_noreturn_ok_p): New.
13822 (init_decl_processing): Set lang_missing_noreturn_ok_p.
13823
13824 2000-12-29 Jakub Jelinek <jakub@redhat.com>
13825
13826 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
13827
13828 2000-12-29 Mark Mitchell <mark@codesourcery.com>
13829
13830 * class.c (pushclass): Remove #if 0'd code.
13831 * cp-tree.h (overload_template_name): Remove.
13832 * decl.c (store_bindings): Simplify.
13833 (pop_from_top_level): Likewise.
13834 * pt.c (overload_template_name): Remove.
13835 (instantiate_decl): Don't call push_to_top_level if it's not
13836 needed.
13837
13838 2000-12-28 Mark Mitchell <mark@codesourcery.com>
13839
13840 * pt.c (register_local_specialization): Don't return a value.
13841 (lookup_template_class): Use move-to-front heuristic when looking
13842 up template instantiations.
13843 (instantiate_decl): Only push_to_top_level when we're actually
13844 going to instantiate the template.
13845
13846 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
13847
13848 * search.c (binfo_for_vtable): Return least derived class, not
13849 most. Handle secondary vtables.
13850
13851 2000-12-22 Jason Merrill <jason@redhat.com>
13852
13853 * pt.c (more_specialized): Don't optimize len==0.
13854 (fn_type_unification): If we're adding the return type, increase len.
13855
13856 * typeck.c (build_binary_op): Fix pmf comparison logic.
13857
13858 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
13859 DECL_STATIC_FUNCTION_P.
13860
13861 * semantics.c (genrtl_finish_function): Don't try to jump to
13862 return_label unless it exists.
13863
13864 In partial ordering for a call, ignore parms for which we don't have
13865 a real argument.
13866 * call.c (joust): Pass len to more_specialized.
13867 (add_template_candidate_real): Strip 'this', pass len.
13868 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
13869 (get_bindings_order): New fn. Pass len down.
13870 (get_bindings_real): Strip 'this', pass len.
13871 (fn_type_unification): Likewise.
13872 (type_unification_real): Succeed after checking 'len' args.
13873 (most_specialized_instantiation): Lose explicit_args parm.
13874 * class.c (resolve_address_of_overloaded_function): Strip 'this',
13875 pass len.
13876
13877 2000-12-21 Jason Merrill <jason@redhat.com>
13878
13879 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
13880 DECL_TEMPLATE_RESULT.
13881
13882 * search.c (lookup_field_r): Call lookup_fnfields_1, not
13883 lookup_fnfields_here.
13884
13885 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
13886
13887 * call.c (build_object_call): Also allow conversions that return
13888 reference to pointer to function.
13889 (add_conv_candidate): Handle totype being ref to ptr to fn.
13890 (build_field_call): Also allow members of type reference to function.
13891 Lose support for calling pointer to METHOD_TYPE fields.
13892
13893 * error.c (dump_expr): Handle *_CAST_EXPR.
13894
13895 * typeck2.c (build_scoped_ref): Always convert to the naming class.
13896
13897 * tree.c (break_out_cleanups): Lose.
13898 * cp-tree.h: Remove prototype.
13899 * typeck.c (build_component_ref): Don't break_out_cleanups.
13900 (build_compound_expr): Likewise.
13901 * semantics.c (finish_expr_stmt): Likewise.
13902
13903 2000-12-20 Richard Henderson <rth@redhat.com>
13904
13905 * cp-tree.h: Update declarations.
13906 * decl.c (finish_case_label): Return the new stmt node.
13907 * semantics.c (finish_goto_stmt): Likewise.
13908 (finish_expr_stmt, finish_return_stmt): Likewise.
13909 (finish_break_stmt, finish_continue_stmt): Likewise.
13910 (finish_asm_stmt): Likewise.
13911 * parse.y (already_scoped_stmt): Set STMT_LINENO.
13912 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
13913 (simple_if, simple_stmt): Return the new stmt node.
13914 (save_lineno): New.
13915
13916 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
13917
13918 * cp-tree.h: Don't declare warn_long_long.
13919
13920 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13921
13922 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
13923 IS_AGGR_TYPE.
13924
13925 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13926
13927 * pt.c (unify): Handle when both ARG and PARM are
13928 BOUND_TEMPLATE_TEMPLATE_PARM.
13929
13930 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13931
13932 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
13933 DECL_TEMPLATE_PARM_P.
13934
13935 2000-12-15 Jason Merrill <jason@redhat.com>
13936
13937 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
13938
13939 * init.c (build_new_1): Don't strip quals from type.
13940
13941 * decl.c (pushdecl): Don't check for linkage on a non-decl.
13942
13943 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
13944
13945 * call.c (build_new_function_call): Lose space before paren in
13946 error message.
13947 (build_new_method_call): Likewise.
13948
13949 * typeck2.c (build_m_component_ref): Propagate quals from datum.
13950
13951 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13952
13953 * pt.c (check_explicit_specialization): Propagate default
13954 function arguments to explicit specializations.
13955
13956 2000-12-13 DJ Delorie <dj@redhat.com>
13957
13958 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
13959 and <? operators.
13960
13961 2000-12-08 Jason Merrill <jason@redhat.com>
13962
13963 * error.c (dump_function_name): Don't let the user see __comp_ctor.
13964
13965 Clean up copy-initialization in overloading code.
13966 * call.c (build_user_type_conversion_1): Die if we are asked to
13967 convert to the same or a base type.
13968 (implicit_conversion): Avoid doing so. Lose reference binding code.
13969 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
13970 direct-initialization. Also do direct-init part of copy-init.
13971 (build_user_type_conversion): Don't provide context to convert_like.
13972 * cvt.c (ocp_convert): build_user_type_conversion will now provide
13973 the constructor call for copy-init.
13974
13975 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
13976 instantiation of a member template.
13977 (do_decl_instantiation): Not here.
13978
13979 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13980
13981 * class.c (check_field_decls): Don't special case anonymous
13982 fields in error messages.
13983 (note_name_declared_in_class): Use %D on diagnostic.
13984
13985 * tree.c (pod_type_p): Use strip_array_types.
13986 (cp_valid_lang_attribute): Likewise.
13987 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
13988 multiple evaluations.
13989 (cp_has_mutable_p): Use strip_array_types.
13990
13991 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13992
13993 * cp-tree.h (sufficient_parms_p): Declare new function.
13994 * call.c (sufficient_parms_p): New function, broken out of ...
13995 (add_function_candidate): ... here. Use it.
13996 (add_conv_candidate): Use it.
13997 * decl.c (grok_ctor_properties): Use it.
13998
13999 2000-12-07 Jakub Jelinek <jakub@redhat.com>
14000
14001 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14002
14003 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
14004
14005 * decl2.c (lang_decode_option): Handle -Wformat-security.
14006
14007 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14008
14009 * pt.c (verify_class_unification): New function.
14010 (get_class_bindings): Use it.
14011 (try_class_unification): Tidy.
14012 (unify): Handle when argument of a template-id is not
14013 template parameter dependent.
14014 (template_args_equal): Handle when TREE_CODE's do not match.
14015
14016 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
14017
14018 * lang-specs.h (c++): When invoking the stand-alone preprocessor
14019 for -save-temps, pass all relevant -Defines to it, and then don't
14020 pass them to cc1plus.
14021
14022 2000-12-05 Will Cohen <wcohen@redhat.com>
14023
14024 * decl.c (finish_case_label): Cleared
14025 more_cleanups_ok in surrounding function scopes.
14026 (define_label): Likewise.
14027
14028 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
14029
14030 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14031 (get_matching_virtual): Remove.
14032 (look_for_overrides): Declare new function.
14033 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14034 DECL_VINDEX here.
14035 * class.c (check_for_override): Move base class iteration code
14036 to look_for_overrides.
14037 * search.c (next_baselink): Remove.
14038 (get_virtuals_named_this): Remove.
14039 (get_virtual_destructor): Remove.
14040 (tree_has_any_destructors_p): Remove.
14041 (struct gvnt_info): Remove.
14042 (check_final_overrider): Remove `virtual' from error messages.
14043 (get_matching_virtuals): Remove. Move functionality to ...
14044 (look_for_overrides): ... here, and ...
14045 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14046 to be overriding.
14047
14048 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
14049
14050 * typeck.c (get_delta_difference): If via a virtual base,
14051 return zero.
14052 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
14053 adjustment.
14054
14055 2000-12-04 Richard Henderson <rth@redhat.com>
14056
14057 * error.c (dump_tree): Use output_add_string not OB_PUTS.
14058
14059 2000-12-04 Jason Merrill <jason@redhat.com>
14060
14061 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
14062 (write_builtin_type): Pass intSI_type_node and the like through
14063 type_for_mode.
14064 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
14065 Pass intSI_type_node and the like through type_for_mode.
14066 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
14067 * pt.c (tsubst, unify): Likewise.
14068 * tree.c (walk_tree): Likewise.
14069 * error.c (dump_type): Likewise.
14070 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
14071
14072 * Make-lang.in: Tweak top comment for emacs.
14073 (cp/TAGS): Restore.
14074
14075 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
14076
14077 * class.c (clone_function_decl): Robustify.
14078
14079 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
14080
14081 * decl.c (store_bindings): Only search in the non modified
14082 old_bindings for duplicates.
14083
14084 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
14085
14086 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
14087 TYPE_POLYMORPHIC_P.
14088
14089 * typeck.c (build_static_cast): Remove unused variable.
14090
14091 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14092
14093 * pt.c: Fix typo in comment.
14094
14095 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
14096
14097 * decl2.c (warn_format): Remove definition.
14098 (lang_decode_option): Handle -Wformat-nonliteral,
14099 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
14100
14101 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
14102
14103 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
14104 (init_decl_processing): Don't create string_type_node,
14105 const_string_type_node, wint_type_node, intmax_type_node,
14106 uintmax_type_node, default_function_type, ptrdiff_type_node and
14107 unsigned_ptrdiff_type_node. Adjust position of call to
14108 c_common_nodes_and_builtins.
14109 (identifier_global_value): New function.
14110
14111 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
14112
14113 * call.c (standard_conversion): Reject pointer to member
14114 conversions from ambiguous, inaccessible or virtual bases.
14115 * typeck.c (build_static_cast): Don't check pointers to members
14116 specially.
14117
14118 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14119
14120 * method.c (do_build_copy_constructor): Preserve cv
14121 qualifications when accessing source object members.
14122 (do_build_assign_ref): Likewise. Remove separate diagnostics for
14123 unnamed fields.
14124
14125 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14126
14127 * method.c (do_build_assign_ref): Construct appropriately
14128 CV-qualified base reference. Don't allow const casts in base
14129 conversion.
14130
14131 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
14132
14133 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
14134 incomplete return type.
14135
14136 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14137
14138 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14139 * semantics.c (finish_base_specifier): Accept a _TYPE not a
14140 _DECL.
14141
14142 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14143
14144 * spew.c (yyerror): Cope if yylval.ttype is NULL.
14145
14146 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14147
14148 * decl.c (grokdeclarator): Diagnose undefined template contexts.
14149
14150 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14151
14152 * decl.c (grokdeclarator): Do type access control on friend
14153 class.
14154
14155 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
14156
14157 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14158 bison parser ickiness.
14159 * pt.c (tsubst_friend_function): Enter namespace scope when
14160 tsubsting the function name.
14161 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14162
14163 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
14164
14165 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14166 * cvt.c (cp_convert_to_pointer): Add force parameter.
14167 Allow conversions via virtual base if forced.
14168 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14169 (ocp_convert): Likewise.
14170 * search.c (binfo_from_vbase): Return the virtual base's binfo.
14171 * typeck.c (get_delta_difference): Adjust handling of virtual
14172 bases.
14173
14174 2000-11-26 Mark Mitchell <mark@codesourcery.com>
14175
14176 * tree.c (struct list_hash): Remove.
14177 (list_hash_table): Make it be an htab.
14178 (struct list_proxy): New type.
14179 (list_hash_eq): New function.
14180 (list_hash_pieces): Renamed from ...
14181 (list_hash): ... this.
14182 (list_hash_lookup): Remove.
14183 (list_hash_add): Remove.
14184 (hash_tree_cons): Use the generic hashtable.
14185 (mark_list_hash): Remove.
14186 (init_tree): Create the hashtable.
14187
14188 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
14189
14190 * method.c (build_mangled_C9x_name): Rename to
14191 build_mangled_C99_name. Change C9X references in comments to
14192 refer to C99.
14193
14194 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
14195
14196 * parse.y (unary_expr): Move VA_ARG from here ...
14197 (primary): ... to here.
14198
14199 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
14200
14201 * semantics.c (finish_id_expr): If type is error_mark, return
14202 error_mark.
14203
14204 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
14205
14206 * pt.c (lookup_template_class): Simplify loop exit constructs.
14207 Cope when there is no partial instantiation of a template
14208 template member.
14209
14210 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
14211
14212 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14213
14214 2000-11-22 Mark Mitchell <mark@codesourcery.com>
14215
14216 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14217 prefix.
14218
14219 * pt.c (do_decl_instantiate): Explicitly clone constructors and
14220 destructors that haven't already been cloned.
14221
14222 2000-11-20 Richard Henderson <rth@redhat.com>
14223
14224 * parse.y (yyparse_1): Rename the parser entry point.
14225
14226 2000-11-20 Alex Samuel <samuel@codesourcery.com>
14227
14228 * mangle.c (write_name): Use <unscoped-name> for names directly in
14229 function scope.
14230 (write_unscoped_name): Accept names directly in function scope.
14231
14232 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
14233
14234 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14235 * parse.y (extdef): Add EXPORT reduction.
14236 * spew.c (yylex): Don't skip export here.
14237
14238 2000-11-19 Mark Mitchell <mark@codesourcery.com>
14239
14240 * decl.c (init_decl_processing): Correct name of pure virtual
14241 function under the new ABI.
14242 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14243 (throw_bad_typeid): Likewise for bad typeid function.
14244
14245 2000-11-18 Mark Mitchell <mark@codesourcery.com>
14246
14247 * decl.c (grokparms): Don't even function types of `void' type,
14248 either.
14249 * mangle.c (write_type): Don't crash when confronted with the
14250 error_mark_node.
14251
14252 * decl.c (grokparms): Don't create parameters of `void' type.
14253
14254 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
14255
14256 * lex.c (mark_impl_file_chain): Delete.
14257 (init_parse): Remove call to ggc_add_string_root. No need to
14258 ggc_strdup a string constant. Do not add impl_file_chain to GC
14259 roots.
14260 (handle_pragma_implementation): No need to ggc_strdup main_filename.
14261
14262 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14263
14264 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14265
14266 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14267
14268 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14269 * decl.c (grokdeclarator): Don't reject void parms here.
14270 (require_complete_types_for_parms): Simplify, use
14271 complete_type_or_else.
14272 (grokparms): Remove bitrot. Remove funcdef parm.
14273 Deal with ellipsis parm lists here.
14274 * semantics.c (finish_parmlist): Don't append void_list_node
14275 here. Set PARMLIST_ELLIPSIS_P.
14276
14277 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14278
14279 * typeck2.c (incomplete_type_error): Reorganize to avoid
14280 excessive diagnostics.
14281
14282 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
14283
14284 * lex.c (struct impl_files, internal_filename): Constify a char *.
14285
14286 2000-11-16 Mark Mitchell <mark@codesourcery.com>
14287
14288 * mangle.c (write_special_name_constructor): Don't generate
14289 assembler junk when confronted with an old-style constructor.
14290 (write_special_name_destructor): Likewise.
14291 (mangle_decl_string): Do it here instead.
14292
14293 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
14294
14295 * call.c (op_error): Make error messages clearer.
14296
14297 2000-11-15 Mark Mitchell <mark@codesourcery.com>
14298
14299 * decl.c (wrapup_globals_for_namespace): Don't mark things
14300 TREE_ASM_WRITTEN when they're not.
14301
14302 2000-11-15 Jason Merrill <jason@redhat.com>
14303
14304 * typeck2.c (friendly_abort): Uncount the error before handing
14305 off to fancy_abort.
14306
14307 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
14308
14309 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14310
14311 2000-11-14 Mark Mitchell <mark@codesourcery.com>
14312
14313 * class.c (build_vtbl_initializer): Fix typo in comment.
14314 * typeck.c (expr_sizeof): Don't crash on errors.
14315
14316 2000-11-14 Jim Wilson <wilson@redhat.com>
14317
14318 * lang-specs.h: Add %2 after %(cc1_options).
14319
14320 2000-11-14 Richard Henderson <rth@redhat.com>
14321
14322 * typeck.c (c_sizeof): Be strict about casting result value
14323 back to c_size_type_node.
14324 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14325
14326 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
14327
14328 * typeck.c (build_unary_op): Use boolean_increment from
14329 c-common.c, moving the relevant code there.
14330
14331 2000-11-11 Jason Merrill <jason@redhat.com>
14332
14333 * typeck.c (mark_addressable): Don't call put_var_into_stack.
14334
14335 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14336 in inlines.
14337
14338 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14339
14340 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14341 * lex.c (copy_lang_decl): Likewise.
14342
14343 2000-11-09 Mark Mitchell <mark@codesourcery.com>
14344
14345 * dump.c (cp_dump_tree): Don't dump function bodies here.
14346
14347 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14348 (dump.o): Update dependency list.
14349 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14350 (flag_dump_translation_unit): Likewise.
14351 (CP_TYPE_QUALS): Adjust definition.
14352 (DECL_C_BIT_FIELD): Remove.
14353 (SET_DECL_C_BIT_FIELD): Likewise.
14354 (CLEAR_DECL_C_BIT_FIELD): Likewise.
14355 (add_maybe_template): Likewise.
14356 (strip_array_types): Likewise.
14357 (dump_node_to_file): Likewise.
14358 (cp_dump_tree): New function.
14359 * decl.c (init_decl_processing): Set lang_dump_tree.
14360 * decl2.c (flag_dump_translation_unit): Remove.
14361 * dump.c: Move most of it to ../c-dump.c.
14362 (cp_dump_tree): New function.
14363 * pt.c (add_maybe_template): Remove.
14364 * typeck.c (strip_array_types): Likewise.
14365
14366 2000-11-07 Eric Christopher <echristo@redhat.com>
14367
14368 * decl.c (init_decl_processing): Change definition of
14369 __wchar_t to wchar_t. Remove artificial declaration of
14370 wchar_t.
14371 * lex.c: Change instances of __wchar_t to wchar_t.
14372
14373 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
14374
14375 * lex.c (do_identifier): Don't lookup_name for operators.
14376 * parse.y (operator): Save looking_for_typename.
14377 (unoperator): Restore it.
14378 * spew.c (frob_opname): Use nth_token for lookahead.
14379
14380 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
14381
14382 * decl.c (grok_op_properties): Always use coerce_new_type and
14383 coerce_delete_type.
14384 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
14385 exception specification. Tidy up.
14386 (coerce_delete_type): Preserve exception specification. Tidy up.
14387
14388 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
14389
14390 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
14391 (push_binding_level), error.c (cp_tree_printer), pt.c
14392 (process_partial_specialization, tsubst_template_arg_vector),
14393 search.c (lookup_member): Use memset () instead of bzero ().
14394
14395 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
14396
14397 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
14398
14399 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
14400
14401 * Make-lang.in (c++.distdir): Remove.
14402
14403 2000-11-04 Mark Mitchell <mark@codesourcery.com>
14404
14405 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
14406 declarations from different namespaces to be combined.
14407
14408 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
14409
14410 * decl.c: Include tm_p.h.
14411
14412 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
14413
14414 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
14415
14416 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
14417
14418 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
14419 (build_overload_value), repo.c (open_repo_file), xref.c
14420 (open_xref_file): Use strchr () and strrchr () instead of index ()
14421 and rindex ().
14422
14423 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
14424
14425 * call.c (build_over_call): Call fold on the CALL_EXPR.
14426
14427 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
14428
14429 * error.c (dump_template_decl): Separate template hearders with
14430 space not comma.
14431
14432 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
14433
14434 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
14435 TS_* flags with corresponding TFF_*. Adjust prototypes of
14436 functions (which used to take a tree_string_flags) to take an int.
14437
14438 * cp-tree.h (enum tree_string_flags): Remove
14439 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
14440 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
14441 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14442 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14443 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
14444 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
14445 (type_as_string, decl_as_string, expr_as_string,
14446 context_as_string): Adjust prototype.
14447
14448 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
14449 instead of TS_PLAIN.
14450
14451 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
14452 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
14453 plain `0'.
14454
14455 2000-10-30 Mark Mitchell <mark@codesourcery.com>
14456
14457 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
14458 (linkage_kind): New enumeration.
14459 (decl_linkage): New function.
14460 * decl2.c (comdat_linkage): Extend comment.
14461 * error.c (dump_function_decl): Print the arguments used to
14462 instantiate a template, even when not printing the type of the
14463 function.
14464 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
14465 not TREE_PUBLIC, to test for external linkage.
14466 * tree.c (decl_linkage): New function.
14467
14468 2000-10-28 Mark Mitchell <mark@codesourcery.com>
14469
14470 * pt.c (instantiate_decl): Always instantiate static data members
14471 initialized in-class.
14472
14473 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
14474
14475 * Make-lang.in: Move all build rules here from Makefile.in,
14476 adapt to new context. Wrap all rules that change the current
14477 directory in parentheses. Expunge all references to $(P).
14478 When one command depends on another and they're run all at
14479 once, use && to separate them, not ;. Add OUTPUT_OPTION to
14480 all object-file generation rules. Delete obsolete variables.
14481
14482 * Makefile.in: Delete.
14483 * config-lang.in: Delete outputs= line.
14484
14485 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
14486
14487 * error.c (dump_function_decl): Print no space between
14488 `ptr-operator' the `type-specifier' of the return type.
14489 (dump_type_prefix): Make sure we put space at the appropriate
14490 place.
14491
14492 2000-10-23 Jason Merrill <jason@redhat.com>
14493
14494 * call.c (equal_functions): Also call decls_match for extern "C" fns.
14495
14496 2000-10-22 Jason Merrill <jason@redhat.com>
14497
14498 * call.c (build_conditional_expr): Use ocp_convert to force
14499 rvalue conversion.
14500
14501 2000-10-22 Mark Mitchell <mark@codesourcery.com>
14502
14503 * call.c (standard_conversion): Use RVALUE_CONVs for all
14504 expressions that satisfy lvalue_p, not just those that satisfy
14505 real_lvalue_p.
14506
14507 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
14508
14509 * typeck.c (c_sizeof): Return an expression of `size_t' type,
14510 not one with TYPE_IS_SIZETYPE set.
14511 (dubious_conversion_warnings): Remove special-case code.
14512
14513 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
14514
14515 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
14516 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
14517 (dump_type_prefix): Print vector-of-int as 'int vector'.
14518 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
14519 * tree.c (walk_tree): Handle VECTOR_TYPE.
14520
14521 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
14522
14523 2000-10-21 Jason Merrill <jason@redhat.com>
14524
14525 * parse.y (operator): Set got_object from got_scope.
14526 Set looking_for_typename.
14527 * decl.c (lookup_name_real): Clear val after setting from_obj.
14528 Reorganize diagnostic.
14529
14530 2000-10-20 Jason Merrill <jason@redhat.com>
14531
14532 * tree.c (walk_tree): Don't walk into default args.
14533
14534 * error.c (dump_expr): Use host_integerp.
14535
14536 2000-10-20 David Edelsohn <edelsohn@gnu.org>
14537
14538 * typeck2.c (abstract_virtuals_error): Use "because" instead of
14539 "since" in error message.
14540
14541 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14542
14543 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
14544
14545 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
14546
14547 * decl.c (revert_static_member_fn): Fixed typo.
14548
14549 2000-10-19 Mark Mitchell <mark@codesourcery.com>
14550
14551 * class.c (subobject_offset_fn): New type.
14552 (dfs_record_base_offsets): Remove.
14553 (record_base_offsets): Likewise.
14554 (dfs_search_base_offsets): Likewise.
14555 (record_subobject_offset): New function.
14556 (check_subobject_offset): Likewise.
14557 (walk_subobject_offsets): Likewise.
14558 (record_subobject_offsets): Likewise.
14559 (layout_conflict_p): Reimplement.
14560 (layout_nonempty_base_or_field): Correct handling of type
14561 conflicts during layout.
14562 (layout_empty_base): Likewise.
14563 (build_base_field): Adjust to handle new representation of empty
14564 base offset table.
14565 (build_base_fields): Likewise.
14566 (layout_virtual_bases): Likewise.
14567 (splay_tree_compare_integer_csts): New function.
14568 (layout_class_type): Use a splay_tree, rather than a varray, to
14569 represent the offsets of empty bases.
14570
14571 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
14572 * decl.c (select_decl): Don't return declarations that are
14573 DECL_ANTICIPATED.
14574
14575 2000-10-18 Mark Mitchell <mark@codesourcery.com>
14576
14577 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
14578 (fake_std_node): New macro.
14579 * decl.c (in_std): Rename to ...
14580 (in_fake_std): ... this.
14581 (flag_no_builtin): Remove.
14582 (flag_no_nonansi_builtin): Likewise.
14583 (walk_namespaces_r): Use fake_std_node.
14584 (push_namespace): Use std_identifier.
14585 (pop_namespace): Use in_fake_std.
14586 (lookup_name_real): Use fake_std_node.
14587 (init_decl_processing): When -fhonor-std, create the `std'
14588 namespace. Don't create a dummy fake_std_node in that case.
14589 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
14590 (builtin_function): Put builtins whose names don't begin
14591 with `_' in the std namespace.
14592 * decl2.c (flag_no_builtin): Remove.
14593 (flag_no_nonansi_builtin): Likewise.
14594 (set_decl_namespace): Use fake_std_node.
14595 (validate_nonmember_using_decl): Likewise.
14596 (do_using_directive): Likewise.
14597 (handle_class_head): Likewise.
14598 * dump.c (dequeue_and_dump): Likewise.
14599 * except.c (init_exception_processing): Use std_identifier.
14600 * init.c (build_member_call): Use fake_std_node.
14601 * rtti.c (init_rtti_processing): Use std_identifier.
14602
14603 2000-10-17 Mark Mitchell <mark@codesourcery.com>
14604
14605 * cp-tree.h (back_end_hook): Remove declaration.
14606 * decl2.c (back_end_hook): Remove definition.
14607
14608 * dump.c (dequeue_and_dump): Dump TREE_USED.
14609
14610 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
14611
14612 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
14613
14614 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
14615
14616 * decl.c (WINT_TYPE): Define.
14617 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
14618 c_size_type_node, signed_size_type_node and wint_type_node.
14619
14620 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
14621
14622 * decl2.c (warn_missing_format_attribute): New variable.
14623 (lang_decode_option): Decode -Wmissing-format-attribute.
14624
14625 2000-10-16 Mark Mitchell <mark@codesourcery.com>
14626
14627 * typeck.c (qualify_type): Remove.
14628 (composite_pointer_type): Fix handling of conversions to `cv void*'.
14629
14630 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14631
14632 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
14633
14634 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14635
14636 * Makefile.in (parse.c, parse.h): Create atomically.
14637
14638 2000-10-12 Mark Mitchell <mark@codesourcery.com>
14639
14640 * class.c (current_obstack): Remove.
14641 * decl.c (ggc_p): Remove.
14642 (start_decl): Don't use decl_tree_cons.
14643 (grokdeclarator): Don't use build_decl_list.
14644 (start_function): Don't use decl_tree_cons.
14645 (finish_function): Don't mess with obstacks.
14646 * decl2.c (grok_x_components): Don't use build_decl_list.
14647 * lex.c (make_call_declarator): Don't call decl_tree_cons.
14648 (implicitly_declare_fn): Don't call build_decl_list.
14649 * parse.y (frob_specs): Don't call build_decl_list or
14650 decl_tree_cons.
14651 (expr_or_declarator_intern): Don't call decl_tree_cons.
14652 (primary): Don't call build_decl_list.
14653 (fcast_or_absdcl): Likewise.
14654 (typed_declspecs): Don't call decl_tree_cons.
14655 (reserved_declspecs): Don't call build_decl_list.
14656 (declmods): Likewise.
14657 (reserved_typespecquals): Likewise.
14658 (aggr): Likewise.
14659 (new_type_id): Likewise.
14660 (cv_qualifiers): Likewise.
14661 (after_type_declarator_intern): Likewise.
14662 (notype_declarator_intern): Likewise.
14663 (absdcl_intern): Likewise.
14664 (named_parm): Likewise.
14665 * pt.c (most_specialized_class): Likewise.
14666 * repo.c (temporary_obstack): Make it a structure, not a pointer.
14667 (init_repo): Initialize it.
14668 * search.c (current_obstack): Remove.
14669 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
14670
14671 2000-10-09 Richard Henderson <rth@cygnus.com>
14672
14673 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
14674 (c++ language support bits for libgcc): Remove.
14675 (c++.clean): Remove cplib2.txt cleanup.
14676 * config-lang.in (headers, lib2funcs): Remove.
14677
14678 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
14679 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
14680 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
14681 * inc/new.h, inc/typeinfo: Remove files.
14682
14683 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
14684
14685 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
14686 defined.
14687 (init_decl_processing): Initialize intmax_type_node and
14688 uintmax_type_node.
14689
14690 2000-10-06 Richard Henderson <rth@cygnus.com>
14691
14692 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
14693 (original_result_rtx): Remove.
14694 * decl.c (save_function_data): Don't clear x_result_rtx.
14695 (mark_lang_function): Don't mark it either.
14696 * expr.c (fixup_result_decl): Remove.
14697 * semantics.c (genrtl_named_return_value): Frob the return decl
14698 before calling emit_local_var.
14699 (genrtl_finish_function): Don't call fixup_result_decl.
14700 Always emit the jump to return_label.
14701
14702 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
14703
14704 * pt.c (lookup_template_class): Set current access for enum.
14705 (tsubst_enum): Set file & line for enum decl.
14706
14707 * spew.c (yylex): Remove unused variable.
14708
14709 2000-10-05 Richard Henderson <rth@cygnus.com>
14710
14711 * semantics.c (genrtl_finish_function): Don't init or check
14712 can_reach_end; remove noreturn and return value checks.
14713
14714 2000-10-05 Tom Tromey <tromey@cygnus.com>
14715
14716 * init.c (build_java_class_ref): Use `build_static_name' with a
14717 suffix, not a prefix, to build the class object's name.
14718
14719 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14720
14721 * cp-tree.h (access_kind): Fix comment typo.
14722 * decl2.c (grokfield): Fix diagnostic typo.
14723 * semantics.c (finish_template_type): Fix comment typo.
14724 (finish_qualified_object_call_expr): Likewise.
14725
14726 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14727
14728 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
14729 tsubsting fails.
14730
14731 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14732
14733 * spew.c (frob_id): New static function.
14734 (frob_opname): Use it.
14735 (yylex): Use it.
14736
14737 2000-10-01 Mark Mitchell <mark@codesourcery.com>
14738
14739 * decl.c (lang_mark_false_label_stack): Remove.
14740 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
14741
14742 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
14743
14744 * gxxint.texi: Use @email for formatting email addresses.
14745
14746 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
14747
14748 * error.c: Remove direct obstack manipulation. Replace with
14749 output_buffer-based formatting. Adjust calls to removed macros.
14750 (obstack_chunk_alloc, obstack_chunk_free): Remove.
14751 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
14752 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
14753
14754 2000-09-24 Mark Mitchell <mark@codesourcery.com>
14755
14756 * ir.texi: Move to ../c-tree.texi.
14757
14758 2000-09-20 Jason Merrill <jason@redhat.com>
14759
14760 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
14761
14762 2000-09-21 Andreas Jaeger <aj@suse.de>
14763
14764 * errfn.c: Move declaration of cp_printer and cp_printers to ...
14765 * cp-tree.h: ... here.
14766
14767 * error.c: Remove declaration of cp_printer.
14768
14769 2000-09-20 Mark Mitchell <mark@codesourcery.com>
14770
14771 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
14772
14773 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
14774
14775 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
14776 users.
14777
14778 2000-09-18 Mark Mitchell <mark@codesourcery.com>
14779
14780 * decl.c (start_function): Robustify.
14781
14782 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14783
14784 * cp-tree.h (check_function_format): Accept a `status' parameter.
14785
14786 * call.c, typeck.c: Updates calls to `check_function_format'.
14787
14788 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
14789
14790 * decl2.c (handle_class_head): Always push some scope even
14791 in the error case.
14792
14793 2000-09-16 Mark Mitchell <mark@codesourcery.com>
14794
14795 * cp-tree.h (struct cp_language_function): Remove
14796 x_scope_stmt_stack and name_declared.
14797 (current_scope_stmt_stack): Remove.
14798 (function_name_declared_p): New macro.
14799 (struct lang_decl_flags): Use c_lang_decl as a base class.
14800 (context): Remove.
14801 (struct lang_decl): Replace saved_tree with context.
14802 (DECL_FRIEND_CONTEXT): Adjust accordingly.
14803 (SET_DECL_FRIEND_CONTEXT): Likewise.
14804 (DECL_VIRTUAL_CONTEXT): Likewise.
14805 (DECL_SAVED_TREE): Remove.
14806 (C_DECLARED_LABEL_FLAG): Likewise.
14807 (cplus_expand_expr_stmt): Don't declare.
14808 (add_decl_stmt): Likewise.
14809 (add_scope_stmt): Likewise.
14810 * decl.c (mark_stmt_tree): Remove.
14811 (case_compare): Likewise.
14812 (finish_case_label): Use c_add_case_label.
14813 (init_decl_processing): Set more language-specific hooks.
14814 (build_enumerator): Fix typo in comment.
14815 (cplus_expand_expr_stmt): Remove.
14816 (mark_lang_function): Use mark_c_language_function.
14817 (lang_mark_tree): Use c_mark_lang_decl.
14818 * decl2.c: Change order of inclusion.
14819 * except.c: Likewise.
14820 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
14821 back on c_expand_expr.
14822 * friend.c: Include expr.h.
14823 * init.c: Change order of inclusion.
14824 * Makefile.in: Update dependencies.
14825 * lex.h (free_lang_decl_chain): Remove.
14826 * optimize.c (maybe_clone_body): Use function_name_declared_p.
14827 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
14828 it doesn't exist.
14829 (instantiate_decl): Use function_name_declared_p.
14830 * semantics.c (lang_expand_expr_stmt): Remove.
14831 (set_current_function_name_declared): Likewise.
14832 (current_function_name_declared): Likewise.
14833 (begin_compound_stmt): Use function_name_declared_p.
14834 (add_decl_stmt): Remove.
14835 (setup_vtbl_ptr): Use function_name_declared_p.
14836 (add_scope_stmt): Remove.
14837 (current_scope_stmt_stack): New function.
14838 (cp_expand_stmt): Don't handle SCOPE_STMTs.
14839 (expand_body): Use function_name_declared_p.
14840 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
14841 * typeck.c: Change order of includes.
14842 (convert_sequence): Remove.
14843
14844 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
14845
14846 * lex.c (reswords): Add _Complex.
14847
14848 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14849
14850 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
14851
14852 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
14853
14854 * init.c (begin_init_stmts): Don't use // comments.
14855
14856 2000-09-12 Jason Merrill <jason@redhat.com>
14857
14858 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
14859 all non-extern arrays.
14860
14861 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
14862 typenames, too. Downgrade complaint to pedwarn.
14863 (xref_tag): Warn about surprising behavior of 'friend struct T'.
14864 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
14865 'class This::Inherited'.
14866
14867 2000-09-12 Mark Mitchell <mark@codesourcery.com>
14868
14869 * decl.c (finish_case_label): Given the LABEL_DECL a
14870 DECL_CONTEXT.
14871
14872 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
14873
14874 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
14875 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
14876 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14877 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14878 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
14879 New macros.
14880 (sorry_for_unsupported_tree, print_scope_operator,
14881 print_left_paren, print_right_paren, print_left_bracket,
14882 print_right_bracket, print_whitespace): Likewise.
14883 (aggr_variety): Rename to class_key_or_enum.
14884 (print_type): Rename to print_type_id.
14885 (print_type_specifier_seq, print_simple_type_specifier,
14886 print_elaborated_type_specifier,
14887 print_rest_of_abstract_declarator,
14888 print_parameter_declaration_clause, print_exception_specification,
14889 print_nested_name_specifier, print_template_id,
14890 typedef_original_name, print_template_argument_list_start,
14891 print_template_argument_list_end): New functions.
14892
14893 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
14894
14895 * ir.texi: Add more documentation.
14896
14897 2000-09-11 Mark Mitchell <mark@codesourcery.com>
14898
14899 * cp-tree.h (struct saved_scope): Remove x_function_parms.
14900 (current_function_parms): Don't define.
14901 (struct cp_language_function): Remove parms_stored.
14902 (current_function_just_assigned_this): Don't define.
14903 (current_function_parms_stored): Likewise.
14904 (static_ctors): Declare.
14905 (static_dtors): Likewise.
14906 (SF_EXPAND): Don't define.
14907 (expand_start_early_try_stmts): Remove declaration.
14908 (store_parm_decls): Likewise.
14909 * decl.c (static_ctors): Don't declare.
14910 (static_dtors): Likewise.
14911 (struct binding_level): Remove this_block.
14912 (poplevel): Remove dead code.
14913 (set_block): Likewise.
14914 (mark_binding_level): Don't mark this_block.
14915 (mark_saved_scope): Don't mark x_function_parms.
14916 (init_decl_processing): Don't add current_function_parms as a GC
14917 root.
14918 (check_function_type): Change prototype.
14919 (start_function): Remove RTL-generation code.
14920 (expand_start_early_try_stmts): Remove.
14921 (store_parm_decls): Give it internal linkage. Remove
14922 RTL-generation code.
14923 (finish_function): Remove RTL-generation code.
14924 * decl2.c (static_ctors): Fix formatting.
14925 (static_dtors): Likewise.
14926 * method.c (use_thunk): Don't call store_parm_decls.
14927 (synthesize_method): Likewise.
14928 * optimize.c (maybe_clone_body): Likewise.
14929 * parse.y (fn.def2): Likewise.
14930 (.set_base_init): Likewise.
14931 (nodecls): Likewise.
14932 * pt.c (instantiate_decl): Likewise.
14933 * rtti.c (synthesize_tinfo_fn): Likewise.
14934 * semantics.c (genrtl_try_block): Simplify.
14935 (expand_body): Use genrtl_start_function and
14936 genrtl_finish_function.
14937 (genrtl_start_function): New function.
14938 (genrtl_finish_function): Likewise.
14939
14940 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
14941
14942 * error.c (cp_tree_printer, case 'P'): Append break.
14943
14944 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
14945
14946 * cp-tree.h (frob_opname): Declare.
14947 * parse.y (saved_scopes): New static variable.
14948 (cp_parse_init): Adjust.
14949 (do_id): If lastiddecl is NULL, do do_identifier.
14950 (operator): Save scope information.
14951 (unoperator): New reduction. Restore scope information.
14952 (operator_name): Append unoperator. Call frob_opname.
14953 * spew.c (frob_opname): Define.
14954
14955 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
14956
14957 * decl.c, rtti.c: Include defaults.h if not already included.
14958 Don't define the *_TYPE_SIZE macros.
14959
14960 2000-09-09 Mark Mitchell <mark@codesourcery.com>
14961
14962 * cp-tree.h (push_switch): Change prototype.
14963 (check_cp_case_value): Remove declaration.
14964 (decl_constant_value): Likewise.
14965 * decl.c (struct cp_switch): Add switch_stmt and cases.
14966 (case_compare): New function.
14967 (push_switch): Set switch_stmt. Initialize cases.
14968 (pop_switch): Clean up cases.
14969 (define_case_label): Rename to ...
14970 (finish_case_label): ... this. Do semantic analysis for case
14971 labels here.
14972 (start_function): Correct comment.
14973 * decl2.c (check_cp_case_value): Remove.
14974 * expr.c (do_case): Remove.
14975 * pt.c (tsubst_expr): Adjust call to finish_case_label.
14976 * semantics.c (genrtl_do_poplevel): Remove declaration.
14977 (RECHAIN_STMTS): Remove.
14978 (finish_break_stmt): Use build_break_stmt.
14979 (finish_continue_stmt): Use build_continue_stmt.
14980 (finish_switch_cond): Adjust condition here, rater than in
14981 c_expand_start_case.
14982 (finish_case_label): Remove.
14983 * typeck.c (c_expand_return): Remove.
14984 (c_expand_start_case): Likewise.
14985
14986 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
14987
14988 * ir.texi: Document type nodes.
14989
14990 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14991
14992 * cp-tree.h (init_cp_semantics): Declare.
14993 (genrtl_try_block): Don't declare.
14994 (genrtl_handler): Likewise.
14995 (genrtl_catch_block): Likewise.
14996 (genrtl_ctor_stmt): Likewise.
14997 (genrtl_subobject): Likewise.
14998 (genrtl_do_poplevel): Likewise.
14999 (genrtl_named_return_value): Likewise.
15000 * lex.c (init_parse): Call init_cp_semantics.
15001 * semantics.c (genrtl_try_block): Give it internal linkage.
15002 (genrtl_handler): Likewise.
15003 (genrtl_catch_block): Likewise.
15004 (genrtl_ctor_stmt): Likewise.
15005 (genrtl_subobject): Likewise.
15006 (genrtl_do_poplevel): Likewise.
15007 (genrtl_named_return_value): Likewise.
15008 (lang_expand_stmt): Rename to ...
15009 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
15010 (init_cp_semantics): Define.
15011
15012 * decl.c (initialize_local_var): Remove RTL-generating code.
15013 * semantics.c (genrtl_try_block): Fix formatting.
15014
15015 Move statement-tree facilities from C++ to C front-end.
15016 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15017 (void_zero_node): Remove.
15018 (stmt_tree): Likewise.
15019 (scope_chain): Adjust.
15020 (language_function): Rename to cp_language_function.
15021 (cp_function_chain): Adjust.
15022 (current_stmt_tree): Remove.
15023 (last_tree): Likewise.
15024 (last_expr_type): Likewise.
15025 (struct lang_decl): Adjust.
15026 (STMT_IS_FULL_EXPR_P): Remove.
15027 (add_tree): Remove.
15028 (begin_stmt_tree): Likewise.
15029 (finish_stmt_tree): Likewise.
15030 (walk_tree_fn): Likewise.
15031 (walk_stmt_tree): Likewise.
15032 * class.c (finish_struct): Replace use of add_tree with add_stmt.
15033 * decl.c (mark_stmt_tree): Adjust type.
15034 (init_decl_processing): Don't build void_zero_node.
15035 (initialize_local_var): Adjust usage of current_stmt_tree.
15036 (finish_enum): Use add_stmt, not add_tree.
15037 (save_function_data): Adjust use of language_function.
15038 (finish_constructor_body): Use add_stmt, not add_tree.
15039 (finish_destructor_body): Likewise.
15040 (push_cp_function_context): Adjust use of language_function.
15041 (pop_cp_function_context): Likewise.
15042 (mark_lang_function): Likewise.
15043 (mark_cp_function_context): Likewise.
15044 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15045 (build_vec_init): Likewise.
15046 * semantics.c (SET_LAST_STMT): Remove.
15047 (RECHAIN_STMTS): Don't use it.
15048 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
15049 (current_stmt_tree): Define.
15050 (add_tree): Remove.
15051 (finish_goto_stmt): Use add_stmt, not add_tree.
15052 (finish_expr_stmt): Likewise.
15053 (begin_if_stmt): Likewise.
15054 (finish_then_clause): Likewise.
15055 (begin_while_stmt): Likewise.
15056 (begin_do_stmt): Likewise.
15057 (finish_return_stmt): Likewise.
15058 (begin_for_stmt): Likewise.
15059 (finish_break_stmt): Likewise.
15060 (finish_continue_stmt): Likewise.
15061 (begin_switch_stmt): Likewise.
15062 (finish_case_label): Likewise.
15063 (begin_try_block): Likewise.
15064 (begin_function_try_block): Likewise.
15065 (begin_handler): Likewise.
15066 (begin_catch_block): Likewise.
15067 (begin_compound_stmt): Likewise.
15068 (begin_asm_stmt): Likewise.
15069 (finish_asm_stmt): Likewise.
15070 (finish_label_stmt): Likewise.
15071 (add_decl_stmt): Likewise.
15072 (finish_subobject): Likewise.
15073 (finish_decl_cleanup): Likewise.
15074 (finish_named_return_value): Likewise.
15075 (setup_vtbl_ptr): Likewise.
15076 (add_scope_stmt): Likewise.
15077 (finish_stmt_expr): Likewise.
15078 (prune_unused_decls): Remove.
15079 (begin_stmt_tree): Likewise.
15080 (finish_stmt_tree): Likewise.
15081 (prep_stmt): Adjust use of current_stmt_tree.
15082 (lang_expand_stmt): Likewise.
15083 * tree.c (statement_code_p): Remove.
15084 (cp_statement_code_p): New function.
15085 (walk_stmt_tree): Remove.
15086 (init_tree): Set lang_statement_code_p.
15087
15088 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
15089
15090 Integrated preprocessor.
15091
15092 * Make-lang.in, Makefile.in: Remove all references to input.c,
15093 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
15094 * gxx.gperf, hash.h, input.c: Delete.
15095 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
15096 initialized properly.
15097
15098 * class.c (fixup_pending_inline): Take a tree, not a
15099 struct pending_inline *. All callers changed.
15100 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
15101 RID_PROTECTED entries in ridpointers[] array here.
15102 * decl.c (duplicate_decls): Do not refer to struct
15103 pending_inline.
15104 (record_builtin_type, init_decl_processing): Use RID_MAX not
15105 CP_RID_MAX.
15106 (grokdeclarator): Use C_IS_RESERVED_WORD.
15107 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
15108 cpplib.
15109 (grok_x_components): Do not inspect pending_inlines chain.
15110
15111 * cp-tree.h (struct lang_identifier): Add rid_code entry.
15112 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
15113 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
15114 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
15115 TIME_IDENTIFIER_FILEINFO): Kill.
15116 Update prototypes.
15117 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
15118 single 32-bit word.
15119 * parse.y: Call do_pending_inlines unconditionally.
15120 reinit_parse_for_method is now snarf_method. fn.defpen is no
15121 longer necessary. Remove unnecessary <itype> annotation on
15122 SCOPE. Do not refer to end_of_file or struct pending_inline.
15123 * semantics.c (begin_inline_definitions): Call
15124 do_pending_inlines unconditionally.
15125
15126 * lex.c: Remove all code now shared with C front end.
15127 Initialize cpplib properly if USE_CPPLIB. Put reserved words
15128 into the get_identifier table. Rewrite pragma handling to
15129 work with the registry. Move code to save tokens for later
15130 processing to spew.c.
15131
15132 * spew.c: Rewrite everything in terms of token streams instead
15133 of text. Move routines here from lex.c / input.c as
15134 appropriate. GC-mark trees hanging off the pending inlines
15135 chain.
15136
15137 2000-09-06 Mark Mitchell <mark@codesourcery.com>
15138
15139 * NEWS: Mention that the named return value extension has been
15140 deprecated.
15141 * cp-tree.h (original_result_rtx): Define.
15142 (TREE_REFERENCE_EXPR): Remove.
15143 (DECL_VPARENT): Likewise.
15144 (pushdecl_nonclass_level): Likewise.
15145 (store_return_init): Likewise.
15146 (reinit_lang_specific): Likewise.
15147 (genrtl_named_return_value): Change prototype.
15148 * decl.c (original_result_rtx): Remove.
15149 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15150 Do not generate RTL for local variables here.
15151 (store_return_init): Remove.
15152 * semantics.c (genrtl_named_return_value): Simplify. Fold in
15153 store_return_init.
15154 (finish_named_return_value): Adjust accordingly. Warn that this
15155 extension is deprecated.
15156 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15157
15158 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15159
15160 * pt.c (type_unification_real): Replace switch with if.
15161 (unify): Tsubst non-type parms before comparing.
15162
15163 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15164
15165 * error.c (dump_typename): New function, broken out of ...
15166 (dump_type): ... here. Use it.
15167 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15168
15169 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15170
15171 * init.c (build_offset_ref): Deal with namespace scoped
15172 TEMPLATE_ID_EXPRs.
15173
15174 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15175
15176 * class.c (resolve_address_of_overloaded_function): Add
15177 explanation message.
15178 * decl.c (define_case_label): Reformat explanation.
15179 * decl2.c (finish_static_data_member_decl): Likewise.
15180 (grokfield): Likewise.
15181 * friend.c (do_friend): Likewise.
15182
15183 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
15184
15185 * tree.c (walk_tree): Expose tail recursion.
15186 (walk_stmt_tree): New function.
15187 * cp-tree.h: Prototype walk_stmt_tree.
15188 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15189 the BLOCKs directly. If a BLOCK has no variables after
15190 pruning, discard it.
15191 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
15192 restore the line number.
15193
15194 2000-09-05 Mark Mitchell <mark@codesourcery.com>
15195
15196 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15197 (pt.o): Remove dependency on HTAB_H.
15198 * cp-tree.h: Include hashtab.h.
15199 (walk_tree): Change prototype.
15200 (walk_tree_without_duplicates): New function.
15201 * decl.c (check_default_argument): Use it.
15202 * optimize.c (remap_decl): Adjust calls to walk_tree.
15203 (copy_body): Likewise.
15204 (expand_calls_inline): Likewise.
15205 (calls_setjmp_p): Use walk_tree_without_duplicates.
15206 * pt.c: Don't include hashtab.h.
15207 (for_each_template_parm): Use walk_tree_without_duplicates.
15208 * semantics.c (finish-stmt_tree): Likewise.
15209 (expand_body): Likewise.
15210 * tree.c (walk_tree): Add additional parameter.
15211 (walk_tree_without_duplicates): New function.
15212 (count_trees): Use it.
15213 (verify_stmt_tree): Adjust call to walk_tree.
15214 (find_tree): Use walk_tree_without_duplicates.
15215 (no_linkage_check): Likewise.
15216 (break_out_target_exprs): Adjust call to walk_tree.
15217 (cp_unsave): Likewise.
15218
15219 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15220
15221 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15222 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15223 * cp-tree.h (TYPE_BINFO): Adjust comment.
15224 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15225 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15226 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15227 (TYPE_TEMPLATE_INFO): Likewise.
15228 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15229 * class.c (push_nested_class): Likewise.
15230 * decl.c (lookup_name_real): Likewise.
15231 (grokdeclarator): Likewise.
15232 (grok_op_properties): Likewise.
15233 (xref_tag): Likewise.
15234 (xref_basetypes): Likewise.
15235 * decl2.c (constructor_name_full): Likewise.
15236 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15237 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15238 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15239 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15240 (dump_type_suffix): Likewise.
15241 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15242 instead.
15243 (get_aggr_from_typedef): Likewise.
15244 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15245 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15246 (write_template_parm): Likewise.
15247 (write_template_template_parm): Check tree code instead of
15248 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15249 * method.c (build_overload_nested_name): Add
15250 BOUND_TEMPLATE_TEMPLATE_PARM.
15251 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15252 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15253 * pt.c (convert_template_argument): Check tree code instead of
15254 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15255 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15256 (for_each_template_parm): Adjust comment.
15257 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
15258 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15259 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
15260 template_args_equal to compare template template parameter cases.
15261 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15262 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15263 instead.
15264 * tree.c (copy_template_template_parm): Decide whether to create
15265 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15266 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15267 (copy_tree_r): Likewise.
15268 * typeck.c (comptypes): Likewise. Check tree code instead of
15269 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15270
15271 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
15272
15273 * decl.c (finish_function): Move the code for handling functions
15274 marked with the constructor and destructor attributes inside the
15275 expand_p block.
15276
15277 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15278
15279 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15280
15281 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15282
15283 * pt.c (lookup_template_class): Remove abort.
15284 * tree.c (get_type_decl): Allow error_mark_node.
15285
15286 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15287
15288 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15289 TEMPLATE_ID_EXPRs.
15290
15291 2000-09-03 Mark Mitchell <mark@codesourcery.com>
15292
15293 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15294 new ABI mangling.
15295
15296 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
15297
15298 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15299 union tag mismatch error reporting.
15300
15301 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
15302
15303 * call.c (build_scoped_method_call): Check it is not a namespace.
15304
15305 2000-08-30 Jason Merrill <jason@redhat.com>
15306
15307 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15308
15309 * tree.c (bot_manip): Check TREE_CONSTANT rather than
15310 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
15311 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15312
15313 * decl.c (start_function): Always call make_function_rtl.
15314
15315 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
15316
15317 * semantics.c (prune_unused_decls): New function.
15318 (finish_stmt_tree): Call it via walk_tree.
15319
15320 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
15321
15322 * class.c (build_secondary_vtable): Constify a char *.
15323 * decl.c (init_decl_processing): Initialize function_id_node,
15324 pretty_function_id_node, and func_id_node.
15325 * input.c (struct input_source): Constify 'str'.
15326 (feed_input): Constify first argument.
15327 * mangle.c (write_identifier): Constify argument.
15328 * pt.c (mangle_class_name_for_template): Constify argument.
15329
15330 2000-08-29 Mark Mitchell <mark@codesourcery.com>
15331
15332 * typeck.c (mark_addressable): Remove code that pokes around in
15333 RTL.
15334
15335 2000-08-28 Jason Merrill <jason@redhat.com>
15336
15337 * lex.c (file_name_nondirectory): Move to toplev.c.
15338
15339 * cp-tree.h (LOCAL_CLASS_P): New macro.
15340 * class.c (finish_struct_1): Use it.
15341
15342 2000-08-27 Alex Samuel <samuel@codesourcery.com>
15343
15344 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15345 (write_encoding): Pass another argument to write_name.
15346 (write_name): Add ignore_local_scope parameter. Fix handling of
15347 local names.
15348 (write_nested_name): Use write_unqualified_name.
15349 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
15350 (write_template_prefix): Use write_unqualified_name.
15351 (write_component): Remove.
15352 (write_local_name): Add parameter. Use direct local entity to
15353 discriminator calculation.
15354 (write_class_enum_type): Pass another argument to write_name.
15355 (write_template_template_arg): Likewise.
15356 (make_guard_variable): Likewise.
15357
15358 2000-08-27 Jason Merrill <jason@redhat.com>
15359
15360 * decl.c (pushdecl): Matching decls for local externs are found in
15361 the current level. Propagate linkage information from previous
15362 declarations.
15363
15364 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
15365
15366 * ir.texi (Expressions): Fix typo.
15367
15368 2000-08-25 Greg McGary <greg@mcgary.org>
15369
15370 * tree.c (init_tree): Use ARRAY_SIZE.
15371
15372 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
15373
15374 * error.c (cp_tree_printer): Rework.
15375
15376 2000-08-25 Mark Mitchell <mark@codesourcery.com>
15377
15378 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
15379 dyn-string.o.
15380 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
15381 (cp-demangle.o): Remove target.
15382 (dyn-string.o): Likewise.
15383
15384 * decl.c (grokfndecl): Require that `main' return an `int'.
15385 * mangle.c (write_encoding): Don't mangle return types for
15386 conversion functions.
15387
15388 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
15389
15390 * error.c (tree_formatting_info): New data type.
15391 (tree_being_formatted): New macro.
15392 (tree_formatting_flags): Likewise.
15393 (put_whitespace): Likewise.
15394 (print_tree_identifier): Likewise.
15395 (print_identifier): Likewise.
15396 (cp_tree_printer, print_function_argument_list, print_declaration,
15397 print_expression, print_function_declaration,
15398 print_function_parameter, print_type, print_cv_qualifier): New
15399 functions.
15400 (init_error): Initialize lang_printer.
15401
15402 2000-08-24 Jason Merrill <jason@redhat.com>
15403
15404 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
15405 adjustment necessary.
15406
15407 2000-08-24 Greg McGary <greg@mcgary.org>
15408
15409 * cp-tree.h (MAIN_NAME_P): Remove macro.
15410
15411 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
15412
15413 * error.c (print_instantiation_context): Don't forget to flush the
15414 buffer.
15415
15416 2000-08-23 Jason Merrill <jason@redhat.com>
15417
15418 * typeck.c (build_ptrmemfunc): Save the input pmf.
15419
15420 * method.c (process_modifiers): Use same_type_p.
15421
15422 2000-08-23 Mark Mitchell <mark@codesourcery.com>
15423
15424 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
15425 * mangle.c (write_function_type): Change prototype.
15426 (write_encoding): Don't mangle return types for
15427 constructors or destructors.
15428 (write_type): Adjust call to write_function_type.
15429 * pt.c (instantiate_template): Instantiate alternate entry points
15430 when instantiating the main function.
15431
15432 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
15433
15434 * error.c (cp_print_error_function): Don't use embedded '\n' in
15435 output_printf.
15436
15437 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
15438
15439 * decl.c (init_decl_processing): Remove bogus initialization.
15440 * error.c (lang_print_error_function): Restore here.
15441 (init_error): Initialize print_error_function.
15442
15443 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15444
15445 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
15446
15447 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
15448
15449 * Makefile.in (error.o): Depends on diagnostic.h
15450
15451 * cp-tree.h (problematic_instantiation_changed,
15452 record_last_problematic_instantiation, current_instantiation,
15453 print_instantiation_context): Declare.
15454 (maybe_print_template_context): Remove.
15455
15456 * decl.c (init_decl_processing): Set print_error_function to NULL.
15457 (lang_print_error_function): Remove, since we're using a new
15458 machinery.
15459
15460 * error.c: #include diagnostic.h
15461 (function_category): New function.
15462 (cp_diagnostic_starter): Likewise.
15463 (cp_diagnostic_finalizer): Likewise.
15464 (cp_print_error_function): Likewise.
15465 (maybe_print_instantiation_context): Likewise.
15466 (print_instantiation_full_context): Likewise.
15467 (print_instantiation_partial_context): Likewise.
15468 (print_instantiation_context): Define.
15469 (init_error): Initialize diagnostic pager and finalizer.
15470
15471 * pt.c (problematic_instantiation_changed): Define.
15472 (record_last_problematic_instantiation): Likewise.
15473 (current_instantiation): Likewise.
15474 (maybe_print_template_context): Remove.
15475 (print_template_context): Likewise.
15476 (current_tinst_level): Make static to reflect Brendan Kehoe's
15477 change of 1995-04-13.
15478 (push_tinst_level): Call print_instantiation_context.
15479
15480 2000-08-21 Nix <nix@esperi.demon.co.uk>
15481
15482 * lang-specs.h: Do not process -o or run the assembler if
15483 -fsyntax-only.
15484
15485 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
15486
15487 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
15488 variables.
15489 * decl2.c (lang_decode_option): Disable gettext attributes for
15490 -ansi.
15491
15492 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
15493
15494 * lex.c (lang_init_options): Default diagnostic message maximum
15495 length to 80, when line-wrapping.
15496
15497 2000-08-20 Mark Mitchell <mark@codesourcery.com>
15498
15499 * class.c (build_vtbl_initializer): Clear the entire
15500 vtbl_init_data. Start keeping track of the functions for which we
15501 have created vcall offsets here.
15502 (dfs_build_vcall_offset_vtbl_entries): Remove.
15503 (build_vcall_offset_vtbl_entries): Reimplement.
15504 (add_vcall_offset_vtbl_entries_r): New function.
15505 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
15506 computing when vcall offsets are necessary.
15507
15508 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15509
15510 * decl.c (member_function_or_else): Use cp_error ... %T.
15511 (grokdeclarator): Likewise.
15512 (start_method): Likewise.
15513 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
15514
15515 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15516
15517 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
15518 TYPE_DECLs.
15519
15520 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15521
15522 * cp-tree.h (PTRMEM_OK_P): New macro.
15523 (itf_ptrmem_ok): New enumeration value.
15524 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
15525 argument. Diagnose implicit pointer to member.
15526 (instantiate_type): Don't diagnose implicit pointer to member
15527 here. Pass itf_ptrmem_ok if ok. Adjust calls to
15528 resolve_address_of_overloaded_function.
15529 * init.c (build_offset_ref): Set PTRMEM_OK_P.
15530 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
15531 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
15532 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
15533 (build_unary_op): Deal with single non-static member in
15534 microsoft-land.
15535
15536 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15537
15538 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
15539
15540 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15541
15542 * cp-tree.h (enum_name_string): Remove prototype.
15543 (report_case_error): Remove prototype.
15544 * cp/typeck2.c (enum_name_string): Remove.
15545 (report_case_error): Remove.
15546 * error.c (dump_expr): Deal with enum values directly.
15547 Correctly negate integer constant.
15548
15549 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15550
15551 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
15552 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
15553 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
15554 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
15555 (__cxa_vec_new): Use __cxa_vec_new2.
15556 (__cxa_vec_delete): Use __cxa_vec_delete2.
15557
15558 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15559
15560 * vec.cc (__cxa_vec_new): Set "C" linkage.
15561 (__cxa_vec_ctor): Likewise.
15562 (__cxa_vec_cctor): Likewise.
15563 (__cxa_vec_dtor): Likewise.
15564 (__cxa_vec_delete): Likewise.
15565 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
15566 (__cxa_vec_ctor): Likewise.
15567 (__cxa_vec_cctor): Likewise.
15568 (__cxa_vec_dtor): Likewise.
15569 (__cxa_vec_delete): Likewise.
15570
15571 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15572
15573 * class.c (instantiate_type): Reinstate local variable
15574 deleted in previous change.
15575
15576 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
15577 itf_no_attributes.
15578
15579 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15580
15581 * cp-tree.h (instantiate_type_flags): New enumeration.
15582 (instantiate_type): Change parameter.
15583 * class.c (instantiate_type): Adjust prototype. Adjust.
15584 * call.c (standard_conversion): Adjust instantiate_type call.
15585 (reference_binding): Likewise.
15586 (build_op_delete_call): Likewise.
15587 (convert_like_real): Likewise.
15588 * cvt.c (cp_convert_to_pointer): Likewise.
15589 (convert_to_reference): Likewise.
15590 * pt.c (convert_nontype_argument): Likewise.
15591 * typeck.c (build_binary_op): Likewise.
15592 (build_ptrmemfunc): Likewise.
15593 (convert_for_assignment): Likewise.
15594
15595 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15596
15597 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
15598 (current_aggr): Define.
15599 * decl.c (grokdeclarator): Make sure a friend class is an
15600 elaborated type specifier.
15601 * parse.y (current_aggr): Remove static definition.
15602 (cp_parse_init): Adjust.
15603 (structsp): Clear and restore current_aggr.
15604 (component_decl_list): Clear current_aggr.
15605
15606 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
15607 aggregate tag on the typename's context.
15608
15609 * pt.c (tsubst_friend_class): Return error_mark_node, if
15610 parms becomes NULL.
15611 (instantiate_class_template): Ignore error_mark_node friend types.
15612
15613 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
15614
15615 * cvt.c (warn_ref_binding): New static function, broken out of ...
15616 (convert_to_reference): ... here. Use it.
15617
15618 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15619
15620 * parse.y (template_arg): Add rule for template qualified with
15621 global scope.
15622
15623 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15624
15625 * decl2.c (add_function): Reorganize.
15626 (arg_assoc): Do not consider function template decls.
15627
15628 2000-08-11 Jason Merrill <jason@redhat.com>
15629
15630 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
15631 looking inside.
15632
15633 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15634
15635 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
15636 (lookup_nested_tag): Likewise.
15637
15638 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
15639 can be produced.
15640
15641 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15642
15643 * parse.y (named_complex_class_head_sans_basetype): Remove
15644 always true if.
15645
15646 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15647
15648 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
15649 explicit TEMPLATE_ID_EXPR args.
15650 (build_expr_from_tree, case CALL_EXPR): Likewise.
15651
15652 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15653
15654 * decl.c (check_tag_decl): Diagnose typename's which don't
15655 declare anything.
15656
15657 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
15658
15659 * init.c (build_aggr_init): Reject bogus array initializers
15660 early.
15661
15662 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
15663
15664 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
15665 runtime.
15666 * cp/tinfo.cc (__dynamic_cast): Likewise.
15667 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
15668
15669 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
15670
15671 * cvt.c (convert_to_pointer_force): Fix error message when
15672 attempting to cast from ambiguous base.
15673
15674 2000-08-08 Jason Merrill <jason@redhat.com>
15675
15676 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
15677 (tsubst_template_arg_vector): Likewise.
15678
15679 * decl2.c (build_anon_union_vars): Choose the largest field; don't
15680 assume that one will be as large as the union.
15681
15682 2000-08-07 Kazu Hirata <kazu@hxi.com>
15683
15684 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
15685 * decl.c (pop_labels): Likewise.
15686
15687 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
15688
15689 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
15690 specifications.
15691 (__pointer_to_member_type_info): Likewise.
15692 (__base_class_info): Likewise.
15693 (__class_type_info): Likewise.
15694 (__si_class_type_info): Likewise.
15695 (__vmi_class_type_info): Likewise.
15696 * tinfo.cc (__si_class_type_info::__do_find_public_src):
15697 Changed member names to match specifications.
15698 (__vmi_class_type_info::__do_find_public_src): Likewise.
15699 (__si_class_type_info::__do_dyncast): Likewise.
15700 (__vmi_class_type_info::__do_dyncast): Likewise.
15701 (__si_class_type_info::__do_upcast): Likewise.
15702 (__vmi_class_type_info::__do_upcast): Likewise.
15703 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
15704 (__pbase_type_info::__pointer_catch): Likewise.
15705 (__pointer_type_info::__pointer_catch): Likewise.
15706 (__pointer_to_member_type_info::__pointer_catch): Likewise.
15707
15708 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
15709
15710 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
15711 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
15712 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
15713
15714 2000-08-04 Mark Mitchell <mark@codesourcery.com>
15715
15716 * cp-tree.h (add_method): Change prototype.
15717 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
15718 Don't double the size of the method vector in the error case.
15719 (handle_using_decl): Adjust call to add_method.
15720 (add_implicitly_declared_members): Likewise.
15721 (clone_function_decl): Likewise.
15722 * decl2.c (check_classfn): Likewise.
15723 * semantics.c (finish_member_declaration): Likewise.
15724
15725 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
15726
15727 * decl.c (flag_isoc94): New variable.
15728
15729 2000-08-02 Jason Merrill <jason@redhat.com>
15730
15731 * pt.c (do_type_instantiation): Add complain parm; don't complain
15732 if called recursively.
15733 * cp-tree.h, parse.y: Adjust.
15734
15735 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
15736
15737 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
15738 -Wno-strict-prototypes.
15739
15740 * g++spec.c: Adjust type of second argument to
15741 lang_specific_driver, and update code as necessary.
15742
15743 * cp-tree.h: Don't prototype min_precision here.
15744 (my_friendly_assert): Cast expression to void.
15745 * semantics.c (do_poplevel): Initialize scope_stmts.
15746
15747 2000-08-02 Mark Mitchell <mark@codesourcery.com>
15748
15749 * cp-tree.h (DECL_NEEDED_P): Tweak.
15750
15751 2000-07-28 Jason Merrill <jason@redhat.com>
15752
15753 * lang-specs.h: Use %i in rule for .ii files.
15754
15755 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
15756
15757 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
15758
15759 2000-07-30 Mark Mitchell <mark@codesourcery.com>
15760
15761 Allow indirect primary bases.
15762 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
15763 primary_base.
15764 (CLASSTYPE_VFIELD_PARENT): Remove.
15765 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
15766 (BINFO_PRIMARY_BINFO): Remove.
15767 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
15768 (BINFO_VBASE_PRIMARY_P): Likewise.
15769 (BINFO_PRIMARY_BASE_OF): New macro.
15770 (BINFO_INDIRECT_PRIMARY_P): Likewise.
15771 (get_primary_binfo): New function.
15772 * decl.c (lang_mark_tree): Make lang_type::primary_base.
15773 * class.c (vcall_offset_data_s): Rename to ...
15774 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
15775 and add ctor_vtbl_p.
15776 (get_derived_offset): Use get_primary_binfo.
15777 (dfs_mark_primary_bases): Adjust handling of virtual primary
15778 bases.
15779 (mark_primary_bases): Likewise.
15780 (set_primary_base): Take a binfo, not an integer, as a
15781 representation of the primary base.
15782 (indirect_primary_base_p): Remove.
15783 (determine_primary_base): Adjust for indirect primary bases.
15784 (dfs_find_final_overrider): Fix typo in coment.
15785 (update_vtable_entry_for_fn): Use get_primary_binfo.
15786 (layout_nonempty_base_or_field): Tweak.
15787 (build_base_fields): Adjust for new primary base semantics.
15788 (dfs_propagate_binfo_offsets): Remove.
15789 (propagate_binfo_offsets): Rewrite.
15790 (dfs_set_offset_for_shared_vbases): Remove.
15791 (layout_virtual_bases): Don't use it.
15792 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
15793 ABI.
15794 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
15795 CLASSTYPE_VFIELD_PARENT.
15796 (dfs_get_primary_binfo): New function.
15797 (get_primary_binfo): Likewise.
15798 (dump_class_hierarchy_r): Tweak printing of primary bases.
15799 (build_vtbl_initializer): Fix typo in comments. Use
15800 vtbl_init_data.
15801 (build_vcall_and_vbase_vtbl_entries): Likewise.
15802 (build_vbaes_offset_vtbl_entries): Likewise.
15803 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
15804 BV_VCALL_INDEX to handle indirect primary bases.
15805 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
15806 (build_rtti_vtbl_entries): Likewise.
15807 * search.c (get_shared_vbase_if_not_primary): Tweak.
15808 (find_vbase_instance): Likewise.
15809 (binfo_for_vtable): Simplify.
15810 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
15811 (make_binfo): Make it have 11 entries.
15812
15813 2000-07-30 Alex Samuel <samuel@codesourcery.com>
15814
15815 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
15816 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
15817 ascertaining primaryness.
15818 (G): Remove template_args.
15819 (decl_is_template_id): New function.
15820 (write_encoding): Use decl_is_template_id.
15821 (write_name): Likewise. Handle type_decls. Get main variant of
15822 type decls.
15823 (write_nested_name): Likewise.
15824 (write_prefix): Likewise.
15825 (write_template_prefix): Likewise.
15826 (write_special_name_constructor): Remove defunct production from
15827 comment.
15828 (write_bare_function_type): Remove comment about absent parameter.
15829 (write_template_template_arg): Add missing grammar production to
15830 comment.
15831
15832 2000-07-27 Jason Merrill <jason@redhat.com>
15833
15834 * decl.c (duplicate_decls): If common_type produces a non-typedef
15835 type for a typedef, just use the old type.
15836
15837 2000-07-27 Mark Mitchell <mark@codesourcery.com>
15838
15839 * cp-tree.h (function_depth): Declare.
15840 (verify_stmt_tree): Likewise.
15841 (find_tree): Likewise.
15842 * decl.c (function_depth): Give it external linkage.
15843 * optimize.c (optimize_function): Increment and decrement it.
15844 * tree.c (verify_stmt_tree_r): New function.
15845 (verify_stmt_tree): Likewise.
15846 (find_tree_r): Likewise.
15847 (find_tree): Likewise.
15848
15849 2000-07-27 Jason Merrill <jason@redhat.com>
15850
15851 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
15852 TYPE_PTRMEMFUNC_P.
15853 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
15854
15855 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15856
15857 * decl.c (start_cleanup_fn): Mark the function as `inline'.
15858 * decl2.c (get_guard): Call cp_finish_decl, not
15859 rest_of_decl_compilation, for local guards.
15860 * lex.c (do_identifier): Remove unused variable.
15861
15862 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
15863
15864 * parse.y: Add missing ';'.
15865
15866 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15867
15868 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
15869 of `extern "C++"'.
15870
15871 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
15872
15873 Kill strict_prototype. Backwards compatibility only for
15874 non NO_IMPLICIT_EXTERN_C systems.
15875 * cp-tree.h (flag_strict_prototype): Remove.
15876 (strict_prototype): Remove.
15877 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15878 * decl.c (maybe_push_to_top_level): Adjust.
15879 (pop_from_top_level): Adjust.
15880 (decls_match): Only allow sloppy parm matching for ancient
15881 system headers.
15882 (init_decl_processing): Adjust.
15883 (grokdeclarator): Adjust.
15884 * decl2.c (flag_strict_prototype): Remove.
15885 (strict_prototype): Remove.
15886 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15887 (lang_f_options): Remove "strict-prototype".
15888 (unsupported-options): Add "strict-prototype".
15889 * lex.c (do_identifier): Adjust.
15890 (do_scoped_id): Adjust.
15891 * parse.y (empty_parms): Adjust.
15892 * class.c (push_lang_context): Adjust.
15893 (pop_lang_context): Adjust.
15894 * typeck.c (comp_target_parms): Adjust.
15895
15896 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
15897
15898 * decl.c (poplevel): Deal with anonymous variables at for scope.
15899 (maybe_inject_for_scope_var): Likewise.
15900
15901 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
15902
15903 * decl.c: Remove all signal handling code, now done in toplev.c.
15904
15905 2000-07-23 Mark Mitchell <mark@codesourcery.com>
15906
15907 * decl.c (make_rtl_for_nonlocal_decl): Rework.
15908
15909 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
15910 correctly.
15911
15912 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
15913
15914 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
15915 Define my_friendly_assert and my_friendly_abort as macros
15916 which may call friendly_abort. Prototype friendly abort, not
15917 my_friendly_abort or my_friendly_assert.
15918 * decl.c (signal_catch): Report the signal caught in the error
15919 message. Call fatal directly.
15920 * typeck2.c (ack, my_friendly_assert): Delete.
15921 (my_friendly_abort): Rename to friendly_abort. Expect file,
15922 line, and function parameters. Report the abort code, then
15923 call fancy_abort. Do not mask an abort if errors have
15924 already occurred.
15925
15926 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
15927
15928 * typeck.c (comp_target_parms): Remove obsolete parameter.
15929 (comp_target_types): Adjust.
15930
15931 2000-07-17 Jason Merrill <jason@redhat.com>
15932
15933 * typeck.c (mark_addressable): Never set TREE_USED.
15934 * call.c (build_call): Don't abort on calls to library functions
15935 that have been declared normally.
15936
15937 * typeck.c (build_binary_op): Fix grammar in warning.
15938
15939 * exception.cc (__eh_free): Fix prototype.
15940
15941 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
15942
15943 * decl.c (pushdecl): Handle seeing an OVERLOAD in
15944 IDENTIFIER_NAMESPACE_VALUE.
15945
15946 2000-07-16 Mark Mitchell <mark@codesourcery.com>
15947
15948 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
15949 * method.c (use_thunk): Correct handling of vcall offsets.
15950
15951 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
15952
15953 * .cvsignore: parse.h and parse.c have no cp- prefix.
15954
15955 2000-07-13 Mark Mitchell <mark@codesourcery.com>
15956
15957 * .cvsignore: New file.
15958
15959 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
15960
15961 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
15962
15963 2000-07-12 Mark Mitchell <mark@codesourcery.com>
15964
15965 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
15966 * parse.c: Remove.
15967 * parse.h: Likewise.
15968
15969 2000-07-11 Mark Mitchell <mark@codesourcery.com>
15970
15971 * class.c (layout_class_type): Add pointers to virtual bases after
15972 base classes under the old ABI.
15973
15974 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
15975
15976 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
15977 (finish_continue_stmt): Likewise.
15978 (begin_for_stmt): Remove call to note_level_for_for.
15979 (finish_goto_stmt): Change call from build_min_nt
15980 to build_stmt.
15981 (finish_expr_stmt): Likewise.
15982 (begin_if_stmt): Likewise.
15983 (begin_while_stmt): Likewise.
15984 (finish_while_stmt): Likewise.
15985 (finish_return_stmt): Likewise.
15986 (begin_for_stmt): Likewise.
15987 (finish_for_stmt): Likewise.
15988 (finish_break_stmt): Likewise.
15989 (begin_switch_stmt): Likewise.
15990 (finish_case_label): Likewise.
15991 (genrtl_try_block): Likewise.
15992 (begin_try_block): Likewise.
15993 (begin_handler): Likewise.
15994 (begin_compound_stmt): Likewise.
15995 (finish_asm_stmt): Likewise.
15996 (finish_label_stmt): Likewise.
15997 (add_decl_stmt): Likewise.
15998 (finish_subobject): Likewise.
15999 (finish_decl_cleanup): Likewise.
16000 (finish_named_return_value): Likewise.
16001 (setup_vtbl_ptr): Likewise.
16002 (add_scope_stmt): Likewise.
16003 * decl.c (finish_constructor_body): Likewise.
16004 (finish_destructor_body): Likewise.
16005 * optimize.c (copy_body_r): Likewise.
16006 (initialize_inlined_parameters): Likewise.
16007 (declare_return_variable): Likewise.
16008 (expand_call_inline): Likewise.
16009
16010 2000-07-10 Jakub Jelinek <jakub@redhat.com>
16011
16012 * semantics.c (expand_body): Sync interface information
16013 at the end of function body expansion.
16014
16015 2000-07-09 Jason Merrill <jason@redhat.com>
16016
16017 * init.c (build_new_1): Bail early if the call to new fails.
16018
16019 * decl.c (compute_array_index_type): Check specifically for
16020 an INTEGER_CST, not just TREE_CONSTANT.
16021
16022 * decl.c (duplicate_decls): Don't call duplicate_decls on
16023 the DECL_TEMPLATE_RESULT.
16024 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16025 codes.
16026
16027 * error.c (dump_template_bindings): Don't crash if we had an
16028 invalid argument list.
16029
16030 * typeck.c (c_expand_start_case): Do narrowing here.
16031 * semantics.c (finish_switch_cond): Not here.
16032
16033 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
16034
16035 * parse.y (asm_clobbers): Do string concatenation.
16036
16037 2000-07-09 Mark Mitchell <mark@codesourcery.com>
16038
16039 * decl.c (pushtag): Don't put local classes in template functions
16040 on the local_classes list.
16041
16042 2000-07-04 Scott Snyder <snyder@fnal.gov>
16043
16044 * decl2.c (get_guard): Add missing return for old ABI local
16045 variable case.
16046
16047 2000-07-09 Mark Mitchell <mark@codesourcery.com>
16048
16049 * cp-tree.h (char_type_p): New function.
16050 * decl.c (init_decl_processing): Don't initialize
16051 signed_wchar_type_node or unsigned_wchar_type_node.
16052 (complete_array_type): Handle brace-enclosed string-constants.
16053 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
16054 * tree.c (char_type_p): New function.
16055 * typeck2.c (digest_init): Use char_type_p.
16056
16057 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
16058
16059 * pt.c (tsubst): Don't layout type, if it's error_mark.
16060
16061 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
16062
16063 * pt.c (instantiate_pending_templates): Reset template level.
16064
16065 2000-07-05 Jason Merrill <jason@redhat.com>
16066
16067 * call.c (joust): Don't complain about `operator char *()' beating
16068 `operator const char *() const'.
16069
16070 2000-07-04 scott snyder <snyder@fnal.gov>
16071 Jason Merrill <jason@redhat.com>
16072
16073 * repo.c (repo_get_id): Handle the case where a class with virtual
16074 bases has a null TYPE_BINFO_VTABLE.
16075
16076 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
16077 Jason Merrill <jason@redhat.com>
16078
16079 * parse.y (member_init): Just pass in the type.
16080 * init.c (expand_member_init): Handle getting a type.
16081
16082 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16083 Jason Merrill <jason@redhat.com>
16084
16085 * decl.c (finish_function): Warn if a function has no return
16086 statement.
16087 Suggested by Andrew Koenig.
16088 * typeck.c (check_return_expr): Do set current_function_returns_value
16089 if we got an error_mark_node.
16090
16091 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
16092
16093 * decl2.c (push_decl_namespace): Push the original namespace.
16094
16095 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
16096
16097 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
16098 * semantics.c (begin_class_definition): Clear it.
16099
16100 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
16101
16102 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
16103 (genrtl_expr_stmt): Likewise.
16104 (genrtl_decl_stmt): Likewise.
16105 (genrtl_if_stmt): Likewise.
16106 (genrtl_while_stmt): Likewise.
16107 (genrtl_do_stmt): Likewise.
16108 (genrtl_return_stmt): Likewise.
16109 (genrtl_for_stmt): Likewise.
16110 (genrtl_break_stmt): Likewise.
16111 (genrtl_continue_stmt): Likewise.
16112 (genrtl_scope_stmt): Likewise.
16113 (genrtl_switch_stmt): Likewise.
16114 (genrtl_case_label): Likewise.
16115 (genrtl_begin_compound_stmt): Likewise.
16116 (genrtl_finish_compound_stmt): Likewise.
16117 (genrtl_compound_stmt): Likewise.
16118 (genrtl_asm_stmt): Likewise.
16119
16120 * init.c (begin_init_stmts): Remove call to
16121 genrtl_begin_compound_stmt.
16122 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
16123
16124 * semantics.c (lang_expand_stmt): Changed call to
16125 genrtl_compound_stmt to ignore return value.
16126
16127 2000-07-02 Mark Mitchell <mark@codesourcery.com>
16128
16129 * mangle.c (canonicalize_for_substitution): Return the canonical
16130 variant of a type.
16131
16132 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
16133 TYPE_DECL.
16134 * typeck.c (commonparms): Remove obstack manipulations.
16135
16136 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
16137
16138 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16139
16140 * Makefile.in (OBJS): Added ../c-semantics.o.
16141 (OBJDEPS): Likewise.
16142
16143 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16144 ../c-common.h.
16145 (struct stmt_tree): Added comment.
16146 (current_function_name_declared): Removed.
16147 (stmts_are_full_exprs_p): Likewise.
16148 (genrtl_do_pushlevel): Likewise.
16149 (genrtl_clear_out_block): Likewise.
16150 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16151 (DECL_ANON_UNION_ELEMS): Likewise.
16152 (emit_local_var): Likewise.
16153 (make_rtl_for_local_static): Likewise.
16154 (do_case): Likewise.
16155 (expand_stmt): Likewise.
16156 (genrtl_decl_cleanup): Likewise.
16157 (c_expand_asm_operands): Likewise.
16158 (c_expand_return): Likewise.
16159 (c_expand_start_case): Likewise.
16160
16161 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16162 (emit_local_var): Likewise.
16163 (initialize_local_var): Change reference to
16164 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16165 Change reference to stmts_are_full_exprs_p to
16166 current_stmt_tree->stmts_are_full_exprs_p.
16167 (push_cp_function_context): Likewise.
16168
16169 * expect.c (expand_throw): Change reference to
16170 stmts_are_full_exprs_p.
16171
16172 * init.c (build_aggr_init): Change reference to
16173 stmts_are_full_exprs_p.
16174 (build_vec_init): Likewise.
16175
16176 * optimize.c (maybe_clone_body): Change reference to
16177 current_function_name_declared to
16178 cp_function_chain->name_declared.
16179
16180 * pt.c (instantiate_decl): Change reference to
16181 current_function_name_declared to
16182 cp_function_chain->name_declared.
16183
16184 * semantics.c (expand_cond): Moved declaration to c-common.h.
16185 (genrtl_do_pushlevel): Moved to c-semantics.c.
16186 (genrtl_clear_out_block): Likewise.
16187 (genrtl_goto_stmt): Likewise.
16188 (genrtl_expr_stmt): Likewise.
16189 (genrtl_decl_stmt): Likewise.
16190 (gerntl_if_stmt): Likewise.
16191 (genrtl_while_stmt): Likewise.
16192 (genrtl_do_stmt): Likewise.
16193 (genrtl_return_stmt): Likewise.
16194 (genrtl_for_stmt): Likewise.
16195 (genrtl_break_stmt): Likewise.
16196 (genrtl_continue_stmt): Likewise.
16197 (genrtl_scope_stmt): Likewise.
16198 (genrtl_switch_stmt): Likewise.
16199 (genrtl_case_label): Likewise.
16200 (genrtl_begin_compound_stmt): Likewise.
16201 (genrtl_finish_compound_stmt): Likewise.
16202 (genrtl_compound_stmt): Likewise.
16203 (genrtl_asm_stmt): Likewise.
16204 (genrtl_decl_cleanup): Likewise.
16205 (expand_cond): Likewise.
16206 (expand_stmt): Renamed to ...
16207 (lang_expand_stmt): ... this.
16208 (lang_expand_expr_stmt): Initialize.
16209 (set_current_function_name_declared): Likewise.
16210 (stmts_are_full_exprs_p): Likewise.
16211 (current_function_name_declared): Likewise.
16212 (anon_aggr_type_p): Likewise.
16213 (do_poplevel): Change reference to
16214 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16215 Change reference to stmts_are_full_exprs_p to
16216 current_stmt_tree->stmts_are_full_exprs_p.
16217 (add_tree): Likewise.
16218 (finish_expr_stmt): Likewise.
16219 (prep_stmt): Likewise.
16220 (lang_expand_stmt): Likewise.
16221 (begin_compound_stmt): Change reference to
16222 current_function_name_declared to
16223 cp_function_chain->name_declared and call to
16224 current_function_name_declared().
16225 (setup_vtbl_ptr): Likewise.
16226 (genrtl_do_poplevel): Removed.
16227
16228 2000-06-30 Jason Merrill <jason@redhat.com>
16229
16230 * init.c (init_init_processing): Go back to aligning like
16231 double_type_node for old ABI.
16232 (get_cookie_size): Make cookie larger if we get a type that needs
16233 more alignment.
16234 (build_vec_delete): Call it.
16235
16236 * typeck.c (qualify_type_recursive): New fn.
16237 (composite_pointer_type): Use it.
16238 (build_binary_op): Use composite_pointer_type.
16239
16240 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
16241 Jason Merrill <jason@redhat.com>
16242
16243 * typeck.c (check_return_expr): Don't complain about returning
16244 NULL from operator new if -fcheck-new.
16245 * cp-tree.h: Declare flag_check_new here.
16246 * init.c: Not here.
16247
16248 2000-06-28 Alex Samuel <samuel@codesourcery.com>
16249
16250 * mangle.c (find_substitution): Use same_type_p.
16251 (write_encoding): Don't check for substitutions.
16252
16253 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
16254
16255 * parse.y (expr_no_comma_rangle): New non-terminal.
16256 (template_parm): Use it for default parameter case.
16257 (template_arg): Use it.
16258 (expr_no_commas): Remove commented out undefined extensions.
16259 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16260 * parse.h, parse.c: Rebuilt.
16261
16262 2000-06-30 Mark Mitchell <mark@codesourcery.com>
16263
16264 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16265 (finish_asm_stmt): Do it here, instead.
16266
16267 * cp-tree.h (ridpointers): Don't declare.
16268 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16269 (record_builtin_java_type): Likewise.
16270 (init_decl_processing): Likewise.
16271 * lex.c: Move inclusion of lex.h.
16272 (ridpointers): Don't define.
16273 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
16274 RID_MAX.
16275 * lex.h (enum rid): Rename to ...
16276 (enum cp_rid): ... this.
16277 (ridpointers): Don't declare.
16278 * parse.y: Move inclusion of lex.h.
16279 * parse.c: Regenerated.
16280 * spew.c: Move inclusion of lex.h.
16281
16282 * cp-tree.h (struct language_function): Remove temp_name_counter.
16283 (temp_name_counter): Remove.
16284 (get_temp_name): Change prototype.
16285 (get_guard): New function.
16286 (get_guard_cond): Likewise.
16287 (set_guard): Likewise.
16288 * cvt.c (build_up_reference): Adjust call to get_temp_name.
16289 * decl.c (expand_static_init): Use get_guard and friends to
16290 implement guard variables.
16291 * decl2.c (get_temp_name): Assume that the variables created are
16292 always static.
16293 (get_sentry): Rename to ...
16294 (get_guard): ... this. Implement new ABI guard variables.
16295 (get_guard_bits): New function.
16296 (get_guard_cond): Likewise.
16297 (set_guard): Likewise.
16298 (start_static_initialization_or_destruction): Use them.
16299 (do_static_initialization): Replace sentry with guard throughout.
16300 (do_static_destruction): Likewise.
16301 * init.c (create_temporary_var): Add comment.
16302
16303 2000-06-28 Alex Samuel <samuel@codesourcery.com>
16304
16305 * mangle.c (find_substitution): Use same_type_p.
16306 (write_encoding): Don't check for substitutions.
16307
16308 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
16309
16310 * parse.y (expr_no_comma_rangle): New non-terminal.
16311 (template_parm): Use it for default parameter case.
16312 (template_arg): Use it.
16313 (expr_no_commas): Remove commented out undefined extensions.
16314 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16315 * parse.h, parse.c: Rebuilt.
16316
16317 2000-06-29 Mark Mitchell <mark@codesourcery.com>
16318
16319 * cp-tree.h (flag_const_strings): Remove.
16320 (warn_parentheses): Likewise.
16321 (warn_format): Likewise.
16322 (common_type): Likewise.
16323 (default_conversion): Likewise.
16324 (build_binary_op): Likewise.
16325 (cp_build_binary_op): New macro.
16326 * call.c (build_new_op): Use cp_build_binary_op instead of
16327 build_binary_op.
16328 * class.c (build_vtable_entry_ref): Likewise.
16329 * decl.c (expand_static_init): Likewise.
16330 (compute_array_index_type): Likewise.
16331 (build_enumerator): Likewise.
16332 * decl2.c (delete_sanity): Likewise.
16333 (start_static_initialization_or_destruction): Likewise.
16334 * error.c (dump_type_suffix): Likewise.
16335 * init.c (resolve_offset_ref): Likewise.
16336 (build_new): Likewise.
16337 (build_new_1): Likewise.
16338 (build_vec_delete_1): Likewise.
16339 (build_vec_init): Likewise.
16340 (build_delete): Likewise.
16341 * rtti.c (synthesize_tinfo_fn): Likewise.
16342 (synthesize_tinfo_var): Likewise.
16343 * search.c (expand_upcast_fixups): Likewise.
16344 (fixup_all_virtual_upcast_offsets): Likewise.
16345 * typeck.c (build_array_ref): Likewise.
16346 (get_member_function_from_ptrfunc): Likewise.
16347 (build_binary_op): Add parameter.
16348 (pointer_int_sum): Use cp_build_binary_op.
16349 (pointer_diff): Likewise.
16350 (build_modify_expr): Likewise.
16351 (get_delta_difference): Likewise.
16352 (build_ptrmemfunc): Likewise.
16353
16354 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
16355
16356 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16357 * decl.c (create_implicit_typedef): Adjust.
16358 * decl2.c (build_artificial_parm): Adjust.
16359 * method.c (implicitly_declare_fn): Adjust.
16360 * pt.c (push_inline_template_parms_recursive): Adjust.
16361 (process_template_parm): Adjust.
16362 (overloaded_template_name): Adjust.
16363 * semantics.c (finish_template_template_parm): Adjust.
16364
16365 2000-06-28 Mark Mitchell <mark@codesourcery.com>
16366
16367 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
16368 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16369 where to emit thunks.
16370 (build_vtt): Adjust call to build_vtt_inits.
16371 (build_vtt_inits): Add parameter to indicate whether or not
16372 sub-VTTs for virtual bases should be included. Adjust handling of
16373 construction vtables.
16374 (get_matching_base): New function.
16375 (dfs_build_vtt_inits): Rename to ...
16376 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
16377 construction vtables.
16378 (dfs_fixup_binfo_vtbls): Likewise.
16379 (build_ctor_vtbl_groups): Build construction vtables for virtual
16380 bases, too.
16381 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
16382 to build construction vtbls.
16383 (dfs_accumulate_vtbl_inits): Adjust handling of
16384 construction vtables.
16385
16386 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
16387 types correctly.
16388
16389 2000-06-27 Mark Mitchell <mark@codesourcery.com>
16390
16391 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
16392
16393 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
16394
16395 * search.c (hides): Remove.
16396 (is_subobject_of_p): Add most_derived parameter. Use
16397 CANONICAL_BINFO.
16398 (lookup_field_queue_p): Adjust.
16399 (lookup_field_r): Adjust.
16400
16401 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
16402
16403 * decl2.c (handle_class_head): Bash typedefs to the type's main
16404 decl.
16405
16406 2000-06-25 Mark Mitchell <mark@codesourcery.com>
16407
16408 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
16409 (begin_global_stmt_expr): ... this.
16410 (genrtl_finish_stmt_expr): Rename to ...
16411 (finish_global_stmt_expr): ... this.
16412 * init.c (begin_init_stmts): Adjust calls.
16413 (finish_init_stmts): Likewise.
16414 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
16415 (begin_global_stmt_expr): ... this.
16416 (genrtl_finish_stmt_expr): Rename to ...
16417 (finish_global_stmt_expr): ... this.
16418
16419 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16420
16421 * search.c (lookup_member): Fix typo in comment.
16422
16423 2000-06-24 Jason Merrill <jason@redhat.com>
16424
16425 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
16426 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
16427
16428 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16429
16430 * parse.y (complex_direct_notype_declarator): Support global_scope.
16431 * Makefile.in: Adjust conflict count.
16432
16433 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16434
16435 * parse.y (template_arg): Convert TEMPLATE_DECL
16436 that is a template template parameter to
16437 TEMPLATE_TEMPLATE_PARM here.
16438
16439 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16440 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
16441 (copy_template_template_parm): Adjust prototype.
16442 * decl.c (grokdeclarator): Remove dead code.
16443 * pt.c (process_template_parm): Tidy.
16444 (lookup_template_class): Construct nodes in
16445 copy_template_template_parm.
16446 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
16447 lookup_template_class. Use TYPE_TI_TEMPLATE.
16448 * tree.c (copy_template_template_parm): Add NEWARGS
16449 parameter.
16450 (mapcar): Adjust call to copy_template_template_parm.
16451 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
16452 * method.c (build_template_template_parm_names): Change error
16453 code to avoid compilation warning.
16454
16455 * gxxint.texi: Document template template parameter
16456 name mangling.
16457
16458 2000-06-21 Alex Samuel <samuel@codesourcery.com>
16459
16460 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
16461 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
16462 (cp-demangle.o): New rule.
16463 (dyn-string.o): Likewise.
16464 * inc/cxxabi.h (__cxa_demangle): New declaration.
16465
16466 2000-06-22 Mark Mitchell <mark@codesourcery.com>
16467
16468 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
16469 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
16470 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
16471 a tree, not an int.
16472 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
16473 (make_thunk): Change prototype.
16474 (emit_thunk): Rename to use_thunk.
16475 (mangle_thunk): Change prototype.
16476 * class.c (get_derived_offset): Simplify.
16477 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
16478 BV_GENERATE_THUNK_WITH_VTABLE_P.
16479 (build_primary_vtable): Simplify.
16480 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
16481 (dfs_find_base): Remove.
16482 (update_vtable_entry_for_fn): Correct bug in finding the base
16483 where a virtual function was first declared. Figure out whether
16484 or not to emit a vcall-thunk with the vtables in which it appears.
16485 Correct logic for deciding whether to use an ordinary thunk, or a
16486 vcall thunk.
16487 (finish_struct_1): Remove unnecssary code.
16488 (build_vtbl_initializer): Use ssize_int for the running counter of
16489 negative indices.
16490 (build_vtbl_initializer): Only use vcall thunks where necessary.
16491 Mark thunks as needing to be emitted with their vtables, or not.
16492 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
16493 indices. Use size_binop.
16494 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
16495 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
16496 size_binop.
16497 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
16498 (build_vtable_entry): Mark thunks as needing to be emitted with
16499 their vtables, or not.
16500 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
16501 * decl2.c (mark_vtable_entries): Use use_thunk instead of
16502 emit_thunk.
16503 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
16504 information.
16505 * error.c (dump_expr): Use BV_FN.
16506 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
16507 not an int.
16508 * method.c (make_thunk): Likewise.
16509 (emit_thunk): Rename to use_thunk. Allow callers to decide
16510 whether or not to actually emit the thunk. Adjust for changes in
16511 representation of vcall offsets.
16512 * search.c (dfs_get_pure_virtuals): Use BV_FN.
16513 * semantics.c (emit_associated_thunks): New function.
16514 (expand_body): Use it.
16515 * ir.texi: Adjust decriptions of thunks.
16516
16517 2000-06-22 Jason Merrill <jason@redhat.com>
16518
16519 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
16520 (tsubst_friend_function): Copy it here.
16521
16522 * decl.c (grok_op_properties): Fix typo.
16523
16524 * decl2.c (delete_sanity): Clarify warning, avoid failure on
16525 deleting void*.
16526
16527 * pt.c (check_explicit_specialization): Clarify error.
16528
16529 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
16530 an old OVERLOAD when we're declaring a non-function.
16531 (pushdecl, destroy_local_var): Check for error_mark_node.
16532 (warn_extern_redeclared_static): Also bail early if
16533 we're a CONST_DECL.
16534 (push_overloaded_decl): Ignore an old error_mark_node.
16535
16536 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
16537
16538 * call.c (build_x_va_arg): Check if in a template decl.
16539 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
16540
16541 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16542
16543 * class.c (push_lang_context): TYPE_NAME gets you to the Java
16544 types DECLs.
16545 * decl.c (check_goto): Computed gotos assumed OK.
16546
16547 2000-06-20 Jason Merrill <jason@redhat.com>
16548
16549 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
16550 for which we don't need to look for instantiations.
16551
16552 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
16553
16554 * parse.y (program): Always call finish_translation_unit.
16555 * parse.c, parse.h: Rebuilt.
16556
16557 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
16558
16559 * method.c: Don't include hard-reg-set.h.
16560
16561 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
16562
16563 * rtti.c (get_base_offset): Cope when vbase field is in a base.
16564
16565 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
16566
16567 * call.c (build_conditional_expr): Use VOID_TYPE_P.
16568 * cvt.c (cp_convert_to_pointer): Likewise.
16569 (convert_to_void): Likewise.
16570 * error.c (dump_expr): Likewise.
16571 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
16572 * init.c (build_delete): Likewise.
16573 * method.c (emit_thunk): Likewise.
16574 * optmize.c (declare_return_variable): Likewise.
16575 * rtti.c (get_tinfo_decl_dynamic): Likewise.
16576 (get_typeid): Likewise.
16577 (build_dynamic_cast_1): Likewise.
16578 * typeck.c (composite_pointer_type): Likewise.
16579 (common_type): Likewise.
16580 (build_indirect_ref): Likewise.
16581 (build_binary_op): Likewise.
16582 (build_x_compound_expr): Likewise.
16583 (check_return_expr): Likewise.
16584 * typeck2.c (add_exception_specifier): Likewise.
16585
16586 * mangle.c (write_method_parms): Use direct comparison for end
16587 of parmlist.
16588
16589 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
16590
16591 * cp-tree.h (genrtl_try_block): Declare function.
16592 (genrtl_handler): Likewise.
16593 (genrtl_catch_block): Likewise.
16594 (genrtl_ctor_stmt): Likewise.
16595 (genrtl_subobject): Likewise.
16596 (genrtl_decl_cleanup): Likewise.
16597 (genrtl_do_poplevel): Likewise.
16598 (genrtl_do_pushlevel): Likewise.
16599 (genrtl_clear_out_block): Likewise.
16600 (genrtl_goto_stmt): Likewise.
16601 (genrtl_expr_stmt): Likewise.
16602 (genrtl_decl_stmt): Likewise.
16603 (genrtl_if_stmt): Likewise.
16604 (genrtl_while_stmt): Likewise.
16605 (genrtl_do_stmt): Likewise.
16606 (genrtl_return_stmt): Likewise.
16607 (genrtl_for_stmt): Likewise.
16608 (genrtl_break_stmt): Likewise.
16609 (genrtl_continue_stmt): Likewise.
16610 (genrtl_scope_stmt): Likewise.
16611 (genrtl_switch_stmt): Likewise.
16612 (genrtl_case_label): Likewise.
16613 (genrtl_begin_compound_stmt): Likewise.
16614 (genrtl_finish_compound_stmt): Likewise.
16615 (genrtl_compound_stmt): Likewise.
16616 (genrtl_asm_stmt): Likewise.
16617 (genrtl_named_return_value): Likewise.
16618 (genrtl_begin_stmt_expr): Likewise.
16619 (genrtl_finish_stmt_expr): Likewise.
16620 (finish_for_stmt): Removed first argument.
16621 (finish_switch_stmt): Likewise.
16622
16623 * semantics.c (genrtl_try_block): Define function.
16624 (genrtl_handler): Likewise.
16625 (genrtl_catch_block): Likewise.
16626 (genrtl_ctor_stmt): Likewise.
16627 (genrtl_subobject): Likewise.
16628 (genrtl_decl_cleanup): Likewise.
16629 (genrtl_do_poplevel): Likewise.
16630 (genrtl_do_pushlevel): Likewise.
16631 (genrtl_clear_out_block): Likewise.
16632 (genrtl_goto_stmt): Likewise.
16633 (genrtl_expr_stmt): Likewise.
16634 (genrtl_decl_stmt): Likewise.
16635 (genrtl_if_stmt): Likewise.
16636 (genrtl_while_stmt): Likewise.
16637 (genrtl_do_stmt): Likewise.
16638 (genrtl_return_stmt): Likewise.
16639 (genrtl_for_stmt): Likewise.
16640 (genrtl_break_stmt): Likewise.
16641 (genrtl_continue_stmt): Likewise.
16642 (genrtl_scope_stmt): Likewise.
16643 (genrtl_switch_stmt): Likewise.
16644 (genrtl_case_label): Likewise.
16645 (genrtl_begin_compound_stmt): Likewise.
16646 (genrtl_finish_compound_stmt): Likewise.
16647 (genrtl_compound_stmt): Likewise.
16648 (genrtl_asm_stmt): Likewise.
16649 (genrtl_named_return_value): Likewise.
16650 (genrtl_begin_stmt_expr): Likewise.
16651 (genrtl_finish_stmt_expr): Likewise.
16652 (finish_for_stmt): Removed first argument and generate rtl
16653 specific code.
16654 (finish_switch_stmt): Likewise.
16655 (do_poplevel): Removed generate rtl specific code.
16656 (do_pushlevel): Likewise.
16657 (add_tree): Likewise.
16658 (finish_goto_stmt): Likewise.
16659 (finish_expr_stmt): Likewise.
16660 (begin_if_stmt): Likewise.
16661 (finish_if_stmt_cond): Likewise.
16662 (finish_then_clause): Likewise.
16663 (begin_else_clause): Likewise.
16664 (finish_else_clause): Likewise.
16665 (finish_if_stmt): Likewise.
16666 (clear_out_block): Likewise.
16667 (begin_while_stmt): Likewise.
16668 (finish_while_stmt_cond): Likewise.
16669 (finish_while_stmt): Likewise.
16670 (begin_do_stmt): Likewise.
16671 (finish_do_body): Likewise.
16672 (finish_do_stmt): Likewise.
16673 (finish_return_stmt): Likewise.
16674 (begin_for_stmt): Likewise.
16675 (finish_for_init_stmt): Likewise.
16676 (finish_for_cond): Likewise.
16677 (finish_for_expr): Likewise.
16678 (finish_break_stmt): Likewise.
16679 (finish_continue_stmt): Likewise.
16680 (begin_switch_stmt): Likewise.
16681 (finish_switch_cond): Likewise.
16682 (finish_case_label): Likewise.
16683 (begin_try_block): Likewise.
16684 (begin_function_try_block): Likewise.
16685 (finish_try_block): Likewise.
16686 (finish_cleanup_try_block): Likewise.
16687 (finish_cleanup): Likewise.
16688 (finish_function_try_block): Likewise.
16689 (finish_handler_sequence): Likewise.
16690 (finish_function_handler_sequence): Likewise.
16691 (begin_handler): Likewise.
16692 (finish_handler_parms): Likewise.
16693 (begin_catch_block): Likewise.
16694 (finish_handler): Likewise.
16695 (begin_compound_stmt): Likewise.
16696 (finish_compound_stmt): Likewise.
16697 (finish_asm_stmt): Likewise.
16698 (finish_label_stmt): Likewise.
16699 (finish_label_decl): Likewise.
16700 (finish_subobject): Likewise.
16701 (finish_decl_cleanup): Likewise.
16702 (finish_named_return_value): Likewise.
16703 (begin_stmt_expr): Likewise.
16704 (finish_stmt_expr): Likewise.
16705
16706 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
16707 to call genrtl_expr_stmt when appropriate.
16708
16709 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
16710 begin_compound_expr to call genrtl_begin_stmt_expr and
16711 genrtl_begin_compound_expr when appropriate.
16712 (finish_init_stmts): Changed calls to finish_compound_expr and
16713 finish_stmt_expr to call genrtl_finish_compound_expr and
16714 genrtl_finish_stmt_expr when appropriate.
16715 (expand_default_init): Changed call to finish_expr_stmt to call
16716 genrtl_expr_stmt when appropriate.
16717 (build_vec_init): Likewise.
16718
16719 * parse.y (simple_stmt): Removed first argument from call to
16720 finish_for_stmt. Removed first argument from call to
16721 finish_switch_stmt.
16722
16723 * parse.c: Regenerated.
16724
16725 * pt.c (tsubst_expr): Removed first argument from call to
16726 finish_for_stmt. Removed first argument from call to
16727 finish_switch_stmt.
16728
16729 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
16730
16731 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
16732 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
16733
16734 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
16735 (cplus_tree_code_length[]): Likewise.
16736 (cplus_tree_code_name[]): Likewise.
16737 (init_parse): Added call to add_c_tree_codes. Changed
16738 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
16739
16740 2000-06-16 Mark Mitchell <mark@codesourcery.com>
16741
16742 * cp-tree.h (finish_mem_initializers): Declare.
16743 (count_trees): Likewise.
16744 * parse.y (base_init): Use finish_mem_initializers.
16745 * semantics.c (finish_mem_initializers): New function.
16746
16747 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
16748 the number of trees.
16749 (n_trees): Remove.
16750 (count_trees): Don't use it.
16751
16752 2000-06-15 Jason Merrill <jason@redhat.com>
16753
16754 * tree.c (count_trees): New debugging function.
16755
16756 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
16757 * init.c (build_member_call): Pull out the name of a DECL.
16758
16759 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
16760 * semantics.c (expand_body): Push to TV_INTEGRATION here.
16761 * optimize.c (optimize_function): Not here.
16762 * pt.c (instantiate_decl): Push to TV_PARSE.
16763
16764 2000-06-15 Mark Mitchell <mark@codesourcery.com>
16765
16766 * cp-tree.h (struct language_function): Remove x_base_init_list
16767 and x_member_init_list.
16768 (current_base_init_list): Remove.
16769 (current_member_init_list): Likewise.
16770 (setup_vtbl_ptr): Change prototype.
16771 (emit_base_init): Likewise.
16772 (expand_member_init): Likewise.
16773 (reinit_parse_for_function): Remove.
16774 * decl.c (save_function_data): Don't clear x_base_init_list and
16775 x_member_init_list.
16776 (mark_language_function): Don't mark them.
16777 * init.c (perform_member_init): Tweak comment.
16778 (sort_member_init): Take the list of initializers as an argument.
16779 (sort_base_init): Likewise.
16780 (emit_base_init): Likewise.
16781 (expand_member_init): Return the initializer. Don't use global
16782 variables.
16783 * lex.c (reinit_parse_for_function): Remove.
16784 * method.c (build_template_parm_names): Correct substitution.
16785 (do_build_copy_constructor): Don't use current_member_init_list
16786 and current_base_init_list.
16787 (synthesize_method): Likewise.
16788 * parse.y (base_init): Split mem-initializers into
16789 base-initializers and field-initializers.
16790 (member_init_list): Build up the list here.
16791 (member_init): Return the initializer.
16792 (fn.depfn): Don't use reinit_parse_for_function.
16793 * parse.c: Regenerated.
16794 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
16795 ERROR_MARK.
16796 (tsubst_expr): Don't use current_member_init_list
16797 and current_base_init_list.
16798 (tsubst_expr_values): Rename to ...
16799 (tsubst_initializer_list): ... this. Use convert_from_reference.
16800 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
16801 and current_base_init_list.
16802 (begin_function_definition): Don't call reinit_parse_for_function.
16803
16804 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
16805
16806 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
16807 correctly.
16808
16809 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
16810
16811 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
16812
16813 * cp-tree.h (IF_COND): Move to c-common.h.
16814 (THEN_CLAUSE): Likewise.
16815 (ELSE_CLAUSE): Likewise.
16816 (WHILE_COND): Likewise.
16817 (WHILE_BODY): Likewise.
16818 (DO_COND): Likewise.
16819 (DO_BODY): Likewise.
16820 (RETURN_EXPR): Likewise.
16821 (EXPR_STMT_EXPR): Likewise.
16822 (FOR_INIT_STMT): Likewise.
16823 (FOR_COND): Likewise.
16824 (FOR_EXPR): Likewise.
16825 (FOR_BODY): Likewise.
16826 (SWITCH_COND): Likewise.
16827 (SWITCH_BODY): Likewise.
16828 (CASE_LOW): Likewise.
16829 (CASE_HIGH): Likewise.
16830 (GOTO_DESTINATION): Likewise.
16831 (COMPOUND_BODY): Likewise.
16832 (ASM_CV_QUAL): Likewise.
16833 (ASM_STRING): Likewise.
16834 (ASM_OUTPUTS): Likewise.
16835 (ASM_INPUTS): Likewise.
16836 (ASM_CLOBBERS): Likewise.
16837 (DECL_STMT_DECL): Likewise.
16838 (STMT_EXPR_STMT): Likewise.
16839 (LABEL_STMT_LABEL): Likewise.
16840 (SCOPE_BEGIN_P): Likewise.
16841 (SCOPE_END_P): Likewise.
16842 (SCOPE_STMT_BLOCK): Likewise.
16843 (SCOPE_NULLIFIED_P): Likewise.
16844 (SCOPE_NO_CLEANUPS_P): Likewise.
16845 (SCOPE_PARTIAL_P): Likewise.
16846 (ASM_VOLATILE_P): Likewise.
16847 (STMT_LINENO): Likewise.
16848 (STMT_LINENO_FOR_FN_P): Likewise.
16849
16850 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
16851 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
16852 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
16853 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
16854 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
16855
16856 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
16857
16858 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
16859 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
16860
16861 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
16862 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
16863 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
16864
16865 2000-06-14 Mark Mitchell <mark@codesourcery.com>
16866
16867 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
16868 * class.c (dfs_find_final_overrider): Set it appropriately.
16869 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
16870 avoid unneeded secondary vptrs.
16871
16872 2000-06-13 Jakub Jelinek <jakub@redhat.com>
16873
16874 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
16875 (check_bitfield_decl, check_field_decl): Likewise.
16876 (build_vtbl_or_vbase_field, build_base_field): Likewise.
16877 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
16878 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
16879 (xfer_tag, finish_enum): Likewise.
16880 * decl2.c (finish_builtin_type): Likewise.
16881 * init.c (init_init_processing): Likewise.
16882 * pt.c (instantiate_class_template): Likewise.
16883 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
16884 * cp-tree.h (struct lang_type): Add user_align member.
16885 (CLASSTYPE_USER_ALIGN): Define.
16886
16887 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
16888
16889 * Make-lang.in (c++.install-common): Install g++-cross in
16890 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
16891 $(target_alias)-g++ and $(target_alias)-c++.
16892
16893 2000-06-12 Mark Mitchell <mark@codesourcery.com>
16894
16895 * class.c (vcall_offset_data_s): Add last_init and fns.
16896 (overrides): Rename to same_signature_p.
16897 (dfs_find_final_overrider): Adjust accordingly.
16898 (mark_overriders): Likewise.
16899 (warn_hidden): Likewise.
16900 (build_vtbl_initializer): Reorganize machinery for building things
16901 at negative offsets.
16902 (build_vcall_and_vbase_vtbl_entries): Likewise.
16903 (build_vbase_offset_vtbl_entries): Likewise.
16904 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
16905 offset entries. Do not create two entries for functions with the
16906 same signature.
16907 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
16908 (build_rtti_vtbl_entries): Reorganize machinery for building things
16909 at negative offsets.
16910
16911 * optimize.c (expand_call_inline): Don't recurse into the code
16912 used to initialize the parameters more than once.
16913
16914 2000-06-11 Mark Mitchell <mark@codesourcery.com>
16915
16916 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
16917 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
16918 (find_substitution): Only use the `Sa' substitution for
16919 std::allocator, not instantiations of it.
16920 (write_template_prefix): Move comment. Only use a TREE_LIST to
16921 represent substitutions for a member template.
16922 (write_array_type): Mangle array dimensions correctly.
16923 * optimize.c (maybe_clone_body): Copy more information from the
16924 cloned function.
16925 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
16926 on the regenerated declaration.
16927
16928 2000-06-11 Chip Salzenberg <chip@valinux.com>
16929 Mark Mitchell <mark@codesourcery.com>
16930
16931 * class.c (build_vtable): Clarify comment.
16932 (build_ctor_vtbl_group): Pass the most derived type to
16933 build_vtable.
16934
16935 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16936
16937 * decl2.c (compare_options): Don't needlessly cast away const-ness.
16938
16939 2000-06-10 Mark Mitchell <mark@codesourcery.com>
16940
16941 * decl.c (add_binding): Handle duplicate declarations of external
16942 variables.
16943
16944 2000-06-09 Chip Salzenberg <chip@valinux.com>
16945 Mark Mitchell <mark@codesourcery.com>
16946
16947 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
16948 argument.
16949 (write_signed_number): New macro.
16950 (write_unsigned_number): Likewise.
16951 (write_source_name): Use them.
16952 (write_number): Handle signed and unsigned values.
16953 (write_integer_cst): Use tree_int_cst_sgn, and use
16954 write_unsigned_number or write_signed_number as appropriate.
16955 (write_discriminator): Use write_unsigned_number or
16956 write_signed_number as appropriate.
16957 (write_template_arg_literal): Likewise.
16958 (write_array_type): Use tree_low_cst.
16959 (write_template_parm): Use write_unsigned_number or
16960 write_signed_number as appropriate.
16961 (write_substitution): Adjust call to write_number.
16962 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
16963 (write_expression): Handle non-type template arguments of
16964 reference type correctly.
16965 (mangle_thunk): Use write_signed_number.
16966
16967 2000-06-09 Chip Salzenberg <chip@valinux.com>
16968
16969 * mangle.c (find_substition): Don't mangle objects with typename
16970 substitutions (e.g. "cin" as "Si").
16971
16972 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
16973
16974 * call.c (add_candidate): Use ggc_alloc_cleared.
16975 * decl.c (lookup_label): Likewise.
16976 * lex.c (retrofit_lang_decl): Likewise.
16977
16978 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
16979
16980 * semantics.c (expand_body): Push to TV_EXPAND.
16981 * optimize.c (optimize_function): Push to TV_INTEGRATION.
16982 * decl.c (start_function): Always call announce_function.
16983
16984 * tinfo2.cc: Just declare abort.
16985
16986 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
16987
16988 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
16989 whenever @ is a symbolic name.
16990
16991 2000-06-08 Jakub Jelinek <jakub@redhat.com>
16992
16993 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
16994
16995 2000-06-07 Mark Mitchell <mark@codesourcery.com>
16996
16997 * decl.c (pushdecl): Look up functions by DECL_NAME, not
16998 DECL_ASSEMBLER_NAME.
16999
17000 2000-06-06 Mark Mitchell <mark@codesourcery.com>
17001
17002 * decl2.c (c_language): Define.
17003
17004 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
17005
17006 * lex.c (lang_init_options): Tweak.
17007
17008 * decl2.c: Remove #inclusion of diagnostic.h
17009 (lang_decode_option): Move diagnostic formatting options to
17010 toplevel.
17011
17012 * lang-options.h: Remove documentation for diagnostic options.
17013
17014 * Makefile.in (lex.o): Depends upon diagnostic.h
17015
17016 2000-06-06 Mark Mitchell <mark@codesourcery.com>
17017
17018 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17019 the same DECL_RESULT, it's not a redefinition.
17020 * pt.c (tsubst_decl): Remove code to handle illegal
17021 specializations.
17022
17023 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
17024
17025 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17026
17027 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
17028
17029 * search.c (maybe_suppress_debug_info): Don't check
17030 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17031
17032 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17033 here if extern_p.
17034
17035 Remember instantiation context in deferred instantiations.
17036 * cp-tree.h (struct tinst_level): Remove.
17037 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17038 * pt.c (current_tinst_level): Now a tree.
17039 (print_template_context, push_tinst_level, pop_tinst_level,
17040 tinst_for_decl): Adjust.
17041 (reopen_tinst_level): New fn.
17042 (init_pt): Register current_tinst_level as a root.
17043 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17044 of the pending templates list.
17045 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
17046 * lex.c (extract_interface_info): Adjust.
17047 * decl2.c (warn_if_unknown_interface): Adjust.
17048
17049 2000-06-05 Mark Mitchell <mark@codesourcery.com>
17050
17051 * class.c (indirect_primary_base_p): New function.
17052 (determine_primary_base): Use it.
17053
17054 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
17055
17056 Update new-abi dynamic cast algorithm.
17057 * tinfo.cc (__class_type_info::__dyncast_result): Add
17058 whole_details. Adjust constructor.
17059 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
17060 Avoid unnecessary searching.
17061 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
17062
17063 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17064
17065 * decl.c (init_decl_processing): Don't call record_component_aliases.
17066 * tree.c (build_cplus_array_type_1): Likewise.
17067
17068 2000-06-04 Mark Mitchell <mark@codesourcery.com>
17069
17070 * ir.texi: Correct typo.
17071 * mangle.c (write_expression): Handle non-type template arguments
17072 with reference type.
17073 * method.c (build_overload_value): Likewise.
17074 * pt.c (convert_nontype_argument): Explicitly represent conversion
17075 to a reference with an ADDR_EXPR.
17076 (unify): Always unify arguments in left-to-right order.
17077
17078 2000-06-03 Alex Samuel <samuel@codesourcery.com>
17079 Mark Mitchell <mark@codesourcery.com>
17080
17081 * Make-lang.in (CXX_SRCS): Add mangle.c.
17082 * Makefile.in (CXX_OBJS): Add mangle.o.
17083 (mangle.o): New rule.
17084
17085 * class.c (local_classes): New variable.
17086 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
17087 (get_vtt_name): Use mangle_vtt_name for new ABI.
17088 (init_class_processing): Initialize local_classes.
17089 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
17090 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
17091 (std_identifier): New macro.
17092 (DECL_VOLATILE_MEMFUNC_P): New macro.
17093 (DECL_NAMESPACE_STD_P): Likewise.
17094 (local_classes): Declare.
17095 (get_mostly_instantiated_function_type): Declare.
17096 (init_mangle): Declare.
17097 (mangle_decl): Likewise.
17098 (mangle_type_string): Likewise.
17099 (mangle_type): Likewise.
17100 (mangle_typeinfo_for_type): Likewise.
17101 (mangle_typeinfo_string_for_type): Likewise.
17102 (mangle_vtbl_for_type): Likewise.
17103 (mangle_vtt_for_type): Likewise.
17104 (mangle_ctor_vtbl_for_type): Likewise.
17105 (mangle_thunk): Likewise.
17106 (mangle_conv_op_name_for_type): Likewise.
17107 (mangle_guard_variable): Likewise.
17108 * decl.c (pushtag): Keep track of local classes.
17109 (initialize_predefined_identifiers): Initialize std_identifier.
17110 (init_decl_processing): Use std_identifier.
17111 (start_decl): Don't treat instantiations as specializations.
17112 (grokdeclarator): Likewise.
17113 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
17114 name for fully-instantiated templates.
17115 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
17116 destructors with the new ABI.
17117 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
17118 (grokfield): Use mangle_type for new ABI.
17119 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
17120 (get_sentry): Use mangle_guard_variable for new ABI.
17121 (start_static_initialization_or_destruction): Likewise.
17122 * expr.c (extract_aggr_init): Remove.
17123 (extract_scalar_init): Likewise.
17124 (extract_init): Remove #if 0'd code.
17125 * mangle.c: New function.
17126 * method.c (build_mangled_name): Assert not flag_new_abi.
17127 (build_static_name): Likewise.
17128 (build_decl_overload_real): Likewise.
17129 (build_typename_overload): Likewise.
17130 (build_overload_with_type): Likewise.
17131 (build_overload_name): Likewise.
17132 (get_ctor_vtbl_name): Likewise.
17133 (start_squangling): Likewise.
17134 (get_id_2): Likewise.
17135 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
17136 (init_method): Call init_mangle for new ABI.
17137 (make_thunk): Call mangle_thunk for new ABI.
17138 * operators.def: Correct new ABI manglings for the `%' operator.
17139 Add `::' operator.
17140 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17141 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17142 (lookup_template_class): Call mangle_decl for new ABI.
17143 (get_mostly_instantiated_function_type): New function.
17144 (set_mangled_name_for_template_decl): Use it.
17145 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17146 the new ABI. Use mangle_conv_op_name_for_type for instantiated
17147 conversion op names.
17148 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17149 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17150 (tinfo_base_init): Likewise. Mangle typeinfo string name with
17151 mangle_typeinfo_string_for_type.
17152
17153 2000-06-03 Mark Mitchell <mark@codesourcery.com>
17154
17155 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17156 (INNERMOST_TEMPLATE_ARGS): New macro.
17157 (innermost_args): Remove.
17158 (get_innermost_template_args): New function.
17159 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17160 * error.c (dump_function_decl): Be caution when using
17161 most_general_template.
17162 * method.c (build_template_parm_names): Use
17163 INNERMOST_TEMPLATE_ARGS.
17164 * pt.c (add_to_template_args): Tidy comment
17165 (get_innermost_template_args): New function.
17166 (check_explicit_specialization): Clear DECL_INITIAL for a new
17167 specialization.
17168 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17169 Tidy.
17170 (push_template_decl): Always register specializations of the most
17171 general template.
17172 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17173 (coerce_template_parms): Likewise.
17174 (lookup_template_class): Likewise.
17175 (innermost_args): Remove.
17176 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17177 (tsubst_decl): Handle tricky specializations. Use
17178 get_innermost_template_args.
17179 (instantiate_template): Simplify handling of partial
17180 instantiations.
17181 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17182 (most_general_template): Reimplement, in a more straightforward
17183 manner.
17184 (regenerate_decl_from_template): Tweak formatting. Use
17185 TMPL_ARGS_DEPTH for clarity.
17186 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17187
17188 * dump.c (dequeue_and_dump): Dump information about thunks.
17189
17190 2000-06-01 Richard Henderson <rth@cygnus.com>
17191
17192 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17193
17194 2000-06-01 Richard Henderson <rth@cygnus.com>
17195
17196 * decl2.c (unsupported_options): Fix typo, make const.
17197 (lang_decode_option): Fix bsearch argument order.
17198
17199 2000-06-01 Mark Mitchell <mark@codesourcery.com>
17200
17201 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17202 on FIELD_DECLs.
17203
17204 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17205
17206 * cp-tree.h (c_get_alias_set): Deleted.
17207 * Makefile.in (decl.o): Include ../expr.h.
17208 * decl.c (expr.h): Include.
17209 (init_decl_processing): Call record_component_aliases for arrays.
17210 (grokdeclarator): Likewise.
17211 Set TREE_ADDRESSABLE for fields that aren't bitfields.
17212 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17213
17214 2000-05-31 Mark Mitchell <mark@codesourcery.com>
17215
17216 Remove guiding declaration support.
17217 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17218 (flag_guiding_decls): Remove.
17219 * call.c (build_user_type_conversion_1): Remove support for
17220 guiding decls.
17221 (build_new_function_call): Likewise.
17222 (build_new_op): Likewise.
17223 (build_new_method_call): Likewise.
17224 * decl.c (start_function): Likewise.
17225 * friend.c (is_friend): Likewise.
17226 (do_friend): Likewise.
17227 * decl2.c ((flag_dump_translation_unit): Make it const.
17228 (flag_guiding_decls): Remove.
17229 (unsupported_options): New variable
17230 (compare_options): New function.
17231 (lang_decode_option): Use them.
17232
17233 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17234
17235 * method.c (mangle_expression): Adjust test for legal expression
17236 operators.
17237
17238 * pt.c (instantiate_decl): Save and restore the local
17239 specializations list.
17240
17241 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
17242
17243 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17244
17245 2000-05-30 Mark Mitchell <mark@codesourcery.com>
17246
17247 * call.c (add_template_candidate_real): Handle member template
17248 constructors for classes with virtual bases.
17249 (build_user_type_conversion_1): Use in_charge_arg_for_name.
17250 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17251
17252 * ir.texi: Update thunk documentation.
17253
17254 * call.c (joust): Fix handling of overloaded builtin operators.
17255
17256 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
17257
17258 * cp-tree.h (DECL_ANTICIPATED): New macro.
17259 Document new use of DECL_LANG_FLAG_7.
17260 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17261 in the user namespace.
17262 * lex.c (do_identifier): If the identifier's declaration has
17263 DECL_ANTICIPATED on, it has not yet been declared. But do not
17264 replace it with an ordinary implicit declaration.
17265
17266 * tinfo2.cc: Include stdlib.h.
17267
17268 2000-05-29 Mark Mitchell <mark@codesourcery.com>
17269
17270 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17271 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17272 CLASSTYPE_ALIGN.
17273
17274 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
17275
17276 * decl2.c (lang_decode_option): Use skip_leading_substring instead
17277 of plain strncmp.
17278
17279 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
17280
17281 * operators.def (<?): Duplicated, should have been...
17282 (>?): this. Fixed.
17283
17284 2000-05-27 Alex Samuel <samuel@codesourcery.com>
17285 Mark Mitchell <mark@codesourcery.com>
17286
17287 * cp-tree.h (ansi_opname): Make it a macro.
17288 (ansi_assopname): Likewise.
17289 (struct lang_decl_flags): Add assignment_operator_p.
17290 (struct lang_decl): Add operator_code.
17291 (DECL_VTT_PARM): Adjust.
17292 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17293 overloaded operator.
17294 (SET_OVERLOADED_OPERATOR_CODE): New macro.
17295 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17296 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17297 (opname_tab): Remove.
17298 (assignop_tab): Likewise.
17299 (operator_name_info_t): New type.
17300 (operator_name_info): New variable.
17301 (assignment_operator_name_info): Likewise.
17302 (build_cp_library_fn): Remove declaration.
17303 (push_cp_library_fn): Likewise.
17304 (operator_name_string): Likewise.
17305 (build_decl_overload): Likewise.
17306 * call.c (print_z_candidates): Simplify.
17307 (build_object_call): Adjust usage of ansi_opname. Use
17308 DECL_OVERLOADED_OPERATOR_P.
17309 (op_error): Adjust operator name lookup.
17310 (build_conditional_expr): Adjust usage of ansi_opname.
17311 (build_new_op): Likewise.
17312 (build_op_delete_call): Likewise.
17313 (build_over_call): Likewise.
17314 (joust): Use DECL_OVERLOADED_OPERATOR_P.
17315 * decl.c (duplicate_decls): Copy operator_code.
17316 (init_decl_processing): Adjust parameters to push_cp_library_fn.
17317 (builtin_function): Adjust parameters to build_library_fn_1.
17318 (build_library_fn_1): Accept an overloaded operator code.
17319 (build_library_fn): Pass ERROR_MARK.
17320 (build_cp_library_fn): Accept an overloaded operator code.
17321 (push_cp_library_fn): Likewise.
17322 (grokfndecl): Tweak.
17323 (grokdeclarator): Simplify code to compute names of overloaded
17324 operators. Adjust use of ansi_opname.
17325 (ambi_op_p): Work on tree_codes, not identifiers.
17326 (unary_op_p): Likewise.
17327 (grok_op_properties): Likewise.
17328 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17329 (lang_mark_tree): Don't try to mark the operator_code.
17330 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17331 * error.c (dump_decl): Remove special handling for operator
17332 names.
17333 (dump_function_name): Likewise.
17334 (dump_expr): Adjust name lookup of operators.
17335 (op_to_string): Simplify.
17336 (assop_to_string): Likewise.
17337 * init.c (build_new_1): Adjust use of ansi_opname.
17338 * lex.c (opname_tab): Remove.
17339 (assignop_tab): Likewise.
17340 (ansi_opname): Likewise.
17341 (ansi_assopname): Likewise.
17342 (operator_name_string): Likewise.
17343 (reinit_lang_specific): Likewise.
17344 (operator_name_info): New variable.
17345 (assignment_operator_name_info): Likewise.
17346 (init_operators): New function.
17347 (init_parse): Use it.
17348 (do_identifier): Adjust use of ansi_opname.
17349 * method.c (mangle_expression): Don't use ansi_opname for
17350 mangling.
17351 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17352 (build_decl_overload): Remove.
17353 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17354 (do_build_assign_ref): Adjust use of ansi_opname.
17355 (synthesize_method): Likewise.
17356 (implicitly_declare_fn): Likewise.
17357 * operators.def: New file.
17358 * parse.y (operator): Adjust use of ansi_opname.
17359 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17360 (set_mangled_name_for_template_decl): Don't play games with
17361 current_namespace.
17362 (special_function_p): Adjust use of ansi_opname.
17363 * typeck.c (check_return_expr): Likewise.
17364 * Make-lang.in (cc1plus): Depend on operators.def.
17365 * Makefile.in (lex.o): Likewise.
17366 (decl.o): Likewise.
17367
17368 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
17369
17370 * Make-lang.in (cplib2.ready): Eradicate.
17371
17372 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17373
17374 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
17375 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
17376 (built_min, cp_tree_equal): Likewise.
17377
17378 2000-05-26 Mark Mitchell <mark@codesourcery.com>
17379
17380 * class.c (layout_nonempty_base_or_field): Replace
17381 `record_layout_info' with `record_layout_info_s'.
17382
17383 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
17384
17385 Fix goto checking.
17386 * cp-tree.h (struct language_function): x_named_labels is now
17387 a struct named_label_list*.
17388 * decl.c (struct named_label_use_list): Renamed from...
17389 (struct named_label_list): ...this. New struct.
17390 (push_binding_level): Don't set eh_region.
17391 (note_level_for_eh): New fn.
17392 (pop_label): Take label and old value directly.
17393 (pop_labels): Adjust for new named_labels format.
17394 (lookup_label): Likewise.
17395 (poplevel): Note characteristics of a binding level containing a
17396 named label. Mess with named label lists earlier.
17397 (mark_named_label_lists): New fn.
17398 (mark_lang_function): Call it.
17399 (use_label): New fn, split out from...
17400 (make_label_decl): ...here. Don't call it.
17401 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
17402 check_previous_gotos): New fns, split out from...
17403 (define_label): ...here.
17404 (check_switch_goto): New fn.
17405 (define_case_label): Call it.
17406 (check_goto): New fn.
17407 * semantics.c (finish_goto_stmt): Call it and use_label.
17408 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
17409 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
17410
17411 2000-05-26 Mark Mitchell <mark@codesourcery.com>
17412
17413 * class.c (build_vtable_entry_ref): Correct usage of
17414 get_vtbl_decl_for_binfo.
17415
17416 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
17417 * method.c (implicitly_declare_fn): Not here.
17418
17419 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
17420
17421 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
17422 (CPTI_PTMD_DESC_TYPE): ... here.
17423 (ptmd_desc_type_node): Rename to ...
17424 (ptm_desc_type_node): ... here.
17425 * decl.c: Likewise.
17426 * rtti.c (ptmd_initializer): Rename to ...
17427 (ptm_initializer): ... here.
17428 (sythesize_tinfo_var): Adjust. Deal with pointer to member
17429 function.
17430 (create_tinfo_types): Adjust.
17431
17432 2000-05-25 Mark Mitchell <mark@codesourcery.com>
17433
17434 Finish implementation of VTTs.
17435 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
17436 CPTI_VTT_PARM_IDENTIFIER.
17437 (vtt_parm_identifier): New macro.
17438 (vtt_parm_type): Likewise.
17439 (BINFO_SUBVTT_INDEX): Likewise.
17440 (BINFO_VPTR_INDEX): Likewise.
17441 (struct lang_decl): Add vtt_parm.
17442 (DECL_VTT_PARM): New macro.
17443 (DECL_USE_VTT_PARM): Likewise.
17444 (DECL_NEEDS_VTT_PARM_P): Likewise.
17445 (get_vtt_name): Declare.
17446 (build_artificial_parm): Likewise.
17447 (fixup_all_virtual_upcast_offsets): Likewise.
17448 (expand_indirect_vtbls_init): Remove.
17449 * call.c (build_new_method_call): Pass the vtt to subobject
17450 constructors and destructors.
17451 * class.c (get_vtt_name): Give it external linkage.
17452 (build_clone): Handle the magic VTT parameters for clones.
17453 (clone_function_decl): Fix typo in comment.
17454 (build_vtt): Keep track of the indices in the VTTs where various
17455 entities are stored.
17456 (build_vtt_inits): Likewise.
17457 (dfs_build_vtt_inits): Likewise.
17458 (build_ctor_vtbl_group): Tweak type of construction vtables.
17459 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
17460 primary bases, when building construction vtables.
17461 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
17462 (initialize_predefined_identifiers): Add vtt_parm_identifier.
17463 (init_decl_processing): Initialize vtt_parm_type.
17464 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
17465 (lang_mark_tree): Make vtt_parm.
17466 * decl2.c (build_artificial_parm): New function.
17467 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
17468 (grokclassfn): Use build_artificial_parm.
17469 * init.c (initialize_vtbl_ptrs): Call
17470 fixup_all_virtual_upcast_offsets directly.
17471 (perform_member_init): Use the complete subobject destructor for
17472 member cleanups.
17473 (build_vtbl_address): New function.
17474 (expand_virtual_init): Handle VTTs.
17475 * optimize (maybe_clone_body): Likewise.
17476 * search.c (fixup_all_virtual_upcast_offsets): Give it external
17477 linkage.
17478 (expand_indirect_vtbls_init): Remove.
17479 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
17480 * tree.c (make_binfo): Make them bigger.
17481
17482 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
17483
17484 * inc/cxxabi.h (__pbase_type_info): Define, based on
17485 __pointer_type_info.
17486 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
17487 (__pointer_to_member_type_info): Likewise.
17488 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
17489 (__pointer_to_member_type_info::__is_pointer_p): Remove.
17490 (__pointer_type_info::__do_catch): Rename to ...
17491 (__pbase_type_info::__do_catch): ... here. Adjust.
17492 (__pbase_type_info::__pointer_catch): Implement.
17493 (__pointer_type_info::__pointer_catch): Adjust.
17494 (__pointer_to_member_type_info::__pointer_catch): Adjust.
17495
17496 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
17497
17498 * tinfo.h (__user_type_info::contained_virtual_p): New
17499 predicate.
17500 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
17501 shaped hierarchy.
17502 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
17503 diamond shaped hierarchy. Add early out for mixed diamond and
17504 duplicate shaped hierarchy.
17505
17506 2000-05-24 Mark Mitchell <mark@codesourcery.com>
17507
17508 * cp-tree.h (build_delete): Change prototype.
17509 (build_vec_delete): Likewise.
17510 * call.c (build_scoped_method_call): Use special_function_kind
17511 values to indicate the kind of destruction to be done.
17512 (build_method_call): Likewise.
17513 * decl.c (finish_destructor_body): Likewise.
17514 (maybe_build_cleanup_1): Likewise. Rename to ...
17515 (maybe_build_cleanup): ... this.
17516 * decl2.c (delete_sanity): Use special_function_kind
17517 values to indicate the kind of destruction to be done.
17518 (build_cleanup): Likewise.
17519 * init.c (perform_member_init): Likewise.
17520 (build_vec_delete_1): Likewise.
17521 (build_dtor_call): Simplify.
17522 (build_delete): Use special_function_kind
17523 values to indicate the kind of destruction to be done.
17524 (build_vbase_delete): Likewise.
17525 (build_vec_delete): Likewise.
17526
17527 * init.c (sort_member_init): Fix typo in error message generation
17528 code.
17529
17530 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
17531
17532 * semantics.c (begin_class_definition): make the packed
17533 attribute be sensitive to the "-fpack-struct" command line flag
17534
17535 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
17536
17537 Update new-abi upcast algorithm.
17538 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
17539 prototype and meaning of return value.
17540 (__si_class_type_info::__do_upcast): Likewise.
17541 (__vmi_class_type_info::__do_upcast): Likewise.
17542 * tinfo.cc (__class_type_info::__upcast_result): Replace
17543 whole2dst with part2dst. Adjust ctor.
17544 (__class_type_info::__do_upcast): Adjust call of worker function.
17545 (__class_type_info::__do_upcast): Adjust.
17546 (__si_class_type_info::__do_upcast): Adjust. Use parent's
17547 __do_upcast.
17548 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
17549 virtual base in diamond hierarchy bug.
17550
17551 2000-05-23 Mark Mitchell <mark@codesourcery.com>
17552
17553 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
17554 and bitfield to tinfo_fn_p.
17555 (DECL_TINFO_FN_P): Adjust.
17556 (SET_DECL_TINFO_FN_P): Likewise.
17557 (DECL_MUTABLE_P): Likewise.
17558 (DECL_C_BIT_FIELD): Likewise.
17559 (SET_DECL_C_BIT_FIELD): Likewise.
17560 (CLEAR_DECL_C_BIT_FIELD): Likewise.
17561 (DECL_UNINLINABLE): Likewise.
17562 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
17563 (handle_using_decl): Remove assertion.
17564 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
17565 to build FIELD_DECLs.
17566 (build_base_field): Likewise.
17567 (layout_class_type): Likewise.
17568 * decl.c (init_decl_processing): Likewise.
17569 (build_ptrmemfunc_type): Likewise.
17570 (grokdeclarator): Likewise.
17571 * decl2.c (grok_x_components): Likewise.
17572 * except.c (call_eh_info): Likewise.
17573 * init.c (init_init_processing): Likewise.
17574 * rtti.c (expand_class_desc): Likewise.
17575 (create_pseudo_type_info): Likewise.
17576 (get_vmi_pseudo_type_info): Likewise.
17577 (create_tinfo_types): Likewise.
17578 * ptree.c (print_lang_decl): Adjust.
17579 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
17580 before checking DECL_MUTABLE_P.
17581
17582 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
17583 parameters for template functions.
17584 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
17585 destructors as well as constructors.
17586
17587 2000-05-22 Mark Mitchell <mark@codesourcery.com>
17588
17589 * class.c (build_ctor_vtbl_group): Set inits.
17590 * optimize.c (maybe_clone_body): Set DECL_INLINE and
17591 DECL_THIS_INLINE appropriately for clones.
17592
17593 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
17594 (DECL_CONV_FN_P): Simplify.
17595 (DECL_OPERATOR): Remove.
17596 (language_to_string): Declare.
17597 * decl.c (duplicate_decls): Fix typo in comment.
17598 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
17599 (grok_op_properties): Use DECL_CONV_FN_P instead of
17600 IDENTIFIER_TYPENAME_P.
17601 * dump.c (dequeue_and_dump): Dump the language linkage of
17602 declarations.
17603 * error.c (language_to_string): Give it external linkage.
17604 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
17605 (implicitly_declare_fn): Set DECL_LANGUAGE.
17606 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
17607 IDENTIFIER_TYPENAME_P.
17608 (tsubst_decl): Likewise.
17609 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
17610 * semantics.c (finish_member_declaration): Don't mark members of
17611 classes declared in an extern "C" region as extern "C".
17612
17613 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17614
17615 * decl2.c (qualified_lookup_using_namespace): Look through
17616 namespace aliases.
17617
17618 * decl.c (push_using_decl): Return the old decl on namespace level.
17619
17620 2000-05-21 Mark Mitchell <mark@codesourcery.com>
17621
17622 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
17623 (VTT_NAME_PREFIX): New macro.
17624 (CTOR_VTBL_NAME_PREFIX): Likewise.
17625 (get_ctor_vtbl_name): New function.
17626 * class.c (get_vtable_name): Simplify.
17627 (get_vtt_name): New function.
17628 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
17629 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
17630 when a virtual base becomes primary.
17631 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
17632 VTTs.
17633 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
17634 additional parameters.
17635 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
17636 (initialize_array): New function.
17637 (build_vtt): Likewise.
17638 (build_vtt_inits): Likewise.
17639 (dfs_build_vtt_inits): Likewise.
17640 (dfs_fixup_binfo_vtbls): Likewise.
17641 (build_ctor_vtbl_group): Likewise.
17642 (initialize_vtable): Use initialize_array.
17643 (accumulate_vtbl_inits): Reimplement to handle construction
17644 vtables.
17645 (dfs_accumulate_vtbl_inits): Likewise.
17646 (bulid_vtbl_initializer): Adjust parameter name.
17647 * method.c (build_typename_overload): Remove #if 0'd code.
17648 (get_ctor_vtbl_name): New function.
17649 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
17650 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
17651
17652 * cp-tree.h (struct lang_type): Remove search_slot.
17653 (CLASSTYPE_SEARCH_SLOT): Remove.
17654 (emit_base_init): Change prototype.
17655 (initialize_vtbl_ptrs): Likewise.
17656 (expand_indirect_vtbls_init): Likewise.
17657 (clear_search_slots): Remove.
17658 * decl.c (lang_mark_tree): Don't mark search_slot.
17659 * init.c (initialize_vtbl_ptrs): Simplify.
17660 (emit_base_init): Likewise.
17661 * search.c (struct vbase_info): Document decl_ptr.
17662 (convert_pointer_to_single_level): Remove.
17663 (dfs_find_vbases): Remove.
17664 (dfs_init_base_pointers): Simplify.
17665 (dfs_clear_vbase_slots): Remove.
17666 (dfs_vtable_path_unmark): New function.
17667 (init_vbase_pointers): Simplify.
17668 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
17669 (expand_indirect_vtbls_init): Simplify. Don't call
17670 mark_all_temps_used.
17671 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
17672 initialize_vtbl_ptrs.
17673
17674 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
17675
17676 * except.c: Add static prototypes.
17677
17678 2000-05-20 H.J. Lu <hjl@gnu.org>
17679
17680 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
17681
17682 2000-05-19 Mark Mitchell <mark@codesourcery.com>
17683
17684 Don't create a separate copy of virtual bases for the
17685 CLASSTYPE_VBASECLASSES list.
17686 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
17687 (BINFO_FOR_VBASE): Remove.
17688 (CANONICAL_BINFO): Adjust.
17689 (binfo_for_vbase): New function.
17690 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
17691 instead of BINFO_FOR_VBASE.
17692 (build_vbase_pointer): Likewise.
17693 (build_secondary_vtable): Likewise.
17694 (dfs_mark_primary_bases): Likewise.
17695 (mark_primary_bases): Likewise.
17696 (layout_nonempty_base_or_field): Likewise.
17697 (dfs_set_offset_for_shared_vbases): Likewise.
17698 (dfs_set_offset_for_unshared_vbases): Likewise.
17699 (layout_virtual_bases): Likewise. Adjust for changes to the
17700 CLASSTYPE_VBASECLASSES list.
17701 (dump_class_hierarchy_r): Use binfo_for_vbase
17702 instead of BINFO_FOR_VBASE.
17703 (dump_class_hierarchy): Likewise.
17704 (finish_vtbls): Likewise.
17705 (build_vtbl_initializer): Adjust for changes to the
17706 CLASSTYPE_VBASECLASSES list.
17707 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
17708 * decl.c (finish_destructor_body): Adjust for changes to the
17709 CLASSTYPE_VBASECLASSES list.
17710 * init.c (sort_base_init): Use binfo_for_vbase.
17711 (construct_virtual_bases): Adjust for changes to the
17712 CLASSTYPE_VBASECLASSES list.
17713 (expand_member_init): Use binfo_for_vbase.
17714 (build_vbase_delete): Adjust for changes to the
17715 CLASSTYPE_VBASECLASSES list.
17716 * method.c (do_build_copy_constructor): Likewise.
17717 * rtti.c (get_base_offset): Use binfo_for_vbase.
17718 (expand_class_desc): Remove #if 0'd code.
17719 * search.c (struct vbase_info): Remove vbase_types.
17720 (get_base_distance): Use binfo_for_vbase.
17721 (lookup_field_queue_p): Use CANONICAL_BINFO.
17722 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
17723 (get_pure_virtuals): Adjust for changes to the
17724 CLASSTYPE_VBASECLASSES list.
17725 (dfs_find_vbases): Use binfo_for_vbase.
17726 (dfs_init_vbase_pointers): Likewise.
17727 (init_vbase_pointers): Don't initialize vi.vbase_types.
17728 (virtual_context): Use binfo_for_vbase.
17729 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
17730 CLASSTYPE_VBASECLASSES list.
17731 (expand_indirect_vtbls_init): Simplify.
17732 (dfs_get_vbase_types): Don't replicate virtual bases.
17733 (find_vbase_instance): Use binfo_for_vbase.
17734 (binfo_for_vbase): New function.
17735 * typeck.c (get_delta_difference): Use binfo_for_vbase.
17736
17737 2000-05-17 Mark Mitchell <mark@codesourcery.com>
17738
17739 * decl2.c (finish_anon_union): Generalize error messages to handle
17740 anonymous structures.
17741 * init.c (perform_member_init): Remove `name' parameter.
17742 (build_field_list): New function.
17743 (sort_member_init): Handle anonymous union initialization order
17744 correctly. Check for multiple initializations of the same union.
17745 (emit_base_init): Don't look up fields by name here.
17746 (expand_member_init): Record the result of name lookup for future
17747 reference.
17748 * typeck.c (build_component_ref): Fix formatting.
17749
17750 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
17751
17752 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
17753 * typeck.c (build_x_compound_expr): Replace warn_unused with
17754 warn_unused_value.
17755
17756 * decl2.c (lang_decode_option): Update -Wall unused flags by
17757 calling set_Wunused.
17758
17759 2000-05-16 Mark Mitchell <mark@codesourcery.com>
17760
17761 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
17762 * init.c (dfs_vtable_path_unmark): Remove.
17763 * search.c (marked_new_vtable_p): Likewise.
17764 (unmarked_new_vtable_p): Likewise.
17765 (dfs_search_slot_nonempty_p): Likewise.
17766 (dfs_mark): Likewise.
17767 (dfs_vtable_path_unmark): Likewise.
17768 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
17769 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
17770 (dfs_init_vbase_pointers): Remove special-case new ABI code.
17771 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
17772 (init_vbase_pointers): Simplify.
17773 (expand_indirect_vtbls_init): Likewise.
17774
17775 * class.c (copy_virtuals): New function.
17776 (build_primary_table): Use it.
17777 (build_secondary_vtable): Likewise.
17778 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
17779 indicate that no vcall offset is required.
17780 (add_virtual_function): Likewise.
17781 (modify_all_vtables): Likewise.
17782 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17783 (dfs_accumulate_vtbl_inits): Likewise.
17784 (build_vtbl_initializer): Make changes to handle construction
17785 vtables.
17786 (dfs_build_vcall_offset_vtbl_entries): Likewise.
17787 (build_rtti_vtbl_entries): Likewise.
17788 (build_vtable_entries): Handle a NULL vcall_index.
17789
17790 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
17791
17792 * decl2.c (lang_decode_option): Fix thinko.
17793
17794 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
17795
17796 * except.c (check_handlers): New fn.
17797 * cp-tree.h: Declare it.
17798 * semantics.c (finish_handler_sequence): Call it.
17799 (finish_function_handler_sequence): Likewise.
17800 (finish_handler_parms): Set TREE_TYPE on the handler.
17801 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
17802 * search.c (get_base_distance_recursive): If protect>1, ignore
17803 special access.
17804 (get_base_distance): Don't reduce watch_access.
17805
17806 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
17807
17808 * lex.c: #include diagnostic.h.
17809 (lang_init_options): Set default prefixing rules.
17810
17811 * lang-options.h: Add -fdiagnostics-show-location=.
17812
17813 * decl2.c: #include diagnostic.h.
17814 (lang_decode_option): Handle -fdiagnostics-show-location=.
17815
17816 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
17817
17818 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
17819 * vec.cc: Revert my 2000-05-07 change.
17820
17821 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
17822
17823 * class.c (check_field_decls): Complain about non-static data
17824 members with same name as class in class with constructor.
17825
17826 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
17827
17828 * decl.c (grokdeclarator): Allow non-static data members with
17829 same name as class.
17830
17831 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
17832
17833 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
17834 and pending_inline.filename. Update prototypes.
17835 * decl.c (define_label): Constify filename parameter.
17836 * decl2.c (warn_if_unknown_interface): Constify local char *.
17837 * input.c Constify input_source.filename. Don't declare
17838 input_filename or lineno. Constify filename parameter to feed_input.
17839 * lex.c (init_parse): Constify parameter and return value.
17840 (cp_pragma_interface, cp_pragma_implementation): Constify
17841 filename argument.
17842 (reinit_parse_for_method, reinit_parse_for_block,
17843 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
17844 Constify local char *.
17845 * pt.c: Don't declare lineno or input_filename.
17846 (print_template_context, tsubst_friend_function, tsubst_decl,
17847 tsubst, instantiate_decl): Constify local char *.
17848 * semantics.c (expand_body): Constify local char *.
17849 * tree.c (build_srcloc): Constify filename parameter.
17850 * typeck.c (c_expand_asm_operands): Constify filename
17851 parameter.
17852
17853 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
17854
17855 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
17856 offsetof expansion.
17857
17858 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
17859
17860 * inc/cxxabi.h: Fix typos in comment.
17861 (__base_class_info::__offset): Use a static_cast.
17862
17863 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
17864
17865 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
17866 of std::size_t and std::ptrdiff_t respectively.
17867 * tinfo.cc: Likewise.
17868 * vec.cc: Likewise.
17869
17870 2000-05-06 Richard Henderson <rth@cygnus.com>
17871
17872 * typeck.c (build_c_cast): Don't warn integer->pointer size
17873 mismatch for constants.
17874
17875 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
17876
17877 * rtti.c (ptmd_initializer): Set non-public, if class is
17878 incomplete.
17879
17880 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
17881 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17882 __cxa_vec_delete): Likewise.
17883 * tinfo.cc (__dynamic_cast): Likewise.
17884 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17885 __cxa_vec_delete): Likewise.
17886
17887 2000-05-04 Mark Mitchell <mark@codesourcery.com>
17888
17889 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
17890 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
17891 (lang_decl_flags): Add vcall_offset.
17892 (THUNK_VCALL_OFFSET): Use it.
17893 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
17894 * method.c (make_thunk): Create the lang_decl here, not in
17895 emit_thunk.
17896 (emit_thunk): Make generic thunks into ordinary functions once
17897 they have been fed to expand_body.
17898 * semantics.c (expand_body): Set current_function_is_thunk here.
17899
17900 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17901
17902 * class.c (update_vtable_entry_for_fn): Prototype.
17903
17904 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
17905 and `tmpl'.
17906
17907 * search.c (dfs_build_inheritance_graph_order): Prototype.
17908
17909 2000-05-04 Mark Mitchell <mark@codesourcery.com>
17910
17911 * cp-tree.h (special_function_kind): Add various kinds of
17912 destructors.
17913 (special_function_p): New function.
17914 * class.c (overrides): Don't let one kind of destructor override
17915 another.
17916 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
17917 whether or not to instantiate a template.
17918 * tree.c (special_function_p): Define.
17919
17920 2000-05-03 Mark Mitchell <mark@codesourcery.com>
17921
17922 * cp-tree.def (THUNK_DECL): Remove.
17923 * cp-tree.h (DECL_THUNK_P): New macro.
17924 (DECL_NON_THUNK_FUNCTION_P): Likewise.
17925 (DECL_EXTERN_C_FUNCTION_P): Likewise.
17926 (SET_DECL_THUNK_P): Likewise.
17927 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
17928 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
17929 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
17930 * decl.c (decls_match): Use DECL_EXTERN_C_P.
17931 (duplicate_decls): Likewise.
17932 (pushdecl): Likewise. Adjust thunk handling.
17933 (grokfndecl): Use DECL_EXTERN_C_P.
17934 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
17935 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
17936 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
17937 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
17938 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
17939 DECL_NO_STATIC_CHAIN.
17940 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
17941 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
17942 * search.c (covariant_return_p): Remove THUNK_DECL handling.
17943 * ir.texi: Update.
17944
17945 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
17946
17947 * tree.c (walk_tree): Set lineno.
17948
17949 2000-05-01 Mark Mitchell <mark@codesourcery.com>
17950
17951 * exception.cc: Update license notice.
17952 * new.cc: Likewise.
17953 * new1.cc: Likewise.
17954 * new2.cc: Likewise.
17955 * tinfo.cc: Likewise.
17956 * tinfo2.cc: Likewise.
17957 * vec.cc: Likewise.
17958 * inc/cxxabi.h: Likewise.
17959 * inc/exception: Likewise.
17960 * inc/new: Likewise.
17961 * inc/new.h: Likewise.
17962 * inc/typeinfo: Likewise.
17963
17964 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
17965
17966 * tree.c (build_target_expr_with_type): If we already have a
17967 TARGET_EXPR, just return it.
17968
17969 * optimize.c (initialize_inlined_parameters): Don't generate an
17970 EXPR_STMT if we can just use DECL_INITIAL.
17971 * decl.c (emit_local_var): Only make the initialization a
17972 full-expression if stmts_are_full_exprs_p.
17973
17974 2000-05-01 Mark Mitchell <mark@codesourcery.com>
17975
17976 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
17977 macro.
17978 * call.c (standard_conversion): Use it.
17979 (direct_reference_binding): Likewise.
17980 (build_over_call): Likewise.
17981 (is_properly_derived_from): Likewise.
17982 (compare_ics): Likewise.
17983 * class.c (resolves_to_fixed_type_p): Likewise.
17984 * optimize.c (declare_return_variable): Likewise.
17985 * pt.c (is_specialization_of): Likewise.
17986 (unify): Likewise.
17987 * typeck.c (comp_target_parms): Likeiwse.
17988 (build_static_cast): Likewise.
17989 (build_reinterpret_cast): Likewise.
17990 (build_const_cast): Likewise.
17991 (comp_ptr_ttypes_real): Likewise.
17992 (comp_ptr_ttypes_const): Likewise.
17993 * typeck2.c (process_init_constructor): Likewise.
17994
17995 2000-04-30 Scott Snyder <snyder@fnal.gov>
17996
17997 * decl.c (finish_destructor_body): Use the base destructor when
17998 destroying virtual bases.
17999
18000 2000-04-30 Mark Mitchell <mark@codesourcery.com>
18001
18002 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18003 STMT_EXPRs.
18004 * optimize.c (struct inline_data): Add target_exprs field.
18005 (declare_return_variable): When a function returns an aggregate,
18006 use the variable declared in the TARGET_EXPR as the remapped
18007 DECL_RESULT.
18008 (expand_call_inline): Update the pending target_exprs stack.
18009 (optimize_function): Initialize the stack.
18010
18011 * decl2.c (finish_file): Fix typo in comment.
18012
18013 * method.c (emit_thunk): Don't try to return a `void' value.
18014
18015 * optimize.c (initialize_inlined_parameters): If the parameter is
18016 addressable, we need to make a new VAR_DECL, even if the
18017 initializer is constant.
18018
18019 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
18020
18021 * decl.c (grok_op_properties): Add an extra check of argtypes.
18022
18023 2000-04-27 Mark Mitchell <mark@codesourcery.com>
18024
18025 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18026 variables.
18027 (initialize_inlined_parameters): Try to avoid creating new
18028 VAR_DECLs.
18029
18030 2000-04-27 Alex Samuel <samuel@codesourcery.com>
18031
18032 * lex.c (my_get_run_time): Remove.
18033 (init_filename_times): Use get_run_time instead of my_get_run_time.
18034 (check_newline): Likewise.
18035 (dump_time_statistics): Likewise.
18036 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18037 of computing elapsed time explicitly.
18038
18039 2000-04-26 Mark Mitchell <mark@codesourcery.com>
18040
18041 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18042 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18043 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18044 before calling decl_constant_value.
18045 * class.c (check_bitfield_decl): Likewise.
18046 * cvt.c (ocp_convert): Likewise.
18047 (convert): Likewise.
18048 * decl.c (compute_array_index_type): Likewise.
18049 (build_enumerator): Likewise.
18050 * decl2.c (check_cp_case_value): Likewise.
18051 * pt.c (convert_nontype_argument): Likewise.
18052 (tsubst): Likewise.
18053 * typeck.c (decay_conversion): Likewise.
18054 (build_compound_expr): Likewise.
18055 (build_reinterpret_cast): Likewise.
18056 (build_c_cast): Likewise.
18057 (convert_for_assignment): Likewise.
18058
18059 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
18060
18061 * decl.c (finish_function): Don't play games with DECL_INLINE.
18062
18063 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
18064
18065 * ir.texi: Correct typo.
18066
18067 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18068
18069 * decl.c (grokdeclarator): Reject VLAs as members.
18070
18071 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
18072
18073 * call.c (standard_conversion): Accept conversion between
18074 COMPLEX_TYPEs.
18075
18076 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
18077
18078 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
18079
18080 * decl2.c (finish_file): Remove double setup for accounting
18081 compile time.
18082
18083 2000-04-24 Robert Lipe <robertlipe@usa.net>
18084
18085 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
18086
18087 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
18088
18089 * new.cc (set_new_handler): Needs to be in std::.
18090
18091 2000-04-23 Mark Mitchell <mark@codesourcery.com>
18092
18093 * cp-tree.h (lang_decl): Remove pretty_function_p.
18094 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
18095 language-specific node.
18096 * decl.c (cp_make_fname_decl): Use build_decl, not
18097 build_lang_decl, to build the variables.
18098 (grokvardecl): Don't call build_lang_decl for local variables in
18099 templates.
18100 (grokdeclarator): Don't call build_lang_decl for local type
18101 declarations in templates.
18102 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
18103 zero'd memory, rather than calling memset.
18104 * pt.c: Include hashtab.h.
18105 (local_specializations): New variable.
18106 (retrieve_local_specialization): Use it.
18107 (register_local_specialization): Likewise.
18108 (tsubst_decl): Don't assume local variables have
18109 DECL_LANG_SPECIFIC.
18110 (instantiate_decl): Set up local_specializations.
18111 * Makefile.in (HTAB_H): New variable.
18112
18113 2000-04-23 Richard Henderson <rth@cygnus.com>
18114
18115 * typeck.c (c_expand_asm_operands): Restore the original
18116 contents of the output list.
18117
18118 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
18119
18120 * ir.texi: Document complex number representation.
18121
18122 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
18123
18124 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
18125 (target_incomplete_p): New function.
18126 (tinfo_base_init): Create comdat NTBS name variable.
18127 (ptr_initializer): Add non_public parameter. Calculate it.
18128 (ptmd_initializer): Likewise.
18129 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
18130 (create_real_tinfo_var): Add non_public parameter. Use it.
18131 Push proxy into global namespace.
18132 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
18133 New enumeration.
18134 * inc/typeinfo (type_info::before, type_info::operator==):
18135 Compare __name addresses.
18136
18137 * tinfo2.cc: Remove new-abi builtins comment.
18138
18139 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
18140
18141 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18142
18143 * call.c (joust): Exit early if we get the same function, too.
18144
18145 * decl2.c (key_method): Return NULL_TREE for template classes.
18146 (import_export_class): Don't need to check for template classes.
18147
18148 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
18149
18150 * lex.c: Remove references to cccp.c.
18151
18152 2000-04-18 Mark Mitchell <mark@codesourcery.com>
18153
18154 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18155 volatile_memfunc. Add destructor_attr. Adjust dummy.
18156 (DECL_DESTRUCTOR_P): Use destructor_attr.
18157 (DECL_CONST_MEMFUNC_P): Reimplement.
18158 (DECL_VOLATILE_MEMFUNC_P): Remove.
18159 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18160 (overrides): Use DECL_DESTRUCTOR_P.
18161 (check_for_override): Likewise.
18162 * decl.c (start_function): Likewise.
18163 * decl2.c (grokfclassfn): Likewise.
18164 (check_classfn): Likewise.
18165 (grok_function_init): Likewise.
18166
18167 2000-04-17 Mark Mitchell <mark@codesourcery.com>
18168
18169 * decl2.c (grokfield): Issue error on illegal data member
18170 declaration.
18171
18172 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
18173
18174 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18175
18176 2000-04-16 Mark Mitchell <mark@codesourcery.com>
18177
18178 * class.c (build_vtable_entry): Don't build thunks for type-info
18179 functions.
18180
18181 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
18182
18183 * decl.c (decls_match): Allow a redeclaration of a builtin to
18184 specify args while the builtin did not.
18185
18186 2000-04-15 Mark Mitchell <mark@codesourcery.com>
18187
18188 * cp-tree.def (THUNK_DECL): Add to documentation.
18189 * cp-tree.h (flag_huge_objects): Declare.
18190 * class.c (modify_vtable_entry): Tidy.
18191 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18192 Calculate delta appropriately for the new ABI.
18193 (dfs_modify_vtables): Use it.
18194 (modify_all_vtables): Fix thinko in code to add overriding copies
18195 of functions to primary vtables.
18196 (build_clone): Fix typo in comment.
18197 (clone_function_decl): Correct order of destructors in vtable.
18198 (build_vbase_offset_vtbl_entries): Adjust comment.
18199 (dfs_vcall_offset_queue_p): Remove.
18200 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18201 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18202 (build_vtable_entry): Correct check for pure virtual functions.
18203 Don't declare flag_huge_objects.
18204 * decl.c (flag_huge_objects): Remove declaration.
18205 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18206 Use int_size_in_bytes.
18207 (emit_thunk): Handle vcall offset thunks.
18208
18209 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18210
18211 * decl2.c (parse_time, varconst_time): Delete declarations.
18212 (finish_file): Delete LINENO declaration.
18213 START_TIME and THIS_TIME now long.
18214
18215 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
18216
18217 * class.c (build_base_field): Reformat comment.
18218
18219 * inc/cxxabi.h (stddef.h): Comment inclusion.
18220 (__base_class_info::__offset): Comment shift.
18221
18222 2000-04-12 Mark Mitchell <mark@codesourcery.com>
18223
18224 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18225 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18226 (cp_push_exception_identifier): New macro.
18227 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18228 (DECL_BASE_DESTRUCTOR_P): Likewise.
18229 (DECL_DELETING_DESTRUCTOR_P): Likewise.
18230 (get_vtbl_decl_for_binfo): Fix formatting.
18231 (in_charge_arg_for_name): New macro.
18232 (maybe_build_cleanup_and_delete): Remove declaration.
18233 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18234 (in_charge_arg_for_name): New function.
18235 (build_new_method_call): Use it. Handle cloned destructors.
18236 (build_clone): Don't make the base constructor virtual.
18237 Automatically defer generated functions.
18238 (clone_function_decl): Handle destructors, too.
18239 (clone_constructors_and_destructors): Likewise.
18240 (create_vtable_ptr): Don't create a vtable entry for a cloned
18241 function.
18242 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18243 (initialize_predefined_identifiers): Update appropriately.
18244 (finish_destructor_body): Simplify.
18245 (maybe_build_cleanup_and_delete): Remove.
18246 * except.c (expand_throw): Handle new-ABI destructors.
18247 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18248 (build_dtor_call): New function.
18249 (build_delete): Use it. Simplify.
18250 * optimize.c (maybe_clone_body): Handle destructors.
18251 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18252
18253 * exception.cc (cleanup_fn): New typedef.
18254 (CALL_CLEANUP): New macro.
18255 (cp_eh_info): Use them.
18256 (__cp_push_exception): Likewise.
18257 (__cp_pop_exception): Likewise.
18258
18259 2000-04-11 Mark Mitchell <mark@codesourcery.com>
18260
18261 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18262 (complete_dtor_identifier): New macro.
18263 (CLASSTYPE_FIRST_CONVERSION): Remove.
18264 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18265 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18266 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18267 (CLASSTYPE_CONSTRUCTORS): Likewise.
18268 (CLASSTYPE_DESTRUCTORS): Likewise.
18269 (lang_decl): Add cloned_function.
18270 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18271 (DECL_BASE_CONSTRUCTOR_P): Likewise.
18272 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18273 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18274 (DECL_CLONED_FUNCTION_P): Likewise.
18275 (DECL_CLONED_FUNCTION): Likewise.
18276 (clone_function_decl): Declare.
18277 (maybe_clone_body): Likewise.
18278 * call.c (build_user_type_conversion_1): Call complete object
18279 constructors in the new ABI.
18280 (build_new_method_call): Don't add in-charge parameters under the
18281 new ABI.
18282 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18283 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18284 CLASSTYPE_DESTRUCTOR_SLOT.
18285 (build_clone): New function.
18286 (clone_function_decl): Likewise.
18287 (clone_constructors_and_destructors): Likewise.
18288 (check_bases_and_members): Use it.
18289 * decl.c (iniitialize_predefined_identifiers): Initialize
18290 complete_dtor_identifier.
18291 (finish_function): Don't add extra code to a clone.
18292 (lang_mark_tree): Mark cloned_function.
18293 * decl2.c (mark_used): Don't bother trying to instantiate things
18294 we synthesized.
18295 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18296 * method.c (set_mangled_name_for_decl): Don't treat clones as
18297 constructors.
18298 (synthesize_method): Sythesize cloned functions, not the clones.
18299 * optimize.c (inline_data): Update comment on ret_label.
18300 (remap_block): Don't assume DECL_INITIAL exists.
18301 (copy_body_r): Allow ret_label to be NULL.
18302 (maybe_clone_body): Define.
18303 * pt.c (tsubst_decl): Handle clones.
18304 (instantiate_clone): New function.
18305 (instantiate_template): Use it.
18306 (set_mangled_name_for_template_decl): Don't treat clones as
18307 constructors.
18308 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18309 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18310 * semantics.c (expand_body): Clone function bodies as necessary.
18311
18312 * optimize.c (remap_decl): Avoid sharing structure for arrays
18313 whose size is only known at run-time.
18314 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18315
18316 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18317 to has_in_charge_parm_p.
18318 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18319 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18320 (DECL_COPY_CONSTRUCTOR_P): New macro.
18321 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18322 (build_user_type_conversion_1): Likewise.
18323 (convert_like_real): Likewise.
18324 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
18325 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18326 (copy_args_p): Likewise.
18327 (grok_ctor_properties): Likewise.
18328 (start_function): Likewise.
18329 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
18330 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18331 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18332 * method.c (do_build_copy_constructor): Use
18333 DECL_HAS_IN_CHARGE_PARM_P.
18334 (synthesize_method): Likewise.
18335 * pt.c (instantiate_template): Remove goto.
18336 * tree.c (build_cplus_method_type): Remove mention of obstacks in
18337 comment.
18338
18339 * cp-tre.h (finish_function): Change prototype.
18340 * decl.c (end_cleanup_fn): Adjust caller.
18341 (finish_function): Take only one parameter.
18342 * decl2.c (finish_objects): Adjust caller.
18343 (finish_static_storage_duration_function): Likewise.
18344 * method.c (emit_thunk): Likewise.
18345 * parse.y: Likewise.
18346 * parse.c: Regenerated.
18347 * pt.c (instantiate_decl): Likewise.
18348 * rtti.c (synthesize_tinfo_fn): Likewise.
18349 * semantics.c (expand_body): Likewise.
18350
18351 * cp-tree.h (copy_decl): New function.
18352 * class.c (finish_struct_1): Use it.
18353 * lex.c (copy_decl): Define it.
18354 * pt.c (tsubst_decl): Likewise.
18355 * tree.c (copy_template_template_parm): Likewise.
18356
18357 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18358 has_nonpublic_assign_ref.
18359 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18360 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18361 * class.c (finish_struct_methods): Don't set
18362 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18363 (interface_only): Don't declare.
18364 (interface_unknown): Likewise.
18365
18366 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18367
18368 * tree.h (HAVE_TEMPLATES): Remove definition.
18369 * lang-options.h (-fthis-is-variable): Remove documentation.
18370
18371 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
18372
18373 * class.c (instantiate_type): Handle object-relative template-id.
18374
18375 * semantics.c (finish_expr_stmt): Call convert_to_void here.
18376 * decl.c (cplus_expand_expr_stmt): Not here.
18377
18378 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
18379 Initialize exprtype earlier.
18380
18381 * parse.y (fn.def1): Check for defining types in return types.
18382
18383 * decl.c (check_tag_decl): Notice extra fundamental types.
18384 Diagnose empty decls in classes, too.
18385
18386 * decl.c (grokdeclarator): Don't override an anonymous name if no
18387 declarator was given.
18388
18389 * cvt.c (convert_to_void): Call resolve_offset_ref.
18390
18391 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
18392
18393 * decl2.c (decl_namespace): Handle getting a type.
18394
18395 * typeck.c (build_c_cast): Re-enable warning for cast between
18396 pointer and integer of different size.
18397
18398 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
18399
18400 * inc/cxxabi.h (__pointer_type_info): Add restrict and
18401 incomplete flags.
18402 (__pointer_type_info::__pointer_catch): New virtual function.
18403 (__pointer_to_member_type_info): Derive from
18404 __pointer_type_info. Adjust.
18405 (__pointer_to_member_type_info::__do_catch): Remove.
18406 (__pointer_to_member_type_info::__is_pointer_p): Declare.
18407 (__pointer_to_member_type_info::__pointer_catch): Declare.
18408 * rtti.c (qualifier_flags): Add restrict flag.
18409 (ptmd_initializer): Reorder members.
18410 (create_tinfo_types): Expand comments. Reorder
18411 ptmd_desc_type_node members.
18412 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
18413 Implement.
18414 (__pointer_type_info::__do_catch): Move specific code into
18415 __pointer_catch. Call it.
18416 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
18417 specific catch checking. Fix void conversion check.
18418 (__pointer_to_member_type_info::__do_catch): Remove.
18419 (__pointer_to_member_type_info::__pointer_catch): Implement.
18420
18421 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18422
18423 * lex.c (init_parse): Remove traces of classof and headof.
18424 * decl2.c (flag_operator_names): Default to 1.
18425 (lang_decode_option): Do not set it for -ansi.
18426
18427 2000-04-09 Mark Mitchell <mark@codesourcery.com>
18428
18429 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
18430 (DECL_MAIN_VARIANT): Remove.
18431 * decl.c (duplicate_decls): Don't set it.
18432 (start_function): Likewise.
18433 (lang_mark_tree): Don't mark it.
18434 * decl2.c (defer_fn): Don't use it.
18435 * lex.c (retrofit_lang_decl): Don't set it.
18436 * pt.c (tsubst_decl): Likewise.
18437 * ptree.c (print_lang_decl): Don't print it.
18438 * typeck.c (mark_addressable): Don't use it.
18439
18440 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
18441
18442 * vec.cc: Include <new> and <exception>.
18443 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
18444 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
18445 terminate.
18446 (__cxa_vec_delete): Catch dtor exceptions.
18447
18448 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
18449
18450 Prepend __ to implementation defined names.
18451 * inc/typeinfo (type_info): Rename _name to __name.
18452 (type_info::type_info): Rename parameter.
18453 (type_info::operator==, type_info::operator!=,
18454 type_info::before): Likewise.
18455 (type_info::is_pointer_p, type_info::is_function_p,
18456 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
18457 parameters.
18458 * inc/cxxabi.h
18459 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
18460 (__pointer_type_info::__pointer_type_info): Likewise.
18461 (__pointer_type_info::is_pointer_p,
18462 __pointer_type_info::do_catch): Prepend __. Rename parameters.
18463 (__array_type_info::__array_type_info): Rename parameters.
18464 (__function_type_info::__function_type_info): Likewise.
18465 (__function_type_info::is_function_p): Prepend __.
18466 (__enum_type_info::__enum_type_info): Rename parameters.
18467 (__pointer_to_member_type_info::__pointer_to_member_type_info):
18468 Likewise.
18469 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
18470 parameters.
18471 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
18472 (__class_type_info::__class_type_info): Rename parameters.
18473 (__class_type_info::sub_kind): Prepend __. Adjust member names.
18474 (__class_type_info::upcast_result,
18475 __class_type_info::dyncast_result): Prepend __. Move definition
18476 into tinfo.cc.
18477 (__class_type_info::do_upcast, __class_type_info::do_catch,
18478 __class_type_info::find_public_src,
18479 __class_type_info::do_dyncast,
18480 __class_type_info::do_find_public_src): Prepend __. Rename
18481 parameters.
18482 (__si_class_type_info::__si_class_type_info): Rename parameters.
18483 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
18484 __si_class_type_info::do_find_public_src): Prepent __. Rename
18485 parameters.
18486 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
18487 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
18488 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
18489 parameters.
18490 (__dynamic_cast): Rename parameters.
18491 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
18492 type_info::do_catch, type_info::do_upcast): Prepend __.
18493 (contained_p, public_p, virtual_p, contained_public_p,
18494 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
18495 (__class_type_info::do_catch,
18496 __class_type_info::do_upcast): Prepend __. Adjust.
18497 (__class_type_info::__upcast_result,
18498 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
18499 Adjust.
18500 (__class_type_info::find_public_src): Prepend __. Adjust.
18501 (__class_type_info::do_find_public_src,
18502 __si_class_type_info::do_find_public_src,
18503 __vmi_class_type_info::do_find_public_src): Likewise.
18504 (__class_type_info::do_dyncast,
18505 __si_class_type_info::do_dyncast,
18506 __vmi_class_type_info::do_dyncast): Likewise.
18507 (__class_type_info::do_upcast,
18508 __si_class_type_info::do_upcast,
18509 __vmi_class_type_info::do_upcast): Likewise.
18510 (__dynamic_cast): Adjust.
18511 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
18512 (__function_type_info::is_function_p): Likewise.
18513 (__pointer_type_info::do_catch): Likewise. Adjust.
18514 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
18515 (__throw_type_match_rtti_2): Adjust.
18516 (__is_pointer): Adjust.
18517
18518 2000-04-08 Mark Mitchell <mark@codesourcery.com>
18519
18520 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
18521 (complete_ctor_identifier): New macro.
18522 (special_function_kind): Add sfk_copy_constructor and
18523 sfk_assignment_operator.
18524 (LOOKUP_HAS_IN_CHARGE): Remove.
18525 (cons_up_default_function): Rename to ...
18526 (implicitly_declare_fn): ... this.
18527 * call.c (build_new_method_call): Add in-charge parameters for
18528 constructors here.
18529 * class.c (add_implicitly_declared_members): Change parameter name
18530 from cant_have_assignment to cant_have_const_assignment.
18531 Replace calls to cons_up_default_function to implicitly_declare_fn.
18532 * cvt.c (ocp_convert): Use complete_ctor_identifier.
18533 * decl.c (initialize_predefined_identifiers): Initialize it.
18534 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
18535 complex expression.
18536 * init.c (expand_default_init): Don't calculate the in-charge
18537 parameter here.
18538 (build_new_1): Likewise.
18539 * lex.c (cons_up_default_function): Move to method.c.
18540 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
18541 (implicitly_declare_fn): New function.
18542 * typeck.c (build_static_cast): Use complete_ctor_identifier.
18543 (build_modify_expr): Likewise.
18544 * typeck2.c (build_functional_cast): Likewise.
18545
18546 Under the new ABI, constructors don't return `this'.
18547 * cp-tree.h (warn_reorder): Declare.
18548 (special_function_kind): New enum.
18549 (global_base_init_list): Remove declaration.
18550 (emit_base_init): Don't return a value.
18551 (check_base_init): Don't declare.
18552 (is_aggr_typedef): Likewise.
18553 * decl.c (check_special_function_return_type): New function.
18554 (return_types): Remove.
18555 (grokdeclarator): Use check_special_function_return_type.
18556 (start_function): Don't initialize ctor_label under the new ABI.
18557 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
18558 * init.c (begin_init_stmts): Move to top of file.
18559 (finish_init_stmts): Likewise.
18560 (warn_reorder): Don't declare.
18561 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
18562 value.
18563 (check_base_init): Remove.
18564 (is_aggr_typedef): Likewise.
18565 (build_new_1): Don't use the return value of a constructor.
18566 * semantics.c (setup_vtbl_ptr): Don't use the return value
18567 of emit_base_init.
18568 * typeck.c (check_return_expr): Don't magically convert return
18569 statements into `return this' in constructors under the new ABI.
18570
18571 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
18572 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
18573 (base_ctor_identifier): New macro.
18574 (base_dtor_identifier): Likewise.
18575 (deleting_dtor_identifier): Likewise.
18576 * decl.c: Don't include obstack.h.
18577 (obstack_chunk_alloc): Don't define.
18578 (obstack_chunk_free): Likewise.
18579 (struct predefined_identifier): New type.
18580 (initialize_predefined_identifiers): New function.
18581 (init_decl_processing): Use it.
18582 (debug_temp_inits): Remove.
18583 (start_method): Don't call preserve_data.
18584 (hack_incomplete_structures): Update comment.
18585 * init.c (init_init_processing): Don't initialize
18586 nelts_identifier.
18587 (build_offset_rf): Remove dead code.
18588 (build_delete): Use CLASSTYPE_N_BASECLASSES.
18589 * search.c (init_search_processing): Don't initialize
18590 vptr_identifier.
18591
18592 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18593
18594 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
18595 some sign_compare warnings.
18596
18597 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
18598
18599 Rename abi::__vmi_class_type_info members.
18600 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
18601 base_list, detail_masks members to vmi_flags, vmi_base_count,
18602 vmi_bases and vmi_flags_masks respectively.
18603 (__vmi_class_type_info::vmi_flags_masks): Rename
18604 details_unknown_mask to flags_unknown_mask.
18605 * tinfo.cc (__class_type_info::do_upcast): Adjust.
18606 (__vmi_class_type_info::do_find_public_src): Adjust.
18607 (__vmi_class_type_info::do_dyncast): Adjust.
18608 (__vmi_class_type_info::do_upcast): Adjust.
18609
18610 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
18611
18612 * tinfo.cc (convert_to_base): New function.
18613 (get_vbase_offset): Remove. Move into convert_to_base.
18614 (__vmi_class_type_info::do_find_public_src): Adjust.
18615 (__vmi_class_type_info::do_dyncast): Adjust.
18616 (__vmi_class_type_info::do_upcast): Adjust.
18617
18618 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
18619
18620 * tinfo.cc (operator=): Use __builtin_strcmp.
18621 * tinfo2.cc (before): Likewise.
18622
18623 2000-04-06 Mark Mitchell <mark@codesourcery.com>
18624
18625 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
18626 (DECL_SAVED_INLINE): Rename to ...
18627 (DECL_DEFERRED_FN): ... this.
18628 (in_function_p): Remove declaration.
18629 (mark_inline_for_output): Rename to ...
18630 (defer_fn): ... this.
18631 * decl.c (finish_function): Adjust call to mark_inline_for_output.
18632 (in_function_p): Remove definition.
18633 * decl2.c (saved_inlines): Rename to ...
18634 (deferred_fns): ... this.
18635 (saved_inlines_used): Rename to ...
18636 (deferred_fns_used): ... this.
18637 (mark_inline_for_output): Rename to ...
18638 (defer_fn): ... this.
18639 (finish_file): Adjust accordingly.
18640 (init_decl2): Likewise.
18641 * lex.c (cons_up_default_function): Likewise.
18642 * pt.c (mark_decl_instantiated): Likewise.
18643 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
18644 circumstances.
18645 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
18646 * semantics.c (expand_body): Defer more functions.
18647
18648 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
18649
18650 * vec.cc: New file.
18651 * Make-lang.in (CXX_LIB2FUNCS): Add it.
18652 (vec.o): Build it.
18653 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18654 __cxa_vec_delete): Declare.
18655
18656 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
18657
18658 * rtti.c (dfs_class_hint_mark): New static function.
18659 (dfs_class_hint_unmark): New static function.
18660 (class_hint_flags): Use them.
18661
18662 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
18663
18664 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
18665
18666 2000-04-05 Mark Mitchell <mark@codesourcery.com>
18667
18668 * cp-tree.h (instantiate_decl): Change prototype.
18669 * decl2.c (mark_used): Adjust call.
18670 * optimize.c (inlinable_function_p): Adjust handling of templates.
18671 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
18672 (do_type_instantiation): Likewise.
18673 (instantiate_decl): Defer more templates.
18674 (instantiate_pending_templates): Adjust logic to handle inline
18675 friend functions.
18676
18677 * Makefile.in (GGC_H): New variable. Use it throughout in place
18678 of ggc.h.
18679
18680 * call.c: Don't include obstack.h. Include ggc.h.
18681 (obstack_chunk_alloc): Don't define.
18682 (obstack_chunk_free): Likewise.
18683 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
18684 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
18685 (pop_switch): Free it.
18686
18687 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
18688
18689 * dump.c (dequeue_and_dump): Don't try to print the bit_position
18690 if we don't have a DECL_FIELD_OFFSET.
18691
18692 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
18693
18694 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
18695 special_function_p.
18696
18697 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18698
18699 * cfns.gperf (hash, libc_name_p): Prototype.
18700
18701 * rtti.c (build_dynamic_cast_1): Constification.
18702
18703 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
18704
18705 * semantics.c (deferred_type_access_control): Prototype.
18706
18707 2000-04-04 Mark Mitchell <mark@codesourcery.com>
18708
18709 Correct many new ABI issues regarding vbase and vcall offset
18710 layout.
18711 * cp-tree.h (BINFO_VTABLE): Document.
18712 (struct lang_type): Tweak formatting.
18713 (BINFO_PRIMARY_BINFO): Add to documentation.
18714 (CLASSTYPE_VSIZE): Fix typo in comment.
18715 (CLASSTYPE_VBASECLASSES): Update documentation.
18716 (BINFO_VBASE_MARKED): Remove.
18717 (SET_BINFO_VBASE_MARKED): Likewise.
18718 (CLEAR_BINFO_VBASE_MARKED): Likewise.
18719 (BINFO_FIELDS_MARKED): Remove.
18720 (SET_BINFO_FIELDS_MARKED): Likewise.
18721 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
18722 (enum access_kind): New enumeration.
18723 (num_extra_vtbl_entries): Remove declaration.
18724 (size_extra_vtbl_entries): Likewise.
18725 (get_vtbl_decl_for_binfo): New function.
18726 (dfs_vbase_unmark): Remove declaration.
18727 (mark_primary_bases): Likewise.
18728 * class.c (SAME_FN): Remove.
18729 (struct vcall_offset_data_s): Move definition.
18730 (build_vbase_pointer): Use `build', not `build_binary_op', to
18731 access the vbase pointer under the new ABI.
18732 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
18733 (build_primary_vtable): Likewise.
18734 (dfs_mark_primary_bases): Move here from search.c.
18735 (mark_primary_bases): Likewise.
18736 (determine_primary_bases): Under the new ABI, don't make a base
18737 class a primary base just because we don't yet have any virtual
18738 functions.
18739 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
18740 (num_vfun_entries): Remove.
18741 (dfs_count_virtuals): Likewise.
18742 (num_extra_vtbl_entries): Likewise.
18743 (size_extra_vtbl_entries): Likewise.
18744 (layout_virtual_bases): Iterate in inheritance graph order under
18745 the new ABI.
18746 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
18747 indicate that a vfield is present.
18748 (init_class_processing): Initialize access_public_node, etc., from
18749 ak_public, etc.
18750 (get_vtbl_decl_for_binfo): New function.
18751 (dump_class_hierarchy_r): Likewise.
18752 (dump_class_hierarchy): Use it.
18753 (finish_vtbls): Build the vtbls in inheritance graph order.
18754 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18755 (initialize_vtable): Use get_vtbl_decl_for_binfo.
18756 (accumulate_vtbl_inits): Add comments explaining why a pre-order
18757 walk is required.
18758 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
18759 where the vptr points, even for primary vtables.
18760 (build_vtbl_initializer): Adjust handling of vbase and vcall
18761 offsets.
18762 (build_vcall_and_vbase_vtable_entries): New function.
18763 (dfs_build_vbase_offset_vtbl_entries): Remove.
18764 (build_vbase_offset_vtbl_entries): Reimplement.
18765 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
18766 were already handled in a primary base class vtable.
18767 (build_vcall_offset_vtbl_entries): Adjust.
18768 (build_rtti_vtbl_entries): Adjust.
18769 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
18770 * init.c (expand_virtual_init): Simplify.
18771 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
18772 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
18773 * search.c (BINFO_ACCESS): New macro.
18774 (SET_BINFO_ACCESS): Likewise.
18775 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
18776 (access_in_type): Likewise.
18777 (dfs_accessible_p): Likewise.
18778 (protected_accessible_p): Likewise.
18779 (lookup_fnfields_1): Adjust documentation.
18780 (dfs_mark_primary_bases): Move to class.c
18781 (mark_primary_bases): Likewise.
18782 (dfs_vbase_unmark): Remove.
18783 (virtual_context): Use BINFO_FOR_VBASE.
18784 (dfs_get_vbase_types): Simplify.
18785 (dfs_build_inheritance_graph_order): New function.
18786 (get_vbase_types): Use it.
18787 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
18788
18789 * tinfo.cc (get_vbase_offset): New function.
18790 (__vmi_class_type_info::do_find_public_src): Use it.
18791 (__vmi_class_type_info::do_dyncast): Likewise.
18792 (__vmi_class_type_info::do_upcast): Likewise.
18793
18794 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
18795
18796 * lang-specs.h: Pass -fno-show-column to the preprocessor.
18797
18798 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
18799
18800 * rtti.c (class_hint_flags): Rename flags.
18801 (class_initializer): Remove flags.
18802 (synthesize_tinfo_var): Combine offset and flags. Add flags
18803 for __vmi_class_type_info.
18804 (create_tinfo_types): Remove flags from __class_type_info and
18805 __si_class_type_info. Merge flags and offset from
18806 base_class_type_info.
18807 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
18808 (__base_class_info::is_virtual_p): Adjust.
18809 (__base_class_info::is_public_p): Adjust.
18810 (__base_class_info::offset): New accessor.
18811 (__class_type_info::details): Remove member.
18812 (__class_type_info::__class_type_info): Lose details.
18813 (__class_type_info::detail_masks): Remove.
18814 (__si_class_type_info::__si_class_type_info): Lose details.
18815 (__vmi_class_type_info::details): New member.
18816 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
18817 (__vmi_class_type_info::detail_masks): New member.
18818 * tinfo.cc (__class_type_info::do_upcast): Initialize result
18819 with unknown_details_mask.
18820 (__vmi_class_type_info::do_find_public_src): Adjust
18821 (__vmi_class_type_info::do_dyncast): Adjust.
18822 (__vmi_class_type_info::do_upcast): Set result details, if
18823 needed. Adjust.
18824 (__dynamic_cast): Temporarily #if out optimization.
18825
18826 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
18827
18828 * rtti.c (get_tinfo_decl): Mark used.
18829 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
18830 mark as dealt with, if we output it.
18831
18832 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18833
18834 * class.c: Reorganize to put virtual function table initialization
18835 machinery at the end of the file.
18836
18837 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
18838
18839 * class.c (finish_struct): Use bitsize_zero_node.
18840 * pt.c (instantiate_class_template): Likewise.
18841
18842 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18843
18844 Put RTTI entries at negative offsets in new ABI.
18845 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
18846 vbase offset at index -3, not -1.
18847 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
18848 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
18849 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
18850 (build_rtti_vtbl_entries): New function.
18851 (set_rtti_entry): Remove.
18852 (build_primary_vtable): Don't use it.
18853 (build_secondary_vtable): Likewise.
18854 (start_vtable): Remove.
18855 (first_vfun_index): New function.
18856 (set_vindex): Likewise.
18857 (add_virtual_function): Don't call start_vtable. Do call
18858 set_vindex.
18859 (set_primary_base): Rename parameter.
18860 (determine_primary_base): Likewise.
18861 (num_vfun_entries): Don't use skip_rtti_stuff.
18862 (num_extra_vtbl_entries): Include RTTI information.
18863 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
18864 (skip_rtti_stuff): Remove.
18865 (dfs_modify_vtables): Don't use it.
18866 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
18867 (layout_nonempty_base_or_field): Update size handling.
18868 (create_vtable_ptr): Tweak.
18869 (layout_class_type): Adjust parameter names.
18870 (finish_struct_1): Simplify.
18871 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
18872 (skip_rtti_stuff): Remove.
18873 (first_vfun_index): New function.
18874 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18875 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
18876 (marked_vtable_pathp): Declare.
18877 (unmarked_vtable_pathp): Likewise.
18878 * error.c (dump_expr): Use first_vfun_index to calculate vtable
18879 offsets.
18880 * rtti.c (build_headof): Look for RTTI at negative offsets.
18881 (get_tinfo_decl_dynamic): Likewise.
18882 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
18883 here.
18884 (create_pseudo_type_info): Do it here instead. Adjust so that
18885 vptr points at first virtual function.
18886 * search.c (marked_vtable_pathp): Make it global.
18887 (unmarked_vtable_pathp): Likewise.
18888 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18889 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18890 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
18891 (get_pure_virtuals): Likewise.
18892 (expand_upcast_fixups): Likewise.
18893 * tree.c (debug_binfo): Likewise.
18894 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
18895 negative offset.
18896
18897 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18898
18899 * class.c (check_field_decl): Fix typo.
18900 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
18901 (check_methods): Likewise.
18902 (check_field_decls): Likewise.
18903 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
18904 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
18905 Use DECL_RESULT_FLD, not DECL_RESULT.
18906 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
18907 * lex.c (identifier_type): Likewise.
18908 * pt.c (determine_specialization, lookup_template_class): Likewise.
18909 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
18910 (resolve_overloaded_unification, more_specialized): Likewise.
18911 * semantics.c (finish_member_declaration): Likewise.
18912 * typeck.c (build_x_function_call): Likewise.
18913
18914 2000-03-26 Mark Mitchell <mark@codesourcery.com>
18915
18916 * class.c (layout_empty_base): Handle empty bases with non-byte
18917 alignment.
18918 (build_base_field): Likewise.
18919 (layout_virtual_bases): Likewise.
18920
18921 * class.c (finish_struct_1): Fix typo in this change:
18922
18923 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18924
18925 2000-03-25 Mark Mitchell <mark@codesourcery.com>
18926
18927 * decl.c (grokdeclarator): Count partial specializations when
18928 keeping track of how many template classes have been seen.
18929
18930 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
18931
18932 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18933
18934 * class.c (build_vbase_pointer_fields): layout_field now place_field.
18935 (get_vfield_offset): Use byte_position.
18936 (set_rtti_entry): Set OFFSET to ssizetype zero.
18937 (get_binfo_offset_as_int): Deleted.
18938 (dfs_record_base_offsets): Use tree_low_cst.
18939 (dfs_search_base_offsets): Likewise.
18940 (layout_nonempty_base_or_field): Reflect changes in RLI format
18941 and call byte_position.
18942 (layout_empty_base): Convert offset to ssizetype.
18943 (build_base_field): use rli_size_unit_so_far.
18944 (dfs_propagate_binfo_offsets): Do computation in proper type.
18945 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
18946 (layout_class_type): Reflect changes in RLI names and fields.
18947 (finish_struct_1): Set DECL_FIELD_OFFSET.
18948 * dump.c (dequeue_and_dump): Call bit_position.
18949 * expr.c (cplus_expand_constant): Use byte_position.
18950 * rtti.c (expand_class_desc): Use bitsize_one_node.
18951 * typeck.c (build_component_addr): Use byte_position and don't
18952 special case for zero offset.
18953
18954 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
18955
18956 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
18957
18958 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
18959 tinfo object.
18960 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
18961 vtable.
18962
18963 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18964
18965 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
18966 DECL_P macros.
18967 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
18968 make_typename_type, check_initializer, cp_finish_decl,
18969 xref_tag): Likewise.
18970 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
18971 decl_namespace, arg_assoc_template_arg, arg_assoc,
18972 validate_nonmember_using_decl, do_class_using_decl): Likewise.
18973 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
18974 args_to_string): Likewise.
18975 * friend.c (is_friend): Likewise.
18976 * lex.c (note_got_semicolon, note_list_got_semicolon,
18977 is_global): Likewise.
18978 * method.c (build_overload_nested_name, build_overload_value,
18979 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
18980 * parse.y (typename_sub, typename_sub1): Likewise.
18981 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
18982 process_partial_specialization, convert_template_argument,
18983 template_args_equal, add_pending_template, lookup_template_class,
18984 for_each_template_parm_r, maybe_fold_nontype_arg,
18985 tsubst, instantiate_template, type_unification_real, unify,
18986 instantiate_pending_templates, set_mangled_name_for_template_decl):
18987 Likewise.
18988 * repo.c (repo_get_id, repo_template_used): Likewise.
18989 * search.c (lookup_field_1): Likewise.
18990 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
18991 * xref.c (classname): Likewise.
18992
18993 2000-03-22 Mark Mitchell <mark@codesourcery.com>
18994
18995 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
18996 (CANONICAL_BINFO): New macro.
18997 (BINFO_NEW_VTABLE_MARKED): Use it.
18998 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
18999 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19000 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19001 not TREE_TYPE.
19002 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19003 (build_secondary_vtable): Likewise.
19004 (dfs_finish_vtbls): Likewise.
19005 (dfs_accumulate_vtbl_inits): Likewise.
19006 (accumulate_vtbl_inits): New function.
19007 (finish_vtbls): Make sure that virtual bases come after
19008 non-virtual bases in the vtable group.
19009 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19010 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19011 * search.c (struct vbase_info): Move definition.
19012 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19013 (unmarked_new_vtable_p): Likewise.
19014 (dfs_mark_vtable_path): Remove.
19015 (dfs_mark_new_vtable): Remove.
19016 (dfs_unmark_new_vtable): Likewise.
19017 (dfs_clear_search_slot): Likewise.
19018 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19019 (dfs_clear_vbase_slots): Likewise.
19020 (init_vbase_pointers): LIkewise.
19021
19022 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
19023
19024 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19025 SIZETYPE to a non-SIZETYPE.
19026
19027 2000-03-21 Mark Mitchell <mark@codesourcery.com>
19028
19029 * class.c (layout_virtual_bases): Adjust names in conditionally
19030 compiled code.
19031
19032 * class.c (record_base_offsets): New function.
19033 (layout_conflict_p): Likewise.
19034 (layout_nonempty_base_or_field): Use it.
19035 (layout_empty_base): New function.
19036 (build_base_field): Use it.
19037 (build_base_fields): Update comment.
19038 (layout_virtual_bases): Fold in a little code form
19039 layout_basetypes. Use layout_empty_base.
19040 (layout_basetypes): Remove.
19041 (end_of_class): New function.
19042 (layout_class_type): Use it. Adjust.
19043
19044 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19045 (fntype_p): Remove.
19046 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19047 comment.
19048 (dfs_skip_nonprimary_vbases_markedp): Likewise.
19049 * typeck.c (fntype_p): Remove.
19050
19051 * cp-tree.h (TI_SPEC_INFO): Remove.
19052 (CLASSTYPE_TI_SPEC_INFO): Likewise.
19053 * pt.c (process_partial_specialization): Likewise.
19054
19055 * class.c (build_base_field): Fix thinko in computation of binfo
19056 offsets.
19057
19058 * tree.c (mark_local_for_remap_p): Mark variables declared in
19059 TARGET_EXPRs as well.
19060
19061 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
19062
19063 * typeck.c (require_complete_type, complete_type,
19064 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
19065 build_array_ref, convert_arguments, pointer_diff,
19066 build_x_unary_op, build_unary_op, build_c_cast,
19067 build_modify_expr): Use COMPLETE_TYPE_P etc.
19068 * call.c (is_complete, convert_like_real,
19069 build_new_method_call): Likewise.
19070 * class.c (build_vbase_pointer_fields, check_bases,
19071 build_base_field, finish_struct_1, pushclass): Likewise.
19072 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
19073 * decl.c (maybe_process_template_type_declaration, pushtag,
19074 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
19075 layout_var_decl, check_initializer, cp_finish_decl,
19076 grokdeclarator, require_complete_types_for_parms,
19077 grok_op_properties, xref_tag, xref_basetypes,
19078 check_function_type): Likewise.
19079 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
19080 * friend.c (do_friend): Likewise.
19081 * init.c (build_offset_ref): Likewise.
19082 * parse.y (structsp): Likewise.
19083 * pt.c (maybe_process_partial_specialization,
19084 tsubst_friend_function, instantiate_class_template, tsubst,
19085 do_type_instantiation, instantiate_pending_templates): Likewise.
19086 * repo.c (repo_get_id): Likewise.
19087 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
19088 synthesize_tinfo_var, emit_support_tinfos): Likewise.
19089 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
19090 * semantics.c (begin_class_definition): Likewise.
19091 * tree.c (build_cplus_method_type): Likewise.
19092 * typeck2.c (digest_init, build_functional_cast,
19093 add_exception_specifier): Likewise.
19094 * parse.h, parse.c: Regenerated.
19095
19096 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
19097
19098 * inc/cxxabi.h: New header file. Define new-abi entry points.
19099 (__pointer_type_info::target): Rename member to ...
19100 (__pointer_type_info::type): ... here.
19101 (__base_class_info::type): Rename member to ...
19102 (__base_class_info::base): ... here.
19103 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
19104 * cp-tree.h (CPTI_ABI): New global tree enumeration.
19105 (abi_node): New global tree node.
19106 * decl.c (abi_node): Document.
19107 (init_decl_processing): Initialize abi_node.
19108 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
19109 (get_vmi_pseudo_type_info): Likewise.
19110 (create_tinfo_types): Likewise.
19111 (emit_support_tinfos): Likewise.
19112 * tinfo.h (cxxabi.h): Include for new-abi.
19113 Move rtti class definitions to new header file.
19114 * tinfo.cc (abi): Use the namespace.
19115 (std): Move new abi rtti classes from here ...
19116 (__cxxabiv1): ... to here.
19117 * tinfo2.cc (cxxabi.h): Include for new-abi.
19118 Move rtti class definitions to new header file.
19119 (std): Move new abi rtti classes from here ...
19120 (__cxxabiv1): ... to here.
19121 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
19122 namespace.
19123
19124 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
19125 Jason Merrill <jason@casey.cygnus.com>
19126
19127 * method.c (build_overload_int): Use host_integerp.
19128
19129 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19130
19131 * init.c (build_offset_ref): Handle the case of a templated member
19132 function.
19133
19134 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19135
19136 * except.c (expand_exception_blocks): Clear catch_clauses_last.
19137
19138 2000-03-18 Mark Mitchell <mark@codesourcery.com>
19139
19140 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19141 * class.c (check_bitfield_decl): Turn illegal bitfields into
19142 non-bitfields.
19143 (dfs_propagate_binfo_offsets): Adjust for new size_binop
19144 semantics.
19145 (dfs_offset_for_unshared_vbases): Likewise.
19146 * cvt.c (cp_convert_to_pointer): Convert NULL to a
19147 pointer-to-member correctly under the new ABI.
19148 * expr.c (cplus_expand_constant): Don't use cp_convert when
19149 turning an offset into a pointer-to-member.
19150 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19151 when dereferencing them under the new ABI.
19152 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19153 of pointers-to-members under the new ABI.
19154
19155 * class.c (check_bitfield_decl): Remove restriction on really long
19156 bitfields.
19157 (layout_class_type): Implement new ABI handling of bitfields
19158 longer than their types.
19159
19160 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19161
19162 * parse.y (extdefs): Call ggc_collect.
19163 * parse.c: Regenerated.
19164
19165 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
19166
19167 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19168 (note_name_declared_in_class): Use OVL_CURRENT to get at a
19169 potential overload.
19170
19171 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19172
19173 * class.c (build_vbase_path): Use integer_zerop.
19174 (build_vtable_entry): Use tree_low_cst.
19175 (get_vfield_offset): Use bit_position.
19176 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19177 Use tree_low_cst.
19178 (check_bitfield_decl): Set DECL_SIZE using convert.
19179 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19180 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19181 Use tree_low_cst.
19182 (finish_struct_1): Use bit_position.
19183 (dump_class_hierarchy): Use tree_low_cst.
19184 * cp-tree.h (min_precision): Add declaration.
19185 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19186 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19187 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19188 * expr.c (cplus_expand_constant): Use bit_position.
19189 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19190 * rtti.c (get_base_offset): Use bit_position.
19191 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19192 host_integerp, and tree_low_cst.
19193 (pointer_int_sum): Use integer_zerop.
19194 (build_component_addr): Use bit_position.
19195
19196 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
19197
19198 * typeck.c (require_complete_type): Don't assume size_zero_node.
19199 (complete_type_or_else): Likewise.
19200
19201 2000-03-16 Steven Grady <grady@digitaldeck.com>
19202 Jason Merrill <jason@casey.cygnus.com>
19203
19204 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19205
19206 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
19207
19208 * decl2.c (grokfield): Bail out if type is error_mark_node.
19209
19210 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19211
19212 * tinfo2.cc (__ptr_to_member_data): Rename to ...
19213 (__pointer_to_member_data): ... here. Adjust.
19214 * rtti.c (create_tinfo_types): Adjust.
19215
19216 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19217
19218 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19219 * decl.c (ref_desc_type_node): Undocument.
19220 * rtti.c (ptr_ref_initializer): Rename to ...
19221 (ptr_initializer): ... here. Adjust comments.
19222 (ptmd_initializer): Fix comment thinko.
19223 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19224 (create_tinfo_types): Remove ref_desc_type_node init.
19225 * tinfo2.cc (__reference_type_info): Remove.
19226
19227 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19228
19229 * decl.c (cp_finish_decl): Remove obsolete comment.
19230
19231 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19232
19233 2000-03-14 Mark Mitchell <mark@codesourcery.com>
19234
19235 * cp-tree.h: Tweak documentation.
19236 * class.c (build_vbase_pointer_fields): Layout the fields, too.
19237 (avoid_overlap): Remove.
19238 (get_binfo_offset_as_int): New function.
19239 (dfs_serach_base_offsets): Likewise.
19240 (layout_nonempty_base_or_field): Likewise.
19241 (build_base_field): Layout fields here. Avoid placing two objects
19242 of the same type at the same address, under the new ABI.
19243 (build_base_fields): Adjust accordingly.
19244 (create_vtable_ptr): Return the new field, but don't attach it to
19245 TYPE_FIELDS.
19246 (remove_base_field): Remove.
19247 (remove_base_fields): Remove.
19248 (layout_basetypes): Adjust accordingly.
19249 (layout_class_type): Call layout_field for each field, rather than
19250 just making a wholesale call to layout_type.
19251
19252 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
19253
19254 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19255
19256 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
19257
19258 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19259
19260 * except.c (dtor_nothrow): New fn.
19261 (do_pop_exception): Use it. Take type parm.
19262 (push_eh_cleanup): Take type parm.
19263 (expand_start_catch_block): Pass it.
19264 (build_eh_type_type_ref): Accept null type.
19265
19266 2000-03-12 Mark Mitchell <mark@codesourcery.com>
19267
19268 * cp-tree.h (revert_static_member_fn): Change prototype.
19269 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19270 (grok_op_properties): Likewise.
19271 (start_function): Likewise.
19272 (revert_static_member_fn): Simplify.
19273 * pt.c (check_explicit_specialization): Adjust call to
19274 revert_static_member_fn.
19275
19276 2000-03-11 Mark Mitchell <mark@codesourcery.com>
19277
19278 * cp-tree.h (scope_kind): New type.
19279 (tmpl_spec_kind): Likewise.
19280 (declare_pseudo_global_level): Remove.
19281 (pseudo_global_level_p): Rename to template_parm_scope_p.
19282 (pushlevel): Remove declaration.
19283 (begin_scope): New function.
19284 (finish_scope): Likewise.
19285 (current_tmpl_spec_kind): Likewise.
19286 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19287 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
19288 Add template_spec_p.
19289 (toplevel_bindings_p): Adjust.
19290 (declare_pseudo_global_level): Remove.
19291 (pseudo_global_level_p): Rename to template_parm_scope_p.
19292 (current_tmpl_spec_kind): New function.
19293 (begin_scope): Likewise.
19294 (finish_scope): Likewise.
19295 (maybe_push_to_top_level): Adjust.
19296 (maybe_process_template_type_declaration): Likewise.
19297 (pushtag): Likewise.
19298 (pushdecl_nonclass_level): Likewise.
19299 (lookup_tag): Likewise.
19300 (grokfndecl): Handle member template specializations. Share
19301 constructor and non-constructor code.
19302 * decl2.c (check_classfn): Handle member template specializations.
19303 * pt.c (begin_template_parm_list): Use begin_scope.
19304 (begin_specialization): Likewise.
19305 (end_specialization): Likewise.
19306 (check_explicit_specialization): Use current_tmpl_spec_kind.
19307 Handle member template specializations.
19308 (end_template_decl): Use finish_scope. Remove call to
19309 get_pending_sizes.
19310 (push_template_decl_real): Remove bogus error message.
19311 (tsubst_decl): Fix typo in code contained in comment.
19312 (instantiate_template): Handle member template specializations.
19313 (most_general_template): Likewise.
19314
19315 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
19316
19317 * lex.c (whitespace_cr): Compress consecutive calls to warning().
19318 (do_identifier): Ditto for error().
19319
19320 * pt.c (convert_nontype_argument): Ditto for cp_error().
19321 (convert_template_argument): Ditto for cp_pedwarn().
19322
19323 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
19324
19325 * exception.cc (__check_null_eh_spec): New fn.
19326 * except.c (expand_end_eh_spec): Call it if the spec is throw().
19327
19328 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
19329
19330 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19331 * except.c (expand_end_eh_spec): Add the return type.
19332 * rtti.c (throw_bad_cast): Add the parmtypes.
19333 (throw_bad_typeid): Likewise.
19334
19335 * semantics.c (expand_stmt): Only leave out rtl for unused
19336 artificials, and set DECL_IGNORED_P on them as well.
19337 * decl.c (wrapup_globals_for_namespace): Likewise.
19338
19339 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
19340
19341 * decl.c (maybe_commonize_var): Skip all artificial decls.
19342 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19343
19344 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
19345
19346 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19347 * cp-tree.h: Declare flag_enforce_eh_specs.
19348 * decl.c (store_parm_decls, finish_function): Check it.
19349
19350 C library functions don't throw.
19351 * Makefile.in (cfns.h): New target.
19352 (except.o): Depend on it.
19353 * Make-lang.in (cc1plus): Depend on cfns.gperf.
19354 * cfns.gperf: New file.
19355 * cfns.h: Generated.
19356 * except.c: Include it.
19357 (nothrow_libfn_p): New fn.
19358 * decl.c (grokfndecl): Use it.
19359 * cp-tree.h: Declare it.
19360
19361 * decl.c (push_overloaded_decl_1, auto_function,
19362 define_function): Lose.
19363 (build_library_fn_1): New static fn.
19364 (builtin_function): Use it.
19365 (get_atexit_node): Use build_library_fn_ptr.
19366 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19367 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
19368 push_void_library_fn, push_throw_library_fn): New fns.
19369 * cp-tree.h: Declare them.
19370 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
19371 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
19372 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
19373 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
19374 * rtti.c (build_runtime_decl): Lose.
19375 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
19376 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
19377 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
19378
19379 * call.c (build_call): Remove result_type parm.
19380 Call mark_used on unused artificial fns.
19381 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
19382
19383 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
19384
19385 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
19386 appropriate.
19387 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
19388 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
19389 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
19390 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
19391 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
19392 expand_generic_desc): Likewise.
19393
19394 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19395
19396 * exception.cc (__cp_pop_exception): Cleanup the original object.
19397
19398 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19399
19400 * decl.c (grok_op_properties): Merge conversion to void warning
19401 with other silly op warnings.
19402
19403 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
19404
19405 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
19406 array CONSTRUCTOR elements. Don't use expr_tree_cons.
19407
19408 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19409
19410 * decl.c (cp_make_fname_decl): New function.
19411 (wrapup_globals_for_namespace): Don't emit unused static vars.
19412 (init_decl_processing): Remove comment about use of
19413 array_domain_type. Set make_fname_decl.
19414 (cp_finish_decl): Remove __FUNCTION__ nadgering.
19415 * semantics.c (begin_compound_stmt): Remove
19416 current_function_name_declared flagging.
19417 (expand_stmt): Don't emit unused local statics.
19418 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
19419 specially.
19420
19421 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19422
19423 * typeck.c (convert_for_assignment): Don't look at array
19424 initializer.
19425 * call.c (convert_like_real): Likewise.
19426
19427 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
19428
19429 Add initial support for '\uNNNN' specifier.
19430 * lex.c (read_ucs): New fn.
19431 (readescape, skip_white_space): Call it.
19432 (is_extended_char, is_extended_char_1): New fns.
19433 (utf8_extend_token): New fn, #if 0'd out.
19434 (real_yylex): Treat extended chars like letters.
19435
19436 * search.c (note_debug_info_needed): Walk the bases even if we
19437 weren't deferring the type itself.
19438
19439 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19440
19441 * decl2.c (finish_objects): Constify a char*.
19442
19443 * method.c (emit_thunk): Likewise.
19444
19445 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
19446
19447 * typeck.c (dubious_conversion_warnings): Look through
19448 REFERENCE_TYPE.
19449
19450 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19451
19452 * class.c (dfs_modify_vtables): I is now unsigned.
19453 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
19454 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
19455 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
19456 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
19457 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
19458 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
19459 Call integer_all_onesp.
19460 * typeck2.c (process_init_constructor): Use compare_tree_int.
19461
19462 * lang-specs.h (as): Don't call if -syntax-only.
19463
19464 2000-03-06 Mark Mitchell <mark@codesourcery.com>
19465
19466 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
19467 RTL_EXPR_HAS_NO_SCOPE after all.
19468
19469 2000-03-05 Mark Mitchell <mark@codesourcery.com>
19470
19471 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
19472 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
19473 RTL_EXPR_HAS_NO_SCOPE.
19474
19475 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
19476 later.
19477
19478 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
19479
19480 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
19481
19482 * call.c (convert_like): Macrofy.
19483 (convert_like_with_context): New macro.
19484 (convert_like_real): Renamed from convert_like. Add calling
19485 context parameters, for diagnostics. Add recursive flag. Call
19486 dubious_conversion_warnings for outer conversion.
19487 (build_user_type_conversion): Use convert_like_with_context.
19488 (build_over_call): Likewise. Don't warn about dubious
19489 conversions here. Adjust convert_default_arg calls.
19490 (convert_default_arg): Add context parameters for diagnostics.
19491 Pass through to convert_like_with_context.
19492 * cp-tree.h (convert_default_arg): Add context parameters.
19493 (dubious_conversion_warnings): Prototype new function.
19494 * typeck.c (convert_arguments): Adjust convert_default_arg call.
19495 (dubious_conversion_warnings): New function, broken
19496 out of convert_for_assignment.
19497 (convert_for_assignment): Adjust.
19498
19499 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
19500
19501 * decl2.c (key_method): Break out from...
19502 (import_export_vtable, import_export_class): ...here.
19503
19504 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
19505 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
19506
19507 * search.c (note_debug_info_needed, dfs_debug_mark,
19508 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
19509 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
19510
19511 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
19512
19513 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
19514 typos.
19515
19516 2000-03-02 Mark Mitchell <mark@codesourcery.com>
19517
19518 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
19519 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
19520 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
19521 (lang_type): Split gets_new into has_new and has_array_new.
19522 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19523 (TYPE_GETS_NEW): Split into ...
19524 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
19525 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
19526 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
19527 (build_op_new_call): Don't declare.
19528 (build_new_1): Likewise.
19529 * call.c (build_op_new_call): Remove.
19530 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19531 instead of TYPE_NEEDS_DESTRUCTOR.
19532 (finish_struct_bits): Likewise.
19533 (add_implicitly_declared_members): Likewise.
19534 (check_field_decl): Likewise.
19535 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
19536 correctly under the new ABI.
19537 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19538 instead of TYPE_NEEDS_DESTRUCTOR.
19539 (initialize_local_var): Likewise.
19540 (destroy_local_var): Likewise.
19541 (cp_finish_decl): Likewise.
19542 (register_dtor_fn): Likewise.
19543 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
19544 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
19545 TYPE_VEC_DELETE_TAKES_SIZE here.
19546 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
19547 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
19548 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19549 (finish_destructor_body): Likewise.
19550 (maybe_build_cleanup_1): Likewise.
19551 * decl2.c (do_static_destruction): Likewise.
19552 * init.c (build_new_1): Make it static.
19553 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19554 (expand_cleanup_for_base): Likewise.
19555 (get_cookie_size): New function.
19556 (build_new_1): Handle array-new cookies correctly under the new
19557 ABI.
19558 (build_vec_delete_1): Likewise.
19559 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19560 (build_delete): Likewise.
19561 (build_vec_delete): Handle array-new cookies correctly under the new
19562 ABI.
19563 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19564 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
19565 TYPE_HAS_ARRAY_NEW_OPERATOR.
19566 * ptree.c (print_lang_type): Check them.
19567 * search.c (context_for_name_lookup): Fix typo in comment.
19568 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19569 * tree.c (break_out_cleanups): Likewise.
19570 (build_cplus_array_test_1): Likewise.
19571 (cp_build_qualified_type_real): Likewise.
19572 * typeck.c (complete_type): Likewise.
19573
19574 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
19575 the command-line, not the end.
19576
19577 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
19578
19579 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
19580
19581 2000-03-02 Tom Tromey <tromey@cygnus.com>
19582
19583 * cp-tree.h (build_java_class_ref): Declare.
19584 * init.c (build_java_class_ref): No longer static.
19585 * except.c (expand_throw): Generate a Java-style `throw' if the
19586 thrown object is a "Java" object.
19587 (initialize_handler_parm): Generate a Java-style lookup of
19588 exception info if the caught object is a "Java" object.
19589 (catch_language, catch_language_init): New globals.
19590 (decl_is_java_type): New function.
19591 (expand_start_catch_block): Don't call push_eh_info() or
19592 push_eh_cleanup() when handling a Java-style "catch". Pass Java
19593 class reference to build_catch_block.
19594
19595 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19596
19597 * typeck.c (comptypes): Treat sizetype like its language equivalent.
19598
19599 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
19600
19601 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
19602 to merge reference/pointer code and fix incorrect warnings.
19603
19604 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
19605
19606 * search.c (protected_accessible_p): Use context_for_name_lookup.
19607
19608 * init.c (construct_virtual_bases): Fix thinko.
19609 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
19610
19611 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
19612
19613 * decl.c (current_function_decl): Move to toplev.c.
19614
19615 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
19616
19617 * pt.c (fn_type_unification): Unify return type, whenever
19618 provided.
19619 (get_bindings_real): Only pass return type when necessary.
19620 Remove explicit return type check.
19621 * class.c (resolve_address_of_overloaded_function): Pass desired
19622 return type to fn_type_unification.
19623
19624 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19625
19626 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
19627 DECL_FIELD_SIZE.
19628 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
19629 DECL_FIELD_SIZE.
19630 * rtti.c (expand_class_desc): Likewise.
19631 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
19632 (THUNK_VCALL_OFFSET): Likewise.
19633 (THUNK_DELTA): Reflect changes in ../tree.h.
19634
19635 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
19636
19637 * search.c (protected_accessible_p): Also allow the access if
19638 the member is public in DERIVED. Lose TYPE parm.
19639 (friend_accessible_p): Lose TYPE parm.
19640 (accessible_p): Adjust.
19641
19642 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19643
19644 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
19645 on things that are not sizes; ssize_binop deleted.
19646 Call size_diffop when appropriate.
19647 (dfs_build_vcall_offset_vtbl_entries): Likewise.
19648 (build_primary_vtable, build_secondary_vtable): Likewise.
19649 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
19650 Variable I is HOST_WIDE_INT.
19651 (get_vfield_offset): Pass proper types to size_binop.
19652 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
19653 (finish_struct_1): Likewise.
19654 (skip_rtti_stuff): Arg N is now pointer to signed.
19655 (layout_class_type): Use size_zero_node.
19656 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
19657 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
19658 * decl.c (complete_arry_type): Pass proper types to size_binop.
19659 (xref_basetypes): BINFO_OFFSET is sizetype.
19660 * error.c (dump_expr): Don't use size_binop non-sizes.
19661 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
19662 * init.c (construct_virtual_bases): Fix type error.
19663 (build_vec_delete_1): Pass proper type to size_binop and don't
19664 fold result.
19665 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
19666 * rtti.c (get_base_offset): Pass proper type to size_binop.
19667 * search.c (dfs_find_vbases): Fix type error.
19668 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
19669 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
19670 * tree.c (debug_binfo): Variable N is signed.
19671 Use HOST_WIDE_INT_PRINT_DEC.
19672 * typeck.c (comptypes): sizetype is same as equivalent integer type.
19673 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
19674 size_one_node and size_zero_node.
19675 (c_alignof): Use size_one_node.
19676 (build_component_addr): Pass proper types to size_binop.
19677 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
19678
19679 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
19680
19681 Implement class scope using-declarations for functions.
19682 * class.c (handle_using_decl): Call add_method for used functions.
19683 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
19684 (add_method): Used functions are hidden by local functions.
19685 (check_bases_and_members): Handle using-decls before finalizing
19686 CLASSTYPE_METHOD_VEC.
19687 * call.c (add_function_candidate): Add ctype parm; if nonzero,
19688 override the type of 'this' accordingly.
19689 (add_template_candidate, add_template_candidate_real): Add ctype parm.
19690 (convert_class_to_reference, build_user_type_conversion_1,
19691 build_new_function_call, build_object_call, build_new_op,
19692 build_new_method_call): Pass ctype parm.
19693
19694 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
19695 the baselink.
19696 * call.c (convert_class_to_reference, build_user_type_conversion_1,
19697 build_new_function_call, build_object_call, build_new_op,
19698 build_new_method_call, build_op_delete_call): Don't get basetype_path
19699 from a baselink.
19700 * typeck.c (build_component_ref): Likewise.
19701 * init.c (build_offset_ref): Likewise.
19702 (resolve_offset_ref): Don't call enforce_access.
19703 Call build_scoped_ref.
19704 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
19705 would cause an error or if -pedantic.
19706 * class.c (alter_access): Lose binfo parm.
19707
19708 2000-02-26 Mark Mitchell <mark@codesourcery.com>
19709
19710 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
19711 types.
19712
19713 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
19714
19715 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
19716 pseudo_type_info creation into the std namespace
19717
19718 2000-02-26 Mark Mitchell <mark@codesourcery.com>
19719
19720 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
19721 (import_export_class): Remove declaration.
19722 * decl2.c (import_export_class): Make it static.
19723 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
19724 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
19725 EXPR_WITH_FILE_LOCATION.
19726 * lex.c (check_newline): Tweak filename/lineno setting.
19727 * semantics.c (begin_while_stmt): Fix typo in comment.
19728
19729 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19730
19731 * lang-options.h (-fmessage-length=): Add missing option.
19732
19733 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
19734
19735 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
19736
19737 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
19738
19739 2000-02-25 Jim Wilson <wilson@cygnus.com>
19740
19741 * optimize.c (expand_call_inline): Emit the return label before
19742 evaluating the return value.
19743
19744 2000-02-24 Mark Mitchell <mark@codesourcery.com>
19745
19746 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
19747 than duplicating functionality here.
19748 * optimize.c: Include input.h.
19749 (expand_call_inline): Use push_srcloc and pop_srcloc.
19750 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
19751 * parse.c: Regenerated.
19752 * Makefile.in (lex.o): Depend on input.h.
19753 (optimize.o): Likewise.
19754
19755 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
19756
19757 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
19758 function type, rather than ICE.
19759
19760 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
19761
19762 * decl.c (grokdeclarator): Call decl_type_access_control.
19763 * parse.y (parse_end_decl): Don't call decl_type_access_control if
19764 decl is null.
19765
19766 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
19767
19768 * decl.c (decls_match): Remove obsolete static member nadgering.
19769
19770 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19771
19772 * decl.c (grokdeclarator): Change ANSI to ISO.
19773 * lex.c (consume_string, readescape, do_identifier): Likewise.
19774 (parse_float, real_yylex): Likewise.
19775 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
19776 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
19777 new_type_id, maybe_label_decls, simple_stmt,
19778 for.init.statement): Likewise.
19779 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
19780 * semantics.c (finish_named_return_value): Likewise.
19781 * parse.c: Regenerate.
19782
19783 2000-02-21 Mark Mitchell <mark@codesourcery.com>
19784
19785 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
19786 (CPTI_CLASS_STAR_TYPE): Remove.
19787 (vtable_index_type): Likewise.
19788 (class_star_type_node): Remove.
19789 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
19790 (build_binary_op_nodefault): Remove.
19791 * call.c (build_new_op): Use build_binary_op instead of
19792 build_binary_op_nodefault.
19793 * decl.c (init_decl_processing): Remove class_star_type_node
19794 initialization. Make delta_type_node ptrdiff_type_node under the
19795 new ABI. Initialize vtable_index_type.
19796 (build_ptrmemfunc_type): Build different structures for the new
19797 ABI.
19798 (build_enumerator): Use build_binary_op instead of
19799 build_binary_op_nodefault.
19800 * method.c (build_overload_value): Mangle pointers-to-members
19801 appropriately under the new ABI.
19802 * typeck.c (build_array_ref): Use build_binary_op instead of
19803 build_binary_op_nodefault.
19804 (get_member_function_from_ptrfunc): Adjust for the new ABI.
19805 (build_binary_op_nodefault): Rename to ...
19806 (build_binary_op): ... this. Remove old version. Adjust for
19807 pointer-to-member comparisons under the new ABI.
19808 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
19809 (build_ptrmemfunc): Adjust for the new ABI.
19810 (expand_ptrmemfunc_cst): Likewise.
19811 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
19812 (pfn_from_ptrmemfunc): Adjust for the new ABI.
19813
19814 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
19815
19816 * call.c (build_object_call): Compress consecutive calls to
19817 cp_error.
19818 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
19819 (build_op_delete_call): Adjust message formatting.
19820
19821 * class.c (check_bases): Compress consecutive calls to
19822 cp_pedwarn.
19823 (finish_struct_anon): Say 'ISO C++'.
19824
19825 * decl.c (start_decl): Same here.
19826 (grok_reference_init): Likewise.
19827 (grokfndecl): Correct message formatting.
19828 (grokfndecl): Improve diagnostic.
19829 (check_static_variable_definition): Likewise. Say 'ISO C++'
19830 (compute_array_index_type): Say 'ISO C++'
19831 (create_array_type_for_decl): Compress consecutive calls to
19832 cp_error.
19833 (grokdeclarator): Say 'ISO C++'
19834 (grok_op_properties): Likewise.
19835
19836 * decl2.c (delete_sanity): Clairify diagnostic.
19837 (check_member_template): Same here.
19838 (grok_function_init): Use consistent terminology.
19839
19840 * expr.c (do_case): Say 'ISO C++'
19841
19842 * friend.c (do_friend): Compress consecutive calls to warning.
19843
19844 2000-02-20 Mark Mitchell <mark@codesourcery.com>
19845
19846 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
19847 * class.c (build_secondary_vtable): Reorganize. Don't create a
19848 new vtable under the new ABI.
19849 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
19850 computing the size.
19851 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
19852 the initializing elements.
19853 (initialize_vtable): New function.
19854 (dfs_finish_vtbls): Use it.
19855 (dfs_accumulate_vtbl_inits): New function.
19856 (finish_vtbls): Merge primary and secondary vtables under the new
19857 ABI.
19858 (finish_struct_1): Remove redundant call to layout_vtable_decl.
19859 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
19860 aren't VAR_DECLs.
19861
19862 * class.c (build_vtable): New function, split out from ...
19863 (get_vtable_decl): ... here, and ...
19864 (build_secondary_vtable): ... here.
19865
19866 * pt.c (tsubst_decl): Fix formatting.
19867
19868 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19869
19870 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
19871 (avoid_overlap, build_base_field): Likewise.
19872 (build_base_field, build_base_fields, is_empty_class):
19873 Test DECL_SIZE with integer_zero.
19874 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
19875 * cp-tree.h (struct lang_type): New field size_unit.
19876 (CLASSTYPE_SIZE_UNIT): New macro.
19877 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
19878 (cp_finish_decl): Delete -Wlarger-than processing.
19879 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
19880 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
19881 * tree.c (make_binfo): binfo vector is one entry longer.
19882 (walk_tree): Walk DECL_SIZE_UNIT.
19883
19884 2000-02-19 Mark Mitchell <mark@codesourcery.com>
19885
19886 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
19887 comment.
19888 (build_vtable_entry): Don't assume all vtable entries are
19889 functions.
19890 (build_vtbl_initializer): Adjust accordingly.
19891 (get_vtable_decl): Fix formatting.
19892
19893 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
19894
19895 * semantics.c (deferred_type_access_control): Walk the entire
19896 type_lookups list.
19897 (save_type_access_control): Rename from
19898 initial_deferred_type_access_control. Just remember the value.
19899 (decl_type_access_control): New fn.
19900 (begin_function_definition): Use deferred_type_access_control, after
19901 we've started the function. Set type_lookups to error_mark_node.
19902 * parse.y (frob_specs, fn.def1): Adjust.
19903 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
19904 (parse_end_decl, parse_bitfield0, parse_method): New fns.
19905 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
19906 (after_type_component_declarator0): Likewise.
19907 (after_type_component_declarator): Likewise.
19908 (notype_component_declarator): Likewise.
19909 * cp-tree.h: Adjust.
19910
19911 * decl.c (redeclaration_error_message): Allow redeclaration of
19912 namespace-scope decls.
19913
19914 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
19915
19916 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
19917
19918 2000-02-17 Mark Mitchell <mark@codesourcery.com>
19919
19920 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
19921 * decl2.c (grokclassfn): Likewise.
19922
19923 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
19924
19925 * decl2.c (lang_decode_option): Don't set default message length
19926 here.
19927 * lex.c (lang_init_options): Set it here.
19928
19929 2000-02-16 Mark Mitchell <mark@codesourcery.com>
19930
19931 Make DECL_CONTEXT mean the class in which a member function was
19932 declared, even for a virtual function.
19933 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
19934 (DECL_FRIEND_CONTEXT): New macro.
19935 (DECL_REAL_CONTEXT): Remove.
19936 (SET_DECL_FRIEND_CONTEXT): Likewise.
19937 (DECL_VIRTUAL_CONTEXT): Adjust.
19938 (DECL_CLASS_SCOPE_P): Use TYPE_P.
19939 (add_friends): Remove.
19940 (hack_decl_function_context): Likewise.
19941 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
19942 CP_DECL_CONTEXT.
19943 (build_over_call): Fix indentation. Use DECL_CONTEXT
19944 instead of DECL_CLASS_CONTEXT.
19945 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
19946 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19947 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19948 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
19949 (build_base_field): Likewise.
19950 (finish_struct_1): Likewise.
19951 (build_self_reference): Likewise.
19952 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
19953 DECL_REAL_CONTEXT.
19954 (pushtag): Use decl_function_context, not
19955 hack_decl_function_context.
19956 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19957 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
19958 (pushdecl): Remove bogus code.
19959 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
19960 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19961 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19962 Use decl_function_context, nothack_decl_function_context.
19963 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
19964 (grokdeclarator): Likewise. Use decl_function_context, not
19965 hack_decl_function_context.
19966 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
19967 (start_function): Use DECL_FRIEND_CONTEXT, not
19968 DECL_CLASS_CONTEXT. Use decl_function_context, not
19969 hack_decl_function_context.
19970 (finish_function): Use decl_function_context, not
19971 hack_decl_function_context.
19972 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
19973 DECL_CLASS_CONTEXT.
19974 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
19975 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
19976 (grokfield): Likewise.
19977 (finish_builtin_type): Likewise.
19978 (finish_vtable_vardec): Use decl_function_context, not
19979 hack_decl_function_context.
19980 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19981 (start_static_initialization_or_destruction): Likewise.
19982 (finish_static_initialization_or_destruction): Likewise.
19983 (mark_used): Adjust logic for deciding when to synthesize methods.
19984 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
19985 DECL_REAL_CONTEXT.
19986 * error.c (dump_function_decl): Use DECL_CONTEXT, not
19987 DECL_CLASS_CONTEXT.
19988 * friend.c (is_friend): Likewise.
19989 (add_friends): Remove.
19990 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
19991 * lex.c (begin_definition_of_inclass_inline): Use
19992 decl_function_context, not hack_decl_function_context.
19993 (process_next_inline): Likewise.
19994 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19995 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
19996 DECL_CLASSS_CONTEXT.
19997 (hack_identifier): Likewise.
19998 (synthesize_method): Use decl_function_context, not
19999 hack_decl_function_context.
20000 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20001 DECL_REAL_CONTEXT.
20002 (is_member_template): Use decl_function_context, not
20003 hack_decl_function_context. Use DECL_CONTEXT, not
20004 DECL_CLASS_CONTEXT.
20005 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20006 DECL_CLASS_CONTEXT.
20007 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20008 DECL_REAL_CONTEXT.
20009 (push_template_decl_real): Likewise.
20010 (instantiate_class_template): Don't call add_friends.
20011 (tsubst_default_argument): Use DECL_CONTEXT, not
20012 DECL_REAL_CONTEXT.
20013 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20014 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20015 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20016 DECL_CLASS_CONTEXT.
20017 * repo.c (repo_inline_used): Likewise.
20018 * search.c (current_scope): Adjust for new _CONTEXT macros.
20019 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20020 DECL_REAL_CONTEXT.
20021 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20022 (lookup_fnfields_here):Likewise.
20023 (check_final_overrider): Likewise.
20024 (init_vbase_pointers): Likewise.
20025 (virtual_context): Likewise.
20026 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20027 (expand_body): Use decl_function_context, not
20028 hack_decl_function_context.
20029 * tree.c (hack_decl_function_context): Remove.
20030 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20031 DECL_CLASS_CONTEXT.
20032 * typeck2.c (error_not_base_type): Likewise.
20033
20034 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
20035
20036 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20037
20038 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20039
20040 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20041
20042 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
20043
20044 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20045
20046 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
20047
20048 * decl2.c (lang_decode_option): Enable automatic line wrapping.
20049
20050 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
20051
20052 * parse.y (frob_specs): Split out...
20053 (parse_decl): From here.
20054 (fn.def2): Call initial_deferred_type_access_control.
20055 (after_type_component_declarator0): Call frob_specs.
20056 (notype_component_declarator0): Likewise.
20057 * search.c (friend_accessible_p): Nested classes are friends of their
20058 enclosing classes.
20059
20060 2000-02-10 Mark Mitchell <mark@codesourcery.com>
20061
20062 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
20063 used to create an implicit temporary.
20064
20065 * class.c (dfs_modify_vtables): Tweak calculation of functions to
20066 override.
20067
20068 2000-02-08 Nathan Sidwell <nathan@acm.org>
20069
20070 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
20071 strip array element qualifiers too.
20072
20073 2000-02-07 Mark Mitchell <mark@codesourcery.com>
20074
20075 * decl.c (store_parm_decls): Don't build cleanups for parameters
20076 while processing_template_decl.
20077
20078 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
20079
20080 * cp-tree.h (struct saved_scope): Add incomplete field.
20081 (namespace_scope_incomplete): New macro.
20082 * decl.c (pushdecl): Use it.
20083 (hack_incomplete_structures): Use it. See through artificial
20084 binding levels.
20085 (mark_saved_scope): Mark it.
20086
20087 Implement access control for nested types.
20088 * search.c (type_access_control): New fn.
20089 (accessible_p): Now we do perform access control for types.
20090 * semantics.c (deferred_type_access_control): New fn.
20091 (initial_deferred_type_access_control): New fn.
20092 (begin_function_definition): Call it. Add lookups parm.
20093 * decl.c (struct binding_level): Add this_class field.
20094 (pushlevel_class): Set it.
20095 (mark_binding_level): Mark it.
20096 (lookup_name_real): Use it. Call type_access_control.
20097 (mark_saved_scope): Mark lookups field.
20098 * cp-tree.h (flagged_type_tree): Add lookups field.
20099 (struct saved_scope): Add lookups field.
20100 (type_lookups): New macro.
20101 * parse.y (declmods): Now <ftype>.
20102 (parse_decl): Add lookups parm. Call
20103 initial_deferred_type_access_control.
20104 (lang_extdef): Clear type_lookups.
20105 (typed_declspecs, declmods, typespec): Set lookups field.
20106 (initdcl): Call deferred_type_access_control.
20107 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
20108 component_decl_1, named_parm): Adjust.
20109 * friend.c (is_friend): Nested classes are friends of their
20110 enclosing classes.
20111
20112 * class.c (currently_open_derived_class): New fn.
20113 * method.c (hack_identifier): Use it.
20114
20115 * lex.c (do_identifier): Remove obsolete code.
20116
20117 * parse.y (typed_typespecs): Propagate new_type_flag properly.
20118
20119 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
20120
20121 * tinfo.h: Remove apostrophes from C++ comment (xgettext
20122 thinks this file is plain C).
20123
20124 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20125
20126 * Makefile.in (call.o): Depend on $(EXPR_H).
20127
20128 * call.c: Include "expr.h".
20129
20130 * class.c (dump_class_hierarchy): Add prototype.
20131
20132 * search.c (dfs_get_pure_virtuals): Likewise.
20133
20134 2000-02-1 Ulrich Drepper <drepper@redhat.com>
20135
20136 * parse.y (simple_stmt): Allow :: token in asm parameter list.
20137 * parse.c: Rebuilt.
20138
20139 2000-01-31 Jim Wilson <wilson@cygnus.com>
20140
20141 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20142 Store it in DECL_FCONTEXT.
20143 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20144
20145 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
20146
20147 * tinfo.h (old abi): #include "tconfig.h".
20148 * tinfo.cc (convert_to_base): Move into old abi section.
20149
20150 2000-01-31 Mark Mitchell <mark@codesourcery.com>
20151
20152 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20153 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20154 (BINFO_PRIMARY_BINFO): New macro.
20155 (BF_DELTA): Rename to ...
20156 (BV_DELTA): ... this.
20157 (BF_VCALL_INDEX): Rename to ...
20158 (BV_VCALL_INDEX): ... this.
20159 (BF_FN): Rename to ...
20160 (BV_FN): ... this.
20161 * class.c (build_vbase_path): Adjust for changes to reverse_path.
20162 (set_rtti_entry): Rename BF_ macros to BV_ variants.
20163 (modify_vtable_entry): Simplify.
20164 (add_virtual_function): Rename BF_ macros to BV_ variants.
20165 (build_vtable_initializer): Likewise.
20166 (get_class_offset_1): Remove.
20167 (dfs_get_class_offset): Likewise.
20168 (get_class_offset): Likewise.
20169 (dfs_find_final_overrider): New function.
20170 (find_final_overrider): Likewise.
20171 (modify_one_vtable): Remove.
20172 (dfs_find_base): New function.
20173 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
20174 find_final_overrider.
20175 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
20176 virtuals.
20177 (dfs_fixup_vtable_deltas): Remove.
20178 (override_one_vtable): Remove.
20179 (merge_overrides): Likewise.
20180 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20181 unreal chilren of virtual bases.
20182 (finish_struct_1): Don't use merge_overrides. Don't use
20183 dfs_fixup_vtable_deltas.
20184 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20185 BINFOs.
20186
20187 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20188 Jason Merrill <jason@yorick.cygnus.com>
20189
20190 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20191
20192 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
20193
20194 * exception.cc (__throw_bad_typeid): Add missing std::.
20195
20196 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20197
20198 * cp-tree.h (make_thunk): PROTO -> PARAMS.
20199
20200 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
20201
20202 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20203
20204 Runtime support for new-abi rtti.
20205 * inc/typeinfo (type_info::operator!=): Define in class.
20206 (type_info::before, type_info::name, type_info::operator==,
20207 type_info::operator!=): Define new ABI implementations.
20208 (type_info::is_pointer_p, type_info::is_function_p): Declare
20209 new virtual functions.
20210 (type_info::do_catch, type_info::do_upcast): Likewise.
20211
20212 * tinfo.h (__base_class_info): Define new class.
20213 (__class_type_info): Likewise.
20214 (__si_class_type_info): Likewise.
20215 (__vmi_class_type_info): Likewise.
20216 (__dynamic_cast): Prototype.
20217
20218 * tinfo.cc: Conditionalize old and new rtti mechanisms.
20219 (type_info::is_pointer_p): Define new function.
20220 (type_info::is_function_p): Likewise.
20221 (type_info::do_catch): Likewise.
20222 (type_info::do_upcast): Likewise.
20223 (vtable_prefix): New structure for vtable access.
20224 (adjust_pointer): Define new template function.
20225 (contained_p, public_p, virtual_p, contained_public_p,
20226 contained_nonpublic_p, contained_nonvirtual_p): Define new
20227 functions.
20228 (nonvirtual_base_type): New local variable.
20229 (__class_type_info::~__class_type_info): Define.
20230 (__si_class_type_info::~__si_class_type_info): Likewise.
20231 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20232 (__class_type_info::do_catch): Define new function.
20233 (__class_type_info::do_upcast): Likewise.
20234 (__class_type_info::find_public_src): Likewise.
20235 (__class_type_info::do_find_public_src): Likewise.
20236 (__si_class_type_info::do_find_public_src): Likewise.
20237 (__vmi_class_type_info::do_find_public_src): Likewise.
20238 (__class_type_info::do_dyncast): Likewise.
20239 (__si_class_type_info::do_dyncast): Likewise.
20240 (__vmi_class_type_info::do_dyncast): Likewise.
20241 (__class_type_info::do_upcast): Likewise.
20242 (__si_class_type_info::do_upcast): Likewise.
20243 (__vmi_class_type_info::do_upcast): Likewise.
20244 (__dynamic_cast): Likewise.
20245
20246 * tinfo2.cc (__fundamental_type_info): Define new class.
20247 (__pointer_type_info): Likewise.
20248 (__reference_type_info): Likewise.
20249 (__array_type_info): Likewise.
20250 (__function_type_info): Likewise.
20251 (__enum_type_info): Likewise.
20252 (__ptr_to_member_type_info): Likewise.
20253 (__fundamental_type_info::~__fundamental_type_info): Define.
20254 (__pointer_type_info::~__pointer_type_info): Likewise.
20255 (__reference_type_info::~__reference_type_info): Likewise.
20256 (__array_type_info::~__array_type_info): Likewise.
20257 (__function_type_info::~__function_type_info): Likewise.
20258 (__enum_type_info::~__enum_type_info): Likewise.
20259 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20260 (__pointer_type_info::do_catch): Define new function.
20261 (__ptr_to_member_type_info::do_catch): Define new function.
20262
20263 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20264 (__is_pointer): Likewise.
20265
20266 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20267
20268 2000-01-30 Mark Mitchell <mark@codesourcery.com>
20269
20270 * cp/class.c (build_vtable): Rename to build_primary_vtable.
20271 (prepare_fresh_vtable): Rename to build_secondary_vtable.
20272 (make_new_vtable): New function.
20273 (modify_vtable_entry): Handle generation of new vtables correctly.
20274 (modify_one_vtable): Remove unused parameter.
20275 (dfs_fixup_vtable_deltas): Likewise.
20276 (override_one_vtable): Use build_secondary_vtable.
20277 (finish_struct_1): Use build_primary_vtable and
20278 build_secondary_vtable.
20279
20280 2000-01-28 Ulrich Drepper <drepper@redhat.com>
20281
20282 * cp/decl.c: Adjust variable names, comments, help strings.
20283
20284 2000-01-29 Nathan Sidwell <nathan@acm.org>
20285
20286 * new2.cc (operator delete[]): Use operator delete, don't assume
20287 implementation.
20288
20289 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
20290
20291 * class.c (build_vtbl_initializer): Add argument to
20292 build_vtable_entry call.
20293
20294 2000-01-27 Mark Mitchell <mark@codesourcery.com>
20295
20296 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20297 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20298 (BF_DELTA): New macro.
20299 (BF_VCALL_INDEX): Likewise.
20300 (BF_FN): Likewise.
20301 (THUNK_VCALL_OFFSET): Likewise.
20302 (make_thunk): Change prototype.
20303 * class.c (build_vtable_entry): Integrate
20304 build_vtable_entry_for_fn. Handle vcall indices.
20305 (build_vtable_entry_for_fn): Remove.
20306 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
20307 BF_VCALL_INDEX, BF_FN.
20308 (modify_vtable_entry): Integrate common code from
20309 modify_one_vtable and dfs_fixup_vtable_deltas.
20310 (add_virtual_function): Set BF_VCALL_INDEX.
20311 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
20312 and BF_FN.
20313 (modify_one_vtable): Simplify.
20314 (dfs_fixup_vtable_deltas): Likewise.
20315 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20316 * method.c (make_thunk): Handle vcall indices.
20317
20318 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
20319
20320 Compiler side new abi rtti (not enabled).
20321 * cp-tree.h (new_abi_rtti_p): New macro.
20322 (emit_support_tinfos): Prototype new function.
20323 (tinfo_decl_p): Likewise.
20324 (emit_tinfo_decl): Likwise.
20325 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20326 macros.
20327 (doing_runtime): New local static.
20328 (init_rtti_processing): Add new-abi initializer.
20329 (get_tinfo_decl): Add new-abi logic.
20330 (tinfo_from_decl): Likewise.
20331 (build_dynamic_cast_1): Likewise.
20332 (qualifier_flags): New static function.
20333 (tinfo_base_init): Likewise.
20334 (generic_initializer): Likewise.
20335 (ptr_ref_initializer): Likewise.
20336 (ptmd_initializer): Likewise.
20337 (class_hint_flags): Likewise.
20338 (class_initializer): Likewise.
20339 (synthesize_tinfo_var): Likewise.
20340 (create_real_tinfo_var): Likewise.
20341 (create_pseudo_type_info): Likewise.
20342 (get_vmi_pseudo_type_info): Likewise.
20343 (create_tinfo_types): Likewise.
20344 (emit_support_tinfos): New global function.
20345 (tinfo_decl_p): New global predicate.
20346 (emit_tinfo_decl): New global function.
20347 * class.c (set_rtti_entry): Generalize for old and new rtti.
20348 (build_vtbl_initializer): Likewise.
20349 * decl2.c (finish_file): Likewise.
20350
20351 2000-01-27 Jim Wilson <wilson@cygnus.com>
20352
20353 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20354 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20355
20356 2000-01-27 Mike Stump <mrs@wrs.com>
20357
20358 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20359 for scopes.
20360
20361 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
20362
20363 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20364
20365 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
20366
20367 * optimize.c (calls_setjmp_r): Supply new argument
20368 to special_function_p.
20369
20370 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20371
20372 * call.c: PROTO -> PARAMS.
20373 * class.c: Likewise.
20374 * cp-tree.h: Likewise.
20375 * cvt.c: Likewise.
20376 * decl.c: Likewise.
20377 * decl.h: Likewise.
20378 * decl2.c: Likewise.
20379 * dump.c: Likewise.
20380 * errfn.c: Likewise.
20381 * error.c: Likewise.
20382 * except.c: Likewise.
20383 * expr.c: Likewise.
20384 * init.c: Likewise.
20385 * input.c: Likewise.
20386 * lex.c: Likewise.
20387 * lex.h: Likewise.
20388 * method.c: Likewise.
20389 * optimize.c: Likewise.
20390 * parse.y: Likewise.
20391 * pt.c: Likewise.
20392 * repo.c: Likewise.
20393 * rtti.c: Likewise.
20394 * search.c: Likewise.
20395 * semantics.c: Likewise.
20396 * spew.c: Likewise.
20397 * tree.c: Likewise.
20398 * typeck.c: Likewise.
20399 * typeck2.c: Likewise.
20400 * xref.c: Likewise.
20401
20402 2000-01-25 Richard Henderson <rth@cygnus.com>
20403
20404 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
20405
20406 2000-01-25 Mark Mitchell <mark@codesourcery.com>
20407
20408 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
20409 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
20410 (struct vcall_offset_data_s): New type.
20411 (dfs_vcall_offset_queue_p): New function.
20412 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20413 (build_vcall_offset_vtbl_entries): Likewise.
20414 (layout_vtable_decl): Likewise.
20415 (num_vfun_entries): Likewise.
20416 (num_extra_vtbl_entries): Add the entries for vcall offsets.
20417 (build_vtbl_initializer): Likewise.
20418 (dfs_finish_vtabls): Use layout_vtable_decl.
20419 (modify_one_vtables): Always duplicate vtables under the new ABI.
20420 (finish_struct_1): Use layout_vtable_decl.
20421
20422 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20423
20424 * decl.c (member_function_or_else): Change third arg from a format
20425 specifier to an `enum overload_flags'. Callers changed.
20426
20427 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
20428
20429 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
20430 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
20431 build_const_cast, get_delta_difference, check_return_expr): Avoid
20432 ANSI string concatenation usage.
20433
20434 2000-01-24 Mark Mitchell <mark@codesourcery.com>
20435
20436 * class.c (layout_class_type): Put the fields required to make a
20437 class non-empty at the end, not the beginning, of the TYPE_FIELDs
20438 list.
20439
20440 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
20441
20442 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
20443 template.
20444
20445 * decl2.c (mark_used): Do instantiate inlines that have been
20446 explicitly instantiated.
20447
20448 2000-01-24 Richard Henderson <rth@cygnus.com>
20449
20450 * call.c (build_over_call): Use expand_tree_builtin.
20451 * typeck.c (build_function_call_real): Likewise.
20452 (build_binary_op_nodefault): Handle unordered compares.
20453
20454 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20455
20456 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
20457 cp_tree_index values.
20458 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
20459 New global node #defines for them.
20460 * rtti.c (call_void_fn): Replace with ...
20461 (build_runtime_decl): ... new static function.
20462 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
20463 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
20464 (build_dynamic_cast_1): Always produce correctly typed result.
20465 Explicitly produce type_info addresses. Use dynamic_cast_node.
20466 * exception.cc (__throw_bad_cast): Return `void *'.
20467 (__throw_bad_typeid): Return `const type_info &'.
20468
20469 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20470
20471 * cp-tree.h (get_vtable_decl): Prototype new function.
20472 * class.c (get_vtable_decl): New function. Broken out from ...
20473 (build_vtable): ... here. Use it.
20474 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
20475 by get_vtable_decl.
20476
20477 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20478
20479 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
20480 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
20481 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
20482 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
20483 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
20484 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
20485 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
20486 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
20487 (CPTI_TINFO_VAR_ID): New enumeration.
20488 (__tp_desc_type_node, __access_mode_type_node,
20489 __bltn_desc_type_node, __user_desc_type_node,
20490 __class_desc_type_node, __ptr_desc_type_node,
20491 __attr_desc_type_node, __func_desc_type_node,
20492 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
20493 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
20494 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
20495 enum_desc_type_node, class_desc_type_node,
20496 si_class_desc_type_node, vmi_class_desc_type_node,
20497 ptmd_desc_type_node, base_desc_type_node): New #defines.
20498 (tinfo_fn_id, tinfo_fn_type): Rename to ...
20499 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
20500 (tinfo_var_id): New enumeration.
20501 (DECL_TINFO_FN_P): Augment comment.
20502 * decl.c (cp_global_trees): Adjust documentation.
20503 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
20504 tinfo_decl_type and tinfo_var_id.
20505 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
20506 (build_typeid): Remove unused variable.
20507 (get_tinfo_var): Use tinfo_var_id.
20508 (tinfo_name): New static function.
20509 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
20510 (tinfo_from_decl): Likewise.
20511 (get_base_offset): New static function, broken out of
20512 expand_class_desc.
20513 (expand_si_desc): Use tinfo_name.
20514 (expand_class_desc): Likewise. Lose local static variable.
20515 Use base_desc_type_node. Use get_base_offset.
20516 (expand_ptr_desc): Use tinfo_name.
20517 (expand_attr_desc): Likewise.
20518 (expand_generic_desc): Likewise.
20519
20520 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
20521 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
20522
20523 2000-01-23 Mark Mitchell <mark@codesourcery.com>
20524
20525 * cp-tree.h (__eprintf): Remove declaration.
20526 * tree.c (__eprintf): Remove definition.
20527
20528 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
20529 Mark Mitchell <mark@codesourcery.com>
20530
20531 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
20532 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
20533
20534 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
20535
20536 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
20537
20538 2000-01-23 Mark Mitchell <mark@codesourcery.com>
20539
20540 * cp-tree.h (register_dtor_fn): New function.
20541 * decl.c (destroy_local_static): Rename to ...
20542 (register_dtor_fn): ... this. Give it external linkage.
20543 (expand_static_init): Use it.
20544 * decl2.c (do_static_initialization): Likewise, if using
20545 __cxa_atexit.
20546 (do_static_destruction): Check that __cxa_atexit is not in use.
20547 (finish_file): Don't call do_static_destruction if using
20548 __cxa_atexit.
20549
20550 * typeck.c (convert_arguments): Restore two-message error
20551 reporting.
20552
20553 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
20554
20555 Remap dynamic cast hint values to be consistent across ABIs.
20556 * search.c (dynamic_cast_base_recurse): Remap generated value.
20557 (get_dynamic_cast_base_type): Adjust documentation.
20558 * tinfo.h (__user_type_info::dyncast): Likewise.
20559 (__user_type_info::find_public_subobj): Remap BOFF meaning.
20560 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
20561 (__class_type_info::do_dyncast): Likewise.
20562 (__class_type_info::do_find_public_subobj): Likewise.
20563 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
20564
20565 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
20566
20567 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
20568
20569 * typeck2.c (incomplete_type_error): Restore previous
20570 cp_error and cp_error_at call sequence.
20571
20572 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
20573
20574 * class.c (dump_class_hierarchy): Make format agree with argument;
20575 cast pointer to unsigned long and print with %lx.
20576
20577 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
20578
20579 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
20580
20581 * typeck.c (composite_pointer_type, common_type,
20582 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
20583 build_function_call_real, convert_arguments,
20584 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
20585 build_unary_op, mark_addressable, build_compound_expr,
20586 build_static_cast, build_reinterpret_cast, build_const_cast,
20587 build_c_cast, build_modify_expr, get_delta_difference,
20588 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
20589 'ISO C++'. Fusion consecutive calls to diagnostic message routines
20590 into a single one.
20591 * typeck2.c (readonly_error, abstract_virtuals_error,
20592 process_init_constructor, check_for_new_type): Likewise.
20593
20594 2000-01-19 Mark Mitchell <mark@codesourcery.com>
20595
20596 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
20597 VAR_DECLs.
20598
20599 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
20600
20601 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
20602 (build_x_typeid): Likewise.
20603 (get_tinfo_fn): Likewise.
20604 (get_tinfo_fn_unused): Rename to ...
20605 (get_tinfo_decl): ... here.
20606 * rtti.c (build_headof): Replace logic error with assertion.
20607 (get_tinfo_fn_dynamic): Rename to ...
20608 (get_tinfo_decl_dynamic): ... here. Make static. Use
20609 complete_type_or_else.
20610 (build_x_typeid): Move into ...
20611 (build_typeid): ... here. Adjust call to
20612 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
20613 throw_bad_typeid expression.
20614 (get_tinfo_fn_unused): Rename to ...
20615 (get_tinfo_decl): ... here. Adjust comment.
20616 (get_tinfo_fn): Delete.
20617 (tinfo_from_decl): New static function.
20618 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
20619 (get_typeid): Use complete_type_or_else.
20620 (build_dynamic_cast_1): Adjust calls to
20621 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
20622 * parse.y (primary): Adjust call to build_typeid.
20623 * except.c (build_eh_type_type_ref): Adjust call to
20624 get_tinfo_decl. Mark as used.
20625 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
20626 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
20627 * parse.c: Regenerated.
20628
20629 2000-01-17 Mark Mitchell <mark@codesourcery.com>
20630
20631 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
20632 calling convention.
20633 (resolves_to_fixed_type_p): Document calling convention.
20634 * rtti.c (build_x_typeid): Initialize NONNULL.
20635
20636 * cp-tree.h (build_shared_int_cst): New function.
20637 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
20638 * class.c (modify_vtable_entry): Likewise.
20639 (add_virtual_function): Split out code to generated shared
20640 INTEGER_CSTs to build_share_int_cst.
20641 (modify_all_vtables): Handle all the overridden functions here.
20642 Add overridden functions from non-primary virtual bases to the
20643 primary vtable.
20644 (finish_struct_1): Adjust call to modify_all_vtables. Add
20645 overridden functions from non-primary bases to the vtable.
20646 * tree.c (build_shared_int_cst): New function.
20647
20648 * cp-tree.h (scratchalloc): Remove.
20649 (build_scratch_list): Likewise.
20650 * call.c (convert_class_to_reference): Replace build_scratch_list
20651 and build_expr_list with build_tree_list.
20652 (add_candidate): Replace scratchalloc with expralloc. Note memory
20653 leak.
20654 (build_user_type_conversion_1): Replace build_scratch_list
20655 and build_expr_list with build_tree_list.
20656 (build_new_op): Likewise.
20657 (build_op_delete_call): Likewise.
20658 (convert_like): Likewise.
20659 * cvt.c (ocp_convert): Likewise.
20660 * decl.c (start_decl): Likewise.
20661 (start_function): Likewise.
20662 (finish_destructor_body): Likewise.
20663 (maybe_build_cleanup_1): Likewise.
20664 * decl2.c (reparse_decl_as_expr): Likewise.
20665 * init.c (perform_member_init): Likewise.
20666 (expand_cleanup_for_base): Likewise.
20667 (build_builtin_delete_call): Likewise.
20668 (build_new_1): Likewise.
20669 (build_delete): Likewise.
20670 * method.c (do_build_assign_ref): Likewise.
20671 * parse.y (already_scoped_stmt): Likewise.
20672 (nontrivial_exprlist): Likewise.
20673 (net_initializer): Likewise.
20674 (initlist): Likewise.
20675 * parse.c: Regenerated.
20676 * rtti.c (build_x_typeid): Likewise.
20677 (build_dynamic_cast_1): Likewise.
20678 * typeck.c (build_x_compound_expr): Likewise.
20679 (build_static_cast): Likewise.
20680 (build_modify_expr): Likewise.
20681
20682 * cp-tree.h (DECL_VINDEX): Add documentation.
20683 * class.c (build_vtable_entry): Likewise.
20684 (start_vtable): Add comment.
20685 (add_virtual_function): Replace pending_hard_virtuals with
20686 overridden_virtuals and pending_virtuals with new_virtuals.
20687 Replace redundant assignments with assertions.
20688 (check_for_override): Add comment.
20689 (check_bases_and_members): Replace pending_hard_virtuals with
20690 overridden_virtuals and pending_virtuals with new_virtuals.
20691 (create_vtbl_ptr): Likewise.
20692 (layout_class_type): Likewise.
20693 (finish_struct_1): Likewise. Add comments.
20694
20695 2000-01-16 Mark Mitchell <mark@codesourcery.com>
20696
20697 * class.c (finish_struct_1): Replace redundant code with
20698 assertions.
20699
20700 * cp-tree.h (flag_new_abi): Move.
20701 (flag_use_cxa_atexit): Likewise.
20702 (flag_honor_std): Likewise.
20703 (flag_rtti): Likewise.
20704 (vbase_offsets_in_vtable_p): Define.
20705 (vptrs_present_everywhere_p): Likewise.
20706 (TYPE_CONTAINS_VPTR_P): Likewise.
20707 (dfs_walk_real): Declare.
20708 * class.c (build_vbase_pointer_fields): Check
20709 vbase_offsets_in_vtable_p.
20710 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
20711 BINFO_VPTR_FIELD.
20712 (build_vbase_offset_vtbl_entries): Simplify.
20713 (build_vbase_offset_vtbl_entries): Adjust.
20714 (build_vbase_pointer): Add ability to look up vbase offsets in
20715 vtable.
20716 (start_vtable): New function.
20717 (add_virtual_function): Use it.
20718 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
20719 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
20720 (build_vtbl_initializer): Take the type of the complete object as
20721 input. Use it to correctly calculate vbase offsets.
20722 (dfs_finish_vtbls): Pass the complete type to
20723 build_vtbl_initializer.
20724 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
20725 (create_vtable_ptr): Create a vtable even if there are no
20726 new virtual functions, under the new ABI.
20727 (finish_struct_1): Likewise.
20728 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
20729 * decl.c (exapnd_static_init): Remove call to
20730 preserve_initializer.
20731 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
20732 vtables.
20733 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
20734 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
20735 (construct_virtual_bases): Don't initialize virtual base pointers
20736 under the new ABI.
20737 (build_aggr_init): Clean up comment.
20738 (expand_aggr_init_1): Likewise.
20739 * rtti.c (expand_class_desc): Store the virtual function table
20740 index where the vbase offset lives in the offset field.
20741 * search.c (dfs_walk_real): Make it global.
20742 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
20743 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
20744
20745 * tinfo.h (USItype): Make it signed under the new ABI.
20746 * tinfo.cc (convert_to_base): New function. Encapsulate base
20747 conversion logic here.
20748 (__class_type_info::do_upcast): Use it.
20749 (__class_type_info::do_dyncast): Likewise.
20750 (__class_type_info::do_find_public_subobj): Likewise.
20751
20752 * init.c (construct_virtual_bases): Don't look up the addresses of
20753 virtual bases at run-time.
20754
20755 * class.c (build_vbase_pointer): Relocate.
20756 (build_vbase_pointer_fields): Likewise.
20757 (dfs_build_vbase_offset_vtbl_entries): Likewise.
20758 (build_vbase_offset_vtbl_entries): Likewise.
20759
20760 * decl.c (init_decl_processing): Complain if -fnew-abi
20761 -fno-vtable-thunks is used.
20762
20763 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
20764 flag_new_abi.
20765
20766 2000-01-15 Mark Mitchell <mark@codesourcery.com>
20767
20768 * cp-tree.h (num_extra_vtbl_entries): New function.
20769 (size_extra_vtbl_entries): Likewise.
20770 (dfs_vtable_path_unmark): Likewise.
20771 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
20772 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20773 * class.c (num_extra_vtbl_entries): New function.
20774 (size_extra_vtbl_entries): Likewise.
20775 (dfs_build_vbase_offset_vtbl_entries): New function.
20776 (build_vbase_offset_vtbl_entries): Likewise.
20777 (build_vtbl_initializer): Use it.
20778 (finish_struct_1): Adjust vtable sizes (using
20779 num_extra_vtbl_entries).
20780 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
20781 THUNK_DECL is non-NULL before expanding it.
20782 * init.c (expand_virtual_init): Adjust the vtable pointer by
20783 size_extra_vtbl_entries before storing it.
20784 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
20785 Handle TREE_LIST parameters here, not in the dfs_* functions.
20786 (dfs_unmarked_real_bases_queue_p): Adjust.
20787 (dfs_marked_real_bases_queue_p): Likewise.
20788 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
20789 (dfs_vtable_path_marked_real_bases_queue_p): New function.
20790 (dfs_vtable_path_unmark): Likewise.
20791
20792 2000-01-14 Mark Mitchell <mark@codesourcery.com>
20793
20794 * optimize.c (copy_body_r): Clear the operand three of a
20795 TARGET_EXPR when copying it.
20796
20797 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20798
20799 * method.c (build_decl_overload_real): Check whether we are in ::
20800 before returning __builtin_new/delete.
20801
20802 2000-01-13 Mark Mitchell <mark@codesourcery.com>
20803
20804 * pt.c (tsubst_friend_function): Improve comment.
20805 (instantiate_decl): Avoid crashing when a "nested" function is
20806 instantiated from the top level.
20807
20808 * dump.c (dqeueue_and_dump): Dump
20809 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
20810
20811 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20812
20813 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
20814
20815 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
20816
20817 * g++spec.c (lang_specific_driver): Add -fnew-abi if
20818 ENABLE_NEW_GXX_ABI defined.
20819 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
20820 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
20821 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
20822
20823 2000-01-12 Mark Mitchell <mark@codesourcery.com>
20824
20825 * decl.c (start_cleanup_fn): Call pushdecl.
20826
20827 * call.c (convert_class_to_reference): Fix typos.
20828 (build_conditional_expr): Handle errors gracefully.
20829 * class.c (push_nested_class): Likewise.
20830 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
20831 (DECL_THIS_EXTERN): Use it.
20832 (DECL_THIS_STATIC): Likewise.
20833 * cvt.c (convert_to_void): Handle errors gracefully.
20834 (build_expr_type_conversion): Likewise.
20835 * decl.c (maybe_push_decl): Likewise.
20836 (start_decl_1): Likewise.
20837 (require_complete_types_for_parms): Likewise.
20838 * parse.y (structsp): Likewise.
20839 (base_class): Likewise.
20840 * parse.c: Regenerated.
20841 * pt.c (finish_member_template_decl): Likewise.
20842 * typeck.c (decay_conversion): Likewise.
20843
20844 * cp-tree.h (dfs_skip_vbases): New function.
20845 (find_vbase_instance): Likewise.
20846 * class.c (determine_primary_base): Allow a nearly empty base to
20847 serve as a primary base class under the new ABI.
20848 (get_class_offset_1): Rename to ...
20849 (dfs_get_class_offset): ... this. Simplify. Don't issue error
20850 messages here.
20851 (get_class_offset): Use it. Issue error messages here.
20852 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
20853 find the right copies of virtual bases.
20854 (fixup_vtable_deltas1): Rename to ...
20855 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
20856 bases as primary bases.
20857 (fixup_vtable_deltas): Remove.
20858 (override_one_vtable): Handle virtual bases as primary bases.
20859 (merge_overrides): Likewise.
20860 (finish_struct_1): Likewise.
20861 (dump_class_hierarchy): Dump primary-ness of bases as well.
20862 * search.c (mark_primary_bases): Use a pre-order traversal to
20863 handle primary virtual bases.
20864 (dfs_skip_vbases): New fiunction.
20865 (expand_upcast_fixups): Adjust to handle primary virtual bases.
20866 (fixup_virtual_upcast_offsets): Likewise.
20867 (fixup_all_virtual_upcast_offsets): Likewise.
20868 (dfs_find_vbase_instances): New function.
20869 (find_vbase_instance): Likewise.
20870
20871 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
20872
20873 * lex.c (DIR_SEPARATOR): Delete macro.
20874
20875 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
20876
20877 * decl2.c (lang_decode_option): Handle automatic line wrapping
20878 option.
20879
20880 2000-01-11 Mark Mitchell <mark@codesourcery.com>
20881
20882 * friend.c (do_friend): Don't resolve scopes when processing
20883 template declarations, even if the qualifying scope doesn't
20884 involve template parameters.
20885
20886 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
20887
20888 * class.c (dfs_modify_vtables_queue_p): Remove.
20889 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
20890 and dfs_marked_real_bases_queue_p instead of
20891 dfs_modify_vtables_queue_p.
20892
20893 * class.c (build_vbase_path): Simplify.
20894 (dfs_propagate_binfo_offsets): New function.
20895 (propagate_binfo_offsets): Use it.
20896 (remove_base_field): Simplify.
20897 (dfs_set_offset_for_vbases): Remove.
20898 (dfs_set_offset_for_shared_vbases): New function.
20899 (dfs_set_offset_for_unshared_vbases): Likewise.
20900 (layout_virtual_bases): Use them.
20901 (layout_basetypes): Don't call propagate_binfo_offsets.
20902 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
20903 for the vbases.
20904
20905 * class.c (build_base_field): New function, split out from ...
20906 (build_base_fields): ... here. Use it. Allocate primary bases
20907 first, under the new ABI.
20908 (get_vtable_entry): Remove.
20909 (remove_base_field): New function, split out from ...
20910 (remove_base_fields): ... here. Adjust since primary bases come
20911 first under the new ABI.
20912
20913 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
20914 (initialize_vtbl_ptrs): New function.
20915 (expand_indirect_vtbls_init): Change prototype.
20916 (convert_pointer_to_vbase): Declare.
20917 * init.c (expand_direct_vtbls_init): Remove.
20918 (dfs_initialize_vtbl_ptrs): New function.
20919 (initialize_vtbl_ptrs): Likewise.
20920 (emit_base_init): Use initialize_vtbl_ptrs.
20921 * search.c (convert_pointer_to_vbase): Make it global.
20922 (expand_indirect_vtbls_init): Remove vtable initialization code.
20923 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
20924
20925 * class.c (dfs_finish_vtbls): New function.
20926 (finish_vtbls): Use it.
20927 (dump_class_hierarchy): New function.
20928
20929 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
20930 (BINFO_VBASE_PRIMARY_P): New macro.
20931 (BINFO_VIRTUALS): Add to documentation.
20932 (SET_BINFO_PRIMARY_MARKED_P): Remove.
20933 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20934 (dfs_mark_primary_bases_queue_p): Likewise.
20935 (dfs_unmarked_real_bases_queue_p): New function.
20936 (dfs_marked_real_bases_queue_p): Likewise.
20937 * search.c (dfs_mark_primary_bases): Adjust.
20938 (mark_primary_bases): Likewise.
20939 (get_shared_vbase_if_not_primary): New function.
20940 (dfs_unmarked_real_bases_queue_p): Likewise.
20941 (dfs_marked_real_bases_queue_p): Likewise.
20942 (dfs_get_pure_virtuals): Simplify.
20943 (get_pure_virtuals): Likewise.
20944
20945 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20946
20947 * lex.c: Include tm_p.h.
20948
20949 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
20950
20951 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
20952
20953 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
20954
20955 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
20956 * pt.c (instantiate_decl): Defer comdat templates that might not be
20957 needed.
20958
20959 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
20960 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
20961 (finish_file): Likewise.
20962
20963 * decl2.c (import_export_class): Undo 12/14 change.
20964
20965 * error.c (dump_decl): operator new, not operatornew.
20966
20967 * class.c (field_decl_cmp): A nontype is "greater" than a type.
20968 * search.c (lookup_field_1): Look for the last field with the
20969 desired name.
20970
20971 2000-01-05 Nathan Sidwell <nathan@acm.org>
20972
20973 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
20974 FUNCTION_DECL.
20975
20976 2000-01-05 Nathan Sidwell <nathan@acm.org>
20977
20978 * typeck.c (build_static_cast): Don't strip target qualifiers
20979 when casting from a class.
20980
20981 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20982
20983 * class.c (warn_hidden): Initialize variable `fndecl'.
20984
20985 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
20986
20987 * decl.c (flag_isoc9x): New variable to be able to use code in
20988 c-common.c. For now always zero.
20989
20990 2000-01-03 Mark Mitchell <mark@codesourcery.com>
20991
20992 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
20993 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
20994 or unshare_base_binfos for virtual bases here.
20995 * search.c (dfs_get_vbase_types): Do it here.
20996 (get_vbase_types): Adjust.
20997
20998 2000-01-02 Mark Mitchell <mark@codesourcery.com>
20999
21000 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21001 (BINFO_PRIMARY_MARKED_P): Use flag 5.
21002 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21003 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21004 (unmark_primary_bases): Remove declaration.
21005 (unmarkedp): Declare.
21006 (dfs_vbase_unmark): Likewise.
21007 * class.c (determine_primary_base): Return immediately if there
21008 are no base classes. Call mark_primary_bases here.
21009 (modify_all_direct_vtables): Remove.
21010 (modify_all_indirect_vtables): Remove.
21011 (dfs_modify_vtables_queue_p): New function.
21012 (dfs_modify_vtables): New function.
21013 (modify_all_vtables): Use them.
21014 (build_base_fields): Build FIELD_DECLs for primary virtual base
21015 classes.
21016 (create_vtable_ptr): Don't call determine_primary_base here.
21017 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21018 (dfs_set_offset_for_vbases): ... this.
21019 (layout_virtual_bases): Use it.
21020 (layout_class_type): Call determine_primary_base here.
21021 * search.c (unmarkedp): Make it global.
21022 (shared_marked_p): Simplify.
21023 (shared_unmarked_p): Likewise.
21024 (dfs_primary_bases_queue_p): Remove.
21025 (dfs_unmark_primary_bases): Likewise.
21026 (unmark_primary_bases): Likewise.
21027 (mark_primary_bases): Simplify.
21028 (get_pure_virtuals): Don't call mark_primary_bases here.
21029 (dfs_vbase_unmark): New function.
21030 (get_vbase_types): Simplify.
21031
21032 * class.c (struct base_info): Remove.
21033 (determine_primary_base): Take has_virtual_p rather than a
21034 base_info as input. Don't calculate max_has_virtual.
21035 (finish_struct_bits): Remove max_has_virtual argument.
21036 (create_vtable_ptr): Remove max_has_virtual_p argument.
21037 (layout_virtual_bases): Remove max argument.
21038 (layout_basetypes): Likewise.
21039 (layout_class_type): Remove max_has_virtual_p argument.
21040 (finish_struct_1): Remove max_has_virtual.
21041
21042 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21043 (layout_basetypes): Remove.
21044 * class.c (propagate_binfo_offsets): Moved here from tree.c.
21045 Update to handle primary virtual bases.
21046 (remove_base_fields): New function, split out from
21047 layout_basetypes.
21048 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
21049 (layout_virtual_bases): New function, split out from
21050 layout_basetypes. Update to handle primary virtual bases.
21051 (layout_basetypes): Moved here from tree.c. Use
21052 remove_base_fields and layout_virtual_bases.
21053 * search.c (dfs_mark_primary_bases_queue_p): New function.
21054 (mark_primary_bases): Use it.
21055 * tree.c (CEIL): Remove.
21056 (propagate_binfo_offsets): Remove.
21057 (layout_basetypes): Remove.
21058
21059 2000-01-01 Mark Mitchell <mark@codesourcery.com>
21060
21061 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
21062 (BINFO_PRIMARY_MARKED_P): New macro.
21063 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21064 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21065 (mark_primary_bases): New function.
21066 (unmark_primary_bases): Likewise.
21067 * search.c (get_abstract_virtuals_1): Remove.
21068 (dfs_mark_primary_bases): New function.
21069 (mark_primary_bases): Likewise.
21070 (dfs_unmark_primary_bases): Likewise.
21071 (unmark_primary_bases): Likewise.
21072 (dfs_get_pure_virtuals): Likewise.
21073
21074 2000-01-01 Mark Mitchell <mark@codesourcery.com>
21075
21076 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
21077 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
21078 (modify_one_vtable): Adjust.
21079 (fixup_vtable_deltas1): Likewise.
21080 (override_one_vtable): Likewise.
21081 * search.c (get_abstract_virtuals_1): Likewise.
21082 (get_pure_virtuals): Likewise.
21083 (expand_upcast_fixups): Likewise.
21084 * tree.c (debug_binfo): Likewise.
21085
21086 * class.c (build_vtable): Don't return a value. Don't rebuild
21087 vtables for bases that have already been handled.
21088 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
21089 already been handled.
21090 (modify_one_vtable): Adjust accordingly.
21091 (fixup_vtable_deltas1): Likewise.
21092 (finish_struct_1): Likewise.
21093
21094 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21095
21096 * call.c (build_new_method_call): Also check destructors.
This page took 1.392446 seconds and 5 git commands to generate.