]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
re PR c++/12053 (ABI difference between default g++ 3.3 and g++ 3.2)
[gcc.git] / gcc / cp / ChangeLog
1 2003-09-03 Mark Mitchell <mark@codesourcery.com>
2
3 PR c++/12053
4 * class.c (include_empty_classes): Correct logic for ABI version 1.
5
6 2003-09-03 Richard Henderson <rth@redhat.com>
7
8 * optimize.c (optimize_function): Push/pop ggc context around
9 the call to optimize_inline_calls.
10
11 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
12
13 PR c++/11553
14 * parser.c (cp_parser_decl_specifier_seq): Add check for a
15 duplicate friend decl-specifier.
16
17 2003-09-02 Mark Mitchell <mark@codesourcery.com>
18
19 PR c++/11847
20 * pt.c (convert_nontype_argument): Correct representation of
21 REFERENCE_TYPE expressions.
22
23 PR c++/11808
24 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
25 (finish_call_expr): Change prototype.
26 * parser.c (cp_parser_postfix_expression): Adjust call to
27 finish_call_expr.
28 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
29 * semantics.c (finish_call_expr): Add koenig_p parameter.
30
31 2003-09-01 Mark Mitchell <mark@codesourcery.com>
32
33 PR c++/12114
34 * cp-tree.h (initialize_reference): Change prototype.
35 * call.c (initialize_reference): Add cleanup parameter.
36 * decl.c (grok_reference_init): Likewise.
37 (check_initializer): Likewise.
38 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
39 (duplicate_decls): When replacing an anticipated builtin, do not
40 honor TREE_NOTHROW.
41 * typeck.c (convert_for_initialization): Correct call to
42 initialize_reference.
43
44 PR c++/11972
45 * pt.c (dependent_type_p_r): Pass only the innermost template
46 arguments to any_dependent_template_arguments_p.
47
48 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
49
50 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
51 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
52 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
53 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
54 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
55
56 2003-08-29 Mark Mitchell <mark@codesourcery.com>
57
58 PR c++/12093
59 * pt.c (build_non_dependent_expr): Do not build a
60 NON_DEPENDENT_EXPR for a STRING_CST.
61
62 PR c++/11928
63 * search.c (add_conversions): Avoid adding two conversion
64 operators for the same type.
65
66 2003-08-29 Mark Mitchell <mark@codesourcery.com>
67
68 PR c++/6196
69 * pt.c (tsubst_copy_and_build): Correct handling of
70 address-of-label extension.
71 * semantics.c (finish_goto_stmt): The address of a label must go
72 through the lvalue-to-rvalue conversion.
73
74 2003-08-29 Richard Henderson <rth@redhat.com>
75 Jason Merrill <jason@redhat.com>
76
77 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
78 (LANG_HOOKS_RTL_EXPAND_STMT): New.
79 * cp-tree.h (cxx_expand_function_start): Declare.
80 * decl.c (start_function): Use allocate_struct_function.
81 Move stmts_are_full_exprs_p assertion from expand_body.
82 Do not free_after_parsing or free_after_compilation.
83 (cxx_push_function_context): Move code to set struct function
84 data from genrtl_start_function.
85 * optimize.c (optimize_function): Don't inc/dec function_depth.
86 * semantics.c (expand_body): Use tree_rest_of_compilation.
87 (cxx_expand_function_start): Rename from genrtl_start_function,
88 omit bits done by tree_rest_of_compilation.
89 (genrtl_finish_function): Remove.
90 (clear_decl_rtl): Move to ../tree-optimize.c.
91
92 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
93
94 PR c++/11811
95 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
96 function.
97 * cxx-pretty-print.h: Declare.
98 * error.c (dump_template_parameter): Use it.
99 (dump_type): Likewise.
100
101 2003-08-28 Mark Mitchell <mark@codesourcery.com>
102
103 * init.c (decl_constant_value): Deal with COND_EXPR specially.
104 * call.c (build_conditional_expr): Revert previous patch.
105
106 PR optimization/5079
107 * call.c (build_conditional_expr): Use decl_constant_value to
108 simplify the arguments.
109
110 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
111
112 * parser.c (struct cp_token): Use enum bitfields.
113 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
114 512B allocation unit.
115 (cp_parser_token_tree_map_node): Use enum bitfields.
116
117 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
118
119 PR c++/11871
120 * decl.c (push_class_level_binding): Correct old_decl value from
121 my 2003-07-29 reorganization.
122
123 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
124 (build_new_method_call): Add goto finish.
125 * semantics.c (simplify_aggr_init_exprs_r): Don't set
126 TREE_SIDE_EFFECTS on a call.
127
128 2003-08-25 Richard Henderson <rth@redhat.com>
129
130 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
131
132 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
133
134 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
135 (cxx_pretty_printer): Adjust base type.
136 (pp_cxx_function_specifier): Declare.
137 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
138 (pp_cxx_left_paren): Likewise.
139 (pp_cxx_right_paren): Likewise.
140 (pp_cxx_dot): Likewise.
141 (pp_cxx_arrow): Likewise.
142 (pp_cxx_semicolon): Likewise.
143 (pp_cxx_identifier): Likewise.
144 (pp_cxx_cv_qualifier_seq): Likewise.
145 (pp_cxx_storage_class_specifier): Likewise.
146 (pp_cxx_expression_list): Likewise.
147 (pp_cxx_space_for_pointer_operator): Likewise.
148 (pp_cxx_init_declarator): Likewise.
149 (pp_cxx_call_argument_list): Likewise.
150 (pp_cxx_nonconsecutive_character): Tidy.
151 (pp_cxx_conversion_function_id): New function.
152 (pp_cxx_template_id): Likewise.
153 (pp_cxx_template_keyword_if_needed): Likewise.
154 (pp_cxx_nested_name_specifier): Likewise.
155 (pp_cxx_unqualified_id): Tidy
156 (pp_cxx_qualified_id): Handle more nodes.
157 (pp_cxx_primary_expression): Tidy.
158 (pp_cxx_postfix_expression): Likewise.
159 (pp_cxx_new_expression): Tidy.
160 (pp_cxx_delete_expression): Likewise.
161 (pp_cxx_cast_expression): New function.
162 (pp_cxx_pm_expression): Tidy.
163 (pp_cxx_conditional_expression): Likewise.
164 (pp_cxx_assignment_operator): New function.
165 (pp_cxx_assignment_expression): Tidy.
166 (pp_cxx_expression): New function.
167 (pp_cxx_function_specifier): Likewise.
168 (pp_cxx_decl_specifier_seq): Likewise.
169 (pp_cxx_simple_type_specifier): Tidy.
170 (pp_cxx_type_specifier_seq): Likewise.
171 (pp_cxx_ptr_operator): New function.
172 (pp_cxx_implicit_parameter_type): Likewise.
173 (pp_cxx_parameter_declaration): Tidy.
174 (pp_cxx_parameter_declaration_clause): New function.
175 (pp_cxx_exception_specification): Likewise.
176 (pp_cxx_direct_declarator): Tidy.
177 (pp_cxx_declarator): Likewise.
178 (pp_cxx_ctor_initializer): New function.
179 (pp_cxx_function_definition): Likewise.
180 (pp_cxx_abstract_declarator): Tidy.
181 (pp_cxx_direct_abstract_declarator): Likewise.
182 (pp_cxx_type_id): Likewise.
183 (pp_cxx_exception_declaration): New function.
184 (pp_cxx_statement): Likewise.
185 (pp_cxx_simple_declaration): Likewise.
186 (pp_cxx_template_parameter_list): Likewise.
187 (pp_cxx_template_parameter): Likewise.
188 (pp_cxx_template_declaration): Likewise.
189 (pp_cxx_explicit_specialization): Likewise.
190 (pp_cxx_explicit_instantiation): Likewise.
191 (pp_cxx_declaration): Tidy.
192 (pp_cxx_pretty_printer_init): Initialize more fields.
193
194 2003-08-25 Mark Mitchell <mark@codesourcery.com>
195
196 PR c++/8795
197 * cp-tree.h (build_cplus_method_type): Remove.
198 * call.c (standard_conversion): Use build_method_type_directly
199 instead of build_cplus_method_type.
200 * class.c (build_clone): Likewise.
201 (adjust_clone_args): Likewise.
202 * decl.c (build_ptrmem_type): Likewise.
203 (grokdeclarator): Likewise.
204 (check_function_type): Likewise.
205 * decl2.c (grok_method_quals): Likewise.
206 (maybe_retrofit_in_chrg): Likewise.
207 * pt.c (copy_default_args_to_explicit_spec): Likewise.
208 (tsubst_function_type): Likewise.
209 (tsubst): Likewise.
210 * tree.c (build_cplus_method_type): Remove.
211 * typeck.c (merge_types): Use build_method_type_directly.
212
213 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
214
215 PR c++/3765
216 * search.c (dfs_access_in_type): Fix typo in comment.
217 (dfs_accessible_queue_p): Likewise.
218 (dfs_accessible_p): Only terminate when a friend is found.
219 (accessible_p): Return immediately if access_in_type allows
220 access.
221
222 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
223
224 PR c++/641, c++/11876
225 * friend.c (add_friend): Add complain parameter.
226 (make_friend_class): Likewise.
227 (do_friend): Adjust add_friend call.
228 * decl.c (grokdeclarator): Adjust make_friend_class call.
229 * parser.c (cp_parser_member_declaration): Likewise.
230 (cp_parser_template_declaration_after_exp): Likewise.
231 * pt.c (instantiate_class_template): Adjust make_friend_class
232 and add_friend call.
233 * cp-tree.h (make_friend_class): Adjust declaration.
234 (add_friend): Likewise.
235
236 2003-08-21 Jason Merrill <jason@redhat.com>
237
238 PR c++/11283
239 * call.c (build_conditional_expr): Ignore cv-qual differences for
240 non-class types.
241
242 2003-08-21 Mark Mitchell <mark@codesourcery.com>
243
244 PR c++/11551
245 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
246 (cp_parser_primary_expression): Adjust call to
247 cp_parser_id_expression.
248 (cp_parser_unqualified_id): Complain about the use of
249 typedef-names in a destructor declarator.
250 (cp_parser_postfix_expression): Adjust call to
251 cp_parser_id_expression.
252 (cp_parser_type_parameter): Likewise.
253 (cp_parser_template_argument): Likewise.
254 (cp_parser_declarator_id): Likewise.
255
256 PR c++/11919
257 * call.c (standard_conversion): Use same_type_p, not pointer
258 equality, to compare types.
259
260 PR c++/10762
261 * parser.c (cp_parser_using_declaration): Check for invalid uses
262 of template-ids here...
263 * decl2.c (do_class_using_decl): ... rather than here.
264
265 2003-08-20 Mark Mitchell <mark@codesourcery.com>
266
267 PR c++/11834
268 * pt.c (more_specialized): Bump processing_template_decl.
269
270 2003-08-21 Jason Merrill <jason@redhat.com>
271
272 PR c++/11614
273 * decl.c (grokdeclarator): Recognize a flexible array based on the
274 type, not the form of the declarator.
275
276 2003-08-20 Jason Merrill <jason@redhat.com>
277
278 * semantics.c (simplify_aggr_init_expr): Split out from
279 simplify_aggr_init_exprs_r. Convert slot address to match
280 the return type.
281 * cp-tree.h: Declare it.
282 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
283 DECL_NAME of a user variable.
284
285 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
286
287 PR c++/11945
288 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
289 COMPOUND_EXPR.
290 * semantics.c (finish_expr_stmt): Always convert to void.
291 * typeck.c (build_x_compound_exp): Always convert to void.
292
293 2003-08-19 Mark Mitchell <mark@codesourcery.com>
294
295 PR c++/11684
296 * cp-tree.h (grok_op_properties): Change prototype.
297 * decl.c (grok_op_properties): Add complain parameter.
298 (grokfndecl): Pass it.
299 * pt.c (tsubst_decl): Adjust accordingly.
300
301 PR c++/10926
302 * decl.c (start_method): Return immediately if push_template_decl
303 does not like the declaration.
304 * pt.c (push_template_decl_real): Disallow member template
305 destructors.
306
307 PR c++/11036
308 * cp-tree.h (add_binding): Add prototype.
309 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
310 (maybe_warn_about_overly_private_class): Use
311 CLASSTYPE_DESTRUCTORS.
312 (pushclass): Adjust call to set_identifier_type_value.
313 * decl.c (add_binding): Give it external linkage.
314 (push_local_binding): Adjust call to add_binding.
315 (push_class_binding): Likewise.
316 (set_identifier_type_value_with_scope): Change prototype. Use
317 add_binding for global bindings.
318 (set_identifier_type_value): Adjust accordingly.
319 (pushtag): Likewise.
320 (pushdecl): Use set_identifier_type_value, not
321 set_identifier_type_value_with_scope.
322 (pushdecl_namespace_level): Adjust calls to
323 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
324 (pushdecl_class_level): Likewise.
325 (lookup_tag): Use select_decl.
326 (select_decl): Improve comment.
327 (record_builtin_type): Do not call pushdecl.
328 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
329 (cp_finish_decl): Adjust call to set_identifier_type_value.
330 (check_elaborated_type_specifier): Improve checks for invalid uses
331 of typedefs.
332 (xref_tag): Adjust call to check_elaborated_type_specifier.
333 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
334 * name-lookup.c (set_namespace_binding): Use add_binding.
335 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
336 rather than an IDENTIFIER_NODE, to represent built-in types, if
337 requested by the caller.
338 (cp_parser_postfix_expression): Adjust call.
339 (cp_parser_type_specifier): Likewise.
340 (cp_parser_elaborated_type_specifier): Adjust call to
341 check_elaborated_type_specifier.
342 * typeck2.c (build_functional_cast): Do not perform name lookups.
343
344 PR c++/10717
345 * decl.c (expand_static_init): Remove unncessary code.
346
347 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
348
349 PR c++/10538, PR c/5582
350 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
351
352 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
353
354 PR c++/11174
355 * init.c (build_offset_ref): Perform access checking for
356 pointer to member correctly.
357
358 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
359
360 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
361
362 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
363
364 PR c++/11957
365 * cp-tree.h (finish_stmt_expr): Add bool parameter.
366 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
367 adjust the stmt_expr here.
368 (build_vec_init): Use finish_stmt_expr_expr, convert result to
369 array type.
370 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
371 call.
372 * pt.c (tsubst_copy): Likewise.
373 * semantics.c (finish_stmt_expr): Add parameter.
374
375 * pt.c (instantiate_class_template): Push to class's scope before
376 tsubsting base.
377
378 Sun Aug 17 10:05:38 CEST 2003 Jan Hubicka <jh@suse.cz>
379
380 PR C++/11702
381 * semantics.c (finish_id_expression): Mark all functions as used.
382
383 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
384
385 PR c++/11512
386 * cvt.c (convert_to_void): Indicate which side of conditional has
387 no effects, and rhs of comma operator. Test for no sideeffect
388 expressions here and always build a convert expr.
389 * init.c (expand_default_init): Convert the init to void.
390 * typeck.c (build_x_compound_expr): Do not check for side effects
391 here.
392 (build_compound_expr): Do not convert lhs when building a
393 template.
394
395 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
396
397 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
398 * decl2.c (build_offset_ref_call_from_tree): Use
399 build_non_dependent_expr.
400 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
401 * pt.c (build_non_dependent_expr): Set operand.
402
403 2003-08-14 Jan Hubicka <jh@suse.cz>
404
405 * decl2.c (mark_member_pointers): Rename to...
406 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
407 (lower_function): Update call.
408 * except.c (eh_type_info): Break out from ...
409 (build_eh_type): ... here; tinfo is already used.
410 (finish_eh_spec_block): Mark tinfos as used.
411 * semantics.c (finish_handler_params): Mark tinfo as used.
412 * cp-tree.h (eh_type_info): Declare.
413
414 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
415
416 * pt.c (instantiate_class_template): Set location before
417 substuting bases.
418
419 * decl.c (make_typename_type): Use my_friendly_assert.
420 * pt.c (tsubst_aggr_type): Rearrange context substitution.
421
422 Thu Aug 14 12:19:25 CEST 2003 Jan Hubicka <jh@suse.cz>
423
424 * method.c (use_thunk): Expand body directly.
425
426 2003-08-12 Mark Mitchell <mark@codesourcery.com>
427
428 PR c++/11703
429 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
430 determine whether or not to promote types.
431 (convert_for_arg_passing): Likewise.
432 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
433 templates.
434 * pt.c (tsubst_decl): Do not expect it to be set.
435
436 PR c++/9512
437 PR c++/10923
438 * cp-tree.h (check_elaborated_type_specifier): Declare.
439 (handle_class_head): Remove.
440 (note_got_semicolon): Likewise.
441 (note_list_got_semicolon): Likewise.
442 (finish_class_definition): Likewise.
443 * decl.c (check_elaborated_type_specifier): Make it public.
444 Robustify.
445 (handle_class_head): Remove.
446 * parser.c (cp_parser_elaborated_type_specifier): Use
447 check_elaborated_type_specifier.
448 (cp_parser_class_specifier): Do not call finish_class_definition.
449 (cp_parser_class_head): Or handle_class_head. Check for
450 over-qualified names.
451 * semantics.c (finish_class_definition): Remove.
452
453 * parser.c (cp_parser_check_for_definition_in_return_type): New
454 function.
455 (cp_parser_simple_declaration): Adjust call to
456 cp_parser_init_declarator.
457 (cp_parser_decl_specifier_seq): Change type of
458 declares_class_or_enum parameter.
459 (cp_parser_explicit_instantiation): Adjust accordingly.
460 (cp_parser_type_specifier): Change type of
461 declares_class_or_enum parameter.
462 (cp_parser_init_declarator): Add declares_class_or_enum
463 parameter.
464 (cp_parser_parameter_declaration): Adjust call to
465 cp_parser_decl_specifier_seq.
466 (cp_parser_function_definition): Likewise.
467 (cp_parser_member_declaration): Likewise.
468 (cp_parser_single_declaration): Likewise.
469
470 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
471 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
472 (TYPE_OVERLOADS_CALL_EXPR): Remove.
473 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
474 (TYPE_OVERLOADS_ARROW): Likewise.
475 (CLASSTYPE_GOT_SEMICOLON): Likewise.
476 * class.c (check_bases): Do not set them.
477 (finish_struct_1): Likewise.
478 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
479 (build_ptrmemfunc_type): Likewise.
480 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
481 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
482 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
483 * lex.c (note_got_semicolon): Remove.
484 (note_list_got_semicolon): Likewise.
485 * parser.c (cp_parser_simple_declaration): Do not call
486 note_list_got_semicolon.
487 * pt.c (list_eq): Remove.
488 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
489 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
490 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
491 * ptree.c (cxx_print_type): Do not print them.
492 * semantics.c (finish_member_class_template): Do not call
493 note_list_got_semicolon.
494
495 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
496
497 * call.c (standard_conversion): Opaque pointers interconvert.
498
499 * testsuite/g++.dg/other/opaque-3.C: New.
500
501 2003-08-11 Mark Mitchell <mark@codesourcery.com>
502
503 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
504 types correctly.
505
506 2003-08-10 Mark Mitchell <mark@codesourcery.com>
507
508 PR c++/11789
509 * cp-tree.h (get_vbase): Remove.
510 (get_vbase_types): Remove.
511 * init.c (expand_member_init): Correct logic for looking up base
512 classes.
513
514 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
515
516 * error.c (dump_expr): Tidy.
517 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
518 (pp_cxx_begin_template_argument_list): Likewise.
519 (pp_cxx_end_template_argument_list): Likewise.
520 (is_destructor_name): Likewise.
521 (pp_cxx_unqualified_id): Likewise.
522 (pp_cxx_qualified_id): Likewise.
523 (pp_cxx_id_expression): Likewise.
524 (pp_cxx_new_expression): Likewise.
525 (pp_cxx_delete_expression): Likewise.
526 (pp_cxx_pm_expression): Likewise.
527 (pp_cxx_type_specifier): Rework.
528 (pp_cxx_type_id): Likewise.
529 (pp_cxx_primary_expression): Likewise.
530 (pp_cxx_postfix_expression): Likewise.
531 (pp_cxx_unary_expression): Likewise.
532 (pp_cxx_multiplicative_expression): Likewise.
533 (pp_cxx_conditional_expression): Likewise.
534 (pp_cxx_assignment_expression): Likewise.
535 (pp_cxx_pretty_printer_init): Tidy.
536
537 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
538
539 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
540 NODE is always a TREE_VEC of non-zero size.
541 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
542 * decl2.c (arg_assoc): Template args will be a vec.
543 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
544 dump_template_argument_list.
545 (dump_template_parms): Args will be a vec.
546 * parser.c (cp_parser_template_argument_list): Produce a
547 vector, not a list.
548 * pt.c (coerce_template_parms): Args are always vectors.
549 (mangle_class_name_for_template): Likewise.
550 (lookup_template_function): Likewise.
551 (lookup_template_class): Likewise.
552 (tsubst_template_args): Likewise.
553 (tsubst_baselink): Use tsubst_template_args.
554 (tsubst_qualified_id): Likewise.
555 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
556 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
557 (any_dependent_template_args_p): Args are always vectors.
558 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
559
560 PR c++/11670
561 * call.c (convert_like_real): Add rvalue binding error message.
562 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
563 really a cast.
564
565 PR c++/10530
566 * pt.c (dependent_type_p_r): A dependent template-id is a class
567 type with dependent template arguments, or a bound template
568 template parameter.
569 (type_dependent_expression_p): A template function decl cannot
570 have a dependent context.
571
572 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
573
574 PR c++/5767
575 * parser.c (cp_parser_class_name): Return immediately when scope
576 is error_mark_node.
577
578 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
579
580 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
581
582 * cp/call.c (standard_conversion): Support opaque types.
583 Include target.h.
584 (strip_top_quals): Use cp_build_qualified_type instead of
585 TYPE_MAIN_VARIANT.
586
587 * cp/typeck.c (convert_for_assignment): Support opaque types.
588
589 * testsuite/g++.dg/other/opaque-1.C: New.
590
591 * testsuite/g++.dg/other/opaque-2.C: New.
592
593 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
594
595 * decl.c (grokparms): Use cp_build_qualified_type instead
596 TYPE_MAIN_VARIANT.
597
598 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
599
600 * cxx-pretty-print.h: New file.
601 * cxx-pretty-print.c: Likewise.
602 * error.c (scratch_pretty_printer): Change type.
603 (init_error): Tidy.
604 (dump_aggr_type): Likewise.
605 (dump_global_iord): Likewise.
606 (dump_expr): Likewise.
607 (dump_char): Remove.
608 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
609 (cxx_initialize_diagnostics): New function.
610 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
611 (CXX_PRETTY_PRINT_H): New variable.
612 (cp/cxx-pretty-print.o): New rule.
613 (cp/cp-lang.o): Update dependence.
614 (cp/error.o): Likewise.
615
616 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
617
618 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
619 (DECL_DECLARED_INLINE_P): Remove.
620 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
621 if decl is a FUNCTION_DECL. This never made sense, but now it is
622 required to avoid a tree check failure.
623 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
624 * optimize.c (maybe_clone_body): Likewise.
625
626 2003-08-04 Roger Sayle <roger@eyesopen.com>
627
628 * decl.c (cxx_insert_default_attributes): Delete.
629 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
630 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
631
632 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
633
634 PR c++/11704
635 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
636 unknown type.
637
638 PR c++/11766
639 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
640 member functions.
641
642 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
643
644 PR c++/9447
645 * cp-tree.def (USING_DECL): Document its type.
646 * class.c (pushclass): If we're entering a template, push any
647 dependent using decls it has.
648 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
649 a dependent scope.
650 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
651 (tsubst): Remove USING_DECL checks.
652 (type_dependent_expression_p): Remove USING_DECL case.
653 * semantics.c (finish_member_declaration): A USING_DECL's type
654 indicates whether it is dependent.
655
656 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
657
658 * cp-tree.h (pushclass): Remove unneeded parameter.
659 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
660 (push_nested_class): Adjust pushclass call.
661 * pt.c (instantiate_class_template): Likewise.
662 * semantics.c (begin_class_definition): Likewise.
663
664 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
665
666 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
667
668 2003-08-01 Mark Mitchell <mark@codesourcery.com>
669
670 PR c++/11697
671 * decl.c (decls_match): Don't ignore the types of template
672 classes.
673
674 PR c++/11744
675 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
676
677 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
678
679 PR c++/8442, c++/8806
680 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
681 preferred.
682 (check_elaborated_type_specifier): Add allow_template_p
683 parameter. Check tag mismatch and class template.
684 (xref_tag): Add template_header_p parameter. Add assertion
685 that name is an IDENTIFIER_NODE. Remove implicit typename
686 warning. Simplify lookup process if globalize is true.
687 (cxx_init_decl_processing): Adjust call to xref_tag.
688 (xref_tag_from_type): Likewise.
689 * decl2.c (handle_class_head): Likewise.
690 * parser.c (cp_parser_elaborated_type_specifier,
691 cp_parser_class_head): Likewise.
692 * rtti.c (init_rtti_processing, build_dynamic_cast1,
693 tinfo_base_init, emit_support_tinfos): Likewise.
694 * class.c (is_base_of_enclosing_class): Remove.
695 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
696 template template argument.
697 * cp-tree.h (xref_tag): Adjust declaration.
698 (is_base_of_enclosing_class): Remove.
699 * NEWS: Document template template argument change.
700
701 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
702
703 * parser.c (cp_parser_init_declarator,
704 cp_paser_member_declaration): Reformat.
705 * pt.c (lookup_template_class, type_unification_real, unify,
706 type_dependent_expression_p): Reformat.
707
708 PR c++/11295
709 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
710 tf_stmt_expr_body.
711 (finish_stmt_expr_expr): Declare.
712 * parser.c (cp_parser_primary_expression): Tell
713 cp_parser_compount_statement that it is a statement expression.
714 (cp_parser_statement, cp_parser_labeled_statement,
715 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
716 in_statement_expr_p parameter.
717 (cp_parser_expression_statement): Likewise. Call
718 finish_stmt_expr_expr for final expression of a statement
719 expression.
720 (cp_parser_for_init_statement,
721 cp_parser_implicitly_scoped_statement,
722 cp_parser_already_scoped_statement, cp_parser_function_definition,
723 cp_parser_try_block, cp_parser_handled): Adjust.
724 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
725 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
726 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
727 * semantics.c (finish_expr_stmt): Do not deal with statement
728 expressions.
729 (begin_stmt_expr): Clear last_expr_type.
730 (finish_stmt_expr_expr): New.
731 (finish_stmt_expr): Process the value expression.
732
733 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
734 compound expr inside the target's initializer.
735
736 PR c++/11525
737 * parser.c (cp_parser_primary_expression): Do not set
738 non-constant-p merely because it is a dependent scope.
739
740 PR c++/9447
741 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
742 * semantics.c (finish_expr_stmt): Do not convert to void in a
743 template.
744
745 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
746
747 * pt.c (coerce_template_parms): Refactor.
748 (fn_type_unification): Increment processing_template_decl when
749 tsubsting an incomplete set of explicit args.
750
751 PR c++/11347
752 * pt.c (instantiate_class_template): Increment
753 processing_template_decl around the tsubst of a template member
754 class.
755 (tsubst_qualified_id): Assert we do not have a dependent scope.
756
757 * pt.c (coerce_template_template_parms, lookup_template_class,
758 can_complete_type_without_circularity, instantiate_class_template,
759 tsubst_decl, unify): Reformat.
760
761 Thu Jul 31 01:07:41 CEST 2003 Jan Hubicka <jh@suse.cz>
762
763 * decl2.c (maybe_make_one_only): Use mark_referenced.
764 * method.c (use_thunk): Likewsie.
765
766 Wed Jul 30 19:12:48 CEST 2003 Jan Hubicka <jh@suse.cz>
767
768 * class.c (build_vtable_entry_ref): Kill.
769 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
770 (build_vfn_ref): Do not call build_vtable_entry_ref.
771 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
772 * cp-tree.h (prepare_assemble_variable): Kill.
773 * cp-decl.c (prepare_assemble_variable): Kill.
774
775 2003-07-29 Geoffrey Keating <geoffk@apple.com>
776
777 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
778 of setting valid_pch by hand.
779
780 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
781
782 * decl.c (finish_enum): Initialize underlying_type.
783
784 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
785
786 PR c++/9447
787 * decl.c (add_binding): Add bval local variable.
788 (push_class_level_binding): Likewise. Allow a USING_DECL to be
789 pushed.
790 * decl2.c (do_class_using_decl): The type of a using decl is
791 unknown.
792 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
793 function call lookup code.
794 * pt.c (tsubst): A USING_DECL will have unknown type.
795 (tsubst_copy_and_build): Allow a using decl.
796 (type_dependent_expression_p): A USING_DECL will make it
797 dependent.
798 * semantics.c (finish_member_declaration): Push a dependent using
799 declaration.
800
801 2003-07-28 Mark Mitchell <mark@codesourcery.com>
802
803 PR c++/11530
804 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
805 * semantics.c (finish_id_expression): Call mark_used for all
806 declarations.
807
808 2003-07-28 Mark Mitchell <mark@codesourcery.com>
809
810 PR c++/11667
811 * call.c (standard_conversion): Allow all integral->enumeral
812 conversions, after marking them as bad.
813 * decl.c (finish_enum): Make sure that all enumerators are
814 properly converted to the underlying type.
815 (build_enumerator): Set DECL_CONTEXT for namespace-scope
816 enumeration types.
817 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
818 (tsubst_enum): Tidy.
819
820 * Make-lang.in (typeck.o): Depend on convert.h.
821 (class.o): Likewise.
822 (rtti.o): Likewise.
823 * call.c: Include convert.h.
824 (convert_arg_to_ellipsis): Use convert_to_real.
825 * class.c: Include convert.h.
826 (build_base_path): Use convert_to_integer.
827 * rtti.c: Include convert.h.
828 (build_headof): Use convert_to_integer.
829 * typeck.c: Include convert.h.
830 (decay_conversion): Use convert_to_integer.
831 (build_unary_op): Use build_nop.
832 (get_delta_difference): Use convert_to_integer.
833 (build_ptrmemfunc): Avoid unncessary conversions.
834
835 Mon Jul 28 23:55:10 CEST 2003 Jan Hubicka <jh@suse.cz>
836
837 * decl2.c (mark_member_pointers): Verify that member pointer points to
838 the function.
839
840 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
841
842 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
843 (finish_compound_stmt): Remove no scope arg.
844 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
845 end_compound_stmt calls.
846 (expand_static_init, begin_destructor_body, begin_function_body,
847 finish_function_body): Likewise.
848 * decl2.c (start_objects, finish_objects,
849 start_static_storage_duration_function,
850 finish_static_storage_duration_function): Likewise.
851 * init.c (begin_init_stmts, finish_init_stmts,
852 construct_virtual_base, build_vec_init): Likewise.
853 * method.c (do_build_assign_ref, synthesize_method): Likewise.
854 * parser.c (cp_parser_compound_statement,
855 cp_parser_implicitly_scoped_statement,
856 cp_parser_already_scoped_statement): Likewise.
857 * pt.c (tsubst_expr): Likewise.
858 * semantics.c (begin_compound_stmt): No scope arg is a bool.
859 (finish_compound_stmt): Remove no scope arg.
860
861 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
862 always dyadic.
863
864 2003-07-27 Mark Mitchell <mark@codesourcery.com>
865
866 * call.c (standard_conversion): Tweak handling of
867 pointer-to-member types.
868 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
869 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
870 pointer-to-data member types.
871
872 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
873
874 * parser.c (cp_parser_type_parameter): Reformat.
875 (cp_parser_parameter_declaration): Deprecate default args where
876 not allowed.
877
878 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
879
880 * cfns.h: Rebuilt.
881
882 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
883 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
884 * init.c (begin_init_stmts): Make static. Return is_global
885 value. Always call begin_stmt_expr.
886 (finish_init_stmts): Make static. Add is_global parm. Always
887 building a stmt tree.
888 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
889 (build_vec_init): Likewise. Always building a stmt tree.
890 (expand_default_init): Always building a stmt tree.
891 (get_temp_regvar): Likewise.
892 * semantics.c (begin_global_stmt_expr,
893 finish_global_stmt_expr): Remove.
894
895 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
896
897 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
898 (build_x_compound_expr_from_list): Declare.
899 * typeck.c (build_x_compound_expr_from_list): New.
900 (build_x_compound_expr): Adjust.
901 (build_compound_expr): Remove unreachable code. Take two
902 parameters, adjust.
903 * decl.c (grok_reference_init): Use
904 build_x_compound_expr_from_list.
905 (expand_static_init): Adjust build_compound_expr call.
906 (cxx_maybe_build_cleanup): Likewise.
907 * init.c (perform_member_init): Use
908 build_x_compound_expr_from_list.
909 (build_new_1): Likewise.
910 (build_vec_delete): Adjust build_compound_expr calls.
911 (build_vbase_delete): Likewise.
912 * typeck2.c (store_init_value): Use
913 build_x_compound_expr_from_list.
914 (build_functional_cast): Likewise.
915
916 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
917
918 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
919 * decl.c (make_typename_type): Pass it.
920 * pt.c (lookup_template_class): Use it.
921 (resolve_typename_type): Pass it.
922 * semantics.c (finish_template_type): Pass it.
923
924 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
925
926 PR c++/11617
927 * cp-tree.h (qualified_name_lookup_error): Declare.
928 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
929 errors.
930 (tsubst_expr) <DECL_STMT case>: Likewise.
931 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
932 * semantics.c (qualified_name_lookup_error): New, broken out of ...
933 (finish_id_expression): ... here. Use it.
934
935 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
936
937 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
938
939 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
940
941 PR c++/11596
942 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
943 (tsubst_template_arg): New.
944 (tsubst_template_arg_vector): Rename to ...
945 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
946 tsubst_template_arg.
947 (coerce_template_parms): Use tsubst_template_arg for default
948 value.
949 (tsubst_template_parms): Likewise.
950 (tsubst_aggr_type): Adjust.
951 (tsubst_decl): Likewise.
952 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
953 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
954
955 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
956
957 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
958 * error.c: Use the new pretty-printer framework.
959
960 2003-07-24 Per Bothner <pbothner@apple.com>
961
962 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
963 which causes errors messages to incorrectly mention included files.
964
965 2003-07-24 Mark Mitchell <mark@codesourcery.com>
966
967 * cp-tree.h (convert_to_base_statically): Declare.
968 * call.c (build_special_member_call): Convert INSTANCE to the base
969 type.
970 * class.c (convert_to_base_statically): New method.
971 * init.c (construct_virtual_base): Use it.
972 * method.c (do_build_assign_ref): Fix typo in comment.
973
974 2003-07-24 Jason Merrill <jason@redhat.com>
975
976 * decl.c: Just set truthvalue_* to boolean_*.
977
978 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
979
980 * decl.c (reshape_init): Remove unreachable code.
981
982 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
983
984 PR c++/11513
985 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
986
987 2003-07-23 Mark Mitchell <mark@codesourcery.com>
988
989 PR c++/11645
990 * cp-tree.h (accessible_base_p): Declare.
991 * call.c (build_over_call): Use it.
992 * search.c (accessible_base_p): New function, split out from ...
993 (lookup_base): ... here.
994
995 PR c++/11517
996 * call.c (build_conditional_expr): Use perform_implicit_conversion
997 and error_operand_p. Robustify.
998 * typeck.c (build_unary_op): Use perform_implicit_conversion.
999
1000 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
1001
1002 PR c++/10953
1003 * parser.c (cp_parser_nested_name_specifier): Reset scope on
1004 failure.
1005 (cp_parser_elaborated_type_specifier): Likewise.
1006
1007 2003-07-22 Mark Mitchell <mark@codesourcery.com>
1008
1009 Eliminate use of POINTER_TYPE for pointers-to-members.
1010 * call.c (standard_conversion): Rework pointer-to-member handling.
1011 Add comments.
1012 (add_builtin_candidate): Likewise.
1013 (resolve_scoped_fn_name): Remove.
1014 (build_conditional_expr): Rework pointer-to-member handling.
1015 (compare_ics): Likewise.
1016 * class.c (check_field_decls): Use TYPE_PTR_P.
1017 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1018 handling.
1019 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1020 (TYPE_PTRMEM_P): Add comment.
1021 (TYPE_PTR_P): Simplify.
1022 (TYPE_PTROB_P): Correct definition.
1023 (TYPE_PTR_TO_MEMBER_P): New macro.
1024 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1025 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1026 (resolved_scoped_fn_name): Remove declaration.
1027 (build_offset_ref): Change prototype.
1028 (resolve_offset_ref): Remove.
1029 (comp_target_types): Remove.
1030 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1031 handling.
1032 (convert_to_reference): Use can_convert.
1033 (ocp_convert): Improve error handling. Rework pointer-to-member
1034 handling.
1035 (perform_qualification_conversions): Rework pointer-to-member
1036 handling.
1037 * decl.c (build_ptrmem_type): Handle functions too.
1038 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1039 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1040 (grokparms): Remove OFFSET_TYPE error message.
1041 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1042 * error.c (dump_type_prefix): Likewise.
1043 * expr.c (cplus_expand_constant): Use build_nop.
1044 * init.c (build_offset_ref): Add address_p parameter. Fold in
1045 necessary bits from resolve_offset_ref.
1046 (resolve_offset_ref): Remove.
1047 * parser.c (cp_parser_postfix_expression): Remove special case
1048 code for OFFSET_TYPE.
1049 * pt.c (convert_nontype_argument): Rework pointer-to-member
1050 handling.
1051 (convert_template_argument): Likewise.
1052 (unify): Likewise.
1053 (invalid_nontype_parm_type_p): Likewise.
1054 (dependent_type_p_r): Likewise.
1055 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1056 (target_incomplete_p_): Rework pointer-to-member
1057 handling.
1058 (get_pseudo_ti_init): Likewise.
1059 (get_pseudo_ti_desc): Likewise.
1060 * semantics.c (finish_qualified_id_expr): Adjust call to
1061 build_offset_ref. Remove use of resolve_offset_ref.
1062 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1063 * typeck.c (target_type): Use TYPE_PTRMEM_P.
1064 (type_unknown_p): Remove obsolete code about the time before
1065 non-dependent expressions were handled correctly.
1066 (qualify_type_recursive): Remove.
1067 (composite_pointer_type_r): New function.
1068 (composite_pointer_type): Use it.
1069 (merge_types): Remove dead comments.
1070 (comp_cv_target_types): Remove.
1071 (comp_target_types): Likewise.
1072 (comp_target_parms): Likewise.
1073 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1074 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1075 (build_binary_op): Do not use of comp_target_types.
1076 (pointer_diff): Remove OFFSET_TYPE case.
1077 (build_unary_op): Adjust pointer-to-member handling.
1078 (unary_complex_lvalue): Likewise.
1079 (check_for_casting_away_constness): Add description parameter.
1080 (build_static_cast): Pass it.
1081 (build_reinterpret_cast): Use check_for_casting_away_constness.
1082 (build_const_cast): Adjust pointer-to-member handling.
1083 (build_c_cast): Likewise.
1084 (convert_for_assignment): Remove OFFSET_TYPE error message.
1085 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1086 (comp_ptr_ttypes_reinterpret): Remove.
1087 (casts_away_constness_r): Adjust pointer-to-member handling.
1088 (casts_away_constness): Liekwise.
1089 (strip_all_pointer_quals): Remove.
1090 * typeck2.c (digest_init): Adjust pointer-to-member handling.
1091 (build_m_component_ref): Likewise.
1092
1093 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
1094
1095 * lex.c (unqualified_fn_lookup_error): Mention that the error
1096 message needs to be kept in synch with the manual.
1097
1098 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
1099
1100 PR c++/11614
1101 * decl.c (grokdeclarator): An array member is only a flexible
1102 array member if the field itself is the array.
1103
1104 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1105
1106 PR c++/10793
1107 * decl.c (xref_basetypes): Handle error_mark_node.
1108
1109 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
1110
1111 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1112 * tree.c (lvalue_p_1): Set it.
1113 * class.c (check_field): Don't allow non-packed non-POD fields to
1114 be packed.
1115 * call.c (reference_binding): Need a temporary for all bitfield
1116 and packed fields.
1117 (convert_like_real): Check it is ok to make a temporary here.
1118
1119 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
1120
1121 * cp-tree.h (hack_identifier): Remove.
1122 * method.c (hack_identifier): Remove.
1123 * semantics.c (finish_id_expression): Expand hack_identifier
1124 here. Simplify.
1125
1126 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1127
1128 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1129 semantics.c typeck.c: Remove unnecessary casts.
1130
1131 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
1132
1133 * cp-tree.h (hack_identifier): Remove.
1134 * method.c (hack_identifier): Remove.
1135 * semantics.c (finish_id_expression): Expand hack_identifier
1136 here. Simplify.
1137
1138 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
1139
1140 * cp-tree.h (finish_non_static_data_member): Add object param.
1141 * method.c (hack_identifier): Adjust.
1142 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1143 again for a FIELD_DECL.
1144 * semantics.c (finish_non_static_data_member): Add object
1145 parameter. Always save the DECL in the COMPONENT_REF.
1146 * call.c (resolve_scoped_fn_name): Adjust.
1147
1148 2003-07-17 Zack Weinberg <zack@codesourcery.com>
1149
1150 * pt.c (get_bindings): Make definition consistent with
1151 forward declaration.
1152
1153 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1154
1155 PR c++/7809
1156 * friend.c (add_friend): Check access for member functions
1157 and templates.
1158
1159 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
1160
1161 PR c++/10668
1162 * typeck.c (build_class_member_access_expr): Improve diagnostic.
1163
1164 2003-07-16 Mark Mitchell <mark@codesourcery.com>
1165
1166 PR c++/11547
1167 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1168 macro.
1169 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1170 * decl.c (duplicate_decls): Merge
1171 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1172 * parser.c (cp_parser_postfix_expression): Adjust call to
1173 cp_parser_initializer_list and
1174 cp_parser_parenthesized_expression_list.
1175 (cp_parser_parenthesized_expression_list): Add non_constant_p.
1176 (cp_parser_new_placement): Adjust call to
1177 cp_parser_parenthesized_expression_list.
1178 (cp_parser_direct_new_declarator): Likewise.
1179 (cp_parser_conditional_expression): Remove.
1180 (cp_parser_constant_expression): Parse an assignment-expression,
1181 not a conditional-expression.
1182 (cp_parser_simple_declaration): Resolve expression/declaration
1183 ambiguity more quickly.
1184 (cp_parser_mem_initializer): Adjust call to
1185 cp_parser_parenthesized_expression_list.
1186 (cp_parser_init_declarator): Keep track of whether or not the
1187 initializer is a constant-expression.
1188 (cp_parser_initializer): Add non_constant_p parameter.
1189 (cp_parser_initializer_clause): Likewise.
1190 (cp_parser_initializer_list): Likewise.
1191 (cp_parser_attribute_list): Adjust call to
1192 cp_parser_parenthesized_expression_list.
1193 (cp_parser_functional_cast): Likewise.
1194 * pt.c (tsubst_decl): Copy
1195 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1196 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1197 * semantics.c (finish_id_expression): Use
1198 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1199
1200 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
1201
1202 * lang-options.h: Remove.
1203
1204 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
1205
1206 PR c/10962
1207 * class.c (field_decl_cmp): Remove.
1208 (resort_field_decl_cmp): Remove.
1209 (resort_sorted_fields): Remove.
1210 (add_fields_to_vec): Rename to ...
1211 (add_fields_to_record_type): this.
1212 (finish_struct_1): Change to be using
1213 sorted_fields_type's fields.
1214 * cp-tree.h (lang_decl): In lang_decl_u3
1215 change sorted_fields to be a pointer to
1216 sorted_fields_type.
1217 (resort_sorted_fields): Remove prototype.
1218 * search.c (lookup_field_1): Change to be using
1219 sorted_fields_type's fields.
1220
1221 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1222
1223 PR c++/5421
1224 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1225 is a member of other class.
1226 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
1227 is a specialization of function template.
1228
1229 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1230
1231 PR c++/10903
1232 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
1233 Improve.
1234
1235 2003-07-15 Mark Mitchell <mark@codesourcery.com>
1236
1237 * cp-tree.def (LOOKUP_EXPR): Remove.
1238 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
1239 (LOOKUP_EXPR_GLOBAL): Remove.
1240 (get_bindings): Remove.
1241 (is_aggr_type_2): Remove.
1242 * call.c (resolved_scoped_fn_name): Remove support for
1243 LOOKUP_EXPR.
1244 * decl.c (grokfndecl): Likewise.
1245 (grokdeclarator): Likewise.
1246 * error.c (dump_decl): Likewise.
1247 (dump_expr): Likewise.
1248 * friend.c (do_friend): Likewise.
1249 * init.c (build_offset_ref): Likewise.
1250 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
1251 LOOKUP_EXPRs
1252 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
1253 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
1254 test.
1255 * pt.c (get_bindings): Give it internal linkage.
1256 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
1257 (lookup_template_function): Likewise.
1258 (for_each_tempalte_parm_r): Likewise.
1259 (tsubst_decl): Likewise.
1260 (tsubst_qualified_id): Handle template template parameters.
1261 (tsubst_copy): Remove support for LOOKUP_EXPR.
1262 (tsubst_copy_and_build): Likewise.
1263 (most_general_template): Likewise.
1264 (value_dependent_expression_p): Likewise.
1265 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
1266 always dependent.
1267 * semantics.c (perform_koenig_lookup): Do not create
1268 IDENTIFIER_NODEs.
1269 (finish_fname): Likewise.
1270 (finish_id_expression): Likewise.
1271 * tree.c (is_aggr_type_2): Remove.
1272
1273 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1274
1275 PR c++/11531
1276 * typeck.c (check_return_expr): Fix thinko in diagnostic.
1277
1278 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1279
1280 PR c++/10108
1281 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
1282 error_mark_node.
1283
1284 2003-07-14 Mark Mitchell <mark@codesourcery.com>
1285
1286 PR c++/11509
1287 * pt.c (dependent_scope_ref_p): New function.
1288 (value_dependent_expression_p): Use it.
1289 (type_dependent_expression_p): Likewise.
1290
1291 * pt.c (tsubst_friend_function): Use reregister_specialization.
1292
1293 PR c++/7019
1294 * cp-tree.h (lookup_qualified_name): Adjust prototype.
1295 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
1296 call to is_aggr_type.
1297 * parser.c (cp_parser_lookup_name): Adjust call to
1298 lookup_qualified_name.
1299 * pt.c (tsubst_qualified_id): Likewise.
1300 (tsubst_copy_and_build): Likewise.
1301 * semantics.c (finish_qualified_id_expr): Deal with erroneous
1302 expressions.
1303
1304 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1305
1306 PR c++/11510
1307 * call.c (op_error): Properly format REALPART_EXPR and
1308 IMAGPART_EXPR.
1309 * error.c (dump_expr): Likewise.
1310
1311 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1312
1313 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
1314
1315 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1316
1317 PR c++/5293
1318 * call.c (initialize_reference): Improve diagnostic.
1319
1320 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1321
1322 PR c++/11154
1323 * pt.c (more_specialized_class): Add full_args parameter.
1324 (most_specialized_class): Adjust calls to more_specialized_class.
1325 * cp-tree.h (more_specialized_class): Adjust declaration.
1326
1327 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
1328
1329 * lex.c (enum tree_node_kind): Delete.
1330
1331 2003-07-13 Mark Mitchell <mark@codesourcery.com>
1332
1333 PR c++/11503
1334 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
1335 (SET_DECL_SELF_REFERENCE_P): Likewise.
1336 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
1337 * pt.c (tsubst_decl): Copy it.
1338 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
1339
1340 * pt.c (reregister_specialization): Fix thinko in previous change.
1341
1342 * cp-tree.h (cp_id_kind): New type.
1343 (unqualified_name_lookup_error): Change prototype.
1344 (unqualified_fn_lookup_error): New function.
1345 (do_identifier): Remove.
1346 (do_scoped_id): Likewise.
1347 (tsubst_copy_and_build): Change prototype.
1348 (reregister_specialization): New function.
1349 (perform_koenig_lookup): Likewise.
1350 (finish_id_expression): Likewise.
1351 * call.c (build_method_call): Adjust call to
1352 unqualified_name_lookup_error.
1353 * decl.c (duplicate_decls): Use reregister_specialization.
1354 * lex.c (is_global): Remove.
1355 (unqualified_name_lookup_error): Return a value.
1356 (do_identifier): Remove.
1357 (do_scoped_id): Likewise.
1358 (identifier_typedecl_value): Remove.
1359 (unqualified_fn_lookup_error): New function.
1360 * parser.c (cp_parser_id_kind): Remove.
1361 (cp_parser_non_constant_id_expression): Remove.
1362 (cp_parser_primary_expression): Use finish_id_expression.
1363 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
1364 cp_parser_id_kind.
1365 (cp_parser_postfix_expression): Use perform_koenig_lookup.
1366 (cp_parser_template_argument): Use cp_id_kind.
1367 (cp_parser_fold_non_dependent_expr): Adjust call to
1368 tsubst_copy_and_build.
1369 * pt.c (unregister_specialization): Rename to ...
1370 (reregister_specialization): This.
1371 (tsubst_friend_function): Use it.
1372 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
1373 (tsubst_qualified_id): Likewise.
1374 (tsubst_expr): Likewise.
1375 (tsubst_copy_and_build): Add function_p parameter. Use
1376 finish_id_expression. Introduce RECUR macro.
1377 (tsubst_non_call_postfix_expression): New function.
1378 (regenerate_decl_from_template): Use reregister_specialization.
1379 * semantics.c (perform_koenig_lookup): New function.
1380 (finish_id_expression): Likewise.
1381
1382 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1383
1384 * pt.c (push_access_scope_real): Remove.
1385 (push_access_scope): Move code from push_access_scope_real.
1386 (pop_access_scope): Don't check for TEMPLATE_DECL.
1387 (instantiate_template): Defer access checking during template
1388 substitution.
1389 (regenerate_decl_from_template): Tidy.
1390
1391 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
1392
1393 PR c++/11437
1394 * operators.def: Add definitions for __imag__, __real__.
1395
1396 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
1397
1398 PR c++/11050
1399 * parser.c (cp_parser_expression_list): Rename to ...
1400 (cp_parser_parenthesized_expression_list): ... here. Add attribute
1401 parameter, parse the surounding parentheses.
1402 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
1403 parameters. Return int.
1404 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
1405 (cp_parser_postfix_expression): Adjust function call parsing.
1406 (cp_parser_new_placement): Adjust.
1407 (cp_parser_new_initializer): Likewise.
1408 (cp_parser_cast_expression): Likewise.
1409 (cp_parser_selection_statement): Likewise.
1410 (cp_parser_mem_initializer): Likewise.
1411 (cp_parser_asm_definition): Likewise.
1412 (cp_parser_init_declarator): Likewise.
1413 (cp_parser_declarator): Make
1414 cdtor_or_conv_p an int ptr.
1415 (cp_parser_direct_declarator): Likewise. Check for a parameter
1416 list on cdtors & conv functions.
1417 (cp_parser_initializer): Adjust.
1418 (cp_parser_member_declaration): Adjust.
1419 (cp_parser_attribute_list): Move code into
1420 cp_parser_parens_expression_list.
1421 (cp_parser_functional_cast): Adjust.
1422 * pt.c (type_dependent_expression_p): Erroneous expressions are
1423 non-dependent.
1424
1425 2003-07-11 Geoffrey Keating <geoffk@apple.com>
1426
1427 * decl.c (cp_finish_decl): Handle 'used' attribute.
1428
1429 * cp-lang.c (c_reset_state): New dummy routine.
1430 * cp-tree.h (finish_file): Move prototype to c-common.h.
1431 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
1432
1433 2003-07-11 Mark Mitchell <mark@codesourcery.com>
1434
1435 PR c++/8327
1436 * pt.c (tsubst_qualified_id): Implement suggested resolution for
1437 Core Issue 2.
1438 (type_dependent_expression_p): Likewise.
1439
1440 2003-07-10 Mark Mitchell <mark@codesourcery.com>
1441
1442 * typeck.c (build_binary_op): Do not warn about signed
1443 vs. unsigned comparisons in the bodies of templates.
1444
1445 PR c++/9411
1446 * parser.c (cp_parser_postfix_expression): Check dependency of
1447 functions.
1448
1449 2003-07-09 Mark Mitchell <mark@codesourcery.com>
1450
1451 PR c++/10032
1452 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
1453 still errors.
1454
1455 PR c++/10527
1456 * error.c (decl_to_string): Do not print default argument
1457 expressions.
1458
1459 * cp-tree.h (break_out_calls): Remove declaration.
1460 * tree.c (break_out_calls): Remove.
1461 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
1462
1463 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
1464
1465 PR c++ 9483
1466 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
1467 * decl2.c (constructor_name_p): Avoid repeated constructor_name
1468 calls.
1469 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
1470
1471 2003-07-09 Mark Mitchell <mark@codesourcery.com>
1472
1473 * typeck.c (build_x_unary_op): Take note of the fact that
1474 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
1475 trees.
1476
1477 * parser.c (cp_parser_primary_expression): Preserve the form of
1478 qualified expressions in templates, even if they are not
1479 dependent.
1480 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
1481 (tsubst_qualified_id): Likewise.
1482 * search.c (accessible_p): Treat everything in the body of a
1483 template as accessible.
1484
1485 2003-07-08 Mark Mitchell <mark@codesourcery.com>
1486
1487 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
1488 * cp-tree.h (build_call_from_tree): Remove.
1489 (build_member_call): Likewise.
1490 (dependent_template_arg_p): Remove.
1491 (any_dependent_template_arguments_p): New function.
1492 (dependent_template_id_p): Likewise.
1493 (any_type_dependent_arguments_p): Likewise.
1494 (build_non_dependent_expr): Likewise.
1495 (build_non_dependent_args): Likewise.
1496 (build_x_compound_expr): Adjust prototype.
1497 * call.c (build_new_method_call): Handle non-dependent expressions
1498 correctly.
1499 * decl2.c (grok_array_decl): Likewise.
1500 (build_offset_ref_call_from_tree): Likewise.
1501 (build_call_from_tree): Remove.
1502 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
1503 (dump_expr): Likewise.
1504 * init.c (build_member_call): Remove.
1505 * mangle.c (write_expression): Update handling for template-ids.
1506 * parser.c (cp_parser_primary_expression): Use
1507 any_dependent_template_arguments_p. Update constant-expression
1508 handling.
1509 (cp_parser_postfix_expression): Use
1510 any_type_dependent_arguments_p. Simplify call processing.
1511 (cp_parser_unary_expression): Simplify.
1512 (cp_parser_expression): Adjust for changes to
1513 build_x_compound_expr.
1514 (cp_parser_template_argument): Implement standard-conforming
1515 parsing of non-type template arguments.
1516 (cp_parser_direct_declarator): Use
1517 cp_parser_fold_non_dependent_expr.
1518 (cp_parser_fold_non_dependent_expr): New function.
1519 (cp_parser_next_token_ends_template_argument_p): Likewise.
1520 * pt.c (convert_template_argument): Do not call
1521 maybe_fold_nontype_arg.
1522 (tsubst_baselink): Likewise.
1523 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
1524 processing work correctly for non-dependent expressions. Adjust
1525 handling of COMPOUND_EXPR. Simplify call processing.
1526 (value_dependent_expression_p): Deal with functional casts and
1527 sizeof/alignof correctly.
1528 (type_dependent_expression_p): Handle overloaded functions.
1529 (any_type_dependent_arguments_p): New function.
1530 (any_dependent_template_arguments_p): Likewise.
1531 (dependent_template_p): Treat SCOPE_REFs as dependent.
1532 (dependent_template_id_p): Simplify.
1533 (build_non_dependent_expr): New function.
1534 (build_non_dependent_args): Likewise.
1535 * semantics.c (finish_stmt_expr): Don't make dependent
1536 statement-expresions have void type.
1537 (finish_call_expr): Handle non-dependent expressions
1538 correctly.
1539 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
1540 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
1541 type size_t, even in templates.
1542 (expr_sizeof): Likewise.
1543 (finish_class_member_access_expr): Handle non-dependent expressions
1544 correctly.
1545 (build_x_indirect_ref): Likewise.
1546 (build_x_binary_op): Likewise.
1547 (build_x_unary_op): Likewise.
1548 (build_x_conditional_expr): Likewise.
1549 (build_x_compound_expr): Likewise.
1550 * typeck2.c (build_x_arrow): Likewise.
1551
1552 Wed Jul 9 02:28:39 CEST 2003 Jan Hubicka <jh@suse.cz>
1553
1554 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
1555 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
1556 (start_function): Use DECL_ESTIMATED_INSNS.
1557 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
1558
1559 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
1560 unit-at-a-time
1561
1562 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1563
1564 PR c++/11030
1565 * pt.c (instantiate_class_template): Don't call xref_tag to
1566 inject name when the friend class is a specialization.
1567
1568 2003-07-07 Mark Mitchell <mark@codesourcery.com>
1569
1570 * cp-tree.h (build_scoped_method_call): Remove.
1571 (lookup_qualified_name): Remove parameter.
1572 (tsubst_copy_and_build): Declare.
1573 (finish_qualified_object_call_expr): Remove.
1574 (check_accessibility_of_qualified_id): New function.
1575 (finish_qualified_id_expr): Likewise.
1576 (non_reference): Likewise.
1577 (build_expr_from-tree): Remove.
1578 * call.c (non_reference): Remove.
1579 (build_scoped_method_call): Likewise.
1580 (build_method_call): Use error_operand_p. Assert that we are not
1581 processing a template.
1582 (standard_conversion): Use non_reference.
1583 * class.c (build_vtbl_entry_ref): Likewise.
1584 (build_vtbl_ref_1): Likewise.
1585 * cvt.c (build_expr_type_conversion): Use non_reference.
1586 * decl.c (lookup_qualified_name): Remove flags parameter.
1587 (grok_op_properties): Use non_reference.
1588 * decl2.c (grok_array_decl): Likewise.
1589 (build_expr_from_tree): Remove.
1590 (build_offset_ref_call_from_tree): Update comment.
1591 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
1592 * except.c (prepare_eh_types): Use non_reference.
1593 (can_convert_eh): Likewise.
1594 * init.c (build_dtor_call): Avoid using build_method_call.
1595 * mangle.c (write_template_param): Remove misleading comment.
1596 * method.c (locate_copy): Use non_reference.
1597 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
1598 (cp_parser_primary_expression): Do not create SCOPE_REFs is
1599 non-dependent contexts.
1600 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
1601 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
1602 build_expr_from_tree.
1603 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
1604 Use check_accessibility_of_qualified_id.
1605 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
1606 build_expr_from_tree.
1607 (tsubst_baselink): New function.
1608 (tsubst_qualified_id): Likewise.
1609 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
1610 (tsubst_expr): Adjust call to lookup_qualified_name.
1611 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
1612 handling of CALL_EXPRs.
1613 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
1614 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
1615 * search.c (check_final_overrider): Likewise.
1616 * semantics.c (check_accessibility_of_qualified_id): New function.
1617 (finish_qualified_object_call_expr): Remove.
1618 * typeck.c (target_type): Use non_reference.
1619 (cxx_sizeof_or_alignof_type): Likewise.
1620 (dubious_conversion_warnings): Likewise.
1621 (convert_for_initialization): Likewise.
1622 (non_reference): New function.
1623
1624 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1625
1626 * decl.c (print_binding_level, print_other_binding_stack,
1627 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
1628 stdio calls.
1629 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
1630
1631 2003-07-07 Andreas Jaeger <aj@suse.de>
1632
1633 * friend.c: Convert to ISO C90 prototypes.
1634
1635 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
1636 language.
1637 * cfns.h: Regenerate.
1638
1639 * typeck.c: Convert remaining prototypes to ISO C90.
1640 * search.c: Likewise.
1641
1642 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
1643 * semantics.c (expand_or_defer_fn): Likewise
1644 * mangle.c (discriminator_for_string_literal): Likewise.
1645 * g++spec.c (lang_specific_driver): Likewise.
1646
1647 * search.c (lookup_base_r): Remove unused variable.
1648
1649 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
1650
1651 * semantics.c: (genrtl_try_block) Adjust emit_line_note
1652 calls.
1653
1654 2003-07-07 Andreas Jaeger <aj@suse.de>
1655
1656 * search.c (lookup_base_r): Remove unused variable.
1657
1658 2003-07-06 Michael Chastain <mec@shout.net>
1659
1660 PR debug/10055
1661 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
1662 assigning to input_filename directly.
1663
1664 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
1665
1666 * call.c: Fix comment formatting.
1667 * class.c: Likewise.
1668 * cp-tree.h: Likewise.
1669 * decl.c: Likewise.
1670 * decl2.c: Likewise.
1671 * error.c: Likewise.
1672 * method.c: Likewise.
1673 * name-lookup.c: Likewise.
1674 * parser.c: Likewise.
1675 * pt.c: Likewise.
1676 * rtti.c: Likewise.
1677 * search.c: Likewise.
1678 * typeck.c: Likewise.
1679
1680 2003-07-06 Mark Mitchell <mark@codesourcery.com>
1681
1682 PR c++/11345
1683 * search.c (lookup_base_r): Remove is_non_public and
1684 within_current_scope parameters. Remove other dead code.
1685 (lookup_base): Adjust call to lookup_base_r.
1686 (adjust_result_of_qualified_name_lookup): Improve comment.
1687 * semantics.c (finish_call_expr): Use maybe_dummy_object.
1688
1689 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
1690
1691 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
1692 LANG_HOOKS_MISSING_ARGUMENT): Override.
1693
1694 2003-07-05 Mark Mitchell <mark@codesourcery.com>
1695
1696 PR c++/11431
1697 * typeck.c (build_static_cast): Check for reference conversions
1698 earlier.
1699
1700 2003-07-04 Mark Mitchell <mark@codesourcery.com>
1701
1702 * cp-tree.h (perform_integral_promotions): Declare.
1703 * call.c (build_addr_func): Use decay_conversion.
1704 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
1705 (convert_for_arg_passing): Use perform_integral_promotions.
1706 * cvt.c (build_expr_type_conversion): Use decay_conversion.
1707 (type_promotes_to): Do not return a cv-qualified type.
1708 * decl.c (grok_reference_init): Fix formatting.
1709 (get_atexit_node): Use decay_conversion.
1710 (build_enumerator): Use perform_integral_promotions.
1711 * init.c (build_vec_init): Use decay_conversion.
1712 * semantics.c (finish_expr_stmt): Likewise.
1713 (finish_switch_cond): Use perform_integral_promotions.
1714 * typeck.c (default_conversion): Likewise.
1715 (perform_integral_promotions): New function.
1716 (build_indirect_ref): Use decay_conversion.
1717 (build_array_ref): Use perform_integral_promotions.
1718 (convert_arguments): Use decay_conversion.
1719 (build_unary_op): Use perform_integral_promotions.
1720 (build_c_cast): Use decay_conversion.
1721 (build_modify_expr): Likewise.
1722 (convert_for_initialization): Likewise.
1723 * typeck2.c (build_x_arrow): Likewise.
1724
1725 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
1726
1727 * call.c: Fix comment typos.
1728 * class.c: Likewise.
1729 * cp-tree.h: Likewise.
1730 * cvt.c: Likewise.
1731 * decl2.c: Likewise.
1732 * decl.c: Likewise.
1733 * init.c: Likewise.
1734 * mangle.c: Likewise.
1735 * parser.c: Likewise.
1736 * pt.c: Likewise.
1737 * search.c: Likewise.
1738 * semantics.c: Likewise.
1739 * tree.c: Likewise.
1740 * typeck.c: Likewise.
1741
1742 2003-07-04 Zack Weinberg <zack@codesourcery.com>
1743
1744 * parser.c (cp_lexer_read_token): No need to handle string
1745 constant concatenation.
1746
1747 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1748
1749 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
1750 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
1751 ATTRIBUTE_GCC_CXXDIAG.
1752
1753 2003-07-03 Mark Mitchell <mark@codesourcery.com>
1754
1755 * call.c (build_addr_func): Handle bound pointers-to-members.
1756 (build_method_call): Do not call resolve_offset_ref.
1757 (implicit_conversion): Likewise.
1758 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
1759 resolve_offset_ref.
1760 (resolve_args): Do not call resolve_offset_ref.
1761 (build_conditional_expr): Likewise.
1762 (build_new_method_call): Likewise.
1763 * cp-tree.def (OFFSET_REF): Update documentation.
1764 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
1765 pointers to members to pointers.
1766 (ocp_convert): Do not call resolve_offset_ref.
1767 (convert_to_void): Likewise.
1768 (build_expr_type_conversion): Likewise.
1769 * decl2.c (delete_sanity): Likewise.
1770 * init.c (resolve_offset_ref): Simplify greatly.
1771 (build_vec_delete): Do not call resolve_offset_ref.
1772 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
1773 if appropriate.
1774 (cp_parser_unary_expression): Use
1775 cp_parser_simple_cast_expression.
1776 (cp_parser_delete_expression): Likewise.
1777 (cp_parser_cast_expression): Likewise.
1778 (cp_parser_pm_expression): Use cp_parser_binary_op.
1779 (cp_parser_simple_cast_expression): New function.
1780 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
1781 * semantics.c (finish_increment_expr): Likewise.
1782 (finish_typeof): Likewise.
1783 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
1784 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
1785 (decay_conversion): Do not call resolve_offset_ref.
1786 (finish_class_member_access_expr): Likewise.
1787 (convert_arguments): Likewise.
1788 (build_x_binary_op): Handle DOTSTAR_EXPR.
1789 (condition_conversion): Do not call resolve_offset_ref.
1790 (unary_complex_lvalue): Likewise.
1791 (build_static_cast): Likewise.
1792 (build_reinterpret_cast): Likewise.
1793 (build_const_cast): Likewise.
1794 (build_c_cast): Likewise.
1795 (build_modify_expr): Likewise.
1796 (convert_for_assignment): Likewise.
1797 (convert_for_initialization): Likewise.
1798 * typeck2.c (build_x_arrow): Likewise.
1799 (build_m_component_ref): Simplify.
1800
1801 * call.c (build_scoped_method_call): Use convert_to_void.
1802 (build_method_call): Likewise.
1803 * class.c (check_field_decls): Remove dead code.
1804 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
1805 * decl2.c (grok_array_decl): Remove dead code.
1806 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1807 as pointer-to-member representation.
1808 * init.c (build_offset_ref): Tidy.
1809 (build_vec_delete_1): Use convert_to_void.
1810 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1811 as pointer-to-member representation.
1812
1813 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
1814
1815 PR c++/9162
1816 * decl.c (grokdeclarator): Return friend decls, not
1817 void_type_node.
1818 * decl2.c (grokfield): Alter friend decl check.
1819 * parser.c (struct cp_parser): Document default_arg chain on
1820 unparsed_functions_queue.
1821 (cp_parser_save_default_args): New.
1822 (cp_parser_init_declarator, cp_parser_function_definition,
1823 cp_parser_member_declaration): Call it.
1824 (cp_parser_class_specifier): Remove unused variable. Alter
1825 processing of unparsed_functions_queue.
1826
1827 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1828
1829 * class.c (add_method, check_field_decl): Fix format specifier.
1830 * decl.c (duplicate_decls, pushdecl, check_goto,
1831 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
1832 start_enum): Likewise.
1833 * decl2.c (ambiguous_decl): Likewise.
1834 * pt.c (redeclare_class_template): Likewise.
1835
1836 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
1837
1838 PR c++/10219
1839 * pt.c (type_unification_real): Don't unify exprs of error type.
1840 * tree.c (error_type): Don't die on error_type.
1841
1842 PR c++/9779
1843 * decl2.c (arg_assoc_class): Don't die on NULL type.
1844 * typeck.c (type_unknown_p): Don't die on untyped expressions.
1845
1846 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1847
1848 PR c++/6949
1849 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
1850 classes.
1851
1852 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1853
1854 * error.c (locate_error): %P takes an `int', not a `tree'.
1855
1856 Wed Jul 2 00:36:48 CEST 2003 Jan Hubicka <jh@suse.cz>
1857
1858 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
1859 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
1860 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
1861 massaging.
1862
1863 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
1864 (expand_or_defer_fn): Declare.
1865 (lower_function): Declare.
1866 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
1867 * decl2.c: Include cgraph.h and varpool.h
1868 (maybe_emit_vtables): Make explicit instantations as needed.
1869 (mark_member_pointers, lower_function): New functions.
1870 (finish_file): Do unit-at-a-time.
1871 * method.c (synthesize_method): Use expand_or_defer_fn.
1872 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
1873 * parser.c (cp_parser_function_definition_after_decl): Use
1874 expand_or_defer_fn.
1875 * pt.c (instantiate_decl): Likewise.
1876 * semantics.c: Include cgraph.h
1877 (expand_or_defer_fn): Break out from ...
1878 (expand_body): ... here; deal with unit-at-a-time.
1879 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
1880 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
1881
1882 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1883
1884 * call.c (resolve_scoped_fn_name): Return error_mark_node for
1885 erroneous cases.
1886
1887 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1888
1889 PR c++/11149
1890 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
1891 is a class type.
1892
1893 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
1894
1895 PR c++/8046
1896 * error.c (dump_decl): Handle BIT_NOT_EXPR as
1897 pseudo destructor calls.
1898
1899 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
1900
1901 * cp-tree.h (define_label): Replace filename and lineno
1902 arguments with a location_t.
1903 * decl.c (pop_label): Adjust define_label call.
1904 (define_label): Replace filename and lineno arguments with a
1905 location_t.
1906 * semantics.c (finish_label): Adjust define_label call.
1907
1908 2003-07-01 Mark Mitchell <mark@codesourcery.com>
1909
1910 PR c++/9559
1911 * decl2.c (grokfield): Do not build NOP_EXPRs around the
1912 error_mark_node.
1913
1914 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
1915
1916 * Make-lang.in: Update.
1917 * cp-lang.c (c_language): Define.
1918 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
1919 * cp-tree.h (cxx_init_options): Remove.
1920 * lex.c: Don't include diagnostic.h.
1921 (cxx_init_options): Remove.
1922
1923 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1924
1925 PR c++/4933
1926 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
1927 tree generated within a template. Use dump_expr to dump an
1928 expression sizeof.
1929
1930 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1931
1932 * mangle.c (write_expression): Exit gracefully when trying to
1933 mangle a CALL_EXPR.
1934
1935 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1936
1937 PR c++/10750
1938 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
1939 (value- or type-) dependent expression as DECL_INITIAL is a
1940 valid constant-expression (at parser time).
1941
1942 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
1943
1944 PR c++/11106
1945 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
1946 USING_DECL, instead of print_tree_identifier.
1947
1948 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1949
1950 * cp-tree.h (language_to_string): Adjust declaration.
1951 * dump.c (cp_dump_tree): Adjust usage.
1952 * error.c (dump_char): Use output_formatted_scalar. Tidy.
1953 (parm_to_string): Lose unused parameter. Tidy.
1954 (expr_to_string): Likewise.
1955 (code_to_string): Likewise.
1956 (language_to_string): Likewise.
1957 (op_to_string): Likewise.
1958 (assop_to_string): Likewise.
1959 (digit_buffer): Remove.
1960 (dump_type): Format builtin vector type as __vector__.
1961
1962 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1963
1964 * error.c (print_integer): Remove.
1965 (dump_type_suffix): Adjust.
1966 (dump_expr): Likewise.
1967
1968 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
1969
1970 * error.c (print_instantiation_partial_context): Take a
1971 location_t.
1972 (print_instantiation_full_context): Adjust.
1973 (print_instantiation_context): Adjust.
1974
1975 * cp-tree.h (cp_line_of, cp_file_of): Remove.
1976 * error.c (cp_line_of, cp_file_of): Merge into ...
1977 (location_of): ... here. Make static, return a location_t.
1978 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
1979
1980 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
1981
1982 PR c++/10784
1983 * call.c (joust): Move warn_conversion check outwards.
1984
1985 2003-06-27 Zack Weinberg <zack@codesourcery.com>
1986
1987 * decl.c (build_typename_type)
1988 * mangle.c (write_template_template_arg)
1989 * parser.c (cp_parser_scope_through_which_access_occurs)
1990 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
1991 * repo.c (get_base_filename)
1992 * semantics.c (maybe_convert_cond):
1993 Mark the definition static, matching the forward declaration.
1994
1995 2003-06-27 Mark Mitchell <mark@codesourcery.com>
1996
1997 PR c++/10468
1998 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
1999
2000 2003-06-27 Mark Mitchell <mark@codesourcery.com>
2001
2002 PR c++/10796
2003 * decl.c (finish_enum): Implement DR377.
2004
2005 * decl.c (cp_finish_decl): Don't make variables with reference
2006 type readonly while they are being initialized.
2007
2008 2003-06-26 Mark Mitchell <mark@codesourcery.com>
2009
2010 PR c++/11332
2011 * typeck.c (build_static_cast): Avoid returning expressions with
2012 reference type.
2013
2014 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
2015
2016 * call.c (build_op_delete_call): Use strip_array_call. Correct
2017 error message to say 'delete' or 'delete[]'.
2018
2019 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
2020
2021 PR c++/8266
2022 * pt.c (check_explicit_specialization): When looking up a
2023 template function from an identifier outside class-scope, bind
2024 it to CP_DECL_CONTEXT.
2025
2026 2003-06-25 Mark Mitchell <mark@codesourcery.com>
2027
2028 PR c++/10990
2029 * search.c (lookup_base_r): Rely on accessible_p, rather than
2030 trying to emulate that logic here.
2031
2032 PR c++/10931
2033 * call.c (convert_like): Pass issue_conversion_warnings.
2034 (convert_like_with_context): Likewise.
2035 (convert_like_real): Add issue_conversion_warnings parameter.
2036 (perform_direct_initialization_if_possible): New function.
2037 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2038 * typeck.c (check_for_casting_away_constness): New function.
2039 (build_static_cast): Rewrite.
2040
2041 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
2042
2043 * call.c (enforce_access): Assert we get a binfo.
2044 (build_op_delete_call): Pass a binfo to
2045 perform_or_defer_access_check.
2046 * class.c (alter_access): Likewise.
2047 * decl.c (make_typename_type): Likewise.
2048 (make_unbound_class_template): Likewise.
2049 * lex.c (do_identifier): Likewise.
2050 * method.c (hack_identifier): Likewise.
2051 * parser.c (cp_parser_lookup_name): Likewise.
2052 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2053 test.
2054 * semantics.c (finish_non_static_data_member): Likewise.
2055 (perform_or_defer_access_check): Expect a binfo.
2056 * typeck.c (comptypes): Expect types.
2057
2058 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2059 * friend.c (make_friend_class): Likewise.
2060 * pt.c (check_default_tmpl_args): Likewise.
2061 (lookup_template_class): Likewise.
2062
2063 Tue Jun 24 15:30:05 CEST 2003 Jan Hubicka <jh@suse.cz>
2064
2065 * method.c (thunk_labelno): Move outside ifdef block to make garbage
2066 collector happy.
2067
2068 Tue Jun 24 13:52:34 CEST 2003 Jan Hubicka <jh@suse.cz>
2069
2070 * class.c (build_vtable): Make vtables.
2071 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2072 * decl2.c (output_vtable_inherit): Rename to ...
2073 (prepare_assemble_variable): ... this one; change interface.
2074 (maybe_emit_vtables): Do not call output_vtable_inherit.
2075 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2076 * cp-tree.h (prepare_assemble_variable): New.
2077
2078 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
2079
2080 * method.c: add prototype for make_alias_for_thunk.
2081 (thunk_labelno, make_alias_for_thunk): only define
2082 if ASM_OUTPUT_DEF is defined.
2083
2084 2003-06-23 Jakub Jelinek <jakub@redhat.com>
2085
2086 * method.c (thunk_labelno): New variable.
2087 (make_alias_for_thunk): New function.
2088 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
2089 into the same section as the function it is calling.
2090 Include gt-cp-method.h.
2091 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2092 (cp/method.o): Depend on gt-cp-method.h.
2093 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2094
2095 Mon Jun 23 19:41:27 CEST 2003 Jan Hubicka <jh@suse.cz>
2096
2097 * decl.c (register_dtor_fn): Mark cleanup as used.
2098 * decl2.c (mark_vtable_entries): Skip nops.
2099 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2100 (build_dynamic_cast_1): Likewise.
2101 (tinfo_base_init): Likewise.
2102 (emit_tinfo_decl): Likewise.
2103
2104 2003-06-23 Jakub Jelinek <jakub@redhat.com>
2105
2106 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2107 to it.
2108
2109 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2110
2111 PR c++/10784
2112 * call.c (joust): Warn about choosing conversion sequence only if
2113 -Wconversion.
2114
2115 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2116
2117 PR c++/10864
2118 * call.c (op_error): Tidy.
2119 * error.c (dump_expr): Properly format 'T()' when T is an
2120 aggregate type.
2121
2122 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2123
2124 PR c++/10915
2125 * decl.c (grok_op_properties): Warn possible confusing conversion
2126 only if -Wconversion.
2127
2128 2003-06-20 Mark Mitchell <mark@codesourcery.com>
2129
2130 PR c++/10749
2131 * parser.c (cp_parser_class_head): See through dependent names
2132 when parsing a class-head.
2133
2134 PR c++/10845
2135 * pt.c (try_class_unification): Correct handling of member class
2136 templates.
2137
2138 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
2139
2140 * semantics.c (genrtl_finish_function): Adjust
2141 expand_function_end call.
2142
2143 2003-06-19 Mark Mitchell <mark@codesourcery.com>
2144
2145 PR c++/10939
2146 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2147 functions.
2148 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2149
2150 PR c++/9649
2151 * cp-tree.h (pushdecl_class_level): Change prototype.
2152 (push_class_level_binding): Likewise.
2153 * decl.c (add_binding): Reject duplicate static data members.
2154 (pushdecl_class_level): Return a value indicating whether or not
2155 the binding was valid.
2156 (push_class_level_binding): Likewise.
2157 * semantics.c (finish_member_declaration): Don't keep invalid
2158 declarations.
2159
2160 PR c++/11041
2161 * call.c (initialize_reference): Do not use cp_finish_decl to emit
2162 temporary variables.
2163 * cp-tree.h (static_aggregates): Declare.
2164 (pushdecl_top_level_and_finish): Likewise.
2165 * decl.c (pushdecl_top_level_1): New function.
2166 (pushdecl_top_level): Use it.
2167 (pushdecl_top_level_and_finish): New function.
2168 (initialize_local_var): Remove redundant code.
2169 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
2170 building_stmt_tree.
2171 * decl.h (static_aggregates): Remove.
2172 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2173 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2174 (tinfo_base_init): Likewise.
2175
2176 2003-06-19 Matt Austern <austern@apple.com>
2177
2178 PR c++/11228
2179 * init.c (build_zero_init): Assert that number of array elements
2180 is an integer constant.
2181 (build_default_init) Don't use build_zero_init for arrays with
2182 variable number of elements.
2183
2184 2003-06-19 Andreas Jaeger <aj@suse.de>
2185
2186 * cp-tree.h: Remove duplicated declarations.
2187
2188 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
2189
2190 * pt.c: Convert to ISO C.
2191 * semantics.c: Convert to ISO C.
2192
2193 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
2194
2195 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2196 at_least_as_qualified_p, more_qualified_p): Return bool.
2197 * typeck.c: ANSIFY function definitions.
2198 (comp_array_types): Take redeclaration bool parameter.
2199 (comptypes): Rearrange STRICT handling.
2200 (at_least_as_qualified_p, more_qualified_p,
2201 comp_cv_qualification): Cache cv quals.
2202 (compparms): Rearrange loop.
2203
2204 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
2205
2206 * cp-tree.h (COMPARE_RELAXED): Rename to ...
2207 (COMPARE_DERIVED): ... here. Adjust comment.
2208 (resolve_typename_type_in_current_instantiation): Remove.
2209 (cp_tree_equal, comptypes): Return a bool.
2210 * cvt.c (convert_to_reference): Adjust comptypes call.
2211 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2212 (resolve_typename_type_in_current_instantiation): Remove.
2213 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2214 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2215 calls. Refactor code.
2216 * typeck.c (comp_array_types): Return bool. Lose callback.
2217 parameter. Adjust cp_tree_equal calls.
2218 (comptypes): Return bool. Adjust strict handling. Remove relaxed
2219 enumeration and java type handling. Deal with typename types here.
2220 Adjust recursive and cp_tree_equals calls. Adjust base and derived
2221 checking.
2222 (comp_target_types): Remove unreachable code. Adjust
2223 same_or_base_type_p calls.
2224 (ptr_reasonably_similar): Adjust base and derived check.
2225
2226 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
2227 unused calculation.
2228 (check_return_expr): Adjust error messages.
2229 * cp-tree.def (SCOPE_REF): Correct comment.
2230
2231 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2232
2233 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2234 string again.
2235
2236 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
2237
2238 * optimize.c (dump_function): Form complete flag name by
2239 prefixing 'fdump-' to string returned by dump_flag_name().
2240
2241 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2242
2243 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2244 string.
2245
2246 2003-06-17 Jason Merrill <jason@redhat.com>
2247
2248 PR c++/10929
2249 * decl.c (grokfndecl): Don't mark a function inline for
2250 -finline-functions if it isn't defined.
2251
2252 2003-06-17 Mark Mitchell <mark@codesourcery.com>
2253
2254 PR c++/10712
2255 * class.c (handle_using_decl): Robustify.
2256
2257 PR c++/11105
2258 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
2259 * mangle.c (struct globals): Remove internal_mangling_p.
2260 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
2261 (write_template_parm): Don't write out the level number.
2262 (conv_type_names): New variable.
2263 (hash_type): New function.
2264 (compare_type): Likewise.
2265 (mangle_conv_op_name_for_type): Don't try to mangle conversion
2266 operator names.
2267 * search.c (lookup_conversion_operator): New function.
2268 (lookup_fnfields_1): Use it.
2269
2270 2003-06-17 Andreas Jaeger <aj@suse.de>
2271
2272 * except.c: Remove duplicate declaration of push_eh_cleanup.
2273
2274 * call.c: Remove extra declaration of inhibit_warnings.
2275
2276 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2277
2278 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
2279 * mangle.c: Convert to ISO C.
2280
2281 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2282
2283 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
2284 macro.
2285
2286 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
2287
2288 * tree.c: Convert to ISO C.
2289
2290 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
2291
2292 * cp-tree.h: Follow spelling conventions.
2293 * mangle.c: Likewise.
2294 * method.c: Likewise.
2295 * parser.c: Likewise.
2296
2297 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
2298
2299 * decl.c (start_function): Adjust init_function_start call.
2300 * method.c (use_thunk): Likewise.
2301 * semantics.c (genrtl_start_function): Likewise.
2302
2303 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
2304
2305 * Make-lang.in: Remove c-options.o.
2306
2307 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
2308
2309 * lex.c: Convert to ISO C.
2310
2311 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
2312 * init.c: removes use of PARAMS macro. Use ISO style function
2313 declarations. (Not copyright-significant change.)
2314
2315 * rtti.c: Remove PARAMS.
2316
2317 * typeck2.c: Convert to ISO C.
2318
2319 2003-06-12 Mark Mitchell <mark@codesourcery.com>
2320
2321 PR c++/10635
2322 * typeck.c (build_c_cast): Check that the destination type is
2323 complete.
2324
2325 2003-06-11 Mark Mitchell <mark@codesourcery.com>
2326
2327 PR c++/10432
2328 * cp-tree.h (finish_declarator): Remove.
2329 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
2330 erroneous declarations.
2331 * semantics.c (finish_declarator): Remove.
2332
2333 2003-06-11 Roger Sayle <roger@eyesopen.com>
2334
2335 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
2336 global static constructor/destructor if it will be empty, i.e.
2337 either doesn't call any ctors/dtors or only calls pure or const
2338 ctors/dtors.
2339
2340 2003-06-11 Mark Mitchell <mark@codesourcery.com>
2341
2342 * mangle.c (tm_p.h): Include it.
2343 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
2344
2345 PR c++/11131
2346 * tree.c (cp_cannot_inline_fn): Check for "inline" before
2347 instantiation.
2348
2349 2003-06-10 Jason Merrill <jason@redhat.com>
2350
2351 PR c++/10968
2352 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2353
2354 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
2355
2356 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
2357 (start_cleanup_cnt): New.
2358
2359 2003-06-10 Mark Mitchell <mark@codesourcery.com>
2360
2361 PR c++/11131
2362 * cp-tree.h (template_for_substitution): Declare.
2363 * decl2.c (mark_used): Use it when figuring out whether or not a
2364 function is inline.
2365 * pt.c (template_for_substitution): Give it external linkage.
2366 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
2367 possible.
2368
2369 2003-06-09 Zack Weinberg <zack@codesourcery.com>
2370
2371 PR 8861
2372 * mangle.c (write_real_cst): New function. Implement
2373 ABI-compliant mangling of floating-point literals when
2374 -fabi-version>=2; provide backward compatibility with 3.3 when
2375 -fabi-version=1 (with warning). Clarify commentary.
2376 (write_template_arg_literal): Use write_real_cst.
2377
2378 2003-06-07 Andreas Jaeger <aj@suse.de>
2379
2380 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2381
2382 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
2383
2384 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
2385 (LANG_HOOKS_HANDLE_OPTION): Override.
2386 * cp-tree.h (cxx_init_options): Update.
2387 * lex.c (cxx_init_options): Update.
2388
2389 Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
2390
2391 * Make-lang.in: Add support for stageprofile and stagefeedback
2392
2393 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
2394
2395 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2396
2397 2003-06-04 Andreas Jaeger <aj@suse.de>
2398
2399 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
2400
2401 2003-06-03 Jason Merrill <jason@redhat.com>
2402
2403 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
2404
2405 * cp/decl.c (reshape_init): Handle vectors.
2406
2407 * testsuite/g++.dg/init/array10.C: New.
2408
2409 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2410
2411 PR c++/10940
2412 * pt.c (check_explicit_specialization): Check for 'static'
2413 earlier.
2414
2415 2003-05-31 Diego Novillo <dnovillo@redhat.com>
2416
2417 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
2418 the operand of a CONSTRUCTOR node.
2419
2420 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2421
2422 * decl.c (cp_binding_level::this_entity): Rename from this_class.
2423 (cxx_scope_descriptor): New function.
2424 (cxx_scope_debug): Likewise.
2425 (push_binding_level): Use it.
2426 (pop_binding_level): Likewise.
2427 (suspend_binding_level): Likewise.
2428 (resume_binding_level): Likewise.
2429 (pushlevel_class): Adjust use of this_class.
2430 (pushtag): Likewise.
2431 (lookup_name_real): Likewise.
2432 (global_scope_name): New variable.
2433 (initialize_predefined_identifiers): Initialize it.
2434 (push_namespace): Use it.
2435 (make_cxx_scope): New function.
2436 (pushlevel): Use it.
2437 (pushlevel_class): Likewise.
2438 (push_binding_level): Simplify. Loose the last two arguments.
2439 (make_binding_level): Remove.
2440 (initial_push__namespace_scope): New function.
2441 (push_namespace): Use it. Simplify.
2442 (cxx_init_decl_processing): Likewise.
2443 (declare_namespace_level): Remove.
2444
2445 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2446
2447 PR c++/10956
2448 * pt.c (instantiate_decl): Don't use full template arguments if
2449 we are dealing with specializations.
2450
2451 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2452
2453 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
2454 (binding_depth): Unconditionally define.
2455 (is_class_level): Likewise.
2456 (indent): Likewise. Take an indenting parameter.
2457 (push_binding_level): Remove conditional definittion.
2458 (pop_binding_level): Likewise.
2459 (suspend_binding_level): Likewise.
2460 (resume_binding_level): Likewise.
2461 (pushlevel): Likewise.
2462 (pushlevel_class): Likewise.
2463 (poplevel_class): Likewise.
2464 (pop_everything): Likewise.
2465
2466 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
2467
2468 * name-lookup.h (global_scope_p): New macro.
2469 * decl.c (pop_binding_level): Use it. Don't refer directly to
2470 global_binding_level.
2471 (suspend_binding_level): Likewise.
2472 (global_bindings_p): Likewise.
2473 (print_other_binding_stack): Likewise.
2474 (print_binding_stack): Likewise.
2475 (maybe_push_to_top_level): Likewise.
2476 (pushdecl_namespace_level): Likewise.
2477 (cxx_init_decl_processing): Likewise.
2478 (start_decl): Likewise.
2479 (cp_finish_decl): Likewise.
2480 (start_function): Likewise.
2481 (global_binding_level): Remove.
2482
2483 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2484
2485 * parser.c (cp_parser_explicit_instantiation): Restore old
2486 access before template instantiation.
2487
2488 2003-05-23 Geoffrey Keating <geoffk@apple.com>
2489
2490 * lang-specs.h: Use -o to specify preprocessor's output file.
2491 Make -no-integrated-cpp work when building PCH files.
2492
2493 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2494
2495 PR c++/10682
2496 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
2497 check for implicitly created typedef to an enum.
2498
2499 2003-05-21 Jason Merrill <jason@redhat.com>
2500
2501 * init.c (build_vec_delete): Copy the address into a temporary
2502 variable before calling build_vec_delete_1.
2503 * decl2.c (delete_sanity): Don't call stabilize_reference.
2504
2505 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
2506
2507 * pt.c (register_specialization): Update the decl's location,
2508 if necessary.
2509 (check_explicit_specialization): Likewise.
2510
2511 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2512
2513 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2514
2515 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
2516
2517 PR c++/9738
2518 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
2519 if the old decl had instantiated DECL_RTL.
2520 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2521
2522 2003-05-19 Matt Austern <austern@apple.com>
2523
2524 * lang-options.h: Document -Wno-invalid-offsetof
2525 * typeck.c (build_class_member_access_expr): Don't complain about
2526 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2527
2528 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
2529
2530 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
2531 (binding_entry_make): Make entry->chain NULL after getting an entry.
2532 fix the spelling of chain in a comment.
2533 (binding_table_free): speed up by having temporary variable.
2534 (binding_table_new): set table->chain to be NULL after allocating
2535 a table.
2536 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
2537 binding->previous to NULL after getting an binding for speed.
2538
2539 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
2540
2541 * cp-tree.h (struct lang_type_class): Replace data member tags
2542 with hash-table nested_udts.
2543 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
2544 * class.c (unreverse_member_declarations): Don't touch
2545 CLASSTYPE_TAGS.
2546 (pushclass): Use cxx_remember_type_decls.
2547 * decl.c (struct cp_binding_level): Replace data member tags with
2548 hash-table type_decls.
2549 (pop_binding_level): Handle level->type_decls.
2550 (kept_level_p): Adjust.
2551 (poplevel): Remove unused local variable.
2552 (bt_print_entry): New function.
2553 (print_binding_level): Use it.
2554 (push_namespace): Build current_binding_level->type_decls.
2555 (maybe_process_template_type_declaration): Adjust.
2556 (pushtag): Likewise.
2557 (clear_anon_tags): Use binding_table_remove_anonymous_types.
2558 (gettags): Remove.
2559 (cxx_remember_type_decls): Rename from storetags. Adjust.
2560 (lookup_tag): Use binding_table_find_anon_type. Tidy.
2561 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
2562 (cxx_init_decl_processing): Build global_binding_level->type_decls.
2563 (store_parm_decls): Remove pointless code.
2564 * name-lookup.c (free_binding_entry): New variable.
2565 (ENTRY_INDEX): New macro.
2566 (struct binding_table_s): New datatype.
2567 (binding_entry_make): New function.
2568 (binding_entry_free): Likewise.
2569 (binding_table_construct): Likewise.
2570 (binding_table_free): Likewise.
2571 (binding_table_new): Likewise.
2572 (binding_table_expand): Likewise.
2573 (binding_table_insert): Likewise.
2574 (binding_table_find): Likewise.
2575 (binding_table_find_anon_type): Likewise.
2576 (binding_table_reverse_maybe_remap): Likewise.
2577 (binding_table_remove_anonymous_types): Likewise.
2578 (binding_table_foreach): Likewise.
2579 * name-lookup.h (binding_table): New type.
2580 (binding_entry): Likewise.
2581 (bt_foreach_proc): Likewise.
2582 (struct binding_entry_s): New datatype.
2583 (SCOPE_DEFAULT_HT_SIZE): New macro.
2584 (CLASS_SCOPE_HT_SIZE): Likewise.
2585 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
2586 (NAMESPACE_STD_HT_SIZE): Likewise.
2587 (GLOBAL_SCOPE_HT_SIZE): Likewise.
2588 (binding_table_new): Declare.
2589 (binding_table_free): Likewise.
2590 (binding_table_insert): Likewise.
2591 (binding_table_find_anon_type): Likewise.
2592 (binding_table_reverse_maybe_remap): Likewise.
2593 (binding_table_remove_anonymous_types): Likewise.
2594 (binding_table_foreach): Likewise.
2595 (binding_table_find): Likewise.
2596 (cxx_remember_type_decls): Likewise.
2597 * pt.c (bt_instantiate_type_proc): New function.
2598 (do_type_instantiation): Use it.
2599 * search.c (lookup_field_r): Use binding_table_find.
2600
2601 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2602
2603 * semantics.c (perform_deferred_access_checks): Don't discard
2604 checked access.
2605
2606 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2607
2608 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
2609 libiberty VA_ macros, always use stdarg.
2610 * rtti.c (create_pseudo_type_info): Likewise.
2611 * tree.c (build_min_nt, build_min): Likewise.
2612
2613 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2614
2615 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
2616 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
2617 collapse multiple function calls into one.
2618 * tree.c (debug_binfo): Likewise.
2619
2620 2003-05-15 Jason Merrill <jason@redhat.com>
2621
2622 PR c++/5388
2623 * call.c (conditional_conversion): Don't consider implicit
2624 conversions if T2 is a base of T1.
2625 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
2626 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2627
2628 * parser.c (cp_parser_primary_expression): Convert a static data
2629 member from reference.
2630
2631 2003-05-15 Mark Mitchell <mark@codesourcery.com>
2632
2633 * call.c (build_op_delete_call): Avoid creating unnecessary types.
2634 * class.c (instantiate_type): Remove tests for tf_no_attributes.
2635 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
2636 (COMPARE_NO_ATTRIBUTES): Remove.
2637 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
2638
2639 PR c++/8385
2640 * semantics.c (finish_typeof): Refine type-dependency check.
2641
2642 2003-05-13 Jason Merrill <jason@redhat.com>
2643
2644 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
2645 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
2646
2647 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2648
2649 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
2650
2651 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2652
2653 PR c++/10230, c++/10481
2654 * semantics.c (finish_non_static_data_member): Handle when the
2655 non-static member is not from a base of the current class type.
2656
2657 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2658
2659 PR c++/10552
2660 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
2661 template and has dependent context.
2662
2663 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2664
2665 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
2666
2667 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2668
2669 PR c++/9252
2670 * cp-tree.h (saved_scope): Remove check_access field.
2671 (tsubst_flags_t): Remove tf_parsing.
2672 * decl.c (maybe_push_to_top_level): Don't initialize
2673 scope_chain->check_access.
2674 (make_typename_type, make_unbound_class_template): Don't use
2675 tf_parsing.
2676 (register_dtor_fn): Use push/pop_deferring_access_checks
2677 instead of scope_chain->check_access.
2678 * method.c (use_thunk): Likewise.
2679 * parser.c (cp_parser_explicit_instantiation
2680 (cp_parser_constructor_declarator_p): Don't call
2681 push/pop_deferring_access_checks here.
2682 (cp_parser_template_argument, cp_parser_class_name): Don't use
2683 tf_parsing.
2684 (yyparse): Check flag_access_control.
2685 * pt.c (instantiate_class_template): Call
2686 push/pop_deferring_access_checks.
2687 * semantics.c (push_deferring_access_checks): Propagate
2688 dk_no_check.
2689 (perform_or_defer_access_check): Make sure basetype_path is
2690 a type before comparison.
2691 * call.c (build_op_delete_call, build_over_call): Use
2692 perform_or_defer_access_check.
2693 * class.c (alter_access): Likewise.
2694 * init.c (build_offset_ref): Likewise.
2695 * lex.c (do_identifier): Likewise.
2696 * method.c (hack_identifier): Likewise.
2697 * search.c (lookup_member): Likewise.
2698 * semantics.c (finish_non_static_data_member): Likewise.
2699 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
2700 instead of flag_access_control.
2701
2702 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2703
2704 PR c++/9554
2705 * parser.c (cp_parser_class_name): Remove check_access parameter.
2706 All caller adjusted. Update declaration.
2707 (cp_parser_lookup_name): Likewise.
2708 * semantics.c (push_deferring_access_checks): Change parameter type
2709 to enum deferring_kind. All caller adjusted.
2710 (resume_deferring_access_checks): Adjust to use new enum.
2711 (stop_deferring_access_checks): Likewise.
2712 (perform_or_defer_access_check): Likewise.
2713 * cp-tree.h (deferring_kind): New enum.
2714 (deferred_access): Adjust field type.
2715 (push_deferring_access_checks): Update declaration.
2716
2717 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2718
2719 PR c++/10555, c++/10576
2720 * pt.c (lookup_template_class): Handle class template with
2721 multiple levels of parameters when one of the levels contain
2722 errors.
2723
2724 2003-05-08 Jason Merrill <jason@redhat.com>
2725
2726 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
2727 expression. Undo some of the recent reorg.
2728
2729 2003-05-07 Richard Henderson <rth@redhat.com>
2730
2731 PR c++/10570
2732 * cfns.gperf: Comment out POSIX thread cancellation points,
2733 plus abort and raise.
2734 * cfns.h: Regenerate.
2735
2736 2003-05-07 Jason Merrill <jason@redhat.com>
2737
2738 * call.c (build_conditional_expr): Don't assume that the folded
2739 expression has result_type.
2740
2741 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2742
2743 * typeck.c (build_unary_op): Deal with const qualifier in
2744 invalid pointer-to-member earlier.
2745
2746 2003-05-05 Jason Merrill <jason@redhat.com>
2747
2748 PR c++/9537
2749 * call.c (conditional_conversion): Build an RVALUE_CONV if
2750 we're just changing the cv-quals.
2751 (build_conditional_expr): Don't call convert to change
2752 cv-quals.
2753
2754 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2755
2756 PR c++/10496
2757 * typeck.c (build_unary_op): Don't output const qualifier when
2758 output invalid pointer-to-member diagnostics.
2759
2760 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2761
2762 * decl.c: Fix typos.
2763
2764 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2765
2766 PR c++/4494
2767 * decl.c (start_function): Use same_type_p to check return type
2768 of main.
2769
2770 2003-05-03 Zack Weinberg <zack@codesourcery.com>
2771
2772 PR c/10604
2773 * cp/typeck.c (build_x_compound_expr): No need to check
2774 extra_warnings as well as warn_unused_value.
2775
2776 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2777
2778 PR c++/9364, c++/10553, c++/10586
2779 * decl.c (make_typename_type): Don't crash on illegal code.
2780
2781 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
2782
2783 * class.c (finish_struct): Use location_t and input_location
2784 directly.
2785 * decl.c (make_label_decl): Likewise.
2786 (use_label): Likewise.
2787 * decl2.c (warn_if_unknown_interface): Likewise.
2788 (start_static_initialization_or_destruction): Likewise.
2789 (generate_ctor_or_dtor_function): Likewise.
2790 (finish_file): Likewise.
2791 * error.c (print_instantiation_full_context): Likewise.
2792 * init.c (create_temporary_var): Likewise.
2793 * method.c (synthesize_method): Likewise.
2794 * parser.c (cp_token): Likewise.
2795 (cp_lexer_set_source_position_from_token): Likewise.
2796 (cp_lexer_get_preprocessor_token): Likewise.
2797 (cp_parser_statement): Likewise.
2798 * pt.c (tsubst_friend_function): Likewise.
2799 (instantiate_class_template): Likewise.
2800 (tsubst_decl): Likewise.
2801 (tsubst): Likewise.
2802 (instantiate_decl): Likewise.
2803 * semantics.c (begin_class_definition): Likewise.
2804 (expand_body): Likewise.
2805
2806 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
2807
2808 * class.c (finish_struct): Rename lineno to input_line.
2809 * decl.c (push_binding_level, pop_binding_level,
2810 suspend_binding_level, resume_binding_level, make_label_decl,
2811 use_label, start_function): Likewise.
2812 * decl2.c (warn_if_unknown_interface,
2813 start_static_initialization_or_destruction,
2814 generate_ctor_or_dtor_function, finish_file): Likewise.
2815 * error.c (cp_line_of, print_instantiation_full_context,
2816 print_instantiation_context): Likewise.
2817 * except.c (check_handlers_1, check_handlers): Likewise.
2818 * init.c (create_temporary_var): Likewise.
2819 * method.c (use_thunk, synthesize_method): Likewise.
2820 * parser.c (cp_lexer_set_source_position_from_token,
2821 cp_lexer_get_preprocessor_token): Likewise.
2822 * pt.c (push_tinst_level, pop_tinst_level,
2823 tsubst_friend_function, instantiate_class_template, tsubst_decl,
2824 tsubst, tsubst_expr, instantiate_decl): Likewise.
2825 * semantics.c (genrtl_try_block, finish_label_stmt,
2826 begin_class_definition, expand_body,
2827 genrtl_finish_function): Likewise.
2828 * tree.c (build_min_nt, build_min): Likewise.
2829
2830 2003-05-01 Mark Mitchell <mark@codesourcery.com>
2831
2832 * decl2.c (comdat_linkage): Don't externalize explicit
2833 instantiations.
2834
2835 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2836
2837 PR c++/10554
2838 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
2839 is not NULL.
2840
2841 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
2842
2843 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
2844 (struct lang_identifier): ... to here.
2845 (LANG_ID_FIELD): Remove.
2846 (SET_LANG_ID): Remove.
2847 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
2848 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
2849 (IDENTIFIER_IMPLICIT_DECL): Likewise.
2850 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
2851 (IDENTIFIER_ERROR_LOCUS): Likewise.
2852 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2853
2854 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2855
2856 PR c++/8772
2857 * pt.c (convert_template_argument): Correct diagnostic.
2858
2859 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2860
2861 PR c++/9432, c++/9528
2862 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
2863
2864 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
2865
2866 * decl.c (check_previous_goto_1): Adjust prototype.
2867 (check_previous_goto): Adjust use.
2868 (check_switch_goto): Likewise.
2869 (use_label): Adjust.
2870 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
2871 (struct named_label_use_list): Use location_t datatype.
2872
2873 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2874
2875 PR c++/10551
2876 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
2877 that have not yet been written out.
2878
2879 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2880
2881 PR c++/10549
2882 * class.c (layout_class_type): Mark overlong bitfields as having
2883 the maximum size permitted by their type, after layout.
2884
2885 PR c++/10527
2886 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
2887
2888 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2889
2890 * call.c (build_operator_new_call): Fix typo.
2891 * lang-options.h: Likewise.
2892
2893 2003-04-29 Mark Mitchell <mark@codesourcery.com>
2894
2895 PR c++/10515
2896 * cp-tree.h (lookup_field_1): Declare it.
2897 * search.c (lookup_field_1): Make it public.
2898 * decl.c (reshape_init): Handle designated initializers.
2899
2900 * decl.c (maybe_commonize_var): Further tweak support for systems
2901 without weak symbols.
2902
2903 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2904
2905 * decl.c (maybe_commonize_var): Fix thinko in last patch.
2906
2907 2003-04-27 Mark Mitchell <mark@codesourcery.com>
2908
2909 PR c++/10506
2910 * method.c (use_thunk): Decrement immediate_size_expand.
2911
2912 PR c++/10503
2913 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
2914 (DECL_MAYBE_TEMPLATE): Remove.
2915 * class.c (fixed_type_or_null): Avoid infinite recursion.
2916
2917 * decl.c (maybe_commonize_var): Make the code match the comments.
2918 * pt.c (instantiate_decl): Move call to import_export_decl.
2919
2920 2003-04-26 Mark Mitchell <mark@codesourcery.com>
2921
2922 * decl2.c (finish_file): Fix merge botch.
2923
2924 2003-04-25 Mark Mitchell <mark@codesourcery.com>
2925
2926 * decl2.c (finish_file): Don't call import_export_decl for
2927 functions that are not defined.
2928 (handle_class_head): Robustify.
2929 * pt.c (instantiate_decl): Do not call cp_finish_decl for
2930 variables that are not defined.
2931
2932 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
2933
2934 * call.c (print_z_candidates): Fix off by one error.
2935
2936 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
2937
2938 PR c++/10337
2939 * call.c (joust): Don't warn about conversion ops that are exact
2940 or cv-conversions. Rearrange to avoid multiple type comparisons.
2941
2942 2003-04-23 Mark Mitchell <mark@codesourcery.com>
2943
2944 PR c++/10471
2945 * call.c (build_cxx_call): Robustify.
2946
2947 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
2948
2949 * Make-lang.in (lex.o): Remove mbchar.h.
2950 * lex.c (MULTIBYTE_CHARS): Lose.
2951 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
2952 in c-lex.c.
2953
2954 2003-04-23 Mark Mitchell <mark@codesourcery.com>
2955
2956 PR c++/9847
2957 * cp-tree.h (duplicate_tag_error): Remove.
2958 * class.c (duplicate_tag_error): Remove.
2959 * semantics.c (begin_class_definition): Return immediately for a
2960 duplicate class definition.
2961
2962 PR c++/10451
2963 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
2964
2965 2003-04-22 Mark Mitchell <mark@codesourcery.com>
2966
2967 PR c++/10446
2968 * search.c (lookup_fnfields_1): Handle empty slots in the method
2969 vector.
2970
2971 PR c++/10428
2972 * decl.c (check_elaborated_type_specifier): New function, split
2973 out from ...
2974 (xref_tag): ... here. Use the new function in more places.
2975
2976 * rtti.c (throw_bad_typeid): Use build_cxx_call.
2977
2978 2003-04-21 Mark Mitchell <mark@codesourcery.com>
2979
2980 * call.c (build_over_call): Use build_cxx_call.
2981 (build_cxx_call): New method, split out of build_over_call.
2982 * cp-tree.h (language_function): Add can_throw.
2983 (build_cxx_call): Declare it.
2984 * decl.c (finish_function): If a function does not contain any
2985 calls to functions that can throw an exception, indicate that
2986 fact.
2987 * decl2.c (mark_used): Do not defer the instantiation of
2988 functions, if the current function does not throw.
2989 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
2990 * pt.c (instantiate_decl): Make sure import_export_decl is called
2991 before emitting things.
2992 * rtti.c (throw_bad_cast): Use build_cxx_call.
2993 (build_dynamic_cast_1): Likewise.
2994 * typeck.c (build_function_call): Likewise.
2995
2996 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
2997
2998 PR c++/9881
2999 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3000 expressions. Reverts my 2002-08-08 patch.
3001
3002 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3003 cheaper early exit.
3004
3005 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
3006
3007 * cp/decl2.c (start_static_storage_duration_function): Take count
3008 arg, don't check if it wraps round.
3009 (generate_ctor_or_dtor_function): Add locus arg, use it.
3010 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3011 locus.
3012 (finish_file): Set line numbers to past EOF for synthesized
3013 functions.
3014
3015 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
3016
3017 PR c++/10405
3018 * search.c (lookup_field_1): Final scan goes backwards for
3019 types, forwards for non-types.
3020
3021 2003-04-17 Roger Sayle <roger@eyesopen.com>
3022
3023 PR c/10375
3024 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3025 "nothrow" function attributes.
3026
3027 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3028
3029 PR c++/10347
3030 * pt.c (type_dependent_expression_p): Handle array new.
3031
3032 2003-04-15 Mark Mitchell <mark@codesourcery.com>
3033
3034 PR c++/10381
3035 * parser.c (cp_parser_primary_expression): Reorganize logic for
3036 dealing with name lookup failures.
3037
3038 2003-04-15 Jason Merrill <jason@redhat.com>
3039
3040 * decl2.c (mark_used): Don't instantiate anything if
3041 skip_evaluation.
3042
3043 2003-04-14 Ziemowit Laski <zlaski@apple.com>
3044
3045 * tree.c (build_cplus_array_type_1): Do not call
3046 uses_template_parms() on a NULL index_type.
3047
3048 2003-04-13 Roger Sayle <roger@eyesopen.com>
3049
3050 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3051
3052 2003-04-12 Mark Mitchell <mark@codesourcery.com>
3053
3054 PR c++/10300
3055 * init.c (build_new_1): Reorganize.
3056
3057 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3058
3059 * class.c (initialize_array)
3060 * decl.c (reshape_init)
3061 * decl2.c (build_expr_from_tree)
3062 * init.c (build_zero_init)
3063 * pt.c (tsubst_copy, tsubst_copy_and_build)
3064 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3065 (ptm_initializer, class_initializer, get_pseudo_ti_init)
3066 * semantics.c (finish_compound_literal)
3067 * typeck.c (build_ptrmemfunc1)
3068 * typeck2.c (store_init_value, process_init_constructor)
3069 (build_functional_cast): Use build_constructor.
3070
3071 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3072
3073 * call.c (print_z_candidates): Use gcc_gettext_width, not
3074 strlen, to determine how much padding to use.
3075
3076 2003-04-10 Zack Weinberg <zack@codesourcery.com>
3077
3078 * decl.c: Update all calls to shadow_warning.
3079
3080 2003-04-10 Mark Mitchell <mark@codesourcery.com>
3081
3082 * class.c (layout_class_type): Correct handling for overlong
3083 bit-fields whose width is the same as an integer type.
3084
3085 2003-04-06 Zack Weinberg <zack@codesourcery.com>
3086
3087 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3088 * cp-lang.c (cp_tree_size): New function.
3089 (LANG_HOOKS_TREE_SIZE): Override.
3090
3091 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3092 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3093 (union lang_tree_node): Remove common and srcloc members.
3094 (build_srcloc_here): Don't prototype.
3095 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3096 * pt.c (pending_templates): Correct comment.
3097 * tree.c (build_srcloc, build_srcloc_here): Kill.
3098
3099 2003-04-06 Zack Weinberg <zack@codesourcery.com>
3100
3101 * call.c: Include intl.h.
3102 (print_z_candidate): Always use inform; get rid of errfn
3103 argument. Reorganize so that all the strings get picked up
3104 by xgettext. Note obligation of caller to pass first argument
3105 through gettext.
3106 (print_z_candidates): Update to match. Indent second and
3107 successive candidates by strlen() of translated message.
3108 (joust): Restructure ambiguous-conversion pedwarn so that
3109 translators see a complete sentence. Update calls to
3110 print_z_candidate.
3111
3112 * Make-lang.in (cp/call.o): Update dependencies.
3113
3114 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3115
3116 * decl.c (set_current_binding_level): Delete, revert last change.
3117 (current_binding_level): Modify to allow it as as lvalue.
3118
3119 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3120
3121 * name-lookup.c (find_binding): Pass appropriate pointer type to
3122 POP_TIMEVAR_AND_RETURN.
3123
3124 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3125
3126 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3127 * cp-tree.h: Don't insist on having GNUC.
3128
3129 2003-04-03 Jason Merrill <jason@redhat.com>
3130
3131 * cvt.c (ocp_convert): Only abort if we try to convert an object
3132 of TREE_ADDRESSABLE type.
3133
3134 * class.c (build_vtable): Set DECL_ALIGN here.
3135 (get_vtable_decl): Not here.
3136 (layout_vtable_decl): Or here.
3137 (create_vtable_ptr): Or here.
3138 (layout_class_type): Or here.
3139 (check_bitfield_decl): Don't mess with field alignment.
3140
3141 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3142
3143 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3144 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3145 * rtti.c (dfs_class_hint_mark): Likewise.
3146
3147 * decl.c (push_local_name, push_class_level_binding,
3148 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3149 functions returning void.
3150 * decl2.c (add_using_namespace): Likewise.
3151
3152 * decl.c (print_binding_level, print_other_binding_stack,
3153 print_binding_stack): Cast argument of %p specifier to void*.
3154 * ptree.c (cxx_print_decl): Likewise.
3155
3156 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3157 VAR_FUNCTION_OR_PARM_DECL_CHECK,
3158 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3159 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3160 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3161
3162 * decl.c (set_current_binding_level): New macro. Use throughout
3163 when setting the current binding level.
3164
3165 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3166 in enum.
3167 * method.c (mangling_flags): Likewise.
3168
3169 * cp-tree.h (lang_type_header): Add __extension__ and use
3170 CHAR_BITFIELD for members.
3171
3172 2003-04-02 Geoffrey Keating <geoffk@apple.com>
3173
3174 PR other/9274
3175 * mangle.c: Include gt-cp-mangle.h.
3176 (subst_identifiers): Mark with GTY.
3177 * config-lang.in (gtfiles): Add cp/mangle.c.
3178 * Make-lang.in: (gt-cp-mangle.h): New rule.
3179 (cp/mangle.o): Depends on gt-cp-mangle.h.
3180
3181 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
3182
3183 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3184 after \$(srcdir)/cp/name-lookup.h.
3185 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3186 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
3187 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3188 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3189
3190 2003-03-31 Jason Merrill <jason@redhat.com>
3191
3192 PR java/10145
3193 * class.c (check_field_decl): Don't set DECL_ALIGN.
3194
3195 2003-03-30 Mark Mitchell <mark@codesourcery.com>
3196
3197 PR c++/7647
3198 * decl.c (grokdeclarator): Tidy, slightly.
3199 * search.c (lookup_field_1): Add want_type parameter.
3200 (lookup_field_r): Adjust call to lookup_field_1.
3201
3202 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3203
3204 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3205
3206 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3207
3208 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
3209 prototype.
3210 (cxx_scope_find_binding_for_name): Likewise.
3211 * decl.c (find_binding: Move to name-lookup.c.
3212 (binding_for_name): Likewise.
3213 (cxx_scope_find_binding_for_name): Likewise.
3214 (BINDING_LEVEL): Remove.
3215 (push_binding): Tidy.
3216 (push_class_binding): Likewise.
3217 (pop_binding): Likewise.
3218 (poplevel): Likewise.
3219 (poplevel_class): Likewise.
3220 (set_identifier_type_value_with_scope): Likewise.
3221 (push_overloaded_decl): Likewise.
3222 (lookup_tag): Likewise.
3223 (unqualified_namespace_lookup): Likewise.
3224 (lookup_name_current_level): Likewise.
3225 (maybe_inject_for_scope_var): Likewise.
3226 (namespace_binding): Move to name-lookup.c.
3227 (set_namespace_binding): Likewise.
3228 * decl2.c (lookup_using_namespace): Tidy.
3229 (qualified_lookup_using_namespace): Likewise.
3230 (do_toplevel_using_decl): Likewise.
3231 * name-lookup.c: Include "timevar.h"
3232 * name-lookup.h (cxx_scope): Declare.
3233 (struct cxx_binding): Lose member "has_level". Adjust "scope"
3234 member declaration.
3235 (BINDING_SCOPE): Adjust definition.
3236 (BINDING_HAS_LEVEL_P): Remove.
3237
3238 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3239
3240 * name-lookup.c: New file.
3241 * name-lookup.h: Likewise..
3242 * decl.c (push_binding): Adjust use cxx_binding_make.
3243 (free_bindings): Move to name-lookup.c
3244 (pop_binding): Use cxx_binding_free.
3245 (binding_for_name): Tidy.
3246 * cp-tree.h: Include "name-lookup.h"
3247 (cxx_binding_make): Move to name-lookup.h
3248 (cxx_binding_clear): Likewise.
3249 (struct cxx_binding): Likewise.
3250 (LOCAL_BINDING_P): Likewise.
3251 (INHERITED_VALUE_BINDING_P): Likewise.
3252 (BINDING_SCOPE): Likewise.
3253 (BINDING_HAS_LEVEL_P): Likewise.
3254 (BINDING_VALUE): Likewise.
3255 (BINDING_TYPE): Likewise.
3256 * config-lang.in (gtfiles): Add cp/name-lookup.h
3257 * Make-lang.in (cp/name-lookup.o): New rule.
3258 (CXX_OBJS): Add cp/name-lookup.o
3259 (CXX_TREE_H): Add cp/name-lookup.h
3260
3261 2003-03-28 Jason Merrill <jason@redhat.com>
3262
3263 PR c++/10245
3264 * cvt.c (force_rvalue): New fn.
3265 * call.c (build_conditional_expr): Use it.
3266 * cp-tree.h: Declare it.
3267
3268 2003-03-28 Mike Stump <mrs@apple.com>
3269
3270 * error.c (dump_expr): Add 0x to printed hex numbers to make
3271 output match source code better.
3272
3273 2003-03-28 Mark Mitchell <mark@codesourcery.com>
3274
3275 PR c++/10218
3276 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
3277 definitions.
3278
3279 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
3280 non-existant ssdf_decls array.
3281 (finish_file): Call generator_ctor_or_dtor_function when there are
3282 static constructors or destructors and no other static
3283 initializations.
3284
3285 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
3286
3287 PR c++/10047
3288 * decl2.c (finish_file): Don't warn about explicitly instantiated
3289 inline decls.
3290
3291 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
3292
3293 PR c++/10224
3294 * pt.c (lookup_template_class): Only check instantiated args if
3295 they do not contain template parameters.
3296
3297 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
3298
3299 PR c++/10158
3300 * parser.c (cp_parser_function_definition): Set
3301 DECL_INITIALIZED_IN_CLASS for members.
3302 * pt.c (instantiate_decl): Only reduce the template args for
3303 friends that are not defined in class.
3304
3305 2003-03-25 Jason Merrill <jason@redhat.com>
3306
3307 * call.c (print_z_candidate): Change name of first arg to msgid.
3308 (joust): Add comment for translators.
3309
3310 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3311
3312 PR c++/9898, PR c++/383, DR 322
3313 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
3314 through reference types on both PARM and ARG.
3315
3316 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3317
3318 PR c++/10119
3319 * error.c (dump_expr) <BASELINK>: Use dump_expr.
3320 * pt.c (maybe_fold_nontype_args): New function.
3321 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
3322 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
3323 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
3324 maybe_fold_nontype_args.
3325
3326 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
3327
3328 PR c++/10026
3329 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
3330
3331 2003-03-23 Mark Mitchell <mark@codesourcery.com>
3332
3333 PR c++/7086
3334 * typeck.c (cxx_mark_addressable): Adjust call to
3335 gen_mem_addressof or put_var_into_stack.
3336
3337 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
3338
3339 PR c++/9978, c++/9708
3340 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
3341 * call.c (add_template_candidate_real): Adjust
3342 instantiate_template call.
3343 * class.c (resolve_address_of_overloaded_function): Likewise.
3344 * decl.c (build_enumerator): Set TREE_CONSTANT.
3345 * pt.c (check_instantiated_args): New.
3346 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
3347 TREE_READONLY.
3348 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
3349 (reduce_template_parm_level): Likewise.
3350 (process_template_parm): Likewise.
3351 (check_explicit_specialization): Adjust instantiate_template call.
3352 (convert_template_argument): Don't check non-type argument here.
3353 (lookup_template_class): Check them here.
3354 (tsubst_friend_function): Adjust instantiate_template call.
3355 (instantiate_template): Add tsubst_flags parameter, use it. Check
3356 instantiated args.
3357
3358 2003-03-21 Zack Weinberg <zack@codesourcery.com>
3359
3360 * decl.c: Update calls to shadow_warning.
3361
3362 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
3363
3364 PR c++/9898
3365 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
3366 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
3367
3368 2003-03-20 Mark Mitchell <mark@codesourcery.com>
3369
3370 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
3371 friends.
3372 * cp/pt.c (instantiate_class_template): Fix formatting.
3373
3374 2003-03-14 Matt Austern <austern@apple.com>
3375
3376 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
3377 (unemitted_tinfo_decl_p): Remove.
3378 (emit_tinfo_decl): Change declaration to remove unused parameter.
3379 * decl2.c (finish_file): Change tinfo emission to loop through
3380 unemitted_tinfo_decls array instead of looping through all decls.
3381 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
3382 unused second parameter.
3383 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
3384 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
3385 (emit_tinfo_decl): remove unused second parameter, add assertion
3386 that decl hasn't already been emitted.
3387
3388 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
3389
3390 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
3391 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
3392 return statements.
3393
3394 2003-03-19 Jason Merrill <jason@redhat.com>
3395
3396 PR c++/8316, c++/9315, c++/10136
3397 * call.c (print_z_candidate): Split out from...
3398 (print_z_candidiates): ...here.
3399 (joust): Use it.
3400
3401 2003-03-17 Roger Sayle <roger@eyesopen.com>
3402
3403 PR c++/10031
3404 * decl.c (duplicate_decls): Use the new type when prototyping
3405 anticipated decls, even when the types match. This defines the
3406 exception list for the built-in function.
3407
3408 2003-03-17 Jason Merrill <jason@redhat.com>
3409
3410 PR c++/10091
3411 * typeck.c (build_class_member_access_expr): Compare
3412 TYPE_MAIN_VARIANTs.
3413
3414 2003-03-17 Mark Mitchell <mark@codesourcery.com>
3415
3416 PR c++/9639
3417 * parser.c (cp_parser_declarator_id): Clear parser->scope.
3418
3419 2003-03-16 Jason Merrill <jason@redhat.com>
3420
3421 PR c++/9993
3422 * decl.c (finish_function): Only allow the NRVO to use variables
3423 declared at function scope.
3424
3425 2003-03-17 Andreas Jaeger <aj@suse.de>
3426
3427 * Make-lang.in (cp/TAGS): Remove.
3428
3429 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
3430
3431 PR c++/9629
3432 * cp-tree.h (struct language_function): Add in_base_initializer.
3433 (in_base_initializer): define it.
3434 (expand_member_init): Remove INIT param.
3435 * init.c (expand_member_init): Remove INIT param, return the member.
3436 (emit_mem_initializers): Set in_base_initializer.
3437 * class.c (build_base_path): Check in_base_initializer.
3438 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
3439 * pt.c (tsubst_initializer_list): Likewise.
3440
3441 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
3442
3443 * decl.c (binding_for_name): Fix initialization thinko.
3444
3445 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3446
3447 Compile-time improvement: 2/n.
3448 * cp-tree.h (struct cxx_binding): New datatype;
3449 (struct lang_identifier): Use it.
3450 (LOCAL_BINDING_P): Adjust definition.
3451 (INHERITED_VALUE_BINDING_P): Likewise.
3452 (BINDING_SCOPE): Likewise.
3453 (BINDING_HAS_LEVEL_P): Likewise.
3454 (BINDING_VALUE): Likewise.
3455 (BINDING_TYPE): Likewise.
3456 (IDENTIFIER_VALUE): Likewise.
3457 (struct tree_binding): Remove.
3458 (TS_CP_BINDING): Likewise.
3459 ((union lang_tree_node): Remove field "binding".
3460 (cxx_binding_clear): New macro.
3461 (binding_for_name): Adjust return type.
3462 (qualified_lookup_using_namespace): Adjust prototype.
3463 (lookup_using_namespace): Adjust prototype.
3464 (cxx_scope_find_binding_for_name): Declare.
3465 * cp-tree.def: Remove CPLUS_BINDING definition.
3466 * decl.c (push_binding): Adjust local variable type.
3467 (add_binding): Likewise.
3468 (push_class_binding): Likewise.
3469 (pop_binding): Likewise.
3470 (poplevel): Likewise.
3471 (poplevel_class): Likewise.
3472 (free_bindings): Adjust type.
3473 (find_binding): Adjust return type, add a third parameter. Remove
3474 non-useful assertion now that we use static typing.
3475 (cxx_scope_find_binding_for_name): New function.
3476 (binding_for_name): Use it. Adjust local variable type. Simplify.
3477 (namespace_binding): Simplify.
3478 (set_namespace_binding): Likewise.
3479 (set_identifier_type_value_with_scope): Adjust local variable type.
3480 (lookup_tag): Don't type-abuse of local variable 'old'.
3481 (lookup_namespace_name): Likewise. Allocate binding on stack.
3482 (select_decl): Adjust prototype.
3483 (unqualified_namespace_lookup): Allocate binding on stack.
3484 Don't type-abuse of local variable 'val'.
3485 (lookup_name_real): Likewise.
3486 (maybe_inject_for_scope_var): Adjust local variable type.
3487 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
3488 (namespace_binding): Adjust logic, simplify.
3489 (BINDING_LEVEL): Adjust definition.
3490 (push_class_level_binding): Adjust local variable type.
3491 (struct cxx_saved_binding): Adjust field 'binding' type.
3492 * decl2.c (ambiguous_decl): Adjust prototype.
3493 (lookup_using_namespace): Adjust local variable type.
3494 (qualified_lookup_using_namespace): Catch type error and correct
3495 ensueing logic error.
3496 (do_nonmember_using_decl): Adjust local variable type. Allocate
3497 temporary cxx_binding on stack.
3498 (do_toplevel_using_decl): Adjust local variable type.
3499 * ptree.c (cxx_print_cxx_binding): New function.
3500 (cxx_print_identifier): Use it.
3501 (cxx_print_xnode): Delete CPLUS_BINDING case label.
3502
3503 2003-03-15 Roger Sayle <roger@eyesopen.com>
3504
3505 * tree.c (count_functions): Fix whitespace.
3506
3507 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
3508
3509 * Make-lang.in: Update.
3510
3511 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3512
3513 PR c++/6440
3514 * pt.c (maybe_process_partial_specialization): Handle
3515 member class template when enclosing class template is
3516 explicit specialized.
3517 (most_general_template): Stop looking when DECL is already
3518 specialized.
3519
3520 2003-03-13 Jason Merrill <jason@redhat.com>
3521
3522 PR c++/9420
3523 * search.c (lookup_conversions): Call complete_type here.
3524 * call.c (implicit_conversion): Not here.
3525
3526 2003-03-13 Mark Mitchell <mark@codesourcery.com>
3527
3528 * decl2.c (do_nonmember_using_decl): Correct handling of
3529 simultaneous type/non-type bindings.
3530
3531 * call.c (initialize_reference): Remove bogus assertion.
3532 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
3533
3534 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
3535
3536 PR c++/7050
3537 * expr.c (cxx_expand_expr): Return const0_rtx for throw
3538 expressions.
3539
3540 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3541
3542 PR c++/9474
3543 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3544 to merge old and new declarations.
3545
3546 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3547
3548 * g++.1: Remove.
3549 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
3550 (cp/g++.1): Build it from scratch in the build tree.
3551 (c++.install-man): Depend on it. Install it from the build tree.
3552 (c++.mostlyclean): Clean it.
3553
3554 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3555
3556 PR c++/9474
3557 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3558 to merge old and new declarations.
3559
3560 PR c++/9924
3561 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
3562
3563 2003-03-11 Jason Merrill <jason@redhat.com>
3564
3565 PR c++/9820
3566 * search.c (lookup_member): Fix handling of functions in a class
3567 being defined.
3568
3569 2003-03-11 Mark Mitchell <mark@codesourcery.com>
3570
3571 PR c++/8700
3572 * call.c (convert_class_to_reference): Adjust usage of
3573 splice_viable.
3574 (any_viable): Remove.
3575 (splice_viable): Combine with any_viable.
3576 (print_z_candidates): Avoid printing duplicates.
3577 (build_user_type_conversion_1): Adjust usage of splice_viable.
3578 (build_new_function_call): Likewise.
3579 (build_operator_new_call): Likewise.
3580 (build_object_call): Likewise.
3581 (build_conditional_expr): Likewise.
3582 (build_new_op): Likewise.
3583 (build_new_method_call): Likewise.
3584 (joust): Remove spurious comment.
3585 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
3586 * decl2.c (arg_assoc_class): Simplify.
3587 * friend.c (add_friend): Likewise.
3588
3589 2003-03-11 Jason Merrill <jason@redhat.com>
3590
3591 PR c++/8660
3592 * decl2.c (check_classfn): A member template only matches a
3593 member template.
3594
3595 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
3596
3597 * Make-lang.in (CXX_C_OBJS): Update.
3598 * lang-specs.h: Don't define __GNUG__ here.
3599
3600 2003-03-10 Mark Mitchell <mark@codesourcery.com>
3601
3602 * call.c (perform_overload_resolution): New function.
3603 (build_new_function_call): Use it.
3604 (build_operator_new_call): Likewise.
3605 (add_candidates): Add explicit_targs and template_only parameters.
3606 (build_new_op): Adjust accordingly.
3607 * cp-tree.h (build_operator_new_call): New function.
3608 (build_function_call_real): Remove.
3609 (build_function_call_maybe): Likewise.
3610 * init.c (build_new_1): Use build_operator_new_call.
3611 * typeck.c (build_function_call_real): Rename to ...
3612 (build_function_call): ... this.
3613
3614 2003-03-10 Devang Patel <dpatel@apple.com>
3615
3616 PR c++/9394
3617 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
3618
3619 2003-03-10 Jason Merrill <jason@redhat.com>
3620
3621 PR c++/9798
3622 * decl.c (push_using_directive): Push before recursing.
3623
3624 PR c++/9868, c++/9524
3625 * call.c (resolve_scoped_fn_name): Handle the case of a function
3626 pointer member.
3627
3628 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
3629 argument in the pointer-to-member case.
3630
3631 2003-03-09 Mark Mitchell <mark@codesourcery.com>
3632
3633 PR c++/9373
3634 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
3635 pointers to member functions.
3636
3637 PR c++/8534
3638 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
3639 in pointer-to-member-function types.
3640
3641 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3642
3643 * expr.c (cplus_expand_constant): Use C90 prototype style.
3644 (cxx_expand_expr): Likewise.
3645
3646 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3647
3648 PR c++/9970
3649 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
3650 functions.
3651
3652 2003-03-08 Geoffrey Keating <geoffk@apple.com>
3653
3654 * lang-specs.h (c++-header): Change .pch to .gch.
3655
3656 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
3657
3658 * cp-tree.h (cxx_init): Update prototype.
3659 * lex.c (cxx_init): Similarly.
3660
3661 2003-03-08 Mark Mitchell <mark@codesourcery.com>
3662
3663 PR c++/9823
3664 * cp-tree.h (begin_mem_initializers): Remove.
3665 * parser.c (cp_parser_mem_initializer_list): Inline it here.
3666 Do not call finish_mem_initializers if not in a constructor.
3667 (cp_parser_class_head): Fix typo in error message.
3668 * semantics.c (begin_mem_initializers): Remove.
3669 * testsuite/g++.dg/parser/constructor1.C: New test.
3670
3671 PR c++/9809
3672 * call.c (add_function_candidate): Skip builtin fuctions that have
3673 not yet been declared.
3674
3675 PR c++/9982
3676 * init.c (build_new_1): Correct logic for determining whether or
3677 not to use an array cookie.
3678
3679 PR c++/9524
3680 * parser.c (cp_parser_postfix_expression): Call
3681 finish_non_static_data_member, even when processing_template_decl.
3682
3683 PR c++/9912
3684 * cp-tree.h (is_ancestor): New function.
3685 (handle_class_head): Change prototype.
3686 * decl2.c (is_namespace_ancestor): Rename to ...
3687 (namespace_anecestor): ... this.
3688 (set_decl_namespace): Adjust accordingly.
3689 (handle_class_head): Remove unncessary parameters.
3690 * parser.c (cp_parser_class_head): Check that
3691 nested-name-specifiers are used appropriately.
3692
3693 2003-03-07 Mark Mitchell <mark@codesourcery.com>
3694
3695 * call.c (reference_binding): Remove REF_IS_VAR parameter.
3696 (implicit_conversion): Adjust call to reference_binding.
3697 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
3698 (initialize_reference): Adjust handling for references bound to
3699 rvalues.
3700 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
3701 prototype.
3702 (real_non_cast_lvalue_p): New method.
3703 * cvt.c (build_up_reference): Adjust use of
3704 make_temporary_var_for_ref_to_temp.
3705 * tree.c (real_non_cast_lvalue_p): New method.
3706
3707 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3708
3709 * except.c (init_exception_processing): Use C90 prototype style.
3710 (cp_protect_cleanup_actions): Likewise.
3711 (prepare_eh_type): Likewise.
3712 (build_eh_type_type): Likewise.
3713 (build_exc_ptr): Likewise.
3714 (do_begin_catch): Likewise.
3715 (dtor_nothrow): Likewise.
3716 (do_end_catch): Likewise.
3717 (push_eh_cleanup): Likewise.
3718 (decl_is_java_type): Likewise.
3719 (choose_personality_routine): Likewise.
3720 (initialize_handler_parm): Likewise.
3721 (expand_start_catch_block): Likewise.
3722 (expand_end_catch_block): Likewise.
3723 (begin_eh_spec_block): Likewise.
3724 (finish_eh_spec_block): Likewise.
3725 (do_allocate_exception): Likewise.
3726 (do_free_exception): Likewise.
3727 (wrap_cleanups_r): Likewise.
3728 (stabilize_throw_expr): Likewise.
3729 (build_throw): Likewise.
3730 (complete_ptr_ref_or_void_ptr_p): Likewise.
3731 (is_admissible_throw_operand): Likewise.
3732 (nothrow_libfn_p): Likewise.
3733 (can_convert_eh): Likewise.
3734 (check_handlers_1): Likewise.
3735 (check_handlers): Likewise.
3736
3737 2003-03-06 Mark Mitchell <mark@codesourcery.com>
3738
3739 * call.c (merge_conversion_sequences): New function.
3740 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
3741 (convert_class_to_reference): Correct handling of second
3742 standard conversion sequence in a user-defined conversion
3743 sequence.
3744 (build_user_type_conversion_1): Use merge_conversion_sequences.
3745 * cp-tree.def: Add comments for CONV nodes.
3746 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
3747
3748 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
3749
3750 * error.c (init_error): Use C90 prototype style.
3751 (dump_scope): Likewise.
3752 (dump_qualifiers): Likewise.
3753 (dump_template_argument): Likewise.
3754 (dump_template_argument_list): Likewise.
3755 (dump_template_parameter): Likewise.
3756 (dump_template_bindings): Likewise.
3757 (dump_type): Likewise.
3758 (dump_typename): Likewise.
3759 (class_key_or_enum): Likewise.
3760 (dump_aggr_type): Likewise.
3761 (dump_type_prefix): Likewise.
3762 (dump_type_suffix): Likewise.
3763 (dump_global_iord): Likewise.
3764 (dump_simple_decl): Likewise.
3765 (dump_decl): Likewise.
3766 (dump_template_decl): Likewise.
3767 (dump_function_decl): Likewise.
3768 (dump_parameters): Likewise.
3769 (dump_exception_spec): Likewise.
3770 (dump_function_name): Likewise.
3771 (dump_template_parms): Likewise.
3772 (dump_char): Likewise.
3773 (dump_expr_list): Likewise.
3774 (dump_expr): Likewise.
3775 (dump_binary_op): Likewise.
3776 (dump_unary_op): Likewise.
3777 (type_as_string): Likewise.
3778 (expr_as_string): Likewise.
3779 (decl_as_string): Likewise.
3780 (context_as_string): Likewise.
3781 (lang_decl_name): Likewise.
3782 (cp_file_of): Likewise.
3783 (cp_line_of): Likewise.
3784 (decl_to_string): Likewise.
3785 (expr_to_string): Likewise.
3786 (fndecl_to_string): Likewise.
3787 (code_to_string): Likewise.
3788 (language_to_string): Likewise.
3789 (parm_to_string): Likewise.
3790 (op_to_string): Likewise.
3791 (type_to_string): Likewise.
3792 (assop_to_string): Likewise.
3793 (args_to_string): Likewise.
3794 (cv_to_string): Likewise.
3795 (cxx_print_error_function): Likewise.
3796 (cp_diagnostic_starter): Likewise.
3797 (cp_diagnostic_finalizer): Likewise.
3798 (cp_print_error_function): Likewise.
3799 (function_category): Likewise.
3800 (print_instantiation_full_context): Likewise.
3801 (print_instantiation_partial_context): Likewise.
3802 (maybe_print_instantiation_context): Likewise.
3803 (print_instantiation_context): Likewise.
3804 (cp_printer): Likewise.
3805 (print_integer): Likewise.
3806 (print_non_consecutive_character): Likewise.
3807 (locate_error): Likewise.
3808
3809 2003-03-06 Mark Mitchell <mark@codesourcery.com>
3810
3811 PR c++/9965
3812 * call.c (reference_binding): Add ref_is_var parameter.
3813 (implicit_conversion): Adjust call to reference_binding.
3814 (initialize_reference): Likewise.
3815
3816 PR c++/9400
3817 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
3818 PARM_DECLs.
3819
3820 PR c++/9791
3821 * class.c (get_basefndecls): Use lookup_fnfields_1.
3822
3823 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3824
3825 PR c++/9188
3826 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
3827 in error message.
3828 (cp_parser_single_declaration): Likewise.
3829
3830 2003-03-05 Jason Merrill <jason@redhat.com>
3831
3832 PR c++/9440
3833 * call.c (build_conditional_expr): Use convert rather than an
3834 explicit NOP_EXPR.
3835
3836 2003-03-02 Matt Austern <austern@apple.com>
3837
3838 * decl.c (cp_binding_level): Add static_decls varray member.
3839 (add_decl_to_level): Add static/inline namespace scope
3840 declarations to static_decls array.
3841 (wrapup_global_for_namespace): Pass static_decls only, instead of
3842 all decls, to wrapup_global_declarations/check_global_declarations.
3843 (push_namespace): Initialize static_decls for ordinary namespaces.
3844 (cxx_init_decl_processing): Initialize static_decls for global
3845 namespace.
3846
3847 2003-03-05 Mark Mitchell <mark@codesourcery.com>
3848
3849 * class.c (end_of_class): Correct thinko.
3850
3851 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
3852
3853 * config-lang.in: Replace ${libstdcxx_version} by its value.
3854
3855 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3856
3857 * cp-tree.h (cxx_saved_binding): Declare.
3858 (struct saved_scope): Adjust type of field 'old_binding'.
3859 * decl.c (cxx_saved_binding_make): New macro.
3860 (struct cxx_saved_binding): Define.
3861 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
3862 C++ bindings.
3863 (maybe_push_to_top_level): Adjust local variable type.
3864 (pop_from_top_level): Likewise.
3865
3866 2003-03-04 Tom Tromey <tromey@redhat.com>
3867
3868 * Make-lang.in (c++.tags): New target.
3869
3870 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
3871
3872 * Make-lang.in: Update.
3873
3874 2003-03-03 Jason Merrill <jason@redhat.com>
3875
3876 * decl.c (finish_enum): Do set the type in a template. Simplify.
3877 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
3878
3879 2003-03-03 Mark Mitchell <mark@codesourcery.com>
3880
3881 PR c++/9878
3882 * call.c (convert_class_to_reference): Correct conversion
3883 sequences.
3884 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
3885 (implicit_conversion): Adjust call to reference_binding.
3886 (add_candidate): Change type of candidates parameter.
3887 (add_function_candidate): Likewise.
3888 (add_conv_candidate): Likewise.
3889 (build_builtin_candidate): Likewise.
3890 (add_builtin_candidate): Likewise.
3891 (add_builtin_candidates): Likewise.
3892 (add_template_candidate_real): Likewise.
3893 (add_template_candidate): Likewise.
3894 (add_template_conv_candidate): Likewise.
3895 (build_user_type_conversion_1): Adjust accordingly.
3896 (build_object_call): Likewise.
3897 (build_conditional_expr): Likewise.
3898 (add_candidates): Likewise.
3899 (build_new_op): Likewise.
3900 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
3901 (build_new_method_call): Adjust calls to add_function_candidate.
3902 (make_temporary_var_for_ref_to_temp): New function.
3903 (initialize_reference): Add decl parameter.
3904 * class.c (build_rtti_vtbl_entries): Use build_address and
3905 build_nop.
3906 * cp-tree.h (initialize_reference): Change prototype.
3907 (make_temporary_var_for_ref_to_temp): New function.
3908 (build_type_conversion): Change prototype.
3909 (build_address): New function.
3910 (build_nop): Likewise.
3911 * cvt.c (cp_convert_to_pointer): Adjust call to
3912 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
3913 Use build_nop.
3914 (convert_to_pointer_force): Use build_nop.
3915 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
3916 (convert_to_reference): Adjust call to build_type_conversion.
3917 (ocp_convert): Likewise.
3918 (build_type_conversion): Remove for_sure parameter.
3919 * decl.c (grok_reference_init): Use initialize_reference.
3920 * typeck.c (build_address): New function.
3921 (build_nop): Likewise.
3922 (build_unary_op): Use them.
3923 (build_ptrmemfunc): Tidy slightly.
3924 (convert_for_initialization): Adjust call to
3925 initialize_reference.
3926 * typeck2.c (store_init_value): Remove #if 0'd code.
3927
3928 2003-03-03 Jason Merrill <jason@redhat.com>
3929
3930 * decl.c (start_function): Clear DECL_NUM_STMTS.
3931
3932 * class.c (get_vtable_decl): Use vtbl_type_node.
3933 (build_primary_vtable): Check for it.
3934
3935 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
3936
3937 * decl.c (check_initializer): Check for vector_opaque_p.
3938
3939 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
3940
3941 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
3942 invoke an external cpp during compilation.
3943
3944 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3945
3946 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
3947 that of warning().
3948 (start_decl): Likewise.
3949 (start_function): Likewise.
3950
3951 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
3952
3953 * Make-lang.in (CXX_C_OBJS): Update.
3954
3955 2003-02-28 Mark Mitchell <mark@codesourcery.com>
3956
3957 PR c++/9892
3958 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
3959 instantiating it.
3960
3961 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
3962
3963 * parser.c (cp_parser_init_declarator): Revert opaque
3964 vector_opaque_p change.
3965 Do not include target.h.
3966
3967 2003-02-28 Mark Mitchell <mark@codesourcery.com>
3968
3969 PR c++/9879
3970 * cp-tree.h (build_zero_init): Add parameter.
3971 * decl.c (cp_finish_decl): Adjust call.
3972 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
3973 calls.
3974 (build_default_init): Add nelts parameter. Adjust calls to
3975 build_zero_init.
3976 (build_new_1): Adjust call to build_default_init.
3977 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
3978
3979 2003-02-26 Devang Patel <dpatel@apple.com>
3980
3981 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
3982 required. Postpone enum setting for template decls.
3983 (build_enumerator): Delay copying value node until finish_enum
3984 (). Remove #if 0'ed code.
3985 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
3986 (tsubst_copy): Add check for enum type.
3987
3988 2003-02-25 Mark Mitchell <mark@codesourcery.com>
3989
3990 PR c++/9683
3991 * decl2.c (prune_vars_needing_no_initialization): Do not throw
3992 away initializations for DECL_EXTERNAL VAR_DECLs.
3993 (finish_file): Adjust accordingly.
3994 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
3995
3996 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
3997
3998 * decl.c (add_binding): Time TV_NAME_LOOKUP.
3999 (push_class_binding): Likewise.
4000 (set_namespace_binding): Likewise.
4001
4002 2003-02-24 Mark Mitchell <mark@codesourcery.com>
4003
4004 PR c++/9836
4005 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4006 specializations back to the main template.
4007 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4008 * pt.c (resolve_typename_type): Likewise.
4009
4010 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
4011
4012 PR c++/9778
4013 * pt.c (tsubst_copy_and_build): For a templated function inside a
4014 scope, process template arguments.
4015
4016 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4017
4018 PR c++/9602
4019 * typeck2.c (abstract_virtuals_error): Don't check when
4020 TYPE is still template parameter dependent.
4021
4022 2003-02-23 Mark Mitchell <mark@codesourcery.com>
4023
4024 PR c++/5333
4025 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4026 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4027 * pt.c (instantiate_class_template): Don't try to instantiate
4028 dependent types.
4029 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4030
4031 2003-02-21 Mark Mitchell <mark@codesourcery.com>
4032
4033 PR c++/9749
4034 * decl.c (grokdeclarator): Do not allow parameters with variably
4035 modified types.
4036
4037 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
4038
4039 * search.c (grow_bfs_bases): Remove. Fold into ...
4040 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4041 in previous patch.
4042
4043 2003-02-20 Mark Mitchell <mark@codesourcery.com>
4044
4045 PR c++/9729
4046 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4047 when the G++ 3.2 ABI prevents correct compilation.
4048
4049 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
4050
4051 Change base class access representation. Share virtual base
4052 binfos.
4053 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4054 call.
4055 * cp/class.c (build_base_path): Likewise.
4056 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4057 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4058 (make_new_vtable): Adjust.
4059 (force_canonical_binfo_r): Delete.
4060 (force_canonical_binfo): Delete.
4061 (mark_primary_virtual_base): Delete.
4062 (dfs_unshared_virtual_bases): Delete.
4063 (mark_primary_bases): Adjust.
4064 (maybe_warn_about_overly_private_class): Adjust.
4065 (dfs_base_derived_from): Delete.
4066 (base_derived_from): Follow the inheritance chain.
4067 (struct find_final_overrider_data): Add vpath member.
4068 (dfs_find_final_overrider): Adjust.
4069 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4070 (find_final_overrider): Adjust.
4071 (update_vtable_entry_for_fn): Adjust.
4072 (modify_all_vtables): Adjust.
4073 (walk_subobject_offsets): Adjust.
4074 (layout_nonempty_base_or_field): Adjust.
4075 (layout_empty_base): Remove last parameter. Adjust.
4076 (build_base_field): Adjust.
4077 (build_base_fields): Adjust.
4078 (propagate_binfo_offsets): Remove last parameter. Adjust.
4079 (dfs_set_offset_for_unshared_vbases): Delete.
4080 (layout_virtual_bases): Adjust.
4081 (finish_struct_1): Adjust.
4082 (init_class_processing): Don't init access nodes.
4083 (dfs_get_primary_binfo): Delete.
4084 (get_primary_binfo): Adjust.
4085 (dump_class_hierarchy_r): Remove most derived arg, add IGO
4086 parameter. Adjust.
4087 (dump_class_hierarchy): Adjust.
4088 (finish_vtbls): Adjust.
4089 (get_original_base): Delete.
4090 (build_vtt_inits): Adjust.
4091 (dfs_build_secondary_vptr_vtt_inits): Adjust.
4092 (dfs_ctor_vtable_bases_queue_p): Adjust.
4093 (build_ctor_vtbl_group): Adjust.
4094 (dfs_accumulate_vtbl_inits): Adjust.
4095 (build_vtbl_initializer): Adjust.
4096 (build_vbase_offset_vtbl_entries): Adjust.
4097 (add_vcall_offset_vtbl_entries_1): Adjust.
4098 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4099 (access_*_node): Remove.
4100 (CANONICAL_BINFO): Delete.
4101 (BINFO_UNSHARED_MARKED): Remove.
4102 (BINFO_MARKED): Set LANG_FLAG_0 directly.
4103 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4104 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4105 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4106 Delete.
4107 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4108 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4109 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4110 Delete.
4111 (BINFO_DEPENDENT_BASE_P): New.
4112 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4113 index.
4114 (markedp, unmarkedp): Adjust.
4115 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4116 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4117 find_vbase_instance, binfo_for_vbase): Delete.
4118 (copied_binfo, original_binfo): Declare.
4119 (finish_base_specifier): Add virtual_p arg.
4120 (unshare_base_binfos): Delete.
4121 (copy_base_binfos): Declare.
4122 (reverse_path): Delete.
4123 * cp/decl.c (xref_basetypes): Access and virtuality passed
4124 differently. Don't copy direct base binfos here. Call
4125 copy_base_binfos.
4126 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4127 (initialize_vtbl_ptrs): Adjust.
4128 (expand_member_init): Adjust.
4129 * cp/parser.c (cp_parser_base_specifier): Adjust.
4130 * cp/pt.c (instantiate_class_template): Adjust.
4131 (get_template_base_recursive): Adjust.
4132 * cp/rtti.c (get_pseudo_ti_init): Adjust.
4133 (get_pseudo_ti_desc): Adjust.
4134 * cp/tree.c (unshare_base_binfos): Rename to ...
4135 (copy_base_binfos): ... here, reimplement.
4136 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4137 (reverse_path): Remove.
4138 * cp/typeck.c (get_delta_difference): Adjust error messages.
4139 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4140 * cp/search.c (lookup_base_r): Adjust.
4141 (dynamic_cast_base_recurse): Adjust.
4142 (canonical_binfo): Remove.
4143 (dfs_canonical_queue): Remove.
4144 (dfs_assert_unmarked_p): Remove.
4145 (assert_canonical_unmarked): Remove.
4146 (shared_marked_p, shared_unmarked_p): Remove.
4147 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4148 (dfs_access_in_type): Adjust.
4149 (access_in_type): Adjust.
4150 (dfs_accessible_queue_p): Adjust.
4151 (dfs_accessible_p): Adjust.
4152 (is_subobject_of_p_1, is_subobject_of_p): Remove.
4153 (struct lookup_field_info): Remove from_dep_base_p field.
4154 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4155 (lookup_field_r): Remove dependent base code.
4156 (lookup_member): Likewise.
4157 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4158 (dfs_unmarked_real_bases_queue_p): Remove.
4159 (dfs_marked_real_bases_queue_p): Remove.
4160 (dfs_skip_vbases): Remove.
4161 (dfs_get_pure_virtuals): Adjust.
4162 (markedp, unmarkedp): Adjust.
4163 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4164 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4165 (dfs_unmark): Adjust.
4166 (dfs_get_vbase_types):Remove.
4167 (dfs_build_inheritance_graph_order): Remove.
4168 (get_vbase_types): Remove
4169 (dfs_find_vbase_instance): Remove.
4170 (find_vbase_instance): Remove.
4171 (dfs_debug_unmarkedp): Adjust.
4172 (dependent_base_p): Remove.
4173 (dfs_push_type_decls): Adjust.
4174 (dfs_push_decls): Adjust.
4175 (dfs_no_overlap_yet): Adjust.
4176 (copied_binfo): New function.
4177 (original_binfo): New function.
4178 (binfo_for_vbase): Remove.
4179
4180 2003-02-18 Zack Weinberg <zack@codesourcery.com>
4181
4182 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4183 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4184 vectors, for speed.
4185
4186 2003-02-18 Mark Mitchell <mark@codesourcery.com>
4187
4188 PR c++/9704
4189 * class.c (layout_class_type): In the 3.2 ABI, take into account
4190 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4191
4192 2003-02-18 Matt Austern <austern@apple.com>
4193
4194 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4195 nothing for C++.
4196 * cp/decl.c (wrapup_globals_for_namespace): Remove special
4197 handling of global namespace.
4198
4199 2003-02-18 Geoffrey Keating <geoffk@apple.com>
4200
4201 * cp-tree.h (rid_to_yy): Delete.
4202 (C_RID_YYCODE): Delete.
4203 (finish_file): Delete redundant declaration.
4204
4205 2003-02-18 Jason Merrill <jason@redhat.com>
4206
4207 PR c++/9623
4208 * decl.c (reshape_init): Don't mess with initializer labels.
4209
4210 PR c++/9485
4211 * parser.c (cp_parser_postfix_expression): Set idk properly for
4212 object->scope::member.
4213
4214 2003-02-18 Ben Elliston <bje@redhat.com>
4215
4216 PR other/7350
4217 * decl.c (duplicate_decls): Fix typo in comment.
4218
4219 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
4220
4221 PR debug/9717
4222 * class.c (build_base_field): Mark fields for base classes with
4223 DECL_IGNORED_P.
4224
4225 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4226
4227 PR c++/9457
4228 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
4229 CONSTRUCTOR_ELTS only once.
4230
4231 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4232
4233 PR c++/9459
4234 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
4235 (dump_type_suffix): Likewise.
4236
4237 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
4238
4239 * search.c: ANSIfy function declarations and definitions.
4240 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
4241 * call.c (build_method_call, resolve_scoped_fn_name,
4242 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
4243 calls.
4244 * class.c (handle_using_decl): Likewise.
4245 * decl.c (make_typename_type, make_unmound_class_template,
4246 start_decl, compute_array_index_type): Likewise.
4247 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
4248 * init.c (expand_member_init, build_member_call): Likewise.
4249 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
4250 resolve_typename_type): Likewise.
4251 * typeck.c (lookup_destructor, finish_class_member_access_exprm
4252 build_prememfunc_access_expr): Likewise.
4253
4254 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4255
4256 * decl2.c: Include "timevar.h".
4257 (namespace_ancestor): Time name lookup.
4258 (add_using_namespace): Likewise.
4259 (lookup_using_namespace): Likewise.
4260 (qualified_lookup_using_namespace): Likewise.
4261 (decl_namespace): Likewise.
4262 (lookup_arg_dependent): Likewise.
4263 * lex.c (do_identifier): Likewise.
4264 (do_scoped_id): Likewise.
4265 * pt.c (lookup_template_class): Likewise.
4266
4267 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
4268
4269 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
4270
4271 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
4272
4273 * decl.c: Include "timevar.h".
4274 (poplevel): Time name lookup.
4275 (find_binding): Likewise.
4276 (push_namespace): Likewise.
4277 (pop_nested_namespace): Likewise.
4278 (store_bindings): Likewise.
4279 (maybe_push_to_top_level): Likewise.
4280 (pop_from_top_level): Likewise.
4281 (push_local_name): Likewise.
4282 (pushtag): Likewise.
4283 (pushdecl): Likewise.
4284 (pushdecl_with_scope): Likewise.
4285 (pushdecl_namespace_level): Likewise.
4286 (pushdecl_top_level): Likewise.
4287 (pushdecl_class_level): Likewise.
4288 (push_class_level_binding): Likewise.
4289 (push_using_decl): Likewise.
4290 (push_using_directive): Likewise.
4291 (push_overloaded_decl): Likewise.
4292 (lookup_label): Likewise.
4293 (define_label): Likewise.
4294 (lookup_tag): Likewise.
4295 (lookup_tag_reverse): Likewise.
4296 (lookup_namespace_name): Likewise.
4297 (select_decl): Likewise.
4298 (unqualified_namespace_lookup): Likewise.
4299 (lookup_name_real): Likewise.
4300 (lookup_name_current_level): Likewise.
4301 (lookup_type_current_level): Likewise.
4302 (maybe_inject_for_scope_var): Likewise.
4303 (xref_tag): Likewise.
4304
4305 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
4306
4307 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
4308
4309 * decl.c (build_enumerator): Remove unneeded test.
4310
4311 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
4312
4313 * cp-tree.h (struct lang_type_header): Make all fields unsigned
4314 char.
4315
4316 2003-02-03 Mark Mitchell <mark@codesourcery.com>
4317
4318 PR c++/7129
4319 * call.c (z_candidate): Add args.
4320 (convert_class_to_reference): Set it.
4321 (implicit_conversion): Tidy.
4322 (add_candidate): Add args parameter.
4323 (add_function_candidate): Adjust call to add_candidate.
4324 (add_conv_candidate): Likewise.
4325 (build_builtin_candidate): Likewise.
4326 (build_user_type_conversion_1): Eliminate wasteful tree_cons
4327 usage.
4328 (build_new_function_call): Likewise.
4329 (build_object_call): Likewise.
4330 (add_candidates): New function.
4331 (build_new_op): Use it.
4332 (covert_like_real): Adjust call to build_over_call.
4333 (build_over_call): Remove args parameter.
4334 * operators.def: Add <?= and >?=.
4335
4336 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
4337
4338 * typeck.c (build_indirect_ref): Don't check flag_volatile.
4339
4340 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4341
4342 PR c++/8849
4343 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
4344
4345 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
4346
4347 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
4348 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
4349 (BINFO_LANG_ELTS): New #define.
4350 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
4351
4352 2003-01-30 Geoffrey Keating <geoffk@apple.com>
4353
4354 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
4355
4356 2003-01-30 Mark Mitchell <mark@codesourcery.com>
4357
4358 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
4359 for class types.
4360 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
4361 rather than TYPE_LANG_FLAG_0.
4362 (TYPE_BUILT_IN): Remove.
4363 (TYPE_DEPENDENT_P): New macro.
4364 (TYPE_DEPENDENT_P_VALID): Likewise.
4365 (lang_type_class): Add fields_readonly.
4366 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
4367 * pt.c (dependent_type_p_r): New function, split out from ...
4368 (dependent_type_p): ... here. Memoize results.
4369 * search.c (dependent_base_p): Use dependent_type_p, not
4370 uses_template_parms.
4371 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
4372 for class types.
4373
4374 2003-01-29 Mark Mitchell <mark@codesourcery.com>
4375
4376 * call.c (build_field_call): Use build_new_op, not build_opfncall.
4377 (prep_operand): New function.
4378 (build_new_op): Use it. Remove dead code.
4379 * class.c (pushclass): Change "modify" parameter type from int to
4380 bool.
4381 (currently_open_class): Use same_type_p, not pointer equality.
4382 (push_nested_class): Adjust calls to pushclass, remove modify
4383 parameter.
4384 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
4385 (pushclass): Change prototype.
4386 (push_nested_class): Likewise.
4387 (grokoptypename): Remove.
4388 (build_opfncall): Remove.
4389 (value_dependent_expression_p): Declare.
4390 (resolve_typename_type): Likewise.
4391 (resolve_typename_type_in_current_instantiation): Likewise.
4392 (enter_scope_of): Remove.
4393 (tsubst): Remove.
4394 (tsubst_expr): Likewise.
4395 (tsubst_copy): Likewise.
4396 (tsubst_copy_and_build): Likewise.
4397 * decl.c (warn_about_implicit_typename_lookup): Remove.
4398 (finish_case_label): Return error_mark_node for erroneous labels.
4399 (start_decl): Adjust calls to push_nested_class.
4400 (grokfndecl): Call push_scope/pop_scope around call to
4401 duplicate_decls.
4402 (grokdeclarator): Do not call tsubst.
4403 (start_function): Adjust calls to push_nested_class.
4404 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
4405 (check_classfn): Use push_scope/pop_scope around type comparisions.
4406 (grokoptypename): Remove.
4407 (push_sscope): Adjust call to push_nested_class.
4408 * error.c (dump_type): Show cv-qualification of typename types.
4409 * init.c (build_member_call): Use build_new_op, not
4410 build_opfncall.
4411 * method.c (build_opfncall): Remove.
4412 * parser.c (cp_parser): Add allow_non_constant_expression_p and
4413 non_constant_expression_p.
4414 (cp_parser_constant_expression): Adjust prototype.
4415 (cp_parser_resolve_typename_type): Remove.
4416 (cp_parser_non_constant_expression): New function.
4417 (cp_parser_non_constant_id_expression): Likewise.
4418 (cp_parser_new): Set allow_non_constant_expression_p and
4419 non_constant_expression_p.
4420 (cp_parser_primary_expression): Reject `this' and `va_arg' in
4421 constant-expressions. Note that dependent names aren't really
4422 constant.
4423 (cp_parser_postfix_expression): Reject conversions to non-integral
4424 types in constant-expressions. Neither are increments or
4425 decrements.
4426 (cp_parser_unary_expression): Reject increments and decrements in
4427 constant-expressions.
4428 (cp_parser_direct_new_declarator): Adjust call to
4429 cp_parser_constant_expression.
4430 (cp_parser_cast_expression): Reject conversions to non-integral
4431 types in constant-expressions.
4432 (cp_parser_assignment_expression): Rejects assignments in
4433 constant-expressions.
4434 (cp_parser_expression): Reject commas in constant-expressions.
4435 (cp_parser_labeled_statement): Adjust call to
4436 cp_parser_constant_expression.
4437 (cp_parser_direct_declarator): Simplify array bounds, even in
4438 templates, when they are non-dependent. Use
4439 resolve_typename_type, not cp_parser_resolve_typename_type.
4440 (cp_parser_class_head): Use resolve_typename_type, not
4441 cp_parser_resolve_typename_type.
4442 (cp_parser_member_declaration): Adjust call to
4443 cp_parser_constant_expression.
4444 (cp_parser_constant_initializer): Likewise.
4445 (cp_parser_constructor_declarator): Use resolve_typename_type, not
4446 cp_parser_resolve_typename_type.
4447 (cp_parser_late_parsing_default_args): Adjust call to
4448 push_nested_class.
4449 * pt.c (tsubst): Give it internal linkage.
4450 (tsubst_expr): Likewise.
4451 (tsubst_copy): Likewise.
4452 (tsubst_copy_and_build): Likewise.
4453 (push_access_scope_real): Likewise.
4454 (tsubst_friend_class): Likewise.
4455 (instantiate_class_template): Adjust call to pushclass.
4456 (value_dependent_expression_p): Give it external linkage.
4457 Robustify.
4458 (resolve_typename_type): New function.
4459 * semantics.c (finish_call_expr): Use build_new_op, not
4460 build_opfncall.
4461 (begin_constructor_declarator): Remove.
4462 (begin_class_definition): Adjust call to pushclass.
4463 (enter_scope_of): Remove.
4464 * typeck.c (comptypes): Resolve typename types as appropriate.
4465 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
4466 (build_x_compound_expr): Likewise.
4467 (build_modify_expr): Likewise.
4468 (build_x_modify_expr): Likewise.
4469 * typeck2.c (build_x_arrow): Likewise.
4470
4471 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
4472
4473 * pt.c (last_pending_template) Declare GTY().
4474
4475 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4476
4477 PR c++/8591
4478 * parser.c (cp_parser_elaborated_type_specifier): Convert
4479 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
4480 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
4481
4482 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
4483
4484 PR c++/9437
4485 * pt.c (unify): Don't unify '*T' with 'U C::*'.
4486
4487 PR c++/3902
4488 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
4489 inside a declarator.
4490
4491 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
4492
4493 * class.c (update_vtable_entry_for_fn): Add index parameter.
4494 Generate vcall thunk for covariant overriding from a virtual
4495 primary base.
4496 (dfs_modify_vtables): Adjust.
4497
4498 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
4499
4500 PR c++/9403
4501 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
4502 template keyword.
4503 (cp_parser_base_specifier): Look for and consume a
4504 TEMPLATE keyword. Replace switch with array index.
4505
4506 PR c++/795
4507 * semantics.c (finish_non_static_data_member): Remember the
4508 field's type even in a template.
4509
4510 PR c++/9415
4511 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
4512 already scoped.
4513
4514 PR c++/8545
4515 * parser.c (cp_parser_cast_expression): Be more tentative.
4516
4517 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4518
4519 * cp-tree.h (flagged_type_tree_s): Remove.
4520 (check_for_new_type): Likewise.
4521 * typeck2.c (check_for_new_type): Likewise.
4522
4523 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
4524
4525 * dump.c: ANSIfy function declarations and definitions.
4526
4527 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
4528
4529 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4530
4531 PR c++/9354
4532 * init.c (build_new): Set the type of the new-expression, even
4533 when processing_templte_decl.
4534
4535 PR c++/9216
4536 * parser.c (cp_parser_primary_expression): Improve error message
4537 for templates used in an expression context.
4538
4539 PR c++/8696
4540 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
4541 parse when encountering "typedef".
4542
4543 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
4544
4545 * class.c, parser.c: ANSIfy function definitions and declarations.
4546
4547 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4548
4549 PR c++/9328
4550 * error.c (dump_decl): For an OVERLOAD, just print the name of the
4551 function; it doesn't make sense to try to print its type.
4552 * semantics.c (finish_typeof): Issue errors about invalid uses.
4553
4554 PR c++/9298
4555 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
4556 function.
4557 (cp_parser_expression_statement): Use it.
4558 (cp_parser_explicit_instantiation): Likewise.
4559 * pt.c (do_decl_instantiation): Improve error handling logic.
4560
4561 2003-01-22 Mark Mitchell <mark@codesourcery.com>
4562
4563 PR c++/9384
4564 * parser.c (cp_parser_using_declaration): Issue error messages
4565 about name resolution failures here.
4566
4567 PR c++/9388
4568 * class.c (currently_open_derived_class): Use dependent_type_p.
4569 * cp-tree.h (dependent_type_p): New function.
4570 (dependent_template_arg_p): Likewise.
4571 (dependent_template_p): Likewise.
4572 (type_dependent_expression_p): Likewise.
4573 * parser.c (cp_parser_dependent_type_p): Remove.
4574 (cp_parser_value_dependent_type_p): Likewise.
4575 (cp_parser_type_dependent_expression_p): Likewise.
4576 (cp_parser_dependent_template_arg_p): Likewise.
4577 (cp_parser_dependent_template_id_p): Likewise.
4578 (cp_parser_dependent_template_p): Likewise.
4579 (cp_parser_diagnose_invalid_type_name): Replace
4580 cp_parser_dependent_type_p with dependent_type_p, etc.
4581 (cp_parser_primary_expresion): Likewise.
4582 (cp_parser_nested_name_specifier_opt): Likewise.
4583 (cp_parser_postfix_expression): Likewise.
4584 (cp_parser_unary_expression): Likewise.
4585 (cp_parser_template_name): Likewise.
4586 (cp_parser_class_name): Likewise.
4587 (cp_parser_lookup_name): Likewise.
4588 * pt.c (dependent_type_p): New function.
4589 (value_dependent_expression_p): Likewise.
4590 (type_dependent_expression_p): Likewise.
4591 (dependent_template_arg_p): Likewise.
4592 (dependent_template_id_p): Likewise.
4593 (dependent_template_p): Likewise.
4594
4595 PR c++/9285
4596 PR c++/9294
4597 * parser.c (cp_parser_simple_declaration): Return quickly when
4598 encountering errors.
4599
4600 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4601
4602 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
4603
4604 2003-01-17 Jason Merrill <jason@redhat.com>
4605
4606 PR c++/9167, c++/9358
4607 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
4608
4609 2003-01-17 Jason Merrill <jason@redhat.com>
4610
4611 PR c++/9342
4612 * call.c (build_conditional_expr): Always do lvalue-rvalue
4613 conversion.
4614
4615 2003-01-17 Mark Mitchell <mark@codesourcery.com>
4616
4617 PR c++/9294
4618 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
4619 * cp-tree.h (BASELINK_BINFO): Adjust.
4620 (BASELINK_FUNCTIONS): Likewise.
4621 (BASELINK_ACCESS_BINFO): Likewise.
4622 (tree_baselink): New structure.
4623 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
4624 (lang_tree_node): Add baselink.
4625 * decl.c (cp_tree_node_structure): Add BASELINK case.
4626 * search.c (build_baselink): Adjust.
4627 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
4628 test from TREE_LIST case.
4629
4630 PR c++/9272
4631 * parser.c (cp_parser_constructor_declarator_p): Do not assume
4632 that a constructor cannot be declared outside of its own class.
4633
4634 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
4635 be resolved, neither can the qualified name.
4636
4637 * rtti.c (get_pseudo_ti_desc): Fix thinko.
4638
4639 2003-01-16 Jason Merrill <jason@redhat.com>
4640
4641 PR c++/8564
4642 * init.c (build_vec_init): Re-add maxindex parm.
4643 (perform_member_init, build_aggr_init): Pass it.
4644 (build_new_1): Pass it. Use an incomplete array type for full_type.
4645 * typeck.c (build_modify_expr): Pass it.
4646 * cp-tree.h: Adjust.
4647
4648 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
4649
4650 * cp-tree.h (tsubst_copy_and_build): New declaration.
4651 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
4652 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
4653 (tsubst_copy_and_build): New function.
4654
4655 2003-01-16 Mark Mitchell <mark@codesourcery.com>
4656
4657 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
4658 (PARTIAL_INSTANTIATION_P): Remove.
4659 (IMPLICIT_TYPENAME_P): Likewise.
4660 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
4661 (build_typename_type): Remove declaration.
4662 (parmlist_is_exprlist): Likewise.
4663 * decl.c (build_typename_type): Make it static, remove third
4664 parameter.
4665 (push_class_binding): Don't do implicit typename stuff.
4666 (make_typename_type): Likewise.
4667 (lookup_name_real): Likewise.
4668 (grokdeclarator): Don't try to convert declarations into
4669 initializations. Don't do implicit typename stuff.
4670 (parmlist_is_exprlist): Remove.
4671 (xref_basetypes): Simplify.
4672 * decl2.c (grokfield): Don't try to convert declarations into
4673 initializations.
4674 (build_anon_union_vars): Do this while processing templates, too.
4675 (finish_anon_union): Likewise.
4676 * error.c (dump_type): Remove implicit typename handling.
4677 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
4678 (cp_parser_primary_expression): Correct handling of names not
4679 found by unqualified name lookup in templates.
4680 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
4681 of types when possible.
4682 (cp_parser_simple_declaration): Complain intelligently about some
4683 invalid declarations.
4684 (cp_parser_member_declaration): Likewise.
4685 (cp_parser_constructor_declarator_p): Don't check when we're in a
4686 function scope.
4687 * pt.c (instantiate_class_template): Remove
4688 PARTIAL_INSTANTIATION_P gunk.
4689 * search.c (lookup_field_r): Don't build implicit typenames.
4690 (marked_pushdecls_p): Don't enter dependent base types.
4691 (unmarked_pushdecls_p): Likewise.
4692 * semantics.c (begin_class_definition): Remove implicit typename
4693 stuff.
4694
4695 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
4696
4697 PR c++/9212
4698 * parser.c (cp_parser_direct_declarator): If accepting either
4699 abstract or named, the name must be an unqualified-id.
4700
4701 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4702
4703 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
4704
4705 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4706
4707 * decl2.c (check_classfn): Fix uninitialized warning.
4708 (build_anon_union_vars): Likewise.
4709 * pt.c (tsubst_copy): Likewise.
4710
4711 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
4712
4713 Further conform g++'s __vmi_class_type_info to the C++ ABI
4714 specification.
4715 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
4716 the specification.
4717 (class_hint_flags): Likewise.
4718
4719 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4720
4721 * config-lang.in: Add semantics.c to gtfiles.
4722 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
4723 (saved_scope): Likewise.
4724 (type_lookups): Remove.
4725 (deferred_access): New structure.
4726 (type_access_control): Remove.
4727 (save_type_access_control): Likewise.
4728 (reset_type_access_control): Likewise.
4729 (decl_type_access_control): Likewise.
4730 (push_deferring_access_checks): Declare.
4731 (resume_deferring_access_checks): Likewise.
4732 (stop_deferring_access_checks): Likewise.
4733 (pop_deferring_access_checks): Likewise.
4734 (get_deferred_access_checks): Likewise.
4735 (pop_to_parent_deferring_access_checks): Likewise.
4736 (perform_deferred_access_checks): Likewise.
4737 (perform_or_defer_access_check): Likewise.
4738 * decl.c (make_typename_type): Use perform_or_defer_access_check.
4739 (make_unbound_class_template): Likewise.
4740 (grokdeclarator): Don't call decl_type_access_control.
4741 * parser.c (cp_parser_context): Remove deferred_access_checks
4742 and deferring_access_checks_p fields.
4743 (cp_parser_context_new): Adjust.
4744 (cp_parser): Remove access_checks_lists.
4745 (cp_parser_defer_access_check): Remove.
4746 (cp_parser_start_deferring_access_checks): Remove.
4747 (cp_parser_stop_deferring_access_checks): Remove.
4748 (cp_parser_perform_deferred_access_checks): Remove.
4749 (cp_parser_nested_name_specifier_opt): Use new deferred access
4750 functions.
4751 (cp_parser_simple_declaration): Likewise.
4752 (cp_parser_template_id): Likewise.
4753 (cp_parser_function_definition): Likewise.
4754 (cp_parser_class_specifier): Likewise.
4755 (cp_parser_lookup_name): Likewise.
4756 (cp_parser_single_declaration): Likewise.
4757 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
4758 (cp_parser_parse_tentatively): Likewise.
4759 (cp_parser_parse_definitely): Likewise.
4760 (yyparse): Likewise.
4761 (cp_parser_init_declarator): Remove access_checks parameter.
4762 Use new deferred access functions.
4763 (cp_parser_function_definition_from_specifiers_and_declarator):
4764 Likewise.
4765 (cp_parser_class_head): Remove deferring_access_checks_p and
4766 saved_access_checks parameters. Use new deferred access functions.
4767 (cp_parser_member_specification_opt): Don't call
4768 reset_type_access_control.
4769 * search.c (type_access_control): Remove.
4770 * semantics.c: Include "gt-cp-semantics.h".
4771 (deferred_type_access_control): Remove.
4772 (deferred_access_stack): New variable.
4773 (deferred_access_free_list): Likewise.
4774 (push_deferring_access_checks): New function.
4775 (resume_deferring_access_checks): Likewise.
4776 (stop_deferring_access_checks): Likewise.
4777 (pop_deferring_access_checks): Likewise.
4778 (get_deferred_access_checks): Likewise.
4779 (pop_to_parent_deferring_access_checks): Likewise.
4780 (perform_deferred_access_checks): New function, adapted from
4781 cp_parser_perform_deferred_access_checks.
4782 (perform_or_defer_access_check): New function, adapted from
4783 cp_parser_defer_access_check.
4784 (current_type_lookups): Remove.
4785 (deferred_type_access_control): Likewise.
4786 (decl_type_access_control): Likewise.
4787 (save_type_access_control): Likewise.
4788 (reset_type_access_control): Likewise.
4789 (begin_function_definition): Adjust.
4790 (begin_class_definiton): Likewise.
4791
4792 2003-01-13 Jason Merrill <jason@redhat.com>
4793
4794 PR c++/8748
4795 * class.c (build_base_path): Take the address before calling save_expr.
4796
4797 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
4798 all the ambiguous conversions are bad.
4799
4800 * class.c (maybe_warn_about_overly_private_class): Don't stop
4801 searching when we find a nonprivate method.
4802
4803 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
4804
4805 2003-01-12 Mark Mitchell <mark@codesourcery.com>
4806
4807 * cp-tree.h (get_arglist_len_in_bytes): Remove.
4808
4809 PR c++/9264
4810 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
4811 typeame types more robustly.
4812
4813 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
4814
4815 * parser.c: Fix comment typos.
4816
4817 2003-01-10 Mark Mitchell <mark@codesourcery.com>
4818
4819 PR c++/9099
4820 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
4821 an object_type which is not a class type.
4822
4823 2003-01-10 Geoffrey Keating <geoffk@apple.com>
4824
4825 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
4826 (cp_parser_late_parsing_default_args): Likewise.
4827
4828 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
4829
4830 * cfns.gperf: ANSIfy function declarations.
4831 * cfns.h: Regenerate.
4832 * cp-tree.h: ANSIfy function declarations.
4833
4834 2003-01-10 Mark Mitchell <mark@codesourcery.com>
4835
4836 * cp-tree.h (reparse_absdcl_as_expr): Remove.
4837 (reparse_absdcl_as_casts): Likewise.
4838 (reparse_decl_as_expr): Likewise.
4839 (finish_decl_parsing): Likewise.
4840 * decl2.c (reparse_absdcl_as_expr): Remove.
4841 (reparse_absdcl_as_casts): Likewise.
4842 (repase_decl_as_expr): Likewise.
4843 (finish_decl_parsing): Likewise.
4844
4845 PR c++/9128
4846 PR c++/9153
4847 PR c++/9171
4848 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
4849 function.
4850 (cp_parser_nested_name_specifier_opt): Correct the
4851 check_dependency_p false.
4852 (cp_parser_postfix_expression): Fix formatting.
4853 (cp_parser_decl_specifier_seq): Avoid looking for constructor
4854 declarators when possible.
4855 (cp_parser_template_id): Avoid performing name-lookup when
4856 possible.
4857 (cp_parser_class_head): Do not count specializations when counting
4858 levels of templates.
4859 (cp_parser_constructor_declarator_p): Return immediately if
4860 there's no chance that the tokens form a constructor declarator.
4861 * rtti.c (throw_bad_typeid): Add comment. Do not return an
4862 expression with reference type.
4863 (get_tinfo_decl_dynamic): Do not return an expression with
4864 reference type.
4865 (build_typeid): Add comment. Do not return an expression with
4866 reference type.
4867 * typeck.c (build_class_member_access_expr): Improve handling of
4868 conditionals and comma-expressions as objects.
4869
4870 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4871
4872 * cfns.gperf: ANSIfy function declarations.
4873 * cfns.h: Regenerate.
4874 * cp-tree.h: ANSIfy function declarations.
4875 * parser.c: ANSIfy function declarations & definitions.
4876
4877 * decl.c (bad_specifiers): Fix parameter order error I introduced.
4878
4879 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4880
4881 Merge from pch-branch:
4882
4883 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4884
4885 Merge to tag pch-merge-20030102:
4886
4887 * semantics.c (finish_translation_unit): Don't call finish_file.
4888 * parser.c: Don't include ggc.h.
4889 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
4890 read first token here. Don't allow PCH files after the first
4891 token is read.
4892 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
4893 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
4894 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
4895 (cp_parser_late_parsing_for_member): Don't duplicate call to
4896 cp_lexer_set_source_position_from_token.
4897 (cp_parser_late_parsing_default_args): Likewise.
4898 (yyparse): Call finish_file after clearing the_parser.
4899
4900 2002-12-11 Geoffrey Keating <geoffk@apple.com>
4901
4902 * Make-lang.in: Remove $(GGC_H) from all dependencies.
4903 (CXX_TREE_H): Add $(GGC_H).
4904 * class.c: Don't include ggc.h.
4905 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
4906 (method_name_cmp): Likewise.
4907 (resort_data): New variable.
4908 (resort_field_decl_cmp): New.
4909 (resort_method_name_cmp): New.
4910 (resort_sorted_fields): New.
4911 (resort_type_method_vec): New.
4912 (finish_struct_methods): Delete cast.
4913 (finish_struct_1): Delete cast.
4914 * cp-tree.h: Include ggc.h.
4915 (struct lang_type_class): Add reorder attribute to field `methods'.
4916 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
4917 (resort_sorted_fields): New prototype.
4918 (resort_type_method_vec): New prototype.
4919 * call.c: Don't include ggc.h.
4920 * decl.c: Likewise.
4921 * decl2.c: Likewise.
4922 * init.c: Likewise.
4923 * lex.c: Likewise.
4924 * method.c: Likewise.
4925 * optimize.c: Likewise.
4926 * parse.y: Likewise.
4927 * pt.c: Likewise.
4928 * repo.c: Likewise.
4929 * search.c: Likewise.
4930 * semantics.c: Likewise.
4931 * spew.c: Likewise.
4932 * tree.c: Likewise.
4933
4934 * lang-specs.h: Remove comment.
4935
4936 2002-12-03 Geoffrey Keating <geoffk@apple.com>
4937
4938 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
4939 (operator_name_info): Mark to be saved for PCH, specify size.
4940 (assignment_operator_name_info): Likewise.
4941
4942 2002-11-19 Geoffrey Keating <geoffk@apple.com>
4943
4944 * decl.c (anon_cnt): Mark to be saved for PCH.
4945
4946 2002-10-25 Geoffrey Keating <geoffk@apple.com>
4947
4948 * lex.c (init_reswords): Delete now-untrue comment.
4949 Allocate ridpointers using GGC.
4950
4951 2002-10-04 Geoffrey Keating <geoffk@apple.com>
4952
4953 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
4954
4955 * g++spec.c (lang_specific_driver): Don't include standard
4956 libraries in `added'.
4957
4958 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
4959
4960 * decl2.c (finish_file): Call c_common_write_pch.
4961 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
4962
4963 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
4964
4965 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
4966 files when using g++.
4967 * lang-specs.h: Handle compiling C++ header files.
4968
4969 2003-01-09 Jakub Jelinek <jakub@redhat.com>
4970
4971 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
4972
4973 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4974
4975 * pt.c (push_access_scope_real): Call push_to_top_level for
4976 function in namespace scope.
4977 (pop_access_scope): Call pop_from_top_level for function in
4978 namespace scope.
4979
4980 2003-01-09 Jakub Jelinek <jakub@redhat.com>
4981
4982 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
4983
4984 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
4985
4986 * Make-lang.in (c++.install-common, c++.install-man,
4987 c++.uninstall): Prepend $(DESTDIR) to destination paths in
4988 all (un)installation commands.
4989 (c++.install-common): Rewrite $(LN) commands to support
4990 DESTDIR with "ln" as well as with "ln -s".
4991
4992 2003-01-08 Jason Merrill <jason@redhat.com>
4993
4994 * parser.c (cp_parser_primary_expression): See through explicitly
4995 scoped ALIAS_DECLs, too.
4996
4997 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
4998
4999 * decl.c: Remove some #if 0 code.
5000
5001 * decl.c: ANSIfy function declarations.
5002
5003 2003-01-07 Mark Mitchell <mark@codesourcery.com>
5004
5005 * parser.c (cp_parser_asm_definition): Correct handling of omitted
5006 operands.
5007
5008 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5009
5010 PR c++/9030
5011 * decl.c (make_typename_type): Check access only when tf_error.
5012 (make_unbound_class_template): Likewise.
5013 * pt.c (saved_access_scope): New variable.
5014 (push_access_scope_real): New function.
5015 (push_access_scope): Likewise.
5016 (pop_access_scope): Likewise.
5017 (tsubst_default_argument): Use them.
5018 (instantiate_template): Likewise.
5019 (regenerate_decl_from_template): Likewise.
5020 (instantiate_decl): Likewise.
5021 (get_mostly_instantiated_function_type): Likewise.
5022
5023 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
5024
5025 * tree.c: Delete bogus #if 0 code.
5026
5027 2003-01-07 Andreas Schwab <schwab@suse.de>
5028
5029 * class.c (layout_class_type): Don't use
5030 PCC_BITFIELD_TYPE_MATTERS if not defined.
5031
5032 2003-01-06 Mark Mitchell <mark@codesourcery.com>
5033
5034 PR c++/9165
5035 * decl2.c (build_cleanup): Mark the object as used.
5036
5037 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5038 (hash_local_specialization): New function.
5039 (register_local_specialization): Revert 2003-01-05 change.
5040 (instantiate_decl): Use hash_local_specialization when creating
5041 the local_specializations table.
5042
5043 * decl2.c (mark_used): Do not synthesize thunks.
5044
5045 * class.c (layout_class_type): Correct handling of unnamed
5046 bitfields wider than their types.
5047
5048 PR c++/9189
5049 * parser.c (cp_parser): Remove default_arg_types. Update
5050 documentation for unparsed_functions_queues.
5051 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5052 parameter.
5053 (cp_parser_new): Don't set parser->default_arg_types.
5054 (cp_parser_function_definition): Adjust usage of
5055 unparsed_funtions_queues.
5056 (cp_parser_class_specifier): Don't mess with
5057 parser->default_arg_types. Handle default argument processing in
5058 a separate phase from function body processing.
5059 (cp_parser_template_declaration_after_export): Adjust usage of
5060 unparsed_functions_queues.
5061 (cp_parser_late_parsing_for_member): Do not handle default
5062 arguments.
5063
5064 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
5065
5066 PR c++/9109
5067 * parser.c (cp_parser_declarator_kind): New enum.
5068 (cp_parser_declarator): Adjust.
5069 (cp_parser_direct_declarator): Adjust. Allow for either named or
5070 abstract declarator. Prefer abstract, if possible. Allow
5071 parenthesized function name.
5072 (cp_parser_condition): Adjust cp_parser_declarator call.
5073 (cp_parser_explicit_instantiation): Likewise.
5074 (cp_parser_init_declarator): Likewise.
5075 (cp_parser_type_id): Likewise.
5076 (cp_parser_function_definition): Likewise.
5077 (cp_parser_member_declaration): Likewise.
5078 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5079 the tentative parsing.
5080 (cp_parser_exception_declaration): Likewise.
5081
5082 2003-01-05 Mark Mitchell <mark@codesourcery.com>
5083
5084 * parser.c (cp_parser_template_parameter): Adjust call to
5085 cp_parser_parameter_declaration.
5086 (cp_parser_parameter_declaration_list): Likewise.
5087 (cp_parser_parameter_declaration): Replace
5088 greater_than_is_operator_p with template_parm_p parameter. Do not
5089 cache tokens for template default arguments.
5090
5091 * pt.c (retrieve_local_specialization): Use htab_find, not
5092 htab_find_with_hash.
5093 (register_local_specialization): Use htab_find_slot, not
5094 htab_find_slot_with_hash.
5095 (instantiate_decl): Pass a hash function to htab_create.
5096
5097 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5098
5099 * parser.c (cp_parser_binary_expression,
5100 cp_parser_multiplicative_expression,
5101 cp_parser_additive_expression, cp_parser_shift_expression,
5102 cp_parser_relational_expression, cp_parser_equality_expression,
5103 cp_parser_and_expression, cp_parser_exclusive_or_expression,
5104 cp_parser_inclusive_or_expression,
5105 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5106 cp_parser_binary_expression): Const-ify.
5107
5108 2003-01-04 Mark Mitchell <mark@codesourcery.com>
5109
5110 * method.c (use_thunk): Disable access control while building the
5111 body of the thunk.
5112
5113 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
5114
5115 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5116 front end.
5117
5118 2003-01-03 Matt Austern <austern@apple.com>
5119
5120 * cp-tree.h (struct lang_type_class): add field for key method
5121 (cp_global_trees): rename dynamic_classes to keyed_classes
5122 (key_method): add definition
5123 * class.c (finish_struct_1): compute class's key method, and add
5124 the class to keyed_classes list if there is no key method.
5125 * decl.c (finish_function): add class to keyed_classes list if we
5126 see a definition of the class's key method.
5127 * pt.c (instantiate_class_template): add template specialization
5128 of a dynamic class to keyed_classes list.
5129 * decl2.c (key_method): remove
5130 (finish_file): iterate only through keyed_classes list when
5131 deciding whether to emit vtables, remove class from its list after
5132 we do the emission.
5133
5134 2003-01-02 Jason Merrill <jason@redhat.com>
5135
5136 * call.c (build_conditional_expr): Stabilize lvalues properly.
5137 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5138 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5139 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5140
5141 * call.c (convert_like_real): Call decl_constant_value for an
5142 IDENTITY_CONV even if there are no more conversions.
5143
5144 * cvt.c (build_up_reference): Don't push unnamed temps.
5145
5146 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5147
5148 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5149 for a backend struct.
5150
5151 * except.c (wrap_cleanups_r, build_throw): Make
5152 MUST_NOT_THROW_EXPRs void.
5153 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5154
5155 * init.c (build_vec_delete_1): Pre-evaluate the base address.
5156
5157 * init.c (get_temp_regvar): Simplify logic.
5158
5159 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5160 our replacement is a decl.
5161
5162 * decl.c (cp_make_fname_decl): Push the decls inside the
5163 outermost scope.
5164
5165 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
5166
5167 PR c++/45, c++/3784
5168 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5169 the same too.
5170
5171 2003-01-03 Graham Stott <graham.stott@btinternet.com>
5172
5173 * parser.c (struct cp_parser): Add access_checks_lists field
5174 (cp_parser_simple_declaration): Use.
5175 (cp_parser_init_declarator): Likewise.
5176
5177 2003-01-02 Mark Mitchell <mark@codesourcery.com>
5178
5179 * parser.c (cp_parser_declaration): Accept the __extension__
5180 keyword before the declaration.
5181
5182 PR c++/2843
5183 * parser.c (cp_parser_parameter_declaration): Allow attributes to
5184 appear after the declarator.
5185
5186 * call.c (build_new_method_call): Fix typo in message format
5187 string.
5188
5189 2003-01-02 Mark Mitchell <mark@codesourcery.com>
5190
5191 * parser.c (cp_lexer_next_token_is): Declare it inline.
5192 (cp_lexer_set_source_position_from_token): Likewise.
5193 (cp_lexer_debugging_p): Likewise.
5194 (cp_parser_parsing_tentatively): Likewise.
5195 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5196 to the cp_lexer_peek_token.
5197
5198 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5199 expression.
5200
5201 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
5202
5203 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5204 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5205 cp/repo.c: Fix copyright years.
5206
5207 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
5208
5209 * lex.c: Remove superfluous include of cpplib.h.
5210 (CONSTRAINT): Define without conditions.
5211 (init_cp_pragma): Use c_register_pragma.
5212
5213 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
5214
5215 * .cvsignore: Remove.
5216
5217 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
5218
5219 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5220 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5221 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5222 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5223 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5224 copyright header.
5225 * lex.h: parse.y is dead, so don't mention it. Also replace the
5226 copyright header with the default GNU copyright header.
5227
5228 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5229
5230 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
5231 (lookup_name_namespace_only): Likewise.
5232 (begin_only_namespace_names): Likewise.
5233 (end_only_namespace_names): Likewise.
5234 * decl.c (only_namespace_names): Remove.
5235 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
5236 (lookup_name_real): Do not check only_namespace_names.
5237 (lookup_name_namespace_only): Remove.
5238 (begin_only_namespace_names): Likewise.
5239 (end_only_namespace_names): Likewise.
5240 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
5241 nested-name-specifiers more gracefully.
5242 (cp_parser_class_or_namespace_name): Avoid looking up namespace
5243 names when they cannot possibly appear.
5244 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
5245 (cp_parser_elaborated_type_specifier): Likewise.
5246 (cp_parser_namespace_name): Only look for namespace names.
5247 (cp_parser_lookup_name): Add is_namespace parameter.
5248 (cp_parser_lookup_name_simple): Adjust call to
5249 cp_parser_lookup_name.
5250
5251 * parser.c (cp_parser_dependent_type_p): Fix thinko.
5252
5253 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
5254
5255 * .cvsignore: Update.
5256
5257 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
5258
5259 * class.c (modify_vtable_entry): Remove unused variable.
5260 (get_vcall_index): Always expect a non-thunk.
5261 (update_vtable_entry_for_fn): Combine covariant adjustments, when
5262 overriding a thunk. Pass get_vcall_index a non-thunk.
5263
5264 * decl2.c (finish_file): Mark undefined inlines as extern.
5265
5266 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5267
5268 * cp-tree.def (RETURN_INIT): Remove.
5269 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
5270 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
5271 (note_level_for_for): Remove.
5272 (note_level_for_try): Likewise.
5273 (note_level_for_catch): Likewise.
5274 (finish_named_return_value): Likewise.
5275 (do_pushlevel): Change prototype.
5276 (pending_lang_change): Remove.
5277 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
5278 sk_for.
5279 (note_level_for_for): Remove.
5280 (note_level_for_try): Likewise.
5281 (note_level_for_catch): Likewise.
5282 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
5283 * parser.c (cp_parser_context_free_list): Make it "deletable".
5284 (cp_parser_template_argument): Remove misleading comment.
5285 * pt.c (tsubst_expr): Remove RETURN_INIT code.
5286 * semantics.c (genrtl_named_return_value): Remove.
5287 (do_pushlevel): Take a scope kind as an argument.
5288 (begin_if_stmt): Adjust.
5289 (begin_while_stmt): Likewise.
5290 (begin_for_stmt): Likewise.
5291 (finish_for_init_stmt): Likewise.
5292 (begin_switch_stmt): Likewise.
5293 (begin_handler): Likewise.
5294 (begin_compound_stmt): Likewise.
5295 (finish_named_return_value): Remove.
5296 (cp_expand_stmt): Remove RETURN_INIT case.
5297 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
5298
5299 2002-12-31 Mark Mitchell <mark@codesourcery.com>
5300
5301 PR c++/9112
5302 * parser.c (cp_parser_direct_declarator): Handle erroneous
5303 parenthesized declarators correctly.
5304
5305 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
5306
5307 * cp-tree.h (pending_lang_change): Declare.
5308
5309 2002-12-30 Mark Mitchell <mark@codesourcery.com>
5310
5311 * parser.c (cp_parser_context_free_list): New variable.
5312 (cp_parser_context_new): Use it.
5313 (cp_parser_error): Check return code from
5314 cp_parser_simulate_error.
5315 (cp_parser_simulate_error): Return a value.
5316 (cp_parser_id_expression): Optimize common case.
5317 (cp_parser_class_name): Likewise.
5318 (cp_parser_class_specifier): Adjust call to
5319 cp_parser_late_parsing_default_args.
5320 (cp_parser_lookup_name): Optimize common case.
5321 (cp_parser_late_parsing_for_member): Adjust call to
5322 cp_parser_late_parsing_default_args.
5323 (cp_parser_late_parsing_default_args): Add scope parameter.
5324 (cp_parser_require): Avoid creating the error message unless it's
5325 needed.
5326 (cp_parser_parse_definitely): Place free'd contexts on the free
5327 list.
5328
5329 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
5330
5331 2002-12-30 David Edelsohn <edelsohn@gnu.org>
5332
5333 * parser.c (cp_parser_parameter_declaration_clause): Treat system
5334 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
5335
5336 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
5337
5338 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
5339 GCC, not GNU CC.
5340
5341 2002-12-30 Mark Mitchell <mark@codesourcery.com>
5342
5343 * parse.y: Remove.
5344 * spew.c: Likewise.
5345 * Make-lang.in (gt-cp-spew.h): Remove.
5346 * cp-tree.h (do_pending_lang_change): Remove.
5347 (do_identifier): Change prototype.
5348 (finish_id_expr): Remove.
5349 * decl.c (lookup_name_real): Remove yylex variable.
5350 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
5351 * lex.c (init_cpp_parse): Remove.
5352 (reduce_cmp): Likewise.
5353 (token_cmp): Likewise.
5354 (yychar): Likewise.
5355 (lastiddecl): Likewise.
5356 (token_count): Likewise.
5357 (reduce_count): Likewise.
5358 (yyhook): Likewise.
5359 (print_parse_statistics): Likewise.
5360 (do_pending_lang_change): Likewise.
5361 (do_identifier): Remove parsing parameter.
5362 * lex.h (lastiddecl): Remove.
5363 (looking_for_typename): Remove.
5364 (looking_for_template): Likewise.
5365 (pending_lang_change): Likewise.
5366 (yylex): Likewise.
5367 * semantics.c (finish_id_expr): Remove.
5368
5369 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
5370 thread" correctly.
5371
5372 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
5373
5374 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
5375 end, not the C front end.
5376
5377 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
5378
5379 * cp-tree.h (THUNK_TARGET): New macro.
5380 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
5381 (finish_thunk): Remove offset parms.
5382 * class.c (find_final_overrider): Look through thunks.
5383 (get_vcall_index): Use THUNK_TARGET.
5384 (update_vtable_entry_for_fn): Look through thunks. Set covariant
5385 fixed offset here. Adjust finish_thunk call.
5386 (build_vtbl_initializer): Adjust finish_thunk calls.
5387 * mangle.c (mangle_call_offset): Remove superfluous if.
5388 (mangle_thunk): Adjust.
5389 * method.c (make_thunk): Adjust.
5390 (finish_thunk): Adjust.
5391 (thunk_adjust): Remove assert.
5392 (use_thunk): Use THUNK_TARGET
5393 * dump1.c (cp_dump_tree): Adjust thunk dumping.
5394
5395 PR c++/9054
5396 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
5397 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
5398
5399 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
5400
5401 Remove traditional C constructs 4/n.
5402 * decl2.c (grok_method_quals, warn_if_unknown_interface,
5403 grok_x_components, cp_build_parm_decl, build_artificial_parm,
5404 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
5405 delete_sanity, check_member_template, check_java_method,
5406 check_classfn, finish_static_data_member_decl, grokfield,
5407 grokbitfield, grokoptypename, grok_function_init,
5408 cplus_decl_attributes, constructor_name, defer_fn,
5409 build_anon_union_vars, finish_anon_union, coerce_new_type,
5410 coerce_delete_type, comdat_linkage, maybe_make_one_only,
5411 key_method, import_export_vtable, import_export_class,
5412 output_vtable_inherit, import_export_decl, import_export_tinfo,
5413 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
5414 set_guard, start_objects, finish_objects,
5415 start_static_storage_duration_function,
5416 finish_static_storage_duration_function, get_priority_info,
5417 start_static_initialization_or_destruction,
5418 finish_static_initialization_or_destruction,
5419 do_static_initialization, do_static_destruction,
5420 prune_vars_needing_no_initialization, write_out_vars,
5421 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
5422 add_using_namespace, merge_functions, ambiguous_decl,
5423 lookup_using_namespace, lookup_using_namespace,
5424 qualified_lookup_using_namespace, set_decl_namespace,
5425 decl_namespace, current_decl_namespace, push_decl_namespace,
5426 pop_decl_namespace, push_scope, pop_scope, add_function,
5427 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
5428 lookup_arg_dependent, do_namespace_alias,
5429 validate_nonmember_using_decl, do_nonmember_using_decl,
5430 do_toplevel_using_decl, do_local_using_decl,
5431 do_class_using_decl, do_using_directive, check_default_args,
5432 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
5433 * parser.c (cp_parser_class_head): Use booleanss.
5434 * decl.c (walk_globals, walk_vtables): Likewise.
5435 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
5436 walk_globals): Change return type from 'int' to 'bool'.
5437 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
5438 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
5439 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
5440 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
5441 qualifier_flags, tinfo_base_init, generic_initializer,
5442 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
5443 dfs_class_hint_unmark, class_hint_flags, class_initializer,
5444 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
5445 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
5446 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
5447 * repo.c (repo_compile_flags, repo_template_declared,
5448 repo_template_defined, repo_class_defined, repo_get_id,
5449 repo_template_used, repo_vtable_used, repo_inline_used,
5450 repo_tinfo_used, repo_template_instantiated, extract_string,
5451 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
5452 finish_repo): Likewise.
5453 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
5454 cxx_print_xnode): Likewise..
5455 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
5456 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
5457 * cxxfilt.c (demangle_it, print_demangler_list, usage,
5458 standard_symbol_characters, hp_symbol_characters, main, fatal):
5459 Likewise.
5460 (strip_underscore): Change type from 'int' to 'bool'.
5461 (main): Use boolean constants.
5462
5463 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
5464
5465 Remove traditional C constructs 3/n.
5466 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
5467 build_up_reference, warn_ref_binding, convert_to_reference,
5468 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
5469 convert_to_void, convert, convert_force, build_type_conversion,
5470 build_expr_type_conversion, type_promotes_to,
5471 perform_qualification_conversions): Use C90 prototyping style.
5472 * decl2.c (grok_array_decl): Use boolean constant.
5473 (delete_sanity): Likewise.
5474 * typeck.c (build_unary_op): Likewise.
5475 * semantics.c (finish_switch_cond): Likewise.
5476 * parser.c (cp_parser_direct_new_declarator): Likewise.
5477 * init.c (build_new): Likewise.
5478
5479 2002-12-27 Mark Mitchell <mark@codesourcery.com>
5480
5481 * Make-lang.in (po-generated): Remove parse.c.
5482 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
5483 ($(srcdir)/cp/parse.h): Remove target.
5484 ($(srcdir)/cp/parse.c): Likewise.
5485 (gt-cp-parse.h): Likewise.
5486 (gt-cp-parser.h): New target.
5487 (c++.distclean): Do not remove parse.output.
5488 (c++.maintainer-clean): Do not remove parse.c or parse.h.
5489 (cp/spew.o): Remove target.
5490 (cp/lex.o): Adjust dependencies.
5491 (cp/pt.o): Likewise.
5492 (cp/parse.o): Likewise.
5493 (cp/TAGS): Do not mention parse.c.
5494 (cp/parser.o): New target.
5495 * NEWS: Mention the new parser.
5496 * call.c (build_scoped_method_call): Simplify.
5497 (build_method_call): Likewise.
5498 (build_new_function_call): Adjust calls to add_function_candidate
5499 and add_template_candidate.
5500 (build_new_op): Improve handling of erroroneous operands.
5501 (convert_default_arg): Remove circular argument processing.
5502 (name_as_c_string): New function.
5503 (build_new_method_call): Use it.
5504 (perform_implicit_conversion): Use error_operand_p.
5505 * class.c (finish_struct_anon): Use constructor_name_p.
5506 (check_field_decls): Likewise.
5507 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
5508 (resolve_address_of_overloaded_function): Likewise.
5509 (instantiate_type): Tweak pointer-to-member handling.
5510 (get_primary_binfo): Remove incorrect assertion.
5511 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
5512 * cp-tree.h (DEFARG_TOKENS): New macro.
5513 (default_arg): New structure.
5514 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
5515 (lang_tree_node): Add default_arg.
5516 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
5517 (type_info_ref_type): New macro.
5518 (saved_scope): Make processing_explicit_instantiation a boolean.
5519 (check_access): New field.
5520 (unparsed_text): Remove.
5521 (language_function): Remove unparsed_inlines.
5522 (error_operand_p): New macro.
5523 (lang_decl): Adjust pending_inline_info.
5524 (DEFARG_POINTER): Remove.
5525 (tag_types): Add typenames.
5526 (lookup_ualified_name): Declare.
5527 (lookup_name_real): Likewise.
5528 (shadow_tag): Adjust prototype.
5529 (get_scope_of_declarator): Declare it.
5530 (process_next_inline): Remove it.
5531 (check_for_missing_semicolon): Likewise.
5532 (maybe_get_template_decl_from_type_decl): Declare it.
5533 (finish_label_stmt): Adjust prototype.
5534 (finish_non_static_data_meber): Declare it.
5535 (finish_pseudo_destructor_call_expr): Rename to ...
5536 (finish_pseudo_destructor_expr): ... this.
5537 (finish_compound_literal): Declare it.
5538 (begin_inline_definitions): Remove it.
5539 (init_spew): Remove.
5540 (peekyylex): Likewise.
5541 (arbitrate_lookup): Likewise.
5542 (frob_opname): Likewise.
5543 (maybe_snarf_defarg): Likewise.
5544 (add_defarg_fn): Likewise.
5545 (do_pending_defargs): Likewise.
5546 (done_pending_defargs): Likewise.
5547 (unprocessed_defarg_fn): Likewise.
5548 (replace_defarg): Likewise.
5549 (end_input): Likewise.
5550 (get_overloaded_fn): Likewise.
5551 * cvt.c (convert_to_reference): Improve error handling.
5552 * decl.c (lookup_name_real): Do not declare it static.
5553 (maybe_push_to_top_level): Set check_access.
5554 (identifier_type_value): Adjust call to lookup_name_real.
5555 (lookup_qualified_name): New method.
5556 (lookup_name_real): Remove special-case parsing code.
5557 (lookup_name-nonclass): Adjust call to lookup_name_real.
5558 (lookup_name_namespace_only): Likewise.
5559 (lookup_name): Likewise.
5560 (check_tag_decl): Return the type declared.
5561 (shadow_tag): Likewise.
5562 (register_dtor_fn): Tweak check_access.
5563 (grokfndecl): Use constructor_name_p.
5564 (get_scope_of_declarator): New function.
5565 (grokdeclarator): Obscure tweaks for slightly different declarator
5566 representations.
5567 (start_method): Return error_mark_node to indicate failure.
5568 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
5569 * decl2.c (constructor_name_full): Simplify.
5570 (constructor_name): Use it.
5571 (build_expr_from_tree): Adjust for changes to do new parser.
5572 (push_scope): Improve robustness.
5573 (validate_nonmember_using_decl): Process declarations, not names.
5574 (do_class_using_decl): Likewise.
5575 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
5576 here.
5577 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
5578 * expr.c (cxx_expand_expr): Handle BASELINKs.
5579 * init.c (member_init_ok_or_else): Issue more errors.
5580 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
5581 * lex.c: Do not include parse.h.
5582 (yypring): Do not declare.
5583 (yylval): Likewise.
5584 (make_reference_declarator): Remove error-generating code.
5585 (rid_to_yy): Remove.
5586 (cxx_init): Do not call init_spew.
5587 (yypring): Remove.
5588 (check_for_missing_semicolon): Remove.
5589 * lex.h (got_scope): Remove.
5590 (got_object): Remove.
5591 * method.c (hack_identifier): Use finish_non_static_data_member.
5592 (implicitly_declare_fn): Adjust use of constructor_name.
5593 * parser.c: New file.
5594 * pt.c (parse.h): Do not include it.
5595 (maybe_get_template_decl_from_template): Do not declare it.
5596 (finish_member_template_decl): Tweak.
5597 (begin_explicit_instantiation): Adjust for
5598 processing_explicit_instantiation being boolean.
5599 (end_explicit_instantiation): Likewise.
5600 (maybe_process_partial_specialization): Tighten specialization
5601 test.
5602 (retrieve_local_specialization): Adjust ue of hash table.
5603 (eq_local_specializations): New function.
5604 (register_local_specialization): Likewise.
5605 (push_template_decl_real): Remove unnecessary test.
5606 (maybe_get_template_decl_from_type_decl): Don't make it static.
5607 (for_each_template_parm_r): Handle TYPEOF_TYPE.
5608 (tsubst_copy): Use retrieive_local_specialization to handle
5609 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
5610 Handle COMPONENT_REFs with pseudo-destructor-expressions.
5611 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
5612 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
5613 (unify): Tweak handling of CONST_DECLs.
5614 (regenerate_decl_from_template): Use push_nested_class.
5615 (template_for_substitution): New funciton.
5616 (instantiate_decl): Use it. Register parameters as local
5617 specializations.
5618 * rtti.c (init_rtti_processing): Set type_info_ref_type.
5619 (build_typeid): Use it.
5620 (get_typeid): Likeise.
5621 * search.c (accessible_p): Use check_access, not
5622 flag_access_control.
5623 (adjust_result_of_qualified_name_lookup): Pay attention to the
5624 context_class.
5625 * semantics.c (finish_asm_stmt): Adjust error handling.
5626 (finish_label_stmt): Return the statement.
5627 (finish_non_static_data_member): New function.
5628 (finish_class_expr): Handle BASELINKs.
5629 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
5630 (finish_object_call_expr): Simplify handling during templates.
5631 (finish_pseudo_destructor_call_expr): Rename to ...
5632 (finish_pseudo_dtor_expr): ... this.
5633 (finish_compound_literal): New function.
5634 (begin_inline_definitions): Remove.
5635 (finish_sizeof): Remove special template handling.
5636 * spew.c: Do not include parse.h.
5637 * tree.c (get_overloaded_fn): Remove.
5638 * typeck.c (build_class_member_access_expr): Handle
5639 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
5640 (lookup_destructor): New function.
5641 (finish_class_member_access_expr): Use it.
5642 (convert_arguments): Simplify.
5643 (build_unary_op): Handle BASELINKs.
5644
5645 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
5646
5647 PR c++/4803
5648 * decl2.c (mark_used): Defer inline functions.
5649 (finish_file): Merge deferred_fns loops. Check all used
5650 inline functions have a definition.
5651 * method.c (make_thunk): Thunks are not inline.
5652
5653 PR c++/5116, c++/764
5654 * call.c (build_new_op): Make sure template class operands are
5655 instantiated.
5656
5657 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
5658
5659 PR C++/7964
5660 * cp-tree.h (resolve_scoped_fn_name): Prototype.
5661 * call.c (resolve_scoped_fn_name): New function. Deal with
5662 more template expansion. Broken out of ...
5663 * parse.y (parse_finish_call_expr): ... here. Call it.
5664 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
5665 resolve_scoped_fn_name and build_call_from_tree.
5666
5667 PR c++/9053
5668 * decl.c (duplicate_decls): Templates may be disambiguated by
5669 return type.
5670
5671 PR c++/8702
5672 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
5673 conversion operators on failure.
5674
5675 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5676
5677 Remove traditional C constructs 2/n.
5678 * call.c (tourney, build_field_call, equal_functions, joust,
5679 compare_ics, build_over_call, build_java_interface_fn_ref,
5680 convert_like_real, op_error, build_object_call, resolve_args,
5681 build_vfield_ref, check_dtor_name, build_scoped_method_call,
5682 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
5683 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
5684 standard_conversion, reference_related_p,
5685 reference_compatible_p, convert_class_to_reference,
5686 direct_reference_binding, reference_binding,
5687 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
5688 add_template_conv_candidate, any_viable, any_strictly_viable,
5689 build_this, splice_viable, print_z_candidates,
5690 build_user_type_conversion, build_new_function_call,
5691 conditional_conversion, build_conditional_expr, build_new_op,
5692 build_op_delete_call, enforce_access, call_builtin_trap,
5693 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
5694 convert_default_arg, type_passed_as, convert_for_arg_passing,
5695 in_charge_arg_for_name, is_properly_derived_from,
5696 maybe_handle_implicit_object, maybe_handle_ref_bind,
5697 source_type, add_warning, can_convert, can_convert_arg,
5698 perform_implicit_conversion, can_convert_arg_bad,
5699 initialize_reference, add_conv_candidate,
5700 add_template_candidate_real, add_template_candidate): Ansify.
5701
5702 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
5703
5704 PR c++/8572
5705 * cp-tree.h (grokoptypename): Add SCOPE parameter.
5706 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
5707 if in a template scope.
5708 * parse.y (unoperator): Return the scope.
5709 (operator_name): Adjust grokoptypename call.
5710
5711 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5712
5713 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
5714 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
5715 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
5716
5717 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5718
5719 * ChangeLog: Fix a typo.
5720 * class.c: Fix comment typos.
5721 * cp-tree.h: Likewise.
5722
5723 2002-12-18 Jason Merrill <jason@redhat.com>
5724
5725 Handle anonymous unions at the tree level.
5726 C++ ABI change: Mangle anonymous unions using the name of their
5727 first named field (by depth-first search). Should not cause
5728 binary compatibility problems, though, as the compiler previously
5729 didn't emit anything for affected unions.
5730 * cp-tree.def (ALIAS_DECL): New tree code.
5731 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
5732 first field, not the largest.
5733 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
5734 push the decl, and write it out at namespace scope.
5735 * decl.c (lookup_name_real): See through an ALIAS_DECL.
5736 (pushdecl): Add namespace bindings for ALIAS_DECLs.
5737 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
5738 of a decl which doesn't have one.
5739 * typeck.c (build_class_member_access_expr): Don't recurse if
5740 we already have the type we want.
5741
5742 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5743
5744 PR c++/8099
5745 * friend.c (make_friend_class): Allow partial specialization
5746 when declaration is not a template friend.
5747
5748 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5749
5750 PR c++/3663
5751 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
5752 TREE_PROTECTED to created decl nodes.
5753
5754 2002-12-18 Mark Mitchell <mark@codesourcery.com>
5755
5756 * class.c (build_base_field): Do not set DECL_PACKED on the
5757 FIELD_DECL.
5758
5759 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
5760
5761 * cp-tree.h (struct tree_srcloc): Use location_t.
5762 (SOURCE_LOCUS): New.
5763 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
5764
5765 2002-12-17 Jason Merrill <jason@redhat.com>
5766
5767 * decl.c (finish_function): Also complain about no return in
5768 templates.
5769 * semantics.c (finish_return_stmt): Also call check_return_expr in
5770 templates.
5771 * typeck.c (check_return_expr): In a template, just remember that we
5772 saw a return.
5773
5774 2002-12-16 Jason Merrill <jason@redhat.com>
5775
5776 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
5777 of the CALL_EXPR.
5778
5779 * semantics.c (do_pushlevel): Call pushlevel after adding the
5780 SCOPE_STMT.
5781 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
5782 * parse.y (function_body): Go back to using compstmt.
5783 * decl.c (pushdecl): Skip another level to get to the parms level.
5784
5785 * call.c (build_new_method_call): Use is_dummy_object to determine
5786 whether or not to evaluate the object parameter to a static member
5787 function.
5788
5789 2002-12-14 Jason Merrill <jason@redhat.com>
5790
5791 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
5792 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
5793 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
5794 don't bother with an AGGR_INIT_EXPR.
5795 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
5796 just generate a new decl normally. Take return slot parm.
5797 * cp-tree.h: Adjust prototype.
5798
5799 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5800
5801 PR C++/8031
5802 * cvt.c (convert_to_pointer_force): Don't try comparing against
5803 erronous type.
5804
5805 2002-12-13 Geoffrey Keating <geoffk@apple.com>
5806
5807 * cp-tree.h: Have the multiple-include guards around
5808 the entire file.
5809
5810 2002-12-10 David Edelsohn <edelsohn@gnu.org>
5811
5812 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
5813 for SPEW_DEBUG.
5814 (snarf_method): Same.
5815 (snarf_defarg): Same.
5816
5817 2002-12-10 Mark Mitchell <mark@codesourcery.com>
5818
5819 PR c++/8372
5820 * pt.c (tsubst_copy): Handle destructor names more correctly.
5821
5822 2002-12-10 Matt Austern <austern@apple.com>
5823
5824 * cp-tree.h: get rid of needs_virtual_reinit bit.
5825
5826 2002-12-09 Mark Mitchell <mark@codesourcery.com>
5827
5828 * NEWS: Document removal of in-class initialization extension for
5829 static data members of non-arithmetic, non-enumeration type.
5830 * decl.c (check_static_variable_definition): Do not allow that
5831 extension.
5832 * decl2.c (grokfield): Do not call digest_init when processing
5833 templates.
5834
5835 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5836
5837 * error.c (dump_expr): Fix format specifier warning.
5838
5839 2002-12-04 Geoffrey Keating <geoffk@apple.com>
5840
5841 * class.c (finish_struct_1): Correct comment.
5842 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
5843
5844 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5845
5846 PR C++/8799
5847 * error.c (dump_expr): Don't ever try to dump a non-existent
5848 expression.
5849
5850 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
5851
5852 Implement covariant returns.
5853 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
5854 (struct lang_decl_flags): Add this_thunk_p flag.
5855 Rename vcall_offset to virtual_offset.
5856 (struct lang_decl): Rename delta to fixed_offset.
5857 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
5858 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
5859 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
5860 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
5861 (make_thunk): Add this_adjusting arg.
5862 (finish_thunk): Declare.
5863 (mangle_thunk): Add this_adjusting arg.
5864 * class.c (get_vcall_index): Use base function for lookup.
5865 (update_vtable_entry_for_fn): Generate covariant thunk.
5866 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
5867 (build_vtbl_initializer): Use base function for lookup.
5868 Finish covariant thunk here. Adjust thunk generation.
5869 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
5870 Adjust thunk dumping.
5871 * mangle.c (mangle_call_offset): New function.
5872 (mangle_thunk): Adjust for covariant thunks.
5873 * method.c (make_thunk): Adjust. Do not set name here.
5874 (finish_thunk): New function. Set name here.
5875 (use_thunk): Generate covariant thunks too.
5876 (thunk_adjust): New function.
5877 * search.c (covariant_return_p): Remove. Fold into ...
5878 (check_final_overrider): ... here. Simplify.
5879 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
5880
5881 2002-12-03 Jason Merrill <jason@redhat.com>
5882
5883 PR c++/8674
5884 * call.c (build_over_call): Check specifically for TARGET_EXPR
5885 when eliding.
5886
5887 PR c++/8461, c++/8625
5888 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
5889 (cp_convert_parm_for_inlining): Remove.
5890 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5891 Remove.
5892 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
5893 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
5894
5895 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
5896 an ambiguous conversion.
5897
5898 2002-12-03 Mark Mitchell <mark@codesourcery.com>
5899
5900 PR c++/8688
5901 * decl.c (reshape_init): Handle erroneous initializers.
5902
5903 2002-12-02 Mark Mitchell <mark@codesourcery.com>
5904
5905 PR c++/8720
5906 * spew.c (remove_last_token): Make sure that last_chunk is set
5907 correctly.
5908
5909 PR c++/8615
5910 * error.c (dump_expr): Handle character constants with
5911 TREE_OVERFLOW set.
5912
5913 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5914
5915 DR 180
5916 * decl.c (grokdeclarator): Require class-key for all friend class.
5917 Output the correct type and context in the error message.
5918
5919 2002-12-01 Mark Mitchell <mark@codesourcery.com>
5920
5921 PR c++/5919
5922 * pt.c (unify): Use variably_modified_type_p to test validity of
5923 template argument types.
5924
5925 PR c++/8727
5926 * cp-tree.h (lang_type_class): Add typeinfo_var.
5927 (CLASSTYPE_TYPEINFO_VAR): New macro.
5928 * rtti.c (get_tinfo_decl): Use it.
5929
5930 PR c++/8663
5931 * init.c (expand_member_init): Always get the main variant of a
5932 base class.
5933
5934 2002-12-01 Mark Mitchell <mark@codesourcery.com>
5935
5936 PR c++/8332
5937 PR c++/8493
5938 * decl.c (cxx_init_decl_processing): Use size_type_node, not
5939 c_size_type_node.
5940 * decl2.c (coerce_new_type): Likewise.
5941 * except.c (do_allocate_exception): Likewise.
5942
5943 2002-11-30 Zack Weinberg <zack@codesourcery.com>
5944
5945 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
5946 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
5947 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
5948 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5949 typeck2.c: Include coretypes.h and tm.h.
5950 * Make-lang.in: Update dependencies.
5951
5952 2002-11-30 Mark Mitchell <mark@codesourcery.com>
5953
5954 PR c++/8227
5955 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
5956 (check_initializer): Validate the type of the initialized
5957 variable, even if the initializer is absent.
5958 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
5959
5960 PR c++/8214
5961 * typeck.c (convert_for_assignment): Do not use
5962 decl_constant_value on the operand.
5963
5964 PR c++/8511
5965 * pt.c (instantiate_decl): Handle template friends defined outside
5966 of the class correctly.
5967
5968 2002-11-29 Joe Buck <jbuck@synopsys.com>
5969
5970 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
5971 anonymous structs.
5972
5973 2002-11-29 Mark Mitchell <mark@codesourcery.com>
5974
5975 * class.c (walk_subobject_offsets): Recur on binfos as well as on
5976 types.
5977 (layout_nonempty_base_or_field): Pass it a binfo when processing a
5978 base class.
5979 (layout_empty_base): Likewise.
5980 (build_base_field): Likewise.
5981
5982 2002-11-27 Mark Mitchell <mark@codesourcery.com>
5983
5984 * class.c (build_base_field): Make sure we get the canonical base
5985 when descending through primary bases.
5986
5987 2002-11-26 Geoffrey Keating <geoffk@apple.com>
5988
5989 * decl.c (check_initializer): Don't error on initialisation of
5990 a scalar with a brace-enclosed expression.
5991
5992 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
5993
5994 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
5995 (template_parms_equal): Remove prototype.
5996 * typeck.c (buuld_indirect_ref): Reformat.
5997
5998 2002-11-25 Jason Merrill <jason@redhat.com>
5999
6000 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6001 and a DO_STMT.
6002
6003 2002-11-25 Mark Mitchell <mark@codesourcery.com>
6004
6005 * tree.c (cp_build_qualified_type_real): Correct handling of
6006 array types.
6007 * class.c (walk_subobject_offsets): Fix thinko.
6008 (build_base_field): Record offsets of empty bases in primary
6009 virtual bases.
6010 (layout_class_type): Record offsets of empty bases in fields.
6011
6012 * search.c (is_subobject_of_p_1): Fix thinko.
6013 (lookup_field_queue_p): Likewise.
6014
6015 2002-11-24 Mark Mitchell <mark@codesourcery.com>
6016
6017 * class.c (layout_class_type): Reuse tail padding when laying out
6018 virtual bases.
6019
6020 2002-11-22 Mark Mitchell <mark@codesourcery.com>
6021
6022 * rtti.c (qualifier_flags): Fix thinko.
6023
6024 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
6025
6026 Remove traditional C constructs 1/n.
6027 * cp-tree.h (init_method, set_mangled_name_for_decl,
6028 build_opfncall, hack_identifier, make_thunk, use_thunk,
6029 synthesize_method, implicitly_declare_fn,
6030 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6031 maybe_clone_body): Remove use of PARAMS.
6032
6033 * method.c (do_build_assign_ref, do_build_copy_constructor,
6034 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6035 Likewise.
6036 (synthesize_method): Use 'bool' type and constants instead of
6037 'int'.
6038 (locate_copy): Likewise.
6039 (implicitly_declare_fn): Likewise.
6040
6041 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6042 Remove old-style declaration.
6043 (maybe_clone_body): Use 'bool' type and constants.
6044
6045 2002-11-21 Glen Nakamura <glen@imodulo.com>
6046
6047 PR c++/8342
6048 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6049 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6050 of the branches of a COND_EXPR.
6051
6052 2002-11-19 Mark Mitchell <mark@codesourcery.com>
6053
6054 * pt.c (for_each_template_parm): Free allocated memory.
6055 * search.c (is_subobject_of_p_1): New function.
6056 (is_subobject_of_p): Avoid walking virtual bases multiple times.
6057
6058 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
6059
6060 * g++spec.c (lang_specific_spec_functions): New.
6061
6062 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
6063
6064 * ChangeLog: Follow spelling conventions.
6065 * class.c: Likewise.
6066 * decl2.c: Likewise.
6067
6068 2002-11-14 Zack Weinberg <zack@codesourcery.com>
6069
6070 * search.c (dfs_push_decls): Do not try to reorder elements
6071 3..n of method_vec if method_vec has only two elements.
6072 Reverse order of two tests to avoid accessing unallocated
6073 memory.
6074
6075 2002-11-14 Mark Mitchell <mark@codesourcery.com>
6076
6077 * class.c (dfs_find_final_overrider): Adjust so that the most
6078 derived object is a binfo, rather than a class type.
6079 (find_final_overrider): Likewise.
6080 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6081 (add_vcall_offset): Likewise.
6082
6083 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6084
6085 PR c++/8389
6086 * pt.c (instantiate_template): Push class scope for member
6087 functions.
6088 (get_mostly_instantiated_function_type): Likewise. Don't call
6089 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
6090 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6091 * mangle.c (write_encoding, write_unqualified_name): Adjust.
6092
6093 2002-11-07 Mark Mitchell <mark@codesourcery.com>
6094
6095 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6096 vcall offfsets. Split out ...
6097 (add_vcall_offset): ... new function.
6098
6099 PR c++/8338
6100 * pt.c (for_each_template_parm): Add htab parameter.
6101 (process_partial_specialization): Adjust call.
6102 (push_template_decl_real): Likewise.
6103 (pair_fn_data): Add visited.
6104 (for_each_template_parm_r): Avoid walking duplicates more than
6105 once.
6106 (uses_template_parms): Adjust call to for_each_template_parm.
6107
6108 2002-11-07 Mark Mitchell <mark@codesourcery.com>
6109
6110 * class.c (add_implicitly_declared_members): Put implicitly
6111 declared functions at the end of TYPE_METHODs when -fabi-version
6112 is at least 2.
6113
6114 2002-11-05 Geoffrey Keating <geoffk@apple.com>
6115
6116 * decl2.c (finish_file): Correct spelling.
6117
6118 2002-11-03 Mark Mitchell <mark@codesourcery.com>
6119
6120 * call.c (build_special_member_call): Do not try to lookup VTTs by
6121 name.
6122 * class.c (vtbl_init_data): Add generate_vcall_entries.
6123 (get_vtable_decl): Do not look up virtual tables by name.
6124 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6125 (set_primary_base): Do not set CLASSTYPE_RTTI.
6126 (determine_primary_base): Likewise.
6127 (get_matching_virtual): Remove.
6128 (get_vcall_index): New function.
6129 (update_vtable_entry_for_fn): Do not try to use virtual thunks
6130 when they are not required. Assign vcall indices at this point.
6131 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6132 Do update dynamic_classes.
6133 (build_vtt): Do not add VTTs to the symbol table.
6134 (build_ctor_vtbl_group): Likewise.
6135 (build_vtbl_initializer): Simplify handling of vcall indices.
6136 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6137 for the most derived class.
6138 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6139 the vtable.
6140 * cp-tree.h (dynamic_classes): New macro.
6141 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
6142 (CLASSTYPE_RTTI): Remove.
6143 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6144 (CLASSTYPE_VCALL_INDICES): New macro.
6145 (CLASSTYPE_VTABLES): Likewise.
6146 (BV_USE_VCALL_INDEX_P): Remove.
6147 (build_vtable_path): Remove.
6148 * decl2.c (finish_vtable_vardecl): Remove.
6149 (key_method): Remove #if 0'd code.
6150 (finish_vtable_vardecl): Rename to ...
6151 (maybe_emit_vtables): ... this.
6152 (finish_file): Use it.
6153 * search.c (look_for_overrides_here): Update comment.
6154
6155 2002-11-01 Zack Weinberg <zack@codesourcery.com>
6156
6157 PR c/7353 redux
6158 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6159
6160 2002-10-30 Jason Merrill <jason@redhat.com>
6161
6162 PR c++/8186
6163 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6164 * call.c (convert_for_arg_passing): Set it.
6165 * except.c (stabilize_throw_expr): Recurse for such an arg.
6166
6167 2002-10-31 Mark Mitchell <mark@codesourcery.com>
6168
6169 * cp-tree.h (lang_decl_flags): Remove init_priority.
6170 (lang_decl): Add delta.
6171 (GLOBAL_INIT_PRIORITY): Remove.
6172 (THUNK_DELTA): Revise definition.
6173 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6174 * dump.c (cp_dump_tree): Don't dump it.
6175
6176 2002-10-30 Mark Mitchell <mark@codesourcery.com>
6177
6178 PR c++/8160
6179 * typeck2.c (process_init_constructor): Call complete_array_type.
6180
6181 PR c++/8149
6182 * decl.c (make_typename_type): Issue errors about invalid results.
6183
6184 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6185
6186 Core issue 287, PR c++/7639
6187 * cp-tree.h (lang_type_class): Add decl_list field.
6188 (CLASSTYPE_DECL_LIST): New macro.
6189 (maybe_add_class_template_decl_list): Add declaration.
6190 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6191 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6192 (maybe_add_class_template_decl_list): New function.
6193 (add_implicitly_declared_members): Use it.
6194 * decl.c (maybe_process_template_type_declaration): Likewise.
6195 (pushtag): Likewise.
6196 * friend.c (add_friend): Likewise.
6197 (make_friend_class): Likewise.
6198 * semantics.c (finish_member_declaration): Likewise.
6199 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6200 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6201 to process members and friends in the order of declaration.
6202
6203 2002-10-29 Mark Mitchell <mark@codesourcery.com>
6204
6205 PR c++/8287
6206 * decl.c (finish_destructor_body): Create the label to jump to
6207 when returning from a destructor here.
6208 (finish_function_body): Rather than here.
6209
6210 2002-10-25 Zack Weinberg <zack@codesourcery.com>
6211
6212 PR c++/7266
6213 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6214 SCOPE_REF is not null before dereferencing it.
6215
6216 2002-10-25 Mark Mitchell <mark@codesourcery.com>
6217
6218 * call.c (build_over_call): Use DECL_CONTEXT, not
6219 DECL_VIRTUAL_CONTEXT.
6220 * class.c (modify_vtable_entry): Don't mess with
6221 DECL_VIRTUAL_CONTEXT.
6222 (set_vindex): Remove.
6223 (set_primary_base): Remove vfuns_p parameter.
6224 (determine_primary_base): Likewise.
6225 (modify_all_vtables): Likewise.
6226 (layout_class_type): Likewise. Adjust calls to other functions
6227 accordingly.
6228 (finish_struct_1): Adjust calls to modified functions. Set
6229 DECL_VINDEX here.
6230 * cp-tree.h (lang_type_class): Remove vsize.
6231 (CLASSTYPE_VSIZE): Remove.
6232 (lang_decl): Remove thunks.
6233 (DECL_THUNKS): Adjust.
6234 (DECL_VIRTUAL_CONTEXT): Remove.
6235 (duplicate_decls): Don't copy it.
6236 * pt.c (build_template_decl): Don't set it.
6237 (tsubst_decl): Likewise.
6238 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
6239
6240 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
6241 (build_vtable_entry): Remove.
6242 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
6243 (lang_decl): Add thunks.
6244 (DECL_THUNKS): New macro.
6245 * decl.c (duplicate_decls): Copy it.
6246 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
6247 * semantics.c (emit_associated_thunks): Simplify.
6248
6249 2002-10-24 David Edelsohn <edelsohn@gnu.org>
6250
6251 PR c++/7228
6252 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
6253 lang_type structure exists before accessing field.
6254 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
6255 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
6256 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
6257 * class.c (check_field_decls): Use new macros.
6258 * typeck2.c (process_init_constructor): Remove redundant check for
6259 existence of lang_type structure.
6260
6261 2002-10-24 Mark Mitchell <mark@codesourcery.com>
6262
6263 * class.c (end_of_base): New method.
6264 (end_of_class): Use it. Check indirect virtual bases.
6265
6266 * class.c (check_field_decls): Fix typo.
6267
6268 2002-10-23 Mark Mitchell <mark@codesourcery.com>
6269
6270 PR c++/8067
6271 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
6272 related variables.
6273
6274 PR c++/7679
6275 * spew.c (next_token): Do not return an endless stream of
6276 END_OF_SAVED_INPUT tokens.
6277 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
6278 the cached token stream.
6279 (snarf_defarg): Likewise.
6280
6281 2002-10-23 Zack Weinberg <zack@codesourcery.com>
6282
6283 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
6284 variably_modified_type_p.
6285 * cp-tree.h: Remove prototype of variably_modified_type_p.
6286 * tree.c (variably_modified_type_p): Remove; now implemented
6287 in language-independent code.
6288
6289 2002-10-22 Mark Mitchell <mark@codesourcery.com>
6290
6291 PR c++/6579
6292 * spew.c (snarf_parenthesized_expression): New function.
6293 (snarf_block): Use it.
6294
6295 2002-10-22 Richard Henderson <rth@redhat.com>
6296
6297 * method.c (use_thunk): Always compute vcall_value; assert that
6298 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
6299 for vcall thunks as well.
6300
6301 2002-10-21 Mark Mitchell <mark@codesourcery.com>
6302
6303 * class.c (empty_base_at_nonzero_offset_p): New function.
6304 (layout_nonempty_base_or_field): Do not check for conflicts when
6305 laying out a virtual base using the GCC 3.2 ABI.
6306 (build_base_field): Correct checking for presence of empty classes
6307 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
6308
6309 * class.c (include_empty_classes): Use normalize_rli.
6310 (layout_class_type): Likewise.
6311
6312 * decl.c (reshape_init): Tweak handling of character arrays.
6313
6314 PR c++/8218
6315 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
6316 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
6317 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
6318 (check_field_decls): Likewise.
6319 (layout_class_type): Likewise.
6320 (finish_struct_1): Initialize it.
6321 (walk_subobject_offsets): Use it to prune searches.
6322
6323 2002-10-20 Mark Mitchell <mark@codesourcery.com>
6324
6325 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
6326 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
6327 TARGET_ASM_OUTPUT_MI_THUNK in comments.
6328
6329 2002-10-18 Zack Weinberg <zack@codesourcery.com>
6330
6331 * decl.c (start_decl): Point users of the old initialized-
6332 typedef extension at __typeof__.
6333
6334 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6335
6336 * Make-lang.in (method.o): Depend on TARGET_H.
6337 * method.c (target.h): Include it.
6338 (use_thunk): Use target hooks. Use vcall thunks, if available.
6339
6340 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6341
6342 * class.c (base_derived_from): Make sure return value is a bool.
6343
6344 2002-10-18 Mark Mitchell <mark@codesourcery.com>
6345
6346 * class.c (find_final_overrider_data_s): Remove overriding_fn and
6347 overriding_base.
6348 (dfs_base_derived_from): New function.
6349 (base_derived_from): Likewise.
6350 (dfs_find_final_overrider): Use base_derived_from.
6351 (find_final_overrider): Adjust.
6352
6353 2002-10-18 Jason Merrill <jason@redhat.com>
6354
6355 PR c++/8080
6356 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
6357 with condition decls in a template.
6358
6359 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
6360
6361 * class.c (add_method): Compare template parms too.
6362
6363 2002-10-17 Mark Mitchell <mark@codesourcery.com>
6364
6365 PR c++/7584
6366 * class.c (handle_using_decl): Allow the declaration used to be
6367 from an ambiguous base.
6368
6369 * pt.c (convert_template_argument): Revert this change:
6370 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6371 * pt.c (convert_template_argument): Do not fold non-type
6372 template rguments when inside a template.
6373
6374 * init.c (expand_default_init): Handle brace-enclosed initializers
6375 correctly.
6376
6377 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6378
6379 * mangle.c (write_expression): Correct handling of enumeration
6380 constants.
6381 (write_template_arg): Likewise.
6382 * pt.c (convert_template_argument): Do not fold non-type template
6383 arguments when inside a template.
6384
6385 PR c++/7478
6386 * cvt.c (convert_to_reference): Allow references as the incoming
6387 type.
6388
6389 2002-10-16 Mark Mitchell <mark@codesourcery.com>
6390
6391 PR c++/7524
6392 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
6393 build_qualified_type.
6394
6395 2002-10-15 Richard Henderson <rth@redhat.com>
6396
6397 * error.c (dump_expr): Use real_to_decimal directly, and with
6398 the new arguments.
6399
6400 2002-10-15 Mark Mitchell <mark@codesourcery.com>
6401
6402 * decl.c (reshape_init): Fix typo.
6403
6404 * cp-tree.h (operator_name_info_t): Add arity.
6405 * lex.c (init_operators): Initialize it.
6406 * mangle.c (write_conversion_operator_name): New function.
6407 (write_unqualified_name): Use it.
6408 (write_template_args): Accept template arguments as a TREE_LIST.
6409 (write_expression): Adjust handling of qualified names to match
6410 specification.
6411
6412 2002-10-15 Jason Merrill <jason@redhat.com>
6413
6414 * call.c (call_builtin_trap): New fn.
6415 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
6416 (build_call): Don't set current_function_returns_abnormally outside
6417 a function.
6418
6419 2002-10-14 Mark Mitchell <mark@codesourcery.com>
6420
6421 * class.c (check_field_decls): Remove empty_p parameter. Instead,
6422 clear CLASSTYPE_EMPTY_P.
6423 (build_base_field): Likewise.
6424 (build_base_fields): Likewise.
6425 (check_bases_and_members): Likewise.
6426 (create_vtbl_ptr): Likewise.
6427 (layout_class_type): Likewise. Ensure that empty classes have
6428 size zero when used as base classes in the 3.2 ABI.
6429 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
6430 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
6431 parameter.
6432 (is_empty_class): Correct definition when using post-3.2 ABI.
6433 * cp-tree.h (lang_type_class): Add empty_p.
6434 (CLASSTYPE_EMPTY_P): New macro.
6435
6436 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
6437
6438 * init.c (build_delete): Do not apply save_expr for arrays.
6439 (build_vec_delete): Likewise.
6440
6441 2002-10-14 Mark Mitchell <mark@codesourcery.com>
6442
6443 * decl.c (layout_var_decl): Call layout_decl even for variables
6444 whose type is an array with unspecified bounds.
6445
6446 PR c++/7176
6447 * lex.c (do_identifier): Add another option for the parsing
6448 parameter.
6449 * parse.y (do_id): Use it.
6450
6451 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
6452
6453 PRs C++/6803, C++/7721 and C++/7803
6454 * decl.c (grokdeclarator): Gracefully handle template-name as
6455 decl-specifier.
6456
6457 2002-10-11 Jason Molenda <jmolenda@apple.com>
6458
6459 * init.c (build_field_list): Provide uses_unions_p with a default
6460 value.
6461
6462 2002-10-11 Mark Mitchell <mark@codesourcery.com>
6463
6464 PR c++/5661
6465 * cp-tree.h (variably_modified_type_p): New function.
6466 (grokdeclarator) Tighten check for variably modified types as
6467 fields.
6468 * pt.c (convert_template_argument): Do not allow variably modified
6469 types as template arguments.
6470 * tree.c (variably_modified_type_p): New function.
6471
6472 * NEWS: Document removal of "new X = ..." extension.
6473 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
6474 brace-enclosed initializers.
6475 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
6476 (initialize_local_var): Remove declaration.
6477 (expand_static_init): Likewise.
6478 * decl.c (next_initializable_field): New function.
6479 (reshape_init): Likewise.
6480 (check_initializer): Use them. Build dynamic initializer for
6481 aggregates here too.
6482 (initialize_local_var): Simplify, and incorporate cleanup
6483 insertion code as well.
6484 (destroy_local_var): Remove.
6485 (cp_finish_decl): Tidy.
6486 (expand_static_init): Fold checks for whether or not a variable
6487 needs initialization into this function. Simplify.
6488 * decl2.c (do_static_initialization): Simplify.
6489 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
6490 be done for us automatically.
6491 (expand_default_init): Handle brace-enclosed initializers
6492 correctly.
6493 (expand_aggr_init_1): Remove RTL-generation code.
6494 (build_vec_init): Remove "new X = ..." support.
6495 * parse.y (new_initializer): Likewise.
6496 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
6497 brace-enclosed initializer.
6498 (create_pseudo_type_info): Likewise.
6499 * typeck2.c (store_init_value): Don't try to handle digest_init
6500 being called more than once.
6501 (digest_init): Tidy handling of brace-enclosed initializers.
6502
6503 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6504
6505 * decl.c (typename_hash): Use htab_hash_pointer.
6506
6507 2002-10-10 Jim Wilson <wilson@redhat.com>
6508
6509 * decl.c (duplicate_decls): Don't call decl_attributes.
6510
6511 2002-10-09 Zack Weinberg <zack@codesourcery.com>
6512
6513 PR c/7353
6514 * decl.c (start_decl): Unconditionally issue error for
6515 'typedef foo = bar'.
6516 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
6517 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
6518
6519 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6520
6521 * decl2.c (prune_vtable_vardecl): Delete unused function.
6522
6523 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6524
6525 PR c++/7754
6526 * decl2.c (finish_anon_union): Do not expand anonymous unions when
6527 procesing template functions.
6528 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6529 type. Call layout_decl.
6530 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6531
6532 2002-10-07 Richard Henderson <rth@redhat.com>
6533
6534 * decl2.c, pt.c: Revert c++/7754 fix.
6535
6536 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6537
6538 PR c++/7804
6539 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
6540
6541 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6542
6543 PR c++/7931
6544 * pt.c (for_each_template_parm_r): Handle BASELINKs.
6545
6546 PR c++/7754
6547 * decl2.c (finish_anon_union): Do not expand anonymous unions when
6548 procesing template functions.
6549 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6550 type. Call layout_decl.
6551 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6552
6553 2002-10-03 Mark Mitchell <mark@codesourcery.com>
6554
6555 PR c++/8006
6556 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
6557 template parameters.
6558 (globals): Add entity and need_abi_warning.
6559 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
6560 CLASSTYPE_TEMPLATE_INFO.
6561 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
6562 TYPE_TI_TEMPLATE.
6563 (write_prefix): Handle typename types correctly.
6564 (write_template_prefix): Handle template template parameters
6565 correctly.
6566 (start_mangling): Add entity parameter.
6567 (finish_mangling): Warn about names whose mangling will change.
6568 (mangle_decl_string): Adjust.
6569 (mangle_type_string): Likewise.
6570 (mangle_special_for_type): Likewise.
6571 (mangle_ctor_vtbl_for_type): Likewise.
6572 (mangle_thunk): Likewise.
6573 (mangle_guard_variable): Likewise.
6574 (mangle_ref_init_variable): Likewise.
6575
6576 2002-10-02 Mark Mitchell <mark@codesourcery.com>
6577
6578 PR c++/7188.
6579 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
6580 * cp-tree.h (emit_base_init): Rename to ....
6581 (emit_mem_initializers): ... this.
6582 (expand_member_init): Change prototype.
6583 * init.c (perform_member_init): Compute explicit, rather than
6584 requiring it as a parameter.
6585 (sort_member_init): Rename to ...
6586 (sort_mem_initializers): ... this. Process bases and data members
6587 together.
6588 (sort_base_init): Remove.
6589 (emit_base_init): Rename to ...
6590 (emit_mem_initializers): ... this.
6591 (expand_aggr_vbase_init_1): Remove.
6592 (construct_virtual_bases): Rename to ...
6593 (construct_virtual_base): ... this.
6594 (expand_member_init): Rework handling of base initializers.
6595 * method.c (do_build_copy_constructor): Use
6596 finish_mem_initializers.
6597 * parse.y (member_init): Adjust calls to expand_member_init.
6598 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
6599 (tsubst_initializer_list): Use expand_member_init.
6600 * semantics.c (finish_mem_intiailizers): Simplify.
6601
6602 2002-10-02 Matt Austern <austern@apple.com>
6603 * decl.c (walk_vtables_r): Fixed typo that caused result to
6604 never get a nonzero value.
6605
6606 2002-10-02 Roger Sayle <roger@eyesopen.com>
6607
6608 PR optimization/6627
6609 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
6610 from here, and move it to tree.h.
6611 * decl.c (cxx_init_decl_processing): If storing the vbit
6612 in function pointers, ensure that force_align_functions_log
6613 is atleast one.
6614
6615 2002-10-02 Matt Austern <austern@apple.com>
6616
6617 * class.c (check_field_decls): Changed warning about const member
6618 variables so that it doesn't get issued for a class aggregate.
6619
6620 2002-10-01 Mark Mitchell <mark@codesourcery.com>
6621
6622 * decl.c (cp_finish_decl): Make sure array types are laid out,
6623 even if the array bounds are unknown.
6624
6625 2002-10-01 Steve Ellcey <sje@cup.hp.com>
6626
6627 * class.c (build_vtbl_initializer): Change build_c_cast
6628 to build1.
6629
6630 2002-10-01 Mark Mitchell <mark@codesourcery.com>
6631
6632 * decl.c (cp_finish_decl): Make sure array types are laid out,
6633 even if the array bounds are unknown.
6634
6635 * decl.c (cp_finish_decl): Correct check for dynamic
6636 initialization of thread-local storage.
6637
6638 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
6639
6640 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
6641 overloaded.
6642
6643 2002-09-30 Steve Ellcey <sje@cup.hp.com>
6644
6645 * class.c (build_vtbl_initializer): Add cast.
6646 (add_vcall_offset_vtbl_entries_1):
6647 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
6648
6649 2002-09-30 Mark Mitchell <mark@codesourcery.com>
6650
6651 * class.c (walk_subobject_offsets): Correct the calculation of
6652 offsets for virtual bases. Correct the counting of array
6653 elements.
6654 (layout_nonempty_base_or_field): Simplify. Correct the
6655 calculation of offsets to be propagated through the binfo
6656 hierarchy.
6657 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
6658 Add the FIELD_DECL to TYPE_FIELDS.
6659 (build_base_fields): Adjust accordingly.
6660 (layout_virtual_bases): Use build_base_field.
6661 (end_of_class): Return a tree, not an integer.
6662 (warn_about_ambiguous_direct_bases): Rename to ...
6663 (warn_about_ambiguous_bases): ... this.
6664 (include_empty_classes): New function.
6665 (layout_class_type): Create an alternative version of the type to
6666 be used when as a base class type. Do not call
6667 finish_record_layout until we are done laying out the class.
6668 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
6669 as_base.
6670 (CLASSTYPE_SIZE): Reimplement.
6671 (CLASSTYPE_SIZE_UNIT): Likewise.
6672 (CLASSTYPE_ALIGN): Likweise.
6673 (CLASSTYPE_USER_ALIGN): Likewise.
6674 (CLASSTYPE_AS_BASE): New macro.
6675 (DECL_INITIALIZED_P): Likewise.
6676 (extract_init): Remove prototype.
6677 (build_forced_zero_init): Rename to ...
6678 (build_zero_init): ... this.
6679 (force_store_init_value): Remove.
6680 * decl.c (obscure_complex_init): Remove.
6681 (duplicate_decls): Copy DECL_INITIALIZED_P.
6682 (check_initializer): Do not leave junk in DECL_INITIAL.
6683 (cp_finish_decl): Handle zero-initialization of entities with
6684 static storage duration.
6685 * expr.c (extract_init): Remove.
6686 * init.c (build_forced_zero_init): Remove.
6687 (build_zero_init): New function.
6688 (build_default_init): Use it.
6689 (build_field_list): Skip FIELD_DECLs for base subobjects.
6690 (push_base_cleanups): Likewise.
6691 * method.c (do_build_assign_ref): Likewise.
6692 (synthesize_exception_spec): Likewise.
6693 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
6694 (regenerate_decl_from_template): To not set DECL_INITIAL for a
6695 static data member whose initialization took place in its class.
6696 (instantiate_decl): Do not pass an initializer to cp_finish_decl
6697 in that situation.
6698 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
6699 (dfs_unuse_fields): Likewise.
6700 * tree.c (pod_type_p): Handle error_mark_node.
6701 (zero_init_p): Likewise.
6702 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
6703 subobjects.
6704 * typeck2.c (store_init_value): Remove #if 0'd code.
6705 (force_store_init_value): Remove.
6706 (process_init_constructor): Use build_zero_init.
6707
6708 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
6709
6710 PR c++/7788
6711 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
6712
6713 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
6714
6715 * cp-tree.h: Fix comment typos.
6716 * decl.c: Likewise.
6717 * pt.c: Likewise.
6718
6719 2002-09-25 Mark Mitchell <mark@codesourcery.com>
6720
6721 * cp/class.c (contains_empty_class_p): New method.
6722 (walk_subobject_offsets): Correct computation of field offset.
6723 (layout_empty_base): Correct placement of emtpy base classes.
6724 (layout_class_type): Warn about ABI changes.
6725
6726 2002-09-23 Mark Mitchell <mark@codesourcery.com>
6727
6728 * cp/class.c (layout_virtual_bases): Do not round the size of the
6729 type to a multiple of the alignment before laying out virtual bases.
6730 (layout_class_type): Correct handling of bit-fields that are wider
6731 than their type inside unions. Round the size of the type to a
6732 even number of bytes when computing the size without virtual
6733 bases.
6734 * cp/cp-tree.h (abi_version_at_least): New macro.
6735
6736 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
6737
6738 * ChangeLog: Follow spelling conventions.
6739 * ChangeLog.2: Likewise.
6740 * call.c: Likewise.
6741 * class.c: Likewise.
6742 * cp-tree.h: Likewise.
6743 * cvt.c: Likewise.
6744 * decl.c: Likewise.
6745 * decl2.c: Likewise.
6746 * except.c: Likewise.
6747 * friend.c: Likewise.
6748 * g++spec.c: Likewise.
6749 * init.c: Likewise.
6750 * lex.c: Likewise.
6751 * mangle.c: Likewise.
6752 * method.c: Likewise.
6753 * operators.def: Likewise.
6754 * optimize.c: Likewise.
6755 * pt.c: Likewise.
6756 * rtti.c: Likewise.
6757 * search.c: Likewise.
6758 * semantics.c: Likewise.
6759 * spew.c: Likewise.
6760 * tree.c: Likewise.
6761 * typeck.c: Likewise.
6762
6763 2002-09-18 Devang Patel <dpatel@apple.com>
6764
6765 * cp/cp-tree.h: New prototype for walk_vtabls().
6766 * cp/decl.c (walk_vtables_r): New function.
6767 (struct cp_binding_level): Add new members, namespaces,
6768 names_size and vtables.
6769 (add_decl_to_level): Add decl in namespaces or vtables
6770 chain, if conditions match.
6771 (walk_vtables): New function.
6772 (walk_namespaces_r): Travers separate namespace chain
6773 for namespace decls.
6774 (wrapup_globals_for_namespace): Use names_size instead
6775 of list_length().
6776 * cp/decl2.c (finish_file): Use walk_vtables() instead of
6777 walk_globals() to walk vtable decls.
6778
6779 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
6780
6781 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
6782 ICE with invalid pointers & references.
6783
6784 2002-09-17 Zack Weinberg <zack@codesourcery.com>
6785
6786 * Make-lang.in: Remove all references to the demangler.
6787 * cxxfilt.c: Moved to binutils.
6788
6789 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
6790
6791 PR c++/7718
6792 * pt.c (tsubst_decl): Remove assert.
6793
6794 Remove DR 295 implementation.
6795 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
6796 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
6797 about ignoring volatile qualifiers.
6798
6799 * search.c (lookup_member): Correct documentation.
6800
6801 2002-09-16 Geoffrey Keating <geoffk@apple.com>
6802
6803 * cp-tree.h (union lang_tree_node): Add chain_next option.
6804
6805 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
6806
6807 * parse.y (parse_finish_call_expr): Check lookup_member result.
6808
6809 PR c++/7015
6810 * semantic.c (finish_asm_stmt): Fix operand/output_operands
6811 thinko.
6812 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
6813
6814 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
6815
6816 PR c++/7919
6817 * call.c (build_over_call): Convert this pointer for fns found by
6818 using decls.
6819
6820 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
6821
6822 * ChangeLog: Follow spelling conventions.
6823 * ChangeLog.1: Likewise.
6824
6825 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
6826
6827 PR c++/7768
6828 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
6829
6830 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
6831
6832 * error.c: Fix comment formatting.
6833 * except.c: Likewise.
6834 * expr.c: Likewise.
6835 * friend.c: Likewise.
6836 * g++spec.c: Likewise.
6837 * init.c: Likewise.
6838 * lex.c: Likewise.
6839 * mangle.c: Likewise.
6840 * method.c: Likewise.
6841 * optimize.c: Likewise.
6842 * pt.c: Likewise.
6843 * rtti.c: Likewise.
6844 * search.c: Likewise.
6845 * semantics.c: Likewise.
6846 * spew.c: Likewise.
6847 * tree.c: Likewise.
6848 * typeck.c: Likewise.
6849 * typeck2.c: Likewise.
6850
6851 2002-09-13 Matt Austern <austern@apple.com>
6852
6853 PR C++/7828
6854 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
6855 * cp/call.c: Change call-by-const-reference mechanism to use
6856 non_cast_lvalue_p when deciding whether the create a temporary.
6857 We need a temporary when passing, e.g. (long) x by const ref.
6858
6859 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
6860
6861 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
6862
6863 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
6864
6865 * decl.c: Fix comment formatting.
6866 * decl2.c: Likewise.
6867
6868 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
6869
6870 * call.c: Fix comment formatting.
6871 * class.c: Likewise.
6872 * cp-lang.c: Likewise.
6873 * cp-tree.h: Likewise.
6874 * cvt.c: Likewise.
6875
6876 2002-09-11 Zack Weinberg <zack@codesourcery.com>
6877
6878 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
6879 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
6880 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
6881 minor adjustments (use version_string, eliminate yet another
6882 duplicate of xmalloc)
6883
6884 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6885
6886 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
6887
6888 2002-09-05 Jason Merrill <jason@redhat.com>
6889
6890 * typeck2.c (add_exception_specifier): Only pedwarn for an
6891 incomplete type.
6892 (require_complete_eh_spec_types): New fn.
6893 (cxx_incomplete_type_diagnostic): Also support pedwarning.
6894 * typeck.c (complete_type_or_diagnostic): Likewise.
6895 * call.c (build_call): Call require_complete_eh_spec_types.
6896 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
6897 on an incomplete type.
6898
6899 2002-09-04 Jakub Jelinek <jakub@redhat.com>
6900
6901 * decl.c (start_cleanup_fn): Clear interface_only before
6902 start_function, restore it afterwards.
6903
6904 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
6905
6906 * cp-tree.h (finish_builtin_type): Remove.
6907 * decl2.c (finish_builtin_type): Move to common code.
6908 * decl.c (build_ptrmemfunc_type): Adjust.
6909 * rtti.c (create_pseudo_type_info): Adjust.
6910 (create_tinfo_types): Adjust.
6911
6912 2002-08-31 Jason Merrill <jason@redhat.com>
6913
6914 * cp-lang.c (cp_expr_size): Allow initialization from a
6915 CONSTRUCTOR.
6916
6917 2002-08-30 Richard Henderson <rth@redhat.com>
6918
6919 PR opt/7515
6920 * tree.c: Include target.h.
6921 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
6922 don't bind locally.
6923 * Makefile.in (tree.o): Update.
6924
6925 2002-08-27 Mark Mitchell <mark@codesourcery.com>
6926
6927 * class.c (layout_virtual_bases): Warn about bugs in G++ that
6928 result in incorrect object layouts.
6929 (layout_class_type): Likewise.
6930
6931 2002-08-24 Matt Austern <austern@apple.com>
6932
6933 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
6934 are allowable.
6935 (real_lvalue_p): Update caller.
6936 (lvalue_p): Ditto.
6937 (non_cast_lvalue_or_else): New.
6938 * tree.h: Declare it.
6939 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
6940
6941 2002-08-22 Mark Mitchell <mark@codesourcery.com>
6942
6943 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
6944 and COND_EXPR specially; fix error message output.
6945
6946 2002-08-22 Jason Merrill <jason@redhat.com>
6947
6948 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
6949 * semantics.c (nullify_returns_r): Likewise.
6950
6951 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
6952
6953 Fix PR/7621
6954 * typeck.c (finish_class_member_access_expr): Diagnose cases where
6955 name lookup finds nothing.
6956
6957 2002-08-15 Jason Merrill <jason@redhat.com>
6958
6959 * semantics.c (finish_then_clause): Remove redundant assignment.
6960 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
6961 extra binding level outside the if/switch statement.
6962 (finish_while_cond, finish_for_cond): Rewrite complex condition
6963 into the loop body.
6964
6965 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
6966
6967 * parse.y (sizeof, alignof, typeof): New non-terminals to
6968 increment skip_evaluation. Replace terminals with them and
6969 decrement skip_evaluation at the end of rules using them.
6970 * decl2.c (mark_used): Don't assemble_external if
6971 skipping evaluation.
6972
6973 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
6974
6975 Fix PR/7504
6976 * parse.y (parse_finish_call_expr): Handle incomplete
6977 type used to name a scope.
6978
6979 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
6980
6981 PR c++/7598
6982 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
6983 regression caused by my 2002-08-08 patch.
6984
6985 2002-08-13 Mark Mitchell <mark@codesourcery.com>
6986
6987 * decl.c (pushdecl_class_level): Honor requests to bind names to
6988 OVERLOADs.
6989
6990 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6991
6992 * decl2.c (build_call_from_tree): Fix uninitialized variable.
6993 * parse.y (parse_finish_call_expr): Likewise.
6994 * repo.c (old_args, old_dir, old_main): Const-ify.
6995
6996 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
6997
6998 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
6999 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7000 * optimize.c (maybe_clone_body): Likewise.
7001 * pt.c (tsubst_enum): Likewise.
7002 (lookup_template_class): Likewise.
7003 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7004
7005 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
7006
7007 * lang-specs.h: Remove -ansi.
7008
7009 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
7010
7011 * tree.c (maybe_dummy_object): Replace // with /* */
7012
7013 2002-08-09 Mark Mitchell <mark@codesourcery.com>
7014
7015 * call.c (standard_conversion): Use build_ptrmem_type.
7016 * cp-tree.h (build_ptrmem_type): New function.
7017 (adjust_result_of_qualified_name_lookup): Likewise.
7018 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7019 static data members.
7020 (build_ptrmem_type): New function.
7021 (grokdeclarator): Do not use build_offset_type when encountering a
7022 qualified name.
7023 * parse.y (parse_finish_call_expr): Use
7024 adjust_result_of_qualified_name_lookup.
7025 * search.c (adjust_result_of_qualified_name_lookup): New function.
7026 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7027 accessing OFFSET_TYPEs directly.
7028
7029 2002-08-08 Mike Stump <mrs@apple.com>
7030
7031 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7032 (type_decays_to): Likewise.
7033 * class.c (find_final_overrider): Likewise.
7034 (maybe_note_name_used_in_class): Likewise.
7035 * decl.c (current_tmpl_spec_kind): Likewise.
7036 (add_binding): Likewise.
7037 (push_class_binding): Likewise.
7038 (duplicate_decls): Likewise.
7039 (layout_var_decl): Likewise.
7040 (grokfndecl): Likewise.
7041 (grokdeclarator): Likewise.
7042 (check_default_argument): Likewise.
7043 * decl2.c (handle_class_head): Likewise.
7044 * error.c (dump_template_decl): Likewise.
7045 * init.c (build_offset_ref): Likewise.
7046 * pt.c (check_specialization_scope): Likewise.
7047 (determine_specialization): Likewise.
7048 (check_explicit_specialization): Likewise.
7049 (maybe_check_template_type): Likewise.
7050 (process_partial_specialization): Likewise.
7051 (check_default_tmpl_args): Likewise.
7052 (push_template_decl_real): Likewise.
7053 (convert_template_argument): Likewise.
7054 (try_class_unification): Likewise.
7055 (get_bindings_real): Likewise.
7056 (do_decl_instantiation): Likewise.
7057 * semantics.c (begin_function_definition): Likewise.
7058 (finish_member_declaration): Likewise.
7059 (check_multiple_declarators): Likewise.
7060 * typeck.c (comp_array_types): Likewise.
7061 (comptypes): Likewise.
7062 (expr_sizeof): Likewise.
7063 (build_binary_op): Likewise.
7064 (dubious_conversion_warnings): Likewise.
7065 (check_return_expr): Likewise.
7066
7067 2002-08-08 Mark Mitchell <mark@codesourcery.com>
7068
7069 * typeck.c (build_class_member_access_expr): Do not return
7070 error_mark_node when no error has occurred.
7071
7072 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7073
7074 * typeck.c (build_component_addr): Remove.
7075 (build_unary_op): Just check it's not a bitfield, and then build
7076 an ADDR_EXPR.
7077
7078 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7079
7080 * class.c (convert_to_base): Correct check for error_mark_node.
7081 (create_vtable_ptr): Remove unused VFUNS_P parm.
7082
7083 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7084
7085 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7086
7087 2002-08-07 Mark Mitchell <mark@codesourcery.com>
7088
7089 Rework build_component_ref.
7090 * call.c (build_vfield_ref): Do not go through build_component_ref.
7091 (build_field_call): Use build_class_member_access_expr.
7092 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7093 (build_object_call): Likewise.
7094 * class.c (convert_to_base): New function.
7095 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7096 (instantiate_type): Handle BASELINKs.
7097 * cp-tree.def (BASELINK): New tree code.
7098 * cp-tree.h (BASELINK_P): Reimplement.
7099 (SET_BASELINK_P): Remove.
7100 (BASELINK_BINFO): Reimplement.
7101 (BASELINK_FUNCTIONS): Likewise.
7102 (BASELINK_ACCESS_BINFO): Likewise.
7103 (BASELINK_OPTYPE): Likewise.
7104 (convert_to_base): New function.
7105 (name_p): Likewise.
7106 (build_object_ref): Remove.
7107 (build_component_ref_1): Likewise.
7108 (build_component_ref): Likewise.
7109 (build_x_component_ref): Likewise.
7110 (build_class_member_access_expr): New function.
7111 (finish_class_member_access_expr): Likewise.
7112 (build_ptrmemfunc_access_expr): Likewise.
7113 * decl.c (grokdeclarator): Handle BASELINKs.
7114 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7115 finish_class_member_access_expr.
7116 (arg_assoc): Handle BASELINKs.
7117 (do_class_using_decl): Likewise.
7118 * error.c (dump_decl): Likewise.
7119 (dump_expr): Use build_ptrmemfunc_access_expr.
7120 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7121 destructors.
7122 (build_throw): Use BASELINK_FUNCTIONS.
7123 * init.c (perform_member_init): Use
7124 build_class_member_access_expr.
7125 (build_offset_ref): Handle BASELINKs. Use
7126 build_class_member_access_expr.
7127 * method.c (hack_identifier): Likewise.
7128 * parse.y (do_id): Use BASELINK, not TREE_LIST.
7129 (primary): Remove uses of build_object_ref.
7130 * pt.c (lookup_template_function): Handle BASELINKs.
7131 (resolve_overloaded_unification): Likewise.
7132 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7133 (lookup_field): Use BASELINK, not TREE_LIST.
7134 (lookup_fnfiels): Likewise.
7135 (setup_class_bindings): Likewise.
7136 * semantics.c (finish_object_call_expr): Do not use
7137 build_method_call when we already know what function is being
7138 called.
7139 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7140 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7141 TREE_CHAIN.
7142 (name_p): New function.
7143 * typeck.c (build_object_ref): Remove.
7144 (build_component_ref_1): Likewise.
7145 (build_x_component_ref): Likewise.
7146 (build_class_member_access_expr): New function.
7147 (finish_class_member_access_expr): Likewise.
7148 (build_ptrmemfunc_access_expr): Likewise.
7149 (get_member_function_from_ptrfunc): Use
7150 build_ptrmemfunc_access_expr.
7151 (build_binary_op): Likewise.
7152 (build_unary_op): Likewise.
7153 (build_ptrmemfunc): Likewise.
7154 (pfn_from_ptrmemfunc): Likewise.
7155 * typeck2.c (build_m_component_ref): Adjust comment.
7156
7157 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
7158
7159 * Make-lang.in (CXX_C_OBJS): Update.
7160 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7161 * cp-tree.h (cxx_decode_option): Remove.
7162 * decl2.c (compare_options, lang_f_options, unsupported_options,
7163 cxx_decode_option): Remove.
7164
7165 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
7166
7167 * typeck.c (build_x_unary_op): Handle pointer-to-member.
7168
7169 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
7170
7171 * class.c: Don't include obstack.h.
7172 (popclass):
7173 * decl2.c: Delete bogus comment.
7174 * error.c: Don't include obstack.h.
7175 * except.c: Likewise.
7176 (dump_type): Correct comment.
7177 * method.c: Don't include obstack.h.
7178 * tree.c: Likewise.
7179
7180 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
7181
7182 Fix PR/2213
7183 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7184 expressions to pointer-to-data-member of pointer-to-member-functions.
7185
7186 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
7187
7188 * cvt.c (ocp_convert): Delete obsolete code.
7189 * parse.y (permanent_obstack): Delete declaration.
7190 * pt.c (permanent_obstack): Delete declaration.
7191 * repo.c (permanent_obstack): Delete declaration.
7192 (open_repo_file): Use xmalloc instead of permanent_obstack.
7193 (init_repo): Use xstrdup instead of permanent_obstack.
7194
7195 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
7196
7197 * cp-tree.h (VF_DERIVED_VALUE): Remove.
7198 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7199
7200 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
7201
7202 PR 7470.
7203 C++ ABI change - vfunc ordering.
7204 * class.c (add_virtual_function): Remove.
7205 (dfs_modify_all_vtables): Take list of all declared
7206 virtuals. Assign all that are not in primary base.
7207 (check_for_override): Adjust comments.
7208 (create_vtable_ptr): Take single list of virtuals. Build chain
7209 of declared virtuals here.
7210 (layout_class_type): Take single list of virtuals. Adjust.
7211 (finish_struct_1): Keep virtuals on single list. Adjust.
7212
7213 2002-08-02 Mark Mitchell <mark@codesourcery.com>
7214
7215 * init.c (build_member_call): Use build_new_method_call, not
7216 build_method_call.
7217
7218 2002-08-02 Krister Walfridsson <cato@df.lth.se>
7219
7220 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7221
7222 2002-08-02 Mark Mitchell <mark@codesourcery.com>
7223
7224 * call.c (build_method_call): Issue a more helpful error message
7225 about ambiguous method names.
7226
7227 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
7228
7229 * tree.c (build_shared_int_cst): Make cache file scope, and
7230 GTY it.
7231
7232 2002-08-02 Jason Merrill <jason@redhat.com>
7233
7234 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
7235 (cp_expr_size): New fn.
7236 * call.c (build_over_call): Lose empty class hackery.
7237 (convert_arg_to_ellipsis): Promote non-POD warning to error.
7238 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
7239
7240 * semantics.c (expand_body): Do tree optimization in the function
7241 context, too.
7242
7243 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
7244
7245 * cp-tree.h: Move all warning and flag declarations to c-common.h.
7246 * decl.c: Move all warning and flag variables to c-common.c.
7247 * decl2.c: Move all warning and flag variables to c-common.c.
7248 * lex.c (flag_digraphs): Remove.
7249 (warn_traditional): Now in c-common.c.
7250
7251 2002-07-31 Mark Mitchell <mark@codesourcery.com>
7252
7253 * call.c (build_field_call): Do not look up the field by name.
7254 (build_method_call): Simplify.
7255 (struct z_candidate): Add access_path and conversion_path. Remove
7256 basetype_path.
7257 (convert_class_to_reference): Adjust use of
7258 add_function_candidate.
7259 (add_candidate): Add conversion_path argument.
7260 (add_function_candidate): Use it.
7261 (add_conv_dndidate): Likewise.
7262 (build_builtin_candidate): Likewise.
7263 (add_template_candidate_real): Add conversion_path argument.
7264 (add_template_conv_candidate): Likewise.
7265 (add_template_candidate): Likewise.
7266 (build_user_type_conversion_1): Use it.
7267 (build_new_function_call): Remove name lookup code. Adjust use of
7268 add_template_candidate and add_function_candidate.
7269 (build_new_op): Likewise.
7270 (convert_like_real): Use build_special_member_call.
7271 (build_over_call): Use cand->conversion_path.
7272 (build_special_member_call): New method.
7273 (build_new_method_call): Remove name lookup code.
7274 * cp-tree.def (OFFSET_REF): Update documentation.
7275 (TEMPLATE_ID_EXPR): Likewise.
7276 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
7277 (BASELINK_OPTYPE): Likewise.
7278 (build_new_method_call): Adjust prototype.
7279 (build_special_member_call): New method.
7280 (build_baselink): New method.
7281 (build_offset_ref_call_from_tree): Likewise.
7282 (build_call_from_tree): Likewise.
7283 (finish_qualified_call_expr): Remove.
7284 (finish_call_expr): Adjust prototype.
7285 (build_x_function_call): Remove.
7286 * cvt.c (ocp_convert): Use build_special_member_call.
7287 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
7288 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
7289 CALL_EXPR.
7290 (build_offset_ref_call_from_tree): New function.
7291 (build_call_from_tree): Likewise.
7292 * init.c (expand_cleanup): Use build_special_member_call.
7293 (expand_default_init): Likewise.
7294 (build_member_call): Use finish_call_expr.
7295 (build_new_1): Use build_special_member_call.
7296 (push_base_cleanups): Likewise.
7297 * method.c (do_build_assign_ref): Likewise.
7298 * parse.y (template_id): Do not pass a COMPONENT_REF to
7299 lookup_template_function.
7300 (primary): Use parse_finish_call_epxr, not finish_call_expr.
7301 (parse_finish_call_expr): New function.
7302 * pt.c (lookup_template_function): Add assertions.
7303 * search.c (lookup_base): Allow T to be a binfo.
7304 (build_baselink): New function.
7305 (lookup_member): Use it.
7306 * semantics.c (finish_call_expr): Do not do name lookup.
7307 (finish_object_call_expr): Remove #if 0'd code.
7308 (finish_qualified_call_expr): Remove.
7309 * typeck.c (build_x_function_call): Remove.
7310 (build_static_case): Use build_special_member_call.
7311 * typeck2.c (build_functional_cast): Likewise.
7312
7313 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
7314
7315 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
7316
7317 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
7318
7319 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
7320
7321 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
7322
7323 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
7324 documentation.
7325
7326 2002-07-29 Alan Modra <amodra@bigpond.net.au>
7327
7328 * cp-tree.h: Comment typo fix.
7329
7330 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
7331
7332 * spew.c (space_for_token): Allocate zeroed memory for a new token
7333 chunk.
7334
7335 2002-07-27 Roger Sayle <roger@eyesopen.com>
7336
7337 * decl.c (builtin_function_1): No need to explicitly mark
7338 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
7339
7340 2002-07-27 Roger Sayle <roger@eyesopen.com>
7341
7342 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
7343
7344 2002-07-26 Jason Merrill <jason@redhat.com>
7345
7346 * call.c (build_over_call): Likewise.
7347 (cp_convert_parm_for_inlining): New fn.
7348 (convert_for_arg_passing): New fn.
7349 (convert_default_arg, build_over_call): Use it.
7350 (type_passed_as): New fn.
7351 * pt.c (tsubst_decl): Use it.
7352 * decl2.c (cp_build_parm_decl): New fn.
7353 (build_artificial_parm): Use it.
7354 (start_static_storage_duration_function): Likewise.
7355 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
7356 (grokparms): Don't mess with DECL_ARG_TYPE.
7357 * typeck.c (convert_arguments): Use convert_for_arg_passing.
7358 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7359 Define.
7360 * cp-tree.h: Declare new fns.
7361
7362 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
7363
7364 * cp-tree.h (flag_operator_names): Remove.
7365 * decl2.c (flag_operator_names): Remove.
7366 (lang_f_options): Remove operator-names.
7367 * lex.c (D_OPNAME): Remove.
7368 (reswords): Remove operator names.
7369 (rid_to_yy): Remove operator names.
7370 (init_reswords): No need to handle D_OPNAME.
7371 * spew.c (read_process_identifier): There are no operator
7372 names.
7373
7374 2002-07-26 Jason Merrill <jason@redhat.com>
7375
7376 * dump.c (cp_dump_tree): Call c_dump_tree.
7377 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7378
7379 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
7380
7381 * error.c (print_whitespace): Remove.
7382 * g++spec.c (LIBUNWIND): Move.
7383 * mangle.c (mangled_position, write_signed_number): Remove.
7384
7385 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
7386
7387 * decl2.c (cxx_decode_option): Similarly.
7388
7389 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
7390
7391 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
7392 (cxx_sizeof_or_alignof_type): Take a third argument.
7393 (cxx_sizeof): Adjust definition.
7394 (cxx_alignof): Likewise.
7395 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
7396 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
7397 complaining.
7398 (c_sizeof_nowarn): Remove definition.
7399 (build_unary_op): Use cxx_sizeof_nowarn.
7400
7401 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
7402
7403 * tree.c (cp_build_qualified_type_real): When copying
7404 pointer-to-method types, unshare the record that holds
7405 the cached pointer-to-member-function type.
7406
7407 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
7408
7409 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
7410
7411 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
7412
7413 Fix PR/7363:
7414 * typeck.c (cxx_sizeof_or_alignof_type): New function.
7415 (c_sizeof): Remove definition.
7416 (expr_sizeof): Use cxx_sizeof.
7417 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
7418 * decl.c (finish_destructor_body): Use cxx_sizeof.
7419 * semantics.c (finish_alignof): Likewise.
7420 (finish_alignof): Use cxx_alignof.
7421 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
7422 (cxx_sizeof_or_alignof_type): Declare.
7423 (my_friendly_assert): Move to ../c-common.h.
7424
7425 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
7426
7427 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
7428
7429 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7430
7431 PR c++/7347, c++/7348
7432 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
7433 * decl.c (make_typename_type): Use it.
7434 (make_unbound_class_template): Likewise.
7435 (lookup_name_real): Don't call type_access_control if scope is
7436 template parameter dependent.
7437 * parse.y (template_arg): Call make_unbound_class_template with
7438 tf_parsing set.
7439 (nest_name_specifier): Call make_typename_type with tf_parsing set.
7440 (typename_sub0): Likewise.
7441 (typename_sub1): Likewise.
7442 (instantiate_decl): Push class scope.
7443 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
7444 for both static variable and member function template.
7445 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
7446 and arguments.
7447 * search.c (type_access_control): Do type access for TEMPLATE_DECL
7448 too.
7449
7450 2002-07-20 Roger Sayle <roger@eyesopen.com>
7451
7452 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
7453 test by using positive_option. Make whitespace consistent.
7454
7455 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
7456
7457 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7458 members with 'locus'. Adjust use throughout.
7459 (struct feed): Likewise.
7460 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
7461 Adjust use.
7462 (snarf_defarg): Use error(), not error_with_file_and_line().
7463
7464 2002-07-19 Chris Demetriou <cgd@broadcom.com>
7465
7466 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
7467 cpp_options is included.
7468
7469 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7470
7471 PR c++/2862, c++/2863
7472 * pt.c (determine_specialization): Compare the length of
7473 TYPE_ARG_TYPES. Tidy.
7474
7475 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7476
7477 PR c++/3797
7478 * decl.c (duplicate_decls): Don't propagate inlining parameters from
7479 olddecl to newdecl when newdecl is a specialization of the
7480 instantiation olddecl.
7481
7482 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7483
7484 PR c++/4802, c++/5387
7485 * decl.c (make_typename_type): Use enforce_access.
7486
7487 2002-07-17 Scott Snyder <snyder@fnal.gov>
7488
7489 PR c++/7320
7490 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
7491
7492 2002-07-12 Mark Mitchell <mark@codesourcery.com>
7493
7494 * class.c (add_method): Correct handling of conversion operators.
7495
7496 2002-07-11 Mark Mitchell <mark@codesourcery.com>
7497
7498 PR c++/7224
7499 * class.c (add_method): Simplify.
7500
7501 2002-07-11 Jason Merrill <jason@redhat.com>
7502
7503 PR c++/7279
7504 * tree.c (cp_copy_res_decl_for_inlining): Also copy
7505 TREE_ADDRESSABLE.
7506
7507 2002-07-10 Graham Stott <graham.stott@btinternet.com>
7508
7509 * pt.c (template_parm_this_level_p, push_template_decl_real):
7510 Pass depth as int pointer.
7511
7512 2002-07-11 Tim Josling <tej@melbpc.org.au>
7513
7514 Remove front end hard coding from gengtype.c.
7515
7516 * config-lang.in (gtfiles): Add files needed for this front end.
7517
7518 2002-07-10 Mark Mitchell <mark@codesourcery.com>
7519
7520 * cp-tree.h (unqualified_name_lookup_error): Declare it.
7521 (begin_function_definition): Adjust prototype.
7522 * lex.c (unqualified_name_lookup_error): New function, split out
7523 from ...
7524 (do_identifier): ... here.
7525 * parse.y (parse_begin_function_definition): New function.
7526 (fn.def1): Use it.
7527 * semantics.c (begin_function_definition): Accept decl-specifiers
7528 and attributes as separate parameters.
7529
7530 2002-07-10 Jason Merrill <jason@redhat.com>
7531
7532 PR c++/6255
7533 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
7534 modifying the old one.
7535
7536 2002-07-09 Mark Mitchell <mark@codesourcery.com>
7537
7538 * cp-tree.h (constructor_name_p): Declare it.
7539 (check_template_template_default_arg): Likewise.
7540 * class.c (handle_using_decl): Use constructor_name_p.
7541 * decl.c (grokdeclarator): Likewise.
7542 * decl2.c (constructor_name_p): Define it.
7543 * init.c (build_member_call): Use constructor_name_p.
7544 * parse.y (template_parm): Use check_template_template_default_arg.
7545 * pt.c (check_explicit_specialization): Use constructor_name_p.
7546 * semantics.c (check_template_template_default_arg): New function.
7547
7548 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7549
7550 * pt.c (can_complete_type_without_circularity): Add static to
7551 function definition.
7552
7553 2002-07-08 Mark Mitchell <mark@codesourcery.com>
7554
7555 * cp-tree.h (have_extern_spec): Declare it
7556 * decl.c (have_extern_spec): Define it.
7557 (start_decl): Eliminate use of used_extern_spec.
7558 (start_function): Likewise.
7559 * parse.y (have_extern_spec): Remove declaration.
7560 (used_extern_spec): Likewise.
7561 (frob_specs): Eliminate use of used_extern_spec.
7562 (.hush_warning): Likewise.
7563
7564 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7565
7566 * Make-lang.in (cp/parse.o): Depend on decl.h.
7567 * cp-tree.h (do_decl_instantiation): Change prototype.
7568 * parse.y: Include decl.h.
7569 (parse_decl_instantiation): New function.
7570 (explicit_instantiation): Use it.
7571 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
7572 and DECLSPECS.
7573
7574 2002-07-07 Roger Sayle <roger@eyesopen.com>
7575
7576 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
7577 constructor and destructor tests when passed a TEMPLATE_DECL.
7578
7579 2002-07-05 Jason Merrill <jason@redhat.com>
7580
7581 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
7582 pointers.
7583
7584 PR optimization/7145
7585 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
7586
7587 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
7588
7589 Repair damage on weak-impared targets caused by my previous patch.
7590 * cp-tree.h (import_export_tinfo): Add parameter.
7591 * decl2.c (import_export_tinfo): Add parameter, post adjust
7592 DECL_COMDAT.
7593 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
7594 import_export_tinfo.
7595
7596 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7597
7598 PR c++/6944
7599 * init.c (build_aggr_init): Remove qualifiers of init before calling
7600 build_vec_init.
7601 (build_vec_init): Flatten multi-dimensional array during cleanup.
7602 (build_vec_delete_1): Abort if the type of each element is array.
7603
7604 2002-07-03 Graham Stott <graham.stott@btinternet.com>
7605
7606 * pt.c (instantiate_class_template): Fix typo.
7607
7608 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7609
7610 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
7611 by CVS conflict in my last patch.
7612
7613 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7614
7615 PR c++/6716
7616 * pt.c (can_complete_type_without_circularity): New function.
7617 (instantiate_class_template): Use it.
7618 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
7619 message due to incomplete fields.
7620
7621 2002-07-01 Mark Mitchell <mark@codesourcery.com>
7622
7623 PR c++/7112
7624 * mangle.c (write_expression): Add mangling for sizeof when
7625 applied to a type.
7626 * operators.def: Remove stale comment.
7627
7628 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
7629
7630 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
7631 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
7632 (tinfo_decl_type): Replace with ...
7633 (type_info_ptr_type): ... this.
7634 (import_export_tinfo): Declare.
7635 (tinfo_decl_p): Rename to ...
7636 (unemitted_tinfo_decl_p): ... this.
7637 * decl2.c (import_export_decl): Break out tinfo handling into ...
7638 (import_export_tinfo): ... here. New function.
7639 (finish_file): Adjust.
7640 * rtti.c (TINFO_REAL_NAME): New macro.
7641 (init_rtti_processing): Create the tinfo types.
7642 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
7643 (get_tinfo_decl): Adjust.
7644 (get_tinfo_ptr): New function.
7645 (get_type_id): Use it.
7646 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
7647 (ptr_initializer): Use get_tinfo_ptr.
7648 (ptm_initializer): Likewise.
7649 (synthesize_tinfo_var): Break into ...
7650 (get_pseudo_ti_init): ... this. Just create the initializer.
7651 (get_pseudo_ti_desc): .. and this.
7652 (create_real_tinfo_var): Remove.
7653 (create_pseudo_type_info): Don't create the vtable decl here.
7654 (get_vmi_pseudo_type_info): Remove.
7655 (create_tinfo_types): Adjust.
7656 (tinfo_decl_p): Rename to ...
7657 (unemitted_tinfo_decl_p): ... here. Adjust.
7658 (emit_tinfo_decl): Adjust. Create the initializer.
7659
7660 2002-06-27 Mark Mitchell <mark@codesourcery.com>
7661
7662 PR c++/6695
7663 * pt.c (tsubst_friend_class): Substitute into the context of the
7664 friend before using it.
7665
7666 2002-06-26 Mark Mitchell <mark@codesourcery.com>
7667
7668 * cp-tree.h (xref_tag): Change prototype.
7669 (handle_class_head): Likewise.
7670 (build_x_component_ref): Likewise.
7671 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
7672 (xref_tag): Take attributes as a separate parameter.
7673 (xref_tag_from_type): Adjust call to xref_tag.
7674 * decl2.c (build_expr_from_tree): Adjust call to
7675 build_x_component_ref.
7676 (handle_class_head): Take attributes as a separate parameter.
7677 * parse.y (parse_xref_tag): New function.
7678 (parse_handle_class_head): Likewise.
7679 (primary): Use parse_xref_tag.
7680 (class_head_decl): Use parse_handle_class_head.
7681 (class_head_defn): Likewise.
7682 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
7683 (build_dynamic_cast_1): Likewise.
7684 (create_pseudo_type_info): Likewise.
7685 (emit_support_tinfos): Likewise.
7686 * typeck.c (build_object_ref): Adjust call to
7687 build_x_component_ref.
7688 (build_x_component_ref): Remove protect parameter.
7689
7690 2002-06-25 Mark Mitchell <mark@codesourcery.com>
7691
7692 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
7693 * class.c (handle_using_decl): Likewise.
7694 (instantiate_type): Likewise.
7695 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
7696 (xref_basetypes): Change prototype.
7697 (begin_mem_initializers): New function.
7698 (get_overloaded_fn): Likewise.
7699 * decl.c (xref_basetypes): Simplify.
7700 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
7701 * init.c (build_offset_ref): Likewise.
7702 * parse.y (base_init): Use begin_mem_initializers().
7703 (structsp): Adjust call to xref_basetypes.
7704 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
7705 (instantiate_class_template): Adjust call to xref_basetypes.
7706 * semantics.c (begin_mem_initializers): New function.
7707 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
7708 (really_overlaoded_fn): Likewise.
7709 (get_overloaded_fn): New function.'
7710 (get_first_fn): USe BASELINK_FUNCTIONS.
7711
7712 2002-06-24 Mark Mitchell <mark@codesourcery.com>
7713
7714 * cp-tree.h (SCALAR_TYPE_P): New macro.
7715 (check_for_out_of_scope_variable): New function.
7716 (at_class_scope_p): Likewise.
7717 (finish_fname): Likewise.
7718 * class.c (finish_struct): Use at_function_scope_p.
7719 * decl.c (check_for_out_of_scope_variable): New function, split
7720 out from do_identifier.
7721 (finish_enum): Use at_function_scope_p.
7722 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
7723 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
7724 (primary): Use at_function_scope_p.
7725 * search.c (at_class_scope_p): New function.
7726 * semantics.c (finish_fname): Likewise.
7727 (check_multiple_declarators): Use at_function_scope_p.
7728
7729 2002-06-23 Mark Mitchell <mark@codesourcery.com>
7730
7731 * parse.y (parse_scoped_id): New function.
7732 (primary): Use it.
7733 * cp-tree.h (do_scoped_id): Adjust declaration.
7734 * lex.c (do_scoped_id): Remove call to yylex.
7735 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
7736 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
7737 expanding it inline.
7738
7739 2002-06-23 Matt Thomas <matt@3am-software.com>
7740
7741 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
7742 "#if VMS_TARGET".
7743
7744 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7745
7746 * mangle.c (integer_type_codes): Const-ify.
7747
7748 2002-06-20 Richard Henderson <rth@redhat.com>
7749
7750 PR c++/6747
7751 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
7752 Call put_var_into_stack.
7753
7754 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7755
7756 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
7757 array size calculation.
7758
7759 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7760
7761 PR c++/6892
7762 * pt.c (tsubst_expr): Handle FILE_STMT.
7763
7764 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7765
7766 PR c++/6723
7767 * pt.c (lookup_template_class): Don't build complete argument of
7768 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
7769 argument.
7770
7771 2002-06-19 Akim Demaille <akim@epita.fr>
7772
7773 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
7774 decl.h's TYPENAME.
7775 * spew.c, lex.c: Adjust.
7776 * parse.y (explicit_instantiation): Add empty action to override
7777 the default $$ = $1 where it introduces a type clash.
7778
7779 2002-06-14 Jason Merrill <jason@redhat.com>
7780
7781 * semantics.c (begin_for_stmt): Push the 'for' scope before
7782 adding the FOR_STMT.
7783
7784 C++ ABI changes.
7785 * class.c (build_base_field): Set DECL_PACKED.
7786 (layout_class_type): Don't use tail padding of PODs.
7787 * mangle.c (write_unqualified_name): Fix template conversion op
7788 mangling.
7789
7790 2002-06-16 Richard Henderson <rth@redhat.com>
7791
7792 PR opt/6793
7793 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
7794 after template instantiation.
7795
7796 2002-06-16 Richard Henderson <rth@redhat.com>
7797
7798 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
7799
7800 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
7801
7802 * cp-tree.h (compiler_error): Remove declaration.
7803 * lex.c (compiler_error): Remove definition.
7804
7805 2002-06-14 Steve Ellcey <sje@cup.hp.com>
7806
7807 * g++spec.c (LIBUNWIND): New.
7808 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
7809
7810 2002-06-13 Jessica Han <jessica@cup.hp.com>
7811
7812 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
7813 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
7814 (build_vbase_offset_vtbl_entries): Likewise.
7815 * rtti.c (build_headof): Likewise.
7816 (get_tinfo_decl_dynamic): Likewise.
7817 (create_pseudo_type_info): Likewise.
7818
7819 2002-06-12 Stan Shebs <shebs@apple.com>
7820
7821 * mpw-config.in: Remove file, no longer used.
7822 * mpw-make.sed: Ditto.
7823
7824 2002-06-07 Zack Weinberg <zack@codesourcery.com>
7825
7826 * decl2.c: Update call to cpp_handle_option.
7827
7828 2002-06-07 H.J. Lu (hjl@gnu.org)
7829
7830 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
7831
7832 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
7833
7834 * error.c (cp_error_at): Fix typo.
7835
7836 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
7837
7838 * error.c (cp_diagnostic_starter): Adjust call.
7839 (maybe_print_instantiation_context): Change prototype to take a
7840 'diagnostic_info *'.
7841 (print_instantiation_full_context): Likewise.
7842 (print_instantiation_partial_context): Likewise.
7843 (cp_diagnostic_starter): Likewise.
7844 (cp_diagnostic_finalizer): Likewise.
7845 (cp_print_error_function): Likewise.
7846 (cp_printer): Take a secondary parameter as a 'text_info *'.
7847 Remove output_state savings. Adjust calls.
7848
7849 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
7850
7851 * pt.c (inline_parm_levels): Mark for GC.
7852
7853 * mangle.c (start_mangling): Allocate G.substitutions here...
7854 (init_mangle): ... rather than here.
7855 (finish_mangling): Clear the varray pointer when done with it.
7856 * spew.c (yylexstring): Don't use VARRAY_FREE.
7857 * search.c (bfs_walk): Don't use VARRAY_FREE.
7858 * decl2.c (pending_statics): Use gengtype to mark.
7859 (deferred_fns): Likewise.
7860 (ssdf_decls): Likewise.
7861 (init_decl2): Delete.
7862 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
7863 (cxx_init_decl_processing): Don't call init_decl2.
7864 (cxx_pop_function_context): Don't use VARRAY_FREE.
7865 * cp-tree.h (struct saved_scope): No need for special marking
7866 of varrays.
7867 (struct language_function): Likewise.
7868 (local_classes): Use gengtype to mark.
7869 (init_decl2): Delete prototype.
7870 * class.c (init_class_processing): Don't use
7871 ggc_add_tree_varray_root.
7872 (build_vtbl_initializer): Don't use VARRAY_FREE.
7873
7874 * decl.c (typename_compare): Don't use same_type_p.
7875
7876 * decl.c: Include hashtab.h instead of hash.h.
7877 (typename_hash): Update to use htab_h.
7878 (typename_compare): Likewise.
7879 (typename_htab): Use gengtype to mark.
7880 (build_typename_type): Update to use htab_h.
7881 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
7882
7883 * Make-lang.in (gt-cp-tree.h): New rule.
7884 (cp/tree.o): Depend on gt-cp-tree.h.
7885 * config-lang.in (gtfiles): Add cp/tree.c.
7886 * tree.c: Include gt-cp-tree.h.
7887 (list_hash_table): Use gengtype to mark.
7888 (init_tree): Use gengtype to mark trees.
7889
7890 * Make-lang.in (cp/decl.o): Add debug.h dependency.
7891 * call.c (struct z_candidate): Use gengtype.
7892 (USER_CONV_CAND): Use WRAPPER_ZC.
7893 (convert_class_to_reference): Use build_zc_wrapper.
7894 (build_type_conversion_1): Likewise.
7895 (build_over_call): Use WRAPPER_ZC.
7896 (add_warning): Use build_zc_wrapper.
7897 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
7898 * cp-tree.h (struct lang_identifier): Use gengtype.
7899 (struct template_parm_index_s): Likewise.
7900 (struct ptrmem_cst): Likewise.
7901 (struct tree_binding): Likewise.
7902 (struct tree_overload): Likewise.
7903 (struct tree_srcloc): Likewise.
7904 (struct tree_wrapper): Likewise. Also modify to have a pointer
7905 to struct z_candidate rather than void.
7906 (enum cp_tree_node_structure_enum): New.
7907 (union lang_tree_node): New.
7908 (cxx_mark_tree): Delete prototype.
7909 (cp_tree_node_structure): New prototype.
7910 (build_ptr_wrapper): Delete prototype.
7911 (build_int_wrapper): Delete prototype.
7912 (build_zc_wrapper): New prototype.
7913 * decl.c: Include debug.h
7914 (cxx_mark_tree): Delete.
7915 (cp_tree_node_structure): New.
7916 * tree.c (build_ptr_wrapper): Delete.
7917 (build_int_wrapper): Delete.
7918 (build_zc_wrapper): New.
7919
7920 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
7921 Correct typo. Patch from k_fukui@highway.ne.jp.
7922
7923 * semantics.c (current_stmt_tree): Update for change to
7924 struct language_function.
7925 (finish_mem_initializers): Likewise.
7926 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
7927 * cp-tree.h (struct language_function): Rename from
7928 cp_language_function. Change all uses.
7929 (cp_function_chain): Don't need to cast.
7930
7931 * class.c (duplicate_tag_error): Reset discriminator.
7932 (check_bases_and_members): Update for data structure changes.
7933 * cp-tree.h (struct lang_id2): Use gengtype.
7934 (flagged_type_tree): Likewise.
7935 (SET_LANG_ID): Use GGC on struct lang_id2.
7936 (struct cp_language_function): Use gengtype. Remove field
7937 'x_vcalls_possible_p'.
7938 (current_vcalls_possible_p): Delete.
7939 (struct lang_type_header): New.
7940 (struct lang_type_class): Rename from struct lang_type. Include
7941 struct lang_type_header.
7942 (struct lang_type_ptrmem): New.
7943 (struct lang_type): New.
7944 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
7945 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
7946 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
7947 (struct lang_decl_flags): Use gengtype. Add discriminators.
7948 (struct lang_decl): Use gengtype. Add and use discriminators.
7949 Update the macros that reference moved fields.
7950 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
7951 (SET_DECL_THUNK_P): Set discriminator too.
7952 (clear_inline_text_obstack): Delete prototype.
7953 (finish_inline_definitions): Delete prototype.
7954 (mark_pending_inlines): Delete prototype.
7955 (lang_check_failed): New prototype.
7956 * decl.c (struct named_label_use_list): Use gengtype.
7957 (struct named_label_list): Likewise.
7958 (mark_binding_level): Delete.
7959 (mark_named_label_lists): Delete.
7960 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
7961 (cxx_init_decl_processing): Use generated marker routine.
7962 (begin_destructor_body): Delete dead set to
7963 current_vcalls_possible_p.
7964 (mark_lang_function): Delete.
7965 (mark_cp_function_context): Delete.
7966 (lang_mark_tree): Use generated marker routines.
7967 * decl2.c (start_objects): Set discriminator when setting
7968 GLOBAL_INIT_PRIORITY.
7969 * lex.c (retrofit_lang_decl): Set discriminators.
7970 (copy_lang_type): Update for changes to lang_type structure.
7971 (cp_make_lang_type): Set discriminator.
7972 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
7973 * search.c: Include ggc.h.
7974 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
7975 (finish_inline_definitions): Delete.
7976 * spew.c (struct token): Use gengtype.
7977 (struct token_chunk): New.
7978 (struct unparsed_text): Use gengtype. Store tokens in chunks.
7979 (struct feed): Use gengtype.
7980 (feed_obstack): Delete.
7981 (feed): Mark as GC root.
7982 (pending_inlines): Mark as GC root.
7983 (pending_inlines_tail): Likewise.
7984 (processing_these_inlines): Likewise.
7985 (token_obstack): Make static.
7986 (first_token): Likewise.
7987 (init_spew): Don't initialize deleted things; use gengtype for roots.
7988 (clear_inline_text_obstack): Delete.
7989 (feed_input): Use GC for struct feed. Update for changes to
7990 struct unparsed_text.
7991 (mark_pending_inlines): Delete.
7992 (next_token): Rename from add_token. Change all callers. Update
7993 for changes to struct unparsed_text.
7994 (space_for_token): New.
7995 (remove_last_token): New.
7996 (alloc_unparsed_text): New.
7997 (snarf_block): Take an unparsed_text. Update for changes to struct
7998 unparsed_text.
7999 (snarf_method): Update for changes to struct unparsed_text.
8000 (snarf_defarg): Update for changes to struct unparsed_text.
8001 * tree.c (lang_check_failed): New.
8002
8003 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8004 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8005 (cp/spew.o): Add dependency on gt-<filename>.h.
8006 (cp/decl2.o): Add dependency on gt-<filename>.h.
8007 (cp/call.o): Add dependency on gt-<filename>.h.
8008 (cp/pt.o): Add dependency on gt-<filename>.h.
8009 (cp/repo.o): Add dependency on gt-<filename>.h.
8010 (cp/parse.o): Add dependency on gt-<filename>.h.
8011 * call.c: Use gengtype for roots.
8012 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8013 decl2.c parse.y pt.c repo.c spew.c.
8014 * cp-tree.h: Use gengtype for roots.
8015 (struct saved_scope): Use GGC, gengtype.
8016 (cp_parse_init): Delete prototype.
8017 (init_pt): Delete prototype.
8018 * decl.c: Use gengtype for roots.
8019 (mark_saved_scope): Delete.
8020 (cxx_init_decl_processing): Don't call deleted initilisation
8021 routines.
8022 (signed_size_zero_node): Delete, unused.
8023 * decl.h: Use gengtype for roots.
8024 * decl2.c: Use gengtype for roots.
8025 * lex.h: Use gengtype for roots.
8026 * parse.y: Use gengtype for roots.
8027 (cp_parse_init): Delete.
8028 * pt.c: Use gengtype for roots.
8029 (init_pt): Delete.
8030 * repo.c: Use gengtype for roots.
8031 * spew.c: Use gengtype for roots.
8032
8033 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
8034 (cp/decl.o): Add dependency on gtype-cp.h.
8035 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8036 Include gtype-cp.h. Allow for filename changes.
8037
8038 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8039 (cp/decl.o): Add cp/gt-decl.h dependency.
8040 * config-lang.in (gtfiles): New.
8041 * tree.h: Rename struct binding_level to struct cp_binding_level.
8042 * decl.c: Rename struct binding_level to struct cp_binding_level.
8043 Include cp/gt-decl.h.
8044 (struct cp_binding_level): Use gengtype.
8045 (make_binding_level): Use GGC on struct cp_binding_level.
8046 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8047 (cxx_init_decl_processing): Mark free_binding_level as
8048 deletable.
8049
8050 * decl.c (mark_cp_function_context): Update calling sequence.
8051
8052 * decl.c (start_function): Don't free 'struct
8053 cp_language_function'.
8054 (pop_cp_function_context): Likewise.
8055 (save_function_data): Allocate it using GC.
8056 * semantics.c (genrtl_start_function): Don't free 'struct
8057 cp_language_function'.
8058
8059 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
8060
8061 * lang-specs.h: Use cpp_debug_options.
8062
8063 2002-05-28 Zack Weinberg <zack@codesourcery.com>
8064
8065 * mangle.c, tree.c: Include real.h.
8066 * Make-lang.in: Update dependency lists.
8067
8068 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
8069
8070 * lex.c: Don't include c-lex.h.
8071 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8072
8073 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
8074
8075 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8076
8077 2002-05-22 Richard Henderson <rth@redhat.com>
8078
8079 * decl.c (obscure_complex_init): Check for VAR_DECL
8080 before using DECL_THREAD_LOCAL.
8081
8082 2002-05-22 Richard Henderson <rth@redhat.com>
8083
8084 * decl.c (check_tag_decl): Handle RID_THREAD.
8085 (obscure_complex_init): Reject run-time init of tls.
8086 (grokvardecl, grokdeclarator): Handle RID_THREAD.
8087 * lex.c (reswords): Add __thread.
8088 (rid_to_yy): Map RID_THREAD to SCSPEC.
8089
8090 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
8091
8092 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8093 * cp-tree.h (cxx_post_options): Kill.
8094 * cp-lex.c (cxx_post_options): Kill.
8095
8096 2002-05-21 Richard Henderson <rth@redhat.com>
8097
8098 * lex.c (rid_to_yy): Add RID_THREAD.
8099
8100 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
8101
8102 * init.c (build_vec_init): Test for trivial copy-assignment when
8103 copy-assigning arrays.
8104
8105 2002-05-20 Andreas Jaeger <aj@suse.de>
8106
8107 * init.c (build_default_init): Remove unused variable.
8108
8109 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
8110
8111 * call.c (any_strictly_viable): New.
8112 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8113
8114 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8115
8116 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8117
8118 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8119
8120 PR c++/186, DR 259
8121 * pt.c (do_decl_instantiation): Don't complain explicit
8122 instantiation after explicit specialization.
8123 (do_type_instantiation): Likewise.
8124
8125 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
8126
8127 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8128 renamed from...
8129 (complete_type_or_else): ... this. Redefined as macro.
8130 (cxx_incomplete_type_diagnostic): Declare.
8131 (cxx_incomplete_type_error): Define as macro.
8132 * init.c (build_delete): Warn about incomplete types other than
8133 void, and use the built-in operator delete for them.
8134 * typeck.c (complete_type_or_diagnostic): Renamed from
8135 complete_type_or_else. Added warn_only argument, passed to...
8136 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
8137 warnings or errors depending on new warn_only argument. Renamed
8138 from...
8139 (cxx_incomplete_type_error): ... this. New implementation in
8140 terms of cxx_incomplete_type_diagnostic.
8141
8142 2002-05-18 Jason Merrill <jason@redhat.com>
8143
8144 PR c++/6611
8145 * decl2.c (import_export_decl): If we clear
8146 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8147
8148 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8149
8150 PR c++/6620
8151 * pt.c (verify_class_unification): Don't check if PARM is template
8152 parameter dependent. Simplify.
8153 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8154 parameter dependent expression.
8155
8156 2002-05-14 Jason Merrill <jason@redhat.com>
8157
8158 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8159 Do set DECL_COMDAT.
8160 (synthesize_tinfo_var): Take the public decl.
8161 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
8162 (emit_tinfo_decl): Adjust. Call import_export_decl.
8163 * decl2.c (import_export_decl): Simplify tinfo decl handling.
8164
8165 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
8166
8167 * cp-tree.h (struct lang_type): Added non_zero_init.
8168 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8169 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8170 * class.c (check_field_decls): Test non_zero_init.
8171 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8172 zero-to-NULL conversions.
8173 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8174 type that needs zero-initialization without zeros.
8175 (check_initializer_decl): Compute zero-initializer for types
8176 that require a non-trivial one.
8177 * init.c (build_forced_zero_init): New function.
8178 (build_default_init): Use it.
8179 * tree.c (zero_init_p): New function.
8180 * typeck2.c (force_store_init_value): New function.
8181 (process_init_constructor): Create non-trivial zero-initializers
8182 for array members and class fields.
8183
8184 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
8185
8186 * lang-specs.h: Remove redundant -lang-c++.
8187
8188 2002-05-13 Jason Merrill <jason@redhat.com>
8189
8190 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8191 (fixed_type_or_null): See through reference vars.
8192 (build_base_path): Vtable contents are constant.
8193 * typeck.c (get_member_function_from_ptrfunc): Likewise.
8194
8195 2002-05-12 Jason Merrill <jason@redhat.com>
8196
8197 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8198 structs are safe.
8199
8200 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
8201
8202 * cp-tree.h (flag_ansi): Remove.
8203 * decl2.c (flag_ansi): Remove.
8204 (cxx_decode_option): Set flag_iso and flag_undef.
8205
8206 2002-05-09 Jason Merrill <jason@redhat.com>
8207
8208 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8209 Use subtraction rather than a bitmask to get the index.
8210 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8211
8212 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8213
8214 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
8215
8216 * Make-lang.in (decl2.o): Update.
8217 * cp-tree.h (warn_multichar): Remove.
8218 * decl2.c: Include c-common.h.
8219 (warn_multichar): Remove.
8220
8221 2002-05-03 Jason Merrill <jason@redhat.com>
8222
8223 * tree.c (build_cplus_array_type): Only const and volatile get
8224 special handling.
8225
8226 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
8227
8228 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8229
8230 ABI change, returning simple classes from functions.
8231 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
8232 TYPE_HAS_TRIVIAL_INIT_REF is false or
8233 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
8234
8235 2002-04-30 Jason Merrill <jason@redhat.com>
8236
8237 PR debug/6436
8238 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
8239 anonymous class with a typedef if there are attributes.
8240
8241 2002-04-29 Paul Eggert <eggert@twinsun.com>
8242
8243 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
8244
8245 2002-04-29 Jakub Jelinek <jakub@redhat.com>
8246
8247 PR c++/6477
8248 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
8249 non-NULL first.
8250
8251 2002-04-29 Mark Mitchell <mark@codesourcery.com>
8252
8253 PR c++/6492
8254 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
8255 enter that scope before name lookup.
8256
8257 PR c++/6486
8258 * method.c (do_build_copy_constructor): Avoid building
8259 cv-qualified reference types.
8260
8261 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
8262
8263 PR c++/5719
8264 * decl.c (grok_op_properties): Assignment ops don't have to return
8265 by value. operator% should.
8266
8267 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8268
8269 PR c/6343
8270 * decl.c (duplicate_decls): Call merge_weak.
8271
8272 2002-04-26 Richard Henderson <rth@redhat.com>
8273
8274 * parse.y (malloced_yyss, malloced_yyvs): New.
8275 (yyoverflow): Re-add. Set them.
8276 (free_parser_stacks): New.
8277
8278 2002-04-26 Mark Mitchell <mark@codesourcery.com>
8279
8280 PR c++/6497
8281 * method.c (do_build_assign_ref): Pass a derivation to
8282 build_method_call when calling base class assignment operators.
8283
8284 2002-04-26 Richard Henderson <rth@redhat.com>
8285
8286 * parse.y (yyoverflow): Revert.
8287
8288 2002-04-26 Richard Henderson <rth@redhat.com>
8289
8290 PR c/3581
8291 * parse.y (string): Remove. Update all uses to use STRING
8292 instead, and not call combine_strings.
8293 * rtti.c (tinfo_name): Use fix_string_type.
8294 * semantics.c (finish_asm_stmt): Don't call combine_strings.
8295 * spew.c (yylexstring): New.
8296 (read_token): Use it.
8297
8298 2002-04-25 Richard Henderson <rth@redhat.com>
8299
8300 PR c/2161
8301 * parse.y (yyoverflow): New.
8302
8303 2002-04-25 Jason Merrill <jason@redhat.com>
8304
8305 PR c++/5607
8306 * search.c (check_final_overrider): No longer static.
8307 * class.c (update_vtable_entry_for_fn): Call it.
8308 * cp-tree.h: Adjust.
8309
8310 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
8311
8312 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8313 * cp-tree.h (cxx_set_yydebug): Die.
8314 * lex.c (YYDEBUG): Get from c-lex.h.
8315 (cxx_set_yydebug): Remove.
8316 * parse.y: Include c-lex.h.
8317 (YYDEBUG): Get from c-lex.h.
8318
8319 2002-04-24 Mark Mitchell <mark@codesourcery.com>
8320
8321 PR c++/6438.
8322 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
8323 void.
8324
8325 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
8326
8327 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
8328 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
8329 Redefine.
8330 * cp-tree.h (cp_attribute_table): Rename.
8331 * decl.c (lang_attribute_table): Remove declaration.
8332 (cxx_init_decl_processing): Don't set it.
8333 * tree.c (cp_attribute_table): Rename.
8334
8335 2002-04-24 Jason Merrill <jason@redhat.com>
8336
8337 PR c++/6331
8338 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
8339 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
8340 The pedwarn for array assignment is now unconditional.
8341 * tree.c (build_cplus_array_type_1): Still process simple array types
8342 normally in templates.
8343
8344 PR c++/6395
8345 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
8346 stuff for comdats.
8347
8348 2002-04-23 Jakub Jelinek <jakub@redhat.com>
8349
8350 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
8351 node with attributes.
8352
8353 2002-2-23 David O'Brien <obrien@FreeBSD.org>
8354
8355 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
8356 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
8357
8358 2002-04-23 Mark Mitchell <mark@codesourcery.com>
8359
8360 PR c++/6256:
8361 * pt.c (tsubst_friend_class): Handle templates with explicit
8362 nested names.
8363
8364 PR c++/6331:
8365 * typeck.c (merge_types): Remember the cv-qualification of pointer
8366 types when merging them.
8367
8368 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
8369
8370 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
8371 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
8372 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
8373 cxx_mark_function_context): New.
8374 * decl.c (push_cp_function_context, pop_cp_function_context,
8375 mark_cp_function_context): Rename for consistency.
8376 (cxx_init_decl_processing): Don't set old hooks.
8377
8378 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
8379
8380 * call.c (convert_type_from_ellipsis): Rename, update.
8381 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
8382 * cp-tree.h (convert_type_from_ellipsis): Rename.
8383 * decl.c (cxx_init_decl_processing): Don't set hook.
8384
8385 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
8386
8387 * call.c (build_new_method_call): Update.
8388 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
8389 * cp-tree.h (cxx_incomplete_type_error): New.
8390 * decl.c (grokdeclarator, grokparms): Update.
8391 * decl2.c (check_classfn): Update.
8392 * pt.c (tsubst): Update.
8393 * typeck.c (complete_type_or_else, expr_sizeof,
8394 decay_conversion): Update.
8395 * typeck2.c (incomplete_type_error): Rename.
8396 (add_exception_specifier): Update.
8397
8398 2002-04-18 Jason Merrill <jason@redhat.com>
8399
8400 PR c++/5658
8401 * search.c (setup_class_bindings): A class template qualifies as a
8402 type binding.
8403
8404 2002-04-17 Jakub Jelinek <jakub@redhat.com>
8405
8406 PR c++/6316
8407 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
8408 before expanding.
8409
8410 2002-04-16 Mark Mitchell <mark@codesourcery.com>
8411
8412 * init.c (begin_init_stmts): Remove commented out code.
8413 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
8414 * semantics.c (begin_gobal_stmt_expr): Adjust call to
8415 expand_start_stmt_expr.
8416
8417 2002-04-15 Mark Mitchell <mark@codesourcery.com>
8418
8419 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
8420 dso_handle itself, to __cxa_atexit.
8421
8422 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8423
8424 * error.c (cxx_print_error_function): Adjust call to macros.
8425
8426 2002-04-14 Jakub Jelinek <jakub@redhat.com>
8427
8428 * class.c (layout_virtual_bases): Do all dsize computation on trees.
8429
8430 2002-04-14 Jason Merrill <jason@redhat.com>
8431
8432 * typeck.c (get_member_function_from_ptrfunc): Don't do
8433 gratuitious division and multiplication on
8434 ptrmemfunc_vbit_in_delta targets.
8435
8436 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8437
8438 PR c++/5373.
8439 * semantics.c (finish_expr_stmt): Remember the type of the
8440 expression before any conversions are performed.
8441
8442 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8443
8444 PR c++/5189.
8445 * call.c (add_template_candidate_real): Do not treat member
8446 templates as copy constructors.
8447
8448 2002-04-12 Mark Mitchell <mark@codesourcery.com>
8449
8450 * decl.c (duplicate_decls): Do not copy the RTL for a variable
8451 declaration if the old variable had an incomplete type and the new
8452 variable does not.
8453 (complete_vars): Do not call layout_decl for completed variables.
8454
8455 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
8456
8457 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
8458 with an explicit one.
8459 (follow_tag_typedef): New.
8460 (lookup_tag): Use it to extract the tag of an explicit typedef.
8461 (xref_tag): Likewise.
8462
8463 2002-04-11 Andrew Haley <aph@redhat.com>
8464
8465 * typeck.c (type_after_usual_arithmetic_conversions):
8466 If two types have the same variant, return immediately.
8467 When two floating-point operands are the same precision:
8468 convert to float if one of the operands is float;
8469 if neither operand is one of the standard types, return the type
8470 of the first operand.
8471
8472 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
8473
8474 PR c++/5507
8475 * decl.c (make_typename_type): Remove implicit typenameness.
8476
8477 2002-04-09 Jason Merrill <jason@redhat.com>
8478
8479 PR optimization/6189
8480 * semantics.c (genrtl_start_function): Don't free
8481 DECL_SAVED_FUNCTION_DATA for inline functions.
8482
8483 * init.c (build_member_call): For now, don't convert to
8484 intermediate base if it would cause an error.
8485
8486 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
8487
8488 * parse.y (namespace_qualifier, maybe_identifier,
8489 begin_explicit_instantiation, end_explicit_instantiation,
8490 apparent_template_type, .finish_template_type,
8491 do_id, maybe_init, defarg_again, component_decl_1):
8492 Add ending ';', in accordance with POSIX.
8493
8494 2002-04-06 Mark Mitchell <mark@codesourcery.com>
8495
8496 PR c++/5571
8497 * class.c (layout_class_type): Remember incomplete static
8498 variables.
8499 (finish_struct_1): Call complete_vars, not
8500 hack_incomplete_structures.
8501 * cp-tree.h (hack_incomplete_structures): Rename to ...
8502 (complete_vars): ... this.
8503 (struct saved_scope): Remove incomplete.
8504 (namespace_scope_incomplete): Remove.
8505 * decl.c (struct binding_level): Remove incomplete.
8506 (incomplete_vars): New variable.
8507 (mark_binding_level): Don't mark incomplete.
8508 (print_binding_level): Don't print it.
8509 (mark_saved_scope): Don't mark incomplete.
8510 (pushdecl): Use maybe_register_incopmlete_var.
8511 (cxx_init_decl_processing): Register incomplete_vars for GC.
8512 (start_decl_1): Clarify error message.
8513 (hack_incomplete_vars): Remove.
8514 (maybe_register_incomplete_var): New function.
8515 (complete_vars): Likewise.
8516
8517 2002-04-06 Jason Merrill <jason@redhat.com>
8518
8519 PR c++/4934
8520 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
8521 set before checking it.
8522
8523 PR c++/525
8524 * init.c (build_member_call): Use build_scoped_ref.
8525 (resolve_offset_ref): Likewise.
8526 * call.c (build_scoped_method_call): Likewise.
8527 * tree.c (maybe_dummy_object): Kludge around current_class_type being
8528 wrong.
8529 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
8530 * cp-tree.h: Adjust.
8531
8532 * init.c (push_base_cleanups): Just use build_scoped_method_call.
8533
8534 PR c++/6179
8535 * method.c (implicitly_declare_fn): Pass unqualified type to
8536 synthesize_exception_spec.
8537
8538 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
8539
8540 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8541 * cvt.c: Update comment.
8542 * init.c (expand_cleanup_for_base): Update.
8543 * semantics.c (finish_parenthesized_expr): Update.
8544 * typeck.c (cp_truthvalue_conversion): Update.
8545
8546 2002-04-04 Jason Merrill <jason@redhat.com>
8547
8548 * semantics.c (finish_eh_cleanup): New fn.
8549 * cp-tree.h: Add prototype.
8550 * init.c (perform_member_init, expand_cleanup_for_base): Use
8551 finish_eh_cleanup.
8552 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
8553 * cp-tree.h: Remove references.
8554 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
8555 * dump.c (cp_dump_tree): Likewise.
8556 * pt.c (tsubst_expr): Likewise.
8557 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
8558 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
8559 * tree.c (cp_statement_code_p): Likewise.
8560
8561 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
8562
8563 PR c++/5636
8564 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
8565 cleanup for nrv.
8566
8567 PR c++/5104
8568 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
8569 specifiers.
8570 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
8571
8572 2002-04-03 Richard Henderson <rth@redhat.com>
8573
8574 * cp-lang.c (cxx_warn_unused_global_decl): New.
8575 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
8576
8577 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
8578
8579 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
8580 * tree.c (init_tree): Don't set hook.
8581
8582 2002-04-03 Roger Sayle <roger@eyesopen.com>
8583
8584 PR c++/5998:
8585 * decl.c (duplicate_decls): Don't mess with assembler names when
8586 redeclaring builtin functions as static.
8587
8588 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8589
8590 * call.c (build_addr_func): Update.
8591 * class.c (resolve_address_of_overloaded_function): Update.
8592 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8593 * cp-tree.h (cxx_mark_addressable): New.
8594 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
8595 * decl2.c (build_cleanup): Update.
8596 * except.c (build_throw): Update.
8597 * init.c (resolve_offset_ref): Update.
8598 * pt.c (convert_nontype_argument): Update.
8599 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
8600 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
8601 unary_complex_lvalue): Update.
8602 (mark_addressable): Rename.
8603
8604 2002-04-01 Roger Sayle <roger@eyesopen.com>
8605
8606 PR c++/5998:
8607 * decl.c (duplicate_decls): Overwrite the RTL when (and only
8608 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
8609 but follow the SET_DECL_RTL idiom used elsewhere in the function.
8610
8611 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8612
8613 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8614 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8615 * decl.c (grokdeclarator): Update.
8616 * mangle.c (write_integer_cst): Update.
8617 * typeck.c (build_binary_op): Update.
8618
8619 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8620
8621 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
8622 * lex.c (cxx_init): Don't set hook.
8623
8624 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8625
8626 * Make-lang.in (error.o): Update.
8627 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8628 * cp-tree.h (struct diagnostic_context): Predeclare.
8629 (cxx_print_error_function): New.
8630 * error.c: Include langhooks-def.h.
8631 (lang_print_error_function): Rename. Update.
8632 (init_error): Don't set hook.
8633
8634 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8635
8636 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
8637 Redefine.
8638 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
8639 * decl.c (finish_enum): Similarly.
8640 * error.c (dump_type): Similarly.
8641 * lex.c (cxx_init): Similarly.
8642 * mangle.c (write_builtin_type): Similarly.
8643 * typeck.c (comptypes): Similarly.
8644
8645 2002-03-28 Roger Sayle <roger@eyesopen.com>
8646
8647 PR c++/5998:
8648 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
8649 in the g++ front-end.
8650 (duplicate_decl): Allow redefinition of anticipated built-ins.
8651 Fix inlining problem by over-writing the old DECL_RTL.
8652 (lookup_namespace_name): Fail to find an identifier in the
8653 specified namespace if its still anticipated.
8654 (builtin_function_1): New function split out from builtin_function
8655 to create a builtin in the current namespace with given context.
8656 (builtin_function): Call builtin_function_1 to define the
8657 appropriate builtins in both the std and global namespaces.
8658 (select_decl): Don't test for anticipated decls here.
8659 (unqualified_namespace_lookup): Instead ignore them whilst
8660 searching through scopes and namespaces.
8661 * decl2.c (do_nonmember_using_decl): If a using declaration
8662 specifies an anticipated built-in function, mark it as no longer
8663 anticipated in that scope.
8664 (ambiguous_decl): Avoid resolving to an anticipated decl.
8665 * lex.c (do_scoped_id): Fail to find an identifier in the global
8666 namespace if its still anticipated.
8667
8668 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8669
8670 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
8671 * cp-tree.h (cp_make_lang_type): Rename.
8672 * lex.c (cp_make_lang_type): Rename.
8673 (make_aggr_type): Update.
8674 * tree.c (init_tree): Don't set make_lang_type_fn.
8675
8676 2002-03-29 Jakub Jelinek <jakub@redhat.com>
8677
8678 PR c++/6073
8679 * class.c (finish_struct_1): Update static field's DECL_MODE even
8680 if its type is a variant of t.
8681
8682 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8683
8684 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
8685 * cp-tree.h (cxx_insert_default_attributes): New.
8686 * decl.c (insert_default_attributes): Rename.
8687
8688 2002-03-27 Mark Mitchell <mark@codesourcery.com>
8689
8690 PR c++/4884
8691 * call.c (build_op_delete_call): Allow for the fact the placement
8692 may be a COMPOUND_EXPR.
8693
8694 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8695
8696 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8697 * cp-tree.h (init_cplus_expand): Remove.
8698 (cxx_expand_expr): New.
8699 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
8700 fix prototype.
8701 (init_cplus_expand): Remove.
8702 * lex.c (cxx_init): Don't call init_cplus_expand.
8703
8704 2002-03-26 Mark Mitchell <mark@codesourcery.com>
8705
8706 PR c++/4884.
8707 * init.c (build_new_1): Allow for the fact the result of
8708 build_function_call may be a COMPOUND_EXPR.
8709
8710 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
8711
8712 PR c++/5682
8713 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
8714 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8715 (dfs_skip_nonprimary_vbases_markedp): Remove.
8716 * search.c (get_shared_vbase_if_not_primary): Remove.
8717 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8718 (dfs_skip_nonprimary_vbases_markedp): Remove.
8719 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
8720 (dfs_marked_real_bases_queue_p): Likewise.
8721
8722 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8723
8724 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8725 * cp-tree.h (cxx_mark_tree): New.
8726 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
8727
8728 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8729
8730 * cp-tree.h (cxx_maybe_build_cleanup): New.
8731 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
8732 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
8733 * tree.c (build_target_expr): Update.
8734 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
8735
8736 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
8737
8738 * decl2.c (cxx_decode_option): Handle -E.
8739 * lang-specs.h (default_compilers): Preprocess with cc1plus.
8740 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
8741
8742 2002-03-23 Jakub Jelinek <jakub@redhat.com>
8743
8744 PR c++/6037
8745 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
8746
8747 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8748
8749 * error.c (dump_type): Be careful about implicit typenames.
8750
8751 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8752
8753 PR C++/3656
8754 * semantics.c (finish_base_specifier): Handle erronous base
8755 classes.
8756
8757 2002-03-22 Zack Weinberg <zack@codesourcery.com>
8758
8759 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
8760 REAL_IS_NOT_DOUBLE.
8761
8762 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
8763
8764 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
8765 an index into the vtable_entry array regardless of
8766 TARGET_PTRMEMFUNC_VBIT_LOCATION.
8767
8768 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
8769
8770 * tree.c (cp_cannot_inline_tree_fn): Same.
8771
8772 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
8773
8774 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8775 insert_block, getdecls, global_bindings_p): New.
8776
8777 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
8778
8779 PR c++/4361
8780 * mangle.c (struct globals) Add internal_mangling_p member.
8781 (write_template_param): Do internal mangling, if needed.
8782 (mangle_conv_op_name_for_type): Request internal mangling.
8783
8784 2002-03-20 Jason Merrill <jason@redhat.com>
8785
8786 PR c++/2136
8787 * init.c (build_delete): Check access for a member op delete here.
8788 * decl2.c (delete_sanity): Not here.
8789
8790 2002-03-19 Jason Merrill <jason@redhat.com>
8791
8792 PR c++/5118
8793 * class.c (get_vfield_name): Use the constructor_name.
8794
8795 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
8796
8797 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8798 * cp-tree.h (lang_printable_name): Rename.
8799 * error.c (lang_decl_name): Use new hook.
8800 * lex.c (cxx_init): Remove old hook.
8801 * pt.c (tsubst_decl): Use new hook.
8802 * tree.c (lang_printable_name): Rename.
8803
8804 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
8805
8806 PR c++/3882
8807 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
8808 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
8809 only after recording the declaration.
8810
8811 2002-03-18 Jason Merrill <jason@redhat.com>
8812
8813 PR c++/2039
8814 * init.c (resolve_offset_ref): Hand off to build_component_ref.
8815
8816 PR c++/4222, c++/5995
8817 * call.c (build_over_call): Fix empty class logic.
8818
8819 PR c++/3870
8820 * cp-tree.h (struct saved_scope): Add last_parms field.
8821 * decl.c (maybe_push_to_top_level): Save last_function_parms.
8822 (pop_from_top_level): Restore it.
8823
8824 PR c++/4377
8825 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
8826 NON_LVALUE_EXPRs.
8827
8828 PR c++/4003
8829 * pt.c (tsubst_friend_function): Use decl_namespace_context.
8830
8831 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
8832 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
8833 type with a nontrivial destructor.
8834
8835 2002-03-17 Jason Merrill <jason@redhat.com>
8836
8837 PR c++/4460
8838 * class.c (build_base_path): Virtual base layout is fixed in
8839 in-charge [cd]tors.
8840
8841 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8842
8843 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8844 * parse.y (yyparse): Remove macro.
8845
8846 2002-03-17 Jason Merrill <jason@redhat.com>
8847
8848 PR c++/5757
8849 * init.c (build_new_1): Pass the right pointer to op delete.
8850
8851 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
8852
8853 PR c++/4361
8854 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
8855 conversion operators go.
8856 (struct lang_decl_flags): Add template_conv_p and unused
8857 bitfields.
8858 (DECL_TEMPLATE_CONV_FN_P): New macro.
8859 * call.c (build_user_type_conversion_1): Don't check second type
8860 conversion of overload set first.
8861 * class.c (add_method): Make sure templated conversion operators
8862 all end up on slot 2.
8863 * lex.c (do_identifier): A conversion operator token might be
8864 satisfied by a templated conversion operator.
8865 * pt.c (check_explicit_specialization): Use
8866 CLASSTYPE_FIRST_CONVERSION_SLOT.
8867 (template_parm_this_level_p): New function.
8868 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8869 * search.c (lookup_fnfields_1): Template conversions will be on
8870 the first slot.
8871 * typeck.c (build_component_ref): Preserve the type of an
8872 conversion operator name on the overload type.
8873 (build_x_function_call): Retrieve the conversion operator name.
8874
8875 2002-03-15 Richard Henderson <rth@redhat.com>
8876
8877 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
8878
8879 2002-03-15 Mark Mitchell <mark@codesourcery.com>
8880
8881 * cp-tree.h (CLEANUP_DECL): Remove.
8882 (CLEANUP_EXPR): Likewise.
8883 * decl.c (destroy_local_var): Simplify.
8884 (maybe_build_cleanup): Tidy.
8885 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
8886 * semantics.c (cp_expand_stmt): Likewise.
8887 * cp/tree.c (cp_statement_code_p): Likewise.
8888
8889 2002-03-15 Jason Merrill <jason@redhat.com>
8890
8891 PR c++/5857
8892 * decl.c (duplicate_decls): Use merge_types instead of common_type.
8893 * typeck.c (common_type): Just hand off to
8894 type_after_usual_arithmetic_conversions and
8895 composite_pointer_type.
8896 (merge_types): New fn.
8897 (commonparms): Use it instead of common_type.
8898 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
8899 (composite_pointer_type): Also handle attributes.
8900 * cp-tree.h: Declare merge_types.
8901
8902 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
8903 variables.
8904 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
8905
8906 2002-03-14 Richard Henderson <rth@redhat.com>
8907
8908 * decl.c: Include c-pragma.h.
8909 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
8910 * Make-lang.in: Update dependencies.
8911
8912 2002-03-14 Jakub Jelinek <jakub@redhat.com>
8913
8914 PR c++/5908
8915 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
8916 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
8917
8918 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
8919
8920 * mangle.c (write_builtin_type): Handle 128-bit integers even if
8921 they are not a standard integer type.
8922
8923 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
8924
8925 * cp-tree.h (init_init_processing): Remove declaration.
8926 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
8927 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
8928
8929 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8930
8931 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
8932 Define.
8933 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
8934 tree_code_length.
8935 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
8936 cplus_tree_code_name): Delete.
8937 (cxx_init): Don't call add_c_tree_codes, instead set
8938 lang_unsafe_for_reeval. Don't try to copy into the various
8939 tree_code arrays.
8940
8941 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
8942
8943 PR c++/5659
8944 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
8945 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
8946 definitions.
8947
8948 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
8949
8950 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
8951 DR209 is now not a defect.
8952 * cp-tree.h (skip_type_access_control): Remove.
8953 * decl.c (grokdeclarator): Do type access control for friend
8954 declarations.
8955 * semantics.c (decl_type_access_control): Don't reset
8956 current_type_lookups.
8957 (save_type_access_control): Always save the lookups.
8958 (skip_type_access_control): Remove.
8959 (finish_class_definition): Don't change type_lookups.
8960
8961 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
8962
8963 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
8964 It is incorrect.
8965 * typeck.c (build_static_cast): Compare non-qualified types
8966 with pointer to member conversions.
8967
8968 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
8969 Daniel Berlin <dan@dberlin.org>
8970
8971 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
8972 (cxx_get_alias_set): Use it.
8973
8974 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8975
8976 * cp-tree.h (stabilize_expr): Prototype.
8977
8978 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
8979
8980 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
8981 conditional return void.
8982
8983 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
8984
8985 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
8986 * cp-tree.h (cxx_unsave): New.
8987 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
8988 (init_tree): Update.
8989
8990 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8991
8992 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
8993 explicit sizeof/sizeof.
8994 * decl2.c (cxx_decode_option): Likewise.
8995 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
8996
8997 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
8998
8999 PR c++/775
9000 * decl.c (lookup_tag): Only reject enum/class mismatch, not
9001 class/union mismatch.
9002 * parse.y (check_class_key): New function.
9003 (structsp): Call it.
9004
9005 2002-03-01 Michael Matz <matz@suse.de>
9006
9007 * typeck.c (cp_pointer_int_sum): Complete inner type which is
9008 used later by size_in_bytes().
9009
9010 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
9011
9012 * cp-tree.h: Require __GNUC__ to be #defined.
9013 (build_init): Add missing prototype.
9014
9015 2002-03-01 Jason Merrill <jason@redhat.com>
9016
9017 * except.c: Don't include decl.h or obstack.h. Do include
9018 tree-inline.h.
9019 (build_throw): Destroy temporaries from the thrown
9020 expression before calling __cxa_throw. Construct a thrown
9021 temporary directly into the exception object.
9022 (stabilize_throw_expr): New function.
9023 (wrap_cleanups_r): New function.
9024 * tree.c (stabilize_expr): New function.
9025 * init.c (build_init): New function.
9026 * Make-lang.in (cp/except.o): Adjust .h deps.
9027
9028 2002-02-28 Jason Merrill <jason@redhat.com>
9029
9030 * search.c (lookup_base_r): Don't clear is_non_public just because
9031 we found a friendly scope.
9032
9033 * decl.c (finish_function): Only warn about missing return
9034 statement with -Wreturn-type.
9035
9036 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9037
9038 * class.c (build_clone): Update.
9039 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9040 * cp-tree.h (cxx_dup_lang_specific_decl): New.
9041 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9042 (copy_decl): Update.
9043 * method.c (make_thunk): Update.
9044
9045 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9046
9047 * decl2.c: Delete traditional-mode-related code copied from
9048 the C front end but not used, or used only to permit the
9049 compiler to link.
9050
9051 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
9052
9053 PR c++/4093
9054 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9055 to void.
9056
9057 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9058
9059 PR other/5746
9060 * semantics.c (finish_switch_cond): Don't call get_unwidened
9061 if error_mark_node.
9062
9063 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
9064
9065 PR c++/2645, DR 295
9066 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9067 tf_keep_type_decl.
9068 (make_typename_type): Use tsubst_flags_t.
9069 * decl.c (make_typename_type): Adjust. Return non-artificial
9070 TYPE_DECLs, if required.
9071 (grokdeclarator): Simplify CVR qualification handling. Allow bad
9072 qualifiers on typedef types.
9073 * decl2.c (handle_class_head): Adjust make_typename_type call.
9074 * parse.y (nested_name_specifier): Likewise.
9075 (typename_sub0): Likewise.
9076 (typename_sub1): Likewise.
9077 * pt.c (convert_template_argument): Adjust make_typename_type
9078 return value.
9079 (tsubst): Adjust cp_build_qualified_type_real calls.
9080 (check_cv_quals_for_unify): Cope with allowing bad qualifications
9081 on template type parms.
9082 (instantiate_decl): Recheck substitutions to give warnings on bad
9083 qualifications.
9084 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9085
9086 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
9087
9088 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9089
9090 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9091 unless DECL_ALWAYS_INLINE.
9092
9093 2002-02-20 Jakub Jelinek <jakub@redhat.com>
9094
9095 * typeck.c (cp_pointer_int_sum): Renamed from
9096 pointer_int_sum, call pointer_int_sum.
9097
9098 2002-02-20 Jakub Jelinek <jakub@redhat.com>
9099
9100 * decl.c (duplicate_decls): Return 0 if issued error about
9101 redeclaration.
9102
9103 2002-02-19 Jason Merrill <jason@redhat.com>
9104
9105 ABI change: Mangle `void (A::*)() const' as
9106 M1AKFvvE, not MK1AFvvE.
9107 * mangle.c (write_function_type): Write cv-quals for member
9108 function type here.
9109 (write_pointer_to_member_type): Not here.
9110
9111 2002-02-18 Jason Merrill <jason@redhat.com>
9112
9113 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9114 (do_decl_instantiation): Likewise.
9115
9116 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
9117
9118 PR c++/5685
9119 * decl.c (duplicate_decls): Make warning unconditional
9120 if duplicate default argument declarations are present.
9121
9122 2002-02-17 Jakub Jelinek <jakub@redhat.com>
9123
9124 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9125 shortening.
9126
9127 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
9128
9129 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9130 remove incorrect comment. Move #if 0'd code to common path. Use
9131 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9132
9133 2002-02-13 Jason Merrill <jason@redhat.com>
9134
9135 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9136 (finish_function): Don't warn if current_function_returns_null.
9137
9138 * typeck2.c (digest_init): Do handle values of vector type.
9139
9140 * typeck2.c (digest_init, process_init_constructor): Treat vectors
9141 like arrays.
9142
9143 2002-02-11 Jason Merrill <jason@redhat.com>
9144
9145 * parse.y (reserved_declspecs): Don't handle attributes.
9146 (reserved_typespecquals): Handle them here.
9147 * Make-lang.in (parse.c): Adjust expected conflicts.
9148
9149 2002-02-08 Jakub Jelinek <jakub@redhat.com>
9150
9151 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9152 instead of compstmt.
9153 (compstmt_or_stmtexpr): Renamed from compstmt.
9154 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9155
9156 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
9157
9158 Rename instantiate_type_flags to tsubst_flags_t & expand use.
9159 * cp-tree.h (instantiate_type_flags): Rename to ...
9160 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9161 add tf_warning flag.
9162 (instantiate_type): Adjust prototype.
9163 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9164 do_type_instantiation, cp_build_qualified_type_real): Likewise.
9165 cp_build_qualified_type: Adjust.
9166 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9167 tf_*.
9168 * call.c (standard_conversion): Rename itf_* to tf_*.
9169 (reference_binding): Likewise.
9170 (convert_like_real): Likewise.
9171 * cvt.c (cp_convert_to_pointer): Likewise.
9172 (convert_to_reference): Likewise.
9173 * decl.c (lookup_namespace_name): Use tf_* flags.
9174 (make_typename_type): Likewise.
9175 (grokdeclarator): Likewise.
9176 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9177 (coerce_template_template_parms, convert_template_argument,
9178 coerce_template_parms, maybe_get_template_decl_from_type_decl,
9179 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9180 instantiate_class_template, tsubst_template_arg_vector,
9181 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9182 tsubst_decl, tsubst_arg_types, tsubst_function_type,
9183 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9184 instantiate_template, fn_type_unification,
9185 resolve_overloaded_unification, verify_class_unification,
9186 unify, get_bindings_real, do_type_instantiation,
9187 regenerate_decl_from_template, instantiate_decl,
9188 tsubst_initializer_list, tsubst_enum,
9189 get_mostly_instantiated_function_type,
9190 invalid_nontype_parm_type_p): Likewise.
9191 * tree.c (cp_build_qualified_type_real): Likewise.
9192 * typeck.c (build_binary_op): Rename itf_* to tf_*.
9193 (build_ptrmemfunc): Likewise.
9194 (convert_for_assignment): Likewise.
9195
9196 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
9197
9198 PR c++/109
9199 * decl.c (grokdeclarator): Allow friend declarations from
9200 dependent types.
9201 * decl2.c (handle_class_head): Don't push into template parm contexts.
9202 * pt.c (push_template_decl_real): Template parm contexts are never
9203 being defined.
9204
9205 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
9206
9207 * class.c: Include target.h.
9208 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9209 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9210 bit-field layout.
9211 * Make-lang.in: Adjust deps.
9212
9213 2002-02-05 Jason Merrill <jason@redhat.com>
9214
9215 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9216
9217 2002-02-04 Jakub Jelinek <jakub@redhat.com>
9218
9219 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9220 (finish_switch_cond): Set SWITCH_TYPE.
9221
9222 2002-02-04 Richard Henderson <rth@redhat.com>
9223
9224 * method.c (use_thunk): Always initialize the block tree. Reindent.
9225 * semantics.c (expand_body): Emit thunks after function, not before.
9226
9227 2002-02-04 Jason Merrill <jason@redhat.com>
9228
9229 * decl.c (start_function): Call cplus_decl_attributes immediately
9230 after grokdeclarator.
9231
9232 * decl.c (start_function): Combine DECL_RESULT handling code.
9233
9234 2002-02-03 Jason Merrill <jason@redhat.com>
9235
9236 * xref.c: Remove.
9237 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
9238 (cp/xref.o): Remove dependencies.
9239 * class.c (finish_struct_1, check_methods): Don't call xref fns.
9240 (finish_struct_1): Likewise.
9241 * friend.c (make_friend_class): Likewise.
9242 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
9243 * spew.c (read_process_identifier): Likewise.
9244
9245 2002-02-01 Jason Merrill <jason@redhat.com>
9246
9247 PR c++/4872
9248 * decl.c (finish_function): Warn about a non-void function with
9249 no return statement and no abnormal exit.
9250 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
9251 (current_function_returns_abnormally): New macro.
9252 * call.c (build_call): Set it.
9253
9254 * typeck.c (build_component_ref): Always complain about offsetof
9255 constructs on non-PODs. Only make it an error for members of
9256 virtual bases.
9257
9258 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
9259 (dump_function_decl): Always dump parms.
9260
9261 * decl2.c (finish_static_data_member_decl): Complain about a local
9262 class with a static data member.
9263
9264 PR c++/4286
9265 * search.c (lookup_field_1): Don't xref a static data member
9266 just because we looked it up.
9267
9268 2002-01-31 Jason Merrill <jason@redhat.com>
9269
9270 * Make-lang.in (parse.c): Handle .output file.
9271
9272 PR c++/3395
9273 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
9274 not TREE_TYPE.
9275 * semantics.c (finish_class_definition): Adjust.
9276
9277 Allow attributes in parms and casts.
9278 * parse.y (named_parm): Don't strip attrs.
9279 (declmods): Remove 'attributes' production.
9280 (nonempty_cv_qualifiers): Accept attributes.
9281 (ATTRIBUTE): Give precedence.
9282 * decl.c (groktypename): Handle attributes.
9283 (grokparms): Likewise.
9284
9285 2002-01-29 Jakub Jelinek <jakub@redhat.com>
9286
9287 * decl2.c (cxx_decode_option): Pass 0 as last argument to
9288 cpp_handle_option.
9289 * lang-specs.h: Use cpp_unique_options instead of cpp_options
9290 when used together with cc1_options.
9291
9292 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
9293
9294 PR c++/5132
9295 * typeck2.c (digest_init): Make sure non-array core type is
9296 instantiated.
9297 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
9298 constructor, rather than build a new one.
9299 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
9300 PURPOSE of constructor elts.
9301
9302 2002-01-23 Zack Weinberg <zack@codesourcery.com>
9303
9304 * Make-lang.in (parse.c): Adjust expected number of
9305 shift-reduce conflicts.
9306 (decl.o): Depend on diagnostic.h.
9307 * decl.c: Include diagnostic.h.
9308 (grokdeclarator): Check for null pointer.
9309 (finish_function): Don't abort when
9310 current_binding_level->parm_flag != 1, if errors have
9311 occurred; throw away the statement tree and extra binding
9312 levels, and continue.
9313 * lex.c (note_list_got_semicolon): Check for null pointer.
9314 * method.c (hack_identifier): Just return error_mark_node if
9315 value is error_mark_node.
9316 * parse.y (primary: TYPEID(type_id)): No need to use
9317 TYPE_MAIN_VARIANT here.
9318 (handler_seq): Accept an empty list of catch clauses and
9319 generate a fake handler block to avoid later crashes.
9320 (ansi_raise_identifier): Accept the error token too.
9321 * semantics.c (begin_class_definition,
9322 finish_class_definition): Check for error_mark_node.
9323
9324 2002-01-23 Zack Weinberg <zack@codesourcery.com>
9325
9326 * typeck2.c (friendly_abort): Delete definition.
9327 * cp-tree.h (friendly_abort): Don't prototype.
9328 (my_friendly_assert): Use fancy_abort.
9329
9330 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
9331
9332 * cp-tree.h (my_friendly_abort): Remove.
9333
9334 2002-01-23 Jakub Jelinek <jakub@redhat.com>
9335
9336 * spew.c (pending_inlines, pending_inlines_tail,
9337 processing_these_inlines): Make static.
9338 (mark_pending_inlines): Remove static.
9339 (begin_parsing_inclass_inline): If in function, save pi
9340 for GC to cp_function_chain->unparsed_inlines instead.
9341 (process_next_inline): Likewise.
9342 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
9343 (mark_pending_inlines): Add prototype.
9344 * decl.c (spew_debug): Remove unused extern.
9345 (mark_lang_function): Call mark_pending_inlines.
9346
9347 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
9348
9349 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
9350 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
9351 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
9352 Change my_fancy_abort() to abort().
9353
9354 2002-01-23 Jason Merrill <jason@redhat.com>
9355
9356 PR c++/5453
9357 * class.c (fixed_type_or_null): Fix thinko.
9358
9359 PR c++/3331
9360 * init.c (resolve_offset_ref): Use build_indirect_ref.
9361
9362 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
9363
9364 2002-01-22 Jason Merrill <jason@redhat.com>
9365
9366 * parse.y (function_body): Suppress the block for the outermost
9367 curly braces.
9368 * decl.c (pushdecl): Don't try to skip it.
9369 (begin_function_body): Keep the block we create, not the next one.
9370 * init.c (emit_base_init): Don't mess with keep_next_level.
9371
9372 * class.c (build_base_path): Tweak formatting.
9373
9374 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
9375
9376 Fix regression introduced with patch for c++/775
9377 * parse.y (class_head_defn): Check for template specializations
9378 with a different class-key.
9379
9380 2002-01-17 Jason Merrill <jason@redhat.com>
9381
9382 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
9383 (begin_function_body): Call them and keep_next_level.
9384 * init.c (emit_base_init): Call keep_next_level.
9385 * semantics.c (setup_vtbl_ptr): Lose.
9386 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
9387 (vtbls_set_up_p): Lose.
9388 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
9389 * method.c (do_build_copy_constructor): Likewise.
9390 (synthesize_method): Call finish_mem_initializers.
9391 * parse.y (nodecls): Likewise.
9392
9393 * error.c (dump_type_suffix): Print the exception specs before
9394 recursing.
9395 (dump_function_decl): Here, too.
9396
9397 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
9398
9399 2002-01-10 Ira Ruben <ira@apple.com>
9400
9401 PR c++/907
9402 * decl.c (start_method): Handle attrlist.
9403
9404 2002-01-10 Jakub Jelinek <jakub@redhat.com>
9405
9406 * decl2.c (max_tinst_depth): Increase default limit to 500.
9407
9408 2002-01-10 Graham Stott <grahams@redhat.com>
9409
9410 * spew.c (YYCHAR): Uppercase macro parameter and add
9411 parenthesis.
9412 (YYCODE): Likewise.
9413 (NAME): Uppercase macro parameter.
9414
9415 2002-01-09 Graham Stott <grahams@redhat.com>
9416
9417 * decl.h (grokdeclarator): Wrap long line.
9418
9419 * semantics.c (FINISH_COND): Uppercase macro paramaters and
9420 add parenthesis.
9421
9422 2002-01-08 Graham Stott <grahams@redhat.com>
9423
9424 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
9425 (PALLOC): Uppercase macro parameter and whitespace.
9426 (SALLOC): Uppercase macro parameter.
9427 (SFREE): Uppercase macros parameter, add parenthese and
9428 whitespace.
9429 (STREQL): Uppercase macro parameter and whitespace.
9430 (STRNEQ): Likewise.
9431 (STRLSS): Likewise.
9432 (STRLEQ): Likewise.
9433 (STRGTR): Likewise.
9434 (STRGEQ): Likewise.
9435
9436 * call.c (convert_like): Add parenthesis and wrap.
9437 (convert_like_with_context): Likewise.
9438 (ICS_RANK): Whitespace.
9439 (NEED_TEMPORARY_P): Remove parenthesis.
9440
9441 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
9442 whitespace.
9443 (VTT_MARKED_BINFO_P): Likewise.
9444
9445 * decl.c (BINDING_LEVEL): Add parenthesis.
9446 (DEF_OPERATOR): Likewise.
9447
9448 * mangle.c (MANGLE_TRACE): Add parenthesis.
9449 (MANGLE_TRACE_TREE): Likewise.
9450 (write_signed_number): Likewise.
9451 (write_unsigned_number): Likewise.
9452
9453 * pt.c (ccat): Uppercase macro parameter.
9454 (cat): Likewise
9455
9456 * search.c (SET_BINFO_ACCESS): Add parenthesis.
9457
9458 2002-01-07 Jason Merrill <jason@redhat.com>
9459
9460 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
9461 to pedwarn.
9462
9463 PR c++/3536
9464 * method.c (make_thunk): If !flag_weak, give the thunk the
9465 function's linkage.
9466 (use_thunk): Here, too.
9467
9468 2002-01-07 Graham Stott <grahams@redhat.com>
9469
9470 * error.c: Update copyright date.
9471 (print_scope_operator): Add parenthesis.
9472 (print_left_paren): Likewise.
9473 (print_right_paren): Likewise.
9474 (print_left_bracket): Likewise.
9475 (print_right_bracket): Likewise.
9476 (print_template_argument_list_start): Likewise.
9477 (print_template_argument_list_end): Likewise.
9478 (print_non_consecutive_character): Likewise.
9479 (print_tree_identifier): Likewise.
9480 (print_identifier): Likewise.
9481 (NEXT_CODE): Uppercase macro parameter.
9482 (ident_fndecl): Delete unused.
9483 (GLOBAL_THING): Likewise.
9484
9485 2002-01-06 Graham Stott <grahams@redhat.com>
9486
9487 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
9488 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
9489 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
9490 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
9491 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
9492 (C_IS_RESERVED_WORD): Uppercase macro parameter.
9493 (C_RID_YYCODE) Likewise.
9494 (ptrmem_cst): Use rtx.
9495 (LOCAL_BINDING_P): Add whitespace.
9496 (INHERITED_VALUE_BINDING_P): Likewise.
9497 (BINDING_SCOPE): Wrap long line.
9498 (BINDING_HAS_LEVEL_P): Remove parenthesis.
9499 (BINDING_VALUE): Wrap long line.
9500 (BINDING_TYPE): Whitespace.
9501 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
9502 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
9503 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
9504 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
9505 (same_type_p): Uppercase macro parameters.
9506 (same_type_ignoring_top_level_qualifiers_p): Likewise.
9507 (OVL_FUNCTION): Wrap long line.
9508 (OVL_CHAIN): Whitespace.
9509 (OVL_CURRENT): Add parenthesis and whitespace.
9510 (OVL_NEXT): Whitespace.
9511 (OVL_USED): Likewise.
9512 (IDENTIFIER_TYPE_VALUE): Likewise.
9513 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
9514 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
9515 (LANG_ID_FIELD): Whitespace.
9516 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
9517 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
9518 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
9519 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
9520 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
9521 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
9522 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
9523 (IDENTIFIER_VIRTUAL_P): Likewise.
9524 (IDENTIFIER_OPNAME_P): Likewise.
9525 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
9526 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
9527 (C_SET_EXP_ORIGINAL_CODE): Likewise.
9528 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
9529 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
9530 (IS_AGGR_TYPE): Uppercase macro parameter.
9531 (CLASS_TYPE_P): Likewise.
9532 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
9533 (IS_AGGR_TYPE_2): Whitespace.
9534 (TAGGED_TYPE_P): Uppercase macro parameter.
9535 (TYPE_BUILT_IN): Whitespace.
9536 (TYPE_FOR_JAVA): Likewise.
9537 (FUNCTION_ARG_CHAIN): Remove parenthesis.
9538 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
9539 (FUNCTION_FIRST_USER_PARAM): Likewise.
9540 (PROMOTES_TO_AGGR_TYPE): Whitespace.
9541 (DERIVED_FROM_P): Add parenthesis and wrap.
9542 (UNIQUELY_DERIVED_FROM_P): Likewise.
9543 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
9544 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
9545 (CLASSTYPE_USE_TEMPLATE): Whitespace.
9546 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
9547 (TYPE_GETS_DELETE): Add parenthesis.
9548 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
9549 (TYPE_HAS_ASSIGN_REF): Likewise,
9550 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
9551 (TYPE_HAS_INIT_REF): Likewise.
9552 (TYPE_HAS_CONST_INIT_REF): Likewise.
9553 (TYPE_BEING_DEFINED): Likewise.
9554 (TYPE_LANG_SPECIFIC): Likewise.
9555 (CLASSTYPE_RTTI): Likewise.
9556 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
9557 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
9558 (TYPE_OVERLOADS_ARROW): Likewise.
9559 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
9560 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
9561 (CLASSTYPE_METHOD_VEC): Likewise.
9562 (CLASSTYPE_MARKED_N): Likewise.
9563 (CLASSTYPE_MARKED): Likewise.
9564 (CLASSTYPE_MARKED2): Likewise.
9565 (CLASSTYPE_MARKED3): Likewise.
9566 (CLASSTYPE_MARKED4): Likewise.
9567 (CLASSTYPE_MARKED5): Likewise.
9568 (CLASSTYPE_MARKED6): Likewise.
9569 (SET_CLASSTYPE_MARKED): Whitespace.
9570 (CLEAR_CLASSTYPE_MARKED): Likewise.
9571 (SET_CLASSTYPE_MARKED2): Likewise.
9572 (CLEAR_CLASSTYPE_MARKED2): Likewise.
9573 (SET_CLASSTYPE_MARKED3): Likewise.
9574 (CLEAR_CLASSTYPE_MARKED3): Likewise.
9575 (SET_CLASSTYPE_MARKED4): Likewise.
9576 (CLEAR_CLASSTYPE_MARKED4): Likewise.
9577 (SET_CLASSTYPE_MARKED5): Likewise.
9578 (CLEAR_CLASSTYPE_MARKED5): Likewise.
9579 (SET_CLASSTYPE_MARKED6): Likewise.
9580 (CLEAR_CLASSTYPE_MARKED6): Likewise.
9581 (CLASSTYPE_TAGS): Likewise.
9582 (CLASSTYPE_VSIZE): Likewise.
9583 (CLASSTYPE_VBASECLASSES): Likewise.
9584 (CANONICAL_BINFO): Add parenthesis.
9585 (CLASSTYPE_SIZE(NODE): Likewise.
9586 (CLASSTYPE_SIZE_UNIT): Likewise.
9587 (CLASSTYPE_ALIGN(NODE): Likewise.
9588 (CLASSTYPE_USER_ALIGN): Likewise.
9589 (TYPE_JAVA_INTERFACE): Likewise.
9590 (CLASSTYPE_PURE_VIRTUALS): Likewise.
9591 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
9592 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
9593 (CLASSTYPE_HAS_MUTABLE): Likewise.
9594 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
9595 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
9596 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
9597 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
9598 (CLASSTYPE_INTERFACE_ONLY): Likewise.
9599 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9600 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9601 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9602 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9603 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9604 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
9605 (BINFO_UNSHARED_MARKED): Whitespace.
9606 (BINFO_MARKED): Whitespace and wrap.
9607 (SET_BINFO_MARKED): Likewise.
9608 (CLEAR_BINFO_MARKED): Likewise.
9609 (BINFO_VTABLE_PATH_MARKED): Likewise.
9610 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
9611 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
9612 (BINFO_SUBVTT_INDEX): Remove parenthesis.
9613 (BINFO_VPTR_INDEX): Likewise.
9614 (BINFO_PRIMARY_BASE_OF): Likewise,
9615 (CLASSTYPE_VFIELDS): Whitespace.
9616 (VF_DERIVED_VALUE): Wrap long line.
9617 (NAMESPACE_LEVEL): Whitespace.
9618 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
9619 (DEFARG_POINTER): Whitespace.
9620 (DECL_NEEDED_P): Remove parenthesis.
9621 (DECL_LANGUAGE): Whitespace.
9622 (SET_DECL_LANGUAGE): Add parenthesis.
9623 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
9624 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
9625 (DECL_IN_AGGR_P): Whitespace.
9626 (DECL_FRIEND_P): Likewise.
9627 (DECL_BEFRIENDING_CLASSES): Likewise.
9628 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
9629 (DECL_NONCONVERTING_P): Whitespace.
9630 (DECL_PURE_VIRTUAL_P): Likewise.
9631 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
9632 (DECL_PENDING_INLINE_INFO): Whitespace.
9633 (DECL_SORTED_FIELDS): Likewise.
9634 (DECL_DEFERRED_FN): Likewise.
9635 (DECL_TEMPLATE_INFO): Likewise.
9636 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
9637 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
9638 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
9639 (TMPL_ARGS_LEVEL): Likewise.
9640 (SET_TMPL_ARGS_LEVEL): Likewise.
9641 (INNERMOST_TEMPLATE_PARMS): Whitespace.
9642 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
9643 (INTEGRAL_CODE_P(CODE): Add parenthesis.
9644 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
9645 (TYPE_HAS_CONSTRUCTOR): Whitespace.
9646 (TREE_HAS_CONSTRUCTOR): Likewise.
9647 (TYPE_HAS_DESTRUCTOR): Likewise.
9648 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
9649 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
9650 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
9651 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
9652 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
9653 (TYPE_PTRMEMFUNC_P): Likewise.
9654 (TYPE_PTRMEMFUNC_FLAG): Likewise.
9655 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
9656 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
9657 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
9658 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
9659 (DECL_ACCESS): Whitespace.
9660 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
9661 (DECL_GLOBAL_DTOR_P): Likewise.
9662 (GLOBAL_INIT_PRIORITY): Likewise.
9663 (DECL_TEMPLATE_PARMS): Likewise.
9664 (DECL_TEMPLATE_RESULT): Likewise.
9665 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
9666 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
9667 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
9668 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
9669 (PRIMARY_TEMPLATE_P): Add parenthesis.
9670 (DECL_USE_TEMPLATE): Whitespace.
9671 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9672 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9673 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9674 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9675 (CALL_DECLARATOR_PARMS): Remove parenthesis.
9676 (CALL_DECLARATOR_QUALS): Likewise.
9677 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
9678 (TEMP_NAME_P): Wrap.
9679 (VFIELD_NAME_P): Likewise.
9680 (B_SET): Uppercase macro parameters and add parenthesis.
9681 (B_CLR): Likewise.
9682 (B_TST): Likewise.
9683 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
9684 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
9685 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
9686 (same_or_base_type_p): Likewise.
9687 (cp_deprecated): Likewise.
9688
9689 2002-01-05 Richard Henderson <rth@redhat.com>
9690
9691 * semantics.c (expand_body): Revert last change.
9692
9693 2002-01-04 Jason Merrill <jason@redhat.com>
9694
9695 PR c++/4122
9696 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
9697 lost primary.
9698
9699 * class.c (build_vtbl_initializer): Check for a lost primary
9700 before calculating the vtable entry to throw away.
9701
9702 2002-01-02 Jason Merrill <jason@redhat.com>
9703
9704 * semantics.c (expand_body): Call outlining_inline_function when
9705 emitting an inline function out of line.
9706
9707 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9708
9709 PR c++/5116, c++/764 reversion
9710 * call.c (build_new_op): Revert the instantiations. They are
9711 incorrect.
9712
9713 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9714
9715 PR c++/5089
9716 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
9717
9718 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9719
9720 PR c++/3716
9721 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
9722 (tsubst, case POINTER_TYPE): Handle pmfs here.
9723 (tsubst, case OFFSET_TYPE): Check it is not an offset to
9724 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
9725
9726 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9727
9728 PR c++/35
9729 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
9730 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
9731 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
9732 PARM_DECL.
9733 (tsubst_template_parms): Break up loop statements.
9734 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
9735 parm PARM_DECLs don't get promoted.
9736
9737 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9738
9739 PR c++/5123
9740 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
9741 (build_x_function_call): Cope with a COMPONENT_REF containing a
9742 TEMPLATE_ID_EXPR.
9743
9744 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9745
9746 PR c++/5213
9747 * pt.c (convert_template_argument): Be more careful determining
9748 when RECORD_TYPE templates are or are not templates.
9749
9750 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9751
9752 PR c++/775
9753 * cp-tree.h (handle_class_head): Adjust prototype.
9754 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
9755 parameters. Use for all class heads.
9756 * parse.y (named_class_head_sans_basetype, named_class_head,
9757 named_complex_class_head_sans_basetype,
9758 named_class_head_sans_basetype_defn,
9759 unnamed_class_head): Remove.
9760 (class_head, class_head_apparent_template): Recognize class heads
9761 (class_head_decl, class_head_defn): New reductions. Process class
9762 heads.
9763 (structsp): Adjust class definition and class declaration
9764 reductions.
9765 (maybe_base_class_list): Give diagnostic on empty list.
9766
9767 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9768
9769 PR c++/4379
9770 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
9771 single non-static member.
9772 (unary_complex_lvalue): If it cannot be a pointer to member, don't
9773 make it so. Check it is not pointer to reference.
9774
9775 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9776
9777 PR c++/5132
9778 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
9779 are processing a template decl.
9780
9781 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
9782
9783 PR c++/5116, c++/764
9784 * call.c (build_new_op): Make sure template class operands are
9785 instantiated. Simplify arglist construction.
9786
9787 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9788
9789 * call.c (build_user_type_conversion_1): Use my_friendly_assert
9790 rather than if ... abort.
9791 * cvt.c (convert_to_reference): Likewise.
9792 * semantics.c (setup_vtbl_ptr): Likewise.
9793 * pt.c (lookup_template_class): Comment typo.
9794
9795 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9796
9797 PR c++/5125
9798 * pt.c (push_template_decl_real): Make sure DECL has
9799 DECL_LANG_SPECIFIC.
9800
9801 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
9802
9803 PR c++/335
9804 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
9805 for non-reference fields.
9806 * typeck.c (require_complete_type): Use resolve_offset_ref).
9807
9808 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
9809
9810 PR c++/196
9811 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
9812
9813 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
9814
9815 PR c++/160
9816 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
9817 up. Don't stabilize_references when initializing a reference.
9818
9819 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9820
9821 * decl2.c (lang_f_options): Const-ify.
9822
9823 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9824
9825 * config-lang.in (diff_excludes): Remove.
9826
9827 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
9828
9829 PR c++/90
9830 * typeck.c (build_function_call_real): Use original function
9831 expression for errors.
9832
9833 2001-12-18 Jason Merrill <jason@redhat.com>
9834
9835 PR c++/3242
9836 * class.c (add_method): Do compare 'this' quals when trying to match a
9837 used function. Don't defer to another used function.
9838
9839 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9840
9841 * pt.c (instantiate_clone): Remove, fold into ...
9842 (instantiate_template): ... here. Simplify by removing mutual
9843 recursion.
9844 * typeck2.c (build_m_component_ref): Don't cv qualify the function
9845 pointed to by a pointer to function.
9846 * class.c (delete_duplicate_fields_1): Typo.
9847
9848 2001-12-18 Jason Merrill <jason@redhat.com>
9849
9850 C++ ABI change: destroy value arguments in caller.
9851 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
9852 create an extra binding level for the parameters.
9853 * decl.c (store_parm_decls): Don't do parameter cleanups.
9854
9855 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
9856
9857 * call.c (build_new_method_call): Use '%#V'.
9858 * error.c (cv_to_string): Use V parameter to determine padding.
9859
9860 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
9861
9862 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
9863 spellings in messages.
9864
9865 2001-12-17 Zack Weinberg <zack@codesourcery.com>
9866
9867 * cp-tree.h: Delete #defines for cp_error, cp_warning,
9868 cp_pedwarn, and cp_compiler_error.
9869 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
9870 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
9871 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
9872 typeck2.c: Change calls to the above macros to use their
9873 language-independent equivalents: error, warning, pedwarn, and
9874 internal_error respectively.
9875
9876 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
9877
9878 * decl2.c (finish_file): Remove back_end_hook.
9879
9880 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9881
9882 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
9883 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
9884 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
9885
9886 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
9887
9888 * lang-options.h: Use American spelling in messages.
9889
9890 2001-12-13 Jason Merrill <jason@redhat.com>
9891
9892 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
9893
9894 Use cleanups to run base and member destructors.
9895 * init.c (push_base_cleanups): New function, split out from...
9896 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
9897 * decl.c (finish_destructor_body): Move vbase destruction code to
9898 push_base_cleanups.
9899 (begin_function_body, finish_function_body): New fns.
9900 (finish_function): Move [cd]tor handling and call_poplevel to
9901 finish_function_body.
9902 (pushdecl): Skip the new level.
9903 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
9904 (setup_vtbl_ptr): Call push_base_cleanups.
9905 * method.c (synthesize_method): Call {begin,end}_function_body.
9906 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
9907 * cp-tree.h: Declare new fns.
9908 * parse.y (function_body, .begin_function_body): New nonterminals.
9909 (fndef, pending_inline, function_try_block): Use function_body.
9910 (ctor_initializer_opt, function_try_block): No longer has a value.
9911 (base_init): Remove .set_base_init token.
9912 (.set_base_init, compstmt_or_error): Remove.
9913 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
9914
9915 * optimize.c (maybe_clone_body): Fix parameter updating.
9916
9917 2001-12-12 Jason Merrill <jason@redhat.com>
9918
9919 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
9920 * semantics.c (genrtl_start_function): Don't pass
9921 parms_have_cleanups or push an extra binding level.
9922 (genrtl_finish_function): Lose cleanup_label cruft.
9923
9924 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
9925 (ctor_label): Remove.
9926 * semantics.c (finish_return_stmt): Lose ctor_label support.
9927 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
9928 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
9929 dtor_label.
9930
9931 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
9932 check for [cd]tors.
9933 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
9934
9935 * decl.c (finish_function): Check VMS_TARGET, not VMS.
9936
9937 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
9938 (end_cleanup_fn): And poplevel.
9939
9940 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
9941 if we're in a template.
9942
9943 2001-12-12 Jakub Jelinek <jakub@redhat.com>
9944
9945 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
9946 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
9947 THIS_NAME_P): Delete.
9948 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
9949 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
9950 with internal naming scheme.
9951 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
9952
9953 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
9954
9955 * decl.c (grokdeclarator): Deprecated implicit typename use.
9956
9957 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
9958
9959 PR g++/51
9960 * parse.y (frob_specs): Indicate it is a language linkage which
9961 contained the extern.
9962 * decl.c (grokdeclarator): Allow extern language linkage with
9963 other specifiers.
9964
9965 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
9966
9967 PR g++/72
9968 * decl.c (add_binding): Don't reject duplicate typedefs involving
9969 template parameters.
9970
9971 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
9972
9973 * parse.y, semantics.c: Similarly.
9974
9975 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
9976
9977 PR g++/87
9978 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
9979 (copy_args_p): Rename to ...
9980 (copy_fn_p): ... here.
9981 (grok_special_member_properties): New function.
9982 (grok_op_properties): Lose VIRTUALP parameter.
9983 (copy_assignment_arg_p): Remove.
9984 * call.c (build_over_call): Use copy_fn_p.
9985 * decl.c (grokfndecl): Reformat. Adjust call to
9986 grok_op_properties.
9987 (copy_args_p): Rename to ...
9988 (copy_fn_p): ... here. Reject template functions. Check for pass
9989 by value.
9990 (grok_special_member_properties): Remember special functions.
9991 (grok_ctor_properties): Don't remember them here, just check.
9992 (grok_op_properties): Likewise.
9993 (start_method): Call grok_special_member_properties.
9994 * decl2.c (grokfield): Likewise.
9995 (copy_assignment_arg_p): Remove.
9996 (grok_function_init): Don't remember abstract assignment here.
9997 * pt.c (instantiate_class_template): Call
9998 grok_special_member_properties.
9999 (tsubst_decl): Adjust grok_op_properties call.
10000
10001 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
10002
10003 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10004 RID_TYPES_COMPATIBLE_P.
10005
10006 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
10007
10008 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10009 call to build_aggr_init.
10010 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10011
10012 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
10013
10014 * parse.y: Replace uses of the string non-terminal with STRING.
10015 Don't perform string concatentaion here.
10016 (string): Remove non-terminal.
10017 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10018
10019 2001-12-05 Jason Merrill <jason@redhat.com>
10020
10021 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10022 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10023 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10024 * pt.c (push_tinst_level): No longer static.
10025 * cp-tree.h: Declare them.
10026
10027 * init.c (resolve_offset_ref): Don't check access for the base
10028 conversion to access a FIELD_DECL.
10029
10030 * cp-tree.h (TYPE_REFFN_P): New macro.
10031 * decl.c (bad_specifiers): Check it, too.
10032
10033 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10034 on the __*_type_info type if we haven't seen a definition.
10035
10036 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
10037
10038 * decl.c: Include c-common.h.
10039 (shadow_warning): Move to c-common.c.
10040
10041 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10042
10043 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10044
10045 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
10046
10047 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10048
10049 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
10050
10051 PR g++/164
10052 * init.c (sort_base_init): Allow binfos to be directly specified.
10053 * method.c (do_build_copy_constructor): Explicitly convert to the
10054 base instance.
10055 (do_build_assign_ref): Likewise.
10056
10057 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
10058
10059 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10060 declaration and initialization.
10061
10062 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10063
10064 * typeck2.c: Remove leading capital from diagnostic messages, as
10065 per GNU coding standards.
10066
10067 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
10068
10069 PR c++/3394
10070 * decl.c (xref_basetypes): Handle attributes between
10071 'class' and name.
10072
10073 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
10074
10075 PR g++/3381
10076 * parse.y (named_complex_class_head_sans_basetype): Add new
10077 reduction.
10078 * Make-lang.in (parse.c): Adjust expected conflict count.
10079
10080 2001-12-03 Jason Merrill <jason@redhat.com>
10081
10082 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10083 immediate binfos for our virtual bases.
10084
10085 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
10086
10087 * call.c (build_java_interface_fn_ref): Similarly.
10088 * except.c (is_admissible_throw_operand): Similarly.
10089 * init.c (build_java_class_ref): Similarly.
10090 * xref.c (open_xref_file): Similarly.
10091
10092 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10093
10094 * class.c (finish_struct): Remove trailing periods from messages.
10095 * decl.c (check_tag_decl): Similarly.
10096 * lex.c (cxx_set_yydebug): Similarly.
10097 * typeck2.c (friendly_abort): Similarly.
10098
10099 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10100
10101 PR c++/3048
10102 * cp-tree.h (ovl_member): Remove.
10103 * decl2.c (merge_functions): Handle extern "C" functions
10104 specially.
10105 * tree.c (ovl_member): Remove.
10106
10107 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10108
10109 PR c++/4842
10110 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10111 FUNCTION_DECL, as input.
10112 (mark_overriders): Remove.
10113 (warn_hidden): Rework for the new ABI.
10114
10115 2001-11-29 Mark Mitchell <mark@codesourcery.com>
10116
10117 PR c++/3471
10118 * call.c (convert_like_real): Do not build additional temporaries
10119 for rvalues of class type.
10120
10121 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
10122
10123 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10124 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10125 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10126 (DERIVED_FROM_P): Likewise.
10127 (enum base_access): Renumber, add ba_quiet bit mask.
10128 (get_binfo): Remove.
10129 (get_base_distance): Remove.
10130 (binfo_value): Remove.
10131 (ACCESSIBLY_DERIVED_FROM_P): Remove.
10132 * call.c (standard_conversion): Use lookup_base.
10133 * class.c (strictly_overrides): Likewise.
10134 (layout_virtual_bases): Likewise.
10135 (warn_about_ambiguous_direct_bases): Likewise.
10136 (is_base_of_enclosing_class): Likewise.
10137 (add_vcall_offset_vtbl_entries_1): Likewise.
10138 * cvt.c (build_up_reference): Adjust comment.
10139 * init.c (build_member_call): Reformat.
10140 * search.c (get_binfo): Remove.
10141 (get_base_distance_recursive): Remove.
10142 (get_base_distance): Remove.
10143 (lookup_base_r): Tweak.
10144 (lookup_base): Add ba_quiet control. Complete the types here.
10145 (covariant_return_p): Use lookup_base.
10146 * tree.c (binfo_value): Remove.
10147 (maybe_dummy_object): Use lookup_base.
10148 * typeck.c (build_static_cast): Use lookup_base.
10149 (get_delta_difference): Likewise.
10150 * typeck2.c (binfo_or_else): Use lookup_base.
10151 (build_scoped_ref): Add back error_mark_check.
10152 (build_m_component_ref): Use lookup_base.
10153
10154 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10155
10156 * Make-lang.in (c++.generated-manpages): New dummy target.
10157
10158 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10159
10160 * Make-lang.in (cp-lang.o): Depends on c-common.h.
10161 * cp-lang.c (c-common.h): Include.
10162 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10163 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10164 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10165
10166 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
10167
10168 * decl2.c (c_language): Move to c-common.c.
10169 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10170 functions.
10171 (cxx_init): Update.
10172
10173 2001-11-26 Jason Merrill <jason@redhat.com>
10174
10175 * call.c (joust): Remove COND_EXPR hack.
10176
10177 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
10178
10179 * search.c (lookup_base_r): Declare bk in variable declaration
10180 space.
10181
10182 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
10183
10184 PR g++/3145
10185 * class.c (build_vbase_pointer): Remove.
10186 (build_vbase_path): Remove.
10187 (build_base_path): New function.
10188 * cp-tree.h (base_access, base_kind): New enumerations.
10189 (build_base_path): Declare.
10190 (convert_pointer_to_real): Remove.
10191 (convert_pointer_to): Remove.
10192 (lookup_base): Declare.
10193 (convert_pointer_to_vbase): Remove.
10194 * call.c (build_scoped_method_call): Use lookup_base &
10195 build_base_path instead of convert_pointer_to_real,
10196 get_base_distance & get_binfo.
10197 (build_over_call): Likewise.
10198 * cvt.c (cp_convert_to_pointer): Likewise.
10199 (convert_to_pointer_force): Likewise.
10200 (build_up_reference): Likewise.
10201 (convert_pointer_to_real): Remove.
10202 (convert_pointer_to): Remove.
10203 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10204 instead of convert_pointer_to_vbase & build_vbase_path.
10205 (emit_base_init): Use build_base_path instead of
10206 convert_pointer_to_real.
10207 (expand_virtual_init): Lose unrequired conversions.
10208 (resolve_offset_ref): Use lookup_base and build_base_path
10209 instead of convert_pointer_to.
10210 * rtti.c (build_dynamic_cast_1): Use lookup_base &
10211 build_base_path instead of get_base_distance & build_vbase_path.
10212 * search.c (get_vbase_1): Remove.
10213 (get_vbase): Remove.
10214 (convert_pointer_to_vbase): Remove.
10215 (lookup_base_r): New function.
10216 (lookup_base): New function.
10217 * typeck.c (require_complete_type): Use lookup_base &
10218 build_base_path instead of convert_pointer_to.
10219 (build_component_ref): Likewise.
10220 (build_x_function_call): Likewise.
10221 (get_member_function_from_ptrfunc): Likewise.
10222 (build_component_addr): Likewise.
10223 * typeck2.c (build_scoped_ref): Likewise.
10224
10225 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10226
10227 * cp-tree.h (CP_TYPE_QUALS): Removed.
10228 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
10229 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
10230 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
10231 * dump.c (cp_dump_tree): Use void* dump_info argument to match
10232 lang-hooks prototype.
10233 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
10234 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
10235 CP_TYPE_QUALS changed to cp_type_quals.
10236 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
10237 (CXX_C_OBJS): Remove c-dump.o.
10238
10239 2001-11-21 Mark Mitchell <mark@codesourcery.com>
10240
10241 PR c++/3637
10242 * pt.c (lookup_template_class): Ensure that all specializations
10243 are registered on the list corresponding to the most general
10244 template.
10245
10246 2001-11-20 Mark Mitchell <mark@codesourcery.com>
10247
10248 * call.c (non_reference): Add documentation.
10249 (convert_class_to_reference): Do not strip reference types
10250 from conversion operators.
10251 (maybe_handle_ref_bind): Simplify.
10252 (compare_ics): Correct handling of references.
10253
10254 2001-11-19 John Wilkinson <johnw@research.att.com>
10255
10256 * dump.c (dump_op): New function.
10257 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
10258 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
10259 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
10260
10261 2001-11-19 Mark Mitchell <mark@codesourcery.com>
10262
10263 PR4629
10264 * semantics.c (finish_sizeof): Make sure that expression created
10265 while processing a template do not have a type.
10266 (finish_alignof): Likewise.
10267 * typeck.c (c_sizeof): Likewise.
10268 (expr_sizeof): Likewise.
10269
10270 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10271
10272 * lex.c (cxx_finish): Call c_common_finish.
10273 (finish_parse): Remove.
10274
10275 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10276
10277 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
10278 when displaying error message about missing array bounds.
10279
10280 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10281
10282 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
10283 CONST_CAST_EXPR.
10284 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
10285
10286 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
10287
10288 * cp-tree.h (print_class_statistics): Restore.
10289
10290 2001-11-15 Jason Merrill <jason@redhat.com>
10291
10292 * method.c (use_thunk): Don't emit debugging information for thunks.
10293
10294 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
10295 * decl.c (make_typename_type): Handle getting a class template.
10296 * search.c (lookup_field_r): A class template is good enough for
10297 want_type.
10298
10299 * call.c (convert_like_real): Only use cp_convert for the bad part.
10300 (standard_conversion): Also allow bad int->enum.
10301 * typeck.c (ptr_reasonably_similar): Also allow functions to
10302 interconvert. Pointers to same-size integers are reasonably
10303 similar.
10304
10305 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
10306 give it void type.
10307
10308 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
10309
10310 PR g++/3154
10311 * init.c (sort_base_init): Remove unreachable code.
10312 (expand_member_init): Adjust comment to reflect reality. Simplify
10313 and remove unreachable code.
10314
10315 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10316
10317 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
10318 (cxx_init): Update prototype.
10319 * decl.c (init_decl_processing): Rename. Move null node init
10320 to its creation time.
10321 * lex.c (cxx_init_options): Update.
10322 (cxx_init): Combine with old init_parse; also call
10323 cxx_init_decl_processing.
10324
10325 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
10326
10327 * decl.c (check_initializer): Try to complete the type of an
10328 array element before checking whether it's complete. Don't
10329 complain about arrays with complete element types but an
10330 unknown size.
10331 (cp_finish_decl): Build the hierarchical constructor before
10332 calling maybe_deduce_size_from_array_init.
10333
10334 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
10335
10336 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
10337
10338 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
10339
10340 PR g++/4206
10341 * parse.y (already_scoped_stmt): Remove.
10342 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
10343
10344 2001-11-12 H.J. Lu <hjl@gnu.org>
10345
10346 * cvt.c (ocp_convert): Don't warn the address of a weak
10347 function is always `true'.
10348
10349 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10350
10351 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
10352 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
10353 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
10354 * cp-tree.h (print_class_statistics): Remove.
10355 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
10356 cxx_print_identifier, cxx_set_yydebug): New.
10357 * lex.c (set_yydebug): Rename c_set_yydebug.
10358 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
10359 lang_print_xnode): Rename.
10360 * tree.c (print_lang_statistics): Rename.
10361
10362 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10363
10364 * class.c (dump_array): Fix format specifier warning.
10365
10366 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10367
10368 * cp-lang.c (LANG_HOOKS_NAME): Override.
10369 (struct lang_hooks): Constify.
10370 * lex.c (cxx_init_options): Update.
10371 (lang_identify): Remove.
10372 * parse.y (language_string): Remove.
10373
10374 2001-11-08 Andreas Franck <afranck@gmx.de>
10375
10376 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
10377 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
10378 suggested by autoconf.
10379 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
10380 (c++.install-common): Use the transformed target alias names.
10381
10382 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10383
10384 * Make-lang.in: Update.
10385 * cp-lang.c: Include langhooks-def.h.
10386
10387 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10388
10389 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
10390
10391 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10392
10393 * lex.c (copy_lang_type): Add static prototype.
10394
10395 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10396
10397 * pt.c (unify): Handle SCOPE_REF.
10398
10399 2001-11-01 Jakub Jelinek <jakub@redhat.com>
10400
10401 * tree.c (cp_copy_res_decl_for_inlining): Adjust
10402 DECL_ABSTRACT_ORIGIN for the return variable.
10403
10404 2001-10-31 Zack Weinberg <zack@codesourcery.com>
10405
10406 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10407
10408 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
10409
10410 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
10411 semantics.c, spew.c: Fix spelling errors.
10412
10413 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10414
10415 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
10416
10417 2001-10-25 Zack Weinberg <zack@codesourcery.com>
10418
10419 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
10420 pop_everything.
10421
10422 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10423
10424 * cp-lang.c (cxx_get_alias_set): New function.
10425 Point LANG_HOOKS_GET_ALIAS_SET to it.
10426
10427 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10428
10429 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
10430 * cp-tree.h (make_unbound_class_template): Prototype new function.
10431 * decl.c (make_unbound_class_template): New function.
10432 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
10433 * error.c (dump_type): Likewise.
10434 * mangle.c (write_type): Likewise.
10435 * parse.y (template_parm): Likewise.
10436 (template_argument): Use make_unbound_class_template.
10437 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
10438 (tsubst): Likewise.
10439 (tsubst_copy): Likewise.
10440 (unify): Likewise.
10441 * tree.c (walk_tree): Likewise.
10442 * typeck.c (comptypes): Likewise.
10443
10444 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10445
10446 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
10447 extra calls into fewer ones.
10448
10449 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
10450
10451 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
10452 Warn when merging inline with attribute noinline.
10453 (start_decl, start_function): Warn if inline and attribute
10454 noinline appear in the same declaration.
10455
10456 2001-10-16 H.J. Lu <hjl@gnu.org>
10457
10458 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
10459 for tree checking disabled.
10460
10461 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
10462
10463 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
10464 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
10465
10466 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
10467
10468 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
10469 (unify): Only handle MINUS_EXPR specially if the above flag is set
10470 and the subtracted constant is 1. Clear the flag on recursive calls.
10471 Set it when unifying the maximum value in an INTEGER_TYPE's range.
10472
10473 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
10474
10475 * decl.c (bad_specifiers): Don't allow exception specifications
10476 on any typedefs.
10477
10478 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
10479
10480 * cp/lex.c (init_cp_pragma): Similarly.
10481
10482 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10483
10484 * pt.c (lookup_template_class): Build complete template arguments
10485 for BOUND_TEMPLATE_TEMPLATE_PARM.
10486
10487 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10488
10489 * cp-tree.h (TYPE_BINFO): Update comment.
10490 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
10491 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
10492 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
10493 (copy_type): Prototype new function.
10494 * lex.c (copy_lang_decl): Gather tree node statistics.
10495 (copy_lang_type): New function.
10496 (copy_type): Likewise.
10497 (cp_make_lang_type): Create lang_type for
10498 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
10499 and BOUND_TEMPLATE_TEMPLATE_PARM.
10500 * pt.c (tsubst): Use copy_type instead of copy_node.
10501 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
10502
10503 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10504
10505 * pt.c (determine_specialization): Ignore functions without
10506 DECL_TEMPLATE_INFO.
10507
10508 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
10509
10510 PR g++/4476
10511 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
10512
10513 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
10514
10515 * typeck2.c (store_init_value): Don't re-digest a bracketed
10516 initializer.
10517
10518 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
10519 ANON_AGGR_TYPE_P.
10520
10521 2001-10-11 Richard Henderson <rth@redhat.com>
10522
10523 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
10524 of an asm statement.
10525 (build_vtbl_ref_1): Split out from build_vtbl_ref.
10526 (build_vfn_ref): Use it to handle vtable descriptors before
10527 calling build_vtable_entry_ref.
10528 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
10529
10530 2001-10-10 Richard Henderson <rth@redhat.com>
10531
10532 * parse.y (asm_operand): Allow named operands.
10533 * semantics.c (finish_asm_stmt): Tweek for changed location
10534 of the operand constraint.
10535
10536 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
10537
10538 * call.c (standard_conversion): Add bad conversion between
10539 integers and pointers.
10540 (convert_like_real): Don't use convert_for_initialization for bad
10541 conversions; complain here and use cp_convert.
10542 (build_over_call): Don't handle bad conversions specially.
10543 (perform_implicit_conversion): Allow bad conversions.
10544 (can_convert_arg_bad): New fn.
10545 * cp-tree.h: Declare it.
10546 * typeck.c (convert_for_assignment): Use it.
10547 (ptr_reasonably_similar): Any target type is similar to void.
10548
10549 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
10550
10551 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
10552 (cp/cp-lang.o): New rule.
10553 * cp-tree.h: Declare hooks.
10554 * tree.c: Make hooks non-static.
10555 (init_tree): Don't initialize hooks here.
10556 * lex.c: Likewise. Move definition of lang_hooks to...
10557 * cp-lang.c: ... new file.
10558
10559 2001-10-08 Richard Henderson <rth@redhat.com>
10560
10561 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
10562 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
10563
10564 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10565
10566 * class.c (build_vtable_entry_ref): Const-ify.
10567 * decl.c (predefined_identifier,
10568 initialize_predefined_identifiers): Likewise.
10569 * init.c (build_new_1): Likewise.
10570 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
10571 Likewise.
10572
10573 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
10574
10575 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
10576 (INSNS_PER_STMT): Likewise.
10577 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
10578 (copy_body, initialize_inlined_parameters): Likewise.
10579 (declare_return_variable, inlinable_function_p): Likewise.
10580 (expand_call_inline, expand_calls_inline): Likewise.
10581 (optimize_inline_calls, clone_body): Likewise.
10582 * tree.c (walk_tree): Moved to ../tree-inline.c.
10583 (walk_tree_without_duplicates): Likewise.
10584 (copy_tree_r, remap_save_expr): Likewise.
10585
10586 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
10587
10588 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
10589 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
10590 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
10591 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
10592 (flag_inline_trees): Moved declaration to ../tree-inline.h.
10593 (walk_tree): Moved declaration to ../tree-inline.h.
10594 (walk_tree_without_duplicates, copy_tree_r): Likewise.
10595 (remap_save_expr): Likewise.
10596 * decl.c: Include tree-inline.h.
10597 (lang_mark_tree): Don't mark inlined_fns.
10598 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
10599 * optimize.c: Include tree-inline.h.
10600 (optimize_inline_calls): Move declaration to ../tree.h, as
10601 non-static.
10602 (remap_decl): Use language-independent constructs and hooks.
10603 (remap_block, copy_body_r, declare_return_variable): Likewise.
10604 (inlinable_function_p): Likewise. Don't test for
10605 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
10606 no longer language-specific.
10607 (optimize_inline_calls): Likewise. Make it non-static. Moved
10608 call of dump_function to...
10609 (optimize_function): Here...
10610 (clone_body): New function, extracted from...
10611 (maybe_clone_body): ... here. Build decl_map locally and pass
10612 it on to clone_body.
10613 * pt.c, semantics.c: Include tree-inline.h.
10614 * tree.c: Likewise.
10615 (cp_walk_subtrees): New language-specific hook for tree inlining.
10616 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
10617 cp_is_overload_p, cp_auto_var_in_fn_p,
10618 cp_copy_res_decl_for_inlining): Likewise.
10619 (walk_tree): Move language-specific constructs into...
10620 (cp_walk_subtrees): this new function.
10621 (copy_tree_r): Use language-independent constructs and hooks.
10622 (init_tree): Initialize tree inlining hooks.
10623 (remap_save_expr): Adjust prototype so that the declaration
10624 does not require the definition of splay_tree.
10625
10626 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
10627
10628 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
10629 to build the declaration instead of the declaration itself.
10630
10631 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
10632
10633 * decl2.c (cxx_decode_option): Add 'else'.
10634
10635 * spew.c (end_input): No longer static.
10636 * cp-tree.h: Declare it.
10637 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
10638
10639 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10640
10641 * call.c (build_over_call), typeck.c (build_function_call_real):
10642 Pass type attributes to check_function_format rather than name or
10643 assembler name. Don't require there to be a name or assembler
10644 name to check formats.
10645
10646 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
10647
10648 * decl.c (init_decl_processing): Don't call
10649 init_function_format_info. Initialize lang_attribute_table
10650 earlier.
10651 (builtin_function): Call decl_attributes.
10652 (insert_default_attributes): New.
10653
10654 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
10655
10656 * decl.c (grokdeclarator): Copy array typedef handling from C
10657 frontend.
10658
10659 * decl.c (grokdeclarator): Copy too-large array handling from C
10660 frontend.
10661
10662 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
10663
10664 * config-lang.in (target_libs): Added target-gperf, so that we
10665 don't try to build it if C++ is disabled.
10666
10667 2001-09-23 Zack Weinberg <zack@codesourcery.com>
10668
10669 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
10670 (cp/errfn.o): Delete rule.
10671 (cp/error.o): Depend on flags.h.
10672 * errfn.c: Delete file.
10673 * cp-tree.h: Declare warn_deprecated. Remove definitions of
10674 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
10675 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
10676 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
10677 internal_error respectively. Make cp_deprecated into a macro.
10678 Don't define cp_printer typedef or declare cp_printers.
10679 * error.c: Include flags.h.
10680 Delete: struct tree_formatting_info, print_function_argument_list,
10681 print_declaration, print_expression, print_function_declaration,
10682 print_function_parameter, print_type_id, print_cv_qualifier_seq,
10683 print_type_specifier_seq, print_simple_type_specifier,
10684 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
10685 print_parameter_declaration_clause, print_exception_specification,
10686 print_nested_name_specifier, and definition of cp_printers.
10687 (locate_error): New function.
10688 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
10689 rewritten in terms of locate_error and diagnostic.c.
10690 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
10691 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
10692 (init_error): Adjust to match.
10693
10694 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10695
10696 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
10697
10698 2001-09-21 Richard Henderson <rth@redhat.com>
10699
10700 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
10701 (build_vtbl_initializer): Likewise.
10702 (build_vfn_ref): New.
10703 * cp-tree.h: Declare it.
10704 * call.c (build_over_call): Use it.
10705 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
10706 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
10707
10708 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
10709
10710 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
10711
10712 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
10713
10714 Table-driven attributes.
10715 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
10716 * decl2.c (cplus_decl_attributes): Only take one attributes
10717 parameter.
10718 * cp-tree.c (cplus_decl_attributes): Update prototype.
10719 * class.c (finish_struct), decl.c (start_decl, start_function),
10720 decl2.c (grokfield), friend.c (do_friend), parse.y
10721 (parse_bitfield): Update calls to cplus_decl_attributes.
10722 * decl.c (grokdeclarator): Take a pointer to a single ordinary
10723 attribute list.
10724 * decl.h (grokdeclarator): Update prototype.
10725 * decl2.c (grokfield): Take a single ordinary attribute list.
10726 * friend.c (do_friend): Likewise.
10727 * decl.c (shadow_tag, groktypename, start_decl,
10728 start_handler_parms, grokdeclarator, grokparms, start_function,
10729 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
10730 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
10731 (process_template_parm, do_decl_instantiation): Pass single
10732 ordinary attribute lists around.
10733 * decl.c (grokdeclarator): Correct handling of nested attributes.
10734 Revert the patch
10735 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
10736 * decl.c (grokdeclarator): Embedded attrs bind to the right,
10737 not the left.
10738 .
10739 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
10740 (cp_attribute_table): Declare.
10741 * decl.c (valid_lang_attribute): Don't define.
10742 (lang_attribute_table): Define.
10743 (init_decl_processing): Initialize lang_attribute_table instead of
10744 valid_lang_attribute.
10745 * tree.c (cp_valid_lang_attribute): Remove.
10746 (handle_java_interface_attribute, handle_com_interface_attribute,
10747 handle_init_priority_attribute): New functions.
10748 (cp_attribute_table): New array.
10749 * decl2.c (import_export_class): Don't use
10750 targetm.valid_type_attribute.
10751
10752 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10753
10754 * Make-lang.in (cp/error.o): Depend on real.h
10755 * error.c: #include "real.h"
10756
10757 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10758
10759 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
10760 xmalloc/strcpy/strcat.
10761
10762 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10763
10764 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
10765 Const-ification.
10766 * pt.c (tsubst_decl): Likewise.
10767
10768 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10769
10770 * decl2.c (lang_f_options): Const-ification.
10771 * lex.c (cplus_tree_code_name): Likewise.
10772 * spew.c (yyerror): Likewise.
10773
10774 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
10775
10776 PR c++/3986
10777 * class.c (force_canonical_binfo_r): Check & move an indirect
10778 primary base first.
10779 (force_canonical_binfo): Check that it's not already
10780 canonical.
10781 (mark_primary_virtual_base): Remove BINFO parameter.
10782 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
10783
10784 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
10785
10786 Remove TYPE_NONCOPIED_PARTS.
10787 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
10788 CLASSTYPE_PURE_VIRTUALS.
10789 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
10790 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
10791 (layout_class_type): Don't call fixup_inline_methods here ...
10792 (finish_struct_1): ... call it here.
10793
10794 2001-09-04 Mark Mitchell <mark@codesourcery.com>
10795
10796 * decl.c (duplicate_decls): Remove code deadling with
10797 DECL_SAVED_INSNS.
10798 * decl2.c (finish_file): Likewise.
10799 * pt.c (instantiate_decl): Likewise.
10800 * semantics.c (expand_body): Don't defer local functions if
10801 they wouldn't be deferred for some other reason. Don't
10802 generate RTL for functions that will not be emitted.
10803 (genrtl_start_function): Remove code deadling with
10804 DECL_SAVED_INSNS.
10805 (genrtl_finish_function): Likewise.
10806
10807 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
10808
10809 PR c++/4203
10810 * call.c (build_over_call): Do not optimize any empty base
10811 construction.
10812
10813 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10814
10815 * error.c (dump_template_decl): Output template parameters
10816 together with their specifiers.
10817 Output `class' prefix for template template parameter.
10818 (dump_decl): Fix formatting.
10819
10820 2001-08-30 Kurt Garloff <garloff@suse.de>
10821
10822 * optimize.c (inlinable_function_p): Allow only smaller single
10823 functions. Halve inline limit after reaching recursive limit.
10824
10825 2001-08-30 Joern Rennecke <amylaar@redhat.com>
10826 Jason Merrill <jason_merrill@redhat.com>
10827
10828 * class.c (build_vtable_entry_ref): Subtract in char*, not
10829 ptrdiff_t.
10830
10831 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
10832
10833 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
10834 (build_cplus_array_type): Use cp_build_qualified_type, not
10835 TYPE_MAIN_VARIANT, to get an unqualified version.
10836
10837 * decl2.c (grok_alignof): Lose.
10838 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
10839 * typeck.c (c_alignof): Lose.
10840 * semantics.c (finish_sizeof, finish_alignof): New.
10841 * parse.y: Use them.
10842 * cp-tree.h: Declare them.
10843
10844 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
10845
10846 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
10847 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
10848 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
10849
10850 2001-08-19 Jakub Jelinek <jakub@redhat.com>
10851
10852 * typeck2.c (add_exception_specifier): Only require complete type if
10853 not in processing template declaration.
10854
10855 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10856
10857 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
10858 GNU_xref_start_scope and GNU_xref_end_scope.
10859
10860 * tree.c (TYPE_HASH): Moved to ../tree.h.
10861
10862 2001-08-16 Mark Mitchell <mark@codesourcery.com>
10863
10864 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
10865 on COMPOUND_EXPRs.
10866
10867 2001-08-14 Richard Henderson <rth@redhat.com>
10868
10869 * class.c, cp-tree.h (build_vfn_ref): Remove.
10870 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
10871
10872 2001-08-13 Mark Mitchell <mark@codesourcery.com>
10873
10874 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
10875 empty class assignment as having side-effects to avoid
10876 spurious warnings.
10877
10878 2001-08-13 Zack Weinberg <zackw@panix.com>
10879
10880 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
10881 * except.c: Include libfuncs.h.
10882
10883 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10884
10885 * decl.c (grokdeclarator): Clarify diagnostic message.
10886
10887 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10888
10889 * decl2.c (do_nonmember_using_decl): Replace using directive
10890 with using declaration in the error message.
10891
10892 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10893
10894 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
10895 criterion to avoid rebuilding expression tree instead of
10896 processing_template_decl.
10897
10898 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
10899
10900 Support named return value optimization for inlines, too.
10901 * decl.c (finish_function): Nullify returns here.
10902 * semantics.c (genrtl_start_function): Not here.
10903 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
10904 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
10905 Also nullify the CLEANUP_STMT for the nrv.
10906 * cp-tree.h: Declare it.
10907 * optimize.c (declare_return_variable): Replace the nrv with the
10908 return variable.
10909 * typeck.c (check_return_expr): Be more flexible on alignment check.
10910 Ignore cv-quals when checking for a matching type.
10911
10912 2001-08-09 Richard Henderson <rth@redhat.com>
10913
10914 * decl2.c (finish_objects): Use target hooks instead of
10915 assemble_constructor and assemble_destructor.
10916
10917 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
10918
10919 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
10920
10921 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
10922
10923 PR c++/3820
10924 Stop using TYPE_NONCOPIED_PARTS.
10925 * call.c (build_over_call): Be careful when copy constructing
10926 or assigning to an empty class.
10927 * class.c (check_bases_and_members): It has a
10928 COMPLEX_ASSIGN_REF if it has a vptr.
10929 (layout_class_type): Don't add empty class padding to
10930 TYPE_NONCOPIED_PARTS.
10931 (finish_struct_1): Don't add the VFIELD either.
10932 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
10933 initialization.
10934
10935 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
10936
10937 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
10938
10939 2001-08-06 Richard Henderson <rth@redhat.com>
10940
10941 * decl2.c (finish_objects): Pass a symbol_ref and priority to
10942 assemble_{constructor,destructor}. Remove priority handling.
10943
10944 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
10945
10946 Don't allow template-id in using-declaration.
10947 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
10948 (do_class_using_decl): Likewise.
10949
10950 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10951
10952 * cp/spew.c (read_token): No need to pop buffers.
10953
10954 2001-08-02 Stan Shebs <shebs@apple.com>
10955
10956 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
10957 (fnaddr_from_vtable_entry): Remove decl.
10958 * method.c (use_thunk): Update comment.
10959
10960 2001-08-01 Andrew Cagney <ac131313@redhat.com>
10961
10962 * repo.c (get_base_filename): Change return value to const char
10963 pointer.
10964
10965 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
10966
10967 Kill -fhonor-std.
10968 * NEWS: Document.
10969 * cp-tree.h (flag_honor_std): Remove.
10970 (CPTI_FAKE_STD): Remove.
10971 (std_node): Remove comment about it being NULL.
10972 (fake_std_node): Remove.
10973 * decl.c (in_fake_std): Remove.
10974 (walk_namespaces_r): Remove fake_std_node check.
10975 (push_namespace): Remove in_fake_std code.
10976 (pop_namespace): Likewise.
10977 (lookup_name_real): Remove fake_std_node check.
10978 (init_decl_processing): Always create std_node. Always add
10979 std:: things there.
10980 (builtin_function): Always put non '_' fns in std.
10981 * decl2.c (flag_honor_std): Remove.
10982 (lang_f_options): Remove honor-std.
10983 (unsupported_options): Add honor-std.
10984 (set_decl_namespace): Remove fake_std_node check.
10985 (validate_nonmember_using_decl): Likewise.
10986 (do_using_directive): Likewise.
10987 (handle_class_head): Likewise.
10988 * dump.c (cp_dump_tree): Likewise.
10989 * except.c (init_exception_processing): Adjust.
10990 * init.c (build_member_call): Remove fake_std_node check.
10991 (build_offset_ref): Likewise.
10992 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
10993 * rtti.c (init_rtti_processing): Adjust.
10994
10995 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10996
10997 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
10998 operand while calling cp_tree_equal.
10999
11000 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11001
11002 The 3.0 ABI no longer has vbase pointer fields.
11003 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11004 FORMAT_VBASE_NAME): Remove.
11005 * method.c (do_build_copy_constructor): Adjust.
11006 (do_build_assign_ref): Adjust.
11007 * search.c (lookup_field_r): Adjust.
11008 * typeck.c (build_component_ref): Adjust.
11009
11010 The 3.0 ABI always has a vtable pointer at the start of every
11011 polymorphic class.
11012 * rtti.c (build_headof_sub): Remove.
11013 (build_headof): Adjust.
11014 (get_tinfo_decl_dynamic): No need to check flag_rtti
11015 here. Adjust.
11016 (create_real_tinfo_var): Explain why we need a hidden name.
11017
11018 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11019
11020 PR c++/3631
11021 * class.c (update_vtable_entry_for_fn): The fixed adjustment
11022 of a virtual thunk should be from declaring base.
11023
11024 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
11025
11026 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11027 the shared virtual base, so preserving inheritance graph order.
11028
11029 2001-07-30 Andreas Jaeger <aj@suse.de>
11030
11031 * decl2.c: Remove unused var global_temp_name_counter.
11032
11033 2001-07-28 Richard Henderson <rth@redhat.com>
11034
11035 * method.c (pending_inlines): Remove.
11036
11037 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
11038
11039 * class.c (mark_primary_virtual_base): Don't adjust base
11040 offsets here.
11041 (dfs_unshared_virtual_bases): Adjust them here.
11042 (mark_primary_bases): Explain why we adjust at the end.
11043
11044 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
11045
11046 * class.c (finish_struct_1): When copying the primary base's
11047 VFIELD, make sure we find it is at offset zero.
11048
11049 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11050
11051 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11052 tsubst_expr for default template arguments.
11053
11054 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11055
11056 PR c++/3621
11057 * spew.c (yylex): Only copy the token's lineno, if it is
11058 nonzero.
11059
11060 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11061
11062 PR c++/3624
11063 * call.c (resolve_args): Simplify, call
11064 convert_from_reference.
11065 (build_new_op): Resolve and convert from reference ARG1
11066 earlier. Adjust ARG2 & ARG3 resolve and conversion.
11067
11068 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
11069
11070 * decl.c (last_function_parm_tags): Remove.
11071 (current_function_parm_tags): Remove.
11072 (init_decl_processing): Adjust.
11073 (start_function): Adjust.
11074 (store_parm_decls): Adjust.
11075
11076 PR c++/3152
11077 * decl.c (grokdeclarator): Detect when a function typedef is
11078 declaring a function, and create last_function_parms correctly.
11079
11080 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
11081
11082 * call.c (joust): Only prefer a non-builtin candidate to a builtin
11083 one if they have the same signature.
11084
11085 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
11086 it rather than toplevel_bindings_p. Give it a mangled name if static.
11087 (convert_to_reference): Adjust.
11088 * decl2.c (get_temp_name): Lose.
11089 * mangle.c (mangle_ref_init_variable): New fn.
11090 (mangle_guard_variable): Strip the ref-init header.
11091 * cp-tree.h: Adjust.
11092 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11093 initializer.
11094 (grok_reference_init): Always use DECL_INITIAL.
11095
11096 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11097
11098 PR c++/3416
11099 * call.c (build_conditional_expr): Recheck args after
11100 conversions.
11101 * cp-tree.h (build_conditional_expr): Move to correct file.
11102 * typeck.c (decay_conversion): Diagnose any unknown types
11103 reaching here.
11104 (build_binary_op): Don't do initial decay or default
11105 conversions on overloaded functions.
11106 (build_static_cast): Don't do a decay conversion here.
11107
11108 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11109
11110 PR c++/3543
11111 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11112 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11113
11114 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11115
11116 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11117 (create_vtbl_ptr): ... here.
11118
11119 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
11120
11121 * class.c (build_vbase_offset_vbtl_entries): Look for
11122 non-primary base of which we are a sub vtable.
11123
11124 2001-07-24 Phil Edwards <pme@sources.redhat.com>
11125
11126 * semantics.c (finish_this_expr): Remove unused code.
11127
11128 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
11129
11130 Simplify rtti, now we've only one ABI.
11131 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11132 CPTI_TINFO_VAR_ID.
11133 (tinfo_decl_id, tinfo_var_id): Remove.
11134 (get_typeid_1): Remove.
11135 * rtti.c
11136 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11137 (typeid_ok_p): New function.
11138 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11139 (get_tinfo_decl): Remove old abi documentation.
11140 (tinfo_from_decl): Remove.
11141 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11142 (get_typeid_1): Remove.
11143 (get_base_offset): Remove.
11144 (synthesize_tinfo_var): Absorb get_base_offset.
11145 (create_real_tinfo_var): Don't use tinfo_decl_id.
11146
11147 2001-07-23 Graham Stott <grahams@redhat.com>
11148
11149 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11150 variable has_two_argument_delete_p.
11151
11152 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
11153
11154 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11155 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11156 (CPTI_INDEX_IDENTIFIER): Remove.
11157 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11158 (delta2_identifier): Remove.
11159 (index_identifier): Remove.
11160 (pfn_or_delta2_identifier): Remove.
11161 (flag_vtable_thunks): Remove.
11162 (VTABLE_DELTA2_NAME): Remove.
11163 (VTABLE_INDEX_NAME): Remove.
11164 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11165 (vfunc_ptr_type_node): Adjust.
11166 (VTABLE_NAME_PREFIX): Adjust.
11167 (build_vfn_ref): Lose first parameter.
11168 (fixup_all_virtual_upcast_offsets): Remove.
11169 * decl.c (initialize_predefined_identifiers): Remove
11170 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11171 (init_decl_processing): Remove no-vtable-thunk code.
11172 * decl2.c (flag_vtable_thunks): Remove.
11173 (mark_vtable_entries): Remove no-vtable-thunk code.
11174 * error.c (dump_decl): Remove no-vtable-thunk code.
11175 (dump_expr): Adjust ptr to member function code.
11176 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11177 code.
11178 * rtti.c (build_headof): Remove no-vtable-thunk code.
11179 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11180 * search.c (get_base_distance): Remove expand_upcast_fixups case.
11181 (virtual_context) Remove.
11182 (expand_upcast_fixups): Remove.
11183 (fixup_virtual_upcast_offsets): Remove.
11184 (fixup_all_virtual_upcast_offsets): Remove.
11185 * typeck.c (get_member_function_from_ptrfunc): Remove
11186 no-vtable-thunk code.
11187 * call.c (build_over_call): Adjust call to build_vfn_ref.
11188 * class.c (build_vfn_ref): Lose first parameter. Remove
11189 no-vtable-thunk code.
11190 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11191 (build_vtable_entry): Remove no-vtable-thunk code.
11192
11193 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
11194
11195 Remove old-abi remnants. Remove comments about old abi
11196 behavior. Remove references to 'new-abi' in comments.
11197 * cp-tree.h: Adjust comments.
11198 (vbase_offsets_in_vtable_p): Delete.
11199 (vcall_offsets_in_vtable_p): Delete.
11200 (vptrs_present_everywhere_p): Delete.
11201 (all_overridden_vfuns_in_vtables_p): Delete.
11202 (merge_primary_and_secondary_vtables_p): Delete.
11203 (TYPE_CONTAINS_VPTR_P): Adjust.
11204 (VTT_NAME_PREFIX): Remove.
11205 (CTOR_VTBL_NAME_PREFIX): Remove.
11206 (init_vbase_pointers): Remove.
11207 * class.c: Adjust coments.
11208 (build_vbase_pointer_fields): Delete.
11209 (build_vbase_pointer): Remove old-abi code.
11210 (build_secondary_vtable): Likewise.
11211 (modify_all_vtables): Likewise.
11212 (create_vtable_ptr): Likewise.
11213 (layout_class_type): Likewise.
11214 (finish_struct_1): Likewise.
11215 (finish_vtbls): Likewise.
11216 (dfs_finish_vtbls): Delete.
11217 (build_vbase_offset_vtbl_entries): Remove old-abi code.
11218 * cvt.c: Adjust comments.
11219 * decl.c: Adjust comments.
11220 * decl2.c: Adjust comments.
11221 * init.c: Adjust comments.
11222 (construct_virtual_bases): Remove old-abi code.
11223 * lang-specs.h: Remove -fno-new-abi.
11224 * mangle.c: Adjust comments.
11225 * rtti.c: Adjust comments.
11226 (get_base_offset): Remove old-abi-code.
11227 * search.c: Adjust comments.
11228 (dfs_init_vbase_pointers): Remove.
11229 (dfs_vtable_path_unmark): Remove.
11230 (init_vbase_pointers): Remove.
11231 * semantics.c: Adjust comments.
11232 (emit_associated_thunks): Remove old-abi code.
11233 * typeck.c: Adjust comments.
11234
11235 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
11236
11237 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
11238 params.h.
11239
11240 2001-07-19 Mark Mitchell <mark@codesourcery.com>
11241
11242 * class.c (finish_struct_anon): Forbid nested classes.
11243
11244 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
11245
11246 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
11247 * optimize.c: Include debug.h.
11248 (maybe_clone_body): Use debug hook.
11249 * semantics.c: Include debug.h.
11250 (expand_body): Use debug hook.
11251
11252 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
11253
11254 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
11255
11256 2001-07-18 Mark Mitchell <mark@codesourcery.com>
11257
11258 * class.c (type_requires_array_cookie): New function.
11259 (check_methods): Don't try to figure out whether the type needs a
11260 cookie here.
11261 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
11262 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
11263 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
11264 * pt.c (instantiate_class_template): Don't set
11265 TYPE_VEC_DELETE_TAKES_SIZE.
11266 * NEWS: Document ABI changes from GCC 3.0.
11267
11268 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
11269 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
11270
11271 * NEWS (Changes in GCC 3.0): Fix typo.
11272
11273 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
11274
11275 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
11276 which attributes are to be attached, and a flags argument. Update
11277 call to decl_attributes.
11278 (grokfield): Update call to decl_attributes.
11279 * class.c (finish_struct): Update call to cplus_decl_attributes.
11280 * cp-tree.h (cplus_decl_attributes): Update prototype.
11281 * decl.c (start_decl, grokdeclarator, start_function): Update
11282 calls to decl_attributes and cplus_decl_attributes.
11283 * friend.c (do_friend): Update call to cplus_decl_attributes.
11284 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
11285
11286 2001-07-12 Mark Mitchell <mark@codesourcery.com>
11287
11288 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
11289 for `register' variables with an asm-specification.
11290
11291 2001-07-11 Mark Mitchell <mark@codesourcery.com>
11292
11293 * semantics.c (finish_asm_stmt): Mark the output operands
11294 to an asm addressable, if necessary.
11295
11296 2001-07-11 Ben Elliston <bje@redhat.com>
11297
11298 * Revert this change -- there is a subtle bug.
11299
11300 PR c++/80
11301 * decl.c (finish_enum): New "attributes" argument; pass it to
11302 cplus_decl_attributes. Use a narrower type if the enum is packed.
11303 * cp-tree.h (finish_enum): Adjust prototype.
11304 * parse.y (enum_head): New non-terminal.
11305 (structsp): Use it. Enums now may be preceded or followed by
11306 optional attributes -- pass their chained tree to finish_enum().
11307 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
11308
11309 2001-07-10 Mark Mitchell <mark@codesourcery.com>
11310
11311 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
11312 variables.
11313
11314 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
11315
11316 * semantics.c (cp_expand_stmt): Fix for null
11317 current_function_return_value.
11318
11319 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
11320
11321 * call.c (build_op_delete_call): Initialize fn.
11322 (convert_like_real): Delete conditional.
11323 (joust): Initialize *w and *l.
11324 * class.c: Add prototype for binfo_ctor_vtable.
11325 (get_primary_binfo): Initialize result.
11326 * init.c (build_java_class_ref): Initialize name.
11327
11328 2001-07-09 Erik Rozendaal <dlr@acm.org>
11329
11330 * typeck.c (unary_complex_lvalue): Do not duplicate the
11331 argument to modify, pre-, or post-increment when used as an
11332 lvalue and when the argument has side-effects.
11333
11334 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
11335
11336 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11337 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
11338 cplus_decl_attributes even if attrs is NULL.
11339 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11340
11341 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
11342
11343 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
11344 calls to decl_attributes.
11345
11346 2001-07-06 Ira Ruben <ira@apple.com>
11347
11348 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
11349 be DECL_TEMPLATE_RESULT.
11350
11351 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11352
11353 * cp-tree.h (copy_template_template_parm): Rename to ...
11354 (bind_template_template_parm): ... here.
11355 * tree.c (copy_template_template_parm): Rename to ...
11356 (bind_template_template_parm): ... here. Remove the case when
11357 NEWARGS is NULL_TREE.
11358 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
11359 BOUND_TEMPLATE_TEMPLATE_PARM.
11360 * pt.c (lookup_template_class): Adjust.
11361
11362 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
11363
11364 * cvt.c (convert_lvalue): New fn.
11365 * cp-tree.h: Declare it.
11366 * method.c (do_build_assign_ref): Use it.
11367 (do_build_copy_constructor): Convert parm to base types
11368 before calling base constructors.
11369
11370 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
11371 DECL_USER_ALIGN. Check flag_elide_constructors instead of
11372 optimize.
11373 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
11374
11375 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
11376
11377 * optimize.c (optimize_inline_calls): New function, broken out
11378 of ...
11379 (optimize_function): ... here. Call it. Don't inline if it is
11380 a thunk.
11381 (dump_function): Print name of dump flag causing this dump.
11382 * semantics.c (expand_body): Move thunk inline check to
11383 optimize_function.
11384
11385 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
11386
11387 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
11388 (comptypes): Use target.comp_type_attributes.
11389
11390 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
11391
11392 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
11393
11394 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11395
11396 * error.c (lang_print_error_function): Add a `diagnostic_context *'
11397 parameter. Tweak.
11398
11399 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11400
11401 * decl2.c (import_export_class): Update.
11402
11403 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
11404
11405 * error.c (init_error): Adjust settings.
11406
11407 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
11408
11409 * error.c (init_error): Adjust settings.
11410
11411 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
11412
11413 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
11414 return pointers to data members by reference rather than by value.
11415
11416 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
11417
11418 Implement the Named Return Value optimization.
11419 * cp-tree.h (struct cp_language_function): Add x_return_value.
11420 (current_function_return_value): Now a macro.
11421 * decl.c: Don't define it.
11422 (define_label, finish_case_label): Don't clear it.
11423 (init_decl_processing): Don't register it with GC.
11424 * semantics.c (genrtl_finish_function): Don't check it for
11425 no_return_label. Copy the RTL from the return value to
11426 current_function_return_value and walk, calling...
11427 (nullify_returns_r): ...this new fn.
11428 * typeck.c (check_return_expr): Set current_function_return_value.
11429
11430 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
11431
11432 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
11433 sharing a ctor vtable with. Merge code for cases 1 and 2.
11434 (binfo_ctor_vtable): New fn.
11435 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
11436
11437 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
11438
11439 * class.c (dfs_find_final_overrider): Fix logic.
11440
11441 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
11442 virtual thunk instead of non-virtual.
11443 (get_matching_virtual): Uncomment.
11444
11445 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
11446 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
11447 PARM, not ARG.
11448
11449 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
11450
11451 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
11452 we've not emerged from the hierarchy of RTTI_BINFO on reaching
11453 a non-virtual base.
11454
11455 2001-06-13 Mark Mitchell <mark@codesourcery.com>
11456
11457 * NEWS: Update release number.
11458
11459 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
11460
11461 PR c++/3130, c++/3131, c++/3132
11462 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
11463 * class.c (force_canonical_binfo_r): Move
11464 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
11465 virtual bases unless they're primary and what they're primary
11466 too has been moved.
11467 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
11468 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
11469 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
11470 derived binfo.
11471 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
11472 (layout_nonempty_base_or_field): Add most derived type
11473 parameter. Adjust.
11474 (layout_empty_base): Likewise.
11475 (build_base_field): Likewise.
11476 (build_base_fields): Likewise.
11477 (propagate_binfo_offsets): Add most derived type
11478 parameter. Skip non canonical virtual bases too.
11479 (dfs_set_offset_for_unshared_vbases): Don't skip primary
11480 bases. Do skip canonical bases.
11481 (layout_virtual_bases): Adjust.
11482 (layout_class_type): Adjust.
11483 (dfs_get_primary_binfo): Build list of virtual primary base
11484 candidates.
11485 (get_primary_binfo): Check that the shared virtual primary
11486 base candidate was found first.
11487 (accumulate_vtbl_inits): Don't do anything for non-vptr
11488 containing binfos. For case 1 primary virtual bases, keep
11489 checking that we've not emerged from the hierarchy of RTTI_BINFO.
11490
11491 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
11492
11493 PR c++/3089
11494 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
11495 hierarchy looking for primary bases for a ctor
11496 vtable. Recursively call oneself, if we meet our primary via
11497 this route and haven't met it yet via inheritance graph order.
11498
11499 2001-06-11 Mark Mitchell <mark@codesourcery.com>
11500
11501 * lang-options.h: Emit documentation for -fno-honor-std, not
11502 -fhonor-std.
11503
11504 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
11505
11506 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
11507 Don't clobber delta.
11508 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
11509
11510 2001-06-10 Mark Mitchell <mark@codesourcery.com>
11511 Gabriel Dos Reis <gdr@codesourcery.com>
11512
11513 * Make-lang.in (cp/call.o): Depend on diagnostic.h
11514 (cp/typeck.o): Depend on diagnostic.h
11515 (cp/typeck2.o): Depend on diagnostic.h
11516 (cp/repo.o): Depend on dignostic.h
11517 * typeck.c: #include diagnostic.h
11518 (convert_for_initialization): Remove extern declaration for
11519 warningcount and errorcount.
11520
11521 * call.c: #include diagnostic.h
11522 (convert_like_real): Remove extern declaration for warnincount and
11523 errorcount.
11524
11525 * repo.c: #include diagnostic.h
11526 * typeck2.c: #include diagnostic.h
11527
11528 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11529
11530 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
11531 in previous change.
11532
11533 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11534
11535 PR c++/2929
11536 * friend.c (do_friend): Use push_decl_namespace for classes at
11537 namespace scope.
11538
11539 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
11540 Jason Merrill <jason_merrill@redhat.com>
11541
11542 PR c++/3061
11543 * class.c (build_secondary_vtable): Use assert, rather than an error
11544 message.
11545 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
11546 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
11547 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
11548 Don't set BINFO_VTABLE for a primary virtual base.
11549
11550 2001-06-07 Mark Mitchell <mark@codesourcery.com>
11551
11552 * decl.c (duplicate_decls): Update source position information
11553 when a template function is defined.
11554
11555 2001-06-07 Phil Edwards <pme@sources.redhat.com>
11556
11557 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
11558
11559 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
11560
11561 PR c++/2914
11562 * decl.c (pushtag): Don't push into a complete type's scope.
11563
11564 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
11565
11566 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
11567 (struct lang_decl_flags): Lose generate_with_vtable_p.
11568 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
11569 * class.c (copy_virtuals): Adjust.
11570 * decl2.c (mark_vtable_entries): Adjust.
11571 * method.c (make_thunk, build_vtable_entry): Adjust.
11572 * class.c (update_vtable_entry_for_fn): Only look as far as the
11573 first defining class.
11574 (build_vtbl_initializer): Put nothing in the slot for a function only
11575 defined in a lost primary virtual base.
11576 (add_vcall_offset_vtbl_entries_1): Use the same code for
11577 the lost primary case and the normal case.
11578 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
11579 (get_vfield_offset, get_derived_offset): Lose.
11580 (dfs_find_final_overrider): Use look_for_overrides_here.
11581 (get_matching_virtual): New fn.
11582 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
11583 not BV_VCALL_INDEX.
11584 * search.c (look_for_overrides_here): Split out from...
11585 (look_for_overrides_r): Here.
11586
11587 * class.c (find_final_overrider): Return error_mark_node on error.
11588
11589 * decl2.c (key_method): #if 0 accidental change.
11590
11591 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
11592
11593 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
11594 (build_over_call): Likewise.
11595 * decl.c (grokparms): Likewise.
11596 * pt.c (tsubst_decl): Likewise.
11597 * typeck.c (convert_arguments): Likewise.
11598
11599 2001-06-05 Mark Mitchell <mark@codesourcery.com>
11600
11601 * semantics.c (begin_class_definition): Robustify.
11602
11603 * pt.c (instantiate_decl): Tell the repository code about the
11604 clones, not the cloned functions.
11605 * repo.c (repo_template_used): Explicitly instantiate the cloned
11606 function, not the clones.
11607
11608 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11609
11610 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
11611 ICS_BAD_FLAG on created conversion.
11612 (compare_ics): Break out rank.
11613
11614 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11615
11616 * decl.c (xref_tag): Remove extraneous %s on dependent name
11617 lookup warning.
11618
11619 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11620
11621 * class.c (layout_vtable_decl): Fix off by one error on
11622 build_index_type.
11623 (build_vtt): Likewise.
11624 (build_ctor_vtbl_group): Likewise.
11625
11626 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
11627
11628 * class.c (maybe_indent_hierarchy): New function.
11629 (dump_class_hierarchy_r): Add flags. Dump extra binfo
11630 information, if enabled. Use maybe_indent_hierarchy. Adjust
11631 output format.
11632 (dump_class_hierarchy): Adjust prototype. Adjust output format.
11633 (dump_array, dump_vtable, dump_vtt): New functions.
11634 (finish_struct_1): Adjust hierarchy dumping.
11635 (initialize_vtable): Call dump_vtable.
11636 (build_vtt): Call dump_vtt.
11637 (build_ctor_vtbl_group): Call dump_vtable.
11638 * decl2.c (flag_dump_class_layout): Remove.
11639 (cxx_decode_option): Remove dump translation unit
11640 and dump class hierarchy check. Call dump_switch_p.
11641 (finish_file): Adjust dumping.
11642 (dump.c): Only dump base classes if not TDF_SLIM.
11643 Only dump namespace members if not TDF_SLIM.
11644 * optimize.c (dump_function): New function.
11645 (optimize_function): Call dump_function.
11646 * semantics.c (expand_body): Use dump_enabled_p.
11647
11648 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
11649
11650 PR g++/2936
11651 Part missed from first commit
11652 * decl2.c (finish_anon_union): Copy context.
11653
11654 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
11655
11656 PR g++/2936
11657 * optimize.c (remap_decl): Remap anonymous aggregate members too.
11658
11659 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
11660
11661 PR g++/2823
11662 * semantics.c (expand_body): Don't optimize thunks.
11663
11664 2001-05-25 Sam TH <sam@uchicago.edu>
11665
11666 * cp-tree.h lex.h: Fix header include guards.
11667
11668 2001-05-25 Mark Mitchell <mark@codesourcery.com>
11669
11670 * decl.c (init_decl_processing): Tweak.
11671
11672 2001-05-24 Mark Mitchell <mark@codesourcery.com>
11673
11674 * decl.c (duplicate_decls): Tidy.
11675 (init_decl_processing): Always set flag_no_builtin.
11676
11677 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
11678
11679 PR c++/2184
11680 * decl2.c (do_local_using_decl): Push the decls, even in a
11681 template.
11682
11683 2001-05-22 Mark Mitchell <mark@codesourcery.com>
11684
11685 * optimize.c (initialize_inlined_parameters): Don't set
11686 TREE_READONLY for a VAR_DECL taking the place of an inlined
11687 PARM_DECL.
11688
11689 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
11690
11691 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
11692 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
11693 attribute.
11694
11695 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
11696
11697 * parse.y: Refer to compound literals as such, not as
11698 constructor-expressions.
11699
11700 2001-05-21 Mark Mitchell <mark@codesourcery.com>
11701
11702 * call.c (build_op_delete_call): Ignore exception-specifications
11703 when looking for matching delete operators.
11704 * init.c (build_new_1): Compute whether or not the allocation
11705 function used is a placement allocation function or not, and
11706 communicate this information to build_op_delete_call.
11707
11708 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
11709
11710 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
11711 (build_vtbl_ref): Adjust.
11712 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
11713 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
11714 Re-add vtable-gc.
11715 (unsupported_options): Correspondingly.
11716
11717 * decl2.c (maybe_make_one_only): Check flag_weak, not
11718 supports_one_only().
11719
11720 * cp-tree.def (START_CATCH_STMT): Lose.
11721 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
11722 * tree.c (cp_statement_code_p): Don't case it.
11723 * semantics.c (cp_expand_stmt): Likewise.
11724 * cp-tree.h (START_CATCH_TYPE): Lose.
11725 (HANDLER_TYPE): New.
11726 * except.c (expand_start_catch_block): Don't start any blocks.
11727 Return the type.
11728 (expand_end_catch_block): Don't end any blocks.
11729 * parse.y (handler): Don't pass anything from finish_handler_parms
11730 to finish_handler.
11731 * pt.c (tsubst_expr): Likewise.
11732 * semantics.c (begin_handler): Call note_level_for_catch here.
11733 (finish_handler_parms): Don't return anything.
11734 (genrtl_catch_block, begin_catch_block): Lose.
11735 (genrtl_handler): Call expand_start_catch here.
11736
11737 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
11738
11739 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
11740 (get_vtable_decl, build_vtt): Not here.
11741
11742 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
11743
11744 PR c++/2781
11745 * optimize.c (update_cloned_parm): Copy addressability and other
11746 flags.
11747
11748 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11749
11750 * pt.c (determine_specialization): Ignore artificial functions.
11751
11752 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
11753
11754 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
11755 (C_RID_CODE): Remove.
11756 * lex.c (cxx_init_options): Call set_identifier_size. Update.
11757 (init_parse): Don't do it here.
11758
11759 2001-05-18 Diego Novillo <dnovillo@redhat.com>
11760
11761 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
11762 function declaration to avoid stripping the symbol's attributes.
11763
11764 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
11765
11766 * decl.c (pushdecl): Adjust error string.
11767 (xref_tag): Adjust friend class injection warning. Remove the
11768 inherited name from the class shadowed scope.
11769
11770 2001-05-17 Mark Mitchell <mark@codesourcery.com>
11771
11772 * except.c (cp_protect_cleanup_actions): New function.
11773 (init_exception_processing): Don't set protect_cleanup_actions
11774 here. Do set lang_protect_cleanup_actions.
11775
11776 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
11777
11778 * spew.c (read_token): Call yyerror on all unexpected tokens.
11779
11780 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
11781
11782 * init.c (member_init_ok_or_else): Take a tree rather than
11783 string for name.
11784 (expand_member_init): Adjust.
11785
11786 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
11787
11788 * decl.c (duplicate_decls): Suppress warning about duplicate
11789 decls if the first decl is a friend.
11790
11791 2001-05-12 Zack Weinberg <zackw@stanford.edu>
11792
11793 * except.c (choose_personality_routine): Export. Add
11794 explanatory comment. Take an enum languages, not a boolean.
11795 (initialize_handler_parm): Adjust to match.
11796 * cp-tree.h: Prototype choose_personality_routine.
11797 * lex.c (handle_pragma_java_exceptions): New function.
11798 (init_cp_pragma): Register #pragma GCC java_exceptions.
11799
11800 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11801
11802 * method.c (build_mangled_C99_name): Remove unused prototype.
11803
11804 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
11805
11806 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
11807 * typeck.c (get_member_function_from_ptrfunc,
11808 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
11809 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
11810
11811 Reverted Geoff Keating's 2001-05-03's patch.
11812
11813 2001-05-11 Ira Ruben <ira@apple.com>
11814
11815 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
11816
11817 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
11818
11819 * cp-tree.h (finish_label_expr, lookup_label): Delete.
11820 * parse.y: Update for '&&'; don't issue warning here.
11821 * semantics.c (finish_label_expr): Delete.
11822
11823 2001-05-07 Mark Mitchell <mark@codesourcery.com>
11824
11825 * splay-tree.h (splay_tree_max): New function.
11826 (splay_tree_min): Likewise.
11827
11828 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
11829
11830 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
11831 (pfn_vflag_identifier): Define.
11832 Update comment about layout of pointer functions.
11833 (build_ptrmemfunc1): Update prototype.
11834 (expand_ptrmemfunc_cst): Update prototype.
11835 * decl.c (initialize_predefined_identifiers): Initialize
11836 pfn_vflag_identifier.
11837 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
11838 an extra field to the type.
11839 * expr.c (cplus_expand_constant): Pass 'flag' between
11840 expand_ptrmemfunc_cst and build_ptrmemfunc1.
11841 * typeck.c (get_member_function_from_ptrfunc): When
11842 FUNCTION_BOUNDARY < 16, look at additional field to determine
11843 if a pointer-to-member is a real pointer or a vtable offset.
11844 (build_ptrmemfunc1): Add new parameter to contain extra field.
11845 (build_ptrmemfunc): Pass the extra field around.
11846 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
11847 (pfn_from_ptrmemfunc): Ignore the extra field.
11848
11849 2001-05-03 Mark Mitchell <mark@codesourcery.com>
11850
11851 * cp-tree.h (flag_inline_trees): Update documentation.
11852 * decl.c (init_decl_processing): Adjust handling of
11853 flag_inline_functions and flag_inline_trees to support -O3.
11854 (grokfndecl): Set DECL_INLINE on all functions if that's what
11855 the user requested.
11856 (save_function_data): Clear DECL_INLINE in
11857 current_function_cannot_inline is non-NULL.
11858 * decl2.c (flag_inline_trees): Update documentation.
11859
11860 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
11861
11862 * dump.c (cp_dump_tree, USING_STMT case): New case.
11863 * tree.c (cp_statement_code_p): Add USING_STMT.
11864 * decl2.c (do_using_directive): Add the using directive statement.
11865
11866 * tree.c (walk_tree): Reformat an if block.
11867
11868 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11869
11870 * decl.c (compute_array_index_type): Don't try to do anything with
11871 the indices when processing a template.
11872
11873 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11874
11875 * call.c: NULL_PTR -> NULL.
11876 * class.c: Likewise.
11877 * cvt.c: Likewise.
11878 * decl.c: Likewise.
11879 * decl2.c: Likewise.
11880 * except.c: Likewise.
11881 * init.c: Likewise.
11882 * rtti.c: Likewise.
11883 * search.c: Likewise.
11884 * tree.c: Likewise.
11885 * typeck.c: Likewise.
11886 * typeck2.c: Likewise.
11887
11888 2001-05-02 Mark Mitchell <mark@codesourcery.com>
11889
11890 * decl2.c (do_using_directive): Revert previous patch.
11891
11892 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11893
11894 * cp-tree.def (USING_STMT): New statement node.
11895 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
11896 * decl2.c (do_using_directive): Add USING_STMT to statement
11897 tree. Don't emit errors when processing template decl.
11898 * pt.c (tsubst_expr, USING_STMT case): New case.
11899 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
11900
11901 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11902
11903 * call.c (build_new_op): Convert args from reference here.
11904 (build_conditional_expr): Don't convert here.
11905
11906 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
11907
11908 * spew.c (last_token_id): New static variable.
11909 (read_token): Set it here.
11910 (yyerror): Use it here.
11911
11912 2001-04-30 Richard Henderson <rth@redhat.com>
11913
11914 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
11915 * decl.c: Likewise.
11916
11917 2001-04-30 Mark Mitchell <mark@codesourcery.com>
11918
11919 * gxxint.texi: Remove.
11920 * Make-lang.in: Remove all traces of gxxint.texi.
11921
11922 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
11923
11924 * decl2.c (start_static_initialization_or_destruction): Correct
11925 logic to handle the -fno-use-cxa-atexit case.
11926
11927 2001-04-30 Mark Mitchell <mark@codesourcery.com>
11928
11929 * optimize.c (update_cloned_parm): New function.
11930 (maybe_clone_body): Use it. Update the `this' parameter too.
11931
11932 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
11933
11934 * decl2.c (unsupported_options): Add new-abi.
11935 * lang-options.h: Remove no longer supported options.
11936
11937 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11938
11939 * except.c (can_convert_eh): Don't check template parms,
11940 typename types etc.
11941
11942 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11943
11944 * optimize.c (maybe_clone_body): Copy parameter names and locations.
11945
11946 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
11947
11948 * cp-tree.h (adjust_clone_args): Prototype new function.
11949 * class.c (adjust_clone_args): New function.
11950 * decl.c (start_function): Call it for in charge ctors.
11951
11952 2001-04-26 Mark Mitchell <mark@codesourcery.com>
11953
11954 * method.c (use_thunk): Make sure that thunks really are emitted
11955 when requested.
11956
11957 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
11958
11959 * mangle.c (write_chars): New macro.
11960 (hwint_to_ascii): New function
11961 (write_number): Use it.
11962 (write_integer_cst): Deal with really big numbers.
11963
11964 2001-04-25 Mark Mitchell <mark@codesourcery.com>
11965
11966 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
11967 the clone.
11968
11969 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
11970
11971 * decl.c (grokdeclarator): Set context of namespace scope
11972 TYPE_DECLS.
11973
11974 2001-04-24 Zack Weinberg <zackw@stanford.edu>
11975
11976 * cp/optimize.c: Include hashtab.h.
11977 (struct inline_data): Add tree_pruner.
11978 (expand_call_inline, expand_calls_inline): Use it when calling
11979 walk_tree.
11980 (optimize_function): Initialize and free tree_pruner.
11981
11982 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
11983
11984 Lazy __FUNCTION__ generation.
11985 * cp-tree.def (FUNCTION_NAME): Remove.
11986 * cp-tree.h (function_name_declared_p): Remove.
11987 (cp_fname_init): Prototype.
11988 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
11989 don't call declare_function_name. Call start_fname_decls.
11990 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
11991 clobber the line number.
11992 (cp_fname_init): New function.
11993 (start_function): Call start_fname_decls.
11994 (finish_function): Call finish_fname_decls.
11995 * lex.c (reswords): Add slots for __FUNCTION__ et al.
11996 (rid_to_yy): Add mappings for __FUNCTION__ et al.
11997 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
11998 * parse.y (VAR_FUNC_NAME): New token.
11999 (primary): Add VAR_FUNC_NAME.
12000 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12001 generation.
12002 (tsubst, FUNCTION_NAME case): Remove.
12003 (tsubst_copy, FUNCTION_NAME case): Remove.
12004 (tsubst_expr, DECL_STMT case): Be careful with a
12005 DECL_PRETTY_FUNCTION_P.
12006 (instantiate_decl): Remove function_name_declared_p.
12007 * semantics.c (begin_compound_statement): Don't call
12008 declare_function_name here.
12009 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12010 (finish_translation_unit): Call finish_fname_decls.
12011 (expand_body): Remove function_name_declared_p.
12012 * typeck2.c (digest_init): Allow any ERROR_MARK.
12013
12014 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
12015
12016 * pt.c (tsubst_decl): Use VOID_TYPE_P.
12017 * semantics.c: Fix some typos.
12018
12019 2001-04-23 Phil Edwards <pme@sources.redhat.com>
12020
12021 * cp/decl2.c (flag_honor_std): Always initialize to 1.
12022
12023 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12024
12025 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12026
12027 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
12028
12029 * except.c (build_throw): Wrap the initialization of the exception
12030 object in a MUST_NOT_THROW_EXPR.
12031 (do_free_exception): #if 0.
12032
12033 2001-04-20 Mark Mitchell <mark@codesourcery.com>
12034
12035 * cp-tree.h (finish_enum): Change prototype.
12036 * decl.c (finish_enum): Reorganize.
12037 * parse.y (structsp): Adjust calls to finish_enum.
12038
12039 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
12040
12041 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12042 't' case.
12043
12044 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
12045
12046 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12047 (layout_empty_base): Return at end flag.
12048 (build_base_field): Likewise.
12049 (build_base_fields): Likewise.
12050 (layout_virtual_bases): Don't add 1 to eoc value.
12051 (end_of_class): Use full size for empty bases.
12052 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12053 empty bases. Don't add 1 to eoc value. Only add trailing padding
12054 if we're an empty class with no empty bases.
12055 (dump_class_hierarchy): Dump size and alignment.
12056
12057 2001-04-20 Jakub Jelinek <jakub@redhat.com>
12058
12059 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12060 ICS_BAD_FLAG.
12061
12062 2001-04-20 Jakub Jelinek <jakub@redhat.com>
12063
12064 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12065 is found, look first if name does not match the structure name.
12066
12067 2001-04-19 Mark Mitchell <mark@codesourcery.com>
12068
12069 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12070 set.
12071 (SET_DECL_LANGUAGE): New macro.
12072 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12073 (pushdecl): Likewise.
12074 (build_library_fn_1): Likewise.
12075 (build_cp_library_fn): Likewise.
12076 (grokfndecl): Likewise.
12077 (grokvardecl): Mark `extern "C"' variables as having C linkage.
12078 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12079 * lex.c (retrofit_lang_decl): Likewise.
12080 * mangle.c (mangle_decl_string): Don't mangle the names of
12081 variables declared with C language linkage.
12082 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12083
12084 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
12085
12086 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12087 flag_access_control from uninitialized storage.
12088
12089 2001-04-15 Mark Mitchell <mark@codesourcery.com>
12090
12091 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12092 * mangle.c (write_pointer_to_member_type): Fix mangling of
12093 pointers to cv-qualified member function types.
12094
12095 * init.c (build_delete): Create a SAVE_EXPR for the address if
12096 we're going to use it more than once.
12097
12098 2001-04-13 Mark Mitchell <mark@codesourcery.com>
12099
12100 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12101 (expand_ptremfunc_cst): Change prototype.
12102 (delta2_from_ptrmemfunc): Remove.
12103 * expr.c (cplus_expand_constant): Adjust call to
12104 expand_ptrmemfunc_cst.
12105 * typeck.c (build_ptrmemfunc1): Simplify.
12106 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12107 results in a constant.
12108 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12109 (delta2_from_ptrmemfunc): Remove.
12110 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12111
12112 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
12113
12114 * cp-tree.h (decl_namespace_list): New macro.
12115 (struct saved_scope): Add decl_ns_list.
12116 * decl.c (mark_saved_scope): Mark it.
12117 * decl2.c: Lose static decl_namespace_list.
12118 (init_decl2): Don't save it.
12119
12120 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12121
12122 * cp-tree.h (warn_return_type, yylex): Delete redundant
12123 declarations.
12124
12125 * decl.c (current_class_depth, global_namespace): Likewise.
12126
12127 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12128
12129 * repo.c (flag_use_repository): Likewise.
12130
12131 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12132
12133 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12134 set_block, pushdecl, getdecls, gettags, init_decl_processing,
12135 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12136 lvalue_or_else, print_lang_statistics, comp_target_types,
12137 unsigned_type, signed_type, signed_or_unsigned_type,
12138 build_function_call, mark_addressable, incomplete_type_error):
12139 Delete redundant declarations.
12140
12141 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
12142
12143 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12144 (TYPE_ANONYMOUS_P): New macro.
12145 (TAGGED_TYPE_P): New macro.
12146 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12147 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12148 * tree.c (no_linkage_helper): Likewise.
12149 * semantics.c (begin_class_definition): Likewise.
12150 * pt.c (convert_template_argument): Likewise.
12151 * lex.c (check_for_missing_semicolon): Likewise.
12152
12153 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
12154
12155 * class.c (dfs_unshared_virtual_bases): New function.
12156 (mark_primary_bases): Call it.
12157 (check_bases): Ignore virtual bases when determining
12158 nearly-emptiness.
12159
12160 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
12161
12162 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12163
12164 2001-04-11 Mark Mitchell <mark@codesourcery.com>
12165
12166 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12167 cloned function to the clone.
12168
12169 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12170
12171 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12172
12173 * semantics.c: Include expr.h.
12174
12175 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
12176
12177 * method.c (implicitly_declare_fn): Commonize code for copy ctor
12178 and assignment op. Set TREE_USED for parameter.
12179
12180 2001-04-10 Mark Mitchell <mark@codesourcery.com>
12181
12182 * class.c (find_final_overrider_data): Add `candidates'.
12183 (dfs_find_final_overrider): Don't issue error messages
12184 prematurely.
12185 (find_final_overrider): Issue error messages here.
12186 (build_base_field): Don't warn about amgibuous direct bases here.
12187 (warn_about_ambiguous_direct_bases): New function.
12188 (layout_class_type): Use it.
12189
12190 2001-04-10 Richard Henderson <rth@redhat.com>
12191
12192 * typeck.c (build_array_ref): Push the array reference inside
12193 COMPOUND_EXPR and COND_EXPR.
12194
12195 2001-04-05 Mark Mitchell <mark@codesourcery.com>
12196
12197 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12198 * decl.c (duplicate_decls): Adjust accordingly.
12199 (maybe_commonize_var): Likewise.
12200 (grokfndecl): Likewise.
12201 (start_function): Likewise.
12202 (start_method): Likewise.
12203 * decl2.c (key_method): Likewise.
12204 (import_export_decl): Likewise.
12205 * method.c (implicitly_declare_fn): Likewise.
12206 * optimize.c (maybe_clone_body): Likewise.
12207
12208 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
12209
12210 * lang-specs.h: Add __DEPRECATED.
12211
12212 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
12213
12214 * search.c (get_dynamic_cast_base_type): When building a new
12215 constant, set its type to ssizetype.
12216
12217 2001-04-04 Jakub Jelinek <jakub@redhat.com>
12218
12219 * optimize.c (expand_call_inline): Only add newly inlined statements
12220 into inlined_stmts.
12221
12222 2001-04-03 Mark Mitchell <mark@codesourcery.com>
12223
12224 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12225 (OPERATOR_FORMAT): Likewise.
12226 (OPERATOR_TYPENAME_FORMAT): Likewise.
12227 * operators.def: Remove old name-mangling information.
12228 * decl.c (grok_op_properties): Adjust accordingly.
12229 * lex.c (init_operators): Likewise.
12230 * rtti.c (get_tinfo_decl): Issue error messages about types that
12231 have variable size.
12232
12233 2001-04-03 Mark Mitchell <mark@codesourcery.com>
12234
12235 * decl2.c (import_export_decl): Don't call import_export_class
12236 when processing an inline member function.
12237 * semantics.c (expand_body): Call import_export_decl before
12238 emitting inline functions.
12239
12240 2001-03-28 Richard Henderson <rth@redhat.com>
12241
12242 IA-64 ABI Exception Handling:
12243 * cp-tree.def (EH_SPEC_BLOCK): New.
12244 (MUST_NOT_THROW_EXPR): New.
12245 * cp-tree.h: Update changed function declarations.
12246 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
12247 (CPTI_CALL_UNEXPECTED): New.
12248 (struct cp_language_function): Rename x_eh_spec_try_block
12249 to x_eh_spec_block.
12250 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
12251 * decl.c (current_binding_level): If no current function
12252 bindings, revert to scope_chain.
12253 (initialize_predefined_identifiers): Remove __cp_push_exception.
12254 (store_parm_decls): Use begin_eh_spec_block.
12255 (finish_function): Use finish_eh_spec_block.
12256 (mark_lang_function): Update for name changes.
12257 * decl2.c (finish_file): No mark_all_runtime_matches.
12258 * dump.c (cp_dump_tree): Handle new tree codes.
12259 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
12260 * except.c (catch_language_init, catch_language): Remove.
12261 (init_exception_processing): Don't set language code.
12262 Initialize call_unexpected_node, protect_cleanup_actions,
12263 eh_personality_libfunc, lang_eh_runtime_type.
12264 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
12265 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
12266 (prepare_eh_type): Split out type canonicalizations ...
12267 (build_eh_type_type): ... from here.
12268 (build_eh_type_type_ref): Remove.
12269 (mark_all_runtime_matches): Remove.
12270 (build_exc_ptr): New.
12271 (do_begin_catch, do_end_catch): New.
12272 (do_pop_exception): Remove.
12273 (build_terminate_handler): Remove.
12274 (choose_personality_routine): Split out language choice from ...
12275 (initialize_handler_parm): ... here.
12276 Use MUST_NOT_THROW_EXPR.
12277 (expand_start_catch_block): Use do_begin_catch. Simplify Java
12278 exception object handling.
12279 (expand_start_eh_spec, expand_end_eh_spec): Remove.
12280 (expand_exception_blocks, alloc_eh_object): Remove.
12281 (begin_eh_spec_block, finish_eh_spec_block): New.
12282 (do_allocate_exception, do_free_exception): New.
12283 (expand_throw): Merge into ...
12284 (build_throw): ... here. Update for abi.
12285 * expr.c (cplus_expand_expr): No expand_internal_throw.
12286 Handle MUST_NOT_THROW_EXPR.
12287 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
12288 * semantics.c (*) Update for except.h name changes.
12289 (genrtl_try_block): No protect_with_terminate.
12290 (genrtl_eh_spec_block): New.
12291 (genrtl_handler): Don't emit the goto here.
12292 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
12293 (genrtl_finish_function): Don't expand_exception_blocks.
12294 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
12295
12296 2001-03-28 Richard Henderson <rth@redhat.com>
12297
12298 * decl.c (struct named_label_list): Rename eh_region to
12299 in_try_scope, add in_catch_scope.
12300 (struct binding_level): Rename eh_region to is_try_scope,
12301 add is_catch_scope.
12302 (note_level_for_try): Rename from note_level_for_eh.
12303 (note_level_for_catch): New.
12304 (poplevel): Copy both is_try_scope and is_catch_scope to
12305 the named_label_list struct.
12306 (check_previous_goto_1): Don't check for catch block via
12307 DECL_ARTIFICIAL; use in_try_scope instead.
12308 (check_goto): Likewise.
12309 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
12310 * except.c (expand_start_catch_block): Call note_level_for_catch.
12311 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
12312
12313 2001-03-27 Richard Henderson <rth@redhat.com>
12314
12315 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
12316 exceptions_via_longjmp.
12317
12318 2001-03-27 Phil Edwards <pme@sources.redhat.com>
12319
12320 * pt.c (check_default_tmpl_args): Make error messages clearer.
12321
12322 2001-03-26 Phil Edwards <pme@sources.redhat.com>
12323
12324 * error.c: Also undefine 'A' macro used for cp_printers definition.
12325
12326 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12327
12328 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
12329
12330 2001-03-26 Mike Yang <yang@research.att.com>
12331 Mark Mitchell <mark@codesourcery.com>
12332
12333 * dump.c (dump_access): New function.
12334 (cp_dump_tree): Use it. Dump basetype information for class
12335 types.
12336
12337 2001-03-26 Mark Mitchell <mark@codesourcery.com>
12338
12339 * Makefile.in (optimize.o): Depend on params.h.
12340 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
12341 (init_decl_processing): Set flag_no_inline when doing
12342 inlining-on-trees.
12343 * optimize.c: Include params.h.
12344 (struct inline_data): Improve documentation of FNS. Add
12345 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
12346 (INSNS_PER_STMT): New macro.
12347 (remap_block): Use CLONING_P.
12348 (inlinable_function_p): Don't inline big functions.
12349 (expand_call_inline): Keep track of how much inlining we've done.
12350 (optimize_function): Set FIRST_INLINED_FN.
12351 (maybe_clone_body): Set CLONING_P.
12352 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
12353 tree nodes.
12354 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
12355 rest_of_compilation. Clear DECL_RTL for local variables
12356 afterwards.
12357 (clear_decl_rtl): New function.
12358
12359 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
12360
12361 Implement DR 209
12362 * cp-tree.h (skip_type_access_control,
12363 reset_type_access_control): Prototype.
12364 * decl.c (grokdeclarator): Access of friends is not checked.
12365 * parse.y (component_decl_list): Reset type access control.
12366 * semantics.c (decl_type_access_control): Clear
12367 current_type_lookups.
12368 (save_type_access_control): Don't save if not deferring.
12369 (skip_type_access_control, reset_type_access_control): New
12370 functions.
12371 (begin_class_definition): Do type access control for basetypes.
12372 Start deferred access control.
12373 (finish_class_definition): Resume immediate access control if
12374 this is a local class.
12375
12376 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12377
12378 * class.c (add_method): Use memcpy/memmove, not bcopy.
12379
12380 * decl.c (duplicate_decls): Likewise.
12381
12382 2001-03-23 Jakub Jelinek <jakub@redhat.com>
12383
12384 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
12385 not `_'.
12386
12387 2001-03-23 Jakub Jelinek <jakub@redhat.com>
12388
12389 * decl.c (local_names): Define.
12390 (push_local_name): New.
12391 (grok_reference_init): Return init if initializing static reference
12392 variable with non-constant instead of emitting it.
12393 Move expand_static_init call to cp_finish_decl.
12394 (layout_var_decl): Call push_local_name.
12395 (maybe_commonize_var): Allow inlining functions even if they have
12396 static local variables, use comdat_linkage for them if flag_weak.
12397 (check_initializer): Call obscure_complex_init if
12398 grok_reference_init returned nonzero.
12399 (save_function_data): Clear x_local_names.
12400 (pop_cp_function_context): Free x_local_names.
12401 (mark_inlined_fns): Remove.
12402 (mark_lang_function): Mark x_local_names.
12403 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
12404 Mark inlined_fns as tree, remove call to mark_inlined_fns.
12405 * class.c (alter_access): Ensure DECL_ACCESS is never set if
12406 DECL_DISCRIMINATOR_P.
12407 * cp-tree.h (cp_language_function): Add x_local_names.
12408 (lang_decl_flags): Add discriminator into u2.
12409 (lang_decl_inlined_fns): Remove.
12410 (lang_decl): inlined_fns is now a TREE_VEC.
12411 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
12412 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
12413 TREE_VEC, not a custom structure.
12414 (optimize_function): Likewise.
12415 * mangle.c (discriminator_for_local_entity): Discriminate among
12416 VAR_DECL local entities.
12417 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
12418 is not valid.
12419
12420 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
12421
12422 Add support for Java interface method calls.
12423 * cp-tree.h (struct lang_type): Add java_interface flag.
12424 (TYPE_JAVA_INTERFACE): New macro.
12425 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
12426 by setting TYPE_JAVA_INTERFACE.
12427 * call.c (java_iface_lookup_fn): New static.
12428 (build_over_call): If calling a method declared in a
12429 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
12430 expression which resolves the function address.
12431 (build_java_interface_fn_ref): New function.
12432
12433 2001-03-22 Richard Henderson <rth@redhat.com>
12434
12435 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
12436 * except.c: Don't include it.
12437
12438 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12439 based on an idea from Joe Buck <jbuck@synopsys.com>
12440
12441 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
12442 New nonterminals.
12443 (data_def, component_decl): Add reductions to bad_decl.
12444
12445 2001-03-22 Jakub Jelinek <jakub@redhat.com>
12446
12447 * method.c (do_build_assign_ref): Don't use build_modify_expr for
12448 anonymous aggregates, since they don't have assignment operator
12449 method.
12450 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
12451 assignment operators for anonymous structure fields.
12452
12453 2001-03-21 Jason Merrill <jason@redhat.com>
12454
12455 * pt.c (instantiate_decl): Abort if we see a member constant
12456 instantiation that doesn't already have its initializer.
12457 Downgrade explicit instantiation without definition to pedwarn.
12458
12459 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
12460 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
12461 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
12462
12463 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
12464 (pending_vtables): Remove.
12465 * decl2.c (pending_vtables): Remove.
12466 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
12467 CLASSTYPE_VTABLE_NEEDS_WRITING.
12468 (import_export_class): Likewise.
12469 (init_decl2): Don't mark pending_vtables.
12470 * lex.c (handle_pragma_vtable): Just sorry.
12471 * pt.c (instantiate_class_template): Don't mess with
12472 CLASSTYPE_VTABLE_NEEDS_WRITING.
12473 (mark_class_instantiated): Likewise.
12474 * ptree.c (print_lang_type): Don't print it.
12475 * semantics.c (begin_class_definition): Don't set it.
12476
12477 * pt.c (template_tail): Replace with last_pending_template.
12478 (maybe_templates, maybe_template_tail): Remove.
12479 (add_pending_template): Adjust.
12480 (instantiate_pending_templates): Adjust.
12481
12482 * cp-tree.h (struct saved_scope): Remove lang_stack field.
12483 (current_lang_stack): Remove.
12484 * decl.c (maybe_push_to_top_level): Don't initialize it.
12485 (duplicate_decls): Use current_lang_depth.
12486 (xref_basetypes): Likewise.
12487 * class.c (current_lang_depth): New fn.
12488 (push_lang_context): Use more varray functionality.
12489 (pop_lang_context): Likewise.
12490
12491 * error.c (GLOBAL_THING): Always use '__'.
12492
12493 2001-03-21 Mark Mitchell <mark@codesourcery.com>
12494
12495 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
12496
12497 * mangle.c (mangle_decl_string): Mangle the names of overloaded
12498 operators, even when they have `extern "C"' linkage.
12499
12500 2001-03-19 Mark Mitchell <mark@codesourcery.com>
12501
12502 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
12503 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12504 where it's not necessary.
12505 (add_method): Remove optimization involving comparison of
12506 DECL_ASSEMBLER_NAME.
12507 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
12508 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12509 where it's not necessary.
12510 (check_methods): Likewise.
12511 (build_clone): Likewise.
12512 (built_vtt): Likewise.
12513 * cp-tree.h (DECL_NEEDED_P): Likewise.
12514 * decl.c (pushtag): Likewise.
12515 (duplicate_decls): Likewise.
12516 (pushdecl): Likewise.
12517 (builtin_function): Likewise.
12518 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
12519 (build_cp_library_fn): Likewise.
12520 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
12521 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12522 where it's not necessary.
12523 (make_rtl_for_nonlocal_decl): Likewise.
12524 (cp_finish_decl): Likewise.
12525 (grokfndecl): Likewise.
12526 (grokvardecl): Likewise.
12527 (grokdeclarator): Likewise.
12528 (start_function): Likewise.
12529 (cp_missing_return_ok_p): Likewise.
12530 * decl2.c (grokclassfn): Likewise.
12531 (check_classfn): Likewise.
12532 (finish_static_data_member_decl): Likewise.
12533 (grokfield): Likewise.
12534 * error.c (GLOBAL_IORD_P): Remove.
12535 (dump_global_iord): Improve output.
12536 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
12537 * except.c (nothrow_libfn_p): Summarily reject any function not in
12538 namespace-scope.
12539 * init.c (build_java_class_ref): Don't explicitly set
12540 DECL_ASSEMBLER_NAME after calling mangle_decl.
12541 * mangle.c (mangle_decl_string): Handle extern "C" functions.
12542 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
12543 * method.c (set_mangled_name_for_decl): Don't explicitly set
12544 DECL_ASSEMBLER_NAME after calling mangle_decl.
12545 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
12546 IDENTIFIER_GLOBAL_VALUE for the thunk.
12547 * pt.c (set_mangled_name_for_template_decl): Remove.
12548 (check_explicit_specialization): Don't use it.
12549 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
12550 (tsubst_friend_function): Likewise.
12551 (tsubst_decl): Likewise.
12552 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
12553 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
12554 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
12555 where it's not necessary.
12556 (tinfo_base_init): Likewise.
12557 (create_real_tinfo_var): Likewise.
12558 * search.c (looup_field_1): Likewise.
12559 * semantics.c (finish_named_return_value): Likewise.
12560 * tree.c (init_tree): Set lang_set_decl_assembler_name.
12561
12562 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
12563
12564 Correct semantics restrictions checking in throw-expression.
12565 * except.c (is_admissible_throw_operand): New function.
12566 (build_throw): Use it.
12567
12568 2001-03-14 Mark Mitchell <mark@codesourcery.com>
12569
12570 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
12571 and its ilk.
12572
12573 2001-03-14 Mark Mitchell <mark@codesourcery.com>
12574
12575 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12576 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
12577 * decl.c (duplicate_decls): Likewise.
12578 (builtin_function): Likewise.
12579 (build_library_fn): Likewise.
12580 (build_cp_library_fn): Likewise.
12581 (check_initializer): Likewise.
12582 (cp_finish_decl): Likewise.
12583 * decl2.c (grokfield): Likewise.
12584 (grok_function_init): Remove #if 0'd code.
12585 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12586 * friend.c (do_friend): Likewise.
12587 * init.c (get_temp_regvar): Likewise.
12588 * method.c (make_thunk): Likewise.
12589 * pt.c (tsubst_friend_function): Likewise.
12590 (tsubst_decl): Likewise.
12591 (regenerate_decl_from_template): Likewise.
12592 * semantics.c (genrtl_named_return_value): Likewise.
12593 (expand_body): Likewise.
12594 (genrtl_finish_function): Likewise.
12595 * tree.c (cp_tree_equal): Likewise.
12596
12597 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
12598
12599 * call.c (convert_like_real): Add extra semantics to INNER
12600 parameter. Don't convert to temporary if a user conversion
12601 gives us an lvalue that we're about to bind to a reference.
12602 Set INNER to indicate pending reference binding on recursive
12603 calls.
12604
12605 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
12606
12607 * cp/lex.c: Delete duplicate pending_lang_change.
12608
12609 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
12610
12611 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
12612 Similarly.
12613 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
12614 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
12615
12616 2001-03-09 Zack Weinberg <zackw@stanford.edu>
12617
12618 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
12619
12620 2001-03-08 Stan Shebs <shebs@apple.com>
12621
12622 * cp-tree.h (set_identifier_local_value): Remove unused decl.
12623
12624 2001-03-06 Zack Weinberg <zackw@stanford.edu>
12625
12626 * spew.c: Remove references to CPP_OSTRING.
12627
12628 2001-03-06 Andrew Haley <aph@redhat.com>
12629
12630 * typeck.c (convert_arguments): Check that we have an fndecl.
12631
12632 2001-03-05 Andrew Haley <aph@redhat.com>
12633
12634 * typeck.c (convert_arguments): Don't do ellipsis conversion for
12635 __built_in_constant_p.
12636
12637 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12638
12639 * typeck.c (build_static_cast): Allow enum to enum conversions
12640 as per DR 128.
12641
12642 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12643
12644 * class.c (check_field_decls): Pointers to member do not a
12645 non-pod struct make, as per DR 148.
12646
12647 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
12648
12649 * call.c (joust): cp_pedwarn when using gnu extension concerning
12650 worst conversion sequences.
12651
12652 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12653
12654 * decl.c: Replace all uses of 'boolean' with 'bool'.
12655
12656 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12657
12658 * lang-specs.h: Add zero initializer for cpp_spec field to
12659 all array elements that need one. Don't put an #ifdef inside
12660 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
12661 use it.
12662
12663 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12664
12665 Implement using decls inside template functions.
12666 * decl2.c (validate_nonmember_using_decl): Don't special case
12667 fake_std_node in the global namespace. Don't reject early when
12668 processing a template.
12669 (do_local_using_decl): Add to statement tree. Don't do further
12670 processing when building a template.
12671 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
12672
12673 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
12674
12675 * decl2.c (do_nonmember_using_decl): Don't complain if we find
12676 same function. Do complain about ambiguating extern "C"
12677 declarations.
12678
12679 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
12680
12681 Remove floating point and complex type template constant parms.
12682 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
12683 COMPLEX_TYPE extensions.
12684 (invalid_nontype_parm_type_p): Likewise.
12685
12686 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
12687
12688 * except.c (call_eh_info): Revert "match_function"'s type.
12689
12690 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
12691
12692 Fix ctor vtable vcall offsets.
12693 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
12694 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
12695 (get_matching_base): Remove.
12696 (get_original_base): New function.
12697 (build_vtbl_initializer): Initialize vid.rtti_binfo.
12698 Use a virtual thunk for a ctor vtable with an index
12699 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
12700 primary base within a constructor vtable. Only set
12701 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
12702 when primary base has been lost.
12703 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
12704
12705 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
12706
12707 * call.c (joust): Ensure more_specialized()'s argument length
12708 parameter has correct value for constructors.
12709
12710 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
12711
12712 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
12713
12714 * decl.c (mark_inlined_fns): Prototype.
12715
12716 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12717
12718 * spew.c (yylex): Correct handling of friends.
12719
12720 2001-02-22 Mark Mitchell <mark@codesourcery.com>
12721
12722 * mangle.c (write_encoding): Pass write_function_type the
12723 FUNCTION_DECL for the function being encoded.
12724 (write_function_type): Pass it along to write_bare_function_type.
12725 (write_bare_function_type): Pass it along to write_method_parms.
12726 (write_method_parms): Don't mangle the compiler-generated
12727 parameters to a constructor or destructor.
12728
12729 2001-02-22 Andreas Jaeger <aj@suse.de>
12730
12731 * optimize.c: Include toplev.h for
12732 note_deferral_of_defined_inline_function prototype.
12733
12734 2001-02-22 Jakub Jelinek <jakub@redhat.com>
12735
12736 * cp-tree.h (struct lang_decl_inlined_fns): New.
12737 (struct lang_decls): Add inlined_fns.
12738 (DECL_INLINED_FNS): New macro.
12739 * optimize.c (struct inline_data): Add inlined_fns.
12740 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
12741 (inlinable_function_p): Likewise, fix typo in comment,
12742 function is not inlinable if it already inlined function currently
12743 being optimized.
12744 (expand_call_inline): Add fn to inlined_fns if necessary.
12745 (optimize_function): Initialize inlined_fns.
12746 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
12747 * decl.c (mark_inlined_fns): New function.
12748 (lang_mark_tree): Call it.
12749
12750 2001-02-21 Jason Merrill <jason@redhat.com>
12751
12752 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
12753 (DECL_UNINLINABLE): Move to middle-end.
12754
12755 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
12756 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
12757 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
12758 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
12759 parms and outer BLOCK. note_deferral_of_defined_inline_function.
12760
12761 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
12762 second parm of op=.
12763
12764 2001-02-19 Mark Mitchell <mark@codesourcery.com>
12765
12766 * decl2.c (set_decl_namespace): Allow explicit instantiations in
12767 any namespace.
12768
12769 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12770
12771 * optimize.c (expand_call_inline): Don't walk subtrees of type
12772 nodes.
12773
12774 2001-02-18 Mark Mitchell <mark@codesourcery.com>
12775
12776 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
12777 for a destructor.
12778
12779 2001-02-18 Jason Merrill <jason@redhat.com>
12780
12781 Do put the VTT parameter in DECL_ARGUMENTS.
12782 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
12783 (current_vtt_parm): New macro.
12784 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
12785 (DECL_HAS_VTT_PARM_P): New macro.
12786 (DECL_VTT_PARM): Remove.
12787 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
12788 * decl.c (duplicate_decls): Only copy the operator code if
12789 appropriate.
12790 (start_function): Set current_vtt_parm.
12791 (lang_mark_tree): Don't mark vtt_parm.
12792 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
12793 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
12794 * class.c (build_clone): Maybe remove the VTT parm.
12795 * optimize.c (maybe_clone_body): Set up the VTT parm.
12796 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
12797 * call.c (build_over_call): Just allow the VTT arg.
12798 * method.c (make_thunk): Don't set DECL_VTT_PARM.
12799 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
12800 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
12801 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
12802 * error.c (dump_function_decl): Likewise.
12803 * call.c (build_user_type_conversion_1, convert_like_real): Abort
12804 if we try to call a constructor with in-charge or VTT parms.
12805 * method.c (skip_artificial_parms_for): New fn.
12806 * call.c (add_function_candidate, build_over_call): Call it.
12807 * call.c (build_new_method_call): Use current_vtt_parm.
12808 * init.c (expand_virtual_init): Likewise.
12809 * class.c (same_signature_p): No longer static.
12810 * cp-tree.h: Declare it.
12811 * search.c (look_for_overrides_r): Use it.
12812
12813 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12814
12815 * cp-tree.h (new_abi_rtti_p): Remove.
12816 (name_mangling_version): Likewise.
12817 (flag_do_squangling): Likewise.
12818 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
12819 * decl.c (grokfndecl): Likewise.
12820 * decl2.c (name_mangling_version): Remove.
12821 (flag_do_squangling): Likewise.
12822 (lang_f_options): Remove `squangle'.
12823 (unsupported_options): Add `squangle'.
12824 (cxx_decode_option): Issue a warning about uses of
12825 -fname-mangling-version.
12826 (finish_file): Remove old ABI support.
12827 * pt.c (check_explicit_specialization): Likewise.
12828 (tsubst_decl): Likewise.
12829 * rtti.c (init_rtti_processing): Likewise.
12830 (build_headof): Likewise.
12831 (get_tinfo_decl_dynamic): Likewise.
12832 (tinfo_from_decl): Likewise.
12833 (build_dynamic_cast_1): Likewise.
12834 (synthesize_tinfo_var): Likewise.
12835 * init.c (build_new): Allow enumeration types for the array-bounds
12836 in a direct-new-declarator.
12837
12838 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
12839
12840 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
12841 TREE_PROTECTED from the template being specialized.
12842
12843 2001-02-17 Jason Merrill <jason@redhat.com>
12844
12845 * decl2.c (build_artificial_parm): Set TREE_READONLY.
12846
12847 * decl.c (bad_specifiers): Allow throw specs on things with
12848 pointer-to-function or -member-function type.
12849 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
12850 a pmf.
12851
12852 2001-02-17 Mark Mitchell <mark@codesourcery.com>
12853
12854 * call.c (check_dtor_name): Handle template names correctly.
12855
12856 2001-02-16 Jason Merrill <jason@redhat.com>
12857
12858 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
12859 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
12860 * optimize.c (maybe_clone_body): Don't substitute it.
12861 * call.c (build_new_method_call): Check in_chrg instead.
12862 * init.c (expand_virtual_init): Likewise.
12863
12864 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
12865
12866 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
12867 class-type introduces at least a type-name.
12868
12869 2001-02-16 Jakub Jelinek <jakub@redhat.com>
12870
12871 * call.c (convert_like_real): Create a temporary for non-lvalue.
12872
12873 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
12874
12875 * cp-tree.h: Fix typos in comments.
12876
12877 2001-02-16 Jason Merrill <jason@redhat.com>
12878
12879 * optimize.c (remap_block): If we're compiling a clone, pass the
12880 new block to insert_block.
12881
12882 2001-02-16 Mark Mitchell <mark@codesourcery.com>
12883
12884 * semantics.c (finish_asm_stmt): Robustify.
12885
12886 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12887
12888 * pt.c (push_template_decl_real): Don't remangle the name of a
12889 class template.
12890
12891 2001-02-15 Jim Meyering <meyering@lucent.com>
12892
12893 * Make-lang.in (c++.install-common): Depend on installdirs.
12894 (c++.install-info): Likewise.
12895 (c++.install-man): Likewise.
12896
12897 2001-02-15 Mark Mitchell <mark@codesourcery.com>
12898
12899 * typeck2.c (build_m_component_ref): Robustify.
12900
12901 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
12902
12903 * friend.c (do_friend): Don't take the nested [template] class
12904 into account when deciding whether to warn about the friend
12905 function not referring to a template function.
12906
12907 2001-02-14 Jakub Jelinek <jakub@redhat.com>
12908
12909 * typeck.c (build_unary_op): Clarify error message.
12910
12911 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
12912
12913 * parse.y (component_constructor_declarator): allow optional
12914 parentheses around constructor class name.
12915
12916 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12917
12918 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
12919 section.
12920 * init.c (emit_base_init): Remove incorrect comment about
12921 virtual bases.
12922 * method.c (make_thunk): Fix comment alignment.
12923
12924 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12925
12926 Kill remnants of this is variable.
12927 * cp-tree.h (flag_this_is_variable): Remove.
12928 * decl2.c (flag_this_is_variable): Remove.
12929 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
12930 (build_vbase_path): The path is non-static, even in a cdtor.
12931 (resolves_to_fixed_type_p): Add additional return value.
12932 * search.c (init_vbase_pointers): Adjust.
12933 * tree.c (lvalue_p_1): Adjust.
12934 * typeck.c (mark_addressable): Adjust.
12935
12936 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12937
12938 * pt.c (unify): Don't check cv quals of array types.
12939
12940 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
12941
12942 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
12943 check whether we already have the type.
12944
12945 2001-02-13 Mark Mitchell <mark@codesourcery.com>
12946
12947 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
12948 * call.c (build_op_delete_call): Simplify to remove duplicate
12949 code.
12950 * class.c (clone_function_decl): Don't build the deleting variant
12951 of a non-virtual destructor.
12952 * decl.c (finish_destructor_body): Don't call delete if this is a
12953 non-virtual destructor.
12954 * init.c (build_delete): Explicitly call `operator delete' when
12955 deleting an object with a non-virtual destructor.
12956
12957 2001-02-13 Jason Merrill <jason@redhat.com>
12958
12959 * lang-specs.h: Add more __EXCEPTIONS.
12960
12961 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12962
12963 * typeck2.c (process_init_constructor): Check
12964 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
12965
12966 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12967
12968 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
12969 Remove spurious information in comment. Allow further
12970 adjustments of REFERENCE_TYPE args.
12971
12972 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
12973
12974 * errfn.c (cp_deprecated): Tweak diagnostic text.
12975 * parse.y (new_initializer): Deprecate initializer lists
12976 extension.
12977
12978 2001-02-12 Mark Mitchell <mark@codesourcery.com>
12979
12980 Remove old ABI support.
12981
12982 2001-02-11 Mark Mitchell <mark@codesourcery.com>
12983
12984 * decl2.c (flag_vtable_thunks): Always set it to 1.
12985 (flag_new_abi): Likewise.
12986 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
12987
12988 * Makefile.in (g++spec.o): Fix typo.
12989
12990 2001-02-09 Jason Merrill <jason@redhat.com>
12991
12992 * lang-specs.h: Restore definition of __EXCEPTIONS.
12993
12994 2001-02-08 Jason Merrill <jason@redhat.com>
12995
12996 * search.c (shared_member_p): New function.
12997 (lookup_field_r): Use it.
12998 * cp-tree.h (SHARED_MEMBER_P): Remove.
12999
13000 * method.c (process_overload_item): Handle template-dependent array
13001 bounds.
13002 * pt.c (type_unification_real): If we end up with undeduced nontype
13003 parms, try again.
13004
13005 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13006 types.
13007
13008 * typeck2.c (friendly_abort): Don't say anything if we have
13009 earlier errors or sorries.
13010
13011 * decl.c (check_tag_decl): Notice attempts to redefine bool and
13012 wchar_t. Ignore if in_system_header.
13013
13014 * decl.c (maybe_push_cleanup_level): New fn...
13015 (start_decl_1): ...split out from here.
13016 * cvt.c (build_up_reference): Use it.
13017 * cp-tree.h: Declare it.
13018
13019 2001-02-07 Mark Mitchell <mark@codesourcery.com>
13020
13021 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13022 spec.
13023
13024 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
13025
13026 * pt.c (lookup_template_class): Make sure it's a primary
13027 template or template_template_parm when called from the parser.
13028 (instantiate_template_class): Add assertion.
13029
13030 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
13031
13032 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13033 from error_mark_node.
13034
13035 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
13036
13037 Fix specification and implementation bugs in V3 ABI
13038 construction vtables.
13039 * cp-tree.h (flag_dump_class_layout): New flag.
13040 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13041 (BINFO_LOST_PRIMARY_P): New flag.
13042 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13043 (BINFO_PRIMARY_MARKED_P): Rename to ...
13044 (BINFO_PRIMARY_P): ... here.
13045 (binfo_via_virtual): New prototype.
13046 * decl2.c (flag_dump_class_layout): New flag.
13047 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13048 use `=' as a file name separator.
13049 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13050 bases.
13051 (build_vtbl_address): If this is a virtual primary base, then
13052 get the vtbl of what it is ultimately primary for.
13053 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13054 for BINFO_PRIMARY_P.
13055 (dfs_skip_nonprimary_vbases_markedp): Likewise.
13056 (get_shared_vbase_if_not_primary): Likewise.
13057 (dfs_get_pure_virtuals): Likewise.
13058 (expand_upcast_fixups): Likewise.
13059 (fixup_virtual_upcast_offsets): Likewise.
13060 (dfs_find_vbase_instance): Likewise.
13061 (find_vbase_instance): Likewise.
13062 (binfo_from_vbase): Adjust comment to reflect reality.
13063 (binfo_via_virtual): New function.
13064 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13065 for binfo walking during VTT construction.
13066 (dfs_mark_primary_bases): Remove.
13067 (force_canonical_binfo_r): New function.
13068 (force_canonical_binfo): New function.
13069 (mark_primary_virtual_base): New function.
13070 (mark_primary_bases): Walk in inheritance graph order, use
13071 mark_primary_virtual_base.
13072 (determine_primary_base): Use some more intermediate variables.
13073 (dfs_find_final_overrider): Don't check for overriding along a
13074 virtual path.
13075 (dfs_modify_vtables): Walk into primary virtual bases too.
13076 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13077 (build_base_fields): Likewise.
13078 (dfs_set_offset_for_unshared_vbases): Likewise.
13079 (layout_virtual_bases): Likewise.
13080 (end_of_class): Likewise.
13081 (finish_struct_1): Call dump_class_hierarchy, if requested.
13082 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13083 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13084 (dump_class_hierarchy): Add file parameter. Append to file, if
13085 required.
13086 (finish_vtbls): Adjust accumulate_vtbl_inits call.
13087 Use canonical base for virtual bases.
13088 (build_vtt): Add more comments. Adjust build_vtt_inits call.
13089 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13090 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13091 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13092 virtual VTTs.
13093 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13094 from DATA. We want virtual primary bases and all bases via virtual.
13095 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13096 virtual base when not a construction vtable.
13097 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13098 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13099 Use canonical bases when processing virtual bases.
13100 (accumulate_vtbl_inits): We're interested in any base via a
13101 virtual path.
13102 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13103 within a construction vtable, determine what is being overridden.
13104 (build_vtbl_initializer): Add more comments
13105 (add_vcall_offset_vtbl_entries_1): Adjust comment.
13106 (build_rtti_vtbl_entries): Check if the base has lost its
13107 primary.
13108
13109 2001-02-05 Mark Mitchell <mark@codesourcery.com>
13110
13111 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13112
13113 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13114
13115 * decl.c (pushdecl): Call abort instead of fatal.
13116 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13117 * init.c (build_new_1): Likewise.
13118 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13119 * decl.c (build_typename_type): hash_table_init now returns void.
13120 decl.c (init_decl_processing): Make an error non-fatal.
13121
13122 2001-02-04 Mark Mitchell <mark@codesourcery.com>
13123
13124 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13125 Document.
13126 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13127 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13128 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13129 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13130 * decl.c (maybe_commonize_var): Use the new name-mangling where
13131 appropriate.
13132 * decl2.c (comdat_linkage): Enhance comments. Make all
13133 compiler-generated things static, if COMDAT is not available.
13134 (get_tinfo_decl): Do not make typeinfo objects that belong in the
13135 library COMDAT.
13136 (tinfo_base_init): Use the correct mangled name for typeinfo
13137 strings, and push them into the global scope.
13138 (typeinfo_in_lib_p): New function.
13139 (synthesize_tinfo_var): Use it.
13140 (create_real_tinfo_var): Likewise.
13141
13142 2001-02-03 Jakub Jelinek <jakub@redhat.com>
13143
13144 * decl.c (push_class_binding): Use context_for_name_lookup instead
13145 of CP_DECL_CONTEXT.
13146 * search.c (context_for_name_lookup): Remove static. Check for NULL
13147 context in the loop.
13148 * cp-tree.h (context_for_name_lookup): Add prototype.
13149
13150 2001-02-02 Jakub Jelinek <jakub@redhat.com>
13151
13152 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13153 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13154 Remove.
13155 * call.c (convert_class_to_reference, build_user_type_conversion_1,
13156 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13157
13158 2001-02-02 Mark Mitchell <mark@codesourcery.com>
13159
13160 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13161 of macros used when compiling g++spec.c.
13162 * g++spec.c (lang_specific_driver): Link with the shared
13163 libgcc by default.
13164
13165 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
13166
13167 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13168 make_reference_declarator, make_call_declarator), method.c
13169 (implicitly_declare_fn), parse.y (namespace_using_decl,
13170 notype_unqualified_id, expr_or_declarator, new_type_id,
13171 after_type_declarator, direct_after_type_declarator,
13172 notype_declarator, complex_notype_declarator,
13173 complex_direct_notype_declarator, qualified_id,
13174 notype_qualified_id, overqualified_id, direct_new_declarator,
13175 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13176 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13177 instead of build_parse_node.
13178
13179 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13180
13181 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13182 (minus_one_node): Moved to top level gcc directory. Renamed
13183 to integer_minus_one_node.
13184
13185 * init.c (init_init_processing): Don't set minus_one_node.
13186 (build_vec_init): Use integer_minus_one_node.
13187
13188 * rtti.c (get_tinfo_decl_dynamic): Likewise.
13189
13190 2001-01-28 Jakub Jelinek <jakub@redhat.com>
13191
13192 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13193 identical and they would be replaced with constant, remove
13194 MODIFY_EXPR from the tree.
13195
13196 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13197
13198 * Make-lang.in: Remove all dependencies on defaults.h.
13199 * call.c: Don't include defaults.h.
13200 * decl.c: Likewise.
13201 * decl2.c: Likewise.
13202 * except.c: Likewise.
13203 * pt.c: Likewise.
13204 * rtti.c: Likewise.
13205 * tree.c: Likewise.
13206 * typeck.c: Likewise.
13207
13208 2001-01-25 Jakub Jelinek <jakub@redhat.com>
13209
13210 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13211 operators even in "C" linkage.
13212 * method.c (set_mangled_name_for_decl): Likewise.
13213 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13214 overloaded operators in "C" linkage.
13215
13216 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
13217
13218 * pt.c (tsubst_decl): Remove IN_DECL parameter.
13219 (tsubst_arg_types): Check parameter is not void.
13220 (tsubst): Adjust tsubst_decl call.
13221
13222 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
13223
13224 * call.c (add_builtin_candidate): Quote std properly, from
13225 previous change.
13226
13227 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13228
13229 * pt.c (check_explicit_specialization): Clone constructors and
13230 destructors.
13231
13232 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
13233
13234 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
13235 indicates anything special about template depth. Make sure we
13236 only count the user visible template classes.
13237
13238 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
13239
13240 * call.c (build_conv): Typo in comment.
13241 (add_builtin_candidate): Add more explanation.
13242 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
13243 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
13244 when we have enumeral types.
13245 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
13246 candidates for relops and eqops.
13247 (joust): Simplify control flow. Allow a non-template user
13248 function to hide a builtin.
13249
13250 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
13251
13252 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
13253 (more_specialized): Add deduction parameter.
13254 * call.c (joust): Adjust more_specialized call.
13255 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
13256 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
13257 (get_bindings_order): Remove.
13258 (get_bindings_real): Add DEDUCE parameter.
13259 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
13260 REFERENCE_TYPE jig for DEDUCE_ORDER.
13261 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
13262 maybe_adjust_types_for_deduction.
13263 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
13264 directly.
13265 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
13266 (check_cv_quals_for_unify): Use new unify qualifier flags.
13267 (unify): Clear new unify qualifier flags.
13268 (get_bindings_real): Add DEDUCE parameter.
13269 (get_bindings): Adjust call to get_bindings_real.
13270 (get_bindings_overload): Likewise.
13271 (most_specialized_instantiation): Adjust call to
13272 more_specialized.
13273
13274 2001-01-19 Jason Merrill <jason@redhat.com>
13275
13276 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
13277
13278 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
13279 -fnew-abi.
13280
13281 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
13282
13283 * decl2.c (arg_assoc_class): Fix double iteration logic.
13284
13285 2001-01-19 Jason Merrill <jason@redhat.com>
13286
13287 * init.c (build_delete): Always call convert_force to strip cv-quals.
13288
13289 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
13290 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
13291 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
13292
13293 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13294
13295 * search.c (get_vbase_1): Count only virtual bases.
13296
13297 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13298
13299 * class.c (duplicate_tag_error): Robustify flag clearing.
13300
13301 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13302
13303 * cp-tree.h (lookup_template_class): Add complain parm.
13304 * decl.c (lookup_namespace_name): Adjust call to
13305 lookup_template_class.
13306 (make_typename_type): Likewise.
13307 * semantics.c (finish_template_type): Likewise.
13308 * pt.c (lookup_template_class): Add complain parm. Adjust.
13309 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
13310 (tsubst): Likewise.
13311
13312 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
13313
13314 * pt.c (copy_default_args_to_explicit_spec): Preserve
13315 object's CV quals. Reorganize.
13316
13317 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13318
13319 * typeck.c (build_modify_expr): Say `initialization' for
13320 INIT_EXPRs.
13321 * init.c (build_default_init): Convert to enumeral type, if
13322 needed.
13323
13324 2001-01-18 Jakub Jelinek <jakub@redhat.com>
13325
13326 * parse.y (nomods_initdcl0): Properly set things up for
13327 initdcl0_innards.
13328
13329 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13330
13331 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
13332 (type_unification_real): Set it.
13333 (unify): Use it.
13334
13335 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13336
13337 * decl.c (finish_destructor_body): Convert to vbase pointer here.
13338
13339 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13340
13341 * semantics.c (begin_class_definition): Check we're not inside a
13342 template parm list.
13343
13344 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
13345
13346 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
13347 BASELINK_P.
13348
13349 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13350
13351 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
13352 * call.c (build_over_call): Add comment.
13353
13354 2001-01-16 Daniel Berlin <dberlin@redhat.com>
13355
13356 * cvt.c (ocp_convert): Handle vector type conversion
13357 * typeck2.c (digest_init): Handle vector type initializations
13358
13359 2001-01-16 Phil Edwards <pme@sources.redhat.com>
13360
13361 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
13362 was given.
13363
13364 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
13365
13366 * pt.c (check_nontype_parm): Rename to ...
13367 (invalid_nontype_parm_type_p): ... here.
13368 (process_template_parm): Adjust.
13369 (convert_template_argument): Adjust.
13370
13371 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
13372
13373 * pt.c (check_nontype_parm): New function.
13374 (process_template_parm): Use it.
13375 (convert_template_argument): Use it.
13376 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
13377 member.
13378
13379 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
13380
13381 * tree.c: Add defaults.h
13382 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
13383 * Make-lang.in (cp/tree.o): Add defaults.h.
13384
13385 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13386
13387 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
13388
13389 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13390
13391 * g++.1: Change to be ".so man1/gcc.1".
13392
13393 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
13394
13395 * Make-lang.in (c++.info, c++.install-info): Build and install g++
13396 internals info.
13397 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
13398 ($(srcdir)/cp/g++int.info): New target.
13399 * gxxint.texi: Add info directory entry. Use @@ in email address.
13400 * .cvsignore: Update.
13401
13402 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
13403
13404 * typeck.c (build_c_cast): Do template processing earlier.
13405 Always pedwarn on array casts.
13406
13407 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
13408
13409 * friend.c (make_friend_class): Make sure a templated class is
13410 actually a template.
13411
13412 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13413
13414 * decl2.c (get_guard): Set linkage from guarded decl.
13415
13416 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13417
13418 * call.c (convert_default_arg): Check for unprocessed
13419 DEFAULT_ARG.
13420 * cp-tree.h (replace_defarg): Move to spew.c.
13421 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
13422 spew.c, which is where they really are.
13423 (done_pending_defargs): Declare.
13424 (unprocessed_defarg_fn): Declare.
13425 * decl.c (replace_defarg): Move to spew.c
13426 * parse.y (structsp): Call done_pending_defargs.
13427 * spew.c (defarg_fns): Rearrange list structure.
13428 (defarg_fnsdone): New static variable.
13429 (defarg_depfns): New static variable.
13430 (init_spew): Adjust.
13431 (add_defarg_fn): Store the type in TREE_TYPE.
13432 (do_pending_defargs): Detect and deal with ordering constraints
13433 and circularity.
13434 (done_pending_defargs): New function.
13435 (unprocessed_defarg_fn): New function.
13436 (replace_defarg): Moved from decl.c. Robustify. Don't save
13437 if circularity detected.
13438
13439 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13440
13441 * pt.c (unify): Check array has a domain, before checking
13442 whether it is variable sized.
13443
13444 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13445
13446 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
13447 parameters with pointers to arrays of unknown bound.
13448
13449 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
13450
13451 * parse.y (template_parm_header, template_spec_header): New
13452 reductions. Split out from ...
13453 (template_header): ... here. Use them.
13454 (template_template_parm): Use template_parm_header.
13455 * semantics.c (finish_template_template_parm): Add assert.
13456
13457 2001-01-10 Mark Mitchell <mark@codesourcery.com>
13458
13459 * mangle.c (write_builtin_type): Fix thinko.
13460
13461 * pt.c (copy_default_args_to_explicit_spec_1): New function.
13462 (copy_default_args_to_explicit_spec): Likewise.
13463 (check_explicit_specialization): Use it.
13464
13465 * class.c (finish_struct_1): Remove last argument in call to
13466 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
13467 * decl.c (builtin_function): Likewise.
13468 (build_cp_library_fn): Likewise.
13469 (check_initializer): Likewise.
13470 (make_rtl_for_nonlocal_decl): Likewise.
13471 (cp_finish_decl): Likewise.
13472 (start_function): Likewise.
13473 * decl2.c (finish_anon_union): Likewise.
13474 * friend.c (do_friend): Likewise.
13475 * init.c (build_java_class_ref): Likewise.
13476 * method.c (make_thunk): Likewise.
13477 * pt.c (tsubst_friend_function): Likewise.
13478 * semantics.c (expand_body): Likewise.
13479
13480 2001-01-10 Mark Mitchell <mark@codesourcery.com>
13481
13482 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
13483 looking at DECL_CLONED_FUNCTION for non-functions.
13484
13485 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13486
13487 * error.c (dump_template_parameter): Use parm to determine how
13488 to print default value.
13489
13490 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13491
13492 * class.c (duplicate_tag_error): Clear more flags.
13493
13494 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
13495
13496 * call.c (build_new_method_call): Use binfo_for_vbase.
13497
13498 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
13499
13500 * cp-tree.h (flag_cond_mismatch): Don't declare.
13501 * decl2.c (flag_cond_mismatch): Don't define.
13502 (lang_f_options): Remove cond-mismatch.
13503 (unsupported_options): Add cond-mismatch.
13504
13505 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
13506
13507 * class.c (handle_using_decl): Reject using of constructor name
13508 of sourcing class. Allow injecting of a method with same name as
13509 nested class. Fixup error messages.
13510
13511 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
13512
13513 * decl2.c (lang_decode_option): Handle -Wformat=2.
13514
13515 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13516
13517 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
13518 initialized_in_class.
13519 (DECL_DEFINED_IN_CLASS_P): Rename to ...
13520 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
13521 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
13522 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
13523 * pt.c (check_default_tmpl_args): Adjust for
13524 DECL_INITIALIZED_IN_CLASS_P.
13525 (instantiate_class_template): Likewise.
13526 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
13527
13528 * class.c (finish_struct): Constify saved_filename.
13529
13530 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13531
13532 * class.c (duplicate_tag_error): Adjust diagnostic.
13533 (finish_struct): Locally set location to start of struct.
13534 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
13535
13536 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
13537
13538 * decl.c (struct binding_level): Adjust class_shadowed comments
13539 to reflect reality.
13540 (push_class_level_binding): Adjust comments to reflect reality.
13541 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
13542 Don't set TREE_VALUE on the class_shadowed list.
13543
13544 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13545
13546 * decl2.c (acceptable_java_type): Allow references too.
13547 * init.c (build_java_class_ref): When using the new ABI, search
13548 `class$' and have it mangled with `mangle_decl.'
13549 * mangle.c (write_java_integer_type_codes): New function.
13550 (write_builtin_type): Detect and mangle Java integer and real
13551 types.
13552
13553 2001-01-07 Mark Mitchell <mark@codesourcery.com>
13554
13555 * decl2.c (grokfield): Don't accept `asm' specifiers for
13556 non-static data members.
13557
13558 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13559
13560 * expr.c (cplus_expand_expr): Don't reset `target'.
13561
13562 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
13563
13564 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
13565
13566 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
13567
13568 * parse.y (template_datadef): Check for error_mark_node.
13569
13570 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
13571
13572 * cp-tree.def (DEFAULT_ARG): Make `x' class.
13573
13574 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
13575
13576 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
13577 (record_builtin_type): Make non-static.
13578 (flag_short_double): Don't declare.
13579 (init_decl_processing): Remove the creation of many tree nodes now
13580 in c_common_nodes_and_builtins.
13581 (build_void_list_node): New function.
13582 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
13583 * cp-tree.h (flag_short_wchar): Don't declare.
13584
13585 2001-01-04 Mark Mitchell <mark@codesourcery.com>
13586
13587 * call.c (build_conv): Don't use build1 for USER_CONV.
13588 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
13589
13590 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
13591
13592 * lex.c (lang_init): Call c_common_lang_init.
13593
13594 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
13595
13596 * search.c (lookup_fnfields_here): Remove.
13597 (look_for_overrides_r): Use lookup_fnfields_1.
13598 Ignore functions from using declarations.
13599
13600 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
13601
13602 Implement exceptions specifiers for implicit member functions.
13603 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
13604 * method.c (synthesize_exception_spec): New function.
13605 (locate_dtor, locate_ctor, locate_copy): New functions.
13606 (implicitly_declare_fn): Generate the exception spec too.
13607 * search.c (check_final_overrider): Check artificial functions
13608 too.
13609 * typeck2.c (merge_exception_specifiers): New function.
13610
13611 2001-01-03 Jason Merrill <jason@redhat.com>
13612
13613 * init.c (build_default_init): New fn.
13614 (perform_member_init): Split out from here.
13615 (build_new_1): Use it. Simplify initialization logic.
13616 (build_vec_init): Take an array, rather than a pointer and maxindex.
13617 Speed up simple initializations. Don't clean up if we're assigning.
13618 * cp-tree.h: Adjust.
13619 * decl2.c (do_static_initialization): Remove TREE_VEC case.
13620 * parse.y (new_initializer): Return void_zero_node for ().
13621 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
13622 * typeck2.c (digest_init): Only complain about user-written
13623 CONSTRUCTORs.
13624
13625 2000-12-22 Mike Stump <mrs@wrs.com>
13626
13627 * decl2.c: (max_tinst_depth): Increase to 50.
13628
13629 2001-01-02 Mark Mitchell <mark@codesourcery.com>
13630
13631 * class.c (invalidate_class_lookup_cache): Zero the
13632 previous_class_values.
13633 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
13634 TREE_INT_CST_HIGH.
13635 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
13636 * decl.c (free_bindings): New variable.
13637 (push_binding): Don't create a new binding if we have one on the
13638 free list.
13639 (pop_binding): Put old bindings on the free list.
13640 (init_decl_processing): Use size_int, not build_int_2.
13641 Register free_bindings as a GC root.
13642 (cp_make_fname_decl): Use size_int, not build_int_2.
13643 (push_inline_template_parms_recursive): Likewise.
13644 (end_template_parm_list): Likewise.
13645 (for_each_template_parm): Do not use walk_tree_without_duplicates.
13646 (tsubst_template_parms): Use size_int, not build_int_2.
13647 (tsubst): Likewise.
13648 * rtti.c (get_vmi_pseudo_type_info): Likewise.
13649
13650 2001-01-02 Richard Henderson <rth@redhat.com>
13651
13652 * parse.y (asm): Set ASM_INPUT_P.
13653
13654 2001-01-02 Jason Merrill <jason@redhat.com>
13655
13656 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
13657 for v3 ABI.
13658
13659 * typeck.c (cp_truthvalue_conversion): New fn.
13660 * cvt.c (ocp_convert): Use it.
13661
13662 * cp-tree.h: Lose c-common.c decls.
13663
13664 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
13665 * cvt.c (convert_to_void): Use type_unknown_p.
13666
13667 * typeck.c (strip_all_pointer_quals): Also strip quals from
13668 pointer-to-member types.
13669
13670 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
13671 parse.y as C.
13672
13673 * call.c (build_new_method_call): Do evaluate the object parameter
13674 when accessing a static member.
13675 * typeck.c (build_component_ref): Likewise.
13676
13677 2001-01-02 Andreas Jaeger <aj@suse.de>
13678
13679 * decl.c (cp_missing_noreturn_ok_p): New.
13680 (init_decl_processing): Set lang_missing_noreturn_ok_p.
13681
13682 2000-12-29 Jakub Jelinek <jakub@redhat.com>
13683
13684 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
13685
13686 2000-12-29 Mark Mitchell <mark@codesourcery.com>
13687
13688 * class.c (pushclass): Remove #if 0'd code.
13689 * cp-tree.h (overload_template_name): Remove.
13690 * decl.c (store_bindings): Simplify.
13691 (pop_from_top_level): Likewise.
13692 * pt.c (overload_template_name): Remove.
13693 (instantiate_decl): Don't call push_to_top_level if it's not
13694 needed.
13695
13696 2000-12-28 Mark Mitchell <mark@codesourcery.com>
13697
13698 * pt.c (register_local_specialization): Don't return a value.
13699 (lookup_template_class): Use move-to-front heuristic when looking
13700 up template instantiations.
13701 (instantiate_decl): Only push_to_top_level when we're actually
13702 going to instantiate the template.
13703
13704 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
13705
13706 * search.c (binfo_for_vtable): Return least derived class, not
13707 most. Handle secondary vtables.
13708
13709 2000-12-22 Jason Merrill <jason@redhat.com>
13710
13711 * pt.c (more_specialized): Don't optimize len==0.
13712 (fn_type_unification): If we're adding the return type, increase len.
13713
13714 * typeck.c (build_binary_op): Fix pmf comparison logic.
13715
13716 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
13717 DECL_STATIC_FUNCTION_P.
13718
13719 * semantics.c (genrtl_finish_function): Don't try to jump to
13720 return_label unless it exists.
13721
13722 In partial ordering for a call, ignore parms for which we don't have
13723 a real argument.
13724 * call.c (joust): Pass len to more_specialized.
13725 (add_template_candidate_real): Strip 'this', pass len.
13726 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
13727 (get_bindings_order): New fn. Pass len down.
13728 (get_bindings_real): Strip 'this', pass len.
13729 (fn_type_unification): Likewise.
13730 (type_unification_real): Succeed after checking 'len' args.
13731 (most_specialized_instantiation): Lose explicit_args parm.
13732 * class.c (resolve_address_of_overloaded_function): Strip 'this',
13733 pass len.
13734
13735 2000-12-21 Jason Merrill <jason@redhat.com>
13736
13737 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
13738 DECL_TEMPLATE_RESULT.
13739
13740 * search.c (lookup_field_r): Call lookup_fnfields_1, not
13741 lookup_fnfields_here.
13742
13743 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
13744
13745 * call.c (build_object_call): Also allow conversions that return
13746 reference to pointer to function.
13747 (add_conv_candidate): Handle totype being ref to ptr to fn.
13748 (build_field_call): Also allow members of type reference to function.
13749 Lose support for calling pointer to METHOD_TYPE fields.
13750
13751 * error.c (dump_expr): Handle *_CAST_EXPR.
13752
13753 * typeck2.c (build_scoped_ref): Always convert to the naming class.
13754
13755 * tree.c (break_out_cleanups): Lose.
13756 * cp-tree.h: Remove prototype.
13757 * typeck.c (build_component_ref): Don't break_out_cleanups.
13758 (build_compound_expr): Likewise.
13759 * semantics.c (finish_expr_stmt): Likewise.
13760
13761 2000-12-20 Richard Henderson <rth@redhat.com>
13762
13763 * cp-tree.h: Update declarations.
13764 * decl.c (finish_case_label): Return the new stmt node.
13765 * semantics.c (finish_goto_stmt): Likewise.
13766 (finish_expr_stmt, finish_return_stmt): Likewise.
13767 (finish_break_stmt, finish_continue_stmt): Likewise.
13768 (finish_asm_stmt): Likewise.
13769 * parse.y (already_scoped_stmt): Set STMT_LINENO.
13770 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
13771 (simple_if, simple_stmt): Return the new stmt node.
13772 (save_lineno): New.
13773
13774 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
13775
13776 * cp-tree.h: Don't declare warn_long_long.
13777
13778 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13779
13780 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
13781 IS_AGGR_TYPE.
13782
13783 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13784
13785 * pt.c (unify): Handle when both ARG and PARM are
13786 BOUND_TEMPLATE_TEMPLATE_PARM.
13787
13788 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13789
13790 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
13791 DECL_TEMPLATE_PARM_P.
13792
13793 2000-12-15 Jason Merrill <jason@redhat.com>
13794
13795 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
13796
13797 * init.c (build_new_1): Don't strip quals from type.
13798
13799 * decl.c (pushdecl): Don't check for linkage on a non-decl.
13800
13801 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
13802
13803 * call.c (build_new_function_call): Lose space before paren in
13804 error message.
13805 (build_new_method_call): Likewise.
13806
13807 * typeck2.c (build_m_component_ref): Propagate quals from datum.
13808
13809 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13810
13811 * pt.c (check_explicit_specialization): Propagate default
13812 function arguments to explicit specializations.
13813
13814 2000-12-13 DJ Delorie <dj@redhat.com>
13815
13816 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
13817 and <? operators.
13818
13819 2000-12-08 Jason Merrill <jason@redhat.com>
13820
13821 * error.c (dump_function_name): Don't let the user see __comp_ctor.
13822
13823 Clean up copy-initialization in overloading code.
13824 * call.c (build_user_type_conversion_1): Die if we are asked to
13825 convert to the same or a base type.
13826 (implicit_conversion): Avoid doing so. Lose reference binding code.
13827 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
13828 direct-initialization. Also do direct-init part of copy-init.
13829 (build_user_type_conversion): Don't provide context to convert_like.
13830 * cvt.c (ocp_convert): build_user_type_conversion will now provide
13831 the constructor call for copy-init.
13832
13833 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
13834 instantiation of a member template.
13835 (do_decl_instantiation): Not here.
13836
13837 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13838
13839 * class.c (check_field_decls): Don't special case anonymous
13840 fields in error messages.
13841 (note_name_declared_in_class): Use %D on diagnostic.
13842
13843 * tree.c (pod_type_p): Use strip_array_types.
13844 (cp_valid_lang_attribute): Likewise.
13845 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
13846 multiple evaluations.
13847 (cp_has_mutable_p): Use strip_array_types.
13848
13849 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
13850
13851 * cp-tree.h (sufficient_parms_p): Declare new function.
13852 * call.c (sufficient_parms_p): New function, broken out of ...
13853 (add_function_candidate): ... here. Use it.
13854 (add_conv_candidate): Use it.
13855 * decl.c (grok_ctor_properties): Use it.
13856
13857 2000-12-07 Jakub Jelinek <jakub@redhat.com>
13858
13859 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
13860
13861 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
13862
13863 * decl2.c (lang_decode_option): Handle -Wformat-security.
13864
13865 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13866
13867 * pt.c (verify_class_unification): New function.
13868 (get_class_bindings): Use it.
13869 (try_class_unification): Tidy.
13870 (unify): Handle when argument of a template-id is not
13871 template parameter dependent.
13872 (template_args_equal): Handle when TREE_CODE's do not match.
13873
13874 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
13875
13876 * lang-specs.h (c++): When invoking the stand-alone preprocessor
13877 for -save-temps, pass all relevant -Defines to it, and then don't
13878 pass them to cc1plus.
13879
13880 2000-12-05 Will Cohen <wcohen@redhat.com>
13881
13882 * decl.c (finish_case_label): Cleared
13883 more_cleanups_ok in surrounding function scopes.
13884 (define_label): Likewise.
13885
13886 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13887
13888 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
13889 (get_matching_virtual): Remove.
13890 (look_for_overrides): Declare new function.
13891 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
13892 DECL_VINDEX here.
13893 * class.c (check_for_override): Move base class iteration code
13894 to look_for_overrides.
13895 * search.c (next_baselink): Remove.
13896 (get_virtuals_named_this): Remove.
13897 (get_virtual_destructor): Remove.
13898 (tree_has_any_destructors_p): Remove.
13899 (struct gvnt_info): Remove.
13900 (check_final_overrider): Remove `virtual' from error messages.
13901 (get_matching_virtuals): Remove. Move functionality to ...
13902 (look_for_overrides): ... here, and ...
13903 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
13904 to be overriding.
13905
13906 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
13907
13908 * typeck.c (get_delta_difference): If via a virtual base,
13909 return zero.
13910 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
13911 adjustment.
13912
13913 2000-12-04 Richard Henderson <rth@redhat.com>
13914
13915 * error.c (dump_tree): Use output_add_string not OB_PUTS.
13916
13917 2000-12-04 Jason Merrill <jason@redhat.com>
13918
13919 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
13920 (write_builtin_type): Pass intSI_type_node and the like through
13921 type_for_mode.
13922 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
13923 Pass intSI_type_node and the like through type_for_mode.
13924 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
13925 * pt.c (tsubst, unify): Likewise.
13926 * tree.c (walk_tree): Likewise.
13927 * error.c (dump_type): Likewise.
13928 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
13929
13930 * Make-lang.in: Tweak top comment for emacs.
13931 (cp/TAGS): Restore.
13932
13933 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
13934
13935 * class.c (clone_function_decl): Robustify.
13936
13937 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
13938
13939 * decl.c (store_bindings): Only search in the non modified
13940 old_bindings for duplicates.
13941
13942 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
13943
13944 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
13945 TYPE_POLYMORPHIC_P.
13946
13947 * typeck.c (build_static_cast): Remove unused variable.
13948
13949 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13950
13951 * pt.c: Fix typo in comment.
13952
13953 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
13954
13955 * decl2.c (warn_format): Remove definition.
13956 (lang_decode_option): Handle -Wformat-nonliteral,
13957 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
13958
13959 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
13960
13961 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
13962 (init_decl_processing): Don't create string_type_node,
13963 const_string_type_node, wint_type_node, intmax_type_node,
13964 uintmax_type_node, default_function_type, ptrdiff_type_node and
13965 unsigned_ptrdiff_type_node. Adjust position of call to
13966 c_common_nodes_and_builtins.
13967 (identifier_global_value): New function.
13968
13969 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
13970
13971 * call.c (standard_conversion): Reject pointer to member
13972 conversions from ambiguous, inaccessible or virtual bases.
13973 * typeck.c (build_static_cast): Don't check pointers to members
13974 specially.
13975
13976 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13977
13978 * method.c (do_build_copy_constructor): Preserve cv
13979 qualifications when accessing source object members.
13980 (do_build_assign_ref): Likewise. Remove separate diagnostics for
13981 unnamed fields.
13982
13983 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13984
13985 * method.c (do_build_assign_ref): Construct appropriately
13986 CV-qualified base reference. Don't allow const casts in base
13987 conversion.
13988
13989 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
13990
13991 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
13992 incomplete return type.
13993
13994 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
13995
13996 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
13997 * semantics.c (finish_base_specifier): Accept a _TYPE not a
13998 _DECL.
13999
14000 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14001
14002 * spew.c (yyerror): Cope if yylval.ttype is NULL.
14003
14004 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14005
14006 * decl.c (grokdeclarator): Diagnose undefined template contexts.
14007
14008 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14009
14010 * decl.c (grokdeclarator): Do type access control on friend
14011 class.
14012
14013 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
14014
14015 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14016 bison parser ickiness.
14017 * pt.c (tsubst_friend_function): Enter namespace scope when
14018 tsubsting the function name.
14019 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14020
14021 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
14022
14023 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14024 * cvt.c (cp_convert_to_pointer): Add force parameter.
14025 Allow conversions via virtual base if forced.
14026 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14027 (ocp_convert): Likewise.
14028 * search.c (binfo_from_vbase): Return the virtual base's binfo.
14029 * typeck.c (get_delta_difference): Adjust handling of virtual
14030 bases.
14031
14032 2000-11-26 Mark Mitchell <mark@codesourcery.com>
14033
14034 * tree.c (struct list_hash): Remove.
14035 (list_hash_table): Make it be an htab.
14036 (struct list_proxy): New type.
14037 (list_hash_eq): New function.
14038 (list_hash_pieces): Renamed from ...
14039 (list_hash): ... this.
14040 (list_hash_lookup): Remove.
14041 (list_hash_add): Remove.
14042 (hash_tree_cons): Use the generic hashtable.
14043 (mark_list_hash): Remove.
14044 (init_tree): Create the hashtable.
14045
14046 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
14047
14048 * method.c (build_mangled_C9x_name): Rename to
14049 build_mangled_C99_name. Change C9X references in comments to
14050 refer to C99.
14051
14052 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
14053
14054 * parse.y (unary_expr): Move VA_ARG from here ...
14055 (primary): ... to here.
14056
14057 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
14058
14059 * semantics.c (finish_id_expr): If type is error_mark, return
14060 error_mark.
14061
14062 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
14063
14064 * pt.c (lookup_template_class): Simplify loop exit constructs.
14065 Cope when there is no partial instantiation of a template
14066 template member.
14067
14068 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
14069
14070 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14071
14072 2000-11-22 Mark Mitchell <mark@codesourcery.com>
14073
14074 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14075 prefix.
14076
14077 * pt.c (do_decl_instantiate): Explicitly clone constructors and
14078 destructors that haven't already been cloned.
14079
14080 2000-11-20 Richard Henderson <rth@redhat.com>
14081
14082 * parse.y (yyparse_1): Rename the parser entry point.
14083
14084 2000-11-20 Alex Samuel <samuel@codesourcery.com>
14085
14086 * mangle.c (write_name): Use <unscoped-name> for names directly in
14087 function scope.
14088 (write_unscoped_name): Accept names directly in function scope.
14089
14090 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
14091
14092 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14093 * parse.y (extdef): Add EXPORT reduction.
14094 * spew.c (yylex): Don't skip export here.
14095
14096 2000-11-19 Mark Mitchell <mark@codesourcery.com>
14097
14098 * decl.c (init_decl_processing): Correct name of pure virtual
14099 function under the new ABI.
14100 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14101 (throw_bad_typeid): Likewise for bad typeid function.
14102
14103 2000-11-18 Mark Mitchell <mark@codesourcery.com>
14104
14105 * decl.c (grokparms): Don't even function types of `void' type,
14106 either.
14107 * mangle.c (write_type): Don't crash when confronted with the
14108 error_mark_node.
14109
14110 * decl.c (grokparms): Don't create parameters of `void' type.
14111
14112 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
14113
14114 * lex.c (mark_impl_file_chain): Delete.
14115 (init_parse): Remove call to ggc_add_string_root. No need to
14116 ggc_strdup a string constant. Do not add impl_file_chain to GC
14117 roots.
14118 (handle_pragma_implementation): No need to ggc_strdup main_filename.
14119
14120 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14121
14122 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14123
14124 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14125
14126 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14127 * decl.c (grokdeclarator): Don't reject void parms here.
14128 (require_complete_types_for_parms): Simplify, use
14129 complete_type_or_else.
14130 (grokparms): Remove bitrot. Remove funcdef parm.
14131 Deal with ellipsis parm lists here.
14132 * semantics.c (finish_parmlist): Don't append void_list_node
14133 here. Set PARMLIST_ELLIPSIS_P.
14134
14135 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
14136
14137 * typeck2.c (incomplete_type_error): Reorganize to avoid
14138 excessive diagnostics.
14139
14140 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
14141
14142 * lex.c (struct impl_files, internal_filename): Constify a char *.
14143
14144 2000-11-16 Mark Mitchell <mark@codesourcery.com>
14145
14146 * mangle.c (write_special_name_constructor): Don't generate
14147 assembler junk when confronted with an old-style constructor.
14148 (write_special_name_destructor): Likewise.
14149 (mangle_decl_string): Do it here instead.
14150
14151 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
14152
14153 * call.c (op_error): Make error messages clearer.
14154
14155 2000-11-15 Mark Mitchell <mark@codesourcery.com>
14156
14157 * decl.c (wrapup_globals_for_namespace): Don't mark things
14158 TREE_ASM_WRITTEN when they're not.
14159
14160 2000-11-15 Jason Merrill <jason@redhat.com>
14161
14162 * typeck2.c (friendly_abort): Uncount the error before handing
14163 off to fancy_abort.
14164
14165 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
14166
14167 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14168
14169 2000-11-14 Mark Mitchell <mark@codesourcery.com>
14170
14171 * class.c (build_vtbl_initializer): Fix typo in comment.
14172 * typeck.c (expr_sizeof): Don't crash on errors.
14173
14174 2000-11-14 Jim Wilson <wilson@redhat.com>
14175
14176 * lang-specs.h: Add %2 after %(cc1_options).
14177
14178 2000-11-14 Richard Henderson <rth@redhat.com>
14179
14180 * typeck.c (c_sizeof): Be strict about casting result value
14181 back to c_size_type_node.
14182 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14183
14184 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
14185
14186 * typeck.c (build_unary_op): Use boolean_increment from
14187 c-common.c, moving the relevant code there.
14188
14189 2000-11-11 Jason Merrill <jason@redhat.com>
14190
14191 * typeck.c (mark_addressable): Don't call put_var_into_stack.
14192
14193 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14194 in inlines.
14195
14196 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14197
14198 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14199 * lex.c (copy_lang_decl): Likewise.
14200
14201 2000-11-09 Mark Mitchell <mark@codesourcery.com>
14202
14203 * dump.c (cp_dump_tree): Don't dump function bodies here.
14204
14205 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14206 (dump.o): Update dependency list.
14207 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14208 (flag_dump_translation_unit): Likewise.
14209 (CP_TYPE_QUALS): Adjust definition.
14210 (DECL_C_BIT_FIELD): Remove.
14211 (SET_DECL_C_BIT_FIELD): Likewise.
14212 (CLEAR_DECL_C_BIT_FIELD): Likewise.
14213 (add_maybe_template): Likewise.
14214 (strip_array_types): Likewise.
14215 (dump_node_to_file): Likewise.
14216 (cp_dump_tree): New function.
14217 * decl.c (init_decl_processing): Set lang_dump_tree.
14218 * decl2.c (flag_dump_translation_unit): Remove.
14219 * dump.c: Move most of it to ../c-dump.c.
14220 (cp_dump_tree): New function.
14221 * pt.c (add_maybe_template): Remove.
14222 * typeck.c (strip_array_types): Likewise.
14223
14224 2000-11-07 Eric Christopher <echristo@redhat.com>
14225
14226 * decl.c (init_decl_processing): Change definition of
14227 __wchar_t to wchar_t. Remove artificial declaration of
14228 wchar_t.
14229 * lex.c: Change instances of __wchar_t to wchar_t.
14230
14231 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
14232
14233 * lex.c (do_identifier): Don't lookup_name for operators.
14234 * parse.y (operator): Save looking_for_typename.
14235 (unoperator): Restore it.
14236 * spew.c (frob_opname): Use nth_token for lookahead.
14237
14238 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
14239
14240 * decl.c (grok_op_properties): Always use coerce_new_type and
14241 coerce_delete_type.
14242 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
14243 exception specification. Tidy up.
14244 (coerce_delete_type): Preserve exception specification. Tidy up.
14245
14246 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
14247
14248 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
14249 (push_binding_level), error.c (cp_tree_printer), pt.c
14250 (process_partial_specialization, tsubst_template_arg_vector),
14251 search.c (lookup_member): Use memset () instead of bzero ().
14252
14253 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
14254
14255 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
14256
14257 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
14258
14259 * Make-lang.in (c++.distdir): Remove.
14260
14261 2000-11-04 Mark Mitchell <mark@codesourcery.com>
14262
14263 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
14264 declarations from different namespaces to be combined.
14265
14266 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
14267
14268 * decl.c: Include tm_p.h.
14269
14270 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
14271
14272 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
14273
14274 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
14275
14276 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
14277 (build_overload_value), repo.c (open_repo_file), xref.c
14278 (open_xref_file): Use strchr () and strrchr () instead of index ()
14279 and rindex ().
14280
14281 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
14282
14283 * call.c (build_over_call): Call fold on the CALL_EXPR.
14284
14285 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
14286
14287 * error.c (dump_template_decl): Separate template hearders with
14288 space not comma.
14289
14290 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
14291
14292 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
14293 TS_* flags with corresponding TFF_*. Adjust prototypes of
14294 functions (which used to take a tree_string_flags) to take an int.
14295
14296 * cp-tree.h (enum tree_string_flags): Remove
14297 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
14298 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
14299 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14300 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14301 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
14302 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
14303 (type_as_string, decl_as_string, expr_as_string,
14304 context_as_string): Adjust prototype.
14305
14306 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
14307 instead of TS_PLAIN.
14308
14309 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
14310 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
14311 plain `0'.
14312
14313 2000-10-30 Mark Mitchell <mark@codesourcery.com>
14314
14315 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
14316 (linkage_kind): New enumeration.
14317 (decl_linkage): New function.
14318 * decl2.c (comdat_linkage): Extend comment.
14319 * error.c (dump_function_decl): Print the arguments used to
14320 instantiate a template, even when not printing the type of the
14321 function.
14322 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
14323 not TREE_PUBLIC, to test for external linkage.
14324 * tree.c (decl_linkage): New function.
14325
14326 2000-10-28 Mark Mitchell <mark@codesourcery.com>
14327
14328 * pt.c (instantiate_decl): Always instantiate static data members
14329 initialized in-class.
14330
14331 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
14332
14333 * Make-lang.in: Move all build rules here from Makefile.in,
14334 adapt to new context. Wrap all rules that change the current
14335 directory in parentheses. Expunge all references to $(P).
14336 When one command depends on another and they're run all at
14337 once, use && to separate them, not ;. Add OUTPUT_OPTION to
14338 all object-file generation rules. Delete obsolete variables.
14339
14340 * Makefile.in: Delete.
14341 * config-lang.in: Delete outputs= line.
14342
14343 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
14344
14345 * error.c (dump_function_decl): Print no space between
14346 `ptr-operator' the `type-specifier' of the return type.
14347 (dump_type_prefix): Make sure we put space at the appropriate
14348 place.
14349
14350 2000-10-23 Jason Merrill <jason@redhat.com>
14351
14352 * call.c (equal_functions): Also call decls_match for extern "C" fns.
14353
14354 2000-10-22 Jason Merrill <jason@redhat.com>
14355
14356 * call.c (build_conditional_expr): Use ocp_convert to force
14357 rvalue conversion.
14358
14359 2000-10-22 Mark Mitchell <mark@codesourcery.com>
14360
14361 * call.c (standard_conversion): Use RVALUE_CONVs for all
14362 expressions that satisfy lvalue_p, not just those that satisfy
14363 real_lvalue_p.
14364
14365 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
14366
14367 * typeck.c (c_sizeof): Return an expression of `size_t' type,
14368 not one with TYPE_IS_SIZETYPE set.
14369 (dubious_conversion_warnings): Remove special-case code.
14370
14371 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
14372
14373 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
14374 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
14375 (dump_type_prefix): Print vector-of-int as 'int vector'.
14376 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
14377 * tree.c (walk_tree): Handle VECTOR_TYPE.
14378
14379 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
14380
14381 2000-10-21 Jason Merrill <jason@redhat.com>
14382
14383 * parse.y (operator): Set got_object from got_scope.
14384 Set looking_for_typename.
14385 * decl.c (lookup_name_real): Clear val after setting from_obj.
14386 Reorganize diagnostic.
14387
14388 2000-10-20 Jason Merrill <jason@redhat.com>
14389
14390 * tree.c (walk_tree): Don't walk into default args.
14391
14392 * error.c (dump_expr): Use host_integerp.
14393
14394 2000-10-20 David Edelsohn <edelsohn@gnu.org>
14395
14396 * typeck2.c (abstract_virtuals_error): Use "because" instead of
14397 "since" in error message.
14398
14399 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14400
14401 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
14402
14403 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
14404
14405 * decl.c (revert_static_member_fn): Fixed typo.
14406
14407 2000-10-19 Mark Mitchell <mark@codesourcery.com>
14408
14409 * class.c (subobject_offset_fn): New type.
14410 (dfs_record_base_offsets): Remove.
14411 (record_base_offsets): Likewise.
14412 (dfs_search_base_offsets): Likewise.
14413 (record_subobject_offset): New function.
14414 (check_subobject_offset): Likewise.
14415 (walk_subobject_offsets): Likewise.
14416 (record_subobject_offsets): Likewise.
14417 (layout_conflict_p): Reimplement.
14418 (layout_nonempty_base_or_field): Correct handling of type
14419 conflicts during layout.
14420 (layout_empty_base): Likewise.
14421 (build_base_field): Adjust to handle new representation of empty
14422 base offset table.
14423 (build_base_fields): Likewise.
14424 (layout_virtual_bases): Likewise.
14425 (splay_tree_compare_integer_csts): New function.
14426 (layout_class_type): Use a splay_tree, rather than a varray, to
14427 represent the offsets of empty bases.
14428
14429 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
14430 * decl.c (select_decl): Don't return declarations that are
14431 DECL_ANTICIPATED.
14432
14433 2000-10-18 Mark Mitchell <mark@codesourcery.com>
14434
14435 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
14436 (fake_std_node): New macro.
14437 * decl.c (in_std): Rename to ...
14438 (in_fake_std): ... this.
14439 (flag_no_builtin): Remove.
14440 (flag_no_nonansi_builtin): Likewise.
14441 (walk_namespaces_r): Use fake_std_node.
14442 (push_namespace): Use std_identifier.
14443 (pop_namespace): Use in_fake_std.
14444 (lookup_name_real): Use fake_std_node.
14445 (init_decl_processing): When -fhonor-std, create the `std'
14446 namespace. Don't create a dummy fake_std_node in that case.
14447 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
14448 (builtin_function): Put builtins whose names don't begin
14449 with `_' in the std namespace.
14450 * decl2.c (flag_no_builtin): Remove.
14451 (flag_no_nonansi_builtin): Likewise.
14452 (set_decl_namespace): Use fake_std_node.
14453 (validate_nonmember_using_decl): Likewise.
14454 (do_using_directive): Likewise.
14455 (handle_class_head): Likewise.
14456 * dump.c (dequeue_and_dump): Likewise.
14457 * except.c (init_exception_processing): Use std_identifier.
14458 * init.c (build_member_call): Use fake_std_node.
14459 * rtti.c (init_rtti_processing): Use std_identifier.
14460
14461 2000-10-17 Mark Mitchell <mark@codesourcery.com>
14462
14463 * cp-tree.h (back_end_hook): Remove declaration.
14464 * decl2.c (back_end_hook): Remove definition.
14465
14466 * dump.c (dequeue_and_dump): Dump TREE_USED.
14467
14468 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
14469
14470 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
14471
14472 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
14473
14474 * decl.c (WINT_TYPE): Define.
14475 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
14476 c_size_type_node, signed_size_type_node and wint_type_node.
14477
14478 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
14479
14480 * decl2.c (warn_missing_format_attribute): New variable.
14481 (lang_decode_option): Decode -Wmissing-format-attribute.
14482
14483 2000-10-16 Mark Mitchell <mark@codesourcery.com>
14484
14485 * typeck.c (qualify_type): Remove.
14486 (composite_pointer_type): Fix handling of conversions to `cv void*'.
14487
14488 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14489
14490 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
14491
14492 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14493
14494 * Makefile.in (parse.c, parse.h): Create atomically.
14495
14496 2000-10-12 Mark Mitchell <mark@codesourcery.com>
14497
14498 * class.c (current_obstack): Remove.
14499 * decl.c (ggc_p): Remove.
14500 (start_decl): Don't use decl_tree_cons.
14501 (grokdeclarator): Don't use build_decl_list.
14502 (start_function): Don't use decl_tree_cons.
14503 (finish_function): Don't mess with obstacks.
14504 * decl2.c (grok_x_components): Don't use build_decl_list.
14505 * lex.c (make_call_declarator): Don't call decl_tree_cons.
14506 (implicitly_declare_fn): Don't call build_decl_list.
14507 * parse.y (frob_specs): Don't call build_decl_list or
14508 decl_tree_cons.
14509 (expr_or_declarator_intern): Don't call decl_tree_cons.
14510 (primary): Don't call build_decl_list.
14511 (fcast_or_absdcl): Likewise.
14512 (typed_declspecs): Don't call decl_tree_cons.
14513 (reserved_declspecs): Don't call build_decl_list.
14514 (declmods): Likewise.
14515 (reserved_typespecquals): Likewise.
14516 (aggr): Likewise.
14517 (new_type_id): Likewise.
14518 (cv_qualifiers): Likewise.
14519 (after_type_declarator_intern): Likewise.
14520 (notype_declarator_intern): Likewise.
14521 (absdcl_intern): Likewise.
14522 (named_parm): Likewise.
14523 * pt.c (most_specialized_class): Likewise.
14524 * repo.c (temporary_obstack): Make it a structure, not a pointer.
14525 (init_repo): Initialize it.
14526 * search.c (current_obstack): Remove.
14527 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
14528
14529 2000-10-09 Richard Henderson <rth@cygnus.com>
14530
14531 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
14532 (c++ language support bits for libgcc): Remove.
14533 (c++.clean): Remove cplib2.txt cleanup.
14534 * config-lang.in (headers, lib2funcs): Remove.
14535
14536 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
14537 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
14538 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
14539 * inc/new.h, inc/typeinfo: Remove files.
14540
14541 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
14542
14543 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
14544 defined.
14545 (init_decl_processing): Initialize intmax_type_node and
14546 uintmax_type_node.
14547
14548 2000-10-06 Richard Henderson <rth@cygnus.com>
14549
14550 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
14551 (original_result_rtx): Remove.
14552 * decl.c (save_function_data): Don't clear x_result_rtx.
14553 (mark_lang_function): Don't mark it either.
14554 * expr.c (fixup_result_decl): Remove.
14555 * semantics.c (genrtl_named_return_value): Frob the return decl
14556 before calling emit_local_var.
14557 (genrtl_finish_function): Don't call fixup_result_decl.
14558 Always emit the jump to return_label.
14559
14560 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
14561
14562 * pt.c (lookup_template_class): Set current access for enum.
14563 (tsubst_enum): Set file & line for enum decl.
14564
14565 * spew.c (yylex): Remove unused variable.
14566
14567 2000-10-05 Richard Henderson <rth@cygnus.com>
14568
14569 * semantics.c (genrtl_finish_function): Don't init or check
14570 can_reach_end; remove noreturn and return value checks.
14571
14572 2000-10-05 Tom Tromey <tromey@cygnus.com>
14573
14574 * init.c (build_java_class_ref): Use `build_static_name' with a
14575 suffix, not a prefix, to build the class object's name.
14576
14577 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14578
14579 * cp-tree.h (access_kind): Fix comment typo.
14580 * decl2.c (grokfield): Fix diagnostic typo.
14581 * semantics.c (finish_template_type): Fix comment typo.
14582 (finish_qualified_object_call_expr): Likewise.
14583
14584 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14585
14586 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
14587 tsubsting fails.
14588
14589 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
14590
14591 * spew.c (frob_id): New static function.
14592 (frob_opname): Use it.
14593 (yylex): Use it.
14594
14595 2000-10-01 Mark Mitchell <mark@codesourcery.com>
14596
14597 * decl.c (lang_mark_false_label_stack): Remove.
14598 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
14599
14600 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
14601
14602 * gxxint.texi: Use @email for formatting email addresses.
14603
14604 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
14605
14606 * error.c: Remove direct obstack manipulation. Replace with
14607 output_buffer-based formatting. Adjust calls to removed macros.
14608 (obstack_chunk_alloc, obstack_chunk_free): Remove.
14609 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
14610 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
14611
14612 2000-09-24 Mark Mitchell <mark@codesourcery.com>
14613
14614 * ir.texi: Move to ../c-tree.texi.
14615
14616 2000-09-20 Jason Merrill <jason@redhat.com>
14617
14618 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
14619
14620 2000-09-21 Andreas Jaeger <aj@suse.de>
14621
14622 * errfn.c: Move declaration of cp_printer and cp_printers to ...
14623 * cp-tree.h: ... here.
14624
14625 * error.c: Remove declaration of cp_printer.
14626
14627 2000-09-20 Mark Mitchell <mark@codesourcery.com>
14628
14629 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
14630
14631 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
14632
14633 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
14634 users.
14635
14636 2000-09-18 Mark Mitchell <mark@codesourcery.com>
14637
14638 * decl.c (start_function): Robustify.
14639
14640 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14641
14642 * cp-tree.h (check_function_format): Accept a `status' parameter.
14643
14644 * call.c, typeck.c: Updates calls to `check_function_format'.
14645
14646 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
14647
14648 * decl2.c (handle_class_head): Always push some scope even
14649 in the error case.
14650
14651 2000-09-16 Mark Mitchell <mark@codesourcery.com>
14652
14653 * cp-tree.h (struct cp_language_function): Remove
14654 x_scope_stmt_stack and name_declared.
14655 (current_scope_stmt_stack): Remove.
14656 (function_name_declared_p): New macro.
14657 (struct lang_decl_flags): Use c_lang_decl as a base class.
14658 (context): Remove.
14659 (struct lang_decl): Replace saved_tree with context.
14660 (DECL_FRIEND_CONTEXT): Adjust accordingly.
14661 (SET_DECL_FRIEND_CONTEXT): Likewise.
14662 (DECL_VIRTUAL_CONTEXT): Likewise.
14663 (DECL_SAVED_TREE): Remove.
14664 (C_DECLARED_LABEL_FLAG): Likewise.
14665 (cplus_expand_expr_stmt): Don't declare.
14666 (add_decl_stmt): Likewise.
14667 (add_scope_stmt): Likewise.
14668 * decl.c (mark_stmt_tree): Remove.
14669 (case_compare): Likewise.
14670 (finish_case_label): Use c_add_case_label.
14671 (init_decl_processing): Set more language-specific hooks.
14672 (build_enumerator): Fix typo in comment.
14673 (cplus_expand_expr_stmt): Remove.
14674 (mark_lang_function): Use mark_c_language_function.
14675 (lang_mark_tree): Use c_mark_lang_decl.
14676 * decl2.c: Change order of inclusion.
14677 * except.c: Likewise.
14678 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
14679 back on c_expand_expr.
14680 * friend.c: Include expr.h.
14681 * init.c: Change order of inclusion.
14682 * Makefile.in: Update dependencies.
14683 * lex.h (free_lang_decl_chain): Remove.
14684 * optimize.c (maybe_clone_body): Use function_name_declared_p.
14685 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
14686 it doesn't exist.
14687 (instantiate_decl): Use function_name_declared_p.
14688 * semantics.c (lang_expand_expr_stmt): Remove.
14689 (set_current_function_name_declared): Likewise.
14690 (current_function_name_declared): Likewise.
14691 (begin_compound_stmt): Use function_name_declared_p.
14692 (add_decl_stmt): Remove.
14693 (setup_vtbl_ptr): Use function_name_declared_p.
14694 (add_scope_stmt): Remove.
14695 (current_scope_stmt_stack): New function.
14696 (cp_expand_stmt): Don't handle SCOPE_STMTs.
14697 (expand_body): Use function_name_declared_p.
14698 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
14699 * typeck.c: Change order of includes.
14700 (convert_sequence): Remove.
14701
14702 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
14703
14704 * lex.c (reswords): Add _Complex.
14705
14706 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14707
14708 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
14709
14710 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
14711
14712 * init.c (begin_init_stmts): Don't use // comments.
14713
14714 2000-09-12 Jason Merrill <jason@redhat.com>
14715
14716 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
14717 all non-extern arrays.
14718
14719 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
14720 typenames, too. Downgrade complaint to pedwarn.
14721 (xref_tag): Warn about surprising behavior of 'friend struct T'.
14722 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
14723 'class This::Inherited'.
14724
14725 2000-09-12 Mark Mitchell <mark@codesourcery.com>
14726
14727 * decl.c (finish_case_label): Given the LABEL_DECL a
14728 DECL_CONTEXT.
14729
14730 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
14731
14732 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
14733 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
14734 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14735 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14736 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
14737 New macros.
14738 (sorry_for_unsupported_tree, print_scope_operator,
14739 print_left_paren, print_right_paren, print_left_bracket,
14740 print_right_bracket, print_whitespace): Likewise.
14741 (aggr_variety): Rename to class_key_or_enum.
14742 (print_type): Rename to print_type_id.
14743 (print_type_specifier_seq, print_simple_type_specifier,
14744 print_elaborated_type_specifier,
14745 print_rest_of_abstract_declarator,
14746 print_parameter_declaration_clause, print_exception_specification,
14747 print_nested_name_specifier, print_template_id,
14748 typedef_original_name, print_template_argument_list_start,
14749 print_template_argument_list_end): New functions.
14750
14751 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
14752
14753 * ir.texi: Add more documentation.
14754
14755 2000-09-11 Mark Mitchell <mark@codesourcery.com>
14756
14757 * cp-tree.h (struct saved_scope): Remove x_function_parms.
14758 (current_function_parms): Don't define.
14759 (struct cp_language_function): Remove parms_stored.
14760 (current_function_just_assigned_this): Don't define.
14761 (current_function_parms_stored): Likewise.
14762 (static_ctors): Declare.
14763 (static_dtors): Likewise.
14764 (SF_EXPAND): Don't define.
14765 (expand_start_early_try_stmts): Remove declaration.
14766 (store_parm_decls): Likewise.
14767 * decl.c (static_ctors): Don't declare.
14768 (static_dtors): Likewise.
14769 (struct binding_level): Remove this_block.
14770 (poplevel): Remove dead code.
14771 (set_block): Likewise.
14772 (mark_binding_level): Don't mark this_block.
14773 (mark_saved_scope): Don't mark x_function_parms.
14774 (init_decl_processing): Don't add current_function_parms as a GC
14775 root.
14776 (check_function_type): Change prototype.
14777 (start_function): Remove RTL-generation code.
14778 (expand_start_early_try_stmts): Remove.
14779 (store_parm_decls): Give it internal linkage. Remove
14780 RTL-generation code.
14781 (finish_function): Remove RTL-generation code.
14782 * decl2.c (static_ctors): Fix formatting.
14783 (static_dtors): Likewise.
14784 * method.c (use_thunk): Don't call store_parm_decls.
14785 (synthesize_method): Likewise.
14786 * optimize.c (maybe_clone_body): Likewise.
14787 * parse.y (fn.def2): Likewise.
14788 (.set_base_init): Likewise.
14789 (nodecls): Likewise.
14790 * pt.c (instantiate_decl): Likewise.
14791 * rtti.c (synthesize_tinfo_fn): Likewise.
14792 * semantics.c (genrtl_try_block): Simplify.
14793 (expand_body): Use genrtl_start_function and
14794 genrtl_finish_function.
14795 (genrtl_start_function): New function.
14796 (genrtl_finish_function): Likewise.
14797
14798 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
14799
14800 * error.c (cp_tree_printer, case 'P'): Append break.
14801
14802 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
14803
14804 * cp-tree.h (frob_opname): Declare.
14805 * parse.y (saved_scopes): New static variable.
14806 (cp_parse_init): Adjust.
14807 (do_id): If lastiddecl is NULL, do do_identifier.
14808 (operator): Save scope information.
14809 (unoperator): New reduction. Restore scope information.
14810 (operator_name): Append unoperator. Call frob_opname.
14811 * spew.c (frob_opname): Define.
14812
14813 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
14814
14815 * decl.c, rtti.c: Include defaults.h if not already included.
14816 Don't define the *_TYPE_SIZE macros.
14817
14818 2000-09-09 Mark Mitchell <mark@codesourcery.com>
14819
14820 * cp-tree.h (push_switch): Change prototype.
14821 (check_cp_case_value): Remove declaration.
14822 (decl_constant_value): Likewise.
14823 * decl.c (struct cp_switch): Add switch_stmt and cases.
14824 (case_compare): New function.
14825 (push_switch): Set switch_stmt. Initialize cases.
14826 (pop_switch): Clean up cases.
14827 (define_case_label): Rename to ...
14828 (finish_case_label): ... this. Do semantic analysis for case
14829 labels here.
14830 (start_function): Correct comment.
14831 * decl2.c (check_cp_case_value): Remove.
14832 * expr.c (do_case): Remove.
14833 * pt.c (tsubst_expr): Adjust call to finish_case_label.
14834 * semantics.c (genrtl_do_poplevel): Remove declaration.
14835 (RECHAIN_STMTS): Remove.
14836 (finish_break_stmt): Use build_break_stmt.
14837 (finish_continue_stmt): Use build_continue_stmt.
14838 (finish_switch_cond): Adjust condition here, rater than in
14839 c_expand_start_case.
14840 (finish_case_label): Remove.
14841 * typeck.c (c_expand_return): Remove.
14842 (c_expand_start_case): Likewise.
14843
14844 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
14845
14846 * ir.texi: Document type nodes.
14847
14848 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14849
14850 * cp-tree.h (init_cp_semantics): Declare.
14851 (genrtl_try_block): Don't declare.
14852 (genrtl_handler): Likewise.
14853 (genrtl_catch_block): Likewise.
14854 (genrtl_ctor_stmt): Likewise.
14855 (genrtl_subobject): Likewise.
14856 (genrtl_do_poplevel): Likewise.
14857 (genrtl_named_return_value): Likewise.
14858 * lex.c (init_parse): Call init_cp_semantics.
14859 * semantics.c (genrtl_try_block): Give it internal linkage.
14860 (genrtl_handler): Likewise.
14861 (genrtl_catch_block): Likewise.
14862 (genrtl_ctor_stmt): Likewise.
14863 (genrtl_subobject): Likewise.
14864 (genrtl_do_poplevel): Likewise.
14865 (genrtl_named_return_value): Likewise.
14866 (lang_expand_stmt): Rename to ...
14867 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
14868 (init_cp_semantics): Define.
14869
14870 * decl.c (initialize_local_var): Remove RTL-generating code.
14871 * semantics.c (genrtl_try_block): Fix formatting.
14872
14873 Move statement-tree facilities from C++ to C front-end.
14874 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
14875 (void_zero_node): Remove.
14876 (stmt_tree): Likewise.
14877 (scope_chain): Adjust.
14878 (language_function): Rename to cp_language_function.
14879 (cp_function_chain): Adjust.
14880 (current_stmt_tree): Remove.
14881 (last_tree): Likewise.
14882 (last_expr_type): Likewise.
14883 (struct lang_decl): Adjust.
14884 (STMT_IS_FULL_EXPR_P): Remove.
14885 (add_tree): Remove.
14886 (begin_stmt_tree): Likewise.
14887 (finish_stmt_tree): Likewise.
14888 (walk_tree_fn): Likewise.
14889 (walk_stmt_tree): Likewise.
14890 * class.c (finish_struct): Replace use of add_tree with add_stmt.
14891 * decl.c (mark_stmt_tree): Adjust type.
14892 (init_decl_processing): Don't build void_zero_node.
14893 (initialize_local_var): Adjust usage of current_stmt_tree.
14894 (finish_enum): Use add_stmt, not add_tree.
14895 (save_function_data): Adjust use of language_function.
14896 (finish_constructor_body): Use add_stmt, not add_tree.
14897 (finish_destructor_body): Likewise.
14898 (push_cp_function_context): Adjust use of language_function.
14899 (pop_cp_function_context): Likewise.
14900 (mark_lang_function): Likewise.
14901 (mark_cp_function_context): Likewise.
14902 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
14903 (build_vec_init): Likewise.
14904 * semantics.c (SET_LAST_STMT): Remove.
14905 (RECHAIN_STMTS): Don't use it.
14906 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
14907 (current_stmt_tree): Define.
14908 (add_tree): Remove.
14909 (finish_goto_stmt): Use add_stmt, not add_tree.
14910 (finish_expr_stmt): Likewise.
14911 (begin_if_stmt): Likewise.
14912 (finish_then_clause): Likewise.
14913 (begin_while_stmt): Likewise.
14914 (begin_do_stmt): Likewise.
14915 (finish_return_stmt): Likewise.
14916 (begin_for_stmt): Likewise.
14917 (finish_break_stmt): Likewise.
14918 (finish_continue_stmt): Likewise.
14919 (begin_switch_stmt): Likewise.
14920 (finish_case_label): Likewise.
14921 (begin_try_block): Likewise.
14922 (begin_function_try_block): Likewise.
14923 (begin_handler): Likewise.
14924 (begin_catch_block): Likewise.
14925 (begin_compound_stmt): Likewise.
14926 (begin_asm_stmt): Likewise.
14927 (finish_asm_stmt): Likewise.
14928 (finish_label_stmt): Likewise.
14929 (add_decl_stmt): Likewise.
14930 (finish_subobject): Likewise.
14931 (finish_decl_cleanup): Likewise.
14932 (finish_named_return_value): Likewise.
14933 (setup_vtbl_ptr): Likewise.
14934 (add_scope_stmt): Likewise.
14935 (finish_stmt_expr): Likewise.
14936 (prune_unused_decls): Remove.
14937 (begin_stmt_tree): Likewise.
14938 (finish_stmt_tree): Likewise.
14939 (prep_stmt): Adjust use of current_stmt_tree.
14940 (lang_expand_stmt): Likewise.
14941 * tree.c (statement_code_p): Remove.
14942 (cp_statement_code_p): New function.
14943 (walk_stmt_tree): Remove.
14944 (init_tree): Set lang_statement_code_p.
14945
14946 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
14947
14948 Integrated preprocessor.
14949
14950 * Make-lang.in, Makefile.in: Remove all references to input.c,
14951 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
14952 * gxx.gperf, hash.h, input.c: Delete.
14953 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
14954 initialized properly.
14955
14956 * class.c (fixup_pending_inline): Take a tree, not a
14957 struct pending_inline *. All callers changed.
14958 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
14959 RID_PROTECTED entries in ridpointers[] array here.
14960 * decl.c (duplicate_decls): Do not refer to struct
14961 pending_inline.
14962 (record_builtin_type, init_decl_processing): Use RID_MAX not
14963 CP_RID_MAX.
14964 (grokdeclarator): Use C_IS_RESERVED_WORD.
14965 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
14966 cpplib.
14967 (grok_x_components): Do not inspect pending_inlines chain.
14968
14969 * cp-tree.h (struct lang_identifier): Add rid_code entry.
14970 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
14971 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
14972 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
14973 TIME_IDENTIFIER_FILEINFO): Kill.
14974 Update prototypes.
14975 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
14976 single 32-bit word.
14977 * parse.y: Call do_pending_inlines unconditionally.
14978 reinit_parse_for_method is now snarf_method. fn.defpen is no
14979 longer necessary. Remove unnecessary <itype> annotation on
14980 SCOPE. Do not refer to end_of_file or struct pending_inline.
14981 * semantics.c (begin_inline_definitions): Call
14982 do_pending_inlines unconditionally.
14983
14984 * lex.c: Remove all code now shared with C front end.
14985 Initialize cpplib properly if USE_CPPLIB. Put reserved words
14986 into the get_identifier table. Rewrite pragma handling to
14987 work with the registry. Move code to save tokens for later
14988 processing to spew.c.
14989
14990 * spew.c: Rewrite everything in terms of token streams instead
14991 of text. Move routines here from lex.c / input.c as
14992 appropriate. GC-mark trees hanging off the pending inlines
14993 chain.
14994
14995 2000-09-06 Mark Mitchell <mark@codesourcery.com>
14996
14997 * NEWS: Mention that the named return value extension has been
14998 deprecated.
14999 * cp-tree.h (original_result_rtx): Define.
15000 (TREE_REFERENCE_EXPR): Remove.
15001 (DECL_VPARENT): Likewise.
15002 (pushdecl_nonclass_level): Likewise.
15003 (store_return_init): Likewise.
15004 (reinit_lang_specific): Likewise.
15005 (genrtl_named_return_value): Change prototype.
15006 * decl.c (original_result_rtx): Remove.
15007 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15008 Do not generate RTL for local variables here.
15009 (store_return_init): Remove.
15010 * semantics.c (genrtl_named_return_value): Simplify. Fold in
15011 store_return_init.
15012 (finish_named_return_value): Adjust accordingly. Warn that this
15013 extension is deprecated.
15014 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15015
15016 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15017
15018 * pt.c (type_unification_real): Replace switch with if.
15019 (unify): Tsubst non-type parms before comparing.
15020
15021 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15022
15023 * error.c (dump_typename): New function, broken out of ...
15024 (dump_type): ... here. Use it.
15025 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15026
15027 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15028
15029 * init.c (build_offset_ref): Deal with namespace scoped
15030 TEMPLATE_ID_EXPRs.
15031
15032 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
15033
15034 * class.c (resolve_address_of_overloaded_function): Add
15035 explanation message.
15036 * decl.c (define_case_label): Reformat explanation.
15037 * decl2.c (finish_static_data_member_decl): Likewise.
15038 (grokfield): Likewise.
15039 * friend.c (do_friend): Likewise.
15040
15041 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
15042
15043 * tree.c (walk_tree): Expose tail recursion.
15044 (walk_stmt_tree): New function.
15045 * cp-tree.h: Prototype walk_stmt_tree.
15046 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15047 the BLOCKs directly. If a BLOCK has no variables after
15048 pruning, discard it.
15049 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
15050 restore the line number.
15051
15052 2000-09-05 Mark Mitchell <mark@codesourcery.com>
15053
15054 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15055 (pt.o): Remove dependency on HTAB_H.
15056 * cp-tree.h: Include hashtab.h.
15057 (walk_tree): Change prototype.
15058 (walk_tree_without_duplicates): New function.
15059 * decl.c (check_default_argument): Use it.
15060 * optimize.c (remap_decl): Adjust calls to walk_tree.
15061 (copy_body): Likewise.
15062 (expand_calls_inline): Likewise.
15063 (calls_setjmp_p): Use walk_tree_without_duplicates.
15064 * pt.c: Don't include hashtab.h.
15065 (for_each_template_parm): Use walk_tree_without_duplicates.
15066 * semantics.c (finish-stmt_tree): Likewise.
15067 (expand_body): Likewise.
15068 * tree.c (walk_tree): Add additional parameter.
15069 (walk_tree_without_duplicates): New function.
15070 (count_trees): Use it.
15071 (verify_stmt_tree): Adjust call to walk_tree.
15072 (find_tree): Use walk_tree_without_duplicates.
15073 (no_linkage_check): Likewise.
15074 (break_out_target_exprs): Adjust call to walk_tree.
15075 (cp_unsave): Likewise.
15076
15077 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15078
15079 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15080 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15081 * cp-tree.h (TYPE_BINFO): Adjust comment.
15082 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15083 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15084 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15085 (TYPE_TEMPLATE_INFO): Likewise.
15086 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15087 * class.c (push_nested_class): Likewise.
15088 * decl.c (lookup_name_real): Likewise.
15089 (grokdeclarator): Likewise.
15090 (grok_op_properties): Likewise.
15091 (xref_tag): Likewise.
15092 (xref_basetypes): Likewise.
15093 * decl2.c (constructor_name_full): Likewise.
15094 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15095 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15096 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15097 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15098 (dump_type_suffix): Likewise.
15099 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15100 instead.
15101 (get_aggr_from_typedef): Likewise.
15102 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15103 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15104 (write_template_parm): Likewise.
15105 (write_template_template_parm): Check tree code instead of
15106 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15107 * method.c (build_overload_nested_name): Add
15108 BOUND_TEMPLATE_TEMPLATE_PARM.
15109 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15110 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15111 * pt.c (convert_template_argument): Check tree code instead of
15112 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15113 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15114 (for_each_template_parm): Adjust comment.
15115 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
15116 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15117 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
15118 template_args_equal to compare template template parameter cases.
15119 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15120 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15121 instead.
15122 * tree.c (copy_template_template_parm): Decide whether to create
15123 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15124 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15125 (copy_tree_r): Likewise.
15126 * typeck.c (comptypes): Likewise. Check tree code instead of
15127 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15128
15129 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
15130
15131 * decl.c (finish_function): Move the code for handling functions
15132 marked with the constructor and destructor attributes inside the
15133 expand_p block.
15134
15135 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15136
15137 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15138
15139 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15140
15141 * pt.c (lookup_template_class): Remove abort.
15142 * tree.c (get_type_decl): Allow error_mark_node.
15143
15144 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
15145
15146 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15147 TEMPLATE_ID_EXPRs.
15148
15149 2000-09-03 Mark Mitchell <mark@codesourcery.com>
15150
15151 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15152 new ABI mangling.
15153
15154 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
15155
15156 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15157 union tag mismatch error reporting.
15158
15159 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
15160
15161 * call.c (build_scoped_method_call): Check it is not a namespace.
15162
15163 2000-08-30 Jason Merrill <jason@redhat.com>
15164
15165 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15166
15167 * tree.c (bot_manip): Check TREE_CONSTANT rather than
15168 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
15169 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15170
15171 * decl.c (start_function): Always call make_function_rtl.
15172
15173 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
15174
15175 * semantics.c (prune_unused_decls): New function.
15176 (finish_stmt_tree): Call it via walk_tree.
15177
15178 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
15179
15180 * class.c (build_secondary_vtable): Constify a char *.
15181 * decl.c (init_decl_processing): Initialize function_id_node,
15182 pretty_function_id_node, and func_id_node.
15183 * input.c (struct input_source): Constify 'str'.
15184 (feed_input): Constify first argument.
15185 * mangle.c (write_identifier): Constify argument.
15186 * pt.c (mangle_class_name_for_template): Constify argument.
15187
15188 2000-08-29 Mark Mitchell <mark@codesourcery.com>
15189
15190 * typeck.c (mark_addressable): Remove code that pokes around in
15191 RTL.
15192
15193 2000-08-28 Jason Merrill <jason@redhat.com>
15194
15195 * lex.c (file_name_nondirectory): Move to toplev.c.
15196
15197 * cp-tree.h (LOCAL_CLASS_P): New macro.
15198 * class.c (finish_struct_1): Use it.
15199
15200 2000-08-27 Alex Samuel <samuel@codesourcery.com>
15201
15202 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15203 (write_encoding): Pass another argument to write_name.
15204 (write_name): Add ignore_local_scope parameter. Fix handling of
15205 local names.
15206 (write_nested_name): Use write_unqualified_name.
15207 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
15208 (write_template_prefix): Use write_unqualified_name.
15209 (write_component): Remove.
15210 (write_local_name): Add parameter. Use direct local entity to
15211 discriminator calculation.
15212 (write_class_enum_type): Pass another argument to write_name.
15213 (write_template_template_arg): Likewise.
15214 (make_guard_variable): Likewise.
15215
15216 2000-08-27 Jason Merrill <jason@redhat.com>
15217
15218 * decl.c (pushdecl): Matching decls for local externs are found in
15219 the current level. Propagate linkage information from previous
15220 declarations.
15221
15222 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
15223
15224 * ir.texi (Expressions): Fix typo.
15225
15226 2000-08-25 Greg McGary <greg@mcgary.org>
15227
15228 * tree.c (init_tree): Use ARRAY_SIZE.
15229
15230 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
15231
15232 * error.c (cp_tree_printer): Rework.
15233
15234 2000-08-25 Mark Mitchell <mark@codesourcery.com>
15235
15236 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
15237 dyn-string.o.
15238 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
15239 (cp-demangle.o): Remove target.
15240 (dyn-string.o): Likewise.
15241
15242 * decl.c (grokfndecl): Require that `main' return an `int'.
15243 * mangle.c (write_encoding): Don't mangle return types for
15244 conversion functions.
15245
15246 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
15247
15248 * error.c (tree_formatting_info): New data type.
15249 (tree_being_formatted): New macro.
15250 (tree_formatting_flags): Likewise.
15251 (put_whitespace): Likewise.
15252 (print_tree_identifier): Likewise.
15253 (print_identifier): Likewise.
15254 (cp_tree_printer, print_function_argument_list, print_declaration,
15255 print_expression, print_function_declaration,
15256 print_function_parameter, print_type, print_cv_qualifier): New
15257 functions.
15258 (init_error): Initialize lang_printer.
15259
15260 2000-08-24 Jason Merrill <jason@redhat.com>
15261
15262 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
15263 adjustment necessary.
15264
15265 2000-08-24 Greg McGary <greg@mcgary.org>
15266
15267 * cp-tree.h (MAIN_NAME_P): Remove macro.
15268
15269 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
15270
15271 * error.c (print_instantiation_context): Don't forget to flush the
15272 buffer.
15273
15274 2000-08-23 Jason Merrill <jason@redhat.com>
15275
15276 * typeck.c (build_ptrmemfunc): Save the input pmf.
15277
15278 * method.c (process_modifiers): Use same_type_p.
15279
15280 2000-08-23 Mark Mitchell <mark@codesourcery.com>
15281
15282 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
15283 * mangle.c (write_function_type): Change prototype.
15284 (write_encoding): Don't mangle return types for
15285 constructors or destructors.
15286 (write_type): Adjust call to write_function_type.
15287 * pt.c (instantiate_template): Instantiate alternate entry points
15288 when instantiating the main function.
15289
15290 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
15291
15292 * error.c (cp_print_error_function): Don't use embedded '\n' in
15293 output_printf.
15294
15295 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
15296
15297 * decl.c (init_decl_processing): Remove bogus initialization.
15298 * error.c (lang_print_error_function): Restore here.
15299 (init_error): Initialize print_error_function.
15300
15301 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15302
15303 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
15304
15305 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
15306
15307 * Makefile.in (error.o): Depends on diagnostic.h
15308
15309 * cp-tree.h (problematic_instantiation_changed,
15310 record_last_problematic_instantiation, current_instantiation,
15311 print_instantiation_context): Declare.
15312 (maybe_print_template_context): Remove.
15313
15314 * decl.c (init_decl_processing): Set print_error_function to NULL.
15315 (lang_print_error_function): Remove, since we're using a new
15316 machinery.
15317
15318 * error.c: #include diagnostic.h
15319 (function_category): New function.
15320 (cp_diagnostic_starter): Likewise.
15321 (cp_diagnostic_finalizer): Likewise.
15322 (cp_print_error_function): Likewise.
15323 (maybe_print_instantiation_context): Likewise.
15324 (print_instantiation_full_context): Likewise.
15325 (print_instantiation_partial_context): Likewise.
15326 (print_instantiation_context): Define.
15327 (init_error): Initialize diagnostic pager and finalizer.
15328
15329 * pt.c (problematic_instantiation_changed): Define.
15330 (record_last_problematic_instantiation): Likewise.
15331 (current_instantiation): Likewise.
15332 (maybe_print_template_context): Remove.
15333 (print_template_context): Likewise.
15334 (current_tinst_level): Make static to reflect Brendan Kehoe's
15335 change of 1995-04-13.
15336 (push_tinst_level): Call print_instantiation_context.
15337
15338 2000-08-21 Nix <nix@esperi.demon.co.uk>
15339
15340 * lang-specs.h: Do not process -o or run the assembler if
15341 -fsyntax-only.
15342
15343 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
15344
15345 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
15346 variables.
15347 * decl2.c (lang_decode_option): Disable gettext attributes for
15348 -ansi.
15349
15350 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
15351
15352 * lex.c (lang_init_options): Default diagnostic message maximum
15353 length to 80, when line-wrapping.
15354
15355 2000-08-20 Mark Mitchell <mark@codesourcery.com>
15356
15357 * class.c (build_vtbl_initializer): Clear the entire
15358 vtbl_init_data. Start keeping track of the functions for which we
15359 have created vcall offsets here.
15360 (dfs_build_vcall_offset_vtbl_entries): Remove.
15361 (build_vcall_offset_vtbl_entries): Reimplement.
15362 (add_vcall_offset_vtbl_entries_r): New function.
15363 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
15364 computing when vcall offsets are necessary.
15365
15366 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15367
15368 * decl.c (member_function_or_else): Use cp_error ... %T.
15369 (grokdeclarator): Likewise.
15370 (start_method): Likewise.
15371 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
15372
15373 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15374
15375 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
15376 TYPE_DECLs.
15377
15378 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15379
15380 * cp-tree.h (PTRMEM_OK_P): New macro.
15381 (itf_ptrmem_ok): New enumeration value.
15382 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
15383 argument. Diagnose implicit pointer to member.
15384 (instantiate_type): Don't diagnose implicit pointer to member
15385 here. Pass itf_ptrmem_ok if ok. Adjust calls to
15386 resolve_address_of_overloaded_function.
15387 * init.c (build_offset_ref): Set PTRMEM_OK_P.
15388 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
15389 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
15390 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
15391 (build_unary_op): Deal with single non-static member in
15392 microsoft-land.
15393
15394 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15395
15396 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
15397
15398 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
15399
15400 * cp-tree.h (enum_name_string): Remove prototype.
15401 (report_case_error): Remove prototype.
15402 * cp/typeck2.c (enum_name_string): Remove.
15403 (report_case_error): Remove.
15404 * error.c (dump_expr): Deal with enum values directly.
15405 Correctly negate integer constant.
15406
15407 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15408
15409 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
15410 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
15411 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
15412 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
15413 (__cxa_vec_new): Use __cxa_vec_new2.
15414 (__cxa_vec_delete): Use __cxa_vec_delete2.
15415
15416 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15417
15418 * vec.cc (__cxa_vec_new): Set "C" linkage.
15419 (__cxa_vec_ctor): Likewise.
15420 (__cxa_vec_cctor): Likewise.
15421 (__cxa_vec_dtor): Likewise.
15422 (__cxa_vec_delete): Likewise.
15423 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
15424 (__cxa_vec_ctor): Likewise.
15425 (__cxa_vec_cctor): Likewise.
15426 (__cxa_vec_dtor): Likewise.
15427 (__cxa_vec_delete): Likewise.
15428
15429 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15430
15431 * class.c (instantiate_type): Reinstate local variable
15432 deleted in previous change.
15433
15434 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
15435 itf_no_attributes.
15436
15437 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15438
15439 * cp-tree.h (instantiate_type_flags): New enumeration.
15440 (instantiate_type): Change parameter.
15441 * class.c (instantiate_type): Adjust prototype. Adjust.
15442 * call.c (standard_conversion): Adjust instantiate_type call.
15443 (reference_binding): Likewise.
15444 (build_op_delete_call): Likewise.
15445 (convert_like_real): Likewise.
15446 * cvt.c (cp_convert_to_pointer): Likewise.
15447 (convert_to_reference): Likewise.
15448 * pt.c (convert_nontype_argument): Likewise.
15449 * typeck.c (build_binary_op): Likewise.
15450 (build_ptrmemfunc): Likewise.
15451 (convert_for_assignment): Likewise.
15452
15453 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
15454
15455 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
15456 (current_aggr): Define.
15457 * decl.c (grokdeclarator): Make sure a friend class is an
15458 elaborated type specifier.
15459 * parse.y (current_aggr): Remove static definition.
15460 (cp_parse_init): Adjust.
15461 (structsp): Clear and restore current_aggr.
15462 (component_decl_list): Clear current_aggr.
15463
15464 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
15465 aggregate tag on the typename's context.
15466
15467 * pt.c (tsubst_friend_class): Return error_mark_node, if
15468 parms becomes NULL.
15469 (instantiate_class_template): Ignore error_mark_node friend types.
15470
15471 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
15472
15473 * cvt.c (warn_ref_binding): New static function, broken out of ...
15474 (convert_to_reference): ... here. Use it.
15475
15476 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15477
15478 * parse.y (template_arg): Add rule for template qualified with
15479 global scope.
15480
15481 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15482
15483 * decl2.c (add_function): Reorganize.
15484 (arg_assoc): Do not consider function template decls.
15485
15486 2000-08-11 Jason Merrill <jason@redhat.com>
15487
15488 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
15489 looking inside.
15490
15491 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15492
15493 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
15494 (lookup_nested_tag): Likewise.
15495
15496 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
15497 can be produced.
15498
15499 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15500
15501 * parse.y (named_complex_class_head_sans_basetype): Remove
15502 always true if.
15503
15504 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15505
15506 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
15507 explicit TEMPLATE_ID_EXPR args.
15508 (build_expr_from_tree, case CALL_EXPR): Likewise.
15509
15510 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
15511
15512 * decl.c (check_tag_decl): Diagnose typename's which don't
15513 declare anything.
15514
15515 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
15516
15517 * init.c (build_aggr_init): Reject bogus array initializers
15518 early.
15519
15520 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
15521
15522 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
15523 runtime.
15524 * cp/tinfo.cc (__dynamic_cast): Likewise.
15525 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
15526
15527 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
15528
15529 * cvt.c (convert_to_pointer_force): Fix error message when
15530 attempting to cast from ambiguous base.
15531
15532 2000-08-08 Jason Merrill <jason@redhat.com>
15533
15534 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
15535 (tsubst_template_arg_vector): Likewise.
15536
15537 * decl2.c (build_anon_union_vars): Choose the largest field; don't
15538 assume that one will be as large as the union.
15539
15540 2000-08-07 Kazu Hirata <kazu@hxi.com>
15541
15542 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
15543 * decl.c (pop_labels): Likewise.
15544
15545 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
15546
15547 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
15548 specifications.
15549 (__pointer_to_member_type_info): Likewise.
15550 (__base_class_info): Likewise.
15551 (__class_type_info): Likewise.
15552 (__si_class_type_info): Likewise.
15553 (__vmi_class_type_info): Likewise.
15554 * tinfo.cc (__si_class_type_info::__do_find_public_src):
15555 Changed member names to match specifications.
15556 (__vmi_class_type_info::__do_find_public_src): Likewise.
15557 (__si_class_type_info::__do_dyncast): Likewise.
15558 (__vmi_class_type_info::__do_dyncast): Likewise.
15559 (__si_class_type_info::__do_upcast): Likewise.
15560 (__vmi_class_type_info::__do_upcast): Likewise.
15561 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
15562 (__pbase_type_info::__pointer_catch): Likewise.
15563 (__pointer_type_info::__pointer_catch): Likewise.
15564 (__pointer_to_member_type_info::__pointer_catch): Likewise.
15565
15566 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
15567
15568 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
15569 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
15570 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
15571
15572 2000-08-04 Mark Mitchell <mark@codesourcery.com>
15573
15574 * cp-tree.h (add_method): Change prototype.
15575 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
15576 Don't double the size of the method vector in the error case.
15577 (handle_using_decl): Adjust call to add_method.
15578 (add_implicitly_declared_members): Likewise.
15579 (clone_function_decl): Likewise.
15580 * decl2.c (check_classfn): Likewise.
15581 * semantics.c (finish_member_declaration): Likewise.
15582
15583 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
15584
15585 * decl.c (flag_isoc94): New variable.
15586
15587 2000-08-02 Jason Merrill <jason@redhat.com>
15588
15589 * pt.c (do_type_instantiation): Add complain parm; don't complain
15590 if called recursively.
15591 * cp-tree.h, parse.y: Adjust.
15592
15593 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
15594
15595 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
15596 -Wno-strict-prototypes.
15597
15598 * g++spec.c: Adjust type of second argument to
15599 lang_specific_driver, and update code as necessary.
15600
15601 * cp-tree.h: Don't prototype min_precision here.
15602 (my_friendly_assert): Cast expression to void.
15603 * semantics.c (do_poplevel): Initialize scope_stmts.
15604
15605 2000-08-02 Mark Mitchell <mark@codesourcery.com>
15606
15607 * cp-tree.h (DECL_NEEDED_P): Tweak.
15608
15609 2000-07-28 Jason Merrill <jason@redhat.com>
15610
15611 * lang-specs.h: Use %i in rule for .ii files.
15612
15613 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
15614
15615 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
15616
15617 2000-07-30 Mark Mitchell <mark@codesourcery.com>
15618
15619 Allow indirect primary bases.
15620 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
15621 primary_base.
15622 (CLASSTYPE_VFIELD_PARENT): Remove.
15623 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
15624 (BINFO_PRIMARY_BINFO): Remove.
15625 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
15626 (BINFO_VBASE_PRIMARY_P): Likewise.
15627 (BINFO_PRIMARY_BASE_OF): New macro.
15628 (BINFO_INDIRECT_PRIMARY_P): Likewise.
15629 (get_primary_binfo): New function.
15630 * decl.c (lang_mark_tree): Make lang_type::primary_base.
15631 * class.c (vcall_offset_data_s): Rename to ...
15632 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
15633 and add ctor_vtbl_p.
15634 (get_derived_offset): Use get_primary_binfo.
15635 (dfs_mark_primary_bases): Adjust handling of virtual primary
15636 bases.
15637 (mark_primary_bases): Likewise.
15638 (set_primary_base): Take a binfo, not an integer, as a
15639 representation of the primary base.
15640 (indirect_primary_base_p): Remove.
15641 (determine_primary_base): Adjust for indirect primary bases.
15642 (dfs_find_final_overrider): Fix typo in coment.
15643 (update_vtable_entry_for_fn): Use get_primary_binfo.
15644 (layout_nonempty_base_or_field): Tweak.
15645 (build_base_fields): Adjust for new primary base semantics.
15646 (dfs_propagate_binfo_offsets): Remove.
15647 (propagate_binfo_offsets): Rewrite.
15648 (dfs_set_offset_for_shared_vbases): Remove.
15649 (layout_virtual_bases): Don't use it.
15650 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
15651 ABI.
15652 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
15653 CLASSTYPE_VFIELD_PARENT.
15654 (dfs_get_primary_binfo): New function.
15655 (get_primary_binfo): Likewise.
15656 (dump_class_hierarchy_r): Tweak printing of primary bases.
15657 (build_vtbl_initializer): Fix typo in comments. Use
15658 vtbl_init_data.
15659 (build_vcall_and_vbase_vtbl_entries): Likewise.
15660 (build_vbaes_offset_vtbl_entries): Likewise.
15661 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
15662 BV_VCALL_INDEX to handle indirect primary bases.
15663 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
15664 (build_rtti_vtbl_entries): Likewise.
15665 * search.c (get_shared_vbase_if_not_primary): Tweak.
15666 (find_vbase_instance): Likewise.
15667 (binfo_for_vtable): Simplify.
15668 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
15669 (make_binfo): Make it have 11 entries.
15670
15671 2000-07-30 Alex Samuel <samuel@codesourcery.com>
15672
15673 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
15674 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
15675 ascertaining primaryness.
15676 (G): Remove template_args.
15677 (decl_is_template_id): New function.
15678 (write_encoding): Use decl_is_template_id.
15679 (write_name): Likewise. Handle type_decls. Get main variant of
15680 type decls.
15681 (write_nested_name): Likewise.
15682 (write_prefix): Likewise.
15683 (write_template_prefix): Likewise.
15684 (write_special_name_constructor): Remove defunct production from
15685 comment.
15686 (write_bare_function_type): Remove comment about absent parameter.
15687 (write_template_template_arg): Add missing grammar production to
15688 comment.
15689
15690 2000-07-27 Jason Merrill <jason@redhat.com>
15691
15692 * decl.c (duplicate_decls): If common_type produces a non-typedef
15693 type for a typedef, just use the old type.
15694
15695 2000-07-27 Mark Mitchell <mark@codesourcery.com>
15696
15697 * cp-tree.h (function_depth): Declare.
15698 (verify_stmt_tree): Likewise.
15699 (find_tree): Likewise.
15700 * decl.c (function_depth): Give it external linkage.
15701 * optimize.c (optimize_function): Increment and decrement it.
15702 * tree.c (verify_stmt_tree_r): New function.
15703 (verify_stmt_tree): Likewise.
15704 (find_tree_r): Likewise.
15705 (find_tree): Likewise.
15706
15707 2000-07-27 Jason Merrill <jason@redhat.com>
15708
15709 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
15710 TYPE_PTRMEMFUNC_P.
15711 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
15712
15713 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15714
15715 * decl.c (start_cleanup_fn): Mark the function as `inline'.
15716 * decl2.c (get_guard): Call cp_finish_decl, not
15717 rest_of_decl_compilation, for local guards.
15718 * lex.c (do_identifier): Remove unused variable.
15719
15720 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
15721
15722 * parse.y: Add missing ';'.
15723
15724 2000-07-26 Mark Mitchell <mark@codesourcery.com>
15725
15726 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
15727 of `extern "C++"'.
15728
15729 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
15730
15731 Kill strict_prototype. Backwards compatibility only for
15732 non NO_IMPLICIT_EXTERN_C systems.
15733 * cp-tree.h (flag_strict_prototype): Remove.
15734 (strict_prototype): Remove.
15735 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15736 * decl.c (maybe_push_to_top_level): Adjust.
15737 (pop_from_top_level): Adjust.
15738 (decls_match): Only allow sloppy parm matching for ancient
15739 system headers.
15740 (init_decl_processing): Adjust.
15741 (grokdeclarator): Adjust.
15742 * decl2.c (flag_strict_prototype): Remove.
15743 (strict_prototype): Remove.
15744 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15745 (lang_f_options): Remove "strict-prototype".
15746 (unsupported-options): Add "strict-prototype".
15747 * lex.c (do_identifier): Adjust.
15748 (do_scoped_id): Adjust.
15749 * parse.y (empty_parms): Adjust.
15750 * class.c (push_lang_context): Adjust.
15751 (pop_lang_context): Adjust.
15752 * typeck.c (comp_target_parms): Adjust.
15753
15754 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
15755
15756 * decl.c (poplevel): Deal with anonymous variables at for scope.
15757 (maybe_inject_for_scope_var): Likewise.
15758
15759 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
15760
15761 * decl.c: Remove all signal handling code, now done in toplev.c.
15762
15763 2000-07-23 Mark Mitchell <mark@codesourcery.com>
15764
15765 * decl.c (make_rtl_for_nonlocal_decl): Rework.
15766
15767 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
15768 correctly.
15769
15770 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
15771
15772 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
15773 Define my_friendly_assert and my_friendly_abort as macros
15774 which may call friendly_abort. Prototype friendly abort, not
15775 my_friendly_abort or my_friendly_assert.
15776 * decl.c (signal_catch): Report the signal caught in the error
15777 message. Call fatal directly.
15778 * typeck2.c (ack, my_friendly_assert): Delete.
15779 (my_friendly_abort): Rename to friendly_abort. Expect file,
15780 line, and function parameters. Report the abort code, then
15781 call fancy_abort. Do not mask an abort if errors have
15782 already occurred.
15783
15784 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
15785
15786 * typeck.c (comp_target_parms): Remove obsolete parameter.
15787 (comp_target_types): Adjust.
15788
15789 2000-07-17 Jason Merrill <jason@redhat.com>
15790
15791 * typeck.c (mark_addressable): Never set TREE_USED.
15792 * call.c (build_call): Don't abort on calls to library functions
15793 that have been declared normally.
15794
15795 * typeck.c (build_binary_op): Fix grammar in warning.
15796
15797 * exception.cc (__eh_free): Fix prototype.
15798
15799 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
15800
15801 * decl.c (pushdecl): Handle seeing an OVERLOAD in
15802 IDENTIFIER_NAMESPACE_VALUE.
15803
15804 2000-07-16 Mark Mitchell <mark@codesourcery.com>
15805
15806 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
15807 * method.c (use_thunk): Correct handling of vcall offsets.
15808
15809 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
15810
15811 * .cvsignore: parse.h and parse.c have no cp- prefix.
15812
15813 2000-07-13 Mark Mitchell <mark@codesourcery.com>
15814
15815 * .cvsignore: New file.
15816
15817 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
15818
15819 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
15820
15821 2000-07-12 Mark Mitchell <mark@codesourcery.com>
15822
15823 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
15824 * parse.c: Remove.
15825 * parse.h: Likewise.
15826
15827 2000-07-11 Mark Mitchell <mark@codesourcery.com>
15828
15829 * class.c (layout_class_type): Add pointers to virtual bases after
15830 base classes under the old ABI.
15831
15832 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
15833
15834 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
15835 (finish_continue_stmt): Likewise.
15836 (begin_for_stmt): Remove call to note_level_for_for.
15837 (finish_goto_stmt): Change call from build_min_nt
15838 to build_stmt.
15839 (finish_expr_stmt): Likewise.
15840 (begin_if_stmt): Likewise.
15841 (begin_while_stmt): Likewise.
15842 (finish_while_stmt): Likewise.
15843 (finish_return_stmt): Likewise.
15844 (begin_for_stmt): Likewise.
15845 (finish_for_stmt): Likewise.
15846 (finish_break_stmt): Likewise.
15847 (begin_switch_stmt): Likewise.
15848 (finish_case_label): Likewise.
15849 (genrtl_try_block): Likewise.
15850 (begin_try_block): Likewise.
15851 (begin_handler): Likewise.
15852 (begin_compound_stmt): Likewise.
15853 (finish_asm_stmt): Likewise.
15854 (finish_label_stmt): Likewise.
15855 (add_decl_stmt): Likewise.
15856 (finish_subobject): Likewise.
15857 (finish_decl_cleanup): Likewise.
15858 (finish_named_return_value): Likewise.
15859 (setup_vtbl_ptr): Likewise.
15860 (add_scope_stmt): Likewise.
15861 * decl.c (finish_constructor_body): Likewise.
15862 (finish_destructor_body): Likewise.
15863 * optimize.c (copy_body_r): Likewise.
15864 (initialize_inlined_parameters): Likewise.
15865 (declare_return_variable): Likewise.
15866 (expand_call_inline): Likewise.
15867
15868 2000-07-10 Jakub Jelinek <jakub@redhat.com>
15869
15870 * semantics.c (expand_body): Sync interface information
15871 at the end of function body expansion.
15872
15873 2000-07-09 Jason Merrill <jason@redhat.com>
15874
15875 * init.c (build_new_1): Bail early if the call to new fails.
15876
15877 * decl.c (compute_array_index_type): Check specifically for
15878 an INTEGER_CST, not just TREE_CONSTANT.
15879
15880 * decl.c (duplicate_decls): Don't call duplicate_decls on
15881 the DECL_TEMPLATE_RESULT.
15882 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
15883 codes.
15884
15885 * error.c (dump_template_bindings): Don't crash if we had an
15886 invalid argument list.
15887
15888 * typeck.c (c_expand_start_case): Do narrowing here.
15889 * semantics.c (finish_switch_cond): Not here.
15890
15891 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
15892
15893 * parse.y (asm_clobbers): Do string concatenation.
15894
15895 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15896
15897 * decl.c (pushtag): Don't put local classes in template functions
15898 on the local_classes list.
15899
15900 2000-07-04 Scott Snyder <snyder@fnal.gov>
15901
15902 * decl2.c (get_guard): Add missing return for old ABI local
15903 variable case.
15904
15905 2000-07-09 Mark Mitchell <mark@codesourcery.com>
15906
15907 * cp-tree.h (char_type_p): New function.
15908 * decl.c (init_decl_processing): Don't initialize
15909 signed_wchar_type_node or unsigned_wchar_type_node.
15910 (complete_array_type): Handle brace-enclosed string-constants.
15911 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
15912 * tree.c (char_type_p): New function.
15913 * typeck2.c (digest_init): Use char_type_p.
15914
15915 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
15916
15917 * pt.c (tsubst): Don't layout type, if it's error_mark.
15918
15919 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
15920
15921 * pt.c (instantiate_pending_templates): Reset template level.
15922
15923 2000-07-05 Jason Merrill <jason@redhat.com>
15924
15925 * call.c (joust): Don't complain about `operator char *()' beating
15926 `operator const char *() const'.
15927
15928 2000-07-04 scott snyder <snyder@fnal.gov>
15929 Jason Merrill <jason@redhat.com>
15930
15931 * repo.c (repo_get_id): Handle the case where a class with virtual
15932 bases has a null TYPE_BINFO_VTABLE.
15933
15934 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
15935 Jason Merrill <jason@redhat.com>
15936
15937 * parse.y (member_init): Just pass in the type.
15938 * init.c (expand_member_init): Handle getting a type.
15939
15940 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
15941 Jason Merrill <jason@redhat.com>
15942
15943 * decl.c (finish_function): Warn if a function has no return
15944 statement.
15945 Suggested by Andrew Koenig.
15946 * typeck.c (check_return_expr): Do set current_function_returns_value
15947 if we got an error_mark_node.
15948
15949 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
15950
15951 * decl2.c (push_decl_namespace): Push the original namespace.
15952
15953 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
15954
15955 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
15956 * semantics.c (begin_class_definition): Clear it.
15957
15958 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
15959
15960 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
15961 (genrtl_expr_stmt): Likewise.
15962 (genrtl_decl_stmt): Likewise.
15963 (genrtl_if_stmt): Likewise.
15964 (genrtl_while_stmt): Likewise.
15965 (genrtl_do_stmt): Likewise.
15966 (genrtl_return_stmt): Likewise.
15967 (genrtl_for_stmt): Likewise.
15968 (genrtl_break_stmt): Likewise.
15969 (genrtl_continue_stmt): Likewise.
15970 (genrtl_scope_stmt): Likewise.
15971 (genrtl_switch_stmt): Likewise.
15972 (genrtl_case_label): Likewise.
15973 (genrtl_begin_compound_stmt): Likewise.
15974 (genrtl_finish_compound_stmt): Likewise.
15975 (genrtl_compound_stmt): Likewise.
15976 (genrtl_asm_stmt): Likewise.
15977
15978 * init.c (begin_init_stmts): Remove call to
15979 genrtl_begin_compound_stmt.
15980 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
15981
15982 * semantics.c (lang_expand_stmt): Changed call to
15983 genrtl_compound_stmt to ignore return value.
15984
15985 2000-07-02 Mark Mitchell <mark@codesourcery.com>
15986
15987 * mangle.c (canonicalize_for_substitution): Return the canonical
15988 variant of a type.
15989
15990 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
15991 TYPE_DECL.
15992 * typeck.c (commonparms): Remove obstack manipulations.
15993
15994 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
15995
15996 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
15997
15998 * Makefile.in (OBJS): Added ../c-semantics.o.
15999 (OBJDEPS): Likewise.
16000
16001 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16002 ../c-common.h.
16003 (struct stmt_tree): Added comment.
16004 (current_function_name_declared): Removed.
16005 (stmts_are_full_exprs_p): Likewise.
16006 (genrtl_do_pushlevel): Likewise.
16007 (genrtl_clear_out_block): Likewise.
16008 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16009 (DECL_ANON_UNION_ELEMS): Likewise.
16010 (emit_local_var): Likewise.
16011 (make_rtl_for_local_static): Likewise.
16012 (do_case): Likewise.
16013 (expand_stmt): Likewise.
16014 (genrtl_decl_cleanup): Likewise.
16015 (c_expand_asm_operands): Likewise.
16016 (c_expand_return): Likewise.
16017 (c_expand_start_case): Likewise.
16018
16019 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16020 (emit_local_var): Likewise.
16021 (initialize_local_var): Change reference to
16022 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16023 Change reference to stmts_are_full_exprs_p to
16024 current_stmt_tree->stmts_are_full_exprs_p.
16025 (push_cp_function_context): Likewise.
16026
16027 * expect.c (expand_throw): Change reference to
16028 stmts_are_full_exprs_p.
16029
16030 * init.c (build_aggr_init): Change reference to
16031 stmts_are_full_exprs_p.
16032 (build_vec_init): Likewise.
16033
16034 * optimize.c (maybe_clone_body): Change reference to
16035 current_function_name_declared to
16036 cp_function_chain->name_declared.
16037
16038 * pt.c (instantiate_decl): Change reference to
16039 current_function_name_declared to
16040 cp_function_chain->name_declared.
16041
16042 * semantics.c (expand_cond): Moved declaration to c-common.h.
16043 (genrtl_do_pushlevel): Moved to c-semantics.c.
16044 (genrtl_clear_out_block): Likewise.
16045 (genrtl_goto_stmt): Likewise.
16046 (genrtl_expr_stmt): Likewise.
16047 (genrtl_decl_stmt): Likewise.
16048 (gerntl_if_stmt): Likewise.
16049 (genrtl_while_stmt): Likewise.
16050 (genrtl_do_stmt): Likewise.
16051 (genrtl_return_stmt): Likewise.
16052 (genrtl_for_stmt): Likewise.
16053 (genrtl_break_stmt): Likewise.
16054 (genrtl_continue_stmt): Likewise.
16055 (genrtl_scope_stmt): Likewise.
16056 (genrtl_switch_stmt): Likewise.
16057 (genrtl_case_label): Likewise.
16058 (genrtl_begin_compound_stmt): Likewise.
16059 (genrtl_finish_compound_stmt): Likewise.
16060 (genrtl_compound_stmt): Likewise.
16061 (genrtl_asm_stmt): Likewise.
16062 (genrtl_decl_cleanup): Likewise.
16063 (expand_cond): Likewise.
16064 (expand_stmt): Renamed to ...
16065 (lang_expand_stmt): ... this.
16066 (lang_expand_expr_stmt): Initialize.
16067 (set_current_function_name_declared): Likewise.
16068 (stmts_are_full_exprs_p): Likewise.
16069 (current_function_name_declared): Likewise.
16070 (anon_aggr_type_p): Likewise.
16071 (do_poplevel): Change reference to
16072 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16073 Change reference to stmts_are_full_exprs_p to
16074 current_stmt_tree->stmts_are_full_exprs_p.
16075 (add_tree): Likewise.
16076 (finish_expr_stmt): Likewise.
16077 (prep_stmt): Likewise.
16078 (lang_expand_stmt): Likewise.
16079 (begin_compound_stmt): Change reference to
16080 current_function_name_declared to
16081 cp_function_chain->name_declared and call to
16082 current_function_name_declared().
16083 (setup_vtbl_ptr): Likewise.
16084 (genrtl_do_poplevel): Removed.
16085
16086 2000-06-30 Jason Merrill <jason@redhat.com>
16087
16088 * init.c (init_init_processing): Go back to aligning like
16089 double_type_node for old ABI.
16090 (get_cookie_size): Make cookie larger if we get a type that needs
16091 more alignment.
16092 (build_vec_delete): Call it.
16093
16094 * typeck.c (qualify_type_recursive): New fn.
16095 (composite_pointer_type): Use it.
16096 (build_binary_op): Use composite_pointer_type.
16097
16098 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
16099 Jason Merrill <jason@redhat.com>
16100
16101 * typeck.c (check_return_expr): Don't complain about returning
16102 NULL from operator new if -fcheck-new.
16103 * cp-tree.h: Declare flag_check_new here.
16104 * init.c: Not here.
16105
16106 2000-06-28 Alex Samuel <samuel@codesourcery.com>
16107
16108 * mangle.c (find_substitution): Use same_type_p.
16109 (write_encoding): Don't check for substitutions.
16110
16111 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
16112
16113 * parse.y (expr_no_comma_rangle): New non-terminal.
16114 (template_parm): Use it for default parameter case.
16115 (template_arg): Use it.
16116 (expr_no_commas): Remove commented out undefined extensions.
16117 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16118 * parse.h, parse.c: Rebuilt.
16119
16120 2000-06-30 Mark Mitchell <mark@codesourcery.com>
16121
16122 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16123 (finish_asm_stmt): Do it here, instead.
16124
16125 * cp-tree.h (ridpointers): Don't declare.
16126 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16127 (record_builtin_java_type): Likewise.
16128 (init_decl_processing): Likewise.
16129 * lex.c: Move inclusion of lex.h.
16130 (ridpointers): Don't define.
16131 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
16132 RID_MAX.
16133 * lex.h (enum rid): Rename to ...
16134 (enum cp_rid): ... this.
16135 (ridpointers): Don't declare.
16136 * parse.y: Move inclusion of lex.h.
16137 * parse.c: Regenerated.
16138 * spew.c: Move inclusion of lex.h.
16139
16140 * cp-tree.h (struct language_function): Remove temp_name_counter.
16141 (temp_name_counter): Remove.
16142 (get_temp_name): Change prototype.
16143 (get_guard): New function.
16144 (get_guard_cond): Likewise.
16145 (set_guard): Likewise.
16146 * cvt.c (build_up_reference): Adjust call to get_temp_name.
16147 * decl.c (expand_static_init): Use get_guard and friends to
16148 implement guard variables.
16149 * decl2.c (get_temp_name): Assume that the variables created are
16150 always static.
16151 (get_sentry): Rename to ...
16152 (get_guard): ... this. Implement new ABI guard variables.
16153 (get_guard_bits): New function.
16154 (get_guard_cond): Likewise.
16155 (set_guard): Likewise.
16156 (start_static_initialization_or_destruction): Use them.
16157 (do_static_initialization): Replace sentry with guard throughout.
16158 (do_static_destruction): Likewise.
16159 * init.c (create_temporary_var): Add comment.
16160
16161 2000-06-28 Alex Samuel <samuel@codesourcery.com>
16162
16163 * mangle.c (find_substitution): Use same_type_p.
16164 (write_encoding): Don't check for substitutions.
16165
16166 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
16167
16168 * parse.y (expr_no_comma_rangle): New non-terminal.
16169 (template_parm): Use it for default parameter case.
16170 (template_arg): Use it.
16171 (expr_no_commas): Remove commented out undefined extensions.
16172 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16173 * parse.h, parse.c: Rebuilt.
16174
16175 2000-06-29 Mark Mitchell <mark@codesourcery.com>
16176
16177 * cp-tree.h (flag_const_strings): Remove.
16178 (warn_parentheses): Likewise.
16179 (warn_format): Likewise.
16180 (common_type): Likewise.
16181 (default_conversion): Likewise.
16182 (build_binary_op): Likewise.
16183 (cp_build_binary_op): New macro.
16184 * call.c (build_new_op): Use cp_build_binary_op instead of
16185 build_binary_op.
16186 * class.c (build_vtable_entry_ref): Likewise.
16187 * decl.c (expand_static_init): Likewise.
16188 (compute_array_index_type): Likewise.
16189 (build_enumerator): Likewise.
16190 * decl2.c (delete_sanity): Likewise.
16191 (start_static_initialization_or_destruction): Likewise.
16192 * error.c (dump_type_suffix): Likewise.
16193 * init.c (resolve_offset_ref): Likewise.
16194 (build_new): Likewise.
16195 (build_new_1): Likewise.
16196 (build_vec_delete_1): Likewise.
16197 (build_vec_init): Likewise.
16198 (build_delete): Likewise.
16199 * rtti.c (synthesize_tinfo_fn): Likewise.
16200 (synthesize_tinfo_var): Likewise.
16201 * search.c (expand_upcast_fixups): Likewise.
16202 (fixup_all_virtual_upcast_offsets): Likewise.
16203 * typeck.c (build_array_ref): Likewise.
16204 (get_member_function_from_ptrfunc): Likewise.
16205 (build_binary_op): Add parameter.
16206 (pointer_int_sum): Use cp_build_binary_op.
16207 (pointer_diff): Likewise.
16208 (build_modify_expr): Likewise.
16209 (get_delta_difference): Likewise.
16210 (build_ptrmemfunc): Likewise.
16211
16212 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
16213
16214 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16215 * decl.c (create_implicit_typedef): Adjust.
16216 * decl2.c (build_artificial_parm): Adjust.
16217 * method.c (implicitly_declare_fn): Adjust.
16218 * pt.c (push_inline_template_parms_recursive): Adjust.
16219 (process_template_parm): Adjust.
16220 (overloaded_template_name): Adjust.
16221 * semantics.c (finish_template_template_parm): Adjust.
16222
16223 2000-06-28 Mark Mitchell <mark@codesourcery.com>
16224
16225 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
16226 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16227 where to emit thunks.
16228 (build_vtt): Adjust call to build_vtt_inits.
16229 (build_vtt_inits): Add parameter to indicate whether or not
16230 sub-VTTs for virtual bases should be included. Adjust handling of
16231 construction vtables.
16232 (get_matching_base): New function.
16233 (dfs_build_vtt_inits): Rename to ...
16234 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
16235 construction vtables.
16236 (dfs_fixup_binfo_vtbls): Likewise.
16237 (build_ctor_vtbl_groups): Build construction vtables for virtual
16238 bases, too.
16239 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
16240 to build construction vtbls.
16241 (dfs_accumulate_vtbl_inits): Adjust handling of
16242 construction vtables.
16243
16244 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
16245 types correctly.
16246
16247 2000-06-27 Mark Mitchell <mark@codesourcery.com>
16248
16249 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
16250
16251 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
16252
16253 * search.c (hides): Remove.
16254 (is_subobject_of_p): Add most_derived parameter. Use
16255 CANONICAL_BINFO.
16256 (lookup_field_queue_p): Adjust.
16257 (lookup_field_r): Adjust.
16258
16259 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
16260
16261 * decl2.c (handle_class_head): Bash typedefs to the type's main
16262 decl.
16263
16264 2000-06-25 Mark Mitchell <mark@codesourcery.com>
16265
16266 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
16267 (begin_global_stmt_expr): ... this.
16268 (genrtl_finish_stmt_expr): Rename to ...
16269 (finish_global_stmt_expr): ... this.
16270 * init.c (begin_init_stmts): Adjust calls.
16271 (finish_init_stmts): Likewise.
16272 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
16273 (begin_global_stmt_expr): ... this.
16274 (genrtl_finish_stmt_expr): Rename to ...
16275 (finish_global_stmt_expr): ... this.
16276
16277 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16278
16279 * search.c (lookup_member): Fix typo in comment.
16280
16281 2000-06-24 Jason Merrill <jason@redhat.com>
16282
16283 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
16284 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
16285
16286 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
16287
16288 * parse.y (complex_direct_notype_declarator): Support global_scope.
16289 * Makefile.in: Adjust conflict count.
16290
16291 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16292
16293 * parse.y (template_arg): Convert TEMPLATE_DECL
16294 that is a template template parameter to
16295 TEMPLATE_TEMPLATE_PARM here.
16296
16297 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16298 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
16299 (copy_template_template_parm): Adjust prototype.
16300 * decl.c (grokdeclarator): Remove dead code.
16301 * pt.c (process_template_parm): Tidy.
16302 (lookup_template_class): Construct nodes in
16303 copy_template_template_parm.
16304 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
16305 lookup_template_class. Use TYPE_TI_TEMPLATE.
16306 * tree.c (copy_template_template_parm): Add NEWARGS
16307 parameter.
16308 (mapcar): Adjust call to copy_template_template_parm.
16309 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
16310 * method.c (build_template_template_parm_names): Change error
16311 code to avoid compilation warning.
16312
16313 * gxxint.texi: Document template template parameter
16314 name mangling.
16315
16316 2000-06-21 Alex Samuel <samuel@codesourcery.com>
16317
16318 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
16319 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
16320 (cp-demangle.o): New rule.
16321 (dyn-string.o): Likewise.
16322 * inc/cxxabi.h (__cxa_demangle): New declaration.
16323
16324 2000-06-22 Mark Mitchell <mark@codesourcery.com>
16325
16326 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
16327 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
16328 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
16329 a tree, not an int.
16330 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
16331 (make_thunk): Change prototype.
16332 (emit_thunk): Rename to use_thunk.
16333 (mangle_thunk): Change prototype.
16334 * class.c (get_derived_offset): Simplify.
16335 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
16336 BV_GENERATE_THUNK_WITH_VTABLE_P.
16337 (build_primary_vtable): Simplify.
16338 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
16339 (dfs_find_base): Remove.
16340 (update_vtable_entry_for_fn): Correct bug in finding the base
16341 where a virtual function was first declared. Figure out whether
16342 or not to emit a vcall-thunk with the vtables in which it appears.
16343 Correct logic for deciding whether to use an ordinary thunk, or a
16344 vcall thunk.
16345 (finish_struct_1): Remove unnecssary code.
16346 (build_vtbl_initializer): Use ssize_int for the running counter of
16347 negative indices.
16348 (build_vtbl_initializer): Only use vcall thunks where necessary.
16349 Mark thunks as needing to be emitted with their vtables, or not.
16350 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
16351 indices. Use size_binop.
16352 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
16353 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
16354 size_binop.
16355 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
16356 (build_vtable_entry): Mark thunks as needing to be emitted with
16357 their vtables, or not.
16358 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
16359 * decl2.c (mark_vtable_entries): Use use_thunk instead of
16360 emit_thunk.
16361 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
16362 information.
16363 * error.c (dump_expr): Use BV_FN.
16364 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
16365 not an int.
16366 * method.c (make_thunk): Likewise.
16367 (emit_thunk): Rename to use_thunk. Allow callers to decide
16368 whether or not to actually emit the thunk. Adjust for changes in
16369 representation of vcall offsets.
16370 * search.c (dfs_get_pure_virtuals): Use BV_FN.
16371 * semantics.c (emit_associated_thunks): New function.
16372 (expand_body): Use it.
16373 * ir.texi: Adjust decriptions of thunks.
16374
16375 2000-06-22 Jason Merrill <jason@redhat.com>
16376
16377 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
16378 (tsubst_friend_function): Copy it here.
16379
16380 * decl.c (grok_op_properties): Fix typo.
16381
16382 * decl2.c (delete_sanity): Clarify warning, avoid failure on
16383 deleting void*.
16384
16385 * pt.c (check_explicit_specialization): Clarify error.
16386
16387 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
16388 an old OVERLOAD when we're declaring a non-function.
16389 (pushdecl, destroy_local_var): Check for error_mark_node.
16390 (warn_extern_redeclared_static): Also bail early if
16391 we're a CONST_DECL.
16392 (push_overloaded_decl): Ignore an old error_mark_node.
16393
16394 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
16395
16396 * call.c (build_x_va_arg): Check if in a template decl.
16397 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
16398
16399 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16400
16401 * class.c (push_lang_context): TYPE_NAME gets you to the Java
16402 types DECLs.
16403 * decl.c (check_goto): Computed gotos assumed OK.
16404
16405 2000-06-20 Jason Merrill <jason@redhat.com>
16406
16407 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
16408 for which we don't need to look for instantiations.
16409
16410 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
16411
16412 * parse.y (program): Always call finish_translation_unit.
16413 * parse.c, parse.h: Rebuilt.
16414
16415 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
16416
16417 * method.c: Don't include hard-reg-set.h.
16418
16419 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
16420
16421 * rtti.c (get_base_offset): Cope when vbase field is in a base.
16422
16423 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
16424
16425 * call.c (build_conditional_expr): Use VOID_TYPE_P.
16426 * cvt.c (cp_convert_to_pointer): Likewise.
16427 (convert_to_void): Likewise.
16428 * error.c (dump_expr): Likewise.
16429 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
16430 * init.c (build_delete): Likewise.
16431 * method.c (emit_thunk): Likewise.
16432 * optmize.c (declare_return_variable): Likewise.
16433 * rtti.c (get_tinfo_decl_dynamic): Likewise.
16434 (get_typeid): Likewise.
16435 (build_dynamic_cast_1): Likewise.
16436 * typeck.c (composite_pointer_type): Likewise.
16437 (common_type): Likewise.
16438 (build_indirect_ref): Likewise.
16439 (build_binary_op): Likewise.
16440 (build_x_compound_expr): Likewise.
16441 (check_return_expr): Likewise.
16442 * typeck2.c (add_exception_specifier): Likewise.
16443
16444 * mangle.c (write_method_parms): Use direct comparison for end
16445 of parmlist.
16446
16447 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
16448
16449 * cp-tree.h (genrtl_try_block): Declare function.
16450 (genrtl_handler): Likewise.
16451 (genrtl_catch_block): Likewise.
16452 (genrtl_ctor_stmt): Likewise.
16453 (genrtl_subobject): Likewise.
16454 (genrtl_decl_cleanup): Likewise.
16455 (genrtl_do_poplevel): Likewise.
16456 (genrtl_do_pushlevel): Likewise.
16457 (genrtl_clear_out_block): Likewise.
16458 (genrtl_goto_stmt): Likewise.
16459 (genrtl_expr_stmt): Likewise.
16460 (genrtl_decl_stmt): Likewise.
16461 (genrtl_if_stmt): Likewise.
16462 (genrtl_while_stmt): Likewise.
16463 (genrtl_do_stmt): Likewise.
16464 (genrtl_return_stmt): Likewise.
16465 (genrtl_for_stmt): Likewise.
16466 (genrtl_break_stmt): Likewise.
16467 (genrtl_continue_stmt): Likewise.
16468 (genrtl_scope_stmt): Likewise.
16469 (genrtl_switch_stmt): Likewise.
16470 (genrtl_case_label): Likewise.
16471 (genrtl_begin_compound_stmt): Likewise.
16472 (genrtl_finish_compound_stmt): Likewise.
16473 (genrtl_compound_stmt): Likewise.
16474 (genrtl_asm_stmt): Likewise.
16475 (genrtl_named_return_value): Likewise.
16476 (genrtl_begin_stmt_expr): Likewise.
16477 (genrtl_finish_stmt_expr): Likewise.
16478 (finish_for_stmt): Removed first argument.
16479 (finish_switch_stmt): Likewise.
16480
16481 * semantics.c (genrtl_try_block): Define function.
16482 (genrtl_handler): Likewise.
16483 (genrtl_catch_block): Likewise.
16484 (genrtl_ctor_stmt): Likewise.
16485 (genrtl_subobject): Likewise.
16486 (genrtl_decl_cleanup): Likewise.
16487 (genrtl_do_poplevel): Likewise.
16488 (genrtl_do_pushlevel): Likewise.
16489 (genrtl_clear_out_block): Likewise.
16490 (genrtl_goto_stmt): Likewise.
16491 (genrtl_expr_stmt): Likewise.
16492 (genrtl_decl_stmt): Likewise.
16493 (genrtl_if_stmt): Likewise.
16494 (genrtl_while_stmt): Likewise.
16495 (genrtl_do_stmt): Likewise.
16496 (genrtl_return_stmt): Likewise.
16497 (genrtl_for_stmt): Likewise.
16498 (genrtl_break_stmt): Likewise.
16499 (genrtl_continue_stmt): Likewise.
16500 (genrtl_scope_stmt): Likewise.
16501 (genrtl_switch_stmt): Likewise.
16502 (genrtl_case_label): Likewise.
16503 (genrtl_begin_compound_stmt): Likewise.
16504 (genrtl_finish_compound_stmt): Likewise.
16505 (genrtl_compound_stmt): Likewise.
16506 (genrtl_asm_stmt): Likewise.
16507 (genrtl_named_return_value): Likewise.
16508 (genrtl_begin_stmt_expr): Likewise.
16509 (genrtl_finish_stmt_expr): Likewise.
16510 (finish_for_stmt): Removed first argument and generate rtl
16511 specific code.
16512 (finish_switch_stmt): Likewise.
16513 (do_poplevel): Removed generate rtl specific code.
16514 (do_pushlevel): Likewise.
16515 (add_tree): Likewise.
16516 (finish_goto_stmt): Likewise.
16517 (finish_expr_stmt): Likewise.
16518 (begin_if_stmt): Likewise.
16519 (finish_if_stmt_cond): Likewise.
16520 (finish_then_clause): Likewise.
16521 (begin_else_clause): Likewise.
16522 (finish_else_clause): Likewise.
16523 (finish_if_stmt): Likewise.
16524 (clear_out_block): Likewise.
16525 (begin_while_stmt): Likewise.
16526 (finish_while_stmt_cond): Likewise.
16527 (finish_while_stmt): Likewise.
16528 (begin_do_stmt): Likewise.
16529 (finish_do_body): Likewise.
16530 (finish_do_stmt): Likewise.
16531 (finish_return_stmt): Likewise.
16532 (begin_for_stmt): Likewise.
16533 (finish_for_init_stmt): Likewise.
16534 (finish_for_cond): Likewise.
16535 (finish_for_expr): Likewise.
16536 (finish_break_stmt): Likewise.
16537 (finish_continue_stmt): Likewise.
16538 (begin_switch_stmt): Likewise.
16539 (finish_switch_cond): Likewise.
16540 (finish_case_label): Likewise.
16541 (begin_try_block): Likewise.
16542 (begin_function_try_block): Likewise.
16543 (finish_try_block): Likewise.
16544 (finish_cleanup_try_block): Likewise.
16545 (finish_cleanup): Likewise.
16546 (finish_function_try_block): Likewise.
16547 (finish_handler_sequence): Likewise.
16548 (finish_function_handler_sequence): Likewise.
16549 (begin_handler): Likewise.
16550 (finish_handler_parms): Likewise.
16551 (begin_catch_block): Likewise.
16552 (finish_handler): Likewise.
16553 (begin_compound_stmt): Likewise.
16554 (finish_compound_stmt): Likewise.
16555 (finish_asm_stmt): Likewise.
16556 (finish_label_stmt): Likewise.
16557 (finish_label_decl): Likewise.
16558 (finish_subobject): Likewise.
16559 (finish_decl_cleanup): Likewise.
16560 (finish_named_return_value): Likewise.
16561 (begin_stmt_expr): Likewise.
16562 (finish_stmt_expr): Likewise.
16563
16564 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
16565 to call genrtl_expr_stmt when appropriate.
16566
16567 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
16568 begin_compound_expr to call genrtl_begin_stmt_expr and
16569 genrtl_begin_compound_expr when appropriate.
16570 (finish_init_stmts): Changed calls to finish_compound_expr and
16571 finish_stmt_expr to call genrtl_finish_compound_expr and
16572 genrtl_finish_stmt_expr when appropriate.
16573 (expand_default_init): Changed call to finish_expr_stmt to call
16574 genrtl_expr_stmt when appropriate.
16575 (build_vec_init): Likewise.
16576
16577 * parse.y (simple_stmt): Removed first argument from call to
16578 finish_for_stmt. Removed first argument from call to
16579 finish_switch_stmt.
16580
16581 * parse.c: Regenerated.
16582
16583 * pt.c (tsubst_expr): Removed first argument from call to
16584 finish_for_stmt. Removed first argument from call to
16585 finish_switch_stmt.
16586
16587 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
16588
16589 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
16590 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
16591
16592 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
16593 (cplus_tree_code_length[]): Likewise.
16594 (cplus_tree_code_name[]): Likewise.
16595 (init_parse): Added call to add_c_tree_codes. Changed
16596 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
16597
16598 2000-06-16 Mark Mitchell <mark@codesourcery.com>
16599
16600 * cp-tree.h (finish_mem_initializers): Declare.
16601 (count_trees): Likewise.
16602 * parse.y (base_init): Use finish_mem_initializers.
16603 * semantics.c (finish_mem_initializers): New function.
16604
16605 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
16606 the number of trees.
16607 (n_trees): Remove.
16608 (count_trees): Don't use it.
16609
16610 2000-06-15 Jason Merrill <jason@redhat.com>
16611
16612 * tree.c (count_trees): New debugging function.
16613
16614 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
16615 * init.c (build_member_call): Pull out the name of a DECL.
16616
16617 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
16618 * semantics.c (expand_body): Push to TV_INTEGRATION here.
16619 * optimize.c (optimize_function): Not here.
16620 * pt.c (instantiate_decl): Push to TV_PARSE.
16621
16622 2000-06-15 Mark Mitchell <mark@codesourcery.com>
16623
16624 * cp-tree.h (struct language_function): Remove x_base_init_list
16625 and x_member_init_list.
16626 (current_base_init_list): Remove.
16627 (current_member_init_list): Likewise.
16628 (setup_vtbl_ptr): Change prototype.
16629 (emit_base_init): Likewise.
16630 (expand_member_init): Likewise.
16631 (reinit_parse_for_function): Remove.
16632 * decl.c (save_function_data): Don't clear x_base_init_list and
16633 x_member_init_list.
16634 (mark_language_function): Don't mark them.
16635 * init.c (perform_member_init): Tweak comment.
16636 (sort_member_init): Take the list of initializers as an argument.
16637 (sort_base_init): Likewise.
16638 (emit_base_init): Likewise.
16639 (expand_member_init): Return the initializer. Don't use global
16640 variables.
16641 * lex.c (reinit_parse_for_function): Remove.
16642 * method.c (build_template_parm_names): Correct substitution.
16643 (do_build_copy_constructor): Don't use current_member_init_list
16644 and current_base_init_list.
16645 (synthesize_method): Likewise.
16646 * parse.y (base_init): Split mem-initializers into
16647 base-initializers and field-initializers.
16648 (member_init_list): Build up the list here.
16649 (member_init): Return the initializer.
16650 (fn.depfn): Don't use reinit_parse_for_function.
16651 * parse.c: Regenerated.
16652 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
16653 ERROR_MARK.
16654 (tsubst_expr): Don't use current_member_init_list
16655 and current_base_init_list.
16656 (tsubst_expr_values): Rename to ...
16657 (tsubst_initializer_list): ... this. Use convert_from_reference.
16658 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
16659 and current_base_init_list.
16660 (begin_function_definition): Don't call reinit_parse_for_function.
16661
16662 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
16663
16664 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
16665 correctly.
16666
16667 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
16668
16669 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
16670
16671 * cp-tree.h (IF_COND): Move to c-common.h.
16672 (THEN_CLAUSE): Likewise.
16673 (ELSE_CLAUSE): Likewise.
16674 (WHILE_COND): Likewise.
16675 (WHILE_BODY): Likewise.
16676 (DO_COND): Likewise.
16677 (DO_BODY): Likewise.
16678 (RETURN_EXPR): Likewise.
16679 (EXPR_STMT_EXPR): Likewise.
16680 (FOR_INIT_STMT): Likewise.
16681 (FOR_COND): Likewise.
16682 (FOR_EXPR): Likewise.
16683 (FOR_BODY): Likewise.
16684 (SWITCH_COND): Likewise.
16685 (SWITCH_BODY): Likewise.
16686 (CASE_LOW): Likewise.
16687 (CASE_HIGH): Likewise.
16688 (GOTO_DESTINATION): Likewise.
16689 (COMPOUND_BODY): Likewise.
16690 (ASM_CV_QUAL): Likewise.
16691 (ASM_STRING): Likewise.
16692 (ASM_OUTPUTS): Likewise.
16693 (ASM_INPUTS): Likewise.
16694 (ASM_CLOBBERS): Likewise.
16695 (DECL_STMT_DECL): Likewise.
16696 (STMT_EXPR_STMT): Likewise.
16697 (LABEL_STMT_LABEL): Likewise.
16698 (SCOPE_BEGIN_P): Likewise.
16699 (SCOPE_END_P): Likewise.
16700 (SCOPE_STMT_BLOCK): Likewise.
16701 (SCOPE_NULLIFIED_P): Likewise.
16702 (SCOPE_NO_CLEANUPS_P): Likewise.
16703 (SCOPE_PARTIAL_P): Likewise.
16704 (ASM_VOLATILE_P): Likewise.
16705 (STMT_LINENO): Likewise.
16706 (STMT_LINENO_FOR_FN_P): Likewise.
16707
16708 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
16709 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
16710 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
16711 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
16712 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
16713
16714 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
16715
16716 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
16717 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
16718
16719 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
16720 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
16721 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
16722
16723 2000-06-14 Mark Mitchell <mark@codesourcery.com>
16724
16725 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
16726 * class.c (dfs_find_final_overrider): Set it appropriately.
16727 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
16728 avoid unneeded secondary vptrs.
16729
16730 2000-06-13 Jakub Jelinek <jakub@redhat.com>
16731
16732 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
16733 (check_bitfield_decl, check_field_decl): Likewise.
16734 (build_vtbl_or_vbase_field, build_base_field): Likewise.
16735 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
16736 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
16737 (xfer_tag, finish_enum): Likewise.
16738 * decl2.c (finish_builtin_type): Likewise.
16739 * init.c (init_init_processing): Likewise.
16740 * pt.c (instantiate_class_template): Likewise.
16741 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
16742 * cp-tree.h (struct lang_type): Add user_align member.
16743 (CLASSTYPE_USER_ALIGN): Define.
16744
16745 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
16746
16747 * Make-lang.in (c++.install-common): Install g++-cross in
16748 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
16749 $(target_alias)-g++ and $(target_alias)-c++.
16750
16751 2000-06-12 Mark Mitchell <mark@codesourcery.com>
16752
16753 * class.c (vcall_offset_data_s): Add last_init and fns.
16754 (overrides): Rename to same_signature_p.
16755 (dfs_find_final_overrider): Adjust accordingly.
16756 (mark_overriders): Likewise.
16757 (warn_hidden): Likewise.
16758 (build_vtbl_initializer): Reorganize machinery for building things
16759 at negative offsets.
16760 (build_vcall_and_vbase_vtbl_entries): Likewise.
16761 (build_vbase_offset_vtbl_entries): Likewise.
16762 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
16763 offset entries. Do not create two entries for functions with the
16764 same signature.
16765 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
16766 (build_rtti_vtbl_entries): Reorganize machinery for building things
16767 at negative offsets.
16768
16769 * optimize.c (expand_call_inline): Don't recurse into the code
16770 used to initialize the parameters more than once.
16771
16772 2000-06-11 Mark Mitchell <mark@codesourcery.com>
16773
16774 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
16775 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
16776 (find_substitution): Only use the `Sa' substitution for
16777 std::allocator, not instantiations of it.
16778 (write_template_prefix): Move comment. Only use a TREE_LIST to
16779 represent substitutions for a member template.
16780 (write_array_type): Mangle array dimensions correctly.
16781 * optimize.c (maybe_clone_body): Copy more information from the
16782 cloned function.
16783 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
16784 on the regenerated declaration.
16785
16786 2000-06-11 Chip Salzenberg <chip@valinux.com>
16787 Mark Mitchell <mark@codesourcery.com>
16788
16789 * class.c (build_vtable): Clarify comment.
16790 (build_ctor_vtbl_group): Pass the most derived type to
16791 build_vtable.
16792
16793 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16794
16795 * decl2.c (compare_options): Don't needlessly cast away const-ness.
16796
16797 2000-06-10 Mark Mitchell <mark@codesourcery.com>
16798
16799 * decl.c (add_binding): Handle duplicate declarations of external
16800 variables.
16801
16802 2000-06-09 Chip Salzenberg <chip@valinux.com>
16803 Mark Mitchell <mark@codesourcery.com>
16804
16805 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
16806 argument.
16807 (write_signed_number): New macro.
16808 (write_unsigned_number): Likewise.
16809 (write_source_name): Use them.
16810 (write_number): Handle signed and unsigned values.
16811 (write_integer_cst): Use tree_int_cst_sgn, and use
16812 write_unsigned_number or write_signed_number as appropriate.
16813 (write_discriminator): Use write_unsigned_number or
16814 write_signed_number as appropriate.
16815 (write_template_arg_literal): Likewise.
16816 (write_array_type): Use tree_low_cst.
16817 (write_template_parm): Use write_unsigned_number or
16818 write_signed_number as appropriate.
16819 (write_substitution): Adjust call to write_number.
16820 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
16821 (write_expression): Handle non-type template arguments of
16822 reference type correctly.
16823 (mangle_thunk): Use write_signed_number.
16824
16825 2000-06-09 Chip Salzenberg <chip@valinux.com>
16826
16827 * mangle.c (find_substition): Don't mangle objects with typename
16828 substitutions (e.g. "cin" as "Si").
16829
16830 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
16831
16832 * call.c (add_candidate): Use ggc_alloc_cleared.
16833 * decl.c (lookup_label): Likewise.
16834 * lex.c (retrofit_lang_decl): Likewise.
16835
16836 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
16837
16838 * semantics.c (expand_body): Push to TV_EXPAND.
16839 * optimize.c (optimize_function): Push to TV_INTEGRATION.
16840 * decl.c (start_function): Always call announce_function.
16841
16842 * tinfo2.cc: Just declare abort.
16843
16844 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
16845
16846 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
16847 whenever @ is a symbolic name.
16848
16849 2000-06-08 Jakub Jelinek <jakub@redhat.com>
16850
16851 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
16852
16853 2000-06-07 Mark Mitchell <mark@codesourcery.com>
16854
16855 * decl.c (pushdecl): Look up functions by DECL_NAME, not
16856 DECL_ASSEMBLER_NAME.
16857
16858 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16859
16860 * decl2.c (c_language): Define.
16861
16862 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
16863
16864 * lex.c (lang_init_options): Tweak.
16865
16866 * decl2.c: Remove #inclusion of diagnostic.h
16867 (lang_decode_option): Move diagnostic formatting options to
16868 toplevel.
16869
16870 * lang-options.h: Remove documentation for diagnostic options.
16871
16872 * Makefile.in (lex.o): Depends upon diagnostic.h
16873
16874 2000-06-06 Mark Mitchell <mark@codesourcery.com>
16875
16876 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
16877 the same DECL_RESULT, it's not a redefinition.
16878 * pt.c (tsubst_decl): Remove code to handle illegal
16879 specializations.
16880
16881 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
16882
16883 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
16884
16885 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
16886
16887 * search.c (maybe_suppress_debug_info): Don't check
16888 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
16889
16890 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
16891 here if extern_p.
16892
16893 Remember instantiation context in deferred instantiations.
16894 * cp-tree.h (struct tinst_level): Remove.
16895 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
16896 * pt.c (current_tinst_level): Now a tree.
16897 (print_template_context, push_tinst_level, pop_tinst_level,
16898 tinst_for_decl): Adjust.
16899 (reopen_tinst_level): New fn.
16900 (init_pt): Register current_tinst_level as a root.
16901 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
16902 of the pending templates list.
16903 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
16904 * lex.c (extract_interface_info): Adjust.
16905 * decl2.c (warn_if_unknown_interface): Adjust.
16906
16907 2000-06-05 Mark Mitchell <mark@codesourcery.com>
16908
16909 * class.c (indirect_primary_base_p): New function.
16910 (determine_primary_base): Use it.
16911
16912 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
16913
16914 Update new-abi dynamic cast algorithm.
16915 * tinfo.cc (__class_type_info::__dyncast_result): Add
16916 whole_details. Adjust constructor.
16917 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
16918 Avoid unnecessary searching.
16919 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
16920
16921 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16922
16923 * decl.c (init_decl_processing): Don't call record_component_aliases.
16924 * tree.c (build_cplus_array_type_1): Likewise.
16925
16926 2000-06-04 Mark Mitchell <mark@codesourcery.com>
16927
16928 * ir.texi: Correct typo.
16929 * mangle.c (write_expression): Handle non-type template arguments
16930 with reference type.
16931 * method.c (build_overload_value): Likewise.
16932 * pt.c (convert_nontype_argument): Explicitly represent conversion
16933 to a reference with an ADDR_EXPR.
16934 (unify): Always unify arguments in left-to-right order.
16935
16936 2000-06-03 Alex Samuel <samuel@codesourcery.com>
16937 Mark Mitchell <mark@codesourcery.com>
16938
16939 * Make-lang.in (CXX_SRCS): Add mangle.c.
16940 * Makefile.in (CXX_OBJS): Add mangle.o.
16941 (mangle.o): New rule.
16942
16943 * class.c (local_classes): New variable.
16944 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
16945 (get_vtt_name): Use mangle_vtt_name for new ABI.
16946 (init_class_processing): Initialize local_classes.
16947 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
16948 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
16949 (std_identifier): New macro.
16950 (DECL_VOLATILE_MEMFUNC_P): New macro.
16951 (DECL_NAMESPACE_STD_P): Likewise.
16952 (local_classes): Declare.
16953 (get_mostly_instantiated_function_type): Declare.
16954 (init_mangle): Declare.
16955 (mangle_decl): Likewise.
16956 (mangle_type_string): Likewise.
16957 (mangle_type): Likewise.
16958 (mangle_typeinfo_for_type): Likewise.
16959 (mangle_typeinfo_string_for_type): Likewise.
16960 (mangle_vtbl_for_type): Likewise.
16961 (mangle_vtt_for_type): Likewise.
16962 (mangle_ctor_vtbl_for_type): Likewise.
16963 (mangle_thunk): Likewise.
16964 (mangle_conv_op_name_for_type): Likewise.
16965 (mangle_guard_variable): Likewise.
16966 * decl.c (pushtag): Keep track of local classes.
16967 (initialize_predefined_identifiers): Initialize std_identifier.
16968 (init_decl_processing): Use std_identifier.
16969 (start_decl): Don't treat instantiations as specializations.
16970 (grokdeclarator): Likewise.
16971 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
16972 name for fully-instantiated templates.
16973 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
16974 destructors with the new ABI.
16975 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
16976 (grokfield): Use mangle_type for new ABI.
16977 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
16978 (get_sentry): Use mangle_guard_variable for new ABI.
16979 (start_static_initialization_or_destruction): Likewise.
16980 * expr.c (extract_aggr_init): Remove.
16981 (extract_scalar_init): Likewise.
16982 (extract_init): Remove #if 0'd code.
16983 * mangle.c: New function.
16984 * method.c (build_mangled_name): Assert not flag_new_abi.
16985 (build_static_name): Likewise.
16986 (build_decl_overload_real): Likewise.
16987 (build_typename_overload): Likewise.
16988 (build_overload_with_type): Likewise.
16989 (build_overload_name): Likewise.
16990 (get_ctor_vtbl_name): Likewise.
16991 (start_squangling): Likewise.
16992 (get_id_2): Likewise.
16993 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
16994 (init_method): Call init_mangle for new ABI.
16995 (make_thunk): Call mangle_thunk for new ABI.
16996 * operators.def: Correct new ABI manglings for the `%' operator.
16997 Add `::' operator.
16998 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
16999 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17000 (lookup_template_class): Call mangle_decl for new ABI.
17001 (get_mostly_instantiated_function_type): New function.
17002 (set_mangled_name_for_template_decl): Use it.
17003 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17004 the new ABI. Use mangle_conv_op_name_for_type for instantiated
17005 conversion op names.
17006 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17007 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17008 (tinfo_base_init): Likewise. Mangle typeinfo string name with
17009 mangle_typeinfo_string_for_type.
17010
17011 2000-06-03 Mark Mitchell <mark@codesourcery.com>
17012
17013 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17014 (INNERMOST_TEMPLATE_ARGS): New macro.
17015 (innermost_args): Remove.
17016 (get_innermost_template_args): New function.
17017 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17018 * error.c (dump_function_decl): Be caution when using
17019 most_general_template.
17020 * method.c (build_template_parm_names): Use
17021 INNERMOST_TEMPLATE_ARGS.
17022 * pt.c (add_to_template_args): Tidy comment
17023 (get_innermost_template_args): New function.
17024 (check_explicit_specialization): Clear DECL_INITIAL for a new
17025 specialization.
17026 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17027 Tidy.
17028 (push_template_decl): Always register specializations of the most
17029 general template.
17030 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17031 (coerce_template_parms): Likewise.
17032 (lookup_template_class): Likewise.
17033 (innermost_args): Remove.
17034 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17035 (tsubst_decl): Handle tricky specializations. Use
17036 get_innermost_template_args.
17037 (instantiate_template): Simplify handling of partial
17038 instantiations.
17039 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17040 (most_general_template): Reimplement, in a more straightforward
17041 manner.
17042 (regenerate_decl_from_template): Tweak formatting. Use
17043 TMPL_ARGS_DEPTH for clarity.
17044 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17045
17046 * dump.c (dequeue_and_dump): Dump information about thunks.
17047
17048 2000-06-01 Richard Henderson <rth@cygnus.com>
17049
17050 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17051
17052 2000-06-01 Richard Henderson <rth@cygnus.com>
17053
17054 * decl2.c (unsupported_options): Fix typo, make const.
17055 (lang_decode_option): Fix bsearch argument order.
17056
17057 2000-06-01 Mark Mitchell <mark@codesourcery.com>
17058
17059 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17060 on FIELD_DECLs.
17061
17062 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17063
17064 * cp-tree.h (c_get_alias_set): Deleted.
17065 * Makefile.in (decl.o): Include ../expr.h.
17066 * decl.c (expr.h): Include.
17067 (init_decl_processing): Call record_component_aliases for arrays.
17068 (grokdeclarator): Likewise.
17069 Set TREE_ADDRESSABLE for fields that aren't bitfields.
17070 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17071
17072 2000-05-31 Mark Mitchell <mark@codesourcery.com>
17073
17074 Remove guiding declaration support.
17075 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17076 (flag_guiding_decls): Remove.
17077 * call.c (build_user_type_conversion_1): Remove support for
17078 guiding decls.
17079 (build_new_function_call): Likewise.
17080 (build_new_op): Likewise.
17081 (build_new_method_call): Likewise.
17082 * decl.c (start_function): Likewise.
17083 * friend.c (is_friend): Likewise.
17084 (do_friend): Likewise.
17085 * decl2.c ((flag_dump_translation_unit): Make it const.
17086 (flag_guiding_decls): Remove.
17087 (unsupported_options): New variable
17088 (compare_options): New function.
17089 (lang_decode_option): Use them.
17090
17091 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17092
17093 * method.c (mangle_expression): Adjust test for legal expression
17094 operators.
17095
17096 * pt.c (instantiate_decl): Save and restore the local
17097 specializations list.
17098
17099 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
17100
17101 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17102
17103 2000-05-30 Mark Mitchell <mark@codesourcery.com>
17104
17105 * call.c (add_template_candidate_real): Handle member template
17106 constructors for classes with virtual bases.
17107 (build_user_type_conversion_1): Use in_charge_arg_for_name.
17108 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17109
17110 * ir.texi: Update thunk documentation.
17111
17112 * call.c (joust): Fix handling of overloaded builtin operators.
17113
17114 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
17115
17116 * cp-tree.h (DECL_ANTICIPATED): New macro.
17117 Document new use of DECL_LANG_FLAG_7.
17118 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17119 in the user namespace.
17120 * lex.c (do_identifier): If the identifier's declaration has
17121 DECL_ANTICIPATED on, it has not yet been declared. But do not
17122 replace it with an ordinary implicit declaration.
17123
17124 * tinfo2.cc: Include stdlib.h.
17125
17126 2000-05-29 Mark Mitchell <mark@codesourcery.com>
17127
17128 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17129 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17130 CLASSTYPE_ALIGN.
17131
17132 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
17133
17134 * decl2.c (lang_decode_option): Use skip_leading_substring instead
17135 of plain strncmp.
17136
17137 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
17138
17139 * operators.def (<?): Duplicated, should have been...
17140 (>?): this. Fixed.
17141
17142 2000-05-27 Alex Samuel <samuel@codesourcery.com>
17143 Mark Mitchell <mark@codesourcery.com>
17144
17145 * cp-tree.h (ansi_opname): Make it a macro.
17146 (ansi_assopname): Likewise.
17147 (struct lang_decl_flags): Add assignment_operator_p.
17148 (struct lang_decl): Add operator_code.
17149 (DECL_VTT_PARM): Adjust.
17150 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17151 overloaded operator.
17152 (SET_OVERLOADED_OPERATOR_CODE): New macro.
17153 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17154 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17155 (opname_tab): Remove.
17156 (assignop_tab): Likewise.
17157 (operator_name_info_t): New type.
17158 (operator_name_info): New variable.
17159 (assignment_operator_name_info): Likewise.
17160 (build_cp_library_fn): Remove declaration.
17161 (push_cp_library_fn): Likewise.
17162 (operator_name_string): Likewise.
17163 (build_decl_overload): Likewise.
17164 * call.c (print_z_candidates): Simplify.
17165 (build_object_call): Adjust usage of ansi_opname. Use
17166 DECL_OVERLOADED_OPERATOR_P.
17167 (op_error): Adjust operator name lookup.
17168 (build_conditional_expr): Adjust usage of ansi_opname.
17169 (build_new_op): Likewise.
17170 (build_op_delete_call): Likewise.
17171 (build_over_call): Likewise.
17172 (joust): Use DECL_OVERLOADED_OPERATOR_P.
17173 * decl.c (duplicate_decls): Copy operator_code.
17174 (init_decl_processing): Adjust parameters to push_cp_library_fn.
17175 (builtin_function): Adjust parameters to build_library_fn_1.
17176 (build_library_fn_1): Accept an overloaded operator code.
17177 (build_library_fn): Pass ERROR_MARK.
17178 (build_cp_library_fn): Accept an overloaded operator code.
17179 (push_cp_library_fn): Likewise.
17180 (grokfndecl): Tweak.
17181 (grokdeclarator): Simplify code to compute names of overloaded
17182 operators. Adjust use of ansi_opname.
17183 (ambi_op_p): Work on tree_codes, not identifiers.
17184 (unary_op_p): Likewise.
17185 (grok_op_properties): Likewise.
17186 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17187 (lang_mark_tree): Don't try to mark the operator_code.
17188 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17189 * error.c (dump_decl): Remove special handling for operator
17190 names.
17191 (dump_function_name): Likewise.
17192 (dump_expr): Adjust name lookup of operators.
17193 (op_to_string): Simplify.
17194 (assop_to_string): Likewise.
17195 * init.c (build_new_1): Adjust use of ansi_opname.
17196 * lex.c (opname_tab): Remove.
17197 (assignop_tab): Likewise.
17198 (ansi_opname): Likewise.
17199 (ansi_assopname): Likewise.
17200 (operator_name_string): Likewise.
17201 (reinit_lang_specific): Likewise.
17202 (operator_name_info): New variable.
17203 (assignment_operator_name_info): Likewise.
17204 (init_operators): New function.
17205 (init_parse): Use it.
17206 (do_identifier): Adjust use of ansi_opname.
17207 * method.c (mangle_expression): Don't use ansi_opname for
17208 mangling.
17209 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17210 (build_decl_overload): Remove.
17211 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17212 (do_build_assign_ref): Adjust use of ansi_opname.
17213 (synthesize_method): Likewise.
17214 (implicitly_declare_fn): Likewise.
17215 * operators.def: New file.
17216 * parse.y (operator): Adjust use of ansi_opname.
17217 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17218 (set_mangled_name_for_template_decl): Don't play games with
17219 current_namespace.
17220 (special_function_p): Adjust use of ansi_opname.
17221 * typeck.c (check_return_expr): Likewise.
17222 * Make-lang.in (cc1plus): Depend on operators.def.
17223 * Makefile.in (lex.o): Likewise.
17224 (decl.o): Likewise.
17225
17226 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
17227
17228 * Make-lang.in (cplib2.ready): Eradicate.
17229
17230 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17231
17232 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
17233 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
17234 (built_min, cp_tree_equal): Likewise.
17235
17236 2000-05-26 Mark Mitchell <mark@codesourcery.com>
17237
17238 * class.c (layout_nonempty_base_or_field): Replace
17239 `record_layout_info' with `record_layout_info_s'.
17240
17241 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
17242
17243 Fix goto checking.
17244 * cp-tree.h (struct language_function): x_named_labels is now
17245 a struct named_label_list*.
17246 * decl.c (struct named_label_use_list): Renamed from...
17247 (struct named_label_list): ...this. New struct.
17248 (push_binding_level): Don't set eh_region.
17249 (note_level_for_eh): New fn.
17250 (pop_label): Take label and old value directly.
17251 (pop_labels): Adjust for new named_labels format.
17252 (lookup_label): Likewise.
17253 (poplevel): Note characteristics of a binding level containing a
17254 named label. Mess with named label lists earlier.
17255 (mark_named_label_lists): New fn.
17256 (mark_lang_function): Call it.
17257 (use_label): New fn, split out from...
17258 (make_label_decl): ...here. Don't call it.
17259 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
17260 check_previous_gotos): New fns, split out from...
17261 (define_label): ...here.
17262 (check_switch_goto): New fn.
17263 (define_case_label): Call it.
17264 (check_goto): New fn.
17265 * semantics.c (finish_goto_stmt): Call it and use_label.
17266 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
17267 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
17268
17269 2000-05-26 Mark Mitchell <mark@codesourcery.com>
17270
17271 * class.c (build_vtable_entry_ref): Correct usage of
17272 get_vtbl_decl_for_binfo.
17273
17274 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
17275 * method.c (implicitly_declare_fn): Not here.
17276
17277 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
17278
17279 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
17280 (CPTI_PTMD_DESC_TYPE): ... here.
17281 (ptmd_desc_type_node): Rename to ...
17282 (ptm_desc_type_node): ... here.
17283 * decl.c: Likewise.
17284 * rtti.c (ptmd_initializer): Rename to ...
17285 (ptm_initializer): ... here.
17286 (sythesize_tinfo_var): Adjust. Deal with pointer to member
17287 function.
17288 (create_tinfo_types): Adjust.
17289
17290 2000-05-25 Mark Mitchell <mark@codesourcery.com>
17291
17292 Finish implementation of VTTs.
17293 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
17294 CPTI_VTT_PARM_IDENTIFIER.
17295 (vtt_parm_identifier): New macro.
17296 (vtt_parm_type): Likewise.
17297 (BINFO_SUBVTT_INDEX): Likewise.
17298 (BINFO_VPTR_INDEX): Likewise.
17299 (struct lang_decl): Add vtt_parm.
17300 (DECL_VTT_PARM): New macro.
17301 (DECL_USE_VTT_PARM): Likewise.
17302 (DECL_NEEDS_VTT_PARM_P): Likewise.
17303 (get_vtt_name): Declare.
17304 (build_artificial_parm): Likewise.
17305 (fixup_all_virtual_upcast_offsets): Likewise.
17306 (expand_indirect_vtbls_init): Remove.
17307 * call.c (build_new_method_call): Pass the vtt to subobject
17308 constructors and destructors.
17309 * class.c (get_vtt_name): Give it external linkage.
17310 (build_clone): Handle the magic VTT parameters for clones.
17311 (clone_function_decl): Fix typo in comment.
17312 (build_vtt): Keep track of the indices in the VTTs where various
17313 entities are stored.
17314 (build_vtt_inits): Likewise.
17315 (dfs_build_vtt_inits): Likewise.
17316 (build_ctor_vtbl_group): Tweak type of construction vtables.
17317 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
17318 primary bases, when building construction vtables.
17319 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
17320 (initialize_predefined_identifiers): Add vtt_parm_identifier.
17321 (init_decl_processing): Initialize vtt_parm_type.
17322 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
17323 (lang_mark_tree): Make vtt_parm.
17324 * decl2.c (build_artificial_parm): New function.
17325 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
17326 (grokclassfn): Use build_artificial_parm.
17327 * init.c (initialize_vtbl_ptrs): Call
17328 fixup_all_virtual_upcast_offsets directly.
17329 (perform_member_init): Use the complete subobject destructor for
17330 member cleanups.
17331 (build_vtbl_address): New function.
17332 (expand_virtual_init): Handle VTTs.
17333 * optimize (maybe_clone_body): Likewise.
17334 * search.c (fixup_all_virtual_upcast_offsets): Give it external
17335 linkage.
17336 (expand_indirect_vtbls_init): Remove.
17337 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
17338 * tree.c (make_binfo): Make them bigger.
17339
17340 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
17341
17342 * inc/cxxabi.h (__pbase_type_info): Define, based on
17343 __pointer_type_info.
17344 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
17345 (__pointer_to_member_type_info): Likewise.
17346 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
17347 (__pointer_to_member_type_info::__is_pointer_p): Remove.
17348 (__pointer_type_info::__do_catch): Rename to ...
17349 (__pbase_type_info::__do_catch): ... here. Adjust.
17350 (__pbase_type_info::__pointer_catch): Implement.
17351 (__pointer_type_info::__pointer_catch): Adjust.
17352 (__pointer_to_member_type_info::__pointer_catch): Adjust.
17353
17354 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
17355
17356 * tinfo.h (__user_type_info::contained_virtual_p): New
17357 predicate.
17358 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
17359 shaped hierarchy.
17360 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
17361 diamond shaped hierarchy. Add early out for mixed diamond and
17362 duplicate shaped hierarchy.
17363
17364 2000-05-24 Mark Mitchell <mark@codesourcery.com>
17365
17366 * cp-tree.h (build_delete): Change prototype.
17367 (build_vec_delete): Likewise.
17368 * call.c (build_scoped_method_call): Use special_function_kind
17369 values to indicate the kind of destruction to be done.
17370 (build_method_call): Likewise.
17371 * decl.c (finish_destructor_body): Likewise.
17372 (maybe_build_cleanup_1): Likewise. Rename to ...
17373 (maybe_build_cleanup): ... this.
17374 * decl2.c (delete_sanity): Use special_function_kind
17375 values to indicate the kind of destruction to be done.
17376 (build_cleanup): Likewise.
17377 * init.c (perform_member_init): Likewise.
17378 (build_vec_delete_1): Likewise.
17379 (build_dtor_call): Simplify.
17380 (build_delete): Use special_function_kind
17381 values to indicate the kind of destruction to be done.
17382 (build_vbase_delete): Likewise.
17383 (build_vec_delete): Likewise.
17384
17385 * init.c (sort_member_init): Fix typo in error message generation
17386 code.
17387
17388 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
17389
17390 * semantics.c (begin_class_definition): make the packed
17391 attribute be sensitive to the "-fpack-struct" command line flag
17392
17393 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
17394
17395 Update new-abi upcast algorithm.
17396 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
17397 prototype and meaning of return value.
17398 (__si_class_type_info::__do_upcast): Likewise.
17399 (__vmi_class_type_info::__do_upcast): Likewise.
17400 * tinfo.cc (__class_type_info::__upcast_result): Replace
17401 whole2dst with part2dst. Adjust ctor.
17402 (__class_type_info::__do_upcast): Adjust call of worker function.
17403 (__class_type_info::__do_upcast): Adjust.
17404 (__si_class_type_info::__do_upcast): Adjust. Use parent's
17405 __do_upcast.
17406 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
17407 virtual base in diamond hierarchy bug.
17408
17409 2000-05-23 Mark Mitchell <mark@codesourcery.com>
17410
17411 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
17412 and bitfield to tinfo_fn_p.
17413 (DECL_TINFO_FN_P): Adjust.
17414 (SET_DECL_TINFO_FN_P): Likewise.
17415 (DECL_MUTABLE_P): Likewise.
17416 (DECL_C_BIT_FIELD): Likewise.
17417 (SET_DECL_C_BIT_FIELD): Likewise.
17418 (CLEAR_DECL_C_BIT_FIELD): Likewise.
17419 (DECL_UNINLINABLE): Likewise.
17420 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
17421 (handle_using_decl): Remove assertion.
17422 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
17423 to build FIELD_DECLs.
17424 (build_base_field): Likewise.
17425 (layout_class_type): Likewise.
17426 * decl.c (init_decl_processing): Likewise.
17427 (build_ptrmemfunc_type): Likewise.
17428 (grokdeclarator): Likewise.
17429 * decl2.c (grok_x_components): Likewise.
17430 * except.c (call_eh_info): Likewise.
17431 * init.c (init_init_processing): Likewise.
17432 * rtti.c (expand_class_desc): Likewise.
17433 (create_pseudo_type_info): Likewise.
17434 (get_vmi_pseudo_type_info): Likewise.
17435 (create_tinfo_types): Likewise.
17436 * ptree.c (print_lang_decl): Adjust.
17437 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
17438 before checking DECL_MUTABLE_P.
17439
17440 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
17441 parameters for template functions.
17442 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
17443 destructors as well as constructors.
17444
17445 2000-05-22 Mark Mitchell <mark@codesourcery.com>
17446
17447 * class.c (build_ctor_vtbl_group): Set inits.
17448 * optimize.c (maybe_clone_body): Set DECL_INLINE and
17449 DECL_THIS_INLINE appropriately for clones.
17450
17451 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
17452 (DECL_CONV_FN_P): Simplify.
17453 (DECL_OPERATOR): Remove.
17454 (language_to_string): Declare.
17455 * decl.c (duplicate_decls): Fix typo in comment.
17456 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
17457 (grok_op_properties): Use DECL_CONV_FN_P instead of
17458 IDENTIFIER_TYPENAME_P.
17459 * dump.c (dequeue_and_dump): Dump the language linkage of
17460 declarations.
17461 * error.c (language_to_string): Give it external linkage.
17462 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
17463 (implicitly_declare_fn): Set DECL_LANGUAGE.
17464 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
17465 IDENTIFIER_TYPENAME_P.
17466 (tsubst_decl): Likewise.
17467 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
17468 * semantics.c (finish_member_declaration): Don't mark members of
17469 classes declared in an extern "C" region as extern "C".
17470
17471 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17472
17473 * decl2.c (qualified_lookup_using_namespace): Look through
17474 namespace aliases.
17475
17476 * decl.c (push_using_decl): Return the old decl on namespace level.
17477
17478 2000-05-21 Mark Mitchell <mark@codesourcery.com>
17479
17480 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
17481 (VTT_NAME_PREFIX): New macro.
17482 (CTOR_VTBL_NAME_PREFIX): Likewise.
17483 (get_ctor_vtbl_name): New function.
17484 * class.c (get_vtable_name): Simplify.
17485 (get_vtt_name): New function.
17486 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
17487 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
17488 when a virtual base becomes primary.
17489 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
17490 VTTs.
17491 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
17492 additional parameters.
17493 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
17494 (initialize_array): New function.
17495 (build_vtt): Likewise.
17496 (build_vtt_inits): Likewise.
17497 (dfs_build_vtt_inits): Likewise.
17498 (dfs_fixup_binfo_vtbls): Likewise.
17499 (build_ctor_vtbl_group): Likewise.
17500 (initialize_vtable): Use initialize_array.
17501 (accumulate_vtbl_inits): Reimplement to handle construction
17502 vtables.
17503 (dfs_accumulate_vtbl_inits): Likewise.
17504 (bulid_vtbl_initializer): Adjust parameter name.
17505 * method.c (build_typename_overload): Remove #if 0'd code.
17506 (get_ctor_vtbl_name): New function.
17507 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
17508 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
17509
17510 * cp-tree.h (struct lang_type): Remove search_slot.
17511 (CLASSTYPE_SEARCH_SLOT): Remove.
17512 (emit_base_init): Change prototype.
17513 (initialize_vtbl_ptrs): Likewise.
17514 (expand_indirect_vtbls_init): Likewise.
17515 (clear_search_slots): Remove.
17516 * decl.c (lang_mark_tree): Don't mark search_slot.
17517 * init.c (initialize_vtbl_ptrs): Simplify.
17518 (emit_base_init): Likewise.
17519 * search.c (struct vbase_info): Document decl_ptr.
17520 (convert_pointer_to_single_level): Remove.
17521 (dfs_find_vbases): Remove.
17522 (dfs_init_base_pointers): Simplify.
17523 (dfs_clear_vbase_slots): Remove.
17524 (dfs_vtable_path_unmark): New function.
17525 (init_vbase_pointers): Simplify.
17526 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
17527 (expand_indirect_vtbls_init): Simplify. Don't call
17528 mark_all_temps_used.
17529 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
17530 initialize_vtbl_ptrs.
17531
17532 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
17533
17534 * except.c: Add static prototypes.
17535
17536 2000-05-20 H.J. Lu <hjl@gnu.org>
17537
17538 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
17539
17540 2000-05-19 Mark Mitchell <mark@codesourcery.com>
17541
17542 Don't create a separate copy of virtual bases for the
17543 CLASSTYPE_VBASECLASSES list.
17544 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
17545 (BINFO_FOR_VBASE): Remove.
17546 (CANONICAL_BINFO): Adjust.
17547 (binfo_for_vbase): New function.
17548 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
17549 instead of BINFO_FOR_VBASE.
17550 (build_vbase_pointer): Likewise.
17551 (build_secondary_vtable): Likewise.
17552 (dfs_mark_primary_bases): Likewise.
17553 (mark_primary_bases): Likewise.
17554 (layout_nonempty_base_or_field): Likewise.
17555 (dfs_set_offset_for_shared_vbases): Likewise.
17556 (dfs_set_offset_for_unshared_vbases): Likewise.
17557 (layout_virtual_bases): Likewise. Adjust for changes to the
17558 CLASSTYPE_VBASECLASSES list.
17559 (dump_class_hierarchy_r): Use binfo_for_vbase
17560 instead of BINFO_FOR_VBASE.
17561 (dump_class_hierarchy): Likewise.
17562 (finish_vtbls): Likewise.
17563 (build_vtbl_initializer): Adjust for changes to the
17564 CLASSTYPE_VBASECLASSES list.
17565 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
17566 * decl.c (finish_destructor_body): Adjust for changes to the
17567 CLASSTYPE_VBASECLASSES list.
17568 * init.c (sort_base_init): Use binfo_for_vbase.
17569 (construct_virtual_bases): Adjust for changes to the
17570 CLASSTYPE_VBASECLASSES list.
17571 (expand_member_init): Use binfo_for_vbase.
17572 (build_vbase_delete): Adjust for changes to the
17573 CLASSTYPE_VBASECLASSES list.
17574 * method.c (do_build_copy_constructor): Likewise.
17575 * rtti.c (get_base_offset): Use binfo_for_vbase.
17576 (expand_class_desc): Remove #if 0'd code.
17577 * search.c (struct vbase_info): Remove vbase_types.
17578 (get_base_distance): Use binfo_for_vbase.
17579 (lookup_field_queue_p): Use CANONICAL_BINFO.
17580 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
17581 (get_pure_virtuals): Adjust for changes to the
17582 CLASSTYPE_VBASECLASSES list.
17583 (dfs_find_vbases): Use binfo_for_vbase.
17584 (dfs_init_vbase_pointers): Likewise.
17585 (init_vbase_pointers): Don't initialize vi.vbase_types.
17586 (virtual_context): Use binfo_for_vbase.
17587 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
17588 CLASSTYPE_VBASECLASSES list.
17589 (expand_indirect_vtbls_init): Simplify.
17590 (dfs_get_vbase_types): Don't replicate virtual bases.
17591 (find_vbase_instance): Use binfo_for_vbase.
17592 (binfo_for_vbase): New function.
17593 * typeck.c (get_delta_difference): Use binfo_for_vbase.
17594
17595 2000-05-17 Mark Mitchell <mark@codesourcery.com>
17596
17597 * decl2.c (finish_anon_union): Generalize error messages to handle
17598 anonymous structures.
17599 * init.c (perform_member_init): Remove `name' parameter.
17600 (build_field_list): New function.
17601 (sort_member_init): Handle anonymous union initialization order
17602 correctly. Check for multiple initializations of the same union.
17603 (emit_base_init): Don't look up fields by name here.
17604 (expand_member_init): Record the result of name lookup for future
17605 reference.
17606 * typeck.c (build_component_ref): Fix formatting.
17607
17608 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
17609
17610 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
17611 * typeck.c (build_x_compound_expr): Replace warn_unused with
17612 warn_unused_value.
17613
17614 * decl2.c (lang_decode_option): Update -Wall unused flags by
17615 calling set_Wunused.
17616
17617 2000-05-16 Mark Mitchell <mark@codesourcery.com>
17618
17619 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
17620 * init.c (dfs_vtable_path_unmark): Remove.
17621 * search.c (marked_new_vtable_p): Likewise.
17622 (unmarked_new_vtable_p): Likewise.
17623 (dfs_search_slot_nonempty_p): Likewise.
17624 (dfs_mark): Likewise.
17625 (dfs_vtable_path_unmark): Likewise.
17626 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
17627 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
17628 (dfs_init_vbase_pointers): Remove special-case new ABI code.
17629 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
17630 (init_vbase_pointers): Simplify.
17631 (expand_indirect_vtbls_init): Likewise.
17632
17633 * class.c (copy_virtuals): New function.
17634 (build_primary_table): Use it.
17635 (build_secondary_vtable): Likewise.
17636 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
17637 indicate that no vcall offset is required.
17638 (add_virtual_function): Likewise.
17639 (modify_all_vtables): Likewise.
17640 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17641 (dfs_accumulate_vtbl_inits): Likewise.
17642 (build_vtbl_initializer): Make changes to handle construction
17643 vtables.
17644 (dfs_build_vcall_offset_vtbl_entries): Likewise.
17645 (build_rtti_vtbl_entries): Likewise.
17646 (build_vtable_entries): Handle a NULL vcall_index.
17647
17648 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
17649
17650 * decl2.c (lang_decode_option): Fix thinko.
17651
17652 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
17653
17654 * except.c (check_handlers): New fn.
17655 * cp-tree.h: Declare it.
17656 * semantics.c (finish_handler_sequence): Call it.
17657 (finish_function_handler_sequence): Likewise.
17658 (finish_handler_parms): Set TREE_TYPE on the handler.
17659 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
17660 * search.c (get_base_distance_recursive): If protect>1, ignore
17661 special access.
17662 (get_base_distance): Don't reduce watch_access.
17663
17664 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
17665
17666 * lex.c: #include diagnostic.h.
17667 (lang_init_options): Set default prefixing rules.
17668
17669 * lang-options.h: Add -fdiagnostics-show-location=.
17670
17671 * decl2.c: #include diagnostic.h.
17672 (lang_decode_option): Handle -fdiagnostics-show-location=.
17673
17674 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
17675
17676 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
17677 * vec.cc: Revert my 2000-05-07 change.
17678
17679 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
17680
17681 * class.c (check_field_decls): Complain about non-static data
17682 members with same name as class in class with constructor.
17683
17684 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
17685
17686 * decl.c (grokdeclarator): Allow non-static data members with
17687 same name as class.
17688
17689 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
17690
17691 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
17692 and pending_inline.filename. Update prototypes.
17693 * decl.c (define_label): Constify filename parameter.
17694 * decl2.c (warn_if_unknown_interface): Constify local char *.
17695 * input.c Constify input_source.filename. Don't declare
17696 input_filename or lineno. Constify filename parameter to feed_input.
17697 * lex.c (init_parse): Constify parameter and return value.
17698 (cp_pragma_interface, cp_pragma_implementation): Constify
17699 filename argument.
17700 (reinit_parse_for_method, reinit_parse_for_block,
17701 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
17702 Constify local char *.
17703 * pt.c: Don't declare lineno or input_filename.
17704 (print_template_context, tsubst_friend_function, tsubst_decl,
17705 tsubst, instantiate_decl): Constify local char *.
17706 * semantics.c (expand_body): Constify local char *.
17707 * tree.c (build_srcloc): Constify filename parameter.
17708 * typeck.c (c_expand_asm_operands): Constify filename
17709 parameter.
17710
17711 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
17712
17713 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
17714 offsetof expansion.
17715
17716 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
17717
17718 * inc/cxxabi.h: Fix typos in comment.
17719 (__base_class_info::__offset): Use a static_cast.
17720
17721 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
17722
17723 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
17724 of std::size_t and std::ptrdiff_t respectively.
17725 * tinfo.cc: Likewise.
17726 * vec.cc: Likewise.
17727
17728 2000-05-06 Richard Henderson <rth@cygnus.com>
17729
17730 * typeck.c (build_c_cast): Don't warn integer->pointer size
17731 mismatch for constants.
17732
17733 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
17734
17735 * rtti.c (ptmd_initializer): Set non-public, if class is
17736 incomplete.
17737
17738 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
17739 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17740 __cxa_vec_delete): Likewise.
17741 * tinfo.cc (__dynamic_cast): Likewise.
17742 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17743 __cxa_vec_delete): Likewise.
17744
17745 2000-05-04 Mark Mitchell <mark@codesourcery.com>
17746
17747 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
17748 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
17749 (lang_decl_flags): Add vcall_offset.
17750 (THUNK_VCALL_OFFSET): Use it.
17751 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
17752 * method.c (make_thunk): Create the lang_decl here, not in
17753 emit_thunk.
17754 (emit_thunk): Make generic thunks into ordinary functions once
17755 they have been fed to expand_body.
17756 * semantics.c (expand_body): Set current_function_is_thunk here.
17757
17758 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17759
17760 * class.c (update_vtable_entry_for_fn): Prototype.
17761
17762 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
17763 and `tmpl'.
17764
17765 * search.c (dfs_build_inheritance_graph_order): Prototype.
17766
17767 2000-05-04 Mark Mitchell <mark@codesourcery.com>
17768
17769 * cp-tree.h (special_function_kind): Add various kinds of
17770 destructors.
17771 (special_function_p): New function.
17772 * class.c (overrides): Don't let one kind of destructor override
17773 another.
17774 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
17775 whether or not to instantiate a template.
17776 * tree.c (special_function_p): Define.
17777
17778 2000-05-03 Mark Mitchell <mark@codesourcery.com>
17779
17780 * cp-tree.def (THUNK_DECL): Remove.
17781 * cp-tree.h (DECL_THUNK_P): New macro.
17782 (DECL_NON_THUNK_FUNCTION_P): Likewise.
17783 (DECL_EXTERN_C_FUNCTION_P): Likewise.
17784 (SET_DECL_THUNK_P): Likewise.
17785 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
17786 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
17787 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
17788 * decl.c (decls_match): Use DECL_EXTERN_C_P.
17789 (duplicate_decls): Likewise.
17790 (pushdecl): Likewise. Adjust thunk handling.
17791 (grokfndecl): Use DECL_EXTERN_C_P.
17792 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
17793 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
17794 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
17795 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
17796 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
17797 DECL_NO_STATIC_CHAIN.
17798 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
17799 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
17800 * search.c (covariant_return_p): Remove THUNK_DECL handling.
17801 * ir.texi: Update.
17802
17803 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
17804
17805 * tree.c (walk_tree): Set lineno.
17806
17807 2000-05-01 Mark Mitchell <mark@codesourcery.com>
17808
17809 * exception.cc: Update license notice.
17810 * new.cc: Likewise.
17811 * new1.cc: Likewise.
17812 * new2.cc: Likewise.
17813 * tinfo.cc: Likewise.
17814 * tinfo2.cc: Likewise.
17815 * vec.cc: Likewise.
17816 * inc/cxxabi.h: Likewise.
17817 * inc/exception: Likewise.
17818 * inc/new: Likewise.
17819 * inc/new.h: Likewise.
17820 * inc/typeinfo: Likewise.
17821
17822 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
17823
17824 * tree.c (build_target_expr_with_type): If we already have a
17825 TARGET_EXPR, just return it.
17826
17827 * optimize.c (initialize_inlined_parameters): Don't generate an
17828 EXPR_STMT if we can just use DECL_INITIAL.
17829 * decl.c (emit_local_var): Only make the initialization a
17830 full-expression if stmts_are_full_exprs_p.
17831
17832 2000-05-01 Mark Mitchell <mark@codesourcery.com>
17833
17834 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
17835 macro.
17836 * call.c (standard_conversion): Use it.
17837 (direct_reference_binding): Likewise.
17838 (build_over_call): Likewise.
17839 (is_properly_derived_from): Likewise.
17840 (compare_ics): Likewise.
17841 * class.c (resolves_to_fixed_type_p): Likewise.
17842 * optimize.c (declare_return_variable): Likewise.
17843 * pt.c (is_specialization_of): Likewise.
17844 (unify): Likewise.
17845 * typeck.c (comp_target_parms): Likeiwse.
17846 (build_static_cast): Likewise.
17847 (build_reinterpret_cast): Likewise.
17848 (build_const_cast): Likewise.
17849 (comp_ptr_ttypes_real): Likewise.
17850 (comp_ptr_ttypes_const): Likewise.
17851 * typeck2.c (process_init_constructor): Likewise.
17852
17853 2000-04-30 Scott Snyder <snyder@fnal.gov>
17854
17855 * decl.c (finish_destructor_body): Use the base destructor when
17856 destroying virtual bases.
17857
17858 2000-04-30 Mark Mitchell <mark@codesourcery.com>
17859
17860 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
17861 STMT_EXPRs.
17862 * optimize.c (struct inline_data): Add target_exprs field.
17863 (declare_return_variable): When a function returns an aggregate,
17864 use the variable declared in the TARGET_EXPR as the remapped
17865 DECL_RESULT.
17866 (expand_call_inline): Update the pending target_exprs stack.
17867 (optimize_function): Initialize the stack.
17868
17869 * decl2.c (finish_file): Fix typo in comment.
17870
17871 * method.c (emit_thunk): Don't try to return a `void' value.
17872
17873 * optimize.c (initialize_inlined_parameters): If the parameter is
17874 addressable, we need to make a new VAR_DECL, even if the
17875 initializer is constant.
17876
17877 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
17878
17879 * decl.c (grok_op_properties): Add an extra check of argtypes.
17880
17881 2000-04-27 Mark Mitchell <mark@codesourcery.com>
17882
17883 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
17884 variables.
17885 (initialize_inlined_parameters): Try to avoid creating new
17886 VAR_DECLs.
17887
17888 2000-04-27 Alex Samuel <samuel@codesourcery.com>
17889
17890 * lex.c (my_get_run_time): Remove.
17891 (init_filename_times): Use get_run_time instead of my_get_run_time.
17892 (check_newline): Likewise.
17893 (dump_time_statistics): Likewise.
17894 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
17895 of computing elapsed time explicitly.
17896
17897 2000-04-26 Mark Mitchell <mark@codesourcery.com>
17898
17899 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
17900 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
17901 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
17902 before calling decl_constant_value.
17903 * class.c (check_bitfield_decl): Likewise.
17904 * cvt.c (ocp_convert): Likewise.
17905 (convert): Likewise.
17906 * decl.c (compute_array_index_type): Likewise.
17907 (build_enumerator): Likewise.
17908 * decl2.c (check_cp_case_value): Likewise.
17909 * pt.c (convert_nontype_argument): Likewise.
17910 (tsubst): Likewise.
17911 * typeck.c (decay_conversion): Likewise.
17912 (build_compound_expr): Likewise.
17913 (build_reinterpret_cast): Likewise.
17914 (build_c_cast): Likewise.
17915 (convert_for_assignment): Likewise.
17916
17917 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
17918
17919 * decl.c (finish_function): Don't play games with DECL_INLINE.
17920
17921 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
17922
17923 * ir.texi: Correct typo.
17924
17925 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17926
17927 * decl.c (grokdeclarator): Reject VLAs as members.
17928
17929 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
17930
17931 * call.c (standard_conversion): Accept conversion between
17932 COMPLEX_TYPEs.
17933
17934 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
17935
17936 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
17937
17938 * decl2.c (finish_file): Remove double setup for accounting
17939 compile time.
17940
17941 2000-04-24 Robert Lipe <robertlipe@usa.net>
17942
17943 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
17944
17945 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
17946
17947 * new.cc (set_new_handler): Needs to be in std::.
17948
17949 2000-04-23 Mark Mitchell <mark@codesourcery.com>
17950
17951 * cp-tree.h (lang_decl): Remove pretty_function_p.
17952 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
17953 language-specific node.
17954 * decl.c (cp_make_fname_decl): Use build_decl, not
17955 build_lang_decl, to build the variables.
17956 (grokvardecl): Don't call build_lang_decl for local variables in
17957 templates.
17958 (grokdeclarator): Don't call build_lang_decl for local type
17959 declarations in templates.
17960 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
17961 zero'd memory, rather than calling memset.
17962 * pt.c: Include hashtab.h.
17963 (local_specializations): New variable.
17964 (retrieve_local_specialization): Use it.
17965 (register_local_specialization): Likewise.
17966 (tsubst_decl): Don't assume local variables have
17967 DECL_LANG_SPECIFIC.
17968 (instantiate_decl): Set up local_specializations.
17969 * Makefile.in (HTAB_H): New variable.
17970
17971 2000-04-23 Richard Henderson <rth@cygnus.com>
17972
17973 * typeck.c (c_expand_asm_operands): Restore the original
17974 contents of the output list.
17975
17976 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
17977
17978 * ir.texi: Document complex number representation.
17979
17980 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
17981
17982 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
17983 (target_incomplete_p): New function.
17984 (tinfo_base_init): Create comdat NTBS name variable.
17985 (ptr_initializer): Add non_public parameter. Calculate it.
17986 (ptmd_initializer): Likewise.
17987 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
17988 (create_real_tinfo_var): Add non_public parameter. Use it.
17989 Push proxy into global namespace.
17990 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
17991 New enumeration.
17992 * inc/typeinfo (type_info::before, type_info::operator==):
17993 Compare __name addresses.
17994
17995 * tinfo2.cc: Remove new-abi builtins comment.
17996
17997 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
17998
17999 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18000
18001 * call.c (joust): Exit early if we get the same function, too.
18002
18003 * decl2.c (key_method): Return NULL_TREE for template classes.
18004 (import_export_class): Don't need to check for template classes.
18005
18006 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
18007
18008 * lex.c: Remove references to cccp.c.
18009
18010 2000-04-18 Mark Mitchell <mark@codesourcery.com>
18011
18012 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18013 volatile_memfunc. Add destructor_attr. Adjust dummy.
18014 (DECL_DESTRUCTOR_P): Use destructor_attr.
18015 (DECL_CONST_MEMFUNC_P): Reimplement.
18016 (DECL_VOLATILE_MEMFUNC_P): Remove.
18017 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18018 (overrides): Use DECL_DESTRUCTOR_P.
18019 (check_for_override): Likewise.
18020 * decl.c (start_function): Likewise.
18021 * decl2.c (grokfclassfn): Likewise.
18022 (check_classfn): Likewise.
18023 (grok_function_init): Likewise.
18024
18025 2000-04-17 Mark Mitchell <mark@codesourcery.com>
18026
18027 * decl2.c (grokfield): Issue error on illegal data member
18028 declaration.
18029
18030 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
18031
18032 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18033
18034 2000-04-16 Mark Mitchell <mark@codesourcery.com>
18035
18036 * class.c (build_vtable_entry): Don't build thunks for type-info
18037 functions.
18038
18039 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
18040
18041 * decl.c (decls_match): Allow a redeclaration of a builtin to
18042 specify args while the builtin did not.
18043
18044 2000-04-15 Mark Mitchell <mark@codesourcery.com>
18045
18046 * cp-tree.def (THUNK_DECL): Add to documentation.
18047 * cp-tree.h (flag_huge_objects): Declare.
18048 * class.c (modify_vtable_entry): Tidy.
18049 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18050 Calculate delta appropriately for the new ABI.
18051 (dfs_modify_vtables): Use it.
18052 (modify_all_vtables): Fix thinko in code to add overriding copies
18053 of functions to primary vtables.
18054 (build_clone): Fix typo in comment.
18055 (clone_function_decl): Correct order of destructors in vtable.
18056 (build_vbase_offset_vtbl_entries): Adjust comment.
18057 (dfs_vcall_offset_queue_p): Remove.
18058 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18059 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18060 (build_vtable_entry): Correct check for pure virtual functions.
18061 Don't declare flag_huge_objects.
18062 * decl.c (flag_huge_objects): Remove declaration.
18063 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18064 Use int_size_in_bytes.
18065 (emit_thunk): Handle vcall offset thunks.
18066
18067 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18068
18069 * decl2.c (parse_time, varconst_time): Delete declarations.
18070 (finish_file): Delete LINENO declaration.
18071 START_TIME and THIS_TIME now long.
18072
18073 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
18074
18075 * class.c (build_base_field): Reformat comment.
18076
18077 * inc/cxxabi.h (stddef.h): Comment inclusion.
18078 (__base_class_info::__offset): Comment shift.
18079
18080 2000-04-12 Mark Mitchell <mark@codesourcery.com>
18081
18082 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18083 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18084 (cp_push_exception_identifier): New macro.
18085 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18086 (DECL_BASE_DESTRUCTOR_P): Likewise.
18087 (DECL_DELETING_DESTRUCTOR_P): Likewise.
18088 (get_vtbl_decl_for_binfo): Fix formatting.
18089 (in_charge_arg_for_name): New macro.
18090 (maybe_build_cleanup_and_delete): Remove declaration.
18091 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18092 (in_charge_arg_for_name): New function.
18093 (build_new_method_call): Use it. Handle cloned destructors.
18094 (build_clone): Don't make the base constructor virtual.
18095 Automatically defer generated functions.
18096 (clone_function_decl): Handle destructors, too.
18097 (clone_constructors_and_destructors): Likewise.
18098 (create_vtable_ptr): Don't create a vtable entry for a cloned
18099 function.
18100 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18101 (initialize_predefined_identifiers): Update appropriately.
18102 (finish_destructor_body): Simplify.
18103 (maybe_build_cleanup_and_delete): Remove.
18104 * except.c (expand_throw): Handle new-ABI destructors.
18105 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18106 (build_dtor_call): New function.
18107 (build_delete): Use it. Simplify.
18108 * optimize.c (maybe_clone_body): Handle destructors.
18109 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18110
18111 * exception.cc (cleanup_fn): New typedef.
18112 (CALL_CLEANUP): New macro.
18113 (cp_eh_info): Use them.
18114 (__cp_push_exception): Likewise.
18115 (__cp_pop_exception): Likewise.
18116
18117 2000-04-11 Mark Mitchell <mark@codesourcery.com>
18118
18119 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18120 (complete_dtor_identifier): New macro.
18121 (CLASSTYPE_FIRST_CONVERSION): Remove.
18122 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18123 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18124 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18125 (CLASSTYPE_CONSTRUCTORS): Likewise.
18126 (CLASSTYPE_DESTRUCTORS): Likewise.
18127 (lang_decl): Add cloned_function.
18128 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18129 (DECL_BASE_CONSTRUCTOR_P): Likewise.
18130 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18131 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18132 (DECL_CLONED_FUNCTION_P): Likewise.
18133 (DECL_CLONED_FUNCTION): Likewise.
18134 (clone_function_decl): Declare.
18135 (maybe_clone_body): Likewise.
18136 * call.c (build_user_type_conversion_1): Call complete object
18137 constructors in the new ABI.
18138 (build_new_method_call): Don't add in-charge parameters under the
18139 new ABI.
18140 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18141 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18142 CLASSTYPE_DESTRUCTOR_SLOT.
18143 (build_clone): New function.
18144 (clone_function_decl): Likewise.
18145 (clone_constructors_and_destructors): Likewise.
18146 (check_bases_and_members): Use it.
18147 * decl.c (iniitialize_predefined_identifiers): Initialize
18148 complete_dtor_identifier.
18149 (finish_function): Don't add extra code to a clone.
18150 (lang_mark_tree): Mark cloned_function.
18151 * decl2.c (mark_used): Don't bother trying to instantiate things
18152 we synthesized.
18153 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18154 * method.c (set_mangled_name_for_decl): Don't treat clones as
18155 constructors.
18156 (synthesize_method): Sythesize cloned functions, not the clones.
18157 * optimize.c (inline_data): Update comment on ret_label.
18158 (remap_block): Don't assume DECL_INITIAL exists.
18159 (copy_body_r): Allow ret_label to be NULL.
18160 (maybe_clone_body): Define.
18161 * pt.c (tsubst_decl): Handle clones.
18162 (instantiate_clone): New function.
18163 (instantiate_template): Use it.
18164 (set_mangled_name_for_template_decl): Don't treat clones as
18165 constructors.
18166 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18167 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18168 * semantics.c (expand_body): Clone function bodies as necessary.
18169
18170 * optimize.c (remap_decl): Avoid sharing structure for arrays
18171 whose size is only known at run-time.
18172 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18173
18174 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18175 to has_in_charge_parm_p.
18176 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18177 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18178 (DECL_COPY_CONSTRUCTOR_P): New macro.
18179 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18180 (build_user_type_conversion_1): Likewise.
18181 (convert_like_real): Likewise.
18182 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
18183 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18184 (copy_args_p): Likewise.
18185 (grok_ctor_properties): Likewise.
18186 (start_function): Likewise.
18187 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
18188 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18189 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18190 * method.c (do_build_copy_constructor): Use
18191 DECL_HAS_IN_CHARGE_PARM_P.
18192 (synthesize_method): Likewise.
18193 * pt.c (instantiate_template): Remove goto.
18194 * tree.c (build_cplus_method_type): Remove mention of obstacks in
18195 comment.
18196
18197 * cp-tre.h (finish_function): Change prototype.
18198 * decl.c (end_cleanup_fn): Adjust caller.
18199 (finish_function): Take only one parameter.
18200 * decl2.c (finish_objects): Adjust caller.
18201 (finish_static_storage_duration_function): Likewise.
18202 * method.c (emit_thunk): Likewise.
18203 * parse.y: Likewise.
18204 * parse.c: Regenerated.
18205 * pt.c (instantiate_decl): Likewise.
18206 * rtti.c (synthesize_tinfo_fn): Likewise.
18207 * semantics.c (expand_body): Likewise.
18208
18209 * cp-tree.h (copy_decl): New function.
18210 * class.c (finish_struct_1): Use it.
18211 * lex.c (copy_decl): Define it.
18212 * pt.c (tsubst_decl): Likewise.
18213 * tree.c (copy_template_template_parm): Likewise.
18214
18215 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18216 has_nonpublic_assign_ref.
18217 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18218 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18219 * class.c (finish_struct_methods): Don't set
18220 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18221 (interface_only): Don't declare.
18222 (interface_unknown): Likewise.
18223
18224 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18225
18226 * tree.h (HAVE_TEMPLATES): Remove definition.
18227 * lang-options.h (-fthis-is-variable): Remove documentation.
18228
18229 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
18230
18231 * class.c (instantiate_type): Handle object-relative template-id.
18232
18233 * semantics.c (finish_expr_stmt): Call convert_to_void here.
18234 * decl.c (cplus_expand_expr_stmt): Not here.
18235
18236 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
18237 Initialize exprtype earlier.
18238
18239 * parse.y (fn.def1): Check for defining types in return types.
18240
18241 * decl.c (check_tag_decl): Notice extra fundamental types.
18242 Diagnose empty decls in classes, too.
18243
18244 * decl.c (grokdeclarator): Don't override an anonymous name if no
18245 declarator was given.
18246
18247 * cvt.c (convert_to_void): Call resolve_offset_ref.
18248
18249 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
18250
18251 * decl2.c (decl_namespace): Handle getting a type.
18252
18253 * typeck.c (build_c_cast): Re-enable warning for cast between
18254 pointer and integer of different size.
18255
18256 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
18257
18258 * inc/cxxabi.h (__pointer_type_info): Add restrict and
18259 incomplete flags.
18260 (__pointer_type_info::__pointer_catch): New virtual function.
18261 (__pointer_to_member_type_info): Derive from
18262 __pointer_type_info. Adjust.
18263 (__pointer_to_member_type_info::__do_catch): Remove.
18264 (__pointer_to_member_type_info::__is_pointer_p): Declare.
18265 (__pointer_to_member_type_info::__pointer_catch): Declare.
18266 * rtti.c (qualifier_flags): Add restrict flag.
18267 (ptmd_initializer): Reorder members.
18268 (create_tinfo_types): Expand comments. Reorder
18269 ptmd_desc_type_node members.
18270 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
18271 Implement.
18272 (__pointer_type_info::__do_catch): Move specific code into
18273 __pointer_catch. Call it.
18274 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
18275 specific catch checking. Fix void conversion check.
18276 (__pointer_to_member_type_info::__do_catch): Remove.
18277 (__pointer_to_member_type_info::__pointer_catch): Implement.
18278
18279 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18280
18281 * lex.c (init_parse): Remove traces of classof and headof.
18282 * decl2.c (flag_operator_names): Default to 1.
18283 (lang_decode_option): Do not set it for -ansi.
18284
18285 2000-04-09 Mark Mitchell <mark@codesourcery.com>
18286
18287 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
18288 (DECL_MAIN_VARIANT): Remove.
18289 * decl.c (duplicate_decls): Don't set it.
18290 (start_function): Likewise.
18291 (lang_mark_tree): Don't mark it.
18292 * decl2.c (defer_fn): Don't use it.
18293 * lex.c (retrofit_lang_decl): Don't set it.
18294 * pt.c (tsubst_decl): Likewise.
18295 * ptree.c (print_lang_decl): Don't print it.
18296 * typeck.c (mark_addressable): Don't use it.
18297
18298 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
18299
18300 * vec.cc: Include <new> and <exception>.
18301 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
18302 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
18303 terminate.
18304 (__cxa_vec_delete): Catch dtor exceptions.
18305
18306 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
18307
18308 Prepend __ to implementation defined names.
18309 * inc/typeinfo (type_info): Rename _name to __name.
18310 (type_info::type_info): Rename parameter.
18311 (type_info::operator==, type_info::operator!=,
18312 type_info::before): Likewise.
18313 (type_info::is_pointer_p, type_info::is_function_p,
18314 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
18315 parameters.
18316 * inc/cxxabi.h
18317 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
18318 (__pointer_type_info::__pointer_type_info): Likewise.
18319 (__pointer_type_info::is_pointer_p,
18320 __pointer_type_info::do_catch): Prepend __. Rename parameters.
18321 (__array_type_info::__array_type_info): Rename parameters.
18322 (__function_type_info::__function_type_info): Likewise.
18323 (__function_type_info::is_function_p): Prepend __.
18324 (__enum_type_info::__enum_type_info): Rename parameters.
18325 (__pointer_to_member_type_info::__pointer_to_member_type_info):
18326 Likewise.
18327 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
18328 parameters.
18329 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
18330 (__class_type_info::__class_type_info): Rename parameters.
18331 (__class_type_info::sub_kind): Prepend __. Adjust member names.
18332 (__class_type_info::upcast_result,
18333 __class_type_info::dyncast_result): Prepend __. Move definition
18334 into tinfo.cc.
18335 (__class_type_info::do_upcast, __class_type_info::do_catch,
18336 __class_type_info::find_public_src,
18337 __class_type_info::do_dyncast,
18338 __class_type_info::do_find_public_src): Prepend __. Rename
18339 parameters.
18340 (__si_class_type_info::__si_class_type_info): Rename parameters.
18341 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
18342 __si_class_type_info::do_find_public_src): Prepent __. Rename
18343 parameters.
18344 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
18345 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
18346 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
18347 parameters.
18348 (__dynamic_cast): Rename parameters.
18349 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
18350 type_info::do_catch, type_info::do_upcast): Prepend __.
18351 (contained_p, public_p, virtual_p, contained_public_p,
18352 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
18353 (__class_type_info::do_catch,
18354 __class_type_info::do_upcast): Prepend __. Adjust.
18355 (__class_type_info::__upcast_result,
18356 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
18357 Adjust.
18358 (__class_type_info::find_public_src): Prepend __. Adjust.
18359 (__class_type_info::do_find_public_src,
18360 __si_class_type_info::do_find_public_src,
18361 __vmi_class_type_info::do_find_public_src): Likewise.
18362 (__class_type_info::do_dyncast,
18363 __si_class_type_info::do_dyncast,
18364 __vmi_class_type_info::do_dyncast): Likewise.
18365 (__class_type_info::do_upcast,
18366 __si_class_type_info::do_upcast,
18367 __vmi_class_type_info::do_upcast): Likewise.
18368 (__dynamic_cast): Adjust.
18369 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
18370 (__function_type_info::is_function_p): Likewise.
18371 (__pointer_type_info::do_catch): Likewise. Adjust.
18372 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
18373 (__throw_type_match_rtti_2): Adjust.
18374 (__is_pointer): Adjust.
18375
18376 2000-04-08 Mark Mitchell <mark@codesourcery.com>
18377
18378 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
18379 (complete_ctor_identifier): New macro.
18380 (special_function_kind): Add sfk_copy_constructor and
18381 sfk_assignment_operator.
18382 (LOOKUP_HAS_IN_CHARGE): Remove.
18383 (cons_up_default_function): Rename to ...
18384 (implicitly_declare_fn): ... this.
18385 * call.c (build_new_method_call): Add in-charge parameters for
18386 constructors here.
18387 * class.c (add_implicitly_declared_members): Change parameter name
18388 from cant_have_assignment to cant_have_const_assignment.
18389 Replace calls to cons_up_default_function to implicitly_declare_fn.
18390 * cvt.c (ocp_convert): Use complete_ctor_identifier.
18391 * decl.c (initialize_predefined_identifiers): Initialize it.
18392 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
18393 complex expression.
18394 * init.c (expand_default_init): Don't calculate the in-charge
18395 parameter here.
18396 (build_new_1): Likewise.
18397 * lex.c (cons_up_default_function): Move to method.c.
18398 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
18399 (implicitly_declare_fn): New function.
18400 * typeck.c (build_static_cast): Use complete_ctor_identifier.
18401 (build_modify_expr): Likewise.
18402 * typeck2.c (build_functional_cast): Likewise.
18403
18404 Under the new ABI, constructors don't return `this'.
18405 * cp-tree.h (warn_reorder): Declare.
18406 (special_function_kind): New enum.
18407 (global_base_init_list): Remove declaration.
18408 (emit_base_init): Don't return a value.
18409 (check_base_init): Don't declare.
18410 (is_aggr_typedef): Likewise.
18411 * decl.c (check_special_function_return_type): New function.
18412 (return_types): Remove.
18413 (grokdeclarator): Use check_special_function_return_type.
18414 (start_function): Don't initialize ctor_label under the new ABI.
18415 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
18416 * init.c (begin_init_stmts): Move to top of file.
18417 (finish_init_stmts): Likewise.
18418 (warn_reorder): Don't declare.
18419 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
18420 value.
18421 (check_base_init): Remove.
18422 (is_aggr_typedef): Likewise.
18423 (build_new_1): Don't use the return value of a constructor.
18424 * semantics.c (setup_vtbl_ptr): Don't use the return value
18425 of emit_base_init.
18426 * typeck.c (check_return_expr): Don't magically convert return
18427 statements into `return this' in constructors under the new ABI.
18428
18429 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
18430 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
18431 (base_ctor_identifier): New macro.
18432 (base_dtor_identifier): Likewise.
18433 (deleting_dtor_identifier): Likewise.
18434 * decl.c: Don't include obstack.h.
18435 (obstack_chunk_alloc): Don't define.
18436 (obstack_chunk_free): Likewise.
18437 (struct predefined_identifier): New type.
18438 (initialize_predefined_identifiers): New function.
18439 (init_decl_processing): Use it.
18440 (debug_temp_inits): Remove.
18441 (start_method): Don't call preserve_data.
18442 (hack_incomplete_structures): Update comment.
18443 * init.c (init_init_processing): Don't initialize
18444 nelts_identifier.
18445 (build_offset_rf): Remove dead code.
18446 (build_delete): Use CLASSTYPE_N_BASECLASSES.
18447 * search.c (init_search_processing): Don't initialize
18448 vptr_identifier.
18449
18450 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18451
18452 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
18453 some sign_compare warnings.
18454
18455 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
18456
18457 Rename abi::__vmi_class_type_info members.
18458 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
18459 base_list, detail_masks members to vmi_flags, vmi_base_count,
18460 vmi_bases and vmi_flags_masks respectively.
18461 (__vmi_class_type_info::vmi_flags_masks): Rename
18462 details_unknown_mask to flags_unknown_mask.
18463 * tinfo.cc (__class_type_info::do_upcast): Adjust.
18464 (__vmi_class_type_info::do_find_public_src): Adjust.
18465 (__vmi_class_type_info::do_dyncast): Adjust.
18466 (__vmi_class_type_info::do_upcast): Adjust.
18467
18468 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
18469
18470 * tinfo.cc (convert_to_base): New function.
18471 (get_vbase_offset): Remove. Move into convert_to_base.
18472 (__vmi_class_type_info::do_find_public_src): Adjust.
18473 (__vmi_class_type_info::do_dyncast): Adjust.
18474 (__vmi_class_type_info::do_upcast): Adjust.
18475
18476 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
18477
18478 * tinfo.cc (operator=): Use __builtin_strcmp.
18479 * tinfo2.cc (before): Likewise.
18480
18481 2000-04-06 Mark Mitchell <mark@codesourcery.com>
18482
18483 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
18484 (DECL_SAVED_INLINE): Rename to ...
18485 (DECL_DEFERRED_FN): ... this.
18486 (in_function_p): Remove declaration.
18487 (mark_inline_for_output): Rename to ...
18488 (defer_fn): ... this.
18489 * decl.c (finish_function): Adjust call to mark_inline_for_output.
18490 (in_function_p): Remove definition.
18491 * decl2.c (saved_inlines): Rename to ...
18492 (deferred_fns): ... this.
18493 (saved_inlines_used): Rename to ...
18494 (deferred_fns_used): ... this.
18495 (mark_inline_for_output): Rename to ...
18496 (defer_fn): ... this.
18497 (finish_file): Adjust accordingly.
18498 (init_decl2): Likewise.
18499 * lex.c (cons_up_default_function): Likewise.
18500 * pt.c (mark_decl_instantiated): Likewise.
18501 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
18502 circumstances.
18503 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
18504 * semantics.c (expand_body): Defer more functions.
18505
18506 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
18507
18508 * vec.cc: New file.
18509 * Make-lang.in (CXX_LIB2FUNCS): Add it.
18510 (vec.o): Build it.
18511 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18512 __cxa_vec_delete): Declare.
18513
18514 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
18515
18516 * rtti.c (dfs_class_hint_mark): New static function.
18517 (dfs_class_hint_unmark): New static function.
18518 (class_hint_flags): Use them.
18519
18520 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
18521
18522 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
18523
18524 2000-04-05 Mark Mitchell <mark@codesourcery.com>
18525
18526 * cp-tree.h (instantiate_decl): Change prototype.
18527 * decl2.c (mark_used): Adjust call.
18528 * optimize.c (inlinable_function_p): Adjust handling of templates.
18529 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
18530 (do_type_instantiation): Likewise.
18531 (instantiate_decl): Defer more templates.
18532 (instantiate_pending_templates): Adjust logic to handle inline
18533 friend functions.
18534
18535 * Makefile.in (GGC_H): New variable. Use it throughout in place
18536 of ggc.h.
18537
18538 * call.c: Don't include obstack.h. Include ggc.h.
18539 (obstack_chunk_alloc): Don't define.
18540 (obstack_chunk_free): Likewise.
18541 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
18542 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
18543 (pop_switch): Free it.
18544
18545 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
18546
18547 * dump.c (dequeue_and_dump): Don't try to print the bit_position
18548 if we don't have a DECL_FIELD_OFFSET.
18549
18550 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
18551
18552 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
18553 special_function_p.
18554
18555 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18556
18557 * cfns.gperf (hash, libc_name_p): Prototype.
18558
18559 * rtti.c (build_dynamic_cast_1): Constification.
18560
18561 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
18562
18563 * semantics.c (deferred_type_access_control): Prototype.
18564
18565 2000-04-04 Mark Mitchell <mark@codesourcery.com>
18566
18567 Correct many new ABI issues regarding vbase and vcall offset
18568 layout.
18569 * cp-tree.h (BINFO_VTABLE): Document.
18570 (struct lang_type): Tweak formatting.
18571 (BINFO_PRIMARY_BINFO): Add to documentation.
18572 (CLASSTYPE_VSIZE): Fix typo in comment.
18573 (CLASSTYPE_VBASECLASSES): Update documentation.
18574 (BINFO_VBASE_MARKED): Remove.
18575 (SET_BINFO_VBASE_MARKED): Likewise.
18576 (CLEAR_BINFO_VBASE_MARKED): Likewise.
18577 (BINFO_FIELDS_MARKED): Remove.
18578 (SET_BINFO_FIELDS_MARKED): Likewise.
18579 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
18580 (enum access_kind): New enumeration.
18581 (num_extra_vtbl_entries): Remove declaration.
18582 (size_extra_vtbl_entries): Likewise.
18583 (get_vtbl_decl_for_binfo): New function.
18584 (dfs_vbase_unmark): Remove declaration.
18585 (mark_primary_bases): Likewise.
18586 * class.c (SAME_FN): Remove.
18587 (struct vcall_offset_data_s): Move definition.
18588 (build_vbase_pointer): Use `build', not `build_binary_op', to
18589 access the vbase pointer under the new ABI.
18590 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
18591 (build_primary_vtable): Likewise.
18592 (dfs_mark_primary_bases): Move here from search.c.
18593 (mark_primary_bases): Likewise.
18594 (determine_primary_bases): Under the new ABI, don't make a base
18595 class a primary base just because we don't yet have any virtual
18596 functions.
18597 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
18598 (num_vfun_entries): Remove.
18599 (dfs_count_virtuals): Likewise.
18600 (num_extra_vtbl_entries): Likewise.
18601 (size_extra_vtbl_entries): Likewise.
18602 (layout_virtual_bases): Iterate in inheritance graph order under
18603 the new ABI.
18604 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
18605 indicate that a vfield is present.
18606 (init_class_processing): Initialize access_public_node, etc., from
18607 ak_public, etc.
18608 (get_vtbl_decl_for_binfo): New function.
18609 (dump_class_hierarchy_r): Likewise.
18610 (dump_class_hierarchy): Use it.
18611 (finish_vtbls): Build the vtbls in inheritance graph order.
18612 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18613 (initialize_vtable): Use get_vtbl_decl_for_binfo.
18614 (accumulate_vtbl_inits): Add comments explaining why a pre-order
18615 walk is required.
18616 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
18617 where the vptr points, even for primary vtables.
18618 (build_vtbl_initializer): Adjust handling of vbase and vcall
18619 offsets.
18620 (build_vcall_and_vbase_vtable_entries): New function.
18621 (dfs_build_vbase_offset_vtbl_entries): Remove.
18622 (build_vbase_offset_vtbl_entries): Reimplement.
18623 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
18624 were already handled in a primary base class vtable.
18625 (build_vcall_offset_vtbl_entries): Adjust.
18626 (build_rtti_vtbl_entries): Adjust.
18627 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
18628 * init.c (expand_virtual_init): Simplify.
18629 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
18630 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
18631 * search.c (BINFO_ACCESS): New macro.
18632 (SET_BINFO_ACCESS): Likewise.
18633 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
18634 (access_in_type): Likewise.
18635 (dfs_accessible_p): Likewise.
18636 (protected_accessible_p): Likewise.
18637 (lookup_fnfields_1): Adjust documentation.
18638 (dfs_mark_primary_bases): Move to class.c
18639 (mark_primary_bases): Likewise.
18640 (dfs_vbase_unmark): Remove.
18641 (virtual_context): Use BINFO_FOR_VBASE.
18642 (dfs_get_vbase_types): Simplify.
18643 (dfs_build_inheritance_graph_order): New function.
18644 (get_vbase_types): Use it.
18645 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
18646
18647 * tinfo.cc (get_vbase_offset): New function.
18648 (__vmi_class_type_info::do_find_public_src): Use it.
18649 (__vmi_class_type_info::do_dyncast): Likewise.
18650 (__vmi_class_type_info::do_upcast): Likewise.
18651
18652 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
18653
18654 * lang-specs.h: Pass -fno-show-column to the preprocessor.
18655
18656 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
18657
18658 * rtti.c (class_hint_flags): Rename flags.
18659 (class_initializer): Remove flags.
18660 (synthesize_tinfo_var): Combine offset and flags. Add flags
18661 for __vmi_class_type_info.
18662 (create_tinfo_types): Remove flags from __class_type_info and
18663 __si_class_type_info. Merge flags and offset from
18664 base_class_type_info.
18665 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
18666 (__base_class_info::is_virtual_p): Adjust.
18667 (__base_class_info::is_public_p): Adjust.
18668 (__base_class_info::offset): New accessor.
18669 (__class_type_info::details): Remove member.
18670 (__class_type_info::__class_type_info): Lose details.
18671 (__class_type_info::detail_masks): Remove.
18672 (__si_class_type_info::__si_class_type_info): Lose details.
18673 (__vmi_class_type_info::details): New member.
18674 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
18675 (__vmi_class_type_info::detail_masks): New member.
18676 * tinfo.cc (__class_type_info::do_upcast): Initialize result
18677 with unknown_details_mask.
18678 (__vmi_class_type_info::do_find_public_src): Adjust
18679 (__vmi_class_type_info::do_dyncast): Adjust.
18680 (__vmi_class_type_info::do_upcast): Set result details, if
18681 needed. Adjust.
18682 (__dynamic_cast): Temporarily #if out optimization.
18683
18684 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
18685
18686 * rtti.c (get_tinfo_decl): Mark used.
18687 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
18688 mark as dealt with, if we output it.
18689
18690 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18691
18692 * class.c: Reorganize to put virtual function table initialization
18693 machinery at the end of the file.
18694
18695 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
18696
18697 * class.c (finish_struct): Use bitsize_zero_node.
18698 * pt.c (instantiate_class_template): Likewise.
18699
18700 2000-03-28 Mark Mitchell <mark@codesourcery.com>
18701
18702 Put RTTI entries at negative offsets in new ABI.
18703 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
18704 vbase offset at index -3, not -1.
18705 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
18706 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
18707 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
18708 (build_rtti_vtbl_entries): New function.
18709 (set_rtti_entry): Remove.
18710 (build_primary_vtable): Don't use it.
18711 (build_secondary_vtable): Likewise.
18712 (start_vtable): Remove.
18713 (first_vfun_index): New function.
18714 (set_vindex): Likewise.
18715 (add_virtual_function): Don't call start_vtable. Do call
18716 set_vindex.
18717 (set_primary_base): Rename parameter.
18718 (determine_primary_base): Likewise.
18719 (num_vfun_entries): Don't use skip_rtti_stuff.
18720 (num_extra_vtbl_entries): Include RTTI information.
18721 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
18722 (skip_rtti_stuff): Remove.
18723 (dfs_modify_vtables): Don't use it.
18724 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
18725 (layout_nonempty_base_or_field): Update size handling.
18726 (create_vtable_ptr): Tweak.
18727 (layout_class_type): Adjust parameter names.
18728 (finish_struct_1): Simplify.
18729 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
18730 (skip_rtti_stuff): Remove.
18731 (first_vfun_index): New function.
18732 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18733 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
18734 (marked_vtable_pathp): Declare.
18735 (unmarked_vtable_pathp): Likewise.
18736 * error.c (dump_expr): Use first_vfun_index to calculate vtable
18737 offsets.
18738 * rtti.c (build_headof): Look for RTTI at negative offsets.
18739 (get_tinfo_decl_dynamic): Likewise.
18740 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
18741 here.
18742 (create_pseudo_type_info): Do it here instead. Adjust so that
18743 vptr points at first virtual function.
18744 * search.c (marked_vtable_pathp): Make it global.
18745 (unmarked_vtable_pathp): Likewise.
18746 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18747 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18748 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
18749 (get_pure_virtuals): Likewise.
18750 (expand_upcast_fixups): Likewise.
18751 * tree.c (debug_binfo): Likewise.
18752 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
18753 negative offset.
18754
18755 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18756
18757 * class.c (check_field_decl): Fix typo.
18758 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
18759 (check_methods): Likewise.
18760 (check_field_decls): Likewise.
18761 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
18762 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
18763 Use DECL_RESULT_FLD, not DECL_RESULT.
18764 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
18765 * lex.c (identifier_type): Likewise.
18766 * pt.c (determine_specialization, lookup_template_class): Likewise.
18767 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
18768 (resolve_overloaded_unification, more_specialized): Likewise.
18769 * semantics.c (finish_member_declaration): Likewise.
18770 * typeck.c (build_x_function_call): Likewise.
18771
18772 2000-03-26 Mark Mitchell <mark@codesourcery.com>
18773
18774 * class.c (layout_empty_base): Handle empty bases with non-byte
18775 alignment.
18776 (build_base_field): Likewise.
18777 (layout_virtual_bases): Likewise.
18778
18779 * class.c (finish_struct_1): Fix typo in this change:
18780
18781 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18782
18783 2000-03-25 Mark Mitchell <mark@codesourcery.com>
18784
18785 * decl.c (grokdeclarator): Count partial specializations when
18786 keeping track of how many template classes have been seen.
18787
18788 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
18789
18790 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18791
18792 * class.c (build_vbase_pointer_fields): layout_field now place_field.
18793 (get_vfield_offset): Use byte_position.
18794 (set_rtti_entry): Set OFFSET to ssizetype zero.
18795 (get_binfo_offset_as_int): Deleted.
18796 (dfs_record_base_offsets): Use tree_low_cst.
18797 (dfs_search_base_offsets): Likewise.
18798 (layout_nonempty_base_or_field): Reflect changes in RLI format
18799 and call byte_position.
18800 (layout_empty_base): Convert offset to ssizetype.
18801 (build_base_field): use rli_size_unit_so_far.
18802 (dfs_propagate_binfo_offsets): Do computation in proper type.
18803 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
18804 (layout_class_type): Reflect changes in RLI names and fields.
18805 (finish_struct_1): Set DECL_FIELD_OFFSET.
18806 * dump.c (dequeue_and_dump): Call bit_position.
18807 * expr.c (cplus_expand_constant): Use byte_position.
18808 * rtti.c (expand_class_desc): Use bitsize_one_node.
18809 * typeck.c (build_component_addr): Use byte_position and don't
18810 special case for zero offset.
18811
18812 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
18813
18814 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
18815
18816 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
18817 tinfo object.
18818 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
18819 vtable.
18820
18821 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18822
18823 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
18824 DECL_P macros.
18825 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
18826 make_typename_type, check_initializer, cp_finish_decl,
18827 xref_tag): Likewise.
18828 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
18829 decl_namespace, arg_assoc_template_arg, arg_assoc,
18830 validate_nonmember_using_decl, do_class_using_decl): Likewise.
18831 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
18832 args_to_string): Likewise.
18833 * friend.c (is_friend): Likewise.
18834 * lex.c (note_got_semicolon, note_list_got_semicolon,
18835 is_global): Likewise.
18836 * method.c (build_overload_nested_name, build_overload_value,
18837 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
18838 * parse.y (typename_sub, typename_sub1): Likewise.
18839 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
18840 process_partial_specialization, convert_template_argument,
18841 template_args_equal, add_pending_template, lookup_template_class,
18842 for_each_template_parm_r, maybe_fold_nontype_arg,
18843 tsubst, instantiate_template, type_unification_real, unify,
18844 instantiate_pending_templates, set_mangled_name_for_template_decl):
18845 Likewise.
18846 * repo.c (repo_get_id, repo_template_used): Likewise.
18847 * search.c (lookup_field_1): Likewise.
18848 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
18849 * xref.c (classname): Likewise.
18850
18851 2000-03-22 Mark Mitchell <mark@codesourcery.com>
18852
18853 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
18854 (CANONICAL_BINFO): New macro.
18855 (BINFO_NEW_VTABLE_MARKED): Use it.
18856 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
18857 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
18858 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
18859 not TREE_TYPE.
18860 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18861 (build_secondary_vtable): Likewise.
18862 (dfs_finish_vtbls): Likewise.
18863 (dfs_accumulate_vtbl_inits): Likewise.
18864 (accumulate_vtbl_inits): New function.
18865 (finish_vtbls): Make sure that virtual bases come after
18866 non-virtual bases in the vtable group.
18867 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
18868 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18869 * search.c (struct vbase_info): Move definition.
18870 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18871 (unmarked_new_vtable_p): Likewise.
18872 (dfs_mark_vtable_path): Remove.
18873 (dfs_mark_new_vtable): Remove.
18874 (dfs_unmark_new_vtable): Likewise.
18875 (dfs_clear_search_slot): Likewise.
18876 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18877 (dfs_clear_vbase_slots): Likewise.
18878 (init_vbase_pointers): LIkewise.
18879
18880 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
18881
18882 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
18883 SIZETYPE to a non-SIZETYPE.
18884
18885 2000-03-21 Mark Mitchell <mark@codesourcery.com>
18886
18887 * class.c (layout_virtual_bases): Adjust names in conditionally
18888 compiled code.
18889
18890 * class.c (record_base_offsets): New function.
18891 (layout_conflict_p): Likewise.
18892 (layout_nonempty_base_or_field): Use it.
18893 (layout_empty_base): New function.
18894 (build_base_field): Use it.
18895 (build_base_fields): Update comment.
18896 (layout_virtual_bases): Fold in a little code form
18897 layout_basetypes. Use layout_empty_base.
18898 (layout_basetypes): Remove.
18899 (end_of_class): New function.
18900 (layout_class_type): Use it. Adjust.
18901
18902 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
18903 (fntype_p): Remove.
18904 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
18905 comment.
18906 (dfs_skip_nonprimary_vbases_markedp): Likewise.
18907 * typeck.c (fntype_p): Remove.
18908
18909 * cp-tree.h (TI_SPEC_INFO): Remove.
18910 (CLASSTYPE_TI_SPEC_INFO): Likewise.
18911 * pt.c (process_partial_specialization): Likewise.
18912
18913 * class.c (build_base_field): Fix thinko in computation of binfo
18914 offsets.
18915
18916 * tree.c (mark_local_for_remap_p): Mark variables declared in
18917 TARGET_EXPRs as well.
18918
18919 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
18920
18921 * typeck.c (require_complete_type, complete_type,
18922 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
18923 build_array_ref, convert_arguments, pointer_diff,
18924 build_x_unary_op, build_unary_op, build_c_cast,
18925 build_modify_expr): Use COMPLETE_TYPE_P etc.
18926 * call.c (is_complete, convert_like_real,
18927 build_new_method_call): Likewise.
18928 * class.c (build_vbase_pointer_fields, check_bases,
18929 build_base_field, finish_struct_1, pushclass): Likewise.
18930 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
18931 * decl.c (maybe_process_template_type_declaration, pushtag,
18932 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
18933 layout_var_decl, check_initializer, cp_finish_decl,
18934 grokdeclarator, require_complete_types_for_parms,
18935 grok_op_properties, xref_tag, xref_basetypes,
18936 check_function_type): Likewise.
18937 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
18938 * friend.c (do_friend): Likewise.
18939 * init.c (build_offset_ref): Likewise.
18940 * parse.y (structsp): Likewise.
18941 * pt.c (maybe_process_partial_specialization,
18942 tsubst_friend_function, instantiate_class_template, tsubst,
18943 do_type_instantiation, instantiate_pending_templates): Likewise.
18944 * repo.c (repo_get_id): Likewise.
18945 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
18946 synthesize_tinfo_var, emit_support_tinfos): Likewise.
18947 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
18948 * semantics.c (begin_class_definition): Likewise.
18949 * tree.c (build_cplus_method_type): Likewise.
18950 * typeck2.c (digest_init, build_functional_cast,
18951 add_exception_specifier): Likewise.
18952 * parse.h, parse.c: Regenerated.
18953
18954 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
18955
18956 * inc/cxxabi.h: New header file. Define new-abi entry points.
18957 (__pointer_type_info::target): Rename member to ...
18958 (__pointer_type_info::type): ... here.
18959 (__base_class_info::type): Rename member to ...
18960 (__base_class_info::base): ... here.
18961 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
18962 * cp-tree.h (CPTI_ABI): New global tree enumeration.
18963 (abi_node): New global tree node.
18964 * decl.c (abi_node): Document.
18965 (init_decl_processing): Initialize abi_node.
18966 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
18967 (get_vmi_pseudo_type_info): Likewise.
18968 (create_tinfo_types): Likewise.
18969 (emit_support_tinfos): Likewise.
18970 * tinfo.h (cxxabi.h): Include for new-abi.
18971 Move rtti class definitions to new header file.
18972 * tinfo.cc (abi): Use the namespace.
18973 (std): Move new abi rtti classes from here ...
18974 (__cxxabiv1): ... to here.
18975 * tinfo2.cc (cxxabi.h): Include for new-abi.
18976 Move rtti class definitions to new header file.
18977 (std): Move new abi rtti classes from here ...
18978 (__cxxabiv1): ... to here.
18979 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
18980 namespace.
18981
18982 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
18983 Jason Merrill <jason@casey.cygnus.com>
18984
18985 * method.c (build_overload_int): Use host_integerp.
18986
18987 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18988
18989 * init.c (build_offset_ref): Handle the case of a templated member
18990 function.
18991
18992 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18993
18994 * except.c (expand_exception_blocks): Clear catch_clauses_last.
18995
18996 2000-03-18 Mark Mitchell <mark@codesourcery.com>
18997
18998 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
18999 * class.c (check_bitfield_decl): Turn illegal bitfields into
19000 non-bitfields.
19001 (dfs_propagate_binfo_offsets): Adjust for new size_binop
19002 semantics.
19003 (dfs_offset_for_unshared_vbases): Likewise.
19004 * cvt.c (cp_convert_to_pointer): Convert NULL to a
19005 pointer-to-member correctly under the new ABI.
19006 * expr.c (cplus_expand_constant): Don't use cp_convert when
19007 turning an offset into a pointer-to-member.
19008 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19009 when dereferencing them under the new ABI.
19010 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19011 of pointers-to-members under the new ABI.
19012
19013 * class.c (check_bitfield_decl): Remove restriction on really long
19014 bitfields.
19015 (layout_class_type): Implement new ABI handling of bitfields
19016 longer than their types.
19017
19018 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19019
19020 * parse.y (extdefs): Call ggc_collect.
19021 * parse.c: Regenerated.
19022
19023 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
19024
19025 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19026 (note_name_declared_in_class): Use OVL_CURRENT to get at a
19027 potential overload.
19028
19029 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19030
19031 * class.c (build_vbase_path): Use integer_zerop.
19032 (build_vtable_entry): Use tree_low_cst.
19033 (get_vfield_offset): Use bit_position.
19034 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19035 Use tree_low_cst.
19036 (check_bitfield_decl): Set DECL_SIZE using convert.
19037 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19038 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19039 Use tree_low_cst.
19040 (finish_struct_1): Use bit_position.
19041 (dump_class_hierarchy): Use tree_low_cst.
19042 * cp-tree.h (min_precision): Add declaration.
19043 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19044 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19045 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19046 * expr.c (cplus_expand_constant): Use bit_position.
19047 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19048 * rtti.c (get_base_offset): Use bit_position.
19049 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19050 host_integerp, and tree_low_cst.
19051 (pointer_int_sum): Use integer_zerop.
19052 (build_component_addr): Use bit_position.
19053
19054 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
19055
19056 * typeck.c (require_complete_type): Don't assume size_zero_node.
19057 (complete_type_or_else): Likewise.
19058
19059 2000-03-16 Steven Grady <grady@digitaldeck.com>
19060 Jason Merrill <jason@casey.cygnus.com>
19061
19062 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19063
19064 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
19065
19066 * decl2.c (grokfield): Bail out if type is error_mark_node.
19067
19068 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19069
19070 * tinfo2.cc (__ptr_to_member_data): Rename to ...
19071 (__pointer_to_member_data): ... here. Adjust.
19072 * rtti.c (create_tinfo_types): Adjust.
19073
19074 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19075
19076 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19077 * decl.c (ref_desc_type_node): Undocument.
19078 * rtti.c (ptr_ref_initializer): Rename to ...
19079 (ptr_initializer): ... here. Adjust comments.
19080 (ptmd_initializer): Fix comment thinko.
19081 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19082 (create_tinfo_types): Remove ref_desc_type_node init.
19083 * tinfo2.cc (__reference_type_info): Remove.
19084
19085 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
19086
19087 * decl.c (cp_finish_decl): Remove obsolete comment.
19088
19089 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19090
19091 2000-03-14 Mark Mitchell <mark@codesourcery.com>
19092
19093 * cp-tree.h: Tweak documentation.
19094 * class.c (build_vbase_pointer_fields): Layout the fields, too.
19095 (avoid_overlap): Remove.
19096 (get_binfo_offset_as_int): New function.
19097 (dfs_serach_base_offsets): Likewise.
19098 (layout_nonempty_base_or_field): Likewise.
19099 (build_base_field): Layout fields here. Avoid placing two objects
19100 of the same type at the same address, under the new ABI.
19101 (build_base_fields): Adjust accordingly.
19102 (create_vtable_ptr): Return the new field, but don't attach it to
19103 TYPE_FIELDS.
19104 (remove_base_field): Remove.
19105 (remove_base_fields): Remove.
19106 (layout_basetypes): Adjust accordingly.
19107 (layout_class_type): Call layout_field for each field, rather than
19108 just making a wholesale call to layout_type.
19109
19110 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
19111
19112 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19113
19114 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
19115
19116 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19117
19118 * except.c (dtor_nothrow): New fn.
19119 (do_pop_exception): Use it. Take type parm.
19120 (push_eh_cleanup): Take type parm.
19121 (expand_start_catch_block): Pass it.
19122 (build_eh_type_type_ref): Accept null type.
19123
19124 2000-03-12 Mark Mitchell <mark@codesourcery.com>
19125
19126 * cp-tree.h (revert_static_member_fn): Change prototype.
19127 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19128 (grok_op_properties): Likewise.
19129 (start_function): Likewise.
19130 (revert_static_member_fn): Simplify.
19131 * pt.c (check_explicit_specialization): Adjust call to
19132 revert_static_member_fn.
19133
19134 2000-03-11 Mark Mitchell <mark@codesourcery.com>
19135
19136 * cp-tree.h (scope_kind): New type.
19137 (tmpl_spec_kind): Likewise.
19138 (declare_pseudo_global_level): Remove.
19139 (pseudo_global_level_p): Rename to template_parm_scope_p.
19140 (pushlevel): Remove declaration.
19141 (begin_scope): New function.
19142 (finish_scope): Likewise.
19143 (current_tmpl_spec_kind): Likewise.
19144 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19145 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
19146 Add template_spec_p.
19147 (toplevel_bindings_p): Adjust.
19148 (declare_pseudo_global_level): Remove.
19149 (pseudo_global_level_p): Rename to template_parm_scope_p.
19150 (current_tmpl_spec_kind): New function.
19151 (begin_scope): Likewise.
19152 (finish_scope): Likewise.
19153 (maybe_push_to_top_level): Adjust.
19154 (maybe_process_template_type_declaration): Likewise.
19155 (pushtag): Likewise.
19156 (pushdecl_nonclass_level): Likewise.
19157 (lookup_tag): Likewise.
19158 (grokfndecl): Handle member template specializations. Share
19159 constructor and non-constructor code.
19160 * decl2.c (check_classfn): Handle member template specializations.
19161 * pt.c (begin_template_parm_list): Use begin_scope.
19162 (begin_specialization): Likewise.
19163 (end_specialization): Likewise.
19164 (check_explicit_specialization): Use current_tmpl_spec_kind.
19165 Handle member template specializations.
19166 (end_template_decl): Use finish_scope. Remove call to
19167 get_pending_sizes.
19168 (push_template_decl_real): Remove bogus error message.
19169 (tsubst_decl): Fix typo in code contained in comment.
19170 (instantiate_template): Handle member template specializations.
19171 (most_general_template): Likewise.
19172
19173 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
19174
19175 * lex.c (whitespace_cr): Compress consecutive calls to warning().
19176 (do_identifier): Ditto for error().
19177
19178 * pt.c (convert_nontype_argument): Ditto for cp_error().
19179 (convert_template_argument): Ditto for cp_pedwarn().
19180
19181 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
19182
19183 * exception.cc (__check_null_eh_spec): New fn.
19184 * except.c (expand_end_eh_spec): Call it if the spec is throw().
19185
19186 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
19187
19188 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19189 * except.c (expand_end_eh_spec): Add the return type.
19190 * rtti.c (throw_bad_cast): Add the parmtypes.
19191 (throw_bad_typeid): Likewise.
19192
19193 * semantics.c (expand_stmt): Only leave out rtl for unused
19194 artificials, and set DECL_IGNORED_P on them as well.
19195 * decl.c (wrapup_globals_for_namespace): Likewise.
19196
19197 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
19198
19199 * decl.c (maybe_commonize_var): Skip all artificial decls.
19200 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19201
19202 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
19203
19204 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19205 * cp-tree.h: Declare flag_enforce_eh_specs.
19206 * decl.c (store_parm_decls, finish_function): Check it.
19207
19208 C library functions don't throw.
19209 * Makefile.in (cfns.h): New target.
19210 (except.o): Depend on it.
19211 * Make-lang.in (cc1plus): Depend on cfns.gperf.
19212 * cfns.gperf: New file.
19213 * cfns.h: Generated.
19214 * except.c: Include it.
19215 (nothrow_libfn_p): New fn.
19216 * decl.c (grokfndecl): Use it.
19217 * cp-tree.h: Declare it.
19218
19219 * decl.c (push_overloaded_decl_1, auto_function,
19220 define_function): Lose.
19221 (build_library_fn_1): New static fn.
19222 (builtin_function): Use it.
19223 (get_atexit_node): Use build_library_fn_ptr.
19224 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19225 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
19226 push_void_library_fn, push_throw_library_fn): New fns.
19227 * cp-tree.h: Declare them.
19228 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
19229 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
19230 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
19231 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
19232 * rtti.c (build_runtime_decl): Lose.
19233 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
19234 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
19235 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
19236
19237 * call.c (build_call): Remove result_type parm.
19238 Call mark_used on unused artificial fns.
19239 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
19240
19241 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
19242
19243 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
19244 appropriate.
19245 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
19246 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
19247 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
19248 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
19249 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
19250 expand_generic_desc): Likewise.
19251
19252 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19253
19254 * exception.cc (__cp_pop_exception): Cleanup the original object.
19255
19256 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19257
19258 * decl.c (grok_op_properties): Merge conversion to void warning
19259 with other silly op warnings.
19260
19261 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
19262
19263 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
19264 array CONSTRUCTOR elements. Don't use expr_tree_cons.
19265
19266 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19267
19268 * decl.c (cp_make_fname_decl): New function.
19269 (wrapup_globals_for_namespace): Don't emit unused static vars.
19270 (init_decl_processing): Remove comment about use of
19271 array_domain_type. Set make_fname_decl.
19272 (cp_finish_decl): Remove __FUNCTION__ nadgering.
19273 * semantics.c (begin_compound_stmt): Remove
19274 current_function_name_declared flagging.
19275 (expand_stmt): Don't emit unused local statics.
19276 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
19277 specially.
19278
19279 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
19280
19281 * typeck.c (convert_for_assignment): Don't look at array
19282 initializer.
19283 * call.c (convert_like_real): Likewise.
19284
19285 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
19286
19287 Add initial support for '\uNNNN' specifier.
19288 * lex.c (read_ucs): New fn.
19289 (readescape, skip_white_space): Call it.
19290 (is_extended_char, is_extended_char_1): New fns.
19291 (utf8_extend_token): New fn, #if 0'd out.
19292 (real_yylex): Treat extended chars like letters.
19293
19294 * search.c (note_debug_info_needed): Walk the bases even if we
19295 weren't deferring the type itself.
19296
19297 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19298
19299 * decl2.c (finish_objects): Constify a char*.
19300
19301 * method.c (emit_thunk): Likewise.
19302
19303 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
19304
19305 * typeck.c (dubious_conversion_warnings): Look through
19306 REFERENCE_TYPE.
19307
19308 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19309
19310 * class.c (dfs_modify_vtables): I is now unsigned.
19311 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
19312 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
19313 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
19314 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
19315 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
19316 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
19317 Call integer_all_onesp.
19318 * typeck2.c (process_init_constructor): Use compare_tree_int.
19319
19320 * lang-specs.h (as): Don't call if -syntax-only.
19321
19322 2000-03-06 Mark Mitchell <mark@codesourcery.com>
19323
19324 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
19325 RTL_EXPR_HAS_NO_SCOPE after all.
19326
19327 2000-03-05 Mark Mitchell <mark@codesourcery.com>
19328
19329 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
19330 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
19331 RTL_EXPR_HAS_NO_SCOPE.
19332
19333 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
19334 later.
19335
19336 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
19337
19338 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
19339
19340 * call.c (convert_like): Macrofy.
19341 (convert_like_with_context): New macro.
19342 (convert_like_real): Renamed from convert_like. Add calling
19343 context parameters, for diagnostics. Add recursive flag. Call
19344 dubious_conversion_warnings for outer conversion.
19345 (build_user_type_conversion): Use convert_like_with_context.
19346 (build_over_call): Likewise. Don't warn about dubious
19347 conversions here. Adjust convert_default_arg calls.
19348 (convert_default_arg): Add context parameters for diagnostics.
19349 Pass through to convert_like_with_context.
19350 * cp-tree.h (convert_default_arg): Add context parameters.
19351 (dubious_conversion_warnings): Prototype new function.
19352 * typeck.c (convert_arguments): Adjust convert_default_arg call.
19353 (dubious_conversion_warnings): New function, broken
19354 out of convert_for_assignment.
19355 (convert_for_assignment): Adjust.
19356
19357 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
19358
19359 * decl2.c (key_method): Break out from...
19360 (import_export_vtable, import_export_class): ...here.
19361
19362 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
19363 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
19364
19365 * search.c (note_debug_info_needed, dfs_debug_mark,
19366 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
19367 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
19368
19369 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
19370
19371 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
19372 typos.
19373
19374 2000-03-02 Mark Mitchell <mark@codesourcery.com>
19375
19376 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
19377 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
19378 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
19379 (lang_type): Split gets_new into has_new and has_array_new.
19380 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19381 (TYPE_GETS_NEW): Split into ...
19382 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
19383 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
19384 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
19385 (build_op_new_call): Don't declare.
19386 (build_new_1): Likewise.
19387 * call.c (build_op_new_call): Remove.
19388 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19389 instead of TYPE_NEEDS_DESTRUCTOR.
19390 (finish_struct_bits): Likewise.
19391 (add_implicitly_declared_members): Likewise.
19392 (check_field_decl): Likewise.
19393 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
19394 correctly under the new ABI.
19395 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19396 instead of TYPE_NEEDS_DESTRUCTOR.
19397 (initialize_local_var): Likewise.
19398 (destroy_local_var): Likewise.
19399 (cp_finish_decl): Likewise.
19400 (register_dtor_fn): Likewise.
19401 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
19402 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
19403 TYPE_VEC_DELETE_TAKES_SIZE here.
19404 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
19405 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
19406 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19407 (finish_destructor_body): Likewise.
19408 (maybe_build_cleanup_1): Likewise.
19409 * decl2.c (do_static_destruction): Likewise.
19410 * init.c (build_new_1): Make it static.
19411 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19412 (expand_cleanup_for_base): Likewise.
19413 (get_cookie_size): New function.
19414 (build_new_1): Handle array-new cookies correctly under the new
19415 ABI.
19416 (build_vec_delete_1): Likewise.
19417 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19418 (build_delete): Likewise.
19419 (build_vec_delete): Handle array-new cookies correctly under the new
19420 ABI.
19421 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19422 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
19423 TYPE_HAS_ARRAY_NEW_OPERATOR.
19424 * ptree.c (print_lang_type): Check them.
19425 * search.c (context_for_name_lookup): Fix typo in comment.
19426 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19427 * tree.c (break_out_cleanups): Likewise.
19428 (build_cplus_array_test_1): Likewise.
19429 (cp_build_qualified_type_real): Likewise.
19430 * typeck.c (complete_type): Likewise.
19431
19432 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
19433 the command-line, not the end.
19434
19435 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
19436
19437 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
19438
19439 2000-03-02 Tom Tromey <tromey@cygnus.com>
19440
19441 * cp-tree.h (build_java_class_ref): Declare.
19442 * init.c (build_java_class_ref): No longer static.
19443 * except.c (expand_throw): Generate a Java-style `throw' if the
19444 thrown object is a "Java" object.
19445 (initialize_handler_parm): Generate a Java-style lookup of
19446 exception info if the caught object is a "Java" object.
19447 (catch_language, catch_language_init): New globals.
19448 (decl_is_java_type): New function.
19449 (expand_start_catch_block): Don't call push_eh_info() or
19450 push_eh_cleanup() when handling a Java-style "catch". Pass Java
19451 class reference to build_catch_block.
19452
19453 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19454
19455 * typeck.c (comptypes): Treat sizetype like its language equivalent.
19456
19457 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
19458
19459 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
19460 to merge reference/pointer code and fix incorrect warnings.
19461
19462 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
19463
19464 * search.c (protected_accessible_p): Use context_for_name_lookup.
19465
19466 * init.c (construct_virtual_bases): Fix thinko.
19467 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
19468
19469 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
19470
19471 * decl.c (current_function_decl): Move to toplev.c.
19472
19473 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
19474
19475 * pt.c (fn_type_unification): Unify return type, whenever
19476 provided.
19477 (get_bindings_real): Only pass return type when necessary.
19478 Remove explicit return type check.
19479 * class.c (resolve_address_of_overloaded_function): Pass desired
19480 return type to fn_type_unification.
19481
19482 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19483
19484 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
19485 DECL_FIELD_SIZE.
19486 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
19487 DECL_FIELD_SIZE.
19488 * rtti.c (expand_class_desc): Likewise.
19489 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
19490 (THUNK_VCALL_OFFSET): Likewise.
19491 (THUNK_DELTA): Reflect changes in ../tree.h.
19492
19493 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
19494
19495 * search.c (protected_accessible_p): Also allow the access if
19496 the member is public in DERIVED. Lose TYPE parm.
19497 (friend_accessible_p): Lose TYPE parm.
19498 (accessible_p): Adjust.
19499
19500 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19501
19502 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
19503 on things that are not sizes; ssize_binop deleted.
19504 Call size_diffop when appropriate.
19505 (dfs_build_vcall_offset_vtbl_entries): Likewise.
19506 (build_primary_vtable, build_secondary_vtable): Likewise.
19507 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
19508 Variable I is HOST_WIDE_INT.
19509 (get_vfield_offset): Pass proper types to size_binop.
19510 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
19511 (finish_struct_1): Likewise.
19512 (skip_rtti_stuff): Arg N is now pointer to signed.
19513 (layout_class_type): Use size_zero_node.
19514 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
19515 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
19516 * decl.c (complete_arry_type): Pass proper types to size_binop.
19517 (xref_basetypes): BINFO_OFFSET is sizetype.
19518 * error.c (dump_expr): Don't use size_binop non-sizes.
19519 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
19520 * init.c (construct_virtual_bases): Fix type error.
19521 (build_vec_delete_1): Pass proper type to size_binop and don't
19522 fold result.
19523 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
19524 * rtti.c (get_base_offset): Pass proper type to size_binop.
19525 * search.c (dfs_find_vbases): Fix type error.
19526 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
19527 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
19528 * tree.c (debug_binfo): Variable N is signed.
19529 Use HOST_WIDE_INT_PRINT_DEC.
19530 * typeck.c (comptypes): sizetype is same as equivalent integer type.
19531 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
19532 size_one_node and size_zero_node.
19533 (c_alignof): Use size_one_node.
19534 (build_component_addr): Pass proper types to size_binop.
19535 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
19536
19537 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
19538
19539 Implement class scope using-declarations for functions.
19540 * class.c (handle_using_decl): Call add_method for used functions.
19541 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
19542 (add_method): Used functions are hidden by local functions.
19543 (check_bases_and_members): Handle using-decls before finalizing
19544 CLASSTYPE_METHOD_VEC.
19545 * call.c (add_function_candidate): Add ctype parm; if nonzero,
19546 override the type of 'this' accordingly.
19547 (add_template_candidate, add_template_candidate_real): Add ctype parm.
19548 (convert_class_to_reference, build_user_type_conversion_1,
19549 build_new_function_call, build_object_call, build_new_op,
19550 build_new_method_call): Pass ctype parm.
19551
19552 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
19553 the baselink.
19554 * call.c (convert_class_to_reference, build_user_type_conversion_1,
19555 build_new_function_call, build_object_call, build_new_op,
19556 build_new_method_call, build_op_delete_call): Don't get basetype_path
19557 from a baselink.
19558 * typeck.c (build_component_ref): Likewise.
19559 * init.c (build_offset_ref): Likewise.
19560 (resolve_offset_ref): Don't call enforce_access.
19561 Call build_scoped_ref.
19562 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
19563 would cause an error or if -pedantic.
19564 * class.c (alter_access): Lose binfo parm.
19565
19566 2000-02-26 Mark Mitchell <mark@codesourcery.com>
19567
19568 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
19569 types.
19570
19571 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
19572
19573 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
19574 pseudo_type_info creation into the std namespace
19575
19576 2000-02-26 Mark Mitchell <mark@codesourcery.com>
19577
19578 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
19579 (import_export_class): Remove declaration.
19580 * decl2.c (import_export_class): Make it static.
19581 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
19582 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
19583 EXPR_WITH_FILE_LOCATION.
19584 * lex.c (check_newline): Tweak filename/lineno setting.
19585 * semantics.c (begin_while_stmt): Fix typo in comment.
19586
19587 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19588
19589 * lang-options.h (-fmessage-length=): Add missing option.
19590
19591 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
19592
19593 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
19594
19595 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
19596
19597 2000-02-25 Jim Wilson <wilson@cygnus.com>
19598
19599 * optimize.c (expand_call_inline): Emit the return label before
19600 evaluating the return value.
19601
19602 2000-02-24 Mark Mitchell <mark@codesourcery.com>
19603
19604 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
19605 than duplicating functionality here.
19606 * optimize.c: Include input.h.
19607 (expand_call_inline): Use push_srcloc and pop_srcloc.
19608 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
19609 * parse.c: Regenerated.
19610 * Makefile.in (lex.o): Depend on input.h.
19611 (optimize.o): Likewise.
19612
19613 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
19614
19615 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
19616 function type, rather than ICE.
19617
19618 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
19619
19620 * decl.c (grokdeclarator): Call decl_type_access_control.
19621 * parse.y (parse_end_decl): Don't call decl_type_access_control if
19622 decl is null.
19623
19624 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
19625
19626 * decl.c (decls_match): Remove obsolete static member nadgering.
19627
19628 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19629
19630 * decl.c (grokdeclarator): Change ANSI to ISO.
19631 * lex.c (consume_string, readescape, do_identifier): Likewise.
19632 (parse_float, real_yylex): Likewise.
19633 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
19634 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
19635 new_type_id, maybe_label_decls, simple_stmt,
19636 for.init.statement): Likewise.
19637 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
19638 * semantics.c (finish_named_return_value): Likewise.
19639 * parse.c: Regenerate.
19640
19641 2000-02-21 Mark Mitchell <mark@codesourcery.com>
19642
19643 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
19644 (CPTI_CLASS_STAR_TYPE): Remove.
19645 (vtable_index_type): Likewise.
19646 (class_star_type_node): Remove.
19647 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
19648 (build_binary_op_nodefault): Remove.
19649 * call.c (build_new_op): Use build_binary_op instead of
19650 build_binary_op_nodefault.
19651 * decl.c (init_decl_processing): Remove class_star_type_node
19652 initialization. Make delta_type_node ptrdiff_type_node under the
19653 new ABI. Initialize vtable_index_type.
19654 (build_ptrmemfunc_type): Build different structures for the new
19655 ABI.
19656 (build_enumerator): Use build_binary_op instead of
19657 build_binary_op_nodefault.
19658 * method.c (build_overload_value): Mangle pointers-to-members
19659 appropriately under the new ABI.
19660 * typeck.c (build_array_ref): Use build_binary_op instead of
19661 build_binary_op_nodefault.
19662 (get_member_function_from_ptrfunc): Adjust for the new ABI.
19663 (build_binary_op_nodefault): Rename to ...
19664 (build_binary_op): ... this. Remove old version. Adjust for
19665 pointer-to-member comparisons under the new ABI.
19666 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
19667 (build_ptrmemfunc): Adjust for the new ABI.
19668 (expand_ptrmemfunc_cst): Likewise.
19669 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
19670 (pfn_from_ptrmemfunc): Adjust for the new ABI.
19671
19672 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
19673
19674 * call.c (build_object_call): Compress consecutive calls to
19675 cp_error.
19676 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
19677 (build_op_delete_call): Adjust message formatting.
19678
19679 * class.c (check_bases): Compress consecutive calls to
19680 cp_pedwarn.
19681 (finish_struct_anon): Say 'ISO C++'.
19682
19683 * decl.c (start_decl): Same here.
19684 (grok_reference_init): Likewise.
19685 (grokfndecl): Correct message formatting.
19686 (grokfndecl): Improve diagnostic.
19687 (check_static_variable_definition): Likewise. Say 'ISO C++'
19688 (compute_array_index_type): Say 'ISO C++'
19689 (create_array_type_for_decl): Compress consecutive calls to
19690 cp_error.
19691 (grokdeclarator): Say 'ISO C++'
19692 (grok_op_properties): Likewise.
19693
19694 * decl2.c (delete_sanity): Clairify diagnostic.
19695 (check_member_template): Same here.
19696 (grok_function_init): Use consistent terminology.
19697
19698 * expr.c (do_case): Say 'ISO C++'
19699
19700 * friend.c (do_friend): Compress consecutive calls to warning.
19701
19702 2000-02-20 Mark Mitchell <mark@codesourcery.com>
19703
19704 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
19705 * class.c (build_secondary_vtable): Reorganize. Don't create a
19706 new vtable under the new ABI.
19707 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
19708 computing the size.
19709 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
19710 the initializing elements.
19711 (initialize_vtable): New function.
19712 (dfs_finish_vtbls): Use it.
19713 (dfs_accumulate_vtbl_inits): New function.
19714 (finish_vtbls): Merge primary and secondary vtables under the new
19715 ABI.
19716 (finish_struct_1): Remove redundant call to layout_vtable_decl.
19717 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
19718 aren't VAR_DECLs.
19719
19720 * class.c (build_vtable): New function, split out from ...
19721 (get_vtable_decl): ... here, and ...
19722 (build_secondary_vtable): ... here.
19723
19724 * pt.c (tsubst_decl): Fix formatting.
19725
19726 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19727
19728 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
19729 (avoid_overlap, build_base_field): Likewise.
19730 (build_base_field, build_base_fields, is_empty_class):
19731 Test DECL_SIZE with integer_zero.
19732 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
19733 * cp-tree.h (struct lang_type): New field size_unit.
19734 (CLASSTYPE_SIZE_UNIT): New macro.
19735 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
19736 (cp_finish_decl): Delete -Wlarger-than processing.
19737 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
19738 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
19739 * tree.c (make_binfo): binfo vector is one entry longer.
19740 (walk_tree): Walk DECL_SIZE_UNIT.
19741
19742 2000-02-19 Mark Mitchell <mark@codesourcery.com>
19743
19744 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
19745 comment.
19746 (build_vtable_entry): Don't assume all vtable entries are
19747 functions.
19748 (build_vtbl_initializer): Adjust accordingly.
19749 (get_vtable_decl): Fix formatting.
19750
19751 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
19752
19753 * semantics.c (deferred_type_access_control): Walk the entire
19754 type_lookups list.
19755 (save_type_access_control): Rename from
19756 initial_deferred_type_access_control. Just remember the value.
19757 (decl_type_access_control): New fn.
19758 (begin_function_definition): Use deferred_type_access_control, after
19759 we've started the function. Set type_lookups to error_mark_node.
19760 * parse.y (frob_specs, fn.def1): Adjust.
19761 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
19762 (parse_end_decl, parse_bitfield0, parse_method): New fns.
19763 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
19764 (after_type_component_declarator0): Likewise.
19765 (after_type_component_declarator): Likewise.
19766 (notype_component_declarator): Likewise.
19767 * cp-tree.h: Adjust.
19768
19769 * decl.c (redeclaration_error_message): Allow redeclaration of
19770 namespace-scope decls.
19771
19772 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
19773
19774 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
19775
19776 2000-02-17 Mark Mitchell <mark@codesourcery.com>
19777
19778 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
19779 * decl2.c (grokclassfn): Likewise.
19780
19781 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
19782
19783 * decl2.c (lang_decode_option): Don't set default message length
19784 here.
19785 * lex.c (lang_init_options): Set it here.
19786
19787 2000-02-16 Mark Mitchell <mark@codesourcery.com>
19788
19789 Make DECL_CONTEXT mean the class in which a member function was
19790 declared, even for a virtual function.
19791 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
19792 (DECL_FRIEND_CONTEXT): New macro.
19793 (DECL_REAL_CONTEXT): Remove.
19794 (SET_DECL_FRIEND_CONTEXT): Likewise.
19795 (DECL_VIRTUAL_CONTEXT): Adjust.
19796 (DECL_CLASS_SCOPE_P): Use TYPE_P.
19797 (add_friends): Remove.
19798 (hack_decl_function_context): Likewise.
19799 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
19800 CP_DECL_CONTEXT.
19801 (build_over_call): Fix indentation. Use DECL_CONTEXT
19802 instead of DECL_CLASS_CONTEXT.
19803 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
19804 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19805 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19806 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
19807 (build_base_field): Likewise.
19808 (finish_struct_1): Likewise.
19809 (build_self_reference): Likewise.
19810 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
19811 DECL_REAL_CONTEXT.
19812 (pushtag): Use decl_function_context, not
19813 hack_decl_function_context.
19814 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19815 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
19816 (pushdecl): Remove bogus code.
19817 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
19818 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19819 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19820 Use decl_function_context, nothack_decl_function_context.
19821 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
19822 (grokdeclarator): Likewise. Use decl_function_context, not
19823 hack_decl_function_context.
19824 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
19825 (start_function): Use DECL_FRIEND_CONTEXT, not
19826 DECL_CLASS_CONTEXT. Use decl_function_context, not
19827 hack_decl_function_context.
19828 (finish_function): Use decl_function_context, not
19829 hack_decl_function_context.
19830 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
19831 DECL_CLASS_CONTEXT.
19832 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
19833 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
19834 (grokfield): Likewise.
19835 (finish_builtin_type): Likewise.
19836 (finish_vtable_vardec): Use decl_function_context, not
19837 hack_decl_function_context.
19838 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19839 (start_static_initialization_or_destruction): Likewise.
19840 (finish_static_initialization_or_destruction): Likewise.
19841 (mark_used): Adjust logic for deciding when to synthesize methods.
19842 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
19843 DECL_REAL_CONTEXT.
19844 * error.c (dump_function_decl): Use DECL_CONTEXT, not
19845 DECL_CLASS_CONTEXT.
19846 * friend.c (is_friend): Likewise.
19847 (add_friends): Remove.
19848 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
19849 * lex.c (begin_definition_of_inclass_inline): Use
19850 decl_function_context, not hack_decl_function_context.
19851 (process_next_inline): Likewise.
19852 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19853 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
19854 DECL_CLASSS_CONTEXT.
19855 (hack_identifier): Likewise.
19856 (synthesize_method): Use decl_function_context, not
19857 hack_decl_function_context.
19858 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
19859 DECL_REAL_CONTEXT.
19860 (is_member_template): Use decl_function_context, not
19861 hack_decl_function_context. Use DECL_CONTEXT, not
19862 DECL_CLASS_CONTEXT.
19863 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
19864 DECL_CLASS_CONTEXT.
19865 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
19866 DECL_REAL_CONTEXT.
19867 (push_template_decl_real): Likewise.
19868 (instantiate_class_template): Don't call add_friends.
19869 (tsubst_default_argument): Use DECL_CONTEXT, not
19870 DECL_REAL_CONTEXT.
19871 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19872 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19873 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
19874 DECL_CLASS_CONTEXT.
19875 * repo.c (repo_inline_used): Likewise.
19876 * search.c (current_scope): Adjust for new _CONTEXT macros.
19877 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
19878 DECL_REAL_CONTEXT.
19879 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19880 (lookup_fnfields_here):Likewise.
19881 (check_final_overrider): Likewise.
19882 (init_vbase_pointers): Likewise.
19883 (virtual_context): Likewise.
19884 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
19885 (expand_body): Use decl_function_context, not
19886 hack_decl_function_context.
19887 * tree.c (hack_decl_function_context): Remove.
19888 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
19889 DECL_CLASS_CONTEXT.
19890 * typeck2.c (error_not_base_type): Likewise.
19891
19892 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
19893
19894 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
19895
19896 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19897
19898 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
19899
19900 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
19901
19902 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
19903
19904 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
19905
19906 * decl2.c (lang_decode_option): Enable automatic line wrapping.
19907
19908 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
19909
19910 * parse.y (frob_specs): Split out...
19911 (parse_decl): From here.
19912 (fn.def2): Call initial_deferred_type_access_control.
19913 (after_type_component_declarator0): Call frob_specs.
19914 (notype_component_declarator0): Likewise.
19915 * search.c (friend_accessible_p): Nested classes are friends of their
19916 enclosing classes.
19917
19918 2000-02-10 Mark Mitchell <mark@codesourcery.com>
19919
19920 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
19921 used to create an implicit temporary.
19922
19923 * class.c (dfs_modify_vtables): Tweak calculation of functions to
19924 override.
19925
19926 2000-02-08 Nathan Sidwell <nathan@acm.org>
19927
19928 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
19929 strip array element qualifiers too.
19930
19931 2000-02-07 Mark Mitchell <mark@codesourcery.com>
19932
19933 * decl.c (store_parm_decls): Don't build cleanups for parameters
19934 while processing_template_decl.
19935
19936 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
19937
19938 * cp-tree.h (struct saved_scope): Add incomplete field.
19939 (namespace_scope_incomplete): New macro.
19940 * decl.c (pushdecl): Use it.
19941 (hack_incomplete_structures): Use it. See through artificial
19942 binding levels.
19943 (mark_saved_scope): Mark it.
19944
19945 Implement access control for nested types.
19946 * search.c (type_access_control): New fn.
19947 (accessible_p): Now we do perform access control for types.
19948 * semantics.c (deferred_type_access_control): New fn.
19949 (initial_deferred_type_access_control): New fn.
19950 (begin_function_definition): Call it. Add lookups parm.
19951 * decl.c (struct binding_level): Add this_class field.
19952 (pushlevel_class): Set it.
19953 (mark_binding_level): Mark it.
19954 (lookup_name_real): Use it. Call type_access_control.
19955 (mark_saved_scope): Mark lookups field.
19956 * cp-tree.h (flagged_type_tree): Add lookups field.
19957 (struct saved_scope): Add lookups field.
19958 (type_lookups): New macro.
19959 * parse.y (declmods): Now <ftype>.
19960 (parse_decl): Add lookups parm. Call
19961 initial_deferred_type_access_control.
19962 (lang_extdef): Clear type_lookups.
19963 (typed_declspecs, declmods, typespec): Set lookups field.
19964 (initdcl): Call deferred_type_access_control.
19965 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
19966 component_decl_1, named_parm): Adjust.
19967 * friend.c (is_friend): Nested classes are friends of their
19968 enclosing classes.
19969
19970 * class.c (currently_open_derived_class): New fn.
19971 * method.c (hack_identifier): Use it.
19972
19973 * lex.c (do_identifier): Remove obsolete code.
19974
19975 * parse.y (typed_typespecs): Propagate new_type_flag properly.
19976
19977 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
19978
19979 * tinfo.h: Remove apostrophes from C++ comment (xgettext
19980 thinks this file is plain C).
19981
19982 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19983
19984 * Makefile.in (call.o): Depend on $(EXPR_H).
19985
19986 * call.c: Include "expr.h".
19987
19988 * class.c (dump_class_hierarchy): Add prototype.
19989
19990 * search.c (dfs_get_pure_virtuals): Likewise.
19991
19992 2000-02-1 Ulrich Drepper <drepper@redhat.com>
19993
19994 * parse.y (simple_stmt): Allow :: token in asm parameter list.
19995 * parse.c: Rebuilt.
19996
19997 2000-01-31 Jim Wilson <wilson@cygnus.com>
19998
19999 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20000 Store it in DECL_FCONTEXT.
20001 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20002
20003 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
20004
20005 * tinfo.h (old abi): #include "tconfig.h".
20006 * tinfo.cc (convert_to_base): Move into old abi section.
20007
20008 2000-01-31 Mark Mitchell <mark@codesourcery.com>
20009
20010 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20011 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20012 (BINFO_PRIMARY_BINFO): New macro.
20013 (BF_DELTA): Rename to ...
20014 (BV_DELTA): ... this.
20015 (BF_VCALL_INDEX): Rename to ...
20016 (BV_VCALL_INDEX): ... this.
20017 (BF_FN): Rename to ...
20018 (BV_FN): ... this.
20019 * class.c (build_vbase_path): Adjust for changes to reverse_path.
20020 (set_rtti_entry): Rename BF_ macros to BV_ variants.
20021 (modify_vtable_entry): Simplify.
20022 (add_virtual_function): Rename BF_ macros to BV_ variants.
20023 (build_vtable_initializer): Likewise.
20024 (get_class_offset_1): Remove.
20025 (dfs_get_class_offset): Likewise.
20026 (get_class_offset): Likewise.
20027 (dfs_find_final_overrider): New function.
20028 (find_final_overrider): Likewise.
20029 (modify_one_vtable): Remove.
20030 (dfs_find_base): New function.
20031 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
20032 find_final_overrider.
20033 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
20034 virtuals.
20035 (dfs_fixup_vtable_deltas): Remove.
20036 (override_one_vtable): Remove.
20037 (merge_overrides): Likewise.
20038 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20039 unreal chilren of virtual bases.
20040 (finish_struct_1): Don't use merge_overrides. Don't use
20041 dfs_fixup_vtable_deltas.
20042 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20043 BINFOs.
20044
20045 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20046 Jason Merrill <jason@yorick.cygnus.com>
20047
20048 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20049
20050 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
20051
20052 * exception.cc (__throw_bad_typeid): Add missing std::.
20053
20054 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20055
20056 * cp-tree.h (make_thunk): PROTO -> PARAMS.
20057
20058 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
20059
20060 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20061
20062 Runtime support for new-abi rtti.
20063 * inc/typeinfo (type_info::operator!=): Define in class.
20064 (type_info::before, type_info::name, type_info::operator==,
20065 type_info::operator!=): Define new ABI implementations.
20066 (type_info::is_pointer_p, type_info::is_function_p): Declare
20067 new virtual functions.
20068 (type_info::do_catch, type_info::do_upcast): Likewise.
20069
20070 * tinfo.h (__base_class_info): Define new class.
20071 (__class_type_info): Likewise.
20072 (__si_class_type_info): Likewise.
20073 (__vmi_class_type_info): Likewise.
20074 (__dynamic_cast): Prototype.
20075
20076 * tinfo.cc: Conditionalize old and new rtti mechanisms.
20077 (type_info::is_pointer_p): Define new function.
20078 (type_info::is_function_p): Likewise.
20079 (type_info::do_catch): Likewise.
20080 (type_info::do_upcast): Likewise.
20081 (vtable_prefix): New structure for vtable access.
20082 (adjust_pointer): Define new template function.
20083 (contained_p, public_p, virtual_p, contained_public_p,
20084 contained_nonpublic_p, contained_nonvirtual_p): Define new
20085 functions.
20086 (nonvirtual_base_type): New local variable.
20087 (__class_type_info::~__class_type_info): Define.
20088 (__si_class_type_info::~__si_class_type_info): Likewise.
20089 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20090 (__class_type_info::do_catch): Define new function.
20091 (__class_type_info::do_upcast): Likewise.
20092 (__class_type_info::find_public_src): Likewise.
20093 (__class_type_info::do_find_public_src): Likewise.
20094 (__si_class_type_info::do_find_public_src): Likewise.
20095 (__vmi_class_type_info::do_find_public_src): Likewise.
20096 (__class_type_info::do_dyncast): Likewise.
20097 (__si_class_type_info::do_dyncast): Likewise.
20098 (__vmi_class_type_info::do_dyncast): Likewise.
20099 (__class_type_info::do_upcast): Likewise.
20100 (__si_class_type_info::do_upcast): Likewise.
20101 (__vmi_class_type_info::do_upcast): Likewise.
20102 (__dynamic_cast): Likewise.
20103
20104 * tinfo2.cc (__fundamental_type_info): Define new class.
20105 (__pointer_type_info): Likewise.
20106 (__reference_type_info): Likewise.
20107 (__array_type_info): Likewise.
20108 (__function_type_info): Likewise.
20109 (__enum_type_info): Likewise.
20110 (__ptr_to_member_type_info): Likewise.
20111 (__fundamental_type_info::~__fundamental_type_info): Define.
20112 (__pointer_type_info::~__pointer_type_info): Likewise.
20113 (__reference_type_info::~__reference_type_info): Likewise.
20114 (__array_type_info::~__array_type_info): Likewise.
20115 (__function_type_info::~__function_type_info): Likewise.
20116 (__enum_type_info::~__enum_type_info): Likewise.
20117 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20118 (__pointer_type_info::do_catch): Define new function.
20119 (__ptr_to_member_type_info::do_catch): Define new function.
20120
20121 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20122 (__is_pointer): Likewise.
20123
20124 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20125
20126 2000-01-30 Mark Mitchell <mark@codesourcery.com>
20127
20128 * cp/class.c (build_vtable): Rename to build_primary_vtable.
20129 (prepare_fresh_vtable): Rename to build_secondary_vtable.
20130 (make_new_vtable): New function.
20131 (modify_vtable_entry): Handle generation of new vtables correctly.
20132 (modify_one_vtable): Remove unused parameter.
20133 (dfs_fixup_vtable_deltas): Likewise.
20134 (override_one_vtable): Use build_secondary_vtable.
20135 (finish_struct_1): Use build_primary_vtable and
20136 build_secondary_vtable.
20137
20138 2000-01-28 Ulrich Drepper <drepper@redhat.com>
20139
20140 * cp/decl.c: Adjust variable names, comments, help strings.
20141
20142 2000-01-29 Nathan Sidwell <nathan@acm.org>
20143
20144 * new2.cc (operator delete[]): Use operator delete, don't assume
20145 implementation.
20146
20147 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
20148
20149 * class.c (build_vtbl_initializer): Add argument to
20150 build_vtable_entry call.
20151
20152 2000-01-27 Mark Mitchell <mark@codesourcery.com>
20153
20154 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20155 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20156 (BF_DELTA): New macro.
20157 (BF_VCALL_INDEX): Likewise.
20158 (BF_FN): Likewise.
20159 (THUNK_VCALL_OFFSET): Likewise.
20160 (make_thunk): Change prototype.
20161 * class.c (build_vtable_entry): Integrate
20162 build_vtable_entry_for_fn. Handle vcall indices.
20163 (build_vtable_entry_for_fn): Remove.
20164 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
20165 BF_VCALL_INDEX, BF_FN.
20166 (modify_vtable_entry): Integrate common code from
20167 modify_one_vtable and dfs_fixup_vtable_deltas.
20168 (add_virtual_function): Set BF_VCALL_INDEX.
20169 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
20170 and BF_FN.
20171 (modify_one_vtable): Simplify.
20172 (dfs_fixup_vtable_deltas): Likewise.
20173 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20174 * method.c (make_thunk): Handle vcall indices.
20175
20176 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
20177
20178 Compiler side new abi rtti (not enabled).
20179 * cp-tree.h (new_abi_rtti_p): New macro.
20180 (emit_support_tinfos): Prototype new function.
20181 (tinfo_decl_p): Likewise.
20182 (emit_tinfo_decl): Likwise.
20183 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20184 macros.
20185 (doing_runtime): New local static.
20186 (init_rtti_processing): Add new-abi initializer.
20187 (get_tinfo_decl): Add new-abi logic.
20188 (tinfo_from_decl): Likewise.
20189 (build_dynamic_cast_1): Likewise.
20190 (qualifier_flags): New static function.
20191 (tinfo_base_init): Likewise.
20192 (generic_initializer): Likewise.
20193 (ptr_ref_initializer): Likewise.
20194 (ptmd_initializer): Likewise.
20195 (class_hint_flags): Likewise.
20196 (class_initializer): Likewise.
20197 (synthesize_tinfo_var): Likewise.
20198 (create_real_tinfo_var): Likewise.
20199 (create_pseudo_type_info): Likewise.
20200 (get_vmi_pseudo_type_info): Likewise.
20201 (create_tinfo_types): Likewise.
20202 (emit_support_tinfos): New global function.
20203 (tinfo_decl_p): New global predicate.
20204 (emit_tinfo_decl): New global function.
20205 * class.c (set_rtti_entry): Generalize for old and new rtti.
20206 (build_vtbl_initializer): Likewise.
20207 * decl2.c (finish_file): Likewise.
20208
20209 2000-01-27 Jim Wilson <wilson@cygnus.com>
20210
20211 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20212 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20213
20214 2000-01-27 Mike Stump <mrs@wrs.com>
20215
20216 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20217 for scopes.
20218
20219 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
20220
20221 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20222
20223 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
20224
20225 * optimize.c (calls_setjmp_r): Supply new argument
20226 to special_function_p.
20227
20228 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20229
20230 * call.c: PROTO -> PARAMS.
20231 * class.c: Likewise.
20232 * cp-tree.h: Likewise.
20233 * cvt.c: Likewise.
20234 * decl.c: Likewise.
20235 * decl.h: Likewise.
20236 * decl2.c: Likewise.
20237 * dump.c: Likewise.
20238 * errfn.c: Likewise.
20239 * error.c: Likewise.
20240 * except.c: Likewise.
20241 * expr.c: Likewise.
20242 * init.c: Likewise.
20243 * input.c: Likewise.
20244 * lex.c: Likewise.
20245 * lex.h: Likewise.
20246 * method.c: Likewise.
20247 * optimize.c: Likewise.
20248 * parse.y: Likewise.
20249 * pt.c: Likewise.
20250 * repo.c: Likewise.
20251 * rtti.c: Likewise.
20252 * search.c: Likewise.
20253 * semantics.c: Likewise.
20254 * spew.c: Likewise.
20255 * tree.c: Likewise.
20256 * typeck.c: Likewise.
20257 * typeck2.c: Likewise.
20258 * xref.c: Likewise.
20259
20260 2000-01-25 Richard Henderson <rth@cygnus.com>
20261
20262 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
20263
20264 2000-01-25 Mark Mitchell <mark@codesourcery.com>
20265
20266 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
20267 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
20268 (struct vcall_offset_data_s): New type.
20269 (dfs_vcall_offset_queue_p): New function.
20270 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20271 (build_vcall_offset_vtbl_entries): Likewise.
20272 (layout_vtable_decl): Likewise.
20273 (num_vfun_entries): Likewise.
20274 (num_extra_vtbl_entries): Add the entries for vcall offsets.
20275 (build_vtbl_initializer): Likewise.
20276 (dfs_finish_vtabls): Use layout_vtable_decl.
20277 (modify_one_vtables): Always duplicate vtables under the new ABI.
20278 (finish_struct_1): Use layout_vtable_decl.
20279
20280 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20281
20282 * decl.c (member_function_or_else): Change third arg from a format
20283 specifier to an `enum overload_flags'. Callers changed.
20284
20285 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
20286
20287 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
20288 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
20289 build_const_cast, get_delta_difference, check_return_expr): Avoid
20290 ANSI string concatenation usage.
20291
20292 2000-01-24 Mark Mitchell <mark@codesourcery.com>
20293
20294 * class.c (layout_class_type): Put the fields required to make a
20295 class non-empty at the end, not the beginning, of the TYPE_FIELDs
20296 list.
20297
20298 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
20299
20300 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
20301 template.
20302
20303 * decl2.c (mark_used): Do instantiate inlines that have been
20304 explicitly instantiated.
20305
20306 2000-01-24 Richard Henderson <rth@cygnus.com>
20307
20308 * call.c (build_over_call): Use expand_tree_builtin.
20309 * typeck.c (build_function_call_real): Likewise.
20310 (build_binary_op_nodefault): Handle unordered compares.
20311
20312 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20313
20314 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
20315 cp_tree_index values.
20316 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
20317 New global node #defines for them.
20318 * rtti.c (call_void_fn): Replace with ...
20319 (build_runtime_decl): ... new static function.
20320 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
20321 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
20322 (build_dynamic_cast_1): Always produce correctly typed result.
20323 Explicitly produce type_info addresses. Use dynamic_cast_node.
20324 * exception.cc (__throw_bad_cast): Return `void *'.
20325 (__throw_bad_typeid): Return `const type_info &'.
20326
20327 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20328
20329 * cp-tree.h (get_vtable_decl): Prototype new function.
20330 * class.c (get_vtable_decl): New function. Broken out from ...
20331 (build_vtable): ... here. Use it.
20332 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
20333 by get_vtable_decl.
20334
20335 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
20336
20337 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
20338 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
20339 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
20340 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
20341 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
20342 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
20343 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
20344 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
20345 (CPTI_TINFO_VAR_ID): New enumeration.
20346 (__tp_desc_type_node, __access_mode_type_node,
20347 __bltn_desc_type_node, __user_desc_type_node,
20348 __class_desc_type_node, __ptr_desc_type_node,
20349 __attr_desc_type_node, __func_desc_type_node,
20350 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
20351 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
20352 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
20353 enum_desc_type_node, class_desc_type_node,
20354 si_class_desc_type_node, vmi_class_desc_type_node,
20355 ptmd_desc_type_node, base_desc_type_node): New #defines.
20356 (tinfo_fn_id, tinfo_fn_type): Rename to ...
20357 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
20358 (tinfo_var_id): New enumeration.
20359 (DECL_TINFO_FN_P): Augment comment.
20360 * decl.c (cp_global_trees): Adjust documentation.
20361 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
20362 tinfo_decl_type and tinfo_var_id.
20363 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
20364 (build_typeid): Remove unused variable.
20365 (get_tinfo_var): Use tinfo_var_id.
20366 (tinfo_name): New static function.
20367 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
20368 (tinfo_from_decl): Likewise.
20369 (get_base_offset): New static function, broken out of
20370 expand_class_desc.
20371 (expand_si_desc): Use tinfo_name.
20372 (expand_class_desc): Likewise. Lose local static variable.
20373 Use base_desc_type_node. Use get_base_offset.
20374 (expand_ptr_desc): Use tinfo_name.
20375 (expand_attr_desc): Likewise.
20376 (expand_generic_desc): Likewise.
20377
20378 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
20379 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
20380
20381 2000-01-23 Mark Mitchell <mark@codesourcery.com>
20382
20383 * cp-tree.h (__eprintf): Remove declaration.
20384 * tree.c (__eprintf): Remove definition.
20385
20386 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
20387 Mark Mitchell <mark@codesourcery.com>
20388
20389 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
20390 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
20391
20392 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
20393
20394 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
20395
20396 2000-01-23 Mark Mitchell <mark@codesourcery.com>
20397
20398 * cp-tree.h (register_dtor_fn): New function.
20399 * decl.c (destroy_local_static): Rename to ...
20400 (register_dtor_fn): ... this. Give it external linkage.
20401 (expand_static_init): Use it.
20402 * decl2.c (do_static_initialization): Likewise, if using
20403 __cxa_atexit.
20404 (do_static_destruction): Check that __cxa_atexit is not in use.
20405 (finish_file): Don't call do_static_destruction if using
20406 __cxa_atexit.
20407
20408 * typeck.c (convert_arguments): Restore two-message error
20409 reporting.
20410
20411 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
20412
20413 Remap dynamic cast hint values to be consistent across ABIs.
20414 * search.c (dynamic_cast_base_recurse): Remap generated value.
20415 (get_dynamic_cast_base_type): Adjust documentation.
20416 * tinfo.h (__user_type_info::dyncast): Likewise.
20417 (__user_type_info::find_public_subobj): Remap BOFF meaning.
20418 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
20419 (__class_type_info::do_dyncast): Likewise.
20420 (__class_type_info::do_find_public_subobj): Likewise.
20421 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
20422
20423 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
20424
20425 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
20426
20427 * typeck2.c (incomplete_type_error): Restore previous
20428 cp_error and cp_error_at call sequence.
20429
20430 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
20431
20432 * class.c (dump_class_hierarchy): Make format agree with argument;
20433 cast pointer to unsigned long and print with %lx.
20434
20435 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
20436
20437 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
20438
20439 * typeck.c (composite_pointer_type, common_type,
20440 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
20441 build_function_call_real, convert_arguments,
20442 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
20443 build_unary_op, mark_addressable, build_compound_expr,
20444 build_static_cast, build_reinterpret_cast, build_const_cast,
20445 build_c_cast, build_modify_expr, get_delta_difference,
20446 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
20447 'ISO C++'. Fusion consecutive calls to diagnostic message routines
20448 into a single one.
20449 * typeck2.c (readonly_error, abstract_virtuals_error,
20450 process_init_constructor, check_for_new_type): Likewise.
20451
20452 2000-01-19 Mark Mitchell <mark@codesourcery.com>
20453
20454 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
20455 VAR_DECLs.
20456
20457 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
20458
20459 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
20460 (build_x_typeid): Likewise.
20461 (get_tinfo_fn): Likewise.
20462 (get_tinfo_fn_unused): Rename to ...
20463 (get_tinfo_decl): ... here.
20464 * rtti.c (build_headof): Replace logic error with assertion.
20465 (get_tinfo_fn_dynamic): Rename to ...
20466 (get_tinfo_decl_dynamic): ... here. Make static. Use
20467 complete_type_or_else.
20468 (build_x_typeid): Move into ...
20469 (build_typeid): ... here. Adjust call to
20470 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
20471 throw_bad_typeid expression.
20472 (get_tinfo_fn_unused): Rename to ...
20473 (get_tinfo_decl): ... here. Adjust comment.
20474 (get_tinfo_fn): Delete.
20475 (tinfo_from_decl): New static function.
20476 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
20477 (get_typeid): Use complete_type_or_else.
20478 (build_dynamic_cast_1): Adjust calls to
20479 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
20480 * parse.y (primary): Adjust call to build_typeid.
20481 * except.c (build_eh_type_type_ref): Adjust call to
20482 get_tinfo_decl. Mark as used.
20483 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
20484 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
20485 * parse.c: Regenerated.
20486
20487 2000-01-17 Mark Mitchell <mark@codesourcery.com>
20488
20489 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
20490 calling convention.
20491 (resolves_to_fixed_type_p): Document calling convention.
20492 * rtti.c (build_x_typeid): Initialize NONNULL.
20493
20494 * cp-tree.h (build_shared_int_cst): New function.
20495 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
20496 * class.c (modify_vtable_entry): Likewise.
20497 (add_virtual_function): Split out code to generated shared
20498 INTEGER_CSTs to build_share_int_cst.
20499 (modify_all_vtables): Handle all the overridden functions here.
20500 Add overridden functions from non-primary virtual bases to the
20501 primary vtable.
20502 (finish_struct_1): Adjust call to modify_all_vtables. Add
20503 overridden functions from non-primary bases to the vtable.
20504 * tree.c (build_shared_int_cst): New function.
20505
20506 * cp-tree.h (scratchalloc): Remove.
20507 (build_scratch_list): Likewise.
20508 * call.c (convert_class_to_reference): Replace build_scratch_list
20509 and build_expr_list with build_tree_list.
20510 (add_candidate): Replace scratchalloc with expralloc. Note memory
20511 leak.
20512 (build_user_type_conversion_1): Replace build_scratch_list
20513 and build_expr_list with build_tree_list.
20514 (build_new_op): Likewise.
20515 (build_op_delete_call): Likewise.
20516 (convert_like): Likewise.
20517 * cvt.c (ocp_convert): Likewise.
20518 * decl.c (start_decl): Likewise.
20519 (start_function): Likewise.
20520 (finish_destructor_body): Likewise.
20521 (maybe_build_cleanup_1): Likewise.
20522 * decl2.c (reparse_decl_as_expr): Likewise.
20523 * init.c (perform_member_init): Likewise.
20524 (expand_cleanup_for_base): Likewise.
20525 (build_builtin_delete_call): Likewise.
20526 (build_new_1): Likewise.
20527 (build_delete): Likewise.
20528 * method.c (do_build_assign_ref): Likewise.
20529 * parse.y (already_scoped_stmt): Likewise.
20530 (nontrivial_exprlist): Likewise.
20531 (net_initializer): Likewise.
20532 (initlist): Likewise.
20533 * parse.c: Regenerated.
20534 * rtti.c (build_x_typeid): Likewise.
20535 (build_dynamic_cast_1): Likewise.
20536 * typeck.c (build_x_compound_expr): Likewise.
20537 (build_static_cast): Likewise.
20538 (build_modify_expr): Likewise.
20539
20540 * cp-tree.h (DECL_VINDEX): Add documentation.
20541 * class.c (build_vtable_entry): Likewise.
20542 (start_vtable): Add comment.
20543 (add_virtual_function): Replace pending_hard_virtuals with
20544 overridden_virtuals and pending_virtuals with new_virtuals.
20545 Replace redundant assignments with assertions.
20546 (check_for_override): Add comment.
20547 (check_bases_and_members): Replace pending_hard_virtuals with
20548 overridden_virtuals and pending_virtuals with new_virtuals.
20549 (create_vtbl_ptr): Likewise.
20550 (layout_class_type): Likewise.
20551 (finish_struct_1): Likewise. Add comments.
20552
20553 2000-01-16 Mark Mitchell <mark@codesourcery.com>
20554
20555 * class.c (finish_struct_1): Replace redundant code with
20556 assertions.
20557
20558 * cp-tree.h (flag_new_abi): Move.
20559 (flag_use_cxa_atexit): Likewise.
20560 (flag_honor_std): Likewise.
20561 (flag_rtti): Likewise.
20562 (vbase_offsets_in_vtable_p): Define.
20563 (vptrs_present_everywhere_p): Likewise.
20564 (TYPE_CONTAINS_VPTR_P): Likewise.
20565 (dfs_walk_real): Declare.
20566 * class.c (build_vbase_pointer_fields): Check
20567 vbase_offsets_in_vtable_p.
20568 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
20569 BINFO_VPTR_FIELD.
20570 (build_vbase_offset_vtbl_entries): Simplify.
20571 (build_vbase_offset_vtbl_entries): Adjust.
20572 (build_vbase_pointer): Add ability to look up vbase offsets in
20573 vtable.
20574 (start_vtable): New function.
20575 (add_virtual_function): Use it.
20576 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
20577 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
20578 (build_vtbl_initializer): Take the type of the complete object as
20579 input. Use it to correctly calculate vbase offsets.
20580 (dfs_finish_vtbls): Pass the complete type to
20581 build_vtbl_initializer.
20582 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
20583 (create_vtable_ptr): Create a vtable even if there are no
20584 new virtual functions, under the new ABI.
20585 (finish_struct_1): Likewise.
20586 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
20587 * decl.c (exapnd_static_init): Remove call to
20588 preserve_initializer.
20589 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
20590 vtables.
20591 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
20592 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
20593 (construct_virtual_bases): Don't initialize virtual base pointers
20594 under the new ABI.
20595 (build_aggr_init): Clean up comment.
20596 (expand_aggr_init_1): Likewise.
20597 * rtti.c (expand_class_desc): Store the virtual function table
20598 index where the vbase offset lives in the offset field.
20599 * search.c (dfs_walk_real): Make it global.
20600 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
20601 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
20602
20603 * tinfo.h (USItype): Make it signed under the new ABI.
20604 * tinfo.cc (convert_to_base): New function. Encapsulate base
20605 conversion logic here.
20606 (__class_type_info::do_upcast): Use it.
20607 (__class_type_info::do_dyncast): Likewise.
20608 (__class_type_info::do_find_public_subobj): Likewise.
20609
20610 * init.c (construct_virtual_bases): Don't look up the addresses of
20611 virtual bases at run-time.
20612
20613 * class.c (build_vbase_pointer): Relocate.
20614 (build_vbase_pointer_fields): Likewise.
20615 (dfs_build_vbase_offset_vtbl_entries): Likewise.
20616 (build_vbase_offset_vtbl_entries): Likewise.
20617
20618 * decl.c (init_decl_processing): Complain if -fnew-abi
20619 -fno-vtable-thunks is used.
20620
20621 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
20622 flag_new_abi.
20623
20624 2000-01-15 Mark Mitchell <mark@codesourcery.com>
20625
20626 * cp-tree.h (num_extra_vtbl_entries): New function.
20627 (size_extra_vtbl_entries): Likewise.
20628 (dfs_vtable_path_unmark): Likewise.
20629 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
20630 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20631 * class.c (num_extra_vtbl_entries): New function.
20632 (size_extra_vtbl_entries): Likewise.
20633 (dfs_build_vbase_offset_vtbl_entries): New function.
20634 (build_vbase_offset_vtbl_entries): Likewise.
20635 (build_vtbl_initializer): Use it.
20636 (finish_struct_1): Adjust vtable sizes (using
20637 num_extra_vtbl_entries).
20638 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
20639 THUNK_DECL is non-NULL before expanding it.
20640 * init.c (expand_virtual_init): Adjust the vtable pointer by
20641 size_extra_vtbl_entries before storing it.
20642 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
20643 Handle TREE_LIST parameters here, not in the dfs_* functions.
20644 (dfs_unmarked_real_bases_queue_p): Adjust.
20645 (dfs_marked_real_bases_queue_p): Likewise.
20646 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
20647 (dfs_vtable_path_marked_real_bases_queue_p): New function.
20648 (dfs_vtable_path_unmark): Likewise.
20649
20650 2000-01-14 Mark Mitchell <mark@codesourcery.com>
20651
20652 * optimize.c (copy_body_r): Clear the operand three of a
20653 TARGET_EXPR when copying it.
20654
20655 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20656
20657 * method.c (build_decl_overload_real): Check whether we are in ::
20658 before returning __builtin_new/delete.
20659
20660 2000-01-13 Mark Mitchell <mark@codesourcery.com>
20661
20662 * pt.c (tsubst_friend_function): Improve comment.
20663 (instantiate_decl): Avoid crashing when a "nested" function is
20664 instantiated from the top level.
20665
20666 * dump.c (dqeueue_and_dump): Dump
20667 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
20668
20669 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20670
20671 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
20672
20673 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
20674
20675 * g++spec.c (lang_specific_driver): Add -fnew-abi if
20676 ENABLE_NEW_GXX_ABI defined.
20677 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
20678 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
20679 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
20680
20681 2000-01-12 Mark Mitchell <mark@codesourcery.com>
20682
20683 * decl.c (start_cleanup_fn): Call pushdecl.
20684
20685 * call.c (convert_class_to_reference): Fix typos.
20686 (build_conditional_expr): Handle errors gracefully.
20687 * class.c (push_nested_class): Likewise.
20688 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
20689 (DECL_THIS_EXTERN): Use it.
20690 (DECL_THIS_STATIC): Likewise.
20691 * cvt.c (convert_to_void): Handle errors gracefully.
20692 (build_expr_type_conversion): Likewise.
20693 * decl.c (maybe_push_decl): Likewise.
20694 (start_decl_1): Likewise.
20695 (require_complete_types_for_parms): Likewise.
20696 * parse.y (structsp): Likewise.
20697 (base_class): Likewise.
20698 * parse.c: Regenerated.
20699 * pt.c (finish_member_template_decl): Likewise.
20700 * typeck.c (decay_conversion): Likewise.
20701
20702 * cp-tree.h (dfs_skip_vbases): New function.
20703 (find_vbase_instance): Likewise.
20704 * class.c (determine_primary_base): Allow a nearly empty base to
20705 serve as a primary base class under the new ABI.
20706 (get_class_offset_1): Rename to ...
20707 (dfs_get_class_offset): ... this. Simplify. Don't issue error
20708 messages here.
20709 (get_class_offset): Use it. Issue error messages here.
20710 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
20711 find the right copies of virtual bases.
20712 (fixup_vtable_deltas1): Rename to ...
20713 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
20714 bases as primary bases.
20715 (fixup_vtable_deltas): Remove.
20716 (override_one_vtable): Handle virtual bases as primary bases.
20717 (merge_overrides): Likewise.
20718 (finish_struct_1): Likewise.
20719 (dump_class_hierarchy): Dump primary-ness of bases as well.
20720 * search.c (mark_primary_bases): Use a pre-order traversal to
20721 handle primary virtual bases.
20722 (dfs_skip_vbases): New fiunction.
20723 (expand_upcast_fixups): Adjust to handle primary virtual bases.
20724 (fixup_virtual_upcast_offsets): Likewise.
20725 (fixup_all_virtual_upcast_offsets): Likewise.
20726 (dfs_find_vbase_instances): New function.
20727 (find_vbase_instance): Likewise.
20728
20729 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
20730
20731 * lex.c (DIR_SEPARATOR): Delete macro.
20732
20733 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
20734
20735 * decl2.c (lang_decode_option): Handle automatic line wrapping
20736 option.
20737
20738 2000-01-11 Mark Mitchell <mark@codesourcery.com>
20739
20740 * friend.c (do_friend): Don't resolve scopes when processing
20741 template declarations, even if the qualifying scope doesn't
20742 involve template parameters.
20743
20744 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
20745
20746 * class.c (dfs_modify_vtables_queue_p): Remove.
20747 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
20748 and dfs_marked_real_bases_queue_p instead of
20749 dfs_modify_vtables_queue_p.
20750
20751 * class.c (build_vbase_path): Simplify.
20752 (dfs_propagate_binfo_offsets): New function.
20753 (propagate_binfo_offsets): Use it.
20754 (remove_base_field): Simplify.
20755 (dfs_set_offset_for_vbases): Remove.
20756 (dfs_set_offset_for_shared_vbases): New function.
20757 (dfs_set_offset_for_unshared_vbases): Likewise.
20758 (layout_virtual_bases): Use them.
20759 (layout_basetypes): Don't call propagate_binfo_offsets.
20760 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
20761 for the vbases.
20762
20763 * class.c (build_base_field): New function, split out from ...
20764 (build_base_fields): ... here. Use it. Allocate primary bases
20765 first, under the new ABI.
20766 (get_vtable_entry): Remove.
20767 (remove_base_field): New function, split out from ...
20768 (remove_base_fields): ... here. Adjust since primary bases come
20769 first under the new ABI.
20770
20771 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
20772 (initialize_vtbl_ptrs): New function.
20773 (expand_indirect_vtbls_init): Change prototype.
20774 (convert_pointer_to_vbase): Declare.
20775 * init.c (expand_direct_vtbls_init): Remove.
20776 (dfs_initialize_vtbl_ptrs): New function.
20777 (initialize_vtbl_ptrs): Likewise.
20778 (emit_base_init): Use initialize_vtbl_ptrs.
20779 * search.c (convert_pointer_to_vbase): Make it global.
20780 (expand_indirect_vtbls_init): Remove vtable initialization code.
20781 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
20782
20783 * class.c (dfs_finish_vtbls): New function.
20784 (finish_vtbls): Use it.
20785 (dump_class_hierarchy): New function.
20786
20787 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
20788 (BINFO_VBASE_PRIMARY_P): New macro.
20789 (BINFO_VIRTUALS): Add to documentation.
20790 (SET_BINFO_PRIMARY_MARKED_P): Remove.
20791 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20792 (dfs_mark_primary_bases_queue_p): Likewise.
20793 (dfs_unmarked_real_bases_queue_p): New function.
20794 (dfs_marked_real_bases_queue_p): Likewise.
20795 * search.c (dfs_mark_primary_bases): Adjust.
20796 (mark_primary_bases): Likewise.
20797 (get_shared_vbase_if_not_primary): New function.
20798 (dfs_unmarked_real_bases_queue_p): Likewise.
20799 (dfs_marked_real_bases_queue_p): Likewise.
20800 (dfs_get_pure_virtuals): Simplify.
20801 (get_pure_virtuals): Likewise.
20802
20803 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20804
20805 * lex.c: Include tm_p.h.
20806
20807 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
20808
20809 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
20810
20811 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
20812
20813 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
20814 * pt.c (instantiate_decl): Defer comdat templates that might not be
20815 needed.
20816
20817 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
20818 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
20819 (finish_file): Likewise.
20820
20821 * decl2.c (import_export_class): Undo 12/14 change.
20822
20823 * error.c (dump_decl): operator new, not operatornew.
20824
20825 * class.c (field_decl_cmp): A nontype is "greater" than a type.
20826 * search.c (lookup_field_1): Look for the last field with the
20827 desired name.
20828
20829 2000-01-05 Nathan Sidwell <nathan@acm.org>
20830
20831 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
20832 FUNCTION_DECL.
20833
20834 2000-01-05 Nathan Sidwell <nathan@acm.org>
20835
20836 * typeck.c (build_static_cast): Don't strip target qualifiers
20837 when casting from a class.
20838
20839 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20840
20841 * class.c (warn_hidden): Initialize variable `fndecl'.
20842
20843 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
20844
20845 * decl.c (flag_isoc9x): New variable to be able to use code in
20846 c-common.c. For now always zero.
20847
20848 2000-01-03 Mark Mitchell <mark@codesourcery.com>
20849
20850 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
20851 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
20852 or unshare_base_binfos for virtual bases here.
20853 * search.c (dfs_get_vbase_types): Do it here.
20854 (get_vbase_types): Adjust.
20855
20856 2000-01-02 Mark Mitchell <mark@codesourcery.com>
20857
20858 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
20859 (BINFO_PRIMARY_MARKED_P): Use flag 5.
20860 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20861 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20862 (unmark_primary_bases): Remove declaration.
20863 (unmarkedp): Declare.
20864 (dfs_vbase_unmark): Likewise.
20865 * class.c (determine_primary_base): Return immediately if there
20866 are no base classes. Call mark_primary_bases here.
20867 (modify_all_direct_vtables): Remove.
20868 (modify_all_indirect_vtables): Remove.
20869 (dfs_modify_vtables_queue_p): New function.
20870 (dfs_modify_vtables): New function.
20871 (modify_all_vtables): Use them.
20872 (build_base_fields): Build FIELD_DECLs for primary virtual base
20873 classes.
20874 (create_vtable_ptr): Don't call determine_primary_base here.
20875 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
20876 (dfs_set_offset_for_vbases): ... this.
20877 (layout_virtual_bases): Use it.
20878 (layout_class_type): Call determine_primary_base here.
20879 * search.c (unmarkedp): Make it global.
20880 (shared_marked_p): Simplify.
20881 (shared_unmarked_p): Likewise.
20882 (dfs_primary_bases_queue_p): Remove.
20883 (dfs_unmark_primary_bases): Likewise.
20884 (unmark_primary_bases): Likewise.
20885 (mark_primary_bases): Simplify.
20886 (get_pure_virtuals): Don't call mark_primary_bases here.
20887 (dfs_vbase_unmark): New function.
20888 (get_vbase_types): Simplify.
20889
20890 * class.c (struct base_info): Remove.
20891 (determine_primary_base): Take has_virtual_p rather than a
20892 base_info as input. Don't calculate max_has_virtual.
20893 (finish_struct_bits): Remove max_has_virtual argument.
20894 (create_vtable_ptr): Remove max_has_virtual_p argument.
20895 (layout_virtual_bases): Remove max argument.
20896 (layout_basetypes): Likewise.
20897 (layout_class_type): Remove max_has_virtual_p argument.
20898 (finish_struct_1): Remove max_has_virtual.
20899
20900 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
20901 (layout_basetypes): Remove.
20902 * class.c (propagate_binfo_offsets): Moved here from tree.c.
20903 Update to handle primary virtual bases.
20904 (remove_base_fields): New function, split out from
20905 layout_basetypes.
20906 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
20907 (layout_virtual_bases): New function, split out from
20908 layout_basetypes. Update to handle primary virtual bases.
20909 (layout_basetypes): Moved here from tree.c. Use
20910 remove_base_fields and layout_virtual_bases.
20911 * search.c (dfs_mark_primary_bases_queue_p): New function.
20912 (mark_primary_bases): Use it.
20913 * tree.c (CEIL): Remove.
20914 (propagate_binfo_offsets): Remove.
20915 (layout_basetypes): Remove.
20916
20917 2000-01-01 Mark Mitchell <mark@codesourcery.com>
20918
20919 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
20920 (BINFO_PRIMARY_MARKED_P): New macro.
20921 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20922 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20923 (mark_primary_bases): New function.
20924 (unmark_primary_bases): Likewise.
20925 * search.c (get_abstract_virtuals_1): Remove.
20926 (dfs_mark_primary_bases): New function.
20927 (mark_primary_bases): Likewise.
20928 (dfs_unmark_primary_bases): Likewise.
20929 (unmark_primary_bases): Likewise.
20930 (dfs_get_pure_virtuals): Likewise.
20931
20932 2000-01-01 Mark Mitchell <mark@codesourcery.com>
20933
20934 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
20935 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
20936 (modify_one_vtable): Adjust.
20937 (fixup_vtable_deltas1): Likewise.
20938 (override_one_vtable): Likewise.
20939 * search.c (get_abstract_virtuals_1): Likewise.
20940 (get_pure_virtuals): Likewise.
20941 (expand_upcast_fixups): Likewise.
20942 * tree.c (debug_binfo): Likewise.
20943
20944 * class.c (build_vtable): Don't return a value. Don't rebuild
20945 vtables for bases that have already been handled.
20946 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
20947 already been handled.
20948 (modify_one_vtable): Adjust accordingly.
20949 (fixup_vtable_deltas1): Likewise.
20950 (finish_struct_1): Likewise.
20951
20952 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20953
20954 * call.c (build_new_method_call): Also check destructors.
This page took 0.793571 seconds and 6 git commands to generate.